Skip to content
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

AVM: Track Scratch Slot Types #8

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

AVM: Track Scratch Slot Types #8

wants to merge 12 commits into from

Conversation

iten-alg
Copy link
Owner

@iten-alg iten-alg commented Jun 1, 2022

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

@iten-alg iten-alg added the enhancement New feature or request label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants