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

DW_TAG_subprogram and multiple return values #16

Open
ggreif opened this issue Aug 31, 2020 · 1 comment
Open

DW_TAG_subprogram and multiple return values #16

ggreif opened this issue Aug 31, 2020 · 1 comment

Comments

@ggreif
Copy link
Contributor

ggreif commented Aug 31, 2020

I think the return types are under-specified in the case that a WASM func returns more than one value (this is part of spec v1.1).

Let's assume we want to emit DWARF from wast2wasm:

  • when there are zero returns, omit the DW_AT_type
  • when one result emit DW_AT_type with that result type
  • when more than one result, ???.

One workaround that comes to my mind is emitting a synthetic tuple type, but maybe a proper solution should be worked out in cooperation with a future DWARF6 spec.

I am actually asking for ideas how to map multi-returns to DWARF5 and I am happy to provide input for discussion.

@yurydelendik
Copy link
Owner

One workaround that comes to my mind is emitting a synthetic tuple type, but maybe a proper solution should be worked out in cooperation with a future DWARF6 spec.

I think it is sensible do both. We want to introduce DW_TAG_ extension to be specific for Wasm multi-value return for sure, and per "7.1 Vendor Extensibility" of the standard it is an acceptable way.

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

No branches or pull requests

2 participants