Skip to content

Commit

Permalink
core/vm: optimize jumpdest analysis (ethereum#23500)
Browse files Browse the repository at this point in the history
core/vm: optimize PUSH opcode discrimination
  • Loading branch information
chfast authored and maoueh committed Nov 29, 2022
1 parent f2b4ca9 commit eac1b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/analysis.go
Expand Up @@ -76,7 +76,7 @@ func codeBitmapInternal(code, bits bitvec) bitvec {
for pc := uint64(0); pc < uint64(len(code)); {
op := OpCode(code[pc])
pc++
if op < PUSH1 || op > PUSH32 {
if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false).
continue
}
numbits := op - PUSH1 + 1
Expand Down

0 comments on commit eac1b86

Please sign in to comment.