Skip to content

Rewrite wrapper generators file to python and mark noGC functions using artifacts from hazard analysis reports#649

Merged
jdm merged 2 commits intoservo:mainfrom
sagudev:noGC
Nov 10, 2025
Merged

Rewrite wrapper generators file to python and mark noGC functions using artifacts from hazard analysis reports#649
jdm merged 2 commits intoservo:mainfrom
sagudev:noGC

Conversation

@sagudev
Copy link
Copy Markdown
Member

@sagudev sagudev commented Nov 10, 2025

Rewriting wrapper generators to python make us more cross-platform and allows us to do more complex transformations easier.

We use two artifacts allFunctions and gcFunctions from hazard analysis from gecko CI: from allFunctions we will remove gcFunctions to get NoGC functions and use their link_name to make them be NoGC in wrappers. While this will not mark any glue functions as NoGC this is the safest way to do things correctly, because it's better to be more strict (taking &mut JSContext even if we do not trigger GC) than too lenient (taking &JSContext but we trigger GC).

it's easier to do complex processing in python

Signed-off-by: sagudev <[email protected]>
@sagudev sagudev mentioned this pull request Nov 10, 2025
6 tasks
@sagudev sagudev requested a review from jdm November 10, 2025 10:35
Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magnificent!

@sagudev sagudev added this pull request to the merge queue Nov 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
…ng artifacts from hazard analysis reports (#649)

* rewrite generate_wrappers to python

it's easier to do complex processing in python

Signed-off-by: sagudev <[email protected]>

* Use allFuctions and gcFunctions to create noGC and use this to make functions no GC in wrappers

Signed-off-by: sagudev <[email protected]>

---------

Signed-off-by: sagudev <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 10, 2025
@sagudev sagudev added this pull request to the merge queue Nov 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 10, 2025
@jdm jdm added this pull request to the merge queue Nov 10, 2025
Merged via the queue into servo:main with commit e3d1112 Nov 10, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants