Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #600 +/- ##
==========================================
- Coverage 97.21% 97.21% -0.01%
==========================================
Files 74 74
Lines 7575 7571 -4
==========================================
- Hits 7364 7360 -4
Misses 211 211
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Member
Author
BenchmarksHaswell, GCC12-4.0%Haswell, Clang16-3.3%Skylake, Clang17-2.4%Apple M1, Clang16-3.4% |
abec11f to
477dd5b
Compare
gumb0
reviewed
Apr 12, 2023
| { | ||
| template <Opcode Op> | ||
| evmc_status_code call_impl(StackTop stack, ExecutionState& state) noexcept | ||
| Result call_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept |
Member
There was a problem hiding this comment.
Nit: it's called gas in invoke wrappers, should it be also gas here?
Suggested change
| Result call_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept | |
| Result call_impl(StackTop stack, int64_t gas, ExecutionState& state) noexcept |
Member
Author
There was a problem hiding this comment.
I'm switching from gas_left to gas because seems good enough.
Member
Author
There was a problem hiding this comment.
I will leave gas_left in instructions this time because it comes from state.gas_left. This slightly limits the number of change.s
gumb0
approved these changes
Apr 12, 2023
- Pass to and return gas counter to instructions implementations by
value, don't use ExecutionState::gas_left. This improves performance.
- Introduce Result type {status, gas}.
- Change StopToken to TermResult (strong alias of Result).
hanzo-dev
pushed a commit
to luxcpp/cevm
that referenced
this pull request
Apr 26, 2026
Pass gas to instructions by value
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.
ExecutionState::gas_left. This improves performance.Resulttype{status, gas}.StopTokentoTermResult(strong alias ofResult).gas_leftfromExecutionState.