Unverified Commit 997f1c4f authored by Paweł Bylica's avatar Paweł Bylica Committed by GitHub

core/vm: optimize jumpdest analysis (#23500)

core/vm: optimize PUSH opcode discrimination
parent b453767c
...@@ -76,7 +76,7 @@ func codeBitmapInternal(code, bits bitvec) bitvec { ...@@ -76,7 +76,7 @@ func codeBitmapInternal(code, bits bitvec) bitvec {
for pc := uint64(0); pc < uint64(len(code)); { for pc := uint64(0); pc < uint64(len(code)); {
op := OpCode(code[pc]) op := OpCode(code[pc])
pc++ pc++
if op < PUSH1 || op > PUSH32 { if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false).
continue continue
} }
numbits := op - PUSH1 + 1 numbits := op - PUSH1 + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment