mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Prefix EIP-615 opcodes with EIP615 in Instructions
This commit is contained in:
parent
289fc7a9d0
commit
870ea98c21
@ -174,16 +174,16 @@ enum class Instruction: uint8_t
|
|||||||
LOG3, ///< Makes a log entry; 3 topics.
|
LOG3, ///< Makes a log entry; 3 topics.
|
||||||
LOG4, ///< Makes a log entry; 4 topics.
|
LOG4, ///< Makes a log entry; 4 topics.
|
||||||
|
|
||||||
JUMPTO = 0xb0, ///< alter the program counter to a jumpdest -- not part of Instructions.cpp
|
EIP615_JUMPTO = 0xb0, ///< alter the program counter to a jumpdest -- not part of Instructions.cpp
|
||||||
JUMPIF, ///< conditionally alter the program counter -- not part of Instructions.cpp
|
EIP615_JUMPIF, ///< conditionally alter the program counter -- not part of Instructions.cpp
|
||||||
JUMPV, ///< alter the program counter to a jumpdest -- not part of Instructions.cpp
|
EIP615_JUMPV, ///< alter the program counter to a jumpdest -- not part of Instructions.cpp
|
||||||
JUMPSUB, ///< alter the program counter to a beginsub -- not part of Instructions.cpp
|
EIP615_JUMPSUB, ///< alter the program counter to a beginsub -- not part of Instructions.cpp
|
||||||
JUMPSUBV, ///< alter the program counter to a beginsub -- not part of Instructions.cpp
|
EIP615_JUMPSUBV, ///< alter the program counter to a beginsub -- not part of Instructions.cpp
|
||||||
BEGINSUB, ///< set a potential jumpsub destination -- not part of Instructions.cpp
|
EIP615_BEGINSUB, ///< set a potential jumpsub destination -- not part of Instructions.cpp
|
||||||
BEGINDATA, ///< begin the data section -- not part of Instructions.cpp
|
EIP615_BEGINDATA, ///< begin the data section -- not part of Instructions.cpp
|
||||||
RETURNSUB, ///< return to subroutine jumped from -- not part of Instructions.cpp
|
EIP615_RETURNSUB, ///< return to subroutine jumped from -- not part of Instructions.cpp
|
||||||
PUTLOCAL, ///< pop top of stack to local variable -- not part of Instructions.cpp
|
EIP615_PUTLOCAL, ///< pop top of stack to local variable -- not part of Instructions.cpp
|
||||||
GETLOCAL, ///< push local variable to top of stack -- not part of Instructions.cpp
|
EIP615_GETLOCAL, ///< push local variable to top of stack -- not part of Instructions.cpp
|
||||||
|
|
||||||
CREATE = 0xf0, ///< create a new account with associated code
|
CREATE = 0xf0, ///< create a new account with associated code
|
||||||
CALL, ///< message-call into an account
|
CALL, ///< message-call into an account
|
||||||
|
@ -102,7 +102,7 @@ void EVMAssembly::appendJumpTo(LabelID _labelId, int _stackDiffAfter, JumpType _
|
|||||||
{
|
{
|
||||||
if (m_evm15)
|
if (m_evm15)
|
||||||
{
|
{
|
||||||
m_bytecode.push_back(uint8_t(evmasm::Instruction::JUMPTO));
|
m_bytecode.push_back(uint8_t(evmasm::Instruction::EIP615_JUMPTO));
|
||||||
appendLabelReferenceInternal(_labelId);
|
appendLabelReferenceInternal(_labelId);
|
||||||
m_stackHeight += _stackDiffAfter;
|
m_stackHeight += _stackDiffAfter;
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ void EVMAssembly::appendJumpToIf(LabelID _labelId, JumpType)
|
|||||||
{
|
{
|
||||||
if (m_evm15)
|
if (m_evm15)
|
||||||
{
|
{
|
||||||
m_bytecode.push_back(uint8_t(evmasm::Instruction::JUMPIF));
|
m_bytecode.push_back(uint8_t(evmasm::Instruction::EIP615_JUMPIF));
|
||||||
appendLabelReferenceInternal(_labelId);
|
appendLabelReferenceInternal(_labelId);
|
||||||
m_stackHeight--;
|
m_stackHeight--;
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ void EVMAssembly::appendBeginsub(LabelID _labelId, int _arguments)
|
|||||||
yulAssert(m_evm15, "BEGINSUB used for EVM 1.0");
|
yulAssert(m_evm15, "BEGINSUB used for EVM 1.0");
|
||||||
yulAssert(_arguments >= 0, "");
|
yulAssert(_arguments >= 0, "");
|
||||||
setLabelToCurrentPosition(_labelId);
|
setLabelToCurrentPosition(_labelId);
|
||||||
m_bytecode.push_back(uint8_t(evmasm::Instruction::BEGINSUB));
|
m_bytecode.push_back(uint8_t(evmasm::Instruction::EIP615_BEGINSUB));
|
||||||
m_stackHeight += _arguments;
|
m_stackHeight += _arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ void EVMAssembly::appendJumpsub(LabelID _labelId, int _arguments, int _returns)
|
|||||||
{
|
{
|
||||||
yulAssert(m_evm15, "JUMPSUB used for EVM 1.0");
|
yulAssert(m_evm15, "JUMPSUB used for EVM 1.0");
|
||||||
yulAssert(_arguments >= 0 && _returns >= 0, "");
|
yulAssert(_arguments >= 0 && _returns >= 0, "");
|
||||||
m_bytecode.push_back(uint8_t(evmasm::Instruction::JUMPSUB));
|
m_bytecode.push_back(uint8_t(evmasm::Instruction::EIP615_JUMPSUB));
|
||||||
appendLabelReferenceInternal(_labelId);
|
appendLabelReferenceInternal(_labelId);
|
||||||
m_stackHeight += _returns - _arguments;
|
m_stackHeight += _returns - _arguments;
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ void EVMAssembly::appendReturnsub(int _returns, int _stackDiffAfter)
|
|||||||
{
|
{
|
||||||
yulAssert(m_evm15, "RETURNSUB used for EVM 1.0");
|
yulAssert(m_evm15, "RETURNSUB used for EVM 1.0");
|
||||||
yulAssert(_returns >= 0, "");
|
yulAssert(_returns >= 0, "");
|
||||||
m_bytecode.push_back(uint8_t(evmasm::Instruction::RETURNSUB));
|
m_bytecode.push_back(uint8_t(evmasm::Instruction::EIP615_RETURNSUB));
|
||||||
m_stackHeight += _stackDiffAfter - _returns;
|
m_stackHeight += _stackDiffAfter - _returns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,17 +409,17 @@ u256 EVMInstructionInterpreter::eval(
|
|||||||
case Instruction::SWAP14:
|
case Instruction::SWAP14:
|
||||||
case Instruction::SWAP15:
|
case Instruction::SWAP15:
|
||||||
case Instruction::SWAP16:
|
case Instruction::SWAP16:
|
||||||
// --------------- EVM 2.0 ---------------
|
// --------------- EIP-615 ---------------
|
||||||
case Instruction::JUMPTO:
|
case Instruction::EIP615_JUMPTO:
|
||||||
case Instruction::JUMPIF:
|
case Instruction::EIP615_JUMPIF:
|
||||||
case Instruction::JUMPV:
|
case Instruction::EIP615_JUMPV:
|
||||||
case Instruction::JUMPSUB:
|
case Instruction::EIP615_JUMPSUB:
|
||||||
case Instruction::JUMPSUBV:
|
case Instruction::EIP615_JUMPSUBV:
|
||||||
case Instruction::BEGINSUB:
|
case Instruction::EIP615_BEGINSUB:
|
||||||
case Instruction::BEGINDATA:
|
case Instruction::EIP615_BEGINDATA:
|
||||||
case Instruction::RETURNSUB:
|
case Instruction::EIP615_RETURNSUB:
|
||||||
case Instruction::PUTLOCAL:
|
case Instruction::EIP615_PUTLOCAL:
|
||||||
case Instruction::GETLOCAL:
|
case Instruction::EIP615_GETLOCAL:
|
||||||
{
|
{
|
||||||
yulAssert(false, "");
|
yulAssert(false, "");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user