core/vm: optimize jumpdest analysis (#23500)

core/vm: optimize PUSH opcode discrimination
pull/25021/head
Paweł Bylica 3 years ago committed by GitHub
parent b453767ccd
commit 997f1c4f0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/vm/analysis.go

@ -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

Loading…
Cancel
Save