aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmAnalysis.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-16 22:59:15 +0800
committerGitHub <noreply@github.com>2017-05-16 22:59:15 +0800
commitd9b5ff0b43b4dcaccb43dfc89efef6d610476557 (patch)
tree5773b307c4a612562bd05abd2c8d71009cc53372 /libsolidity/inlineasm/AsmAnalysis.cpp
parent2ba87fe80486e996a3fbcfe79da2ab527c1ee406 (diff)
parent6706932d7c7cd0a4d1b99e806b8f80cf8fe6cb91 (diff)
downloaddexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar.gz
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar.bz2
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar.lz
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar.xz
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.tar.zst
dexon-solidity-d9b5ff0b43b4dcaccb43dfc89efef6d610476557.zip
Merge pull request #2222 from ethereum/julia-types
Add support for types in Julia
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.cpp')
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp
index dad05a78..590f9ad6 100644
--- a/libsolidity/inlineasm/AsmAnalysis.cpp
+++ b/libsolidity/inlineasm/AsmAnalysis.cpp
@@ -184,7 +184,7 @@ bool AsmAnalyzer::operator()(assembly::VariableDeclaration const& _varDecl)
int const stackHeight = m_stackHeight;
bool success = boost::apply_visitor(*this, *_varDecl.value);
solAssert(m_stackHeight - stackHeight == 1, "Invalid value size.");
- boost::get<Scope::Variable>(m_currentScope->identifiers.at(_varDecl.name)).active = true;
+ boost::get<Scope::Variable>(m_currentScope->identifiers.at(_varDecl.variable.name)).active = true;
m_info.stackHeightInfo[&_varDecl] = m_stackHeight;
return success;
}
@@ -193,7 +193,7 @@ bool AsmAnalyzer::operator()(assembly::FunctionDefinition const& _funDef)
{
Scope& bodyScope = scope(&_funDef.body);
for (auto const& var: _funDef.arguments + _funDef.returns)
- boost::get<Scope::Variable>(bodyScope.identifiers.at(var)).active = true;
+ boost::get<Scope::Variable>(bodyScope.identifiers.at(var.name)).active = true;
int const stackHeight = m_stackHeight;
m_stackHeight = _funDef.arguments.size() + _funDef.returns.size();
@@ -232,8 +232,9 @@ bool AsmAnalyzer::operator()(assembly::FunctionCall const& _funCall)
},
[&](Scope::Function const& _fun)
{
- arguments = _fun.arguments;
- returns = _fun.returns;
+ /// TODO: compare types too
+ arguments = _fun.arguments.size();
+ returns = _fun.returns.size();
}
)))
{