mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split Common.h into Numeric.h.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <libsolutil/Keccak256.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
#include <libsolutil/Whiskers.h>
|
||||
#include <libsolutil/Numeric.h>
|
||||
|
||||
#include <liblangutil/Exceptions.h>
|
||||
|
||||
@@ -505,7 +506,7 @@ public:
|
||||
// Note: Don't change HexPrefix::Add. See comment in fixedByteValueAsString().
|
||||
static std::string maskUnsignedIntToHex(unsigned _counter, unsigned _numMaskNibbles)
|
||||
{
|
||||
return toHex(maskUnsignedInt(_counter, _numMaskNibbles), util::HexPrefix::Add);
|
||||
return "0x" + toHex(maskUnsignedInt(_counter, _numMaskNibbles));
|
||||
}
|
||||
|
||||
/// Dynamically sized arrays can have a length of at least zero
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <libevmasm/Instruction.h>
|
||||
|
||||
#include <libsolutil/Keccak256.h>
|
||||
#include <libsolutil/Numeric.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
@@ -511,7 +514,7 @@ void EVMInstructionInterpreter::logTrace(std::string const& _pseudoInstruction,
|
||||
{
|
||||
string message = _pseudoInstruction + "(";
|
||||
for (size_t i = 0; i < _arguments.size(); ++i)
|
||||
message += (i > 0 ? ", " : "") + util::formatNumber(_arguments[i]);
|
||||
message += (i > 0 ? ", " : "") + formatNumber(_arguments[i]);
|
||||
message += ")";
|
||||
if (!_data.empty())
|
||||
message += " [" + util::toHex(_data) + "]";
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <libyul/ASTForward.h>
|
||||
|
||||
#include <libsolutil/CommonData.h>
|
||||
#include <libsolutil/Numeric.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <libevmasm/Instruction.h>
|
||||
|
||||
#include <libsolutil/Keccak256.h>
|
||||
#include <libsolutil/Numeric.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
@@ -601,7 +604,7 @@ void EwasmBuiltinInterpreter::logTrace(std::string const& _pseudoInstruction, st
|
||||
{
|
||||
string message = _pseudoInstruction + "(";
|
||||
for (size_t i = 0; i < _arguments.size(); ++i)
|
||||
message += (i > 0 ? ", " : "") + util::formatNumber(_arguments[i]);
|
||||
message += (i > 0 ? ", " : "") + formatNumber(_arguments[i]);
|
||||
message += ")";
|
||||
if (!_data.empty())
|
||||
message += " [" + util::toHex(_data) + "]";
|
||||
|
||||
Reference in New Issue
Block a user