-
Notifications
You must be signed in to change notification settings - Fork 5
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
use List instead of Map for <locals> cell #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides my question, it looks good to me!
@@ -1187,7 +1184,7 @@ The `#take` function will return the parameter stack in the reversed order, then | |||
... | |||
</instrs> | |||
<valstack> VALSTACK => .ValStack </valstack> | |||
<locals> LOCAL => .Map </locals> | |||
<locals> LOCAL </locals> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use Locals => .List
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this rule is immediately followed by the one for init_locals
which rewrites this cell to the empty list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Thanks!
Not ready for review yet.
This PR attempts to optimize the local.get and local.set instructions by means of replacing the Map used by the
<locals>
cell with a List.