Add missing std::dec after std::hex
Fixed: 573058966 Change-Id: Ia39fc84b2a6ea004f8d28ddca8cb48093ee18585 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8564282 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Darius Mercadier <dmercadier@chromium.org> Cr-Commit-Position: refs/heads/main@{#110677}
This commit is contained in:
1 parent
334b992436
commit
0e32656129
24 files changed
+40
-30
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ std::string PrettyPrintChar(int ch) {
|
||||
if (std::isprint(ch)) {
|
||||
oss << '\'' << ch << '\'';
|
||||
} else {
|
||||
oss << std::hex << "\\x" << static_cast<unsigned int>(ch);
|
||||
oss << std::hex << "\\x" << static_cast<unsigned int>(ch) << std::dec;
|
||||
}
|
||||
}
|
||||
return oss.str();
|
||||
|
||||
@@ -117,8 +117,8 @@ void MaglevSafepointTable::Print(std::ostream& os) const {
|
||||
|
||||
if (entry.has_deoptimization_index()) {
|
||||
os << " deopt " << std::setw(6) << entry.deoptimization_index()
|
||||
<< " trampoline: " << std::setw(6) << std::hex
|
||||
<< entry.trampoline_pc();
|
||||
<< " trampoline: " << std::setw(6) << std::hex << entry.trampoline_pc()
|
||||
<< std::dec;
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ void SafepointTable::Print(std::ostream& os) {
|
||||
if (entry_.has_deoptimization_index()) {
|
||||
os << " deopt " << std::setw(6) << entry_.deoptimization_index()
|
||||
<< " trampoline: " << std::setw(6) << std::hex
|
||||
<< entry_.trampoline_pc();
|
||||
<< entry_.trampoline_pc() << std::dec;
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
@@ -2063,7 +2063,7 @@ int ComputeInitialGraphHash(Builtin builtin,
|
||||
std::ofstream out(v8_flags.dump_builtins_hashes_to_file,
|
||||
std::ios_base::app);
|
||||
out << "Builtin: " << Builtins::name(builtin) << ", hash: 0x" << std::hex
|
||||
<< initial_graph_hash << std::endl;
|
||||
<< initial_graph_hash << std::dec << std::endl;
|
||||
}
|
||||
}
|
||||
return initial_graph_hash;
|
||||
|
||||
@@ -261,7 +261,8 @@ static void PrintRelocInfo(std::ostringstream& out, Isolate* isolate,
|
||||
out << " ;; external reference (" << reference_name << ")";
|
||||
} else if (rmode == RelocInfo::JS_DISPATCH_HANDLE) {
|
||||
JSDispatchHandle dispatch_handle = relocinfo->js_dispatch_handle();
|
||||
out << " ;; js dispatch handle:0x" << std::hex << dispatch_handle;
|
||||
out << " ;; js dispatch handle:0x" << std::hex << dispatch_handle
|
||||
<< std::dec;
|
||||
if (dispatch_handle != kNullJSDispatchHandle) {
|
||||
Tagged<Code> code =
|
||||
isolate->js_dispatch_table().GetCode(relocinfo->js_dispatch_handle());
|
||||
@@ -424,7 +425,7 @@ static int DecodeIt(Isolate* isolate, ExternalReferenceEncoder* ref_encoder,
|
||||
out << "\033[33;1m";
|
||||
}
|
||||
out << static_cast<void*>(prev_pc) << " " << std::setw(4) << std::hex
|
||||
<< prev_pc - begin << " ";
|
||||
<< prev_pc - begin << std::dec << " ";
|
||||
|
||||
// Instruction.
|
||||
out << decode_buffer.data();
|
||||
|
||||
@@ -502,11 +502,12 @@ void PrintByteArrayElements(std::ostream& os, const T* array) {
|
||||
uint32_t length = array->ulength().value();
|
||||
uint32_t i = 0;
|
||||
while (i < length) {
|
||||
os << " 0x" << std::setfill('0') << std::setw(4) << std::hex << i << ":";
|
||||
os << " 0x" << std::setfill('0') << std::setw(4) << std::hex << i
|
||||
<< std::dec << ":";
|
||||
uint32_t line_end = std::min(i + 16, length);
|
||||
for (; i < line_end; ++i) {
|
||||
os << " " << std::setfill('0') << std::setw(2) << std::hex
|
||||
<< static_cast<int>(array->get(i));
|
||||
<< static_cast<int>(array->get(i)) << std::dec;
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
@@ -1774,7 +1775,7 @@ void OrderedNameDictionary::OrderedNameDictionaryPrint(std::ostream& os) {
|
||||
|
||||
void print_hex_byte(std::ostream& os, int value) {
|
||||
os << "0x" << std::setfill('0') << std::setw(2) << std::right << std::hex
|
||||
<< (value & 0xff) << std::setfill(' ');
|
||||
<< (value & 0xff) << std::dec << std::setfill(' ');
|
||||
}
|
||||
|
||||
void SwissNameDictionary::SwissNameDictionaryPrint(std::ostream& os) {
|
||||
|
||||
@@ -5963,7 +5963,7 @@ bool Isolate::InitWithSnapshot(SnapshotData* startup_snapshot_data,
|
||||
namespace {
|
||||
static std::string ToHexString(uintptr_t address) {
|
||||
std::stringstream stream_address;
|
||||
stream_address << "0x" << std::hex << address;
|
||||
stream_address << "0x" << std::hex << address << std::dec;
|
||||
return stream_address.str();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -9482,7 +9482,7 @@ void Simulator::InstructionDecode(Instruction* instr) {
|
||||
if (1) {
|
||||
std::cout << "Unrecognized instruction [@pc=0x" << std::hex
|
||||
<< registers_[pc] << "]: 0x" << instr->InstructionBits()
|
||||
<< std::endl;
|
||||
<< std::dec << std::endl;
|
||||
}
|
||||
UNSUPPORTED();
|
||||
}
|
||||
@@ -9711,7 +9711,7 @@ void Simulator::CallImpl(Address entry, CallArgument* args) {
|
||||
<< " fa3 = 0x" << get_fpu_register(fa3) << " fa4 = 0x"
|
||||
<< get_fpu_register(fa4) << " fa5 = 0x" << get_fpu_register(fa5)
|
||||
<< " fa6 = 0x" << get_fpu_register(fa6) << " fa7 = 0x"
|
||||
<< get_fpu_register(fa7) << std::endl;
|
||||
<< get_fpu_register(fa7) << std::dec << std::endl;
|
||||
}
|
||||
// Remaining arguments passed on stack.
|
||||
int64_t original_stack = get_register(sp);
|
||||
@@ -9754,7 +9754,7 @@ intptr_t Simulator::CallImpl(Address entry, int argument_count,
|
||||
<< " a2 (func/target) = 0x" << get_register(a2)
|
||||
<< " a3 (receiver) = 0x" << get_register(a3) << " a4 (argc) = 0x"
|
||||
<< get_register(a4) << " a5 (argv) = 0x" << get_register(a5)
|
||||
<< std::endl;
|
||||
<< std::dec << std::endl;
|
||||
}
|
||||
// Remaining arguments passed on stack.
|
||||
sreg_t original_stack = get_register(sp);
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ bool Heap::IsPendingAllocation(Tagged<HeapObject> object) {
|
||||
bool result = IsPendingAllocationInternal(object);
|
||||
if (v8_flags.trace_pending_allocations && result) {
|
||||
StdoutStream{} << "Pending allocation: " << std::hex << "0x" << object.ptr()
|
||||
<< "\n";
|
||||
<< std::dec << "\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ void BytecodeNode::Print(std::ostream& os) const {
|
||||
os << Bytecodes::ToString(bytecode_);
|
||||
|
||||
for (int i = 0; i < operand_count(); ++i) {
|
||||
os << ' ' << std::setw(8) << std::setfill('0') << std::hex << operands_[i];
|
||||
os << ' ' << std::setw(8) << std::setfill('0') << std::hex << operands_[i]
|
||||
<< std::dec;
|
||||
}
|
||||
os.copyfmt(saved_state);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ std::ostream& PrintAsciiOrHex(std::ostream& os, base::uc16 c) {
|
||||
if (c < 128 && std::isprint(c)) {
|
||||
os << static_cast<char>(c);
|
||||
} else {
|
||||
os << "0x" << std::hex << static_cast<int>(c);
|
||||
os << "0x" << std::hex << static_cast<int>(c) << std::dec;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,7 @@ void WriteHeader(const char* header_filename) {
|
||||
<< "namespace regexp {\n\n";
|
||||
|
||||
PrintSpecial(out);
|
||||
out << std::dec;
|
||||
|
||||
out << "\n"
|
||||
<< "} // namespace regexp\n"
|
||||
|
||||
@@ -215,7 +215,8 @@ void StaticRootsTableGen::write_text(Isolate* isolate, const char* file) {
|
||||
const std::list<RootIndex>& roots = entry.second;
|
||||
|
||||
for (RootIndex root : roots) {
|
||||
out << "0x" << std::hex << ptr << " = k" << gen.camel_name(root) << "\n";
|
||||
out << "0x" << std::hex << ptr << std::dec << " = k"
|
||||
<< gen.camel_name(root) << "\n";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -513,8 +513,8 @@ void WasmCode::Disassemble(const char* name, std::ostream& os,
|
||||
if (trapping_instructions_size_ > 0) {
|
||||
os << "Trapping instructions:\n pc offset\n";
|
||||
for (auto& data : trapping_instructions()) {
|
||||
os << std::setw(10) << std::hex << data.instr_offset << std::setw(10)
|
||||
<< "\n";
|
||||
os << std::setw(10) << std::hex << data.instr_offset << std::dec
|
||||
<< std::setw(10) << "\n";
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ class WasmValue {
|
||||
if (!(byte & 0xf0)) stream << '0';
|
||||
stream << static_cast<uint32_t>(byte);
|
||||
}
|
||||
stream << std::dec;
|
||||
return stream.str();
|
||||
}
|
||||
case kRefNull:
|
||||
|
||||
@@ -194,7 +194,8 @@ TEST(TryProbeStubCache) {
|
||||
// Generate string.
|
||||
std::stringstream ss;
|
||||
ss << "s" << std::hex
|
||||
<< (rand_gen.NextInt(Smi::kMaxValue) % StubCache::kPrimaryTableSize);
|
||||
<< (rand_gen.NextInt(Smi::kMaxValue) % StubCache::kPrimaryTableSize)
|
||||
<< std::dec;
|
||||
name = factory->InternalizeUtf8String(ss.str().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -607,11 +607,11 @@ class FastJSWasmCallTester {
|
||||
auto it = buffer.begin();
|
||||
if (it != buffer.end()) {
|
||||
string_stream << "0x" << std::setfill('0') << std::setw(2) << std::hex
|
||||
<< static_cast<int>(*it++);
|
||||
<< static_cast<int>(*it++) << std::dec;
|
||||
}
|
||||
while (it != buffer.end()) {
|
||||
string_stream << ", 0x" << std::setfill('0') << std::setw(2) << std::hex
|
||||
<< static_cast<int>(*it++);
|
||||
<< static_cast<int>(*it++) << std::dec;
|
||||
}
|
||||
string_stream << "]";
|
||||
return string_stream.str();
|
||||
|
||||
@@ -869,6 +869,7 @@ bool MemoriesMatch(Isolate* isolate, const WasmModule* module,
|
||||
|
||||
ss << "\n - Actual: ";
|
||||
print_mem_block(ss, data + j);
|
||||
ss << std::dec;
|
||||
|
||||
ss << "\n ";
|
||||
for (size_t k = 0; k < block_size; ++k) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define PRINT_RES(res, expected_res, in_hex) \
|
||||
if (in_hex) std::cout << "[hex-form]" << std::hex; \
|
||||
std::cout << "res = " << (res) << " expected = " << (expected_res) \
|
||||
<< std::endl;
|
||||
<< std::dec << std::endl;
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define PRINT_RES(res, expected_res, in_hex) \
|
||||
if (in_hex) std::cout << "[hex-form]" << std::hex; \
|
||||
std::cout << "res = " << (res) << " expected = " << (expected_res) \
|
||||
<< std::endl;
|
||||
<< std::dec << std::endl;
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
@@ -1428,6 +1428,7 @@ class TrackingPageAllocator : public ::v8::PageAllocator {
|
||||
PrintRegion(os, contiguous_region_start, contiguous_region_end,
|
||||
contiguous_region_access, contiguous_region_access_committed);
|
||||
}
|
||||
os << std::dec << std::noshowbase;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -632,7 +632,7 @@ class TestListener : public TraceEventListener {
|
||||
} else if (it.has_string_value()) {
|
||||
value << "(string)" << it.string_value();
|
||||
} else if (it.has_pointer_value()) {
|
||||
value << "(pointer)0x" << std::hex << it.pointer_value();
|
||||
value << "(pointer)0x" << std::hex << it.pointer_value() << std::dec;
|
||||
} else if (it.has_legacy_json_value()) {
|
||||
value << "(json)" << it.legacy_json_value();
|
||||
} else if (it.has_nested_value()) {
|
||||
|
||||
@@ -32,7 +32,8 @@ constexpr char kObjectAsStoredInHeap[] =
|
||||
std::string AppendAddressAndType(const std::string& brief, uintptr_t address,
|
||||
const char* type) {
|
||||
std::stringstream brief_stream;
|
||||
brief_stream << "0x" << std::hex << address << " <" << type << ">";
|
||||
brief_stream << "0x" << std::hex << address << std::dec << " <" << type
|
||||
<< ">";
|
||||
return brief.empty() ? brief_stream.str()
|
||||
: brief + " (" + brief_stream.str() + ")";
|
||||
}
|
||||
@@ -725,7 +726,7 @@ std::unique_ptr<ObjectPropertiesResult> GetObjectProperties(
|
||||
// untagged value.
|
||||
int32_t value = i::PlatformSmiTagging::SmiToInt(address);
|
||||
std::stringstream stream;
|
||||
stream << value << " (0x" << std::hex << value << ")";
|
||||
stream << value << " (0x" << std::hex << value << std::dec << ")";
|
||||
return std::make_unique<ObjectPropertiesResult>(d::TypeCheckResult::kSmi,
|
||||
stream.str(), kSmi);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ IFACEMETHODIMP V8CachedObject::GetCachedV8HeapObject(
|
||||
std::stringstream message;
|
||||
message << "Unable to read memory";
|
||||
if (location_.IsVirtualAddress()) {
|
||||
message << " at 0x" << std::hex << location_.GetOffset();
|
||||
message << " at 0x" << std::hex << location_.GetOffset() << std::dec;
|
||||
}
|
||||
heap_object_.friendly_name = ConvertToU16String(message.str());
|
||||
} else {
|
||||
@@ -271,7 +271,7 @@ HRESULT GetModelForBitField(uint64_t address, const uint8_t num_bits,
|
||||
// need all of the bytes, so check for S_OK.
|
||||
if (hr != S_OK) {
|
||||
std::stringstream message;
|
||||
message << "Unable to read memory at 0x" << std::hex << address;
|
||||
message << "Unable to read memory at 0x" << std::hex << address << std::dec;
|
||||
return CreateString(ConvertToU16String(message.str()), result);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user