Commit 350b0c38 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[cleanup][diagnostics] Remove redundant NOLINT annotations

cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=ahaas@chromium.org

Bug: v8:11717
Change-Id: I26e5a247bcca6c9638b97b220bc08098c5d7ce07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862780Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74444}
parent d715a98a
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include <ostream> // NOLINT(readability/streams) #include "src/diagnostics/compilation-statistics.h"
#include <ostream>
#include <vector> #include <vector>
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/diagnostics/compilation-statistics.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -55,7 +55,7 @@ STATIC_CONST_MEMBER_DEFINITION const int EhFrameConstants::kEhFrameHdrSize; ...@@ -55,7 +55,7 @@ STATIC_CONST_MEMBER_DEFINITION const int EhFrameConstants::kEhFrameHdrSize;
STATIC_CONST_MEMBER_DEFINITION const uint32_t EhFrameWriter::kInt32Placeholder; STATIC_CONST_MEMBER_DEFINITION const uint32_t EhFrameWriter::kInt32Placeholder;
// static // static
void EhFrameWriter::WriteEmptyEhFrame(std::ostream& stream) { // NOLINT void EhFrameWriter::WriteEmptyEhFrame(std::ostream& stream) {
stream.put(EhFrameConstants::kEhFrameHdrVersion); stream.put(EhFrameConstants::kEhFrameHdrVersion);
// .eh_frame pointer encoding specifier. // .eh_frame pointer encoding specifier.
...@@ -480,7 +480,7 @@ class V8_NODISCARD StreamModifiersScope final { ...@@ -480,7 +480,7 @@ class V8_NODISCARD StreamModifiersScope final {
} // namespace } // namespace
// static // static
void EhFrameDisassembler::DumpDwarfDirectives(std::ostream& stream, // NOLINT void EhFrameDisassembler::DumpDwarfDirectives(std::ostream& stream,
const byte* start, const byte* start,
const byte* end) { const byte* end) {
StreamModifiersScope modifiers_scope(&stream); StreamModifiersScope modifiers_scope(&stream);
...@@ -592,7 +592,7 @@ void EhFrameDisassembler::DumpDwarfDirectives(std::ostream& stream, // NOLINT ...@@ -592,7 +592,7 @@ void EhFrameDisassembler::DumpDwarfDirectives(std::ostream& stream, // NOLINT
} }
} }
void EhFrameDisassembler::DisassembleToStream(std::ostream& stream) { // NOLINT void EhFrameDisassembler::DisassembleToStream(std::ostream& stream) {
// The encoded CIE size does not include the size field itself. // The encoded CIE size does not include the size field itself.
const int cie_size = const int cie_size =
base::ReadUnalignedValue<uint32_t>(reinterpret_cast<Address>(start_)) + base::ReadUnalignedValue<uint32_t>(reinterpret_cast<Address>(start_)) +
......
...@@ -80,7 +80,7 @@ class V8_EXPORT_PRIVATE EhFrameWriter { ...@@ -80,7 +80,7 @@ class V8_EXPORT_PRIVATE EhFrameWriter {
// //
// It is effectively a valid eh_frame_hdr with an empty look up table. // It is effectively a valid eh_frame_hdr with an empty look up table.
// //
static void WriteEmptyEhFrame(std::ostream& stream); // NOLINT static void WriteEmptyEhFrame(std::ostream& stream);
// Write the CIE and FDE header. Call it before any other method. // Write the CIE and FDE header. Call it before any other method.
void Initialize(); void Initialize();
...@@ -293,11 +293,11 @@ class EhFrameDisassembler final { ...@@ -293,11 +293,11 @@ class EhFrameDisassembler final {
EhFrameDisassembler(const EhFrameDisassembler&) = delete; EhFrameDisassembler(const EhFrameDisassembler&) = delete;
EhFrameDisassembler& operator=(const EhFrameDisassembler&) = delete; EhFrameDisassembler& operator=(const EhFrameDisassembler&) = delete;
void DisassembleToStream(std::ostream& stream); // NOLINT void DisassembleToStream(std::ostream& stream);
private: private:
static void DumpDwarfDirectives(std::ostream& stream, // NOLINT static void DumpDwarfDirectives(std::ostream& stream, const byte* start,
const byte* start, const byte* end); const byte* end);
static const char* DwarfRegisterCodeToString(int code); static const char* DwarfRegisterCodeToString(int code);
......
...@@ -2890,7 +2890,7 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer, ...@@ -2890,7 +2890,7 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.begin()); outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.begin());
return instr_len; return instr_len;
} // NOLINT (function is too long) }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -42,7 +42,7 @@ void Object::Print() const { ...@@ -42,7 +42,7 @@ void Object::Print() const {
os << std::flush; os << std::flush;
} }
void Object::Print(std::ostream& os) const { // NOLINT void Object::Print(std::ostream& os) const {
if (IsSmi()) { if (IsSmi()) {
os << "Smi: " << std::hex << "0x" << Smi::ToInt(*this); os << "Smi: " << std::hex << "0x" << Smi::ToInt(*this);
os << std::dec << " (" << Smi::ToInt(*this) << ")\n"; os << std::dec << " (" << Smi::ToInt(*this) << ")\n";
...@@ -54,7 +54,7 @@ void Object::Print(std::ostream& os) const { // NOLINT ...@@ -54,7 +54,7 @@ void Object::Print(std::ostream& os) const { // NOLINT
namespace { namespace {
void PrintHeapObjectHeaderWithoutMap(HeapObject object, std::ostream& os, void PrintHeapObjectHeaderWithoutMap(HeapObject object, std::ostream& os,
const char* id) { // NOLINT const char* id) {
os << reinterpret_cast<void*>(object.ptr()) << ": ["; os << reinterpret_cast<void*>(object.ptr()) << ": [";
if (id != nullptr) { if (id != nullptr) {
os << id; os << id;
...@@ -96,12 +96,12 @@ void PrintDictionaryContents(std::ostream& os, T dict) { ...@@ -96,12 +96,12 @@ void PrintDictionaryContents(std::ostream& os, T dict) {
} }
} // namespace } // namespace
void HeapObject::PrintHeader(std::ostream& os, const char* id) { // NOLINT void HeapObject::PrintHeader(std::ostream& os, const char* id) {
PrintHeapObjectHeaderWithoutMap(*this, os, id); PrintHeapObjectHeaderWithoutMap(*this, os, id);
if (!IsMap()) os << "\n - map: " << Brief(map()); if (!IsMap()) os << "\n - map: " << Brief(map());
} }
void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT void HeapObject::HeapObjectPrint(std::ostream& os) {
InstanceType instance_type = map().instance_type(); InstanceType instance_type = map().instance_type();
if (instance_type < FIRST_NONSTRING_TYPE) { if (instance_type < FIRST_NONSTRING_TYPE) {
...@@ -261,24 +261,24 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT ...@@ -261,24 +261,24 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
} }
} }
void ByteArray::ByteArrayPrint(std::ostream& os) { // NOLINT void ByteArray::ByteArrayPrint(std::ostream& os) {
PrintHeader(os, "ByteArray"); PrintHeader(os, "ByteArray");
os << "\n - length: " << length() os << "\n - length: " << length()
<< "\n - data-start: " << static_cast<void*>(GetDataStartAddress()) << "\n - data-start: " << static_cast<void*>(GetDataStartAddress())
<< "\n"; << "\n";
} }
void BytecodeArray::BytecodeArrayPrint(std::ostream& os) { // NOLINT void BytecodeArray::BytecodeArrayPrint(std::ostream& os) {
PrintHeader(os, "BytecodeArray"); PrintHeader(os, "BytecodeArray");
os << "\n"; os << "\n";
Disassemble(os); Disassemble(os);
} }
void FreeSpace::FreeSpacePrint(std::ostream& os) { // NOLINT void FreeSpace::FreeSpacePrint(std::ostream& os) {
os << "free space, size " << Size() << "\n"; os << "free space, size " << Size() << "\n";
} }
bool JSObject::PrintProperties(std::ostream& os) { // NOLINT bool JSObject::PrintProperties(std::ostream& os) {
if (HasFastProperties()) { if (HasFastProperties()) {
DescriptorArray descs = map().instance_descriptors(GetIsolate()); DescriptorArray descs = map().instance_descriptors(GetIsolate());
int nof_inobject_properties = map().GetInObjectProperties(); int nof_inobject_properties = map().GetInObjectProperties();
...@@ -344,7 +344,7 @@ double GetScalarElement(T array, int index) { ...@@ -344,7 +344,7 @@ double GetScalarElement(T array, int index) {
} }
template <class T> template <class T>
void DoPrintElements(std::ostream& os, Object object, int length) { // NOLINT void DoPrintElements(std::ostream& os, Object object, int length) {
const bool print_the_hole = std::is_same<T, FixedDoubleArray>::value; const bool print_the_hole = std::is_same<T, FixedDoubleArray>::value;
T array = T::cast(object); T array = T::cast(object);
if (length == 0) return; if (length == 0) return;
...@@ -481,7 +481,7 @@ void PrintEmbedderData(Isolate* isolate, std::ostream& os, ...@@ -481,7 +481,7 @@ void PrintEmbedderData(Isolate* isolate, std::ostream& os,
} // namespace } // namespace
void JSObject::PrintElements(std::ostream& os) { // NOLINT void JSObject::PrintElements(std::ostream& os) {
// Don't call GetElementsKind, its validation code can cause the printer to // Don't call GetElementsKind, its validation code can cause the printer to
// fail when debugging. // fail when debugging.
os << " - elements: " << Brief(elements()) << " {"; os << " - elements: " << Brief(elements()) << " {";
...@@ -534,7 +534,7 @@ void JSObject::PrintElements(std::ostream& os) { // NOLINT ...@@ -534,7 +534,7 @@ void JSObject::PrintElements(std::ostream& os) { // NOLINT
} }
static void JSObjectPrintHeader(std::ostream& os, JSObject obj, static void JSObjectPrintHeader(std::ostream& os, JSObject obj,
const char* id) { // NOLINT const char* id) {
Isolate* isolate = obj.GetIsolate(); Isolate* isolate = obj.GetIsolate();
obj.PrintHeader(os, id); obj.PrintHeader(os, id);
// Don't call GetElementsKind, its validation code can cause the printer to // Don't call GetElementsKind, its validation code can cause the printer to
...@@ -560,8 +560,7 @@ static void JSObjectPrintHeader(std::ostream& os, JSObject obj, ...@@ -560,8 +560,7 @@ static void JSObjectPrintHeader(std::ostream& os, JSObject obj,
} }
} }
static void JSObjectPrintBody(std::ostream& os, static void JSObjectPrintBody(std::ostream& os, JSObject obj,
JSObject obj, // NOLINT
bool print_elements = true) { bool print_elements = true) {
os << "\n - properties: "; os << "\n - properties: ";
Object properties_or_hash = obj.raw_properties_or_hash(); Object properties_or_hash = obj.raw_properties_or_hash();
...@@ -589,12 +588,12 @@ static void JSObjectPrintBody(std::ostream& os, ...@@ -589,12 +588,12 @@ static void JSObjectPrintBody(std::ostream& os,
} }
} }
void JSObject::JSObjectPrint(std::ostream& os) { // NOLINT void JSObject::JSObjectPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, nullptr); JSObjectPrintHeader(os, *this, nullptr);
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSGeneratorObject::JSGeneratorObjectPrint(std::ostream& os) { // NOLINT void JSGeneratorObject::JSGeneratorObjectPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSGeneratorObject"); JSObjectPrintHeader(os, *this, "JSGeneratorObject");
os << "\n - function: " << Brief(function()); os << "\n - function: " << Brief(function());
os << "\n - context: " << Brief(context()); os << "\n - context: " << Brief(context());
...@@ -654,13 +653,13 @@ void JSGeneratorObject::JSGeneratorObjectPrint(std::ostream& os) { // NOLINT ...@@ -654,13 +653,13 @@ void JSGeneratorObject::JSGeneratorObjectPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSArray::JSArrayPrint(std::ostream& os) { // NOLINT void JSArray::JSArrayPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSArray"); JSObjectPrintHeader(os, *this, "JSArray");
os << "\n - length: " << Brief(this->length()); os << "\n - length: " << Brief(this->length());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSPromise::JSPromisePrint(std::ostream& os) { // NOLINT void JSPromise::JSPromisePrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSPromise"); JSObjectPrintHeader(os, *this, "JSPromise");
os << "\n - status: " << JSPromise::Status(status()); os << "\n - status: " << JSPromise::Status(status());
if (status() == Promise::kPending) { if (status() == Promise::kPending) {
...@@ -673,15 +672,14 @@ void JSPromise::JSPromisePrint(std::ostream& os) { // NOLINT ...@@ -673,15 +672,14 @@ void JSPromise::JSPromisePrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSRegExp::JSRegExpPrint(std::ostream& os) { // NOLINT void JSRegExp::JSRegExpPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSRegExp"); JSObjectPrintHeader(os, *this, "JSRegExp");
os << "\n - data: " << Brief(data()); os << "\n - data: " << Brief(data());
os << "\n - source: " << Brief(source()); os << "\n - source: " << Brief(source());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSRegExpStringIterator::JSRegExpStringIteratorPrint( void JSRegExpStringIterator::JSRegExpStringIteratorPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, *this, "JSRegExpStringIterator"); JSObjectPrintHeader(os, *this, "JSRegExpStringIterator");
os << "\n - regex: " << Brief(iterating_reg_exp()); os << "\n - regex: " << Brief(iterating_reg_exp());
os << "\n - string: " << Brief(iterated_string()); os << "\n - string: " << Brief(iterated_string());
...@@ -691,7 +689,7 @@ void JSRegExpStringIterator::JSRegExpStringIteratorPrint( ...@@ -691,7 +689,7 @@ void JSRegExpStringIterator::JSRegExpStringIteratorPrint(
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void Symbol::SymbolPrint(std::ostream& os) { // NOLINT void Symbol::SymbolPrint(std::ostream& os) {
PrintHeader(os, "Symbol"); PrintHeader(os, "Symbol");
os << "\n - hash: " << hash(); os << "\n - hash: " << hash();
os << "\n - description: " << Brief(description()); os << "\n - description: " << Brief(description());
...@@ -1021,7 +1019,7 @@ void SwissNameDictionary::SwissNameDictionaryPrint(std::ostream& os) { ...@@ -1021,7 +1019,7 @@ void SwissNameDictionary::SwissNameDictionaryPrint(std::ostream& os) {
os.flags(sav_flags); os.flags(sav_flags);
} }
void PropertyArray::PropertyArrayPrint(std::ostream& os) { // NOLINT void PropertyArray::PropertyArrayPrint(std::ostream& os) {
PrintHeader(os, "PropertyArray"); PrintHeader(os, "PropertyArray");
os << "\n - length: " << length(); os << "\n - length: " << length();
os << "\n - hash: " << Hash(); os << "\n - hash: " << Hash();
...@@ -1029,7 +1027,7 @@ void PropertyArray::PropertyArrayPrint(std::ostream& os) { // NOLINT ...@@ -1029,7 +1027,7 @@ void PropertyArray::PropertyArrayPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) { // NOLINT void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) {
PrintHeader(os, "FixedDoubleArray"); PrintHeader(os, "FixedDoubleArray");
os << "\n - length: " << length(); os << "\n - length: " << length();
DoPrintElements<FixedDoubleArray>(os, *this, length()); DoPrintElements<FixedDoubleArray>(os, *this, length());
...@@ -1051,12 +1049,12 @@ void WeakArrayList::WeakArrayListPrint(std::ostream& os) { ...@@ -1051,12 +1049,12 @@ void WeakArrayList::WeakArrayListPrint(std::ostream& os) {
os << "\n"; os << "\n";
} }
void TransitionArray::TransitionArrayPrint(std::ostream& os) { // NOLINT void TransitionArray::TransitionArrayPrint(std::ostream& os) {
PrintHeader(os, "TransitionArray"); PrintHeader(os, "TransitionArray");
PrintInternal(os); PrintInternal(os);
} }
void FeedbackCell::FeedbackCellPrint(std::ostream& os) { // NOLINT void FeedbackCell::FeedbackCellPrint(std::ostream& os) {
PrintHeader(os, "FeedbackCell"); PrintHeader(os, "FeedbackCell");
ReadOnlyRoots roots = GetReadOnlyRoots(); ReadOnlyRoots roots = GetReadOnlyRoots();
if (map() == roots.no_closures_cell_map()) { if (map() == roots.no_closures_cell_map()) {
...@@ -1081,7 +1079,7 @@ void FeedbackVectorSpec::Print() { ...@@ -1081,7 +1079,7 @@ void FeedbackVectorSpec::Print() {
os << std::flush; os << std::flush;
} }
void FeedbackVectorSpec::FeedbackVectorSpecPrint(std::ostream& os) { // NOLINT void FeedbackVectorSpec::FeedbackVectorSpecPrint(std::ostream& os) {
os << " - slot_count: " << slot_count(); os << " - slot_count: " << slot_count();
if (slot_count() == 0) { if (slot_count() == 0) {
os << " (empty)\n"; os << " (empty)\n";
...@@ -1116,7 +1114,7 @@ void ClosureFeedbackCellArray::ClosureFeedbackCellArrayPrint(std::ostream& os) { ...@@ -1116,7 +1114,7 @@ void ClosureFeedbackCellArray::ClosureFeedbackCellArrayPrint(std::ostream& os) {
PrintFixedArrayWithHeader(os, *this, "ClosureFeedbackCellArray"); PrintFixedArrayWithHeader(os, *this, "ClosureFeedbackCellArray");
} }
void FeedbackVector::FeedbackVectorPrint(std::ostream& os) { // NOLINT void FeedbackVector::FeedbackVectorPrint(std::ostream& os) {
PrintHeader(os, "FeedbackVector"); PrintHeader(os, "FeedbackVector");
os << "\n - length: " << length(); os << "\n - length: " << length();
if (length() == 0) { if (length() == 0) {
...@@ -1157,13 +1155,12 @@ void FeedbackVector::FeedbackVectorPrint(std::ostream& os) { // NOLINT ...@@ -1157,13 +1155,12 @@ void FeedbackVector::FeedbackVectorPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void FeedbackVector::FeedbackSlotPrint(std::ostream& os, void FeedbackVector::FeedbackSlotPrint(std::ostream& os, FeedbackSlot slot) {
FeedbackSlot slot) { // NOLINT
FeedbackNexus nexus(*this, slot); FeedbackNexus nexus(*this, slot);
nexus.Print(os); nexus.Print(os);
} }
void FeedbackNexus::Print(std::ostream& os) { // NOLINT void FeedbackNexus::Print(std::ostream& os) {
switch (kind()) { switch (kind()) {
case FeedbackSlotKind::kCall: case FeedbackSlotKind::kCall:
case FeedbackSlotKind::kCloneObject: case FeedbackSlotKind::kCloneObject:
...@@ -1206,7 +1203,7 @@ void FeedbackNexus::Print(std::ostream& os) { // NOLINT ...@@ -1206,7 +1203,7 @@ void FeedbackNexus::Print(std::ostream& os) { // NOLINT
} }
} }
void Oddball::OddballPrint(std::ostream& os) { // NOLINT void Oddball::OddballPrint(std::ostream& os) {
PrintHeapObjectHeaderWithoutMap(*this, os, "Oddball"); PrintHeapObjectHeaderWithoutMap(*this, os, "Oddball");
os << ": "; os << ": ";
String s = to_string(); String s = to_string();
...@@ -1216,42 +1213,39 @@ void Oddball::OddballPrint(std::ostream& os) { // NOLINT ...@@ -1216,42 +1213,39 @@ void Oddball::OddballPrint(std::ostream& os) { // NOLINT
os << std::endl; os << std::endl;
} }
void JSAsyncFunctionObject::JSAsyncFunctionObjectPrint( void JSAsyncFunctionObject::JSAsyncFunctionObjectPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
JSGeneratorObjectPrint(os); JSGeneratorObjectPrint(os);
} }
void JSAsyncGeneratorObject::JSAsyncGeneratorObjectPrint( void JSAsyncGeneratorObject::JSAsyncGeneratorObjectPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
JSGeneratorObjectPrint(os); JSGeneratorObjectPrint(os);
} }
void JSArgumentsObject::JSArgumentsObjectPrint(std::ostream& os) { // NOLINT void JSArgumentsObject::JSArgumentsObjectPrint(std::ostream& os) {
JSObjectPrint(os); JSObjectPrint(os);
} }
void JSStringIterator::JSStringIteratorPrint(std::ostream& os) { // NOLINT void JSStringIterator::JSStringIteratorPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSStringIterator"); JSObjectPrintHeader(os, *this, "JSStringIterator");
os << "\n - string: " << Brief(string()); os << "\n - string: " << Brief(string());
os << "\n - index: " << index(); os << "\n - index: " << index();
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorPrint( void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, *this, "JSAsyncFromSyncIterator"); JSObjectPrintHeader(os, *this, "JSAsyncFromSyncIterator");
os << "\n - sync_iterator: " << Brief(sync_iterator()); os << "\n - sync_iterator: " << Brief(sync_iterator());
os << "\n - next: " << Brief(next()); os << "\n - next: " << Brief(next());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSPrimitiveWrapper::JSPrimitiveWrapperPrint(std::ostream& os) { // NOLINT void JSPrimitiveWrapper::JSPrimitiveWrapperPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSPrimitiveWrapper"); JSObjectPrintHeader(os, *this, "JSPrimitiveWrapper");
os << "\n - value: " << Brief(value()); os << "\n - value: " << Brief(value());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT void JSMessageObject::JSMessageObjectPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSMessageObject"); JSObjectPrintHeader(os, *this, "JSMessageObject");
os << "\n - type: " << static_cast<int>(type()); os << "\n - type: " << static_cast<int>(type());
os << "\n - arguments: " << Brief(argument()); os << "\n - arguments: " << Brief(argument());
...@@ -1262,7 +1256,7 @@ void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT ...@@ -1262,7 +1256,7 @@ void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void String::StringPrint(std::ostream& os) { // NOLINT void String::StringPrint(std::ostream& os) {
PrintHeapObjectHeaderWithoutMap(*this, os, "String"); PrintHeapObjectHeaderWithoutMap(*this, os, "String");
os << ": "; os << ": ";
os << PrefixForDebugPrint(); os << PrefixForDebugPrint();
...@@ -1270,7 +1264,7 @@ void String::StringPrint(std::ostream& os) { // NOLINT ...@@ -1270,7 +1264,7 @@ void String::StringPrint(std::ostream& os) { // NOLINT
os << SuffixForDebugPrint(); os << SuffixForDebugPrint();
} }
void Name::NamePrint(std::ostream& os) { // NOLINT void Name::NamePrint(std::ostream& os) {
if (IsString()) { if (IsString()) {
String::cast(*this).StringPrint(os); String::cast(*this).StringPrint(os);
} else { } else {
...@@ -1281,7 +1275,7 @@ void Name::NamePrint(std::ostream& os) { // NOLINT ...@@ -1281,7 +1275,7 @@ void Name::NamePrint(std::ostream& os) { // NOLINT
static const char* const weekdays[] = {"???", "Sun", "Mon", "Tue", static const char* const weekdays[] = {"???", "Sun", "Mon", "Tue",
"Wed", "Thu", "Fri", "Sat"}; "Wed", "Thu", "Fri", "Sat"};
void JSDate::JSDatePrint(std::ostream& os) { // NOLINT void JSDate::JSDatePrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSDate"); JSObjectPrintHeader(os, *this, "JSDate");
os << "\n - value: " << Brief(value()); os << "\n - value: " << Brief(value());
if (!year().IsSmi()) { if (!year().IsSmi()) {
...@@ -1302,7 +1296,7 @@ void JSDate::JSDatePrint(std::ostream& os) { // NOLINT ...@@ -1302,7 +1296,7 @@ void JSDate::JSDatePrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSProxy::JSProxyPrint(std::ostream& os) { // NOLINT void JSProxy::JSProxyPrint(std::ostream& os) {
PrintHeader(os, "JSProxy"); PrintHeader(os, "JSProxy");
os << "\n - target: "; os << "\n - target: ";
target().ShortPrint(os); target().ShortPrint(os);
...@@ -1311,31 +1305,31 @@ void JSProxy::JSProxyPrint(std::ostream& os) { // NOLINT ...@@ -1311,31 +1305,31 @@ void JSProxy::JSProxyPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void JSSet::JSSetPrint(std::ostream& os) { // NOLINT void JSSet::JSSetPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSSet"); JSObjectPrintHeader(os, *this, "JSSet");
os << " - table: " << Brief(table()); os << " - table: " << Brief(table());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSMap::JSMapPrint(std::ostream& os) { // NOLINT void JSMap::JSMapPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSMap"); JSObjectPrintHeader(os, *this, "JSMap");
os << " - table: " << Brief(table()); os << " - table: " << Brief(table());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSCollectionIterator::JSCollectionIteratorPrint( void JSCollectionIterator::JSCollectionIteratorPrint(std::ostream& os,
std::ostream& os, const char* name) { // NOLINT const char* name) {
JSObjectPrintHeader(os, *this, name); JSObjectPrintHeader(os, *this, name);
os << "\n - table: " << Brief(table()); os << "\n - table: " << Brief(table());
os << "\n - index: " << Brief(index()); os << "\n - index: " << Brief(index());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSSetIterator::JSSetIteratorPrint(std::ostream& os) { // NOLINT void JSSetIterator::JSSetIteratorPrint(std::ostream& os) {
JSCollectionIteratorPrint(os, "JSSetIterator"); JSCollectionIteratorPrint(os, "JSSetIterator");
} }
void JSMapIterator::JSMapIteratorPrint(std::ostream& os) { // NOLINT void JSMapIterator::JSMapIteratorPrint(std::ostream& os) {
JSCollectionIteratorPrint(os, "JSMapIterator"); JSCollectionIteratorPrint(os, "JSMapIterator");
} }
...@@ -1377,19 +1371,19 @@ void JSFinalizationRegistry::JSFinalizationRegistryPrint(std::ostream& os) { ...@@ -1377,19 +1371,19 @@ void JSFinalizationRegistry::JSFinalizationRegistryPrint(std::ostream& os) {
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSWeakMap::JSWeakMapPrint(std::ostream& os) { // NOLINT void JSWeakMap::JSWeakMapPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSWeakMap"); JSObjectPrintHeader(os, *this, "JSWeakMap");
os << "\n - table: " << Brief(table()); os << "\n - table: " << Brief(table());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT void JSWeakSet::JSWeakSetPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSWeakSet"); JSObjectPrintHeader(os, *this, "JSWeakSet");
os << "\n - table: " << Brief(table()); os << "\n - table: " << Brief(table());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSArrayBuffer"); JSObjectPrintHeader(os, *this, "JSArrayBuffer");
os << "\n - backing_store: " << backing_store(); os << "\n - backing_store: " << backing_store();
os << "\n - byte_length: " << byte_length(); os << "\n - byte_length: " << byte_length();
...@@ -1400,7 +1394,7 @@ void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT ...@@ -1400,7 +1394,7 @@ void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this, !was_detached()); JSObjectPrintBody(os, *this, !was_detached());
} }
void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT void JSTypedArray::JSTypedArrayPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSTypedArray"); JSObjectPrintHeader(os, *this, "JSTypedArray");
os << "\n - buffer: " << Brief(buffer()); os << "\n - buffer: " << Brief(buffer());
os << "\n - byte_offset: " << byte_offset(); os << "\n - byte_offset: " << byte_offset();
...@@ -1428,7 +1422,7 @@ void JSArrayIterator::JSArrayIteratorPrint(std::ostream& os) { // NOLING ...@@ -1428,7 +1422,7 @@ void JSArrayIterator::JSArrayIteratorPrint(std::ostream& os) { // NOLING
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT void JSDataView::JSDataViewPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSDataView"); JSObjectPrintHeader(os, *this, "JSDataView");
os << "\n - buffer =" << Brief(buffer()); os << "\n - buffer =" << Brief(buffer());
os << "\n - byte_offset: " << byte_offset(); os << "\n - byte_offset: " << byte_offset();
...@@ -1441,7 +1435,7 @@ void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT ...@@ -1441,7 +1435,7 @@ void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this, !WasDetached()); JSObjectPrintBody(os, *this, !WasDetached());
} }
void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) { // NOLINT void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSBoundFunction"); JSObjectPrintHeader(os, *this, "JSBoundFunction");
os << "\n - bound_target_function: " << Brief(bound_target_function()); os << "\n - bound_target_function: " << Brief(bound_target_function());
os << "\n - bound_this: " << Brief(bound_this()); os << "\n - bound_this: " << Brief(bound_this());
...@@ -1449,7 +1443,7 @@ void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) { // NOLINT ...@@ -1449,7 +1443,7 @@ void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT void JSFunction::JSFunctionPrint(std::ostream& os) {
Isolate* isolate = GetIsolate(); Isolate* isolate = GetIsolate();
JSObjectPrintHeader(os, *this, "Function"); JSObjectPrintHeader(os, *this, "Function");
os << "\n - function prototype: "; os << "\n - function prototype: ";
...@@ -1525,7 +1519,7 @@ void SharedFunctionInfo::PrintSourceCode(std::ostream& os) { ...@@ -1525,7 +1519,7 @@ void SharedFunctionInfo::PrintSourceCode(std::ostream& os) {
} }
} }
void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) {
PrintHeader(os, "SharedFunctionInfo"); PrintHeader(os, "SharedFunctionInfo");
os << "\n - name: "; os << "\n - name: ";
if (HasSharedName()) { if (HasSharedName()) {
...@@ -1576,7 +1570,7 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT ...@@ -1576,7 +1570,7 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) { // NOLINT void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSGlobalProxy"); JSObjectPrintHeader(os, *this, "JSGlobalProxy");
if (!GetIsolate()->bootstrapper()->IsActive()) { if (!GetIsolate()->bootstrapper()->IsActive()) {
os << "\n - native context: " << Brief(native_context()); os << "\n - native context: " << Brief(native_context());
...@@ -1584,7 +1578,7 @@ void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) { // NOLINT ...@@ -1584,7 +1578,7 @@ void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) { // NOLINT void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSGlobalObject"); JSObjectPrintHeader(os, *this, "JSGlobalObject");
if (!GetIsolate()->bootstrapper()->IsActive()) { if (!GetIsolate()->bootstrapper()->IsActive()) {
os << "\n - native context: " << Brief(native_context()); os << "\n - native context: " << Brief(native_context());
...@@ -1593,7 +1587,7 @@ void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) { // NOLINT ...@@ -1593,7 +1587,7 @@ void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void PropertyCell::PropertyCellPrint(std::ostream& os) { // NOLINT void PropertyCell::PropertyCellPrint(std::ostream& os) {
PrintHeader(os, "PropertyCell"); PrintHeader(os, "PropertyCell");
os << "\n - name: "; os << "\n - name: ";
name().NamePrint(os); name().NamePrint(os);
...@@ -1605,7 +1599,7 @@ void PropertyCell::PropertyCellPrint(std::ostream& os) { // NOLINT ...@@ -1605,7 +1599,7 @@ void PropertyCell::PropertyCellPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void Code::CodePrint(std::ostream& os) { // NOLINT void Code::CodePrint(std::ostream& os) {
PrintHeader(os, "Code"); PrintHeader(os, "Code");
os << "\n"; os << "\n";
#ifdef ENABLE_DISASSEMBLER #ifdef ENABLE_DISASSEMBLER
...@@ -1613,26 +1607,26 @@ void Code::CodePrint(std::ostream& os) { // NOLINT ...@@ -1613,26 +1607,26 @@ void Code::CodePrint(std::ostream& os) { // NOLINT
#endif #endif
} }
void CodeDataContainer::CodeDataContainerPrint(std::ostream& os) { // NOLINT void CodeDataContainer::CodeDataContainerPrint(std::ostream& os) {
PrintHeader(os, "CodeDataContainer"); PrintHeader(os, "CodeDataContainer");
os << "\n - kind_specific_flags: " << kind_specific_flags(); os << "\n - kind_specific_flags: " << kind_specific_flags();
os << "\n"; os << "\n";
} }
void Foreign::ForeignPrint(std::ostream& os) { // NOLINT void Foreign::ForeignPrint(std::ostream& os) {
PrintHeader(os, "Foreign"); PrintHeader(os, "Foreign");
os << "\n - foreign address : " << reinterpret_cast<void*>(foreign_address()); os << "\n - foreign address : " << reinterpret_cast<void*>(foreign_address());
os << "\n"; os << "\n";
} }
void CallbackTask::CallbackTaskPrint(std::ostream& os) { // NOLINT void CallbackTask::CallbackTaskPrint(std::ostream& os) {
PrintHeader(os, "CallbackTask"); PrintHeader(os, "CallbackTask");
os << "\n - callback: " << Brief(callback()); os << "\n - callback: " << Brief(callback());
os << "\n - data: " << Brief(data()); os << "\n - data: " << Brief(data());
os << "\n"; os << "\n";
} }
void CallableTask::CallableTaskPrint(std::ostream& os) { // NOLINT void CallableTask::CallableTaskPrint(std::ostream& os) {
PrintHeader(os, "CallableTask"); PrintHeader(os, "CallableTask");
os << "\n - context: " << Brief(context()); os << "\n - context: " << Brief(context());
os << "\n - callable: " << Brief(callable()); os << "\n - callable: " << Brief(callable());
...@@ -1640,7 +1634,7 @@ void CallableTask::CallableTaskPrint(std::ostream& os) { // NOLINT ...@@ -1640,7 +1634,7 @@ void CallableTask::CallableTaskPrint(std::ostream& os) { // NOLINT
} }
void PromiseFulfillReactionJobTask::PromiseFulfillReactionJobTaskPrint( void PromiseFulfillReactionJobTask::PromiseFulfillReactionJobTaskPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "PromiseFulfillReactionJobTask"); PrintHeader(os, "PromiseFulfillReactionJobTask");
os << "\n - argument: " << Brief(argument()); os << "\n - argument: " << Brief(argument());
os << "\n - context: " << Brief(context()); os << "\n - context: " << Brief(context());
...@@ -1650,7 +1644,7 @@ void PromiseFulfillReactionJobTask::PromiseFulfillReactionJobTaskPrint( ...@@ -1650,7 +1644,7 @@ void PromiseFulfillReactionJobTask::PromiseFulfillReactionJobTaskPrint(
} }
void PromiseRejectReactionJobTask::PromiseRejectReactionJobTaskPrint( void PromiseRejectReactionJobTask::PromiseRejectReactionJobTaskPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "PromiseRejectReactionJobTask"); PrintHeader(os, "PromiseRejectReactionJobTask");
os << "\n - argument: " << Brief(argument()); os << "\n - argument: " << Brief(argument());
os << "\n - context: " << Brief(context()); os << "\n - context: " << Brief(context());
...@@ -1660,7 +1654,7 @@ void PromiseRejectReactionJobTask::PromiseRejectReactionJobTaskPrint( ...@@ -1660,7 +1654,7 @@ void PromiseRejectReactionJobTask::PromiseRejectReactionJobTaskPrint(
} }
void PromiseResolveThenableJobTask::PromiseResolveThenableJobTaskPrint( void PromiseResolveThenableJobTask::PromiseResolveThenableJobTaskPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "PromiseResolveThenableJobTask"); PrintHeader(os, "PromiseResolveThenableJobTask");
os << "\n - context: " << Brief(context()); os << "\n - context: " << Brief(context());
os << "\n - promise_to_resolve: " << Brief(promise_to_resolve()); os << "\n - promise_to_resolve: " << Brief(promise_to_resolve());
...@@ -1669,7 +1663,7 @@ void PromiseResolveThenableJobTask::PromiseResolveThenableJobTaskPrint( ...@@ -1669,7 +1663,7 @@ void PromiseResolveThenableJobTask::PromiseResolveThenableJobTaskPrint(
os << "\n"; os << "\n";
} }
void PromiseCapability::PromiseCapabilityPrint(std::ostream& os) { // NOLINT void PromiseCapability::PromiseCapabilityPrint(std::ostream& os) {
PrintHeader(os, "PromiseCapability"); PrintHeader(os, "PromiseCapability");
os << "\n - promise: " << Brief(promise()); os << "\n - promise: " << Brief(promise());
os << "\n - resolve: " << Brief(resolve()); os << "\n - resolve: " << Brief(resolve());
...@@ -1677,7 +1671,7 @@ void PromiseCapability::PromiseCapabilityPrint(std::ostream& os) { // NOLINT ...@@ -1677,7 +1671,7 @@ void PromiseCapability::PromiseCapabilityPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void PromiseReaction::PromiseReactionPrint(std::ostream& os) { // NOLINT void PromiseReaction::PromiseReactionPrint(std::ostream& os) {
PrintHeader(os, "PromiseReaction"); PrintHeader(os, "PromiseReaction");
os << "\n - next: " << Brief(next()); os << "\n - next: " << Brief(next());
os << "\n - reject_handler: " << Brief(reject_handler()); os << "\n - reject_handler: " << Brief(reject_handler());
...@@ -1686,8 +1680,7 @@ void PromiseReaction::PromiseReactionPrint(std::ostream& os) { // NOLINT ...@@ -1686,8 +1680,7 @@ void PromiseReaction::PromiseReactionPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void AsyncGeneratorRequest::AsyncGeneratorRequestPrint( void AsyncGeneratorRequest::AsyncGeneratorRequestPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
PrintHeader(os, "AsyncGeneratorRequest"); PrintHeader(os, "AsyncGeneratorRequest");
const char* mode = "Invalid!"; const char* mode = "Invalid!";
switch (resume_mode()) { switch (resume_mode()) {
...@@ -1708,7 +1701,7 @@ void AsyncGeneratorRequest::AsyncGeneratorRequestPrint( ...@@ -1708,7 +1701,7 @@ void AsyncGeneratorRequest::AsyncGeneratorRequestPrint(
} }
void SourceTextModuleInfoEntry::SourceTextModuleInfoEntryPrint( void SourceTextModuleInfoEntry::SourceTextModuleInfoEntryPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "SourceTextModuleInfoEntry"); PrintHeader(os, "SourceTextModuleInfoEntry");
os << "\n - export_name: " << Brief(export_name()); os << "\n - export_name: " << Brief(export_name());
os << "\n - local_name: " << Brief(local_name()); os << "\n - local_name: " << Brief(local_name());
...@@ -1726,7 +1719,7 @@ static void PrintModuleFields(Module module, std::ostream& os) { ...@@ -1726,7 +1719,7 @@ static void PrintModuleFields(Module module, std::ostream& os) {
os << "\n - exception: " << Brief(module.exception()); os << "\n - exception: " << Brief(module.exception());
} }
void Module::ModulePrint(std::ostream& os) { // NOLINT void Module::ModulePrint(std::ostream& os) {
if (this->IsSourceTextModule()) { if (this->IsSourceTextModule()) {
SourceTextModule::cast(*this).SourceTextModulePrint(os); SourceTextModule::cast(*this).SourceTextModulePrint(os);
} else if (this->IsSyntheticModule()) { } else if (this->IsSyntheticModule()) {
...@@ -1736,7 +1729,7 @@ void Module::ModulePrint(std::ostream& os) { // NOLINT ...@@ -1736,7 +1729,7 @@ void Module::ModulePrint(std::ostream& os) { // NOLINT
} }
} }
void SourceTextModule::SourceTextModulePrint(std::ostream& os) { // NOLINT void SourceTextModule::SourceTextModulePrint(std::ostream& os) {
PrintHeader(os, "SourceTextModule"); PrintHeader(os, "SourceTextModule");
PrintModuleFields(*this, os); PrintModuleFields(*this, os);
os << "\n - sfi/code/info: " << Brief(code()); os << "\n - sfi/code/info: " << Brief(code());
...@@ -1750,7 +1743,7 @@ void SourceTextModule::SourceTextModulePrint(std::ostream& os) { // NOLINT ...@@ -1750,7 +1743,7 @@ void SourceTextModule::SourceTextModulePrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void SyntheticModule::SyntheticModulePrint(std::ostream& os) { // NOLINT void SyntheticModule::SyntheticModulePrint(std::ostream& os) {
PrintHeader(os, "SyntheticModule"); PrintHeader(os, "SyntheticModule");
PrintModuleFields(*this, os); PrintModuleFields(*this, os);
os << "\n - export_names: " << Brief(export_names()); os << "\n - export_names: " << Brief(export_names());
...@@ -1758,13 +1751,13 @@ void SyntheticModule::SyntheticModulePrint(std::ostream& os) { // NOLINT ...@@ -1758,13 +1751,13 @@ void SyntheticModule::SyntheticModulePrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void JSModuleNamespace::JSModuleNamespacePrint(std::ostream& os) { // NOLINT void JSModuleNamespace::JSModuleNamespacePrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSModuleNamespace"); JSObjectPrintHeader(os, *this, "JSModuleNamespace");
os << "\n - module: " << Brief(module()); os << "\n - module: " << Brief(module());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) {
PrintHeader(os, "PrototypeInfo"); PrintHeader(os, "PrototypeInfo");
os << "\n - module namespace: " << Brief(module_namespace()); os << "\n - module namespace: " << Brief(module_namespace());
os << "\n - prototype users: " << Brief(prototype_users()); os << "\n - prototype users: " << Brief(prototype_users());
...@@ -1774,7 +1767,7 @@ void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT ...@@ -1774,7 +1767,7 @@ void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void ClassPositions::ClassPositionsPrint(std::ostream& os) { // NOLINT void ClassPositions::ClassPositionsPrint(std::ostream& os) {
PrintHeader(os, "ClassPositions"); PrintHeader(os, "ClassPositions");
os << "\n - start position: " << start(); os << "\n - start position: " << start();
os << "\n - end position: " << end(); os << "\n - end position: " << end();
...@@ -1782,7 +1775,7 @@ void ClassPositions::ClassPositionsPrint(std::ostream& os) { // NOLINT ...@@ -1782,7 +1775,7 @@ void ClassPositions::ClassPositionsPrint(std::ostream& os) { // NOLINT
} }
void ArrayBoilerplateDescription::ArrayBoilerplateDescriptionPrint( void ArrayBoilerplateDescription::ArrayBoilerplateDescriptionPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "ArrayBoilerplateDescription"); PrintHeader(os, "ArrayBoilerplateDescription");
os << "\n - elements kind: " << ElementsKindToString(elements_kind()); os << "\n - elements kind: " << ElementsKindToString(elements_kind());
os << "\n - constant elements: " << Brief(constant_elements()); os << "\n - constant elements: " << Brief(constant_elements());
...@@ -1790,7 +1783,7 @@ void ArrayBoilerplateDescription::ArrayBoilerplateDescriptionPrint( ...@@ -1790,7 +1783,7 @@ void ArrayBoilerplateDescription::ArrayBoilerplateDescriptionPrint(
} }
void RegExpBoilerplateDescription::RegExpBoilerplateDescriptionPrint( void RegExpBoilerplateDescription::RegExpBoilerplateDescriptionPrint(
std::ostream& os) { // NOLINT std::ostream& os) {
PrintHeader(os, "RegExpBoilerplateDescription"); PrintHeader(os, "RegExpBoilerplateDescription");
os << "\n - data: " << Brief(data()); os << "\n - data: " << Brief(data());
os << "\n - source: " << Brief(source()); os << "\n - source: " << Brief(source());
...@@ -1799,7 +1792,7 @@ void RegExpBoilerplateDescription::RegExpBoilerplateDescriptionPrint( ...@@ -1799,7 +1792,7 @@ void RegExpBoilerplateDescription::RegExpBoilerplateDescriptionPrint(
} }
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
void AsmWasmData::AsmWasmDataPrint(std::ostream& os) { // NOLINT void AsmWasmData::AsmWasmDataPrint(std::ostream& os) {
PrintHeader(os, "AsmWasmData"); PrintHeader(os, "AsmWasmData");
os << "\n - native module: " << Brief(managed_native_module()); os << "\n - native module: " << Brief(managed_native_module());
os << "\n - export_wrappers: " << Brief(export_wrappers()); os << "\n - export_wrappers: " << Brief(export_wrappers());
...@@ -1807,13 +1800,13 @@ void AsmWasmData::AsmWasmDataPrint(std::ostream& os) { // NOLINT ...@@ -1807,13 +1800,13 @@ void AsmWasmData::AsmWasmDataPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmTypeInfo::WasmTypeInfoPrint(std::ostream& os) { // NOLINT void WasmTypeInfo::WasmTypeInfoPrint(std::ostream& os) {
PrintHeader(os, "WasmTypeInfo"); PrintHeader(os, "WasmTypeInfo");
os << "\n - type address: " << reinterpret_cast<void*>(foreign_address()); os << "\n - type address: " << reinterpret_cast<void*>(foreign_address());
os << "\n"; os << "\n";
} }
void WasmStruct::WasmStructPrint(std::ostream& os) { // NOLINT void WasmStruct::WasmStructPrint(std::ostream& os) {
PrintHeader(os, "WasmStruct"); PrintHeader(os, "WasmStruct");
wasm::StructType* struct_type = type(); wasm::StructType* struct_type = type();
os << "\n - fields (" << struct_type->field_count() << "):"; os << "\n - fields (" << struct_type->field_count() << "):";
...@@ -1851,7 +1844,7 @@ void WasmStruct::WasmStructPrint(std::ostream& os) { // NOLINT ...@@ -1851,7 +1844,7 @@ void WasmStruct::WasmStructPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmArray::WasmArrayPrint(std::ostream& os) { // NOLINT void WasmArray::WasmArrayPrint(std::ostream& os) {
PrintHeader(os, "WasmArray"); PrintHeader(os, "WasmArray");
wasm::ArrayType* array_type = type(); wasm::ArrayType* array_type = type();
uint32_t len = length(); uint32_t len = length();
...@@ -1891,13 +1884,13 @@ void WasmArray::WasmArrayPrint(std::ostream& os) { // NOLINT ...@@ -1891,13 +1884,13 @@ void WasmArray::WasmArrayPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmExceptionTag::WasmExceptionTagPrint(std::ostream& os) { // NOLINT void WasmExceptionTag::WasmExceptionTagPrint(std::ostream& os) {
PrintHeader(os, "WasmExceptionTag"); PrintHeader(os, "WasmExceptionTag");
os << "\n - index: " << index(); os << "\n - index: " << index();
os << "\n"; os << "\n";
} }
void WasmInstanceObject::WasmInstanceObjectPrint(std::ostream& os) { // NOLINT void WasmInstanceObject::WasmInstanceObjectPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "WasmInstanceObject"); JSObjectPrintHeader(os, *this, "WasmInstanceObject");
os << "\n - module_object: " << Brief(module_object()); os << "\n - module_object: " << Brief(module_object());
os << "\n - exports_object: " << Brief(exports_object()); os << "\n - exports_object: " << Brief(exports_object());
...@@ -1945,13 +1938,12 @@ void WasmInstanceObject::WasmInstanceObjectPrint(std::ostream& os) { // NOLINT ...@@ -1945,13 +1938,12 @@ void WasmInstanceObject::WasmInstanceObjectPrint(std::ostream& os) { // NOLINT
} }
// Never called directly, as WasmFunctionData is an "abstract" class. // Never called directly, as WasmFunctionData is an "abstract" class.
void WasmFunctionData::WasmFunctionDataPrint(std::ostream& os) { // NOLINT void WasmFunctionData::WasmFunctionDataPrint(std::ostream& os) {
os << "\n - target: " << reinterpret_cast<void*>(foreign_address()); os << "\n - target: " << reinterpret_cast<void*>(foreign_address());
os << "\n - ref: " << Brief(ref()); os << "\n - ref: " << Brief(ref());
} }
void WasmExportedFunctionData::WasmExportedFunctionDataPrint( void WasmExportedFunctionData::WasmExportedFunctionDataPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
PrintHeader(os, "WasmExportedFunctionData"); PrintHeader(os, "WasmExportedFunctionData");
WasmFunctionDataPrint(os); WasmFunctionDataPrint(os);
os << "\n - wrapper_code: " << Brief(wrapper_code()); os << "\n - wrapper_code: " << Brief(wrapper_code());
...@@ -1962,7 +1954,7 @@ void WasmExportedFunctionData::WasmExportedFunctionDataPrint( ...@@ -1962,7 +1954,7 @@ void WasmExportedFunctionData::WasmExportedFunctionDataPrint(
os << "\n"; os << "\n";
} }
void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) { // NOLINT void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) {
PrintHeader(os, "WasmJSFunctionData"); PrintHeader(os, "WasmJSFunctionData");
WasmFunctionDataPrint(os); WasmFunctionDataPrint(os);
os << "\n - wrapper_code: " << Brief(wrapper_code()); os << "\n - wrapper_code: " << Brief(wrapper_code());
...@@ -1973,7 +1965,7 @@ void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) { // NOLINT ...@@ -1973,7 +1965,7 @@ void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) {
PrintHeader(os, "WasmModuleObject"); PrintHeader(os, "WasmModuleObject");
os << "\n - module: " << module(); os << "\n - module: " << module();
os << "\n - native module: " << native_module(); os << "\n - native module: " << native_module();
...@@ -1982,7 +1974,7 @@ void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT ...@@ -1982,7 +1974,7 @@ void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmTableObject::WasmTableObjectPrint(std::ostream& os) { // NOLINT void WasmTableObject::WasmTableObjectPrint(std::ostream& os) {
PrintHeader(os, "WasmTableObject"); PrintHeader(os, "WasmTableObject");
os << "\n - elements: " << Brief(elements()); os << "\n - elements: " << Brief(elements());
os << "\n - maximum_length: " << Brief(maximum_length()); os << "\n - maximum_length: " << Brief(maximum_length());
...@@ -1991,7 +1983,7 @@ void WasmTableObject::WasmTableObjectPrint(std::ostream& os) { // NOLINT ...@@ -1991,7 +1983,7 @@ void WasmTableObject::WasmTableObjectPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmGlobalObject::WasmGlobalObjectPrint(std::ostream& os) { // NOLINT void WasmGlobalObject::WasmGlobalObjectPrint(std::ostream& os) {
PrintHeader(os, "WasmGlobalObject"); PrintHeader(os, "WasmGlobalObject");
if (type().is_reference()) { if (type().is_reference()) {
os << "\n - tagged_buffer: " << Brief(tagged_buffer()); os << "\n - tagged_buffer: " << Brief(tagged_buffer());
...@@ -2006,7 +1998,7 @@ void WasmGlobalObject::WasmGlobalObjectPrint(std::ostream& os) { // NOLINT ...@@ -2006,7 +1998,7 @@ void WasmGlobalObject::WasmGlobalObjectPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmMemoryObject::WasmMemoryObjectPrint(std::ostream& os) { // NOLINT void WasmMemoryObject::WasmMemoryObjectPrint(std::ostream& os) {
PrintHeader(os, "WasmMemoryObject"); PrintHeader(os, "WasmMemoryObject");
os << "\n - array_buffer: " << Brief(array_buffer()); os << "\n - array_buffer: " << Brief(array_buffer());
os << "\n - maximum_pages: " << maximum_pages(); os << "\n - maximum_pages: " << maximum_pages();
...@@ -2014,8 +2006,7 @@ void WasmMemoryObject::WasmMemoryObjectPrint(std::ostream& os) { // NOLINT ...@@ -2014,8 +2006,7 @@ void WasmMemoryObject::WasmMemoryObjectPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmExceptionObject::WasmExceptionObjectPrint( void WasmExceptionObject::WasmExceptionObjectPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
PrintHeader(os, "WasmExceptionObject"); PrintHeader(os, "WasmExceptionObject");
os << "\n - serialized_signature: " << Brief(serialized_signature()); os << "\n - serialized_signature: " << Brief(serialized_signature());
os << "\n - exception_tag: " << Brief(exception_tag()); os << "\n - exception_tag: " << Brief(exception_tag());
...@@ -2036,14 +2027,14 @@ void WasmIndirectFunctionTable::WasmIndirectFunctionTablePrint( ...@@ -2036,14 +2027,14 @@ void WasmIndirectFunctionTable::WasmIndirectFunctionTablePrint(
os << "\n"; os << "\n";
} }
void WasmValueObject::WasmValueObjectPrint(std::ostream& os) { // NOLINT void WasmValueObject::WasmValueObjectPrint(std::ostream& os) {
PrintHeader(os, "WasmValueObject"); PrintHeader(os, "WasmValueObject");
os << "\n - value: " << Brief(value()); os << "\n - value: " << Brief(value());
os << "\n"; os << "\n";
} }
#endif // V8_ENABLE_WEBASSEMBLY #endif // V8_ENABLE_WEBASSEMBLY
void LoadHandler::LoadHandlerPrint(std::ostream& os) { // NOLINT void LoadHandler::LoadHandlerPrint(std::ostream& os) {
PrintHeader(os, "LoadHandler"); PrintHeader(os, "LoadHandler");
// TODO(ishell): implement printing based on handler kind // TODO(ishell): implement printing based on handler kind
os << "\n - handler: " << Brief(smi_handler()); os << "\n - handler: " << Brief(smi_handler());
...@@ -2061,7 +2052,7 @@ void LoadHandler::LoadHandlerPrint(std::ostream& os) { // NOLINT ...@@ -2061,7 +2052,7 @@ void LoadHandler::LoadHandlerPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void StoreHandler::StoreHandlerPrint(std::ostream& os) { // NOLINT void StoreHandler::StoreHandlerPrint(std::ostream& os) {
PrintHeader(os, "StoreHandler"); PrintHeader(os, "StoreHandler");
// TODO(ishell): implement printing based on handler kind // TODO(ishell): implement printing based on handler kind
os << "\n - handler: " << Brief(smi_handler()); os << "\n - handler: " << Brief(smi_handler());
...@@ -2079,14 +2070,14 @@ void StoreHandler::StoreHandlerPrint(std::ostream& os) { // NOLINT ...@@ -2079,14 +2070,14 @@ void StoreHandler::StoreHandlerPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void AccessorPair::AccessorPairPrint(std::ostream& os) { // NOLINT void AccessorPair::AccessorPairPrint(std::ostream& os) {
PrintHeader(os, "AccessorPair"); PrintHeader(os, "AccessorPair");
os << "\n - getter: " << Brief(getter()); os << "\n - getter: " << Brief(getter());
os << "\n - setter: " << Brief(setter()); os << "\n - setter: " << Brief(setter());
os << "\n"; os << "\n";
} }
void CallHandlerInfo::CallHandlerInfoPrint(std::ostream& os) { // NOLINT void CallHandlerInfo::CallHandlerInfoPrint(std::ostream& os) {
PrintHeader(os, "CallHandlerInfo"); PrintHeader(os, "CallHandlerInfo");
os << "\n - callback: " << Brief(callback()); os << "\n - callback: " << Brief(callback());
os << "\n - js_callback: " << Brief(js_callback()); os << "\n - js_callback: " << Brief(js_callback());
...@@ -2096,8 +2087,7 @@ void CallHandlerInfo::CallHandlerInfoPrint(std::ostream& os) { // NOLINT ...@@ -2096,8 +2087,7 @@ void CallHandlerInfo::CallHandlerInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void FunctionTemplateInfo::FunctionTemplateInfoPrint( void FunctionTemplateInfo::FunctionTemplateInfoPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
PrintHeader(os, "FunctionTemplateInfo"); PrintHeader(os, "FunctionTemplateInfo");
os << "\n - class name: " << Brief(class_name()); os << "\n - class name: " << Brief(class_name());
os << "\n - tag: " << tag(); os << "\n - tag: " << tag();
...@@ -2114,7 +2104,7 @@ void FunctionTemplateInfo::FunctionTemplateInfoPrint( ...@@ -2114,7 +2104,7 @@ void FunctionTemplateInfo::FunctionTemplateInfoPrint(
os << "\n"; os << "\n";
} }
void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) { // NOLINT void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) {
PrintHeader(os, "ObjectTemplateInfo"); PrintHeader(os, "ObjectTemplateInfo");
os << "\n - tag: " << tag(); os << "\n - tag: " << tag();
os << "\n - serial_number: " << serial_number(); os << "\n - serial_number: " << serial_number();
...@@ -2126,7 +2116,7 @@ void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) { // NOLINT ...@@ -2126,7 +2116,7 @@ void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void AllocationSite::AllocationSitePrint(std::ostream& os) { // NOLINT void AllocationSite::AllocationSitePrint(std::ostream& os) {
PrintHeader(os, "AllocationSite"); PrintHeader(os, "AllocationSite");
if (this->HasWeakNext()) os << "\n - weak_next: " << Brief(weak_next()); if (this->HasWeakNext()) os << "\n - weak_next: " << Brief(weak_next());
os << "\n - dependent code: " << Brief(dependent_code()); os << "\n - dependent code: " << Brief(dependent_code());
...@@ -2149,7 +2139,7 @@ void AllocationSite::AllocationSitePrint(std::ostream& os) { // NOLINT ...@@ -2149,7 +2139,7 @@ void AllocationSite::AllocationSitePrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void AllocationMemento::AllocationMementoPrint(std::ostream& os) { // NOLINT void AllocationMemento::AllocationMementoPrint(std::ostream& os) {
PrintHeader(os, "AllocationMemento"); PrintHeader(os, "AllocationMemento");
os << "\n - allocation site: "; os << "\n - allocation site: ";
if (IsValid()) { if (IsValid()) {
...@@ -2159,7 +2149,7 @@ void AllocationMemento::AllocationMementoPrint(std::ostream& os) { // NOLINT ...@@ -2159,7 +2149,7 @@ void AllocationMemento::AllocationMementoPrint(std::ostream& os) { // NOLINT
} }
} }
void Script::ScriptPrint(std::ostream& os) { // NOLINT void Script::ScriptPrint(std::ostream& os) {
PrintHeader(os, "Script"); PrintHeader(os, "Script");
os << "\n - source: " << Brief(source()); os << "\n - source: " << Brief(source());
os << "\n - name: " << Brief(name()); os << "\n - name: " << Brief(name());
...@@ -2195,7 +2185,7 @@ void Script::ScriptPrint(std::ostream& os) { // NOLINT ...@@ -2195,7 +2185,7 @@ void Script::ScriptPrint(std::ostream& os) { // NOLINT
} }
#ifdef V8_INTL_SUPPORT #ifdef V8_INTL_SUPPORT
void JSV8BreakIterator::JSV8BreakIteratorPrint(std::ostream& os) { // NOLINT void JSV8BreakIterator::JSV8BreakIteratorPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSV8BreakIterator"); JSObjectPrintHeader(os, *this, "JSV8BreakIterator");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - break iterator: " << Brief(break_iterator()); os << "\n - break iterator: " << Brief(break_iterator());
...@@ -2208,14 +2198,14 @@ void JSV8BreakIterator::JSV8BreakIteratorPrint(std::ostream& os) { // NOLINT ...@@ -2208,14 +2198,14 @@ void JSV8BreakIterator::JSV8BreakIteratorPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void JSCollator::JSCollatorPrint(std::ostream& os) { // NOLINT void JSCollator::JSCollatorPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSCollator"); JSObjectPrintHeader(os, *this, "JSCollator");
os << "\n - icu collator: " << Brief(icu_collator()); os << "\n - icu collator: " << Brief(icu_collator());
os << "\n - bound compare: " << Brief(bound_compare()); os << "\n - bound compare: " << Brief(bound_compare());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSDateTimeFormat::JSDateTimeFormatPrint(std::ostream& os) { // NOLINT void JSDateTimeFormat::JSDateTimeFormatPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSDateTimeFormat"); JSObjectPrintHeader(os, *this, "JSDateTimeFormat");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - icu locale: " << Brief(icu_locale()); os << "\n - icu locale: " << Brief(icu_locale());
...@@ -2226,7 +2216,7 @@ void JSDateTimeFormat::JSDateTimeFormatPrint(std::ostream& os) { // NOLINT ...@@ -2226,7 +2216,7 @@ void JSDateTimeFormat::JSDateTimeFormatPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSDisplayNames::JSDisplayNamesPrint(std::ostream& os) { // NOLINT void JSDisplayNames::JSDisplayNamesPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSDisplayNames"); JSObjectPrintHeader(os, *this, "JSDisplayNames");
os << "\n - internal: " << Brief(internal()); os << "\n - internal: " << Brief(internal());
os << "\n - style: " << StyleAsString(); os << "\n - style: " << StyleAsString();
...@@ -2234,7 +2224,7 @@ void JSDisplayNames::JSDisplayNamesPrint(std::ostream& os) { // NOLINT ...@@ -2234,7 +2224,7 @@ void JSDisplayNames::JSDisplayNamesPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSListFormat::JSListFormatPrint(std::ostream& os) { // NOLINT void JSListFormat::JSListFormatPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSListFormat"); JSObjectPrintHeader(os, *this, "JSListFormat");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - style: " << StyleAsString(); os << "\n - style: " << StyleAsString();
...@@ -2243,13 +2233,13 @@ void JSListFormat::JSListFormatPrint(std::ostream& os) { // NOLINT ...@@ -2243,13 +2233,13 @@ void JSListFormat::JSListFormatPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSLocale::JSLocalePrint(std::ostream& os) { // NOLINT void JSLocale::JSLocalePrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSLocale"); JSObjectPrintHeader(os, *this, "JSLocale");
os << "\n - icu locale: " << Brief(icu_locale()); os << "\n - icu locale: " << Brief(icu_locale());
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSNumberFormat::JSNumberFormatPrint(std::ostream& os) { // NOLINT void JSNumberFormat::JSNumberFormatPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSNumberFormat"); JSObjectPrintHeader(os, *this, "JSNumberFormat");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - icu_number_formatter: " << Brief(icu_number_formatter()); os << "\n - icu_number_formatter: " << Brief(icu_number_formatter());
...@@ -2257,7 +2247,7 @@ void JSNumberFormat::JSNumberFormatPrint(std::ostream& os) { // NOLINT ...@@ -2257,7 +2247,7 @@ void JSNumberFormat::JSNumberFormatPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSPluralRules::JSPluralRulesPrint(std::ostream& os) { // NOLINT void JSPluralRules::JSPluralRulesPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSPluralRules"); JSObjectPrintHeader(os, *this, "JSPluralRules");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - type: " << TypeAsString(); os << "\n - type: " << TypeAsString();
...@@ -2266,8 +2256,7 @@ void JSPluralRules::JSPluralRulesPrint(std::ostream& os) { // NOLINT ...@@ -2266,8 +2256,7 @@ void JSPluralRules::JSPluralRulesPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSRelativeTimeFormat::JSRelativeTimeFormatPrint( void JSRelativeTimeFormat::JSRelativeTimeFormatPrint(std::ostream& os) {
std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, *this, "JSRelativeTimeFormat"); JSObjectPrintHeader(os, *this, "JSRelativeTimeFormat");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - numberingSystem: " << Brief(numberingSystem()); os << "\n - numberingSystem: " << Brief(numberingSystem());
...@@ -2276,14 +2265,14 @@ void JSRelativeTimeFormat::JSRelativeTimeFormatPrint( ...@@ -2276,14 +2265,14 @@ void JSRelativeTimeFormat::JSRelativeTimeFormatPrint(
os << "\n"; os << "\n";
} }
void JSSegmentIterator::JSSegmentIteratorPrint(std::ostream& os) { // NOLINT void JSSegmentIterator::JSSegmentIteratorPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSSegmentIterator"); JSObjectPrintHeader(os, *this, "JSSegmentIterator");
os << "\n - icu break iterator: " << Brief(icu_break_iterator()); os << "\n - icu break iterator: " << Brief(icu_break_iterator());
os << "\n - granularity: " << GranularityAsString(GetIsolate()); os << "\n - granularity: " << GranularityAsString(GetIsolate());
os << "\n"; os << "\n";
} }
void JSSegmenter::JSSegmenterPrint(std::ostream& os) { // NOLINT void JSSegmenter::JSSegmenterPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSSegmenter"); JSObjectPrintHeader(os, *this, "JSSegmenter");
os << "\n - locale: " << Brief(locale()); os << "\n - locale: " << Brief(locale());
os << "\n - granularity: " << GranularityAsString(GetIsolate()); os << "\n - granularity: " << GranularityAsString(GetIsolate());
...@@ -2291,7 +2280,7 @@ void JSSegmenter::JSSegmenterPrint(std::ostream& os) { // NOLINT ...@@ -2291,7 +2280,7 @@ void JSSegmenter::JSSegmenterPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, *this); JSObjectPrintBody(os, *this);
} }
void JSSegments::JSSegmentsPrint(std::ostream& os) { // NOLINT void JSSegments::JSSegmentsPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSSegments"); JSObjectPrintHeader(os, *this, "JSSegments");
os << "\n - icu break iterator: " << Brief(icu_break_iterator()); os << "\n - icu break iterator: " << Brief(icu_break_iterator());
os << "\n - unicode string: " << Brief(unicode_string()); os << "\n - unicode string: " << Brief(unicode_string());
...@@ -2315,7 +2304,7 @@ void PrintScopeInfoList(ScopeInfo scope_info, std::ostream& os, ...@@ -2315,7 +2304,7 @@ void PrintScopeInfoList(ScopeInfo scope_info, std::ostream& os,
} }
} // namespace } // namespace
void ScopeInfo::ScopeInfoPrint(std::ostream& os) { // NOLINT void ScopeInfo::ScopeInfoPrint(std::ostream& os) {
PrintHeader(os, "ScopeInfo"); PrintHeader(os, "ScopeInfo");
if (IsEmpty()) { if (IsEmpty()) {
os << "\n - empty\n"; os << "\n - empty\n";
...@@ -2371,7 +2360,7 @@ void ScopeInfo::ScopeInfoPrint(std::ostream& os) { // NOLINT ...@@ -2371,7 +2360,7 @@ void ScopeInfo::ScopeInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) { // NOLINT void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) {
PrintHeader(os, "StackFrameInfo"); PrintHeader(os, "StackFrameInfo");
os << "\n - receiver_or_instance: " << Brief(receiver_or_instance()); os << "\n - receiver_or_instance: " << Brief(receiver_or_instance());
os << "\n - function: " << Brief(function()); os << "\n - function: " << Brief(function());
...@@ -2383,7 +2372,7 @@ void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) { // NOLINT ...@@ -2383,7 +2372,7 @@ void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void PreparseData::PreparseDataPrint(std::ostream& os) { // NOLINT void PreparseData::PreparseDataPrint(std::ostream& os) {
PrintHeader(os, "PreparseData"); PrintHeader(os, "PreparseData");
os << "\n - data_length: " << data_length(); os << "\n - data_length: " << data_length();
os << "\n - children_length: " << children_length(); os << "\n - children_length: " << children_length();
...@@ -2399,7 +2388,7 @@ void PreparseData::PreparseDataPrint(std::ostream& os) { // NOLINT ...@@ -2399,7 +2388,7 @@ void PreparseData::PreparseDataPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void InterpreterData::InterpreterDataPrint(std::ostream& os) { // NOLINT void InterpreterData::InterpreterDataPrint(std::ostream& os) {
PrintHeader(os, "InterpreterData"); PrintHeader(os, "InterpreterData");
os << "\n - bytecode_array: " << Brief(bytecode_array()); os << "\n - bytecode_array: " << Brief(bytecode_array());
os << "\n - interpreter_trampoline: " << Brief(interpreter_trampoline()); os << "\n - interpreter_trampoline: " << Brief(interpreter_trampoline());
...@@ -2494,7 +2483,7 @@ void Map::PrintMapDetails(std::ostream& os) { ...@@ -2494,7 +2483,7 @@ void Map::PrintMapDetails(std::ostream& os) {
instance_descriptors().PrintDescriptors(os); instance_descriptors().PrintDescriptors(os);
} }
void Map::MapPrint(std::ostream& os) { // NOLINT void Map::MapPrint(std::ostream& os) {
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
PrintHeader(os, "Map"); PrintHeader(os, "Map");
#else #else
...@@ -2676,7 +2665,7 @@ void TransitionArray::PrintInternal(std::ostream& os) { ...@@ -2676,7 +2665,7 @@ void TransitionArray::PrintInternal(std::ostream& os) {
os << "\n" << std::flush; os << "\n" << std::flush;
} }
void TransitionsAccessor::PrintTransitions(std::ostream& os) { // NOLINT void TransitionsAccessor::PrintTransitions(std::ostream& os) {
switch (encoding()) { switch (encoding()) {
case kPrototypeInfo: case kPrototypeInfo:
case kUninitialized: case kUninitialized:
...@@ -2744,7 +2733,7 @@ void TransitionsAccessor::PrintTransitionTree( ...@@ -2744,7 +2733,7 @@ void TransitionsAccessor::PrintTransitionTree(
} }
} }
void JSObject::PrintTransitions(std::ostream& os) { // NOLINT void JSObject::PrintTransitions(std::ostream& os) {
DisallowGarbageCollection no_gc; DisallowGarbageCollection no_gc;
TransitionsAccessor ta(GetIsolate(), map(), &no_gc); TransitionsAccessor ta(GetIsolate(), map(), &no_gc);
if (ta.NumberOfTransitions() == 0) return; if (ta.NumberOfTransitions() == 0) return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment