Browse Source

removed unused parameter from streamAsmJson

cl-refactor
Liana Husikyan 10 years ago
parent
commit
254c845490
  1. 6
      libevmcore/Assembly.cpp
  2. 5
      libevmcore/Assembly.h
  3. 2
      libsolidity/CompilerStack.cpp

6
libevmcore/Assembly.cpp

@ -184,7 +184,7 @@ string toStringInHex(u256 _value)
return hexStr.str(); return hexStr.str();
} }
Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes, bool _inJsonFormat) const Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes) const
{ {
Json::Value root; Json::Value root;
@ -254,7 +254,7 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes
{ {
std::stringstream hexStr; std::stringstream hexStr;
hexStr << hex << i; hexStr << hex << i;
data[hexStr.str()] = m_subs[i].stream(_out, "", _sourceCodes, _inJsonFormat); data[hexStr.str()] = m_subs[i].stream(_out, "", _sourceCodes, true);
} }
root[".data"] = data; root[".data"] = data;
_out << root; _out << root;
@ -265,7 +265,7 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes
Json::Value Assembly::stream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes, bool _inJsonFormat) const Json::Value Assembly::stream(ostream& _out, string const& _prefix, StringMap const& _sourceCodes, bool _inJsonFormat) const
{ {
if (_inJsonFormat) if (_inJsonFormat)
return streamAsmJson(_out, _sourceCodes, _inJsonFormat); return streamAsmJson(_out, _sourceCodes);
else else
{ {
streamAsm(_out, _prefix, _sourceCodes); streamAsm(_out, _prefix, _sourceCodes);

5
libevmcore/Assembly.h

@ -104,10 +104,7 @@ protected:
unsigned bytesRequired() const; unsigned bytesRequired() const;
private: private:
Json::Value streamAsmJson(std::ostream& _out, Json::Value streamAsmJson(std::ostream& _out, const StringMap &_sourceCodes) const;
const StringMap &_sourceCodes,
bool _inJsonFormat
) const;
std::ostream& streamAsm(std::ostream& _out, std::string const& _prefix, StringMap const& _sourceCodes) const; std::ostream& streamAsm(std::ostream& _out, std::string const& _prefix, StringMap const& _sourceCodes) const;
Json::Value createJsonValue(std::string _name, int _begin, int _end, std::string _value = std::string(), std::string _jumpType = std::string()) const; Json::Value createJsonValue(std::string _name, int _begin, int _end, std::string _value = std::string(), std::string _jumpType = std::string()) const;

2
libsolidity/CompilerStack.cpp

@ -188,7 +188,7 @@ void CompilerStack::streamAssembly(ostream& _outStream, string const& _contractN
{ {
Contract const& contract = getContract(_contractName); Contract const& contract = getContract(_contractName);
if (contract.compiler) if (contract.compiler)
contract(_contractName).compiler->streamAssembly(_outStream, _sourceCodes, _inJsonFormat); contract.compiler->streamAssembly(_outStream, _sourceCodes, _inJsonFormat);
else else
_outStream << "Contract not fully implemented" << endl; _outStream << "Contract not fully implemented" << endl;
} }

Loading…
Cancel
Save