Remove obsolete Assembly::out

This commit is contained in:
Alex Beregszaszi 2017-06-14 20:24:53 +01:00
parent 398099f50e
commit 18fc667658
3 changed files with 3 additions and 10 deletions

View File

@ -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 unsigned Assembly::bytesRequired(unsigned subTagSize) const
{ {
for (unsigned tagSize = subTagSize; true; ++tagSize) for (unsigned tagSize = subTagSize; true; ++tagSize)

View File

@ -87,7 +87,6 @@ public:
void popTo(int _deposit) { while (m_deposit > _deposit) append(solidity::Instruction::POP); } void popTo(int _deposit) { while (m_deposit > _deposit) append(solidity::Instruction::POP); }
void injectStart(AssemblyItem const& _i); void injectStart(AssemblyItem const& _i);
std::string out() const;
int deposit() const { return m_deposit; } int deposit() const { return m_deposit; }
void adjustDeposit(int _adjustment) { m_deposit += _adjustment; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); } void adjustDeposit(int _adjustment) { m_deposit += _adjustment; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); }
void setDeposit(int _deposit) { m_deposit = _deposit; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); } void setDeposit(int _deposit) { m_deposit = _deposit; if (asserts(m_deposit >= 0)) BOOST_THROW_EXCEPTION(InvalidDeposit()); }

View File

@ -69,10 +69,11 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::v
{ {
CompilerState cs; CompilerState cs;
cs.populateStandard(); cs.populateStandard();
string ret = CodeFragment::compile(_src, cs).assembly(cs).optimise(_opt).out(); stringstream ret;
CodeFragment::compile(_src, cs).assembly(cs).optimise(_opt).stream(ret);
for (auto i: cs.treesToKill) for (auto i: cs.treesToKill)
killBigints(i); killBigints(i);
return ret; return ret.str();
} }
catch (Exception const& _e) catch (Exception const& _e)
{ {