Rewrite wrapper generators file to python and mark noGC functions using artifacts from hazard analysis reports#649
Merged
jdm merged 2 commits intoservo:mainfrom Nov 10, 2025
Merged
Conversation
it's easier to do complex processing in python Signed-off-by: sagudev <[email protected]>
…unctions no GC in wrappers Signed-off-by: sagudev <[email protected]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).