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
@@ -27,10 +27,11 @@
|
||||
#include <functional>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::eth;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::evmasm;
|
||||
|
||||
std::map<std::string, Instruction> const dev::eth::c_instructions =
|
||||
std::map<std::string, Instruction> const solidity::evmasm::c_instructions =
|
||||
{
|
||||
{ "STOP", Instruction::STOP },
|
||||
{ "ADD", Instruction::ADD },
|
||||
@@ -322,7 +323,7 @@ static std::map<Instruction, InstructionInfo> const c_instructionInfo =
|
||||
{ Instruction::SELFDESTRUCT, { "SELFDESTRUCT", 0, 1, 0, true, Tier::Special } }
|
||||
};
|
||||
|
||||
void dev::eth::eachInstruction(
|
||||
void solidity::evmasm::eachInstruction(
|
||||
bytes const& _mem,
|
||||
function<void(Instruction,u256 const&)> const& _onInstruction
|
||||
)
|
||||
@@ -351,7 +352,7 @@ void dev::eth::eachInstruction(
|
||||
}
|
||||
}
|
||||
|
||||
string dev::eth::disassemble(bytes const& _mem)
|
||||
string solidity::evmasm::disassemble(bytes const& _mem)
|
||||
{
|
||||
stringstream ret;
|
||||
eachInstruction(_mem, [&](Instruction _instr, u256 const& _data) {
|
||||
@@ -368,7 +369,7 @@ string dev::eth::disassemble(bytes const& _mem)
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
InstructionInfo dev::eth::instructionInfo(Instruction _inst)
|
||||
InstructionInfo solidity::evmasm::instructionInfo(Instruction _inst)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -380,7 +381,7 @@ InstructionInfo dev::eth::instructionInfo(Instruction _inst)
|
||||
}
|
||||
}
|
||||
|
||||
bool dev::eth::isValidInstruction(Instruction _inst)
|
||||
bool solidity::evmasm::isValidInstruction(Instruction _inst)
|
||||
{
|
||||
return !!c_instructionInfo.count(_inst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user