This repository was archived by the owner on Oct 20, 2024. It is now read-only.
Check real stack changes inside function vs its definition#302
Open
igorline wants to merge 5 commits intohuff-language:mainfrom
Open
Check real stack changes inside function vs its definition#302igorline wants to merge 5 commits intohuff-language:mainfrom
igorline wants to merge 5 commits intohuff-language:mainfrom
Conversation
devtooligan
reviewed
Oct 3, 2023
| Opcode::Push30 => (0, 1), | ||
| Opcode::Push31 => (0, 1), | ||
| Opcode::Push32 => (0, 1), | ||
| Opcode::Dup1 => (1, 2), |
Contributor
There was a problem hiding this comment.
these dup and swap look wrong
Author
There was a problem hiding this comment.
agree, followed blindlly evm.codes :/ here different context
Author
There was a problem hiding this comment.
@devtooligan was testing it against elohim contract and indeed we need those numbers
if inside macro I would first do swap1 then, I need to be sure that stack is having at least 2 elements
61241ef to
28020a4
Compare
28020a4 to
c562b98
Compare
ab98df2 to
43d3f4c
Compare
43d3f4c to
6c32e66
Compare
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR introduces compiler error on incorrect takes/returns specification for huff functions as this produces broken bytecode.
Related research https://twitter.com/igorlineee/status/1699206608994078949
Missing tests yet, but would like to know opinions on my implementation.