|
@ -82,9 +82,9 @@ string AssemblyItem::getJumpTypeAsString() const |
|
|
switch (m_jumpType) |
|
|
switch (m_jumpType) |
|
|
{ |
|
|
{ |
|
|
case JumpType::IntoFunction: |
|
|
case JumpType::IntoFunction: |
|
|
return "in"; |
|
|
return "[in]"; |
|
|
case JumpType::OutOfFunction: |
|
|
case JumpType::OutOfFunction: |
|
|
return "out"; |
|
|
return "[out]"; |
|
|
case JumpType::Ordinary: |
|
|
case JumpType::Ordinary: |
|
|
default: |
|
|
default: |
|
|
return ""; |
|
|
return ""; |
|
@ -210,7 +210,7 @@ string Assembly::getLocationFromSources(StringMap const& _sourceCodes, SourceLoc |
|
|
return move(cut); |
|
|
return move(cut); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const |
|
|
ostream& Assembly::stream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const |
|
|
{ |
|
|
{ |
|
|
_out << _prefix << ".code:" << endl; |
|
|
_out << _prefix << ".code:" << endl; |
|
|
for (AssemblyItem const& i: m_items) |
|
|
for (AssemblyItem const& i: m_items) |
|
@ -219,7 +219,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con |
|
|
switch (i.m_type) |
|
|
switch (i.m_type) |
|
|
{ |
|
|
{ |
|
|
case Operation: |
|
|
case Operation: |
|
|
_out << " " << instructionInfo((Instruction)(byte)i.m_data).name << "\t\t" << i.getJumpTypeAsString(); |
|
|
_out << " " << instructionInfo((Instruction)(byte)i.m_data).name << "\t" << i.getJumpTypeAsString(); |
|
|
break; |
|
|
break; |
|
|
case Push: |
|
|
case Push: |
|
|
_out << " PUSH " << i.m_data; |
|
|
_out << " PUSH " << i.m_data; |
|
@ -266,7 +266,7 @@ ostream& Assembly::streamRLP(ostream& _out, string const& _prefix, StringMap con |
|
|
for (size_t i = 0; i < m_subs.size(); ++i) |
|
|
for (size_t i = 0; i < m_subs.size(); ++i) |
|
|
{ |
|
|
{ |
|
|
_out << _prefix << " " << hex << i << ": " << endl; |
|
|
_out << _prefix << " " << hex << i << ": " << endl; |
|
|
m_subs[i].streamRLP(_out, _prefix + " ", _sourceCodes); |
|
|
m_subs[i].stream(_out, _prefix + " ", _sourceCodes); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return _out; |
|
|
return _out; |
|
|