AVM: Track Scratch Slot Types#4064
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4064 +/- ##
==========================================
+ Coverage 54.39% 54.40% +0.01%
==========================================
Files 391 391
Lines 48570 48594 +24
==========================================
+ Hits 26418 26436 +18
- Misses 19929 19936 +7
+ Partials 2223 2222 -1
Continue to review full report at Codecov.
|
jannotti
reviewed
Jun 2, 2022
jannotti
reviewed
Jun 2, 2022
jannotti
reviewed
Jun 2, 2022
jannotti
reviewed
Jun 3, 2022
jannotti
reviewed
Jun 3, 2022
jannotti
reviewed
Jun 3, 2022
jannotti
previously approved these changes
Jun 3, 2022
Contributor
jannotti
left a comment
There was a problem hiding this comment.
Looks good to me. I'd like @michaeldiamant to have a look on Monday when he comes back as I think he's the only other person who has looked at ProgramKnowledge.
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
Refactor scratchSpace initialization into newOpStream
michaeldiamant
approved these changes
Jun 9, 2022
This file contains hidden or 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
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.
Summary
This PR will allow us to error on things of the sort:
"byte 0x01; store 0; int 1; load 0; +"
by keeping track of the scratch space as we assemble the program within each basic block.
Test Plan
Load/Store: Tested to make sure a load in the first block puts a uint64 on the stack and that load puts the type of whatever was last stored in that slot if a store was done in that block
Loads/Stores: Added test for loads when all the slots are the same type and put in a test for stores which makes sure it only sets slots to StackAny if the type is not the same as what's on the stack