Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement returning option/result of a handle in code generation #1121

Merged
merged 2 commits into from
Jul 13, 2023
Merged

Conversation

cpetig
Copy link
Contributor

@cpetig cpetig commented Jul 13, 2023

Fixes #1120

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks! I think additionally this can be updated to use self.emit_and_lift(ty, addr, &I32Load { offset }), like the Type::U32 case above this

@sunfishcode
Copy link
Member

And if you'd like to, you could also implement write_to_memory for resources, using lower_and_emit, which works similarly to emit_and_lift.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexcrichton alexcrichton merged commit 6f59f98 into bytecodealliance:main Jul 13, 2023
15 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.

wit-parser: todo!() in Generator::call for option<resource>
3 participants