-
Notifications
You must be signed in to change notification settings - Fork 798
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
[pallet-revive] pack exceeding syscall arguments into registers #7319
Open
xermicus
wants to merge
12
commits into
master
Choose a base branch
from
cl/call-arguments
base: master
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.
+709
−745
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
15220bb
pack call arguments into registers instead of the stack
xermicus 4095129
Merge branch 'master' into cl/call-arguments
xermicus 73b9f3d
".git/.scripts/commands/fmt/fmt.sh"
b5f69bf
Merge branch 'master' into cl/call-arguments
xermicus 866e0b8
Update from xermicus running command 'prdoc --audience runtime_dev --…
github-actions[bot] 3fd9de7
update benchmarks
xermicus 18931a7
fmt
xermicus 30ca3f1
Update from xermicus running command 'bench --runtime dev --pallet pa…
github-actions[bot] ee45486
Merge branch 'master' into cl/call-arguments
xermicus 2ff0be8
the pvm fixtures
xermicus 9056664
Merge branch 'master' into cl/call-arguments
xermicus 6926c32
Merge branch 'master' into cl/call-arguments
xermicus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: '[pallet-revive] pack exceeding syscall arguments into registers' | ||
doc: | ||
- audience: Runtime Dev | ||
description: |- | ||
This PR changes how we call runtime API methods with more than 6 arguments: They are no longer spilled to the stack but packed into registers instead. Pointers are 32 bit wide so we can pack two of them into a single 64 bit register. Since we mostly pass pointers, this technique effectively increases the number of arguments we can pass using the available registers. | ||
|
||
To make this work for `instantiate` too we now pass the code hash and the call data in the same buffer, akin to how the `create` family opcodes work in the EVM. The code hash is fixed in size, implying the start of the constructor call data. | ||
crates: | ||
- name: pallet-revive-fixtures | ||
bump: major | ||
- name: pallet-revive-proc-macro | ||
bump: major | ||
- name: pallet-revive | ||
bump: major | ||
- name: pallet-revive-uapi | ||
bump: major |
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
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
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
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
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
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
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
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
Binary file modified
BIN
+31 Bytes
(100%)
substrate/frame/revive/rpc/examples/js/pvm/FlipperCaller.polkavm
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
substrate/frame/revive/rpc/examples/js/pvm/PiggyBank.polkavm
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
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.
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 was hoping it reduces code size not increase it :(
But we mainly do that to reduce complexity of having two different ways of passing arguments.