Browse Source

style fixes

cl-refactor
Liana Husikyan 10 years ago
parent
commit
4ef9b70dd3
  1. 5
      libevmcore/Assembly.cpp
  2. 12
      libevmcore/Assembly.h
  3. 2
      libsolidity/Compiler.h
  4. 7
      libsolidity/CompilerContext.h
  5. 2
      libsolidity/CompilerStack.h

5
libevmcore/Assembly.cpp

@ -295,6 +295,8 @@ ostream& Assembly::streamAsmJson(ostream& _out, string const& _prefix, StringMap
data["value"] = hexStr.str();
dataCollection.append(data);
}
root[_prefix + ".data"] = collection;
_out << root;
for (size_t i = 0; i < m_subs.size(); ++i)
{
@ -304,9 +306,6 @@ ostream& Assembly::streamAsmJson(ostream& _out, string const& _prefix, StringMap
//todo check recursion check order.
m_subs[i].stream(_out, _prefix + " ", _sourceCodes, _inJsonFormat);
}
root[_prefix + ".data"] = collection;
_out << root;
} else
_out << root;

12
libevmcore/Assembly.h

@ -86,7 +86,11 @@ public:
bytes assemble() const;
Assembly& optimise(bool _enable);
std::ostream& stream(std::ostream& _out, std::string const& _prefix = "", const StringMap &_sourceCodes = StringMap(), bool _inJsonFormat = false) const;
std::ostream& stream(
std::ostream& _out,
std::string const& _prefix = "",
const StringMap &_sourceCodes = StringMap(),
bool _inJsonFormat = false) const;
protected:
std::string getLocationFromSources(StringMap const& _sourceCodes, SourceLocation const& _location) const;
@ -94,7 +98,11 @@ protected:
unsigned bytesRequired() const;
private:
std::ostream& streamAsmJson(std::ostream& _out, const std::string &_prefix, const StringMap &_sourceCodes, bool _inJsonFormat) const;
std::ostream& streamAsmJson(
std::ostream& _out,
const std::string &_prefix,
const StringMap &_sourceCodes,
bool _inJsonFormat) const;
std::ostream& streamAsm(std::ostream& _out, std::string const& _prefix, StringMap const& _sourceCodes) const;
protected:
unsigned m_usedTags = 0;

2
libsolidity/Compiler.h

@ -42,7 +42,7 @@ public:
bytes getAssembledBytecode() { return m_context.getAssembledBytecode(m_optimize); }
bytes getRuntimeBytecode() { return m_runtimeContext.getAssembledBytecode(m_optimize);}
/// @arg _sourceCodes is the map of input files to source code strings
/// @arg _inJsonFromat shows weather the out should be in Json format
/// @arg _inJsonFromat shows whether the out should be in Json format
void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap(), bool _inJsonFormat = false) const
{
m_context.streamAssembly(_stream, _sourceCodes, _inJsonFormat);

7
libsolidity/CompilerContext.h

@ -122,8 +122,11 @@ public:
eth::Assembly const& getAssembly() const { return m_asm; }
/// @arg _sourceCodes is the map of input files to source code strings
/// @arg _inJsonFromat shows weather the out should be in Json format
void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap(), bool _inJsonFormat = false) const { m_asm.stream(_stream, "", _sourceCodes, _inJsonFormat); }
/// @arg _inJsonFormat shows whether the out should be in Json format
void streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap(), bool _inJsonFormat = false) const
{
m_asm.stream(_stream, "", _sourceCodes, _inJsonFormat);
}
bytes getAssembledBytecode(bool _optimize = false) { return m_asm.optimise(_optimize).assemble(); }

2
libsolidity/CompilerStack.h

@ -102,7 +102,7 @@ public:
/// Streams a verbose version of the assembly to @a _outStream.
/// @arg _sourceCodes is the map of input files to source code strings
/// @arg _inJsonFromat shows weather the out should be in Json format
/// @arg _inJsonFromat shows whether the out should be in Json format
/// Prerequisite: Successful compilation.
void streamAssembly(std::ostream& _outStream, std::string const& _contractName = "", StringMap _sourceCodes = StringMap(), bool _inJsonFormat = false) const;

Loading…
Cancel
Save