diff --git a/libjulia/backends/evm/EVMCodeTransform.h b/libjulia/backends/evm/EVMCodeTransform.h index 9814f0f55..7824247ac 100644 --- a/libjulia/backends/evm/EVMCodeTransform.h +++ b/libjulia/backends/evm/EVMCodeTransform.h @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/libsolidity/inlineasm/AsmAnalysis.h b/libsolidity/inlineasm/AsmAnalysis.h index 5cdf72b1b..76d2eba1a 100644 --- a/libsolidity/inlineasm/AsmAnalysis.h +++ b/libsolidity/inlineasm/AsmAnalysis.h @@ -26,6 +26,8 @@ #include +#include + #include #include @@ -39,21 +41,6 @@ class ErrorReporter; namespace assembly { -struct Literal; -struct Block; -struct Label; -struct FunctionalInstruction; -struct Assignment; -struct VariableDeclaration; -struct Instruction; -struct Identifier; -struct StackAssignment; -struct FunctionDefinition; -struct FunctionCall; -struct Switch; -struct ForLoop; -using Statement = boost::variant; - struct AsmAnalysisInfo; /** diff --git a/libsolidity/inlineasm/AsmAnalysisInfo.h b/libsolidity/inlineasm/AsmAnalysisInfo.h index a75413a2f..bd3b28c4c 100644 --- a/libsolidity/inlineasm/AsmAnalysisInfo.h +++ b/libsolidity/inlineasm/AsmAnalysisInfo.h @@ -20,6 +20,8 @@ #pragma once +#include + #include #include @@ -33,24 +35,8 @@ namespace solidity namespace assembly { -struct Literal; -struct Block; -struct Label; -struct FunctionalInstruction; -struct Assignment; -struct VariableDeclaration; -struct Instruction; -struct Identifier; -struct StackAssignment; -struct FunctionDefinition; -struct FunctionCall; -struct Switch; -struct ForLoop; - struct Scope; -using Statement = boost::variant; - struct AsmAnalysisInfo { using StackHeightInfo = std::map; diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h index c2458bd78..db5840bc9 100644 --- a/libsolidity/inlineasm/AsmData.h +++ b/libsolidity/inlineasm/AsmData.h @@ -22,10 +22,13 @@ #pragma once -#include +#include + #include #include +#include + namespace dev { namespace solidity @@ -38,24 +41,6 @@ using Type = std::string; struct TypedName { SourceLocation location; std::string name; Type type; }; using TypedNameList = std::vector; -/// 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 Switch; -struct ForLoop; -struct Block; - -using Statement = boost::variant; - /// Direct EVM instruction (except PUSHi and JUMPDEST) struct Instruction { SourceLocation location; solidity::Instruction instruction; }; /// Literal number or string (up to 32 bytes) diff --git a/libsolidity/inlineasm/AsmDataForward.h b/libsolidity/inlineasm/AsmDataForward.h new file mode 100644 index 000000000..4ead7ff52 --- /dev/null +++ b/libsolidity/inlineasm/AsmDataForward.h @@ -0,0 +1,52 @@ +/* + This file is part of solidity. + + solidity is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + solidity is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with solidity. If not, see . +*/ +/** + * @author Christian + * @date 2016 + * Forward declaration of classes for inline assembly / JULIA AST + */ + +#pragma once + +#include + +namespace dev +{ +namespace solidity +{ +namespace assembly +{ + +struct Instruction; +struct Literal; +struct Label; +struct StackAssignment; +struct Identifier; +struct Assignment; +struct VariableDeclaration; +struct FunctionalInstruction; +struct FunctionDefinition; +struct FunctionCall; +struct Switch; +struct ForLoop; +struct Block; + +using Statement = boost::variant; + +} +} +} diff --git a/libsolidity/inlineasm/AsmPrinter.h b/libsolidity/inlineasm/AsmPrinter.h index 8808b0587..f57dddc85 100644 --- a/libsolidity/inlineasm/AsmPrinter.h +++ b/libsolidity/inlineasm/AsmPrinter.h @@ -22,6 +22,8 @@ #pragma once +#include + #include namespace dev @@ -30,19 +32,6 @@ namespace solidity { namespace assembly { -struct Instruction; -struct Literal; -struct Identifier; -struct FunctionalInstruction; -struct Label; -struct StackAssignment; -struct Assignment; -struct VariableDeclaration; -struct FunctionDefinition; -struct FunctionCall; -struct Switch; -struct ForLoop; -struct Block; class AsmPrinter: public boost::static_visitor { diff --git a/libsolidity/inlineasm/AsmScopeFiller.h b/libsolidity/inlineasm/AsmScopeFiller.h index f04352c95..80c03d2c8 100644 --- a/libsolidity/inlineasm/AsmScopeFiller.h +++ b/libsolidity/inlineasm/AsmScopeFiller.h @@ -20,6 +20,8 @@ #pragma once +#include + #include #include @@ -35,20 +37,6 @@ namespace assembly { struct TypedName; -struct Literal; -struct Block; -struct Label; -struct FunctionalInstruction; -struct Assignment; -struct VariableDeclaration; -struct Instruction; -struct Identifier; -struct StackAssignment; -struct FunctionDefinition; -struct FunctionCall; -struct Switch; -struct ForLoop; - struct Scope; struct AsmAnalysisInfo;