|
| 1 | +diff --git a/src/diagnostics/objects-printer.cc b/src/diagnostics/objects-printer.cc |
| 2 | +index 5b546e29926..45d7b50b7f5 100644 |
| 3 | +--- a/src/diagnostics/objects-printer.cc |
| 4 | ++++ b/src/diagnostics/objects-printer.cc |
| 5 | +@@ -1687,7 +1687,6 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { |
| 6 | + os << "\n - data: " << Brief(function_data(kAcquireLoad)); |
| 7 | + os << "\n - code (from data): "; |
| 8 | + os << Brief(GetCode()); |
| 9 | +- PrintSourceCode(os); |
| 10 | + // Script files are often large, thus only print their {Brief} representation. |
| 11 | + os << "\n - script: " << Brief(script()); |
| 12 | + os << "\n - function token position: " << function_token_position(); |
| 13 | +@@ -1710,6 +1709,10 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { |
| 14 | + os << "<none>"; |
| 15 | + } |
| 16 | + os << "\n"; |
| 17 | ++ os << "\nStart BytecodeArray\n"; |
| 18 | ++ this->GetActiveBytecodeArray().Disassemble(os); |
| 19 | ++ os << "\nEnd BytecodeArray\n"; |
| 20 | ++ os << std::flush; |
| 21 | + } |
| 22 | + |
| 23 | + void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) { |
| 24 | +diff --git a/src/objects/objects.cc b/src/objects/objects.cc |
| 25 | +index 559160358c1..420b3da2b66 100644 |
| 26 | +--- a/src/objects/objects.cc |
| 27 | ++++ b/src/objects/objects.cc |
| 28 | +@@ -1850,6 +1850,16 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { |
| 29 | + os << accumulator.ToCString().get(); |
| 30 | + return; |
| 31 | + } |
| 32 | ++ |
| 33 | ++ // Print array literal members instead of only "<AsmWasmData>" |
| 34 | ++ if (map(cage_base).instance_type() == ASM_WASM_DATA_TYPE) { |
| 35 | ++ os << "<ArrayBoilerplateDescription> "; |
| 36 | ++ ArrayBoilerplateDescription::cast(*this) |
| 37 | ++ .constant_elements() |
| 38 | ++ .HeapObjectShortPrint(os); |
| 39 | ++ return; |
| 40 | ++ } |
| 41 | ++ |
| 42 | + switch (map(cage_base).instance_type()) { |
| 43 | + case MAP_TYPE: { |
| 44 | + os << "<Map"; |
| 45 | +@@ -1936,14 +1946,24 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { |
| 46 | + break; |
| 47 | + case FIXED_ARRAY_TYPE: |
| 48 | + os << "<FixedArray[" << FixedArray::cast(*this).length() << "]>"; |
| 49 | ++ os << "\nStart FixedArray\n"; |
| 50 | ++ FixedArray::cast(*this).FixedArrayPrint(os); |
| 51 | ++ os << "\nEnd FixedArray\n"; |
| 52 | + break; |
| 53 | + case OBJECT_BOILERPLATE_DESCRIPTION_TYPE: |
| 54 | + os << "<ObjectBoilerplateDescription[" << FixedArray::cast(*this).length() |
| 55 | + << "]>"; |
| 56 | ++ os << "\nStart ObjectBoilerplateDescription\n"; |
| 57 | ++ ObjectBoilerplateDescription::cast(*this) |
| 58 | ++ .ObjectBoilerplateDescriptionPrint(os); |
| 59 | ++ os << "\nEnd ObjectBoilerplateDescription\n"; |
| 60 | + break; |
| 61 | + case FIXED_DOUBLE_ARRAY_TYPE: |
| 62 | + os << "<FixedDoubleArray[" << FixedDoubleArray::cast(*this).length() |
| 63 | + << "]>"; |
| 64 | ++ os << "\nStart FixedDoubleArray\n"; |
| 65 | ++ FixedDoubleArray::cast(*this).FixedDoubleArrayPrint(os); |
| 66 | ++ os << "\nEnd FixedDoubleArray\n"; |
| 67 | + break; |
| 68 | + case BYTE_ARRAY_TYPE: |
| 69 | + os << "<ByteArray[" << ByteArray::cast(*this).length() << "]>"; |
| 70 | +@@ -2022,6 +2042,9 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { |
| 71 | + } else { |
| 72 | + os << "<SharedFunctionInfo>"; |
| 73 | + } |
| 74 | ++ os << "\nStart SharedFunctionInfo\n"; |
| 75 | ++ shared.SharedFunctionInfoPrint(os); |
| 76 | ++ os << "\nEnd SharedFunctionInfo\n"; |
| 77 | + break; |
| 78 | + } |
| 79 | + case JS_MESSAGE_OBJECT_TYPE: |
| 80 | +diff --git a/src/objects/string.cc b/src/objects/string.cc |
| 81 | +index cd134f84055..285d55fda5e 100644 |
| 82 | +--- a/src/objects/string.cc |
| 83 | ++++ b/src/objects/string.cc |
| 84 | +@@ -477,13 +477,6 @@ void String::StringShortPrint(StringStream* accumulator) { |
| 85 | + accumulator->Add("<String[%u]: ", len); |
| 86 | + accumulator->Add(PrefixForDebugPrint()); |
| 87 | + |
| 88 | +- if (len > kMaxShortPrintLength) { |
| 89 | +- accumulator->Add("...<truncated>>"); |
| 90 | +- accumulator->Add(SuffixForDebugPrint()); |
| 91 | +- accumulator->Put('>'); |
| 92 | +- return; |
| 93 | +- } |
| 94 | +- |
| 95 | + PrintUC16(accumulator, 0, len); |
| 96 | + accumulator->Add(SuffixForDebugPrint()); |
| 97 | + accumulator->Put('>'); |
| 98 | +diff --git a/src/snapshot/code-serializer.cc b/src/snapshot/code-serializer.cc |
| 99 | +index 3f380e6a2ff..1f55cb9009a 100644 |
| 100 | +--- a/src/snapshot/code-serializer.cc |
| 101 | ++++ b/src/snapshot/code-serializer.cc |
| 102 | +@@ -466,6 +466,12 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize( |
| 103 | + if (FLAG_profile_deserialization) PrintF("[Deserializing failed]\n"); |
| 104 | + return MaybeHandle<SharedFunctionInfo>(); |
| 105 | + } |
| 106 | ++ |
| 107 | ++ std::cout << "\nStart SharedFunctionInfo\n"; |
| 108 | ++ result->SharedFunctionInfoPrint(std::cout); |
| 109 | ++ std::cout << "\nEnd SharedFunctionInfo\n"; |
| 110 | ++ std::cout << std::flush; |
| 111 | ++ |
| 112 | + BaselineBatchCompileIfSparkplugCompiled(isolate, |
| 113 | + Script::cast(result->script())); |
| 114 | + if (FLAG_profile_deserialization) { |
| 115 | +@@ -651,9 +657,7 @@ SerializedCodeData::SerializedCodeData(const std::vector<byte>* payload, |
| 116 | + |
| 117 | + SerializedCodeSanityCheckResult SerializedCodeData::SanityCheck( |
| 118 | + uint32_t expected_source_hash) const { |
| 119 | +- SerializedCodeSanityCheckResult result = SanityCheckWithoutSource(); |
| 120 | +- if (result != SerializedCodeSanityCheckResult::kSuccess) return result; |
| 121 | +- return SanityCheckJustSource(expected_source_hash); |
| 122 | ++ return SerializedCodeSanityCheckResult::kSuccess; |
| 123 | + } |
| 124 | + |
| 125 | + SerializedCodeSanityCheckResult SerializedCodeData::SanityCheckJustSource( |
| 126 | +diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc |
| 127 | +index 09fffbbed37..8ce3b2680ef 100644 |
| 128 | +--- a/src/snapshot/deserializer.cc |
| 129 | ++++ b/src/snapshot/deserializer.cc |
| 130 | +@@ -210,7 +210,6 @@ Deserializer<IsolateT>::Deserializer(IsolateT* isolate, |
| 131 | + #ifdef DEBUG |
| 132 | + num_api_references_ = GetNumApiReferences(isolate); |
| 133 | + #endif // DEBUG |
| 134 | +- CHECK_EQ(magic_number_, SerializedData::kMagicNumber); |
| 135 | + } |
| 136 | + |
| 137 | + template <typename IsolateT> |
0 commit comments