-
-
Notifications
You must be signed in to change notification settings - Fork 675
Misc refactorings #974
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
Misc refactorings #974
Conversation
Last commit wraps up the work done here in a way that closures are still not implemented, but the improvements made can be merged to master with no functional changes. Doing this because I expect a pre-pass PR to become messy, and doing all of that here would get us conflict hell. In particular, this reverts
but keeps |
Now also reverts the table trick since fat pointers are another option. |
…ary branch unification + autorelease comments
Last commit fixes respectively improves a few things:
|
Merging to get this out of the way so I can continue with something concrete :) |
(local $1 i32) | ||
i32.const 296 | ||
local.set $1 |
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.
I'm wondering why this happened? $1
not using inside this function at all
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.
Hmm, maybe that's retained and released in the function, with post-assemblyscript removing those, leaving the set behind since no further passes are run after that. Strange that it exists in the first place, though.
These are the first steps to implement closures as proposed in #798 (comment). Doesn't do anything new yet from a user's perspective, but levels the field for the actual implementation:
usize
(was plainu32
)!(ref & AL_MASK)
call_indirect
s by checking forref & AL_MASK
. If a plain function table index, do an indirect call right away, otherwise unwrap the closure context firstusize
is 32 or 64 bits now.call_indirect
andcall_direct
builtins because these conflict with closure context setup.Next steps: