aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-04 16:26:59 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-05 21:21:25 +0800
commit07176e82de05bd4490b22f070cd11e36b84f734a (patch)
treeef5e8ea960fd06070afccc196ddd84059f7eb63c /libsolidity
parentc423e140eeccaa07ca8c461e86157a4d9dbb1195 (diff)
downloaddexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar.gz
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar.bz2
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar.lz
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar.xz
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.tar.zst
dexon-solidity-07176e82de05bd4490b22f070cd11e36b84f734a.zip
Assert that invalid AST elements are not printed in Julia mode
Diffstat (limited to 'libsolidity')
-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 252e91f9..4a6f975d 100644
--- a/libsolidity/inlineasm/AsmPrinter.cpp
+++ b/libsolidity/inlineasm/AsmPrinter.cpp
@@ -21,8 +21,8 @@
*/
#include <libsolidity/inlineasm/AsmPrinter.h>
-
#include <libsolidity/inlineasm/AsmData.h>
+#include <libsolidity/interface/Utils.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/replace.hpp>
@@ -40,6 +40,7 @@ using namespace dev::solidity::assembly;
string AsmPrinter::operator()(assembly::Instruction const& _instruction)
{
+ solAssert(!m_julia, "");
return boost::to_lower_copy(instructionInfo(_instruction.instruction).name);
}
@@ -83,6 +84,7 @@ string AsmPrinter::operator()(assembly::Identifier const& _identifier)
string AsmPrinter::operator()(assembly::FunctionalInstruction const& _functionalInstruction)
{
+ solAssert(!m_julia, "");
return
(*this)(_functionalInstruction.instruction) +
"(" +
@@ -94,11 +96,13 @@ string AsmPrinter::operator()(assembly::FunctionalInstruction const& _functional
string AsmPrinter::operator()(assembly::Label const& _label)
{
+ solAssert(!m_julia, "");
return _label.name + ":";
}
string AsmPrinter::operator()(assembly::Assignment const& _assignment)
{
+ solAssert(!m_julia, "");
return "=: " + (*this)(_assignment.variableName);
}