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

Check if WasmGenerator::create_call_stack_local needs more behaviors #362

Open
Acaccia opened this issue Mar 15, 2024 · 0 comments
Open

Comments

@Acaccia
Copy link
Collaborator

Acaccia commented Mar 15, 2024

Until recently, the method WasmGenerator::create_call_stack_local could allocate enough space for:

  1. representing a Value in memory as it is represented on the Wasm stack,
  2. representing a complete Value in memory,
  3. or both.

However, this commit changed the behavior of point 2. It fixed an issue where a Value which contains an in-memory type would only have enough space for (offset, length). Now it also allocates length space to write the in-memory Values.

This fixes bugs for functions like map-get?, which couldn't write the entirety of the result in memory due to a lack of allocated space.
However, this allocates more memory than before, which might not be needed for some other functions.

We should check if the old behavior is enough for some functions and if yes, add a way to use it from WasmGenerator::create_call_stack_local.

@smcclellan smcclellan added this to the WASM Phase 2 milestone Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

2 participants