Add missing gc feature gates#12074
Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom Nov 24, 2025
Merged
Conversation
primoly
commented
Nov 23, 2025
Comment on lines
1134
to
1138
| /// this module. | ||
| #[cfg(any(feature = "gc", feature = "debug"))] | ||
| #[cfg(feature = "gc")] | ||
| pub(crate) fn text_offset(&self, pc: usize) -> u32 { | ||
| u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap() | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This function is only called when the gc feature is enabled, so I removed the debug gate (it produced a warning). But maybe this was intentional as it may be needed with the debug feature in the future. Should I revert this back? The PR that introduced the function is #11769
Member
There was a problem hiding this comment.
Nah that's ok, we basically just frob things until warnings and such go away
Member
alexcrichton
left a comment
There was a problem hiding this comment.
Thanks! Could you also extend the list of checks here with the combination that didn't build? (to help ensure no future regressions)
Comment on lines
1134
to
1138
| /// this module. | ||
| #[cfg(any(feature = "gc", feature = "debug"))] | ||
| #[cfg(feature = "gc")] | ||
| pub(crate) fn text_offset(&self, pc: usize) -> u32 { | ||
| u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap() | ||
| } |
Member
There was a problem hiding this comment.
Nah that's ok, we basically just frob things until warnings and such go away
alexcrichton
approved these changes
Nov 24, 2025
alexcrichton
pushed a commit
to alexcrichton/wasmtime
that referenced
this pull request
Nov 24, 2025
* add more `gc` feature gates * test debug gc feature combination
alexcrichton
added a commit
that referenced
this pull request
Nov 24, 2025
* add more `gc` feature gates * test debug gc feature combination Co-authored-by: primoly <168267431+primoly@users.noreply.github.com>
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.
Add missing
gcfeature gates.Fixes #12071