diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-01-21 22:29:58 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-03-23 07:04:00 +0800 |
commit | 342ae7ce7dfd7a0eab2dd06bfa65199825279f05 (patch) | |
tree | 4d90314e50e137bcd8ee837cbb396fee40e2bb4b /core/vm/common.go | |
parent | 2855a93ede6e9437d05a82c2397d48744621db9b (diff) | |
download | go-tangerine-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.tar.gz go-tangerine-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.tar.zst go-tangerine-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.zip |
core, core/vm, tests: changed the initialisation behaviour of the EVM
The EVM was previously initialised and created for every CALL, CALLCODE,
DELEGATECALL and CREATE. This PR changes this behaviour so that the same
EVM can be used through the session and beyond as long as the
Environment sticks around.
Diffstat (limited to 'core/vm/common.go')
-rw-r--r-- | core/vm/common.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/core/vm/common.go b/core/vm/common.go index 395ed0471..f73bc1527 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -21,7 +21,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/params" ) @@ -51,19 +50,6 @@ var ( max = big.NewInt(math.MaxInt64) // Maximum 64 bit integer ) -// NewVm returns a new VM based on the Environment -func NewVm(env Environment) VirtualMachine { - switch env.VmType() { - case JitVmTy: - return NewJitVm(env) - default: - glog.V(0).Infoln("unsupported vm type %d", env.VmType()) - fallthrough - case StdVmTy: - return New(env) - } -} - // calculates the memory size required for a step func calcMemSize(off, l *big.Int) *big.Int { if l.Cmp(common.Big0) == 0 { |