diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-27 06:58:34 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-06 05:31:22 +0800 |
commit | d6396ee85fd21424568074c41a131e8c52961983 (patch) | |
tree | cc0fa48f71be625bc40f67ee15ca0ef903f84fbc /libsolidity/inlineasm/AsmAnalysis.cpp | |
parent | b0f2a5c162480ab6ecdc5e1397567242a137768a (diff) | |
download | dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar.gz dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar.bz2 dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar.lz dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar.xz dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.tar.zst dexon-solidity-d6396ee85fd21424568074c41a131e8c52961983.zip |
Parse types in Julia mode
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmAnalysis.cpp | 9 |
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(); } ))) { |