core/vm: optimize jumpdest analysis (#23500)

core/vm: optimize PUSH opcode discrimination
This commit is contained in:
Paweł Bylica
2022-06-03 10:40:14 +02:00
committed by GitHub
parent b453767ccd
commit 997f1c4f0a
+1 -1
View File
@@ -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