aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmPrinter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-20 00:06:26 +0800
committerchriseth <chris@ethereum.org>2017-09-20 17:16:23 +0800
commit3b813ed29569dde02b965c97c9fdd60469876f66 (patch)
tree20a5ea09ab0bc99d48acabb0e567affb6c381ca4 /libsolidity/inlineasm/AsmPrinter.cpp
parentc0b3e5b0785efd1b601cff470d3e3d4a71b2c283 (diff)
downloaddexon-solidity-3b813ed29569dde02b965c97c9fdd60469876f66.tar.gz
dexon-solidity-3b813ed29569dde02b965c97c9fdd60469876f66.tar.zst
dexon-solidity-3b813ed29569dde02b965c97c9fdd60469876f66.zip
Support multiple assignment in inline assembly
Diffstat (limited to 'libsolidity/inlineasm/AsmPrinter.cpp')
-rw-r--r--libsolidity/inlineasm/AsmPrinter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmPrinter.cpp b/libsolidity/inlineasm/AsmPrinter.cpp
index 47ede91d..a5272808 100644
--- a/libsolidity/inlineasm/AsmPrinter.cpp
+++ b/libsolidity/inlineasm/AsmPrinter.cpp
@@ -116,7 +116,11 @@ string AsmPrinter::operator()(assembly::StackAssignment const& _assignment)
string AsmPrinter::operator()(assembly::Assignment const& _assignment)
{
- return (*this)(_assignment.variableName) + " := " + boost::apply_visitor(*this, *_assignment.value);
+ solAssert(_assignment.variableNames.size() >= 1, "");
+ string variables = (*this)(_assignment.variableNames.front());
+ for (size_t i = 1; i < _assignment.variableNames.size(); ++i)
+ variables += ", " + (*this)(_assignment.variableNames[i]);
+ return variables + " := " + boost::apply_visitor(*this, *_assignment.value);
}
string AsmPrinter::operator()(assembly::VariableDeclaration const& _variableDeclaration)