mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core/vm: removed type destinations
This commit is contained in:
parent
5d5a01e3f3
commit
843d483240
2 changed files with 3 additions and 11 deletions
|
|
@ -16,14 +16,6 @@
|
|||
|
||||
package vm
|
||||
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
// destinations stores one bitmap per contract (keyed by hash of code).
|
||||
// The bitmaps mark code and data-sections for a piece of contract code
|
||||
type destinations map[common.Hash]bitvec
|
||||
|
||||
// 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).
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ type Contract struct {
|
|||
caller ContractRef
|
||||
self ContractRef
|
||||
|
||||
jumpdests destinations // Aggregated result of JUMPDEST analysis.
|
||||
analysis bitvec // Locally cached result of JUMPDEST analysis
|
||||
jumpdests map[common.Hash]bitvec // Aggregated result of JUMPDEST analysis.
|
||||
analysis bitvec // Locally cached result of JUMPDEST analysis
|
||||
|
||||
Code []byte
|
||||
CodeHash common.Hash
|
||||
|
|
@ -69,7 +69,7 @@ func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uin
|
|||
// Reuse JUMPDEST analysis from parent context if available.
|
||||
c.jumpdests = parent.jumpdests
|
||||
} else {
|
||||
c.jumpdests = make(destinations)
|
||||
c.jumpdests = make(map[common.Hash]bitvec)
|
||||
}
|
||||
|
||||
// Gas should be a pointer so it can safely be reduced through the run
|
||||
|
|
|
|||
Loading…
Reference in a new issue