aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmData.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-24 08:14:06 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-24 08:48:54 +0800
commit4f738ff1c0975202f064900549eca4661d2f51a6 (patch)
treedc89a85364f98b39838d82f28f393b369a59bc7a /libsolidity/inlineasm/AsmData.h
parent187fa5075105008578fa2af467eda44bfa444144 (diff)
downloaddexon-solidity-4f738ff1c0975202f064900549eca4661d2f51a6.tar.gz
dexon-solidity-4f738ff1c0975202f064900549eca4661d2f51a6.tar.zst
dexon-solidity-4f738ff1c0975202f064900549eca4661d2f51a6.zip
Reorder AsmData for readability
Diffstat (limited to 'libsolidity/inlineasm/AsmData.h')
-rw-r--r--libsolidity/inlineasm/AsmData.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h
index 3d2c8cad..3b4048c3 100644
--- a/libsolidity/inlineasm/AsmData.h
+++ b/libsolidity/inlineasm/AsmData.h
@@ -40,6 +40,20 @@ using TypedNameList = std::vector<TypedName>;
/// What follows are the AST nodes for assembly.
+struct Instruction;
+struct Literal;
+struct Label;
+struct StackAssignment;
+struct Identifier;
+struct Assignment;
+struct VariableDeclaration;
+struct FunctionalInstruction;
+struct FunctionDefinition;
+struct FunctionCall;
+struct Block;
+
+using Statement = boost::variant<Instruction, Literal, Label, StackAssignment, Identifier, Assignment, FunctionCall, FunctionalInstruction, VariableDeclaration, FunctionDefinition, Block>;
+
/// Direct EVM instruction (except PUSHi and JUMPDEST)
struct Instruction { SourceLocation location; solidity::Instruction instruction; };
/// Literal number or string (up to 32 bytes)
@@ -47,17 +61,10 @@ enum class LiteralKind { Number, Boolean, String };
struct Literal { SourceLocation location; LiteralKind kind; std::string value; Type type; };
/// External / internal identifier or label reference
struct Identifier { SourceLocation location; std::string name; };
-struct FunctionalInstruction;
/// Jump label ("name:")
struct Label { SourceLocation location; std::string name; };
/// Assignment from stack (":= x", moves stack top into x, potentially multiple slots)
struct StackAssignment { SourceLocation location; Identifier variableName; };
-struct Assignment;
-struct VariableDeclaration;
-struct FunctionDefinition;
-struct FunctionCall;
-struct Block;
-using Statement = boost::variant<Instruction, Literal, Label, StackAssignment, Identifier, Assignment, FunctionCall, FunctionalInstruction, VariableDeclaration, FunctionDefinition, Block>;
/// Assignment ("x := mload(20:u256)", expects push-1-expression on the right hand
/// side and requires x to occupy exactly one stack slot.
struct Assignment { SourceLocation location; Identifier variableName; std::shared_ptr<Statement> value; };