-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
chore[venom]: expand venom docs #4314
Conversation
vyper/venom/README.md
Outdated
|
||
- `jmp` | ||
- Unconditional jump to code denoted by given `label`. | ||
- Changes the program counter. |
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.
i don't think we actually need to say this. it depends on the architecture, or it could be optimized out (if the jumpdest is immediately following the jump)
vyper/venom/README.md
Outdated
- db | ||
- db stores into the data segment some label? hmm | ||
- dloadbytes | ||
- aparently the same `codecopy`-everything handled the same way. Maybe historical reasons? |
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.
it's handled differently in the legacy IR pipeline, but in venom they are handled the same
vyper/venom/README.md
Outdated
- Describe the architecture of analyses and passes a bit more. mention the distiction between analysis and pass (optimisation or transformation). | ||
- mention how to compile into it , bb(deploy), bb_runtime | ||
- perhaps add some flag to skip the store expansion pass? for readers of the code | ||
- some of the evm opcodes are from older versions - should comment on that? instructions like difficulty that changed into prevrandao |
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.
it's not really necessary, DIFFICULTY is known to be an alias for PREVRANDAO
vyper/venom/README.md
Outdated
- pass - run_pass | ||
|
||
Perhaps mention that functions: | ||
- each function starts as if with empty stack |
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.
not exactly -- they take (optional) output buffer and return pc
vyper/venom/README.md
Outdated
ret op | ||
``` | ||
- `exit` | ||
- Similar to `stop`, but used for constructor exit. The assembler is expected to jump to a special initcode sequence which returns the runtime code. |
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.
Do you know why it may be in fallback? there is the revert before it anyway, but it confused me as it doesn't seem to do much with constructor exit.
fallback: IN=[__main_entry, 47_if_exit] OUT=[] => {}
revert 0, 0
exit
```
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.
I don't think it should be in runtime code...
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.
I think it is: --experimental-codegen -f bb_runtime
on
totalShares: public(uint256)
# Set up the company.
@deploy
def __init__(_total_shares: uint256):
pass
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.
yeah i see what you mean. dead code! but it shouldn't be there, i would consider that a bug in our venom generation.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4314 +/- ##
==========================================
- Coverage 91.40% 89.18% -2.22%
==========================================
Files 112 112
Lines 15927 15927
Branches 2694 2694
==========================================
- Hits 14558 14205 -353
- Misses 935 1218 +283
- Partials 434 504 +70 ☔ View full report in Codecov by Sentry. |
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.
lgtm. thank you!
What I did
Documents venom IR instructions.
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture