Skip to content

Introduce helper methods for loading from VMContext#13627

Open
fitzgen wants to merge 1 commit into
bytecodealliance:mainfrom
fitzgen:VMContext-alias-regions-followup
Open

Introduce helper methods for loading from VMContext#13627
fitzgen wants to merge 1 commit into
bytecodealliance:mainfrom
fitzgen:VMContext-alias-regions-followup

Conversation

@fitzgen

@fitzgen fitzgen commented Jun 12, 2026

Copy link
Copy Markdown
Member

These helpers always use the correct flags and region.

Eventually there will be helper methods for all our other VM* types as well.

Ideally we would mechanically generate all this stuff, and the VM* type definitions, and the offset calculation from the same single source of truth via fancy macros or whatever. Haven't fully thought through that yet, but one day. In the meantime, this prevents accidental bugs due to using incorrect flags and regions.

These helpers always use the correct flags and region.

Eventually there will be helper methods for all our other `VM*` types as well.

Ideally we would mechanically generate all this stuff, and the `VM*` type
definitions, and the offset calculation from the same single source of truth via
fancy macros or whatever. Haven't fully thought through that yet, but one
day. In the meantime, this prevents accidental bugs due to using incorrect flags
and regions.
@fitzgen fitzgen requested review from a team as code owners June 12, 2026 22:30
@fitzgen fitzgen requested review from cfallin and removed request for a team June 12, 2026 22:30
@fitzgen

fitzgen commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@cfallin here is the follow up I promised based on your review comment in #13615

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good -- thanks!

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