Skip to content

Commit

Permalink
core/vm: optimize PUSH opcode discrimination
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jun 2, 2022
1 parent 5bc4e8f commit c5cf887
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 c5cf887

Please sign in to comment.