diff options
author | chriseth <chris@ethereum.org> | 2017-06-01 21:47:11 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-16 17:56:21 +0800 |
commit | 78b49db779376b8ddedc0abb91a82a3384def4f1 (patch) | |
tree | 38aa28acbdf1e7c072a3fe301c8d7b06a105be50 /libsolidity/inlineasm/AsmAnalysis.cpp | |
parent | 8e5c4bf21dfd9cfaa8de35aef034bb32be290a48 (diff) | |
download | dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar.gz dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar.bz2 dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar.lz dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar.xz dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.tar.zst dexon-solidity-78b49db779376b8ddedc0abb91a82a3384def4f1.zip |
Helper to count the number of variables in a scope.
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmAnalysis.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index 548f1a74..2891ec95 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -349,9 +349,7 @@ bool AsmAnalyzer::operator()(Block const& _block) if (!boost::apply_visitor(*this, s)) success = false; - for (auto const& identifier: scope(&_block).identifiers) - if (identifier.second.type() == typeid(Scope::Variable)) - --m_stackHeight; + m_stackHeight -= scope(&_block).numberOfVariables(); int const stackDiff = m_stackHeight - initialStackHeight; if (stackDiff != 0) |