diff options
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r-- | libevmasm/Assembly.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index ea061a30..92a4c2a4 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -40,7 +40,7 @@ void Assembly::append(Assembly const& _a) auto newDeposit = m_deposit + _a.deposit(); for (AssemblyItem i: _a.m_items) { - if (i.type() == Tag || (i.type() == PushTag && i != errorTag())) + if (i.type() == Tag || i.type() == PushTag) i.setData(i.data() + m_usedTags); else if (i.type() == PushSub || i.type() == PushSubSize) i.setData(i.data() + m_subs.size()); @@ -72,13 +72,6 @@ void Assembly::append(Assembly const& _a, int _deposit) } } -string Assembly::out() const -{ - stringstream ret; - stream(ret); - return ret.str(); -} - unsigned Assembly::bytesRequired(unsigned subTagSize) const { for (unsigned tagSize = subTagSize; true; ++tagSize) @@ -216,6 +209,9 @@ ostream& Assembly::streamAsm(ostream& _out, string const& _prefix, StringMap con } } + if (m_auxiliaryData.size() > 0) + _out << endl << _prefix << "auxdata: 0x" << toHex(m_auxiliaryData) << endl; + return _out; } @@ -315,8 +311,13 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes data[hexStr.str()] = m_subs[i]->stream(_out, "", _sourceCodes, true); } root[".data"] = data; - _out << root; } + + if (m_auxiliaryData.size() > 0) + root[".auxdata"] = toHex(m_auxiliaryData); + + _out << root; + return root; } |