-
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
Lambda support in VM: Wolfgang's PR plus some simplifications (removing mask, clarifying ops) #15387
Open
brmataptos
wants to merge
2
commits into
11-21-lambda-compiler-completion
Choose a base branch
from
11-23-vm_changes_merged_in
base: 11-21-lambda-compiler-completion
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Lambda support in VM: Wolfgang's PR plus some simplifications (removing mask, clarifying ops) #15387
brmataptos
wants to merge
2
commits into
11-21-lambda-compiler-completion
from
11-23-vm_changes_merged_in
+1,064
−71
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
[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.
22 tasks
⏱️ 16m total CI duration on this PR
|
This was referenced Nov 25, 2024
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
brmataptos
changed the title
Verbatim cherry-pick of Wolfgang's draft PR 15171 = commit #d85b919
Wolfgang's VM closure support + reconciliation with lambda simplifications (removing mask, clarifying ops)
Nov 25, 2024
brmataptos
changed the title
Wolfgang's VM closure support + reconciliation with lambda simplifications (removing mask, clarifying ops)
Lambda support in VM: Wolfgang's PR plus some simplifications (removing mask, clarifying ops)
Nov 25, 2024
brmataptos
requested review from
banool,
gregnazario and
0xmaayan
as code owners
November 25, 2024 05:07
brmataptos
requested review from
georgemitenkov,
runtian-zhou,
vgao1996 and
wrwg
November 25, 2024 05:08
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
This PR started with a cherry-pick commit of Wolfgang's draft PR 15171 = commit #d85b919.
On top of that, I
not requiring a defined function handle except in
LdFunction[Generic]
.EarlyBind
andInvoke
because of the way the verifier works today.file_format.rs
which I'd worked out previously.The current operations are:
-
LdFunction
,LdFunctionGeneric
= generate a closure from a defined function-
EarlyBind
= bind more arguments to any closure-
Invoke
= call a closure with final argumentsAs noted by Wolfgang in his commit, we are still lacking:
How Has This Been Tested?
Barely tested, just running through existing tests
Key Areas to Review
Did I lose any verifier support when modfiying Wolfgang's opcodes?