forked from vyperlang/vyper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: msg.data memory allocation removed in favor of builtin function …
…handling (vyperlang#2419) Refactored the msg.data environment variable. Instead of handling each distinctive use case in expr.py, uses are handled in the respective functions which operate on msg.data. Len builtin simply returns calldatasize Slice builtin returns a bytes array containing the sliced portion of calldata The length argument to slice should be a compile time literal as calldatasize is unbounded, and we need a maxsize on the return type of the slice function instead of defaulting to the maxsize of msg.data The test suite for msg.data is unchanged, so passing tests verify this refactoring worked.
- Loading branch information
Showing
4 changed files
with
24 additions
and
28 deletions.
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
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