aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmScope.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/inlineasm/AsmScope.h')
-rw-r--r--libsolidity/inlineasm/AsmScope.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/libsolidity/inlineasm/AsmScope.h b/libsolidity/inlineasm/AsmScope.h
index b70bee67..dd45613d 100644
--- a/libsolidity/inlineasm/AsmScope.h
+++ b/libsolidity/inlineasm/AsmScope.h
@@ -61,6 +61,8 @@ struct GenericVisitor<>: public boost::static_visitor<> {
struct Scope
{
+ using JuliaType = std::string;
+
struct Variable
{
/// Used during code generation to store the stack height. @todo move there.
@@ -68,6 +70,7 @@ struct Scope
/// Used during analysis to check whether we already passed the declaration inside the block.
/// @todo move there.
bool active = false;
+ JuliaType type;
};
struct Label
@@ -78,18 +81,22 @@ struct Scope
struct Function
{
- Function(size_t _arguments, size_t _returns): arguments(_arguments), returns(_returns) {}
- size_t arguments = 0;
- size_t returns = 0;
+ Function(std::vector<JuliaType> const& _arguments, std::vector<JuliaType> const& _returns): arguments(_arguments), returns(_returns) {}
+ std::vector<JuliaType> arguments;
+ std::vector<JuliaType> returns;
};
using Identifier = boost::variant<Variable, Label, Function>;
using Visitor = GenericVisitor<Variable const, Label const, Function const>;
using NonconstVisitor = GenericVisitor<Variable, Label, Function>;
- bool registerVariable(std::string const& _name);
+ bool registerVariable(std::string const& _name, JuliaType const& _type);
bool registerLabel(std::string const& _name);
- bool registerFunction(std::string const& _name, size_t _arguments, size_t _returns);
+ bool registerFunction(
+ std::string const& _name,
+ std::vector<JuliaType> const& _arguments,
+ std::vector<JuliaType> const& _returns
+ );
/// Looks up the identifier in this or super scopes and returns a valid pointer if found
/// or a nullptr if not found. Variable lookups up across function boundaries will fail, as