aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/analysis.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/analysis.go')
-rw-r--r--core/vm/analysis.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/core/vm/analysis.go b/core/vm/analysis.go
index f9c4298d3..0ccf47b97 100644
--- a/core/vm/analysis.go
+++ b/core/vm/analysis.go
@@ -16,34 +16,6 @@
package vm
-import (
- "math/big"
-
- "github.com/ethereum/go-ethereum/common"
-)
-
-// destinations stores one map per contract (keyed by hash of code).
-// The maps contain an entry for each location of a JUMPDEST
-// instruction.
-type destinations map[common.Hash]bitvec
-
-// has checks whether code has a JUMPDEST at dest.
-func (d destinations) has(codehash common.Hash, code []byte, dest *big.Int) bool {
- // PC cannot go beyond len(code) and certainly can't be bigger than 63bits.
- // Don't bother checking for JUMPDEST in that case.
- udest := dest.Uint64()
- if dest.BitLen() >= 63 || udest >= uint64(len(code)) {
- return false
- }
-
- m, analysed := d[codehash]
- if !analysed {
- m = codeBitmap(code)
- d[codehash] = m
- }
- return OpCode(code[udest]) == JUMPDEST && m.codeSegment(udest)
-}
-
// bitvec is a bit vector which maps bytes in a program.
// An unset bit means the byte is an opcode, a set bit means
// it's data (i.e. argument of PUSHxx).