isolate memory type definition

how:
  extract from methods implementation source into separate file
This commit is contained in:
Jordan Hrycaj 2021-04-12 17:57:23 +01:00 committed by zah
parent a868108ae7
commit a095183812
4 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,15 @@
# 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.
type
Memory* = ref object
bytes*: seq[byte]
# End

View File

@ -15,7 +15,7 @@ import
sets, eth/[common, keys],
../constants, ../errors,
./interpreter/[v2opcode_values, gas_meter, v2gas_costs, v2forks],
./code_stream, ./v2memory, ./v2message, ./stack, ./v2types, ./v2state,
./code_stream, ./memory_defs, ./v2message, ./stack, ./v2types, ./v2state,
../db/[accounts_cache, db_chain],
../utils/header, ./v2precompiles,
./transaction_tracer, ../utils

View File

@ -13,16 +13,15 @@ when defined(evmc_enabled):
import
sequtils,
chronicles, eth/common/eth_types,
../errors, ../validation,
../errors, ../validation, ./memory_defs,
./interpreter/utils/v2utils_numeric
export
Memory
logScope:
topics = "vm memory"
type
Memory* = ref object
bytes*: seq[byte]
proc newMemory*: Memory =
new(result)
result.bytes = @[]

View File

@ -16,7 +16,7 @@ when defined(evmc_enabled):
import
tables, eth/common,
options, json, sets,
./v2memory, ./stack_defs, ./code_stream,
./stack_defs, ./memory_defs, ./code_stream,
./interpreter/[v2gas_costs, v2opcode_values, v2forks],
# TODO - will be hidden at a lower layer
../db/[db_chain, accounts_cache]