re-named some v2state_transactions.nim to its original name without the v2
also: re-integrated stack_defs.nim back into stack.nim why: the v2 prefix of the file name was used as a visual aid when comparing vm2 against vm sources
This commit is contained in:
parent
e6eee3f3a6
commit
69a1ee5fc8
|
@ -112,10 +112,9 @@ export
|
|||
|
||||
|
||||
import
|
||||
./stack_defs as sdf,
|
||||
./stack as stk
|
||||
export
|
||||
sdf.Stack,
|
||||
stk.Stack,
|
||||
stk.`$`,
|
||||
stk.`[]`,
|
||||
stk.dup,
|
||||
|
|
|
@ -18,7 +18,7 @@ import
|
|||
../forks_list,
|
||||
../op_codes,
|
||||
../../memory,
|
||||
../../stack_defs,
|
||||
../../stack,
|
||||
eth/common/eth_types,
|
||||
sets
|
||||
|
||||
|
|
|
@ -7,11 +7,17 @@
|
|||
|
||||
import
|
||||
chronicles, strformat, strutils, sequtils, macros, eth/common, nimcrypto,
|
||||
../errors, ../validation, ./stack_defs
|
||||
../errors, ../validation
|
||||
|
||||
logScope:
|
||||
topics = "vm stack"
|
||||
|
||||
type
|
||||
Stack* = ref object of RootObj
|
||||
values*: seq[StackElement]
|
||||
|
||||
StackElement = UInt256
|
||||
|
||||
template ensureStackLimit: untyped =
|
||||
if len(stack.values) > 1023:
|
||||
raise newException(FullStack, "Stack limit reached")
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2018 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
||||
# http://opensource.org/licenses/MIT)
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
import
|
||||
stint
|
||||
|
||||
export
|
||||
UInt256
|
||||
|
||||
type
|
||||
StackElement* = UInt256
|
||||
|
||||
Stack* = ref object of RootObj
|
||||
values*: seq[StackElement]
|
||||
|
||||
# End
|
|
@ -31,9 +31,9 @@ when not breakCircularDependency:
|
|||
../constants,
|
||||
../db/accounts_cache,
|
||||
./computation,
|
||||
./interpreter/gas_costs,
|
||||
./state,
|
||||
./types,
|
||||
./interpreter/gas_costs,
|
||||
eth/common
|
||||
|
||||
else:
|
|
@ -11,7 +11,7 @@
|
|||
import
|
||||
tables, eth/common,
|
||||
options, json, sets,
|
||||
./stack_defs, ./memory, ./code_stream,
|
||||
./stack, ./memory, ./code_stream,
|
||||
./interpreter/[gas_costs, op_codes, forks_list],
|
||||
# TODO - will be hidden at a lower layer
|
||||
../db/[db_chain, accounts_cache]
|
||||
|
|
|
@ -16,7 +16,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||
|
||||
else:
|
||||
import
|
||||
./vm2/v2state_transactions as vmx,
|
||||
./vm2/state_transactions as vmx,
|
||||
./vm2/state as vms
|
||||
export
|
||||
vmx.setupTxContext
|
||||
|
|
|
@ -13,7 +13,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||
vm/state_transactions as vmx
|
||||
else:
|
||||
import
|
||||
vm2/v2state_transactions as vmx
|
||||
vm2/state_transactions as vmx
|
||||
|
||||
export
|
||||
vmx.execComputation,
|
||||
|
|
Loading…
Reference in New Issue