Do not return the stream in asssemblyStream

This commit is contained in:
Alex Beregszaszi 2017-08-30 01:58:19 +01:00
parent a535a8b06e
commit 50570c6c79
6 changed files with 9 additions and 12 deletions

View File

@ -181,7 +181,7 @@ private:
}
ostream& Assembly::assemblyStream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const
void Assembly::assemblyStream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes) const
{
Functionalizer f(_out, _prefix, _sourceCodes);
@ -206,8 +206,6 @@ ostream& Assembly::assemblyStream(ostream& _out, string const& _prefix, StringMa
if (m_auxiliaryData.size() > 0)
_out << endl << _prefix << "auxdata: 0x" << toHex(m_auxiliaryData) << endl;
return _out;
}
Json::Value Assembly::createJsonValue(string _name, int _begin, int _end, string _value, string _jumpType)

View File

@ -121,7 +121,7 @@ public:
Assembly& optimise(bool _enable, bool _isCreation = true, size_t _runs = 200);
/// Create a text representation of the assembly.
std::ostream& assemblyStream(
void assemblyStream(
std::ostream& _out,
std::string const& _prefix = "",
StringMap const& _sourceCodes = StringMap()

View File

@ -60,9 +60,9 @@ public:
/// @returns Only the runtime object (without constructor).
eth::LinkerObject runtimeObject() const { return m_context.assembledRuntimeObject(m_runtimeSub); }
/// @arg _sourceCodes is the map of input files to source code strings
std::ostream& assemblyStream(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const
void assemblyStream(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const
{
return m_context.assemblyStream(_stream, _sourceCodes);
m_context.assemblyStream(_stream, _sourceCodes);
}
/// @arg _sourceCodes is the map of input files to source code strings
Json::Value assemblyJSON(StringMap const& _sourceCodes = StringMap()) const

View File

@ -209,9 +209,9 @@ public:
eth::Assembly& nonConstAssembly() { return *m_asm; }
/// @arg _sourceCodes is the map of input files to source code strings
std::ostream& assemblyStream(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const
void assemblyStream(std::ostream& _stream, StringMap const& _sourceCodes = StringMap()) const
{
return m_asm->assemblyStream(_stream, "", _sourceCodes);
m_asm->assemblyStream(_stream, "", _sourceCodes);
}
/// @arg _sourceCodes is the map of input files to source code strings

View File

@ -347,15 +347,14 @@ eth::LinkerObject const& CompilerStack::cloneObject(string const& _contractName)
return contract(_contractName).cloneObject;
}
ostream& CompilerStack::assemblyStream(ostream& _outStream, string const& _contractName, StringMap _sourceCodes) const
void CompilerStack::assemblyStream(ostream& _outStream, string const& _contractName, StringMap _sourceCodes) const
{
Contract const& currentContract = contract(_contractName);
if (currentContract.compiler)
return currentContract.compiler->assemblyStream(_outStream, _sourceCodes);
currentContract.compiler->assemblyStream(_outStream, _sourceCodes);
else
{
_outStream << "Contract not fully implemented" << endl;
return _outStream;
}
}

View File

@ -193,7 +193,7 @@ public:
/// Streams a verbose version of the assembly to @a _outStream.
/// @arg _sourceCodes is the map of input files to source code strings
/// Prerequisite: Successful compilation.
std::ostream& assemblyStream(std::ostream& _outStream, std::string const& _contractName = "", StringMap _sourceCodes = StringMap()) const;
void assemblyStream(std::ostream& _outStream, std::string const& _contractName = "", StringMap _sourceCodes = StringMap()) const;
/// @returns a JSON representation of the assembly.
/// @arg _sourceCodes is the map of input files to source code strings