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)
|
# * 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.
|
# 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
|
import
|
||||||
chronicles, strformat, macros, options, times,
|
chronicles, strformat, macros, options, times,
|
||||||
sets, eth/[common, keys],
|
sets, eth/[common, keys],
|
||||||
|
@ -8,6 +8,12 @@
|
|||||||
# at your option. This file may not be copied, modified, or distributed except
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
# according to those terms.
|
# 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
|
# see vm_opcode_value
|
||||||
import
|
import
|
||||||
./interpreter/opcode_values as vmo
|
./interpreter/opcode_values as vmo
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import
|
||||||
math, eth/common/eth_types,
|
math, eth/common/eth_types,
|
||||||
./utils/[macros_gen_opcodes, utils_numeric],
|
./utils/[macros_gen_opcodes, utils_numeric],
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import ./utils/macros_gen_opcodes
|
||||||
|
|
||||||
fill_enum_holes:
|
fill_enum_holes:
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import
|
||||||
macros,
|
macros,
|
||||||
stew/endians2, stew/ranges/ptr_arith,
|
stew/endians2, stew/ranges/ptr_arith,
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import stint, eth/common/eth_types
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import
|
||||||
sequtils,
|
sequtils,
|
||||||
chronicles, eth/common/eth_types,
|
chronicles, eth/common/eth_types,
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import ./types
|
||||||
|
|
||||||
proc isCreate*(message: Message): bool =
|
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
|
import
|
||||||
./types,
|
./types,
|
||||||
./interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks],
|
./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
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
# according to those terms.
|
# 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
|
import
|
||||||
macros, strformat, tables, sets, options,
|
macros, strformat, tables, sets, options,
|
||||||
eth/[common, keys, rlp], nimcrypto/keccak,
|
eth/[common, keys, rlp], nimcrypto/keccak,
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
# * 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.
|
# 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
|
import
|
||||||
options, sets,
|
options, sets,
|
||||||
eth/common, chronicles, ../db/accounts_cache,
|
eth/common, chronicles, ../db/accounts_cache,
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
# at your option. This file may not be copied, modified, or distributed except
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
# according to those terms.
|
# 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
|
import
|
||||||
tables, eth/common,
|
tables, eth/common,
|
||||||
options, json, sets,
|
options, json, sets,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user