mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-24 17:58:30 +00:00
added compiler flag sentinels to vm2 headers
why: making sure that deep links into vm2 sources are configured properly. it is intended that only the vm_*.nim interface headers are allowed to source files in vm2. the sentinels just protect from coding errors.
This commit is contained in:
parent
b4f8450968
commit
b7bf84a71f
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
chronicles, strformat, macros, options, times,
|
||||
sets, eth/[common, keys],
|
||||
|
@ -8,6 +8,12 @@
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
|
||||
# see vm_opcode_value
|
||||
import
|
||||
./interpreter/opcode_values as vmo
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
math, eth/common/eth_types,
|
||||
./utils/[macros_gen_opcodes, utils_numeric],
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import ./utils/macros_gen_opcodes
|
||||
|
||||
fill_enum_holes:
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
macros,
|
||||
stew/endians2, stew/ranges/ptr_arith,
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import stint, eth/common/eth_types
|
||||
|
||||
type
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
sequtils,
|
||||
chronicles, eth/common/eth_types,
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import ./types
|
||||
|
||||
proc isCreate*(message: Message): bool =
|
||||
|
@ -1,3 +1,18 @@
|
||||
# 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
./types,
|
||||
./interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks],
|
||||
|
@ -8,6 +8,11 @@
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
macros, strformat, tables, sets, options,
|
||||
eth/[common, keys, rlp], nimcrypto/keccak,
|
||||
|
@ -5,6 +5,11 @@
|
||||
# * 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.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
options, sets,
|
||||
eth/common, chronicles, ../db/accounts_cache,
|
||||
|
@ -8,6 +8,11 @@
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
when not defined(vm2_enabled):
|
||||
{.fatal: "Flags \"vm2_enabled\" must be defined"}
|
||||
when defined(evmc_enabled):
|
||||
{.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"}
|
||||
|
||||
import
|
||||
tables, eth/common,
|
||||
options, json, sets,
|
||||
|
Loading…
x
Reference in New Issue
Block a user