-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[move] Add function type layout #15442
Closed
georgemitenkov
wants to merge
24
commits into
11-23-vm_changes_merged_in
from
george/function-layouts
Closed
[move] Add function type layout #15442
georgemitenkov
wants to merge
24
commits into
11-23-vm_changes_merged_in
from
george/function-layouts
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…le of function type
…unnecessarily; avoid generating errors/warnings about default Loc
…ionExpr to Value::Function, got things mostly back in shape
…for abilities in lambda_lifter.rs
…constraints to avoid reducing set of function type abilities when unifying types
…to bind leading arguments
…ser location on `||`
[move-vm] Types and opcodes for closures This PR implements the extensions needed in the file format for representing closures: - The type (SignatureToken) has a new variant `Function(args, result, abilities)` to represent a function type - The opcodes are extendeed by operations `ClosPack`, `ClosPackGeneric`, and `ClosEval` This supports bit masks for specifyinng which arguments of a function are captured when creating a closure. Bytecode verification is extended to support the new types and opcodes. The implementation of consistency, type, and reference safety should be complete. What is missing are: - File format serialization - Interpreter and value representation - Value serialization - Connection of the new types with the various other type representations
…rser work: - `LdFunction`, `LdFunctionGeneric` = generate a closure from a defined function - `EarlyBind` = bind more arguments to any closure - `Invoke` = call a closure with final arguments Add some description/semantics to `file_format.rs` to better describe the implementation which will be needed. Get rid of complex Mask calculations in favor of simpler early bninding of `k` initial arguments. Hopefully keep all bytecode verifier operations working the same.
…eFunction based on George's suggestion
⏱️ 25m total CI duration on this PR
|
@@ -348,6 +348,12 @@ fn native_format_impl( | |||
out.push('}'); | |||
}, | |||
|
|||
MoveTypeLayout::Function(..) => { | |||
// We can not allow prints for now, but ideally we should map to a function nae here, |
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.
There appears to be a typo in the comment: function nae
should be function name
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
georgemitenkov
force-pushed
the
george/function-layouts
branch
from
December 2, 2024 17:13
a6f102a
to
2aa322c
Compare
brmataptos
force-pushed
the
11-23-vm_changes_merged_in
branch
2 times, most recently
from
December 4, 2024 07:23
1d8a057
to
d382ca0
Compare
brmataptos
force-pushed
the
11-23-vm_changes_merged_in
branch
2 times, most recently
from
December 4, 2024 22:50
2fa8bde
to
d7ded7a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
How Has This Been Tested?
Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist