mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 02:15:30 +00:00
provide vm_memory as import/export wrapper
details: moved original vm/memory.nim => vm/nvm_memory.nim
This commit is contained in:
parent
7b5d00307c
commit
cf63b9b03f
@ -10,7 +10,7 @@ import
|
||||
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
|
||||
vm/interpreter/utils/[macros_procs_opcodes, utils_numeric],
|
||||
vm/interpreter/[gas_meter, nvm_gas_costs, opcode_values, nvm_forks],
|
||||
vm/[memory, stack, code_stream, nvm_computation, nvm_state, nvm_types],
|
||||
vm/[nvm_memory, stack, code_stream, nvm_computation, nvm_state, nvm_types],
|
||||
errors, constants,
|
||||
db/[db_chain, accounts_cache]
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
import
|
||||
macros, strformat, stint, eth/common,
|
||||
vm/[nvm_computation, stack, code_stream, memory],
|
||||
vm/[nvm_computation, stack, code_stream, nvm_memory],
|
||||
vm/nvm_types, errors, vm/interpreter/[gas_meter, opcode_values],
|
||||
vm/interpreter/utils/utils_numeric
|
||||
|
||||
|
@ -10,7 +10,7 @@ import
|
||||
sets, eth/[common, keys],
|
||||
constants, errors,
|
||||
vm/interpreter/[opcode_values, gas_meter, nvm_gas_costs, nvm_forks],
|
||||
vm/[code_stream, memory, nvm_message, stack, nvm_types, nvm_state],
|
||||
vm/[code_stream, nvm_memory, nvm_message, stack, nvm_types, nvm_state],
|
||||
db/[accounts_cache, db_chain],
|
||||
utils/header, nvm_precompiles,
|
||||
transaction_tracer, utils
|
||||
|
@ -11,7 +11,7 @@
|
||||
import
|
||||
tables, eth/common,
|
||||
options, json, sets,
|
||||
vm/[memory, stack, code_stream],
|
||||
vm/[nvm_memory, stack, code_stream],
|
||||
vm/interpreter/[nvm_gas_costs, opcode_values, nvm_forks],
|
||||
# TODO - will be hidden at a lower layer
|
||||
db/[db_chain, accounts_cache]
|
||||
|
@ -1,7 +1,7 @@
|
||||
import
|
||||
json, strutils, sets, hashes,
|
||||
chronicles, nimcrypto, eth/common, stint,
|
||||
vm/nvm_types, memory, vm/stack, db/accounts_cache,
|
||||
vm/[nvm_types, nvm_memory, stack], db/accounts_cache,
|
||||
eth/trie/hexary,
|
||||
vm/interpreter/opcode_values
|
||||
|
||||
|
30
nimbus/vm_memory.nim
Normal file
30
nimbus/vm_memory.nim
Normal file
@ -0,0 +1,30 @@
|
||||
# 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.
|
||||
|
||||
# Wrapper for a wrapper -- lol
|
||||
|
||||
# At the moment, this header file interface is only used for testing, so it
|
||||
# might be worth merging it into a vm_internals.nim (or so) header file.
|
||||
import
|
||||
./vm/nvm_memory as vmm
|
||||
|
||||
export
|
||||
vmm.Memory,
|
||||
vmm.extend,
|
||||
vmm.len,
|
||||
vmm.newMemory,
|
||||
vmm.read,
|
||||
vmm.write
|
||||
|
||||
when defined(evmc_enabled):
|
||||
export
|
||||
vmm.readPtr
|
||||
|
||||
# End
|
@ -6,10 +6,10 @@ import
|
||||
|
||||
import
|
||||
options, json, os, eth/trie/[db, hexary],
|
||||
../nimbus/[vm_state, vm_types, transaction, utils],
|
||||
../nimbus/[transaction, utils],
|
||||
../nimbus/db/[db_chain, accounts_cache],
|
||||
../nimbus/[vm_computation, vm_state_transactions, vm_forks, vm_message],
|
||||
../nimbus/vm/memory
|
||||
../nimbus/[vm_computation, vm_state_transactions, vm_forks,
|
||||
vm_message, vm_memory, vm_state, vm_types]
|
||||
|
||||
export opcode_values, byteutils
|
||||
{.experimental: "dynamicBindSym".}
|
||||
|
@ -8,7 +8,7 @@
|
||||
import
|
||||
unittest2, sequtils,
|
||||
eth/common/eth_types,
|
||||
../nimbus/[errors, vm/memory]
|
||||
../nimbus/[errors, vm_memory]
|
||||
|
||||
proc memory32: Memory =
|
||||
result = newMemory()
|
||||
|
Loading…
x
Reference in New Issue
Block a user