diff options
author | Christian Parpart <christian@ethereum.org> | 2018-11-21 19:42:34 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2018-11-23 21:29:00 +0800 |
commit | ec47c8946ba5f78563b7eca2512b3cee68db45b4 (patch) | |
tree | 58216cdbf00dba9a61135d85b289ce2af9fc2974 /libyul/AsmData.h | |
parent | 3734f40d315439f8a791967a6adfda8cf9fd1e55 (diff) | |
download | dexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.tar.gz dexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.tar.zst dexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.zip |
Isolating libyul library API into its own namespace `yul`.
Diffstat (limited to 'libyul/AsmData.h')
-rw-r--r-- | libyul/AsmData.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libyul/AsmData.h b/libyul/AsmData.h index 6979d29c..86c373a4 100644 --- a/libyul/AsmData.h +++ b/libyul/AsmData.h @@ -23,7 +23,6 @@ #pragma once #include <libyul/AsmDataForward.h> - #include <libyul/YulString.h> #include <libevmasm/Instruction.h> @@ -35,21 +34,16 @@ #include <map> #include <memory> -namespace dev -{ -namespace solidity -{ -namespace assembly +namespace yul { -using YulString = dev::yul::YulString; using Type = YulString; struct TypedName { langutil::SourceLocation location; YulString name; Type type; }; using TypedNameList = std::vector<TypedName>; /// Direct EVM instruction (except PUSHi and JUMPDEST) -struct Instruction { langutil::SourceLocation location; solidity::Instruction instruction; }; +struct Instruction { langutil::SourceLocation location; dev::solidity::Instruction instruction; }; /// Literal number or string (up to 32 bytes) enum class LiteralKind { Number, Boolean, String }; struct Literal { langutil::SourceLocation location; LiteralKind kind; YulString value; Type type; }; @@ -67,7 +61,7 @@ struct StackAssignment { langutil::SourceLocation location; Identifier variableN /// the same amount of items as the number of variables. struct Assignment { langutil::SourceLocation location; std::vector<Identifier> variableNames; std::shared_ptr<Expression> value; }; /// Functional instruction, e.g. "mul(mload(20:u256), add(2:u256, x))" -struct FunctionalInstruction { langutil::SourceLocation location; solidity::Instruction instruction; std::vector<Expression> arguments; }; +struct FunctionalInstruction { langutil::SourceLocation location; dev::solidity::Instruction instruction; std::vector<Expression> arguments; }; struct FunctionCall { langutil::SourceLocation location; Identifier functionName; std::vector<Expression> arguments; }; /// Statement that contains only a single expression struct ExpressionStatement { langutil::SourceLocation location; Expression expression; }; @@ -100,5 +94,3 @@ template <class T> inline langutil::SourceLocation locationOf(T const& _node) } } -} -} |