Skip to content

Commit 997f1c4

Browse files
authored
core/vm: optimize jumpdest analysis (ethereum#23500)
core/vm: optimize PUSH opcode discrimination
1 parent b453767 commit 997f1c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/vm/analysis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func codeBitmapInternal(code, bits bitvec) bitvec {
7676
for pc := uint64(0); pc < uint64(len(code)); {
7777
op := OpCode(code[pc])
7878
pc++
79-
if op < PUSH1 || op > PUSH32 {
79+
if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false).
8080
continue
8181
}
8282
numbits := op - PUSH1 + 1

0 commit comments

Comments
 (0)