Browse Source

Small review fixes.

cl-refactor
chriseth 10 years ago
parent
commit
c941c3d9c4
  1. 4
      libevmcore/ExpressionClasses.cpp
  2. 2
      libevmcore/ExpressionClasses.h
  3. 2
      libevmcore/Instruction.h

4
libevmcore/ExpressionClasses.cpp

@ -35,7 +35,7 @@ using namespace dev;
using namespace dev::eth;
bool ExpressionClasses::Expression::operator<(const ExpressionClasses::Expression& _other) const
bool ExpressionClasses::Expression::operator<(ExpressionClasses::Expression const& _other) const
{
auto type = item->type();
auto otherType = _other.item->type();
@ -74,7 +74,7 @@ ExpressionClasses::Id ExpressionClasses::find(AssemblyItem const& _item, Ids con
return exp.id;
}
string ExpressionClasses::fullDAGToString(ExpressionClasses::Id _id)
string ExpressionClasses::fullDAGToString(ExpressionClasses::Id _id) const
{
Expression const& expr = representative(_id);
stringstream str;

2
libevmcore/ExpressionClasses.h

@ -63,7 +63,7 @@ public:
/// @returns the number of classes.
Id size() const { return m_representatives.size(); }
std::string fullDAGToString(Id _id);
std::string fullDAGToString(Id _id) const;
private:
/// Tries to simplify the given expression.

2
libevmcore/Instruction.h

@ -237,7 +237,7 @@ enum Tier
struct InstructionInfo
{
std::string name; ///< The name of the instruction.
int additional; //a/< Additional items required in memory for this instructions (only for PUSH).
int additional; ///< Additional items required in memory for this instructions (only for PUSH).
int args; ///< Number of items required on the stack for this instruction (and, for the purposes of ret, the number taken from the stack).
int ret; ///< Number of items placed (back) on the stack by this instruction, assuming args items were removed.
bool sideEffects; ///< false if the only effect on the execution environment (apart from gas usage) is a change to a topmost segment of the stack

Loading…
Cancel
Save