diff options
Diffstat (limited to 'libsolidity/inlineasm/AsmScope.h')
-rw-r--r-- | libsolidity/inlineasm/AsmScope.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/libsolidity/inlineasm/AsmScope.h b/libsolidity/inlineasm/AsmScope.h index 498218b4..de9119e0 100644 --- a/libsolidity/inlineasm/AsmScope.h +++ b/libsolidity/inlineasm/AsmScope.h @@ -65,24 +65,10 @@ struct Scope using JuliaType = std::string; using LabelID = size_t; - struct Variable - { - /// Used during code generation to store the stack height. @todo move there. - int stackHeight = 0; - /// Used during analysis to check whether we already passed the declaration inside the block. - /// @todo move there. - bool active = false; - JuliaType type; - }; - - struct Label - { - boost::optional<LabelID> id; - }; - + struct Variable { JuliaType type; }; + struct Label { }; struct Function { - Function(std::vector<JuliaType> const& _arguments, std::vector<JuliaType> const& _returns): arguments(_arguments), returns(_returns) {} std::vector<JuliaType> arguments; std::vector<JuliaType> returns; }; @@ -123,6 +109,9 @@ struct Scope /// across function and assembly boundaries). bool exists(std::string const& _name); + /// @returns true if this scope is inside a function. + bool insideFunction() const; + Scope* superScope = nullptr; /// If true, variables from the super scope are not visible here (other identifiers are), /// but they are still taken into account to prevent shadowing. |