You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we are incrementing the stack pointer (a Wasm global) each time a new value needs to be pushed to the execution stack (the current function's stack frame in the linear memory). Instead, we should do a compilation pass that computes the total stack size needed for a function, and increments the stack pointer once, during the function prologue, and save the offsets for each local to use during the compilation pass.
The text was updated successfully, but these errors were encountered:
obycode
changed the title
Optimize stack pointer management
[ 💻 Clarity VM ] Optimize stack pointer management
Sep 5, 2023
Currently, we are incrementing the stack pointer (a Wasm global) each time a new value needs to be pushed to the execution stack (the current function's stack frame in the linear memory). Instead, we should do a compilation pass that computes the total stack size needed for a function, and increments the stack pointer once, during the function prologue, and save the offsets for each local to use during the compilation pass.
The text was updated successfully, but these errors were encountered: