Conversation
Codecov Report
@@ Coverage Diff @@
## master #153 +/- ##
==========================================
+ Coverage 84.93% 85.15% +0.22%
==========================================
Files 21 21
Lines 2244 2237 -7
Branches 218 217 -1
==========================================
- Hits 1906 1905 -1
+ Misses 311 305 -6
Partials 27 27 |
lib/evmone/analysis.cpp
Outdated
| case OP_SELFDESTRUCT: | ||
| block = nullptr; | ||
| break; | ||
| if (create_new_block || (code_pos != code_end && *code_pos == OP_JUMPDEST)) |
There was a problem hiding this comment.
Maybe you could set create_new_block to true in if (opcode == OP_JUMPDEST) above, then this would be simpler
There was a problem hiding this comment.
That's right, but if create_new_block is already true we don't have to perform other checks.
There was a problem hiding this comment.
Renamed that to is_terminator. This is consistent with future changes in #158.
ffe2b85 to
c23e3bb
Compare
|
Added benchmark results. |
c23e3bb to
d9ee8b0
Compare
|
Would it make sense merging all the test changes separately or they are different due to refactoring? |
Will do. |
|
#166. |
fdc3510 to
1853e06
Compare
|
How does it look now? |
lib/evmone/analysis.cpp
Outdated
| // this is a terminating instruction or the next instruction is a JUMPDEST. | ||
| block = &analysis.blocks.emplace_back(); | ||
| block_stack_change = 0; | ||
| analysis.instrs.emplace_back(fns[OPX_BEGINBLOCK]).arg.number = |
There was a problem hiding this comment.
here maybe split into two lines, too
1853e06 to
3cc7fa1
Compare
Requires #166.
Refactors analysis to have new block creation in single place. It also removes some unneeded variables and code.
TODO
Bechmarks: