-
-
Notifications
You must be signed in to change notification settings - Fork 790
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
Improved storage variable layout #793
Improved storage variable layout #793
Conversation
'MSTORE', | ||
'PUSH1', 64, 'PUSH1', MemoryPositions.FREE_VAR_SPACE, 'SHA3' | ||
]) | ||
return o |
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.
@daejunpark would be great if you could double check this for me 😄
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.
sha3_64
looks good to me.
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.
Great thanks ;)
FREE_VAR_SPACE2 = 224 | ||
BLANK_SPACE = 256 | ||
FREE_LOOP_INDEX = 288 | ||
RESERVED_MEMORY = 320 |
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.
@jacqueswww Is it intended to have the same size of the reserved memory even if we have the additional one (FREE_VAR_SPACE2
)?
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.
@daejunpark there seemed to have been an extra slot btween 288 and 320 that was never used. So I took the liberty of just shifting the addresses up.
@jacqueswww Sorry for the delay, but I'd like to take a closer look at In the meantime, @yzhang90 could you take a look at this as well? |
vyper/parser/parser_utils.py
Outdated
return LLLnode.from_list(['sha3_64', parent, sub], | ||
typ=subtype, | ||
location='storage') | ||
elif location == 'storage_prehashed': |
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.
location = storage and location = storage_prehashed use different hash-schema? when the location will be storage_hashed?
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.
Please confirm that storage_prehashed
is only used in List
, Struct
and Tuple
. You don't need to consider it when the type is Map
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.
Yes that is correct, prehashed should only occur with != Map
I will remove this section ;)
- What I did
Fixes #769
- How I did it
- How to verify it
- Description for the changelog
- Cute Animal Picture