Browse Source

style fixes

cl-refactor
Liana Husikyan 10 years ago
parent
commit
95e161bfc9
  1. 6
      libevmcore/Assembly.cpp
  2. 6
      libevmcore/Assembly.h

6
libevmcore/Assembly.cpp

@ -194,7 +194,7 @@ Json::Value Assembly::streamAsmJson(ostream& _out, string const& _prefix, String
case Push:
{
std::stringstream hexStr;
hexStr << hex << (unsigned)i.data();
hexStr << hex << i.data();
currentCollection.push_back(
createJsonValue(string("PUSH"), i.getLocation().start, i.getLocation().end, hexStr.str(), i.getJumpTypeAsString()));
}
@ -209,11 +209,11 @@ Json::Value Assembly::streamAsmJson(ostream& _out, string const& _prefix, String
break;
case PushSub:
currentCollection.push_back(
createJsonValue(string("PUSH"), i.getLocation().start, i.getLocation().end, string("[$]" + string(h256(i.data()).abridged()))));
createJsonValue(string("PUSH"), i.getLocation().start, i.getLocation().end, string("[$]" + dev::toString(h256(i.data())))));
break;
case PushSubSize:
currentCollection.push_back(
createJsonValue(string("PUSH"), i.getLocation().start, i.getLocation().end, string("#[$]" + string(h256(i.data()).abridged()))));
createJsonValue(string("PUSH"), i.getLocation().start, i.getLocation().end, string("#[$]" + dev::toString(h256(i.data())))));
break;
case PushProgramSize:
currentCollection.push_back(

6
libevmcore/Assembly.h

@ -95,7 +95,8 @@ public:
std::ostream& _out,
std::string const& _prefix = "",
const StringMap &_sourceCodes = StringMap(),
bool _inJsonFormat = false) const;
bool _inJsonFormat = false
) const;
protected:
std::string getLocationFromSources(StringMap const& _sourceCodes, SourceLocation const& _location) const;
@ -107,7 +108,8 @@ private:
std::ostream& _out,
const std::string &_prefix,
const StringMap &_sourceCodes,
bool _inJsonFormat) const;
bool _inJsonFormat
) const;
std::ostream& streamAsm(std::ostream& _out, std::string const& _prefix, StringMap const& _sourceCodes) const;
Json::Value createJsonValue(std::string _name, int _locationX, int _locationY, std::string _value = std::string(), std::string _jumpType = std::string()) const;

Loading…
Cancel
Save