aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-30 08:58:19 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-11 22:48:58 +0800
commit50570c6c794eee01af64751c884fb6cb68f8dffc (patch)
tree5ed3c757106ddba44ad2194c773ad70317c9272b
parenta535a8b06ed1b9c0c5fd41805a4fe39939755f05 (diff)
downloaddexon-solidity-50570c6c794eee01af64751c884fb6cb68f8dffc.tar.gz
dexon-solidity-50570c6c794eee01af64751c884fb6cb68f8dffc.tar.zst
dexon-solidity-50570c6c794eee01af64751c884fb6cb68f8dffc.zip
Do not return the stream in asssemblyStream
-rw-r--r--libevmasm/Assembly.cpp4
-rw-r--r--libevmasm/Assembly.h2
-rw-r--r--libsolidity/codegen/Compiler.h4
-rw-r--r--libsolidity/codegen/CompilerContext.h4
-rw-r--r--libsolidity/interface/CompilerStack.cpp5
-rw-r--r--libsolidity/interface/CompilerStack.h2
6 files changed, 9 insertions, 12 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp
index a07226ca..2203cadf 100644
--- a/libevmasm/Assembly.cpp
+++ b/libevmasm/Assembly.cpp
@@ -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)
diff --git a/libevmasm/Assembly.h b/libevmasm/Assembly.h
index ab8f174d..b7e9b354 100644
--- a/libevmasm/Assembly.h
+++ b/libevmasm/Assembly.h
@@ -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()
diff --git a/libsolidity/codegen/Compiler.h b/libsolidity/codegen/Compiler.h
index 1224ff60..5233cc91 100644
--- a/libsolidity/codegen/Compiler.h
+++ b/libsolidity/codegen/Compiler.h
@@ -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
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h
index de79aa42..47d4edde 100644
--- a/libsolidity/codegen/CompilerContext.h
+++ b/libsolidity/codegen/CompilerContext.h
@@ -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
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 4002bac3..5f62bb03 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -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;
}
}
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 207778f0..2f1b9bb3 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -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