mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
C++ namespace cleanup (except tests).
This commit is contained in:
committed by
Daniel Kirchner
parent
8385256bdc
commit
6b23412fae
@@ -24,30 +24,31 @@
|
||||
#include <libevmasm/Instruction.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace langutil;
|
||||
using namespace yul;
|
||||
using namespace solidity;
|
||||
using namespace solidity::yul;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::langutil;
|
||||
|
||||
|
||||
void NoOutputAssembly::appendInstruction(dev::eth::Instruction _instr)
|
||||
void NoOutputAssembly::appendInstruction(evmasm::Instruction _instr)
|
||||
{
|
||||
m_stackHeight += instructionInfo(_instr).ret - instructionInfo(_instr).args;
|
||||
}
|
||||
|
||||
void NoOutputAssembly::appendConstant(u256 const&)
|
||||
{
|
||||
appendInstruction(dev::eth::pushInstruction(1));
|
||||
appendInstruction(evmasm::pushInstruction(1));
|
||||
}
|
||||
|
||||
void NoOutputAssembly::appendLabel(LabelID)
|
||||
{
|
||||
appendInstruction(dev::eth::Instruction::JUMPDEST);
|
||||
appendInstruction(evmasm::Instruction::JUMPDEST);
|
||||
}
|
||||
|
||||
void NoOutputAssembly::appendLabelReference(LabelID)
|
||||
{
|
||||
yulAssert(!m_evm15, "Cannot use plain label references in EMV1.5 mode.");
|
||||
appendInstruction(dev::eth::pushInstruction(1));
|
||||
appendInstruction(evmasm::pushInstruction(1));
|
||||
}
|
||||
|
||||
NoOutputAssembly::LabelID NoOutputAssembly::newLabelId()
|
||||
@@ -68,7 +69,7 @@ void NoOutputAssembly::appendLinkerSymbol(string const&)
|
||||
void NoOutputAssembly::appendJump(int _stackDiffAfter)
|
||||
{
|
||||
yulAssert(!m_evm15, "Plain JUMP used for EVM 1.5");
|
||||
appendInstruction(dev::eth::Instruction::JUMP);
|
||||
appendInstruction(evmasm::Instruction::JUMP);
|
||||
m_stackHeight += _stackDiffAfter;
|
||||
}
|
||||
|
||||
@@ -90,7 +91,7 @@ void NoOutputAssembly::appendJumpToIf(LabelID _labelId)
|
||||
else
|
||||
{
|
||||
appendLabelReference(_labelId);
|
||||
appendInstruction(dev::eth::Instruction::JUMPI);
|
||||
appendInstruction(evmasm::Instruction::JUMPI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +118,7 @@ void NoOutputAssembly::appendReturnsub(int _returns, int _stackDiffAfter)
|
||||
|
||||
void NoOutputAssembly::appendAssemblySize()
|
||||
{
|
||||
appendInstruction(dev::eth::Instruction::PUSH1);
|
||||
appendInstruction(evmasm::Instruction::PUSH1);
|
||||
}
|
||||
|
||||
pair<shared_ptr<AbstractAssembly>, AbstractAssembly::SubID> NoOutputAssembly::createSubAssembly()
|
||||
@@ -128,12 +129,12 @@ pair<shared_ptr<AbstractAssembly>, AbstractAssembly::SubID> NoOutputAssembly::cr
|
||||
|
||||
void NoOutputAssembly::appendDataOffset(AbstractAssembly::SubID)
|
||||
{
|
||||
appendInstruction(dev::eth::Instruction::PUSH1);
|
||||
appendInstruction(evmasm::Instruction::PUSH1);
|
||||
}
|
||||
|
||||
void NoOutputAssembly::appendDataSize(AbstractAssembly::SubID)
|
||||
{
|
||||
appendInstruction(dev::eth::Instruction::PUSH1);
|
||||
appendInstruction(evmasm::Instruction::PUSH1);
|
||||
}
|
||||
|
||||
AbstractAssembly::SubID NoOutputAssembly::appendData(bytes const&)
|
||||
@@ -152,7 +153,7 @@ NoOutputEVMDialect::NoOutputEVMDialect(EVMDialect const& _copyFrom):
|
||||
{
|
||||
_visitArguments();
|
||||
for (size_t i = 0; i < parameters; i++)
|
||||
_assembly.appendInstruction(dev::eth::Instruction::POP);
|
||||
_assembly.appendInstruction(evmasm::Instruction::POP);
|
||||
|
||||
for (size_t i = 0; i < returns; i++)
|
||||
_assembly.appendConstant(u256(0));
|
||||
|
||||
Reference in New Issue
Block a user