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 Jun 3, 2022
1 parent b453767 commit 997f1c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/analysis.go
Original file line number Diff line number Diff line change
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 997f1c4

Please sign in to comment.