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

Compiler: Use user-defined function names in wasm output #273

Closed
ospencer opened this issue Aug 26, 2020 · 3 comments
Closed

Compiler: Use user-defined function names in wasm output #273

ospencer opened this issue Aug 26, 2020 · 3 comments
Labels

Comments

@ospencer
Copy link
Member

This would make Grain far more debuggable for both users and developers, as the function names show up in stack traces (with or without source maps) and of course in the wasm output.

Seeing the actual function name would be loads better than just $GRAIN$LAM_55.

Due to limitations with wasm source maps, we can't just source map to the original names.

Open questions:

  • How should shadowed functions be named?
  • How should anonymous functions be named?
@phated
Copy link
Member

phated commented Mar 24, 2021

@ospencer fixed this for exported functions, but not for all functions in the wasm output. There's still some work that needs to be done.

@ospencer
Copy link
Member Author

This has been done, potentially by #1244 (but not clear).

@ospencer
Copy link
Member Author

I'll also note that for fully linked modules, names are not expected to be retained (they don't exist in wasm binaries, which is what the linker stitches together).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants