Skip to content

Commit

Permalink
core/vm: update pc in single place in analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Dec 15, 2021
1 parent ed7a22c commit df65556
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions core/vm/analysis.go
Expand Up @@ -106,26 +106,20 @@ func codeBitmapInternal(code, bits bitvec) bitvec {
switch numbits {
case 1:
bits.set1(pc)
pc += 1
case 2:
bits.setN(set2BitsMask, pc)
pc += 2
case 3:
bits.setN(set3BitsMask, pc)
pc += 3
case 4:
bits.setN(set4BitsMask, pc)
pc += 4
case 5:
bits.setN(set5BitsMask, pc)
pc += 5
case 6:
bits.setN(set6BitsMask, pc)
pc += 6
case 7:
bits.setN(set7BitsMask, pc)
pc += 7
}
pc += uint64(numbits)
}
return bits
}

0 comments on commit df65556

Please sign in to comment.