jkummerow@chromium.org | 1145ef8 | 2012-02-02 16:21:15 +0000 | [diff] [blame] | 1 | // Copyright 2012 the V8 project authors. All rights reserved. |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 2 | // Redistribution and use in source and binary forms, with or without |
| 3 | // modification, are permitted provided that the following conditions are |
| 4 | // met: |
| 5 | // |
| 6 | // * Redistributions of source code must retain the above copyright |
| 7 | // notice, this list of conditions and the following disclaimer. |
| 8 | // * Redistributions in binary form must reproduce the above |
| 9 | // copyright notice, this list of conditions and the following |
| 10 | // disclaimer in the documentation and/or other materials provided |
| 11 | // with the distribution. |
| 12 | // * Neither the name of Google Inc. nor the names of its |
| 13 | // contributors may be used to endorse or promote products derived |
| 14 | // from this software without specific prior written permission. |
| 15 | // |
| 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | #include "v8.h" |
| 29 | |
| 30 | #include "disassembler.h" |
| 31 | #include "disasm.h" |
| 32 | #include "jsregexp.h" |
| 33 | #include "objects-visiting.h" |
| 34 | |
| 35 | namespace v8 { |
| 36 | namespace internal { |
| 37 | |
| 38 | #ifdef OBJECT_PRINT |
| 39 | |
| 40 | static const char* TypeToString(InstanceType type); |
| 41 | |
| 42 | |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 43 | void MaybeObject::Print() { |
| 44 | Print(stdout); |
| 45 | } |
| 46 | |
| 47 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 48 | void MaybeObject::Print(FILE* out) { |
| 49 | Object* this_as_object; |
| 50 | if (ToObject(&this_as_object)) { |
| 51 | if (this_as_object->IsSmi()) { |
| 52 | Smi::cast(this_as_object)->SmiPrint(out); |
| 53 | } else { |
| 54 | HeapObject::cast(this_as_object)->HeapObjectPrint(out); |
| 55 | } |
| 56 | } else { |
| 57 | Failure::cast(this)->FailurePrint(out); |
| 58 | } |
| 59 | Flush(out); |
| 60 | } |
| 61 | |
| 62 | |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 63 | void MaybeObject::PrintLn() { |
| 64 | PrintLn(stdout); |
| 65 | } |
| 66 | |
| 67 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 68 | void MaybeObject::PrintLn(FILE* out) { |
| 69 | Print(out); |
| 70 | PrintF(out, "\n"); |
| 71 | } |
| 72 | |
| 73 | |
| 74 | void HeapObject::PrintHeader(FILE* out, const char* id) { |
| 75 | PrintF(out, "%p: [%s]\n", reinterpret_cast<void*>(this), id); |
| 76 | } |
| 77 | |
| 78 | |
| 79 | void HeapObject::HeapObjectPrint(FILE* out) { |
| 80 | InstanceType instance_type = map()->instance_type(); |
| 81 | |
yangguo@chromium.org | c03a192 | 2013-02-19 13:55:47 +0000 | [diff] [blame] | 82 | HandleScope scope(GetIsolate()); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 83 | if (instance_type < FIRST_NONSTRING_TYPE) { |
| 84 | String::cast(this)->StringPrint(out); |
| 85 | return; |
| 86 | } |
| 87 | |
| 88 | switch (instance_type) { |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 89 | case SYMBOL_TYPE: |
| 90 | Symbol::cast(this)->SymbolPrint(out); |
| 91 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 92 | case MAP_TYPE: |
| 93 | Map::cast(this)->MapPrint(out); |
| 94 | break; |
| 95 | case HEAP_NUMBER_TYPE: |
| 96 | HeapNumber::cast(this)->HeapNumberPrint(out); |
| 97 | break; |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 98 | case FIXED_DOUBLE_ARRAY_TYPE: |
| 99 | FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); |
| 100 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 101 | case FIXED_ARRAY_TYPE: |
| 102 | FixedArray::cast(this)->FixedArrayPrint(out); |
| 103 | break; |
| 104 | case BYTE_ARRAY_TYPE: |
| 105 | ByteArray::cast(this)->ByteArrayPrint(out); |
| 106 | break; |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 107 | case FREE_SPACE_TYPE: |
| 108 | FreeSpace::cast(this)->FreeSpacePrint(out); |
| 109 | break; |
danno@chromium.org | 4d3fe4e | 2011-03-10 10:14:28 +0000 | [diff] [blame] | 110 | case EXTERNAL_PIXEL_ARRAY_TYPE: |
| 111 | ExternalPixelArray::cast(this)->ExternalPixelArrayPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 112 | break; |
| 113 | case EXTERNAL_BYTE_ARRAY_TYPE: |
| 114 | ExternalByteArray::cast(this)->ExternalByteArrayPrint(out); |
| 115 | break; |
| 116 | case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: |
| 117 | ExternalUnsignedByteArray::cast(this) |
| 118 | ->ExternalUnsignedByteArrayPrint(out); |
| 119 | break; |
| 120 | case EXTERNAL_SHORT_ARRAY_TYPE: |
| 121 | ExternalShortArray::cast(this)->ExternalShortArrayPrint(out); |
| 122 | break; |
| 123 | case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: |
| 124 | ExternalUnsignedShortArray::cast(this) |
| 125 | ->ExternalUnsignedShortArrayPrint(out); |
| 126 | break; |
| 127 | case EXTERNAL_INT_ARRAY_TYPE: |
| 128 | ExternalIntArray::cast(this)->ExternalIntArrayPrint(out); |
| 129 | break; |
| 130 | case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: |
| 131 | ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayPrint(out); |
| 132 | break; |
| 133 | case EXTERNAL_FLOAT_ARRAY_TYPE: |
| 134 | ExternalFloatArray::cast(this)->ExternalFloatArrayPrint(out); |
| 135 | break; |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 136 | case EXTERNAL_DOUBLE_ARRAY_TYPE: |
| 137 | ExternalDoubleArray::cast(this)->ExternalDoubleArrayPrint(out); |
| 138 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 139 | case FILLER_TYPE: |
| 140 | PrintF(out, "filler"); |
| 141 | break; |
| 142 | case JS_OBJECT_TYPE: // fall through |
| 143 | case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
| 144 | case JS_ARRAY_TYPE: |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 145 | case JS_GENERATOR_OBJECT_TYPE: |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 146 | case JS_REGEXP_TYPE: |
| 147 | JSObject::cast(this)->JSObjectPrint(out); |
| 148 | break; |
| 149 | case ODDBALL_TYPE: |
| 150 | Oddball::cast(this)->to_string()->Print(out); |
| 151 | break; |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 152 | case JS_MODULE_TYPE: |
| 153 | JSModule::cast(this)->JSModulePrint(out); |
| 154 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 155 | case JS_FUNCTION_TYPE: |
| 156 | JSFunction::cast(this)->JSFunctionPrint(out); |
| 157 | break; |
| 158 | case JS_GLOBAL_PROXY_TYPE: |
| 159 | JSGlobalProxy::cast(this)->JSGlobalProxyPrint(out); |
| 160 | break; |
| 161 | case JS_GLOBAL_OBJECT_TYPE: |
| 162 | JSGlobalObject::cast(this)->JSGlobalObjectPrint(out); |
| 163 | break; |
| 164 | case JS_BUILTINS_OBJECT_TYPE: |
| 165 | JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(out); |
| 166 | break; |
| 167 | case JS_VALUE_TYPE: |
| 168 | PrintF(out, "Value wrapper around:"); |
| 169 | JSValue::cast(this)->value()->Print(out); |
| 170 | break; |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 171 | case JS_DATE_TYPE: |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 172 | JSDate::cast(this)->JSDatePrint(out); |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 173 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 174 | case CODE_TYPE: |
| 175 | Code::cast(this)->CodePrint(out); |
| 176 | break; |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 177 | case JS_PROXY_TYPE: |
| 178 | JSProxy::cast(this)->JSProxyPrint(out); |
| 179 | break; |
lrn@chromium.org | 34e6078 | 2011-09-15 07:25:40 +0000 | [diff] [blame] | 180 | case JS_FUNCTION_PROXY_TYPE: |
| 181 | JSFunctionProxy::cast(this)->JSFunctionProxyPrint(out); |
| 182 | break; |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 183 | case JS_SET_TYPE: |
| 184 | JSSet::cast(this)->JSSetPrint(out); |
| 185 | break; |
| 186 | case JS_MAP_TYPE: |
| 187 | JSMap::cast(this)->JSMapPrint(out); |
| 188 | break; |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 189 | case JS_WEAK_MAP_TYPE: |
| 190 | JSWeakMap::cast(this)->JSWeakMapPrint(out); |
| 191 | break; |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 192 | case JS_WEAK_SET_TYPE: |
| 193 | JSWeakSet::cast(this)->JSWeakSetPrint(out); |
| 194 | break; |
ager@chromium.org | ea91cc5 | 2011-05-23 06:06:11 +0000 | [diff] [blame] | 195 | case FOREIGN_TYPE: |
| 196 | Foreign::cast(this)->ForeignPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 197 | break; |
| 198 | case SHARED_FUNCTION_INFO_TYPE: |
| 199 | SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); |
| 200 | break; |
kmillikin@chromium.org | 31b1277 | 2011-02-02 16:08:26 +0000 | [diff] [blame] | 201 | case JS_MESSAGE_OBJECT_TYPE: |
| 202 | JSMessageObject::cast(this)->JSMessageObjectPrint(out); |
| 203 | break; |
danno@chromium.org | 4172848 | 2013-06-12 22:31:22 +0000 | [diff] [blame] | 204 | case CELL_TYPE: |
| 205 | Cell::cast(this)->CellPrint(out); |
| 206 | break; |
| 207 | case PROPERTY_CELL_TYPE: |
dslomov@chromium.org | b752d40 | 2013-06-18 11:54:54 +0000 | [diff] [blame] | 208 | PropertyCell::cast(this)->PropertyCellPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 209 | break; |
mstarzinger@chromium.org | f705b50 | 2013-04-04 11:38:09 +0000 | [diff] [blame] | 210 | case JS_ARRAY_BUFFER_TYPE: |
| 211 | JSArrayBuffer::cast(this)->JSArrayBufferPrint(out); |
mstarzinger@chromium.org | b228be0 | 2013-04-18 14:56:59 +0000 | [diff] [blame] | 212 | break; |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 213 | case JS_TYPED_ARRAY_TYPE: |
| 214 | JSTypedArray::cast(this)->JSTypedArrayPrint(out); |
mstarzinger@chromium.org | b228be0 | 2013-04-18 14:56:59 +0000 | [diff] [blame] | 215 | break; |
mstarzinger@chromium.org | 1510d58 | 2013-06-28 14:00:48 +0000 | [diff] [blame] | 216 | case JS_DATA_VIEW_TYPE: |
| 217 | JSDataView::cast(this)->JSDataViewPrint(out); |
| 218 | break; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 219 | #define MAKE_STRUCT_CASE(NAME, Name, name) \ |
| 220 | case NAME##_TYPE: \ |
| 221 | Name::cast(this)->Name##Print(out); \ |
| 222 | break; |
| 223 | STRUCT_LIST(MAKE_STRUCT_CASE) |
| 224 | #undef MAKE_STRUCT_CASE |
| 225 | |
| 226 | default: |
| 227 | PrintF(out, "UNKNOWN TYPE %d", map()->instance_type()); |
| 228 | UNREACHABLE(); |
| 229 | break; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | |
| 234 | void ByteArray::ByteArrayPrint(FILE* out) { |
| 235 | PrintF(out, "byte array, data starts at %p", GetDataStartAddress()); |
| 236 | } |
| 237 | |
| 238 | |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 239 | void FreeSpace::FreeSpacePrint(FILE* out) { |
| 240 | PrintF(out, "free space, size %d", Size()); |
| 241 | } |
| 242 | |
| 243 | |
danno@chromium.org | 4d3fe4e | 2011-03-10 10:14:28 +0000 | [diff] [blame] | 244 | void ExternalPixelArray::ExternalPixelArrayPrint(FILE* out) { |
| 245 | PrintF(out, "external pixel array"); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | |
| 249 | void ExternalByteArray::ExternalByteArrayPrint(FILE* out) { |
| 250 | PrintF(out, "external byte array"); |
| 251 | } |
| 252 | |
| 253 | |
| 254 | void ExternalUnsignedByteArray::ExternalUnsignedByteArrayPrint(FILE* out) { |
| 255 | PrintF(out, "external unsigned byte array"); |
| 256 | } |
| 257 | |
| 258 | |
| 259 | void ExternalShortArray::ExternalShortArrayPrint(FILE* out) { |
| 260 | PrintF(out, "external short array"); |
| 261 | } |
| 262 | |
| 263 | |
| 264 | void ExternalUnsignedShortArray::ExternalUnsignedShortArrayPrint(FILE* out) { |
| 265 | PrintF(out, "external unsigned short array"); |
| 266 | } |
| 267 | |
| 268 | |
| 269 | void ExternalIntArray::ExternalIntArrayPrint(FILE* out) { |
| 270 | PrintF(out, "external int array"); |
| 271 | } |
| 272 | |
| 273 | |
| 274 | void ExternalUnsignedIntArray::ExternalUnsignedIntArrayPrint(FILE* out) { |
| 275 | PrintF(out, "external unsigned int array"); |
| 276 | } |
| 277 | |
| 278 | |
| 279 | void ExternalFloatArray::ExternalFloatArrayPrint(FILE* out) { |
| 280 | PrintF(out, "external float array"); |
| 281 | } |
| 282 | |
| 283 | |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 284 | void ExternalDoubleArray::ExternalDoubleArrayPrint(FILE* out) { |
| 285 | PrintF(out, "external double array"); |
| 286 | } |
| 287 | |
| 288 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 289 | void JSObject::PrintProperties(FILE* out) { |
| 290 | if (HasFastProperties()) { |
| 291 | DescriptorArray* descs = map()->instance_descriptors(); |
verwaest@chromium.org | 06ab2ec | 2012-10-09 17:00:13 +0000 | [diff] [blame] | 292 | for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 293 | PrintF(out, " "); |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 294 | descs->GetKey(i)->NamePrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 295 | PrintF(out, ": "); |
| 296 | switch (descs->GetType(i)) { |
| 297 | case FIELD: { |
| 298 | int index = descs->GetFieldIndex(i); |
ulan@chromium.org | 57ff881 | 2013-05-10 08:16:55 +0000 | [diff] [blame] | 299 | RawFastPropertyAt(index)->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 300 | PrintF(out, " (field at offset %d)\n", index); |
| 301 | break; |
| 302 | } |
jkummerow@chromium.org | fb732b1 | 2013-07-26 10:27:09 +0000 | [diff] [blame] | 303 | case CONSTANT: |
| 304 | descs->GetConstant(i)->ShortPrint(out); |
| 305 | PrintF(out, " (constant)\n"); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 306 | break; |
| 307 | case CALLBACKS: |
| 308 | descs->GetCallbacksObject(i)->ShortPrint(out); |
| 309 | PrintF(out, " (callback)\n"); |
| 310 | break; |
danno@chromium.org | c612e02 | 2011-11-10 11:38:15 +0000 | [diff] [blame] | 311 | case NORMAL: // only in slow mode |
| 312 | case HANDLER: // only in lookup results, not in descriptors |
| 313 | case INTERCEPTOR: // only in lookup results, not in descriptors |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 314 | // There are no transitions in the descriptor array. |
| 315 | case TRANSITION: |
jkummerow@chromium.org | 7a6fc81 | 2012-06-27 11:12:38 +0000 | [diff] [blame] | 316 | case NONEXISTENT: |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 317 | UNREACHABLE(); |
| 318 | break; |
| 319 | } |
| 320 | } |
| 321 | } else { |
| 322 | property_dictionary()->Print(out); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | |
| 327 | void JSObject::PrintElements(FILE* out) { |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 328 | // Don't call GetElementsKind, its validation code can cause the printer to |
| 329 | // fail when debugging. |
| 330 | switch (map()->elements_kind()) { |
svenpanne@chromium.org | 830d30c | 2012-05-29 13:20:14 +0000 | [diff] [blame] | 331 | case FAST_HOLEY_SMI_ELEMENTS: |
| 332 | case FAST_SMI_ELEMENTS: |
| 333 | case FAST_HOLEY_ELEMENTS: |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 334 | case FAST_ELEMENTS: { |
| 335 | // Print in array notation for non-sparse arrays. |
| 336 | FixedArray* p = FixedArray::cast(elements()); |
| 337 | for (int i = 0; i < p->length(); i++) { |
| 338 | PrintF(out, " %d: ", i); |
| 339 | p->get(i)->ShortPrint(out); |
| 340 | PrintF(out, "\n"); |
| 341 | } |
| 342 | break; |
| 343 | } |
svenpanne@chromium.org | 830d30c | 2012-05-29 13:20:14 +0000 | [diff] [blame] | 344 | case FAST_HOLEY_DOUBLE_ELEMENTS: |
ricow@chromium.org | 9fa0967 | 2011-07-25 11:05:35 +0000 | [diff] [blame] | 345 | case FAST_DOUBLE_ELEMENTS: { |
| 346 | // Print in array notation for non-sparse arrays. |
jkummerow@chromium.org | 212d964 | 2012-05-11 15:02:09 +0000 | [diff] [blame] | 347 | if (elements()->length() > 0) { |
| 348 | FixedDoubleArray* p = FixedDoubleArray::cast(elements()); |
| 349 | for (int i = 0; i < p->length(); i++) { |
| 350 | if (p->is_the_hole(i)) { |
| 351 | PrintF(out, " %d: <the hole>", i); |
| 352 | } else { |
| 353 | PrintF(out, " %d: %g", i, p->get_scalar(i)); |
| 354 | } |
| 355 | PrintF(out, "\n"); |
ricow@chromium.org | 9fa0967 | 2011-07-25 11:05:35 +0000 | [diff] [blame] | 356 | } |
ricow@chromium.org | 9fa0967 | 2011-07-25 11:05:35 +0000 | [diff] [blame] | 357 | } |
| 358 | break; |
| 359 | } |
danno@chromium.org | 4d3fe4e | 2011-03-10 10:14:28 +0000 | [diff] [blame] | 360 | case EXTERNAL_PIXEL_ELEMENTS: { |
| 361 | ExternalPixelArray* p = ExternalPixelArray::cast(elements()); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 362 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 363 | PrintF(out, " %d: %d\n", i, p->get_scalar(i)); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 364 | } |
| 365 | break; |
| 366 | } |
| 367 | case EXTERNAL_BYTE_ELEMENTS: { |
| 368 | ExternalByteArray* p = ExternalByteArray::cast(elements()); |
| 369 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 370 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 371 | } |
| 372 | break; |
| 373 | } |
| 374 | case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: { |
| 375 | ExternalUnsignedByteArray* p = |
| 376 | ExternalUnsignedByteArray::cast(elements()); |
| 377 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 378 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 379 | } |
| 380 | break; |
| 381 | } |
| 382 | case EXTERNAL_SHORT_ELEMENTS: { |
| 383 | ExternalShortArray* p = ExternalShortArray::cast(elements()); |
| 384 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 385 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 386 | } |
| 387 | break; |
| 388 | } |
| 389 | case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: { |
| 390 | ExternalUnsignedShortArray* p = |
| 391 | ExternalUnsignedShortArray::cast(elements()); |
| 392 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 393 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 394 | } |
| 395 | break; |
| 396 | } |
| 397 | case EXTERNAL_INT_ELEMENTS: { |
| 398 | ExternalIntArray* p = ExternalIntArray::cast(elements()); |
| 399 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 400 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 401 | } |
| 402 | break; |
| 403 | } |
| 404 | case EXTERNAL_UNSIGNED_INT_ELEMENTS: { |
| 405 | ExternalUnsignedIntArray* p = |
| 406 | ExternalUnsignedIntArray::cast(elements()); |
| 407 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 408 | PrintF(out, " %d: %d\n", i, static_cast<int>(p->get_scalar(i))); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 409 | } |
| 410 | break; |
| 411 | } |
| 412 | case EXTERNAL_FLOAT_ELEMENTS: { |
| 413 | ExternalFloatArray* p = ExternalFloatArray::cast(elements()); |
| 414 | for (int i = 0; i < p->length(); i++) { |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 415 | PrintF(out, " %d: %f\n", i, p->get_scalar(i)); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 416 | } |
| 417 | break; |
| 418 | } |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 419 | case EXTERNAL_DOUBLE_ELEMENTS: { |
| 420 | ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); |
| 421 | for (int i = 0; i < p->length(); i++) { |
svenpanne@chromium.org | 83130cf | 2012-11-30 10:13:25 +0000 | [diff] [blame] | 422 | PrintF(out, " %d: %f\n", i, p->get_scalar(i)); |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 423 | } |
| 424 | break; |
| 425 | } |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 426 | case DICTIONARY_ELEMENTS: |
| 427 | elements()->Print(out); |
| 428 | break; |
whesse@chromium.org | 7b26015 | 2011-06-20 15:33:18 +0000 | [diff] [blame] | 429 | case NON_STRICT_ARGUMENTS_ELEMENTS: { |
| 430 | FixedArray* p = FixedArray::cast(elements()); |
svenpanne@chromium.org | 83130cf | 2012-11-30 10:13:25 +0000 | [diff] [blame] | 431 | PrintF(out, " parameter map:"); |
whesse@chromium.org | 7b26015 | 2011-06-20 15:33:18 +0000 | [diff] [blame] | 432 | for (int i = 2; i < p->length(); i++) { |
svenpanne@chromium.org | 83130cf | 2012-11-30 10:13:25 +0000 | [diff] [blame] | 433 | PrintF(out, " %d:", i - 2); |
whesse@chromium.org | 7b26015 | 2011-06-20 15:33:18 +0000 | [diff] [blame] | 434 | p->get(i)->ShortPrint(out); |
whesse@chromium.org | 7b26015 | 2011-06-20 15:33:18 +0000 | [diff] [blame] | 435 | } |
svenpanne@chromium.org | 83130cf | 2012-11-30 10:13:25 +0000 | [diff] [blame] | 436 | PrintF(out, "\n context: "); |
| 437 | p->get(0)->ShortPrint(out); |
| 438 | PrintF(out, "\n arguments: "); |
| 439 | p->get(1)->ShortPrint(out); |
| 440 | PrintF(out, "\n"); |
whesse@chromium.org | 7b26015 | 2011-06-20 15:33:18 +0000 | [diff] [blame] | 441 | break; |
| 442 | } |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 443 | } |
| 444 | } |
| 445 | |
| 446 | |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 447 | void JSObject::PrintTransitions(FILE* out) { |
| 448 | if (!map()->HasTransitionArray()) return; |
| 449 | TransitionArray* transitions = map()->transitions(); |
| 450 | for (int i = 0; i < transitions->number_of_transitions(); i++) { |
| 451 | PrintF(out, " "); |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 452 | transitions->GetKey(i)->NamePrint(out); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 453 | PrintF(out, ": "); |
| 454 | switch (transitions->GetTargetDetails(i).type()) { |
| 455 | case FIELD: { |
| 456 | PrintF(out, " (transition to field)\n"); |
| 457 | break; |
| 458 | } |
jkummerow@chromium.org | fb732b1 | 2013-07-26 10:27:09 +0000 | [diff] [blame] | 459 | case CONSTANT: |
| 460 | PrintF(out, " (transition to constant)\n"); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 461 | break; |
| 462 | case CALLBACKS: |
| 463 | PrintF(out, " (transition to callback)\n"); |
| 464 | break; |
| 465 | // Values below are never in the target descriptor array. |
| 466 | case NORMAL: |
| 467 | case HANDLER: |
| 468 | case INTERCEPTOR: |
| 469 | case TRANSITION: |
| 470 | case NONEXISTENT: |
| 471 | UNREACHABLE(); |
| 472 | break; |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 478 | void JSObject::JSObjectPrint(FILE* out) { |
| 479 | PrintF(out, "%p: [JSObject]\n", reinterpret_cast<void*>(this)); |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 480 | PrintF(out, " - map = %p [", reinterpret_cast<void*>(map())); |
| 481 | // Don't call GetElementsKind, its validation code can cause the printer to |
| 482 | // fail when debugging. |
| 483 | PrintElementsKind(out, this->map()->elements_kind()); |
| 484 | PrintF(out, |
| 485 | "]\n - prototype = %p\n", |
| 486 | reinterpret_cast<void*>(GetPrototype())); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 487 | PrintF(out, " {\n"); |
| 488 | PrintProperties(out); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 489 | PrintTransitions(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 490 | PrintElements(out); |
| 491 | PrintF(out, " }\n"); |
| 492 | } |
| 493 | |
| 494 | |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 495 | void JSModule::JSModulePrint(FILE* out) { |
| 496 | HeapObject::PrintHeader(out, "JSModule"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 497 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 498 | PrintF(out, " - context = "); |
| 499 | context()->Print(out); |
danno@chromium.org | 81cac2b | 2012-07-10 11:28:27 +0000 | [diff] [blame] | 500 | PrintF(out, " - scope_info = "); |
| 501 | scope_info()->ShortPrint(out); |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 502 | PrintElementsKind(out, this->map()->elements_kind()); |
| 503 | PrintF(out, " {\n"); |
| 504 | PrintProperties(out); |
| 505 | PrintElements(out); |
| 506 | PrintF(out, " }\n"); |
| 507 | } |
| 508 | |
| 509 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 510 | static const char* TypeToString(InstanceType type) { |
| 511 | switch (type) { |
| 512 | case INVALID_TYPE: return "INVALID"; |
| 513 | case MAP_TYPE: return "MAP"; |
| 514 | case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; |
| 515 | case SYMBOL_TYPE: return "SYMBOL"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 516 | case STRING_TYPE: return "TWO_BYTE_STRING"; |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 517 | case ASCII_STRING_TYPE: return "ASCII_STRING"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 518 | case CONS_STRING_TYPE: |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 519 | case CONS_ASCII_STRING_TYPE: |
| 520 | return "CONS_STRING"; |
| 521 | case EXTERNAL_STRING_TYPE: |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 522 | case EXTERNAL_ASCII_STRING_TYPE: |
danno@chromium.org | ca29dd8 | 2013-04-26 11:59:48 +0000 | [diff] [blame] | 523 | case EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE: |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 524 | return "EXTERNAL_STRING"; |
| 525 | case SHORT_EXTERNAL_STRING_TYPE: |
mstarzinger@chromium.org | 1b3afd1 | 2011-11-29 14:28:56 +0000 | [diff] [blame] | 526 | case SHORT_EXTERNAL_ASCII_STRING_TYPE: |
danno@chromium.org | ca29dd8 | 2013-04-26 11:59:48 +0000 | [diff] [blame] | 527 | case SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE: |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 528 | return "SHORT_EXTERNAL_STRING"; |
| 529 | case INTERNALIZED_STRING_TYPE: return "INTERNALIZED_STRING"; |
| 530 | case ASCII_INTERNALIZED_STRING_TYPE: return "ASCII_INTERNALIZED_STRING"; |
| 531 | case CONS_INTERNALIZED_STRING_TYPE: return "CONS_INTERNALIZED_STRING"; |
| 532 | case CONS_ASCII_INTERNALIZED_STRING_TYPE: |
| 533 | return "CONS_ASCII_INTERNALIZED_STRING"; |
| 534 | case EXTERNAL_INTERNALIZED_STRING_TYPE: |
| 535 | case EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE: |
danno@chromium.org | ca29dd8 | 2013-04-26 11:59:48 +0000 | [diff] [blame] | 536 | case EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE: |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 537 | return "EXTERNAL_INTERNALIZED_STRING"; |
| 538 | case SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE: |
| 539 | case SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE: |
danno@chromium.org | ca29dd8 | 2013-04-26 11:59:48 +0000 | [diff] [blame] | 540 | case SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE: |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 541 | return "SHORT_EXTERNAL_INTERNALIZED_STRING"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 542 | case FIXED_ARRAY_TYPE: return "FIXED_ARRAY"; |
| 543 | case BYTE_ARRAY_TYPE: return "BYTE_ARRAY"; |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 544 | case FREE_SPACE_TYPE: return "FREE_SPACE"; |
danno@chromium.org | 4d3fe4e | 2011-03-10 10:14:28 +0000 | [diff] [blame] | 545 | case EXTERNAL_PIXEL_ARRAY_TYPE: return "EXTERNAL_PIXEL_ARRAY"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 546 | case EXTERNAL_BYTE_ARRAY_TYPE: return "EXTERNAL_BYTE_ARRAY"; |
| 547 | case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: |
| 548 | return "EXTERNAL_UNSIGNED_BYTE_ARRAY"; |
| 549 | case EXTERNAL_SHORT_ARRAY_TYPE: return "EXTERNAL_SHORT_ARRAY"; |
| 550 | case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: |
| 551 | return "EXTERNAL_UNSIGNED_SHORT_ARRAY"; |
| 552 | case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY"; |
| 553 | case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: |
| 554 | return "EXTERNAL_UNSIGNED_INT_ARRAY"; |
| 555 | case EXTERNAL_FLOAT_ARRAY_TYPE: return "EXTERNAL_FLOAT_ARRAY"; |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 556 | case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 557 | case FILLER_TYPE: return "FILLER"; |
| 558 | case JS_OBJECT_TYPE: return "JS_OBJECT"; |
| 559 | case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; |
| 560 | case ODDBALL_TYPE: return "ODDBALL"; |
danno@chromium.org | 4172848 | 2013-06-12 22:31:22 +0000 | [diff] [blame] | 561 | case CELL_TYPE: return "CELL"; |
| 562 | case PROPERTY_CELL_TYPE: return "PROPERTY_CELL"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 563 | case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 564 | case JS_GENERATOR_OBJECT_TYPE: return "JS_GENERATOR_OBJECT"; |
erik.corry@gmail.com | ed49e96 | 2012-04-17 11:57:53 +0000 | [diff] [blame] | 565 | case JS_MODULE_TYPE: return "JS_MODULE"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 566 | case JS_FUNCTION_TYPE: return "JS_FUNCTION"; |
| 567 | case CODE_TYPE: return "CODE"; |
| 568 | case JS_ARRAY_TYPE: return "JS_ARRAY"; |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 569 | case JS_PROXY_TYPE: return "JS_PROXY"; |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 570 | case JS_SET_TYPE: return "JS_SET"; |
| 571 | case JS_MAP_TYPE: return "JS_MAP"; |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 572 | case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP"; |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 573 | case JS_WEAK_SET_TYPE: return "JS_WEAK_SET"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 574 | case JS_REGEXP_TYPE: return "JS_REGEXP"; |
| 575 | case JS_VALUE_TYPE: return "JS_VALUE"; |
| 576 | case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; |
| 577 | case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; |
| 578 | case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; |
danno@chromium.org | 1fd77d5 | 2013-06-07 16:01:45 +0000 | [diff] [blame] | 579 | case JS_ARRAY_BUFFER_TYPE: return "JS_ARRAY_BUFFER"; |
mstarzinger@chromium.org | 1510d58 | 2013-06-28 14:00:48 +0000 | [diff] [blame] | 580 | case JS_TYPED_ARRAY_TYPE: return "JS_TYPED_ARRAY"; |
| 581 | case JS_DATA_VIEW_TYPE: return "JS_DATA_VIEW"; |
ager@chromium.org | ea91cc5 | 2011-05-23 06:06:11 +0000 | [diff] [blame] | 582 | case FOREIGN_TYPE: return "FOREIGN"; |
kmillikin@chromium.org | 31b1277 | 2011-02-02 16:08:26 +0000 | [diff] [blame] | 583 | case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 584 | #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; |
| 585 | STRUCT_LIST(MAKE_STRUCT_CASE) |
| 586 | #undef MAKE_STRUCT_CASE |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 587 | default: return "UNKNOWN"; |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 588 | } |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 589 | } |
| 590 | |
| 591 | |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 592 | void Symbol::SymbolPrint(FILE* out) { |
| 593 | HeapObject::PrintHeader(out, "Symbol"); |
| 594 | PrintF(out, " - hash: %d\n", Hash()); |
mstarzinger@chromium.org | f705b50 | 2013-04-04 11:38:09 +0000 | [diff] [blame] | 595 | PrintF(out, " - name: "); |
| 596 | name()->ShortPrint(); |
| 597 | PrintF(out, "\n"); |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 598 | } |
| 599 | |
| 600 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 601 | void Map::MapPrint(FILE* out) { |
| 602 | HeapObject::PrintHeader(out, "Map"); |
| 603 | PrintF(out, " - type: %s\n", TypeToString(instance_type())); |
| 604 | PrintF(out, " - instance size: %d\n", instance_size()); |
| 605 | PrintF(out, " - inobject properties: %d\n", inobject_properties()); |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 606 | PrintF(out, " - elements kind: "); |
| 607 | PrintElementsKind(out, elements_kind()); |
| 608 | PrintF(out, "\n - pre-allocated property fields: %d\n", |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 609 | pre_allocated_property_fields()); |
| 610 | PrintF(out, " - unused property fields: %d\n", unused_property_fields()); |
| 611 | if (is_hidden_prototype()) { |
| 612 | PrintF(out, " - hidden_prototype\n"); |
| 613 | } |
| 614 | if (has_named_interceptor()) { |
| 615 | PrintF(out, " - named_interceptor\n"); |
| 616 | } |
| 617 | if (has_indexed_interceptor()) { |
| 618 | PrintF(out, " - indexed_interceptor\n"); |
| 619 | } |
| 620 | if (is_undetectable()) { |
| 621 | PrintF(out, " - undetectable\n"); |
| 622 | } |
| 623 | if (has_instance_call_handler()) { |
| 624 | PrintF(out, " - instance_call_handler\n"); |
| 625 | } |
| 626 | if (is_access_check_needed()) { |
| 627 | PrintF(out, " - access_check_needed\n"); |
| 628 | } |
verwaest@chromium.org | 33e09c8 | 2012-10-10 17:07:22 +0000 | [diff] [blame] | 629 | PrintF(out, " - back pointer: "); |
| 630 | GetBackPointer()->ShortPrint(out); |
jkummerow@chromium.org | 4e308cf | 2013-05-17 13:39:16 +0000 | [diff] [blame] | 631 | PrintF(out, "\n - instance descriptors %s#%i: ", |
| 632 | owns_descriptors() ? "(own) " : "", |
rossberg@chromium.org | 89e18f5 | 2012-10-22 13:09:53 +0000 | [diff] [blame] | 633 | NumberOfOwnDescriptors()); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 634 | instance_descriptors()->ShortPrint(out); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 635 | if (HasTransitionArray()) { |
| 636 | PrintF(out, "\n - transitions: "); |
| 637 | transitions()->ShortPrint(out); |
| 638 | } |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 639 | PrintF(out, "\n - prototype: "); |
| 640 | prototype()->ShortPrint(out); |
| 641 | PrintF(out, "\n - constructor: "); |
| 642 | constructor()->ShortPrint(out); |
mmassi@chromium.org | 7028c05 | 2012-06-13 11:51:58 +0000 | [diff] [blame] | 643 | PrintF(out, "\n - code cache: "); |
| 644 | code_cache()->ShortPrint(out); |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 645 | PrintF(out, "\n - dependent code: "); |
| 646 | dependent_code()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 647 | PrintF(out, "\n"); |
| 648 | } |
| 649 | |
| 650 | |
| 651 | void CodeCache::CodeCachePrint(FILE* out) { |
| 652 | HeapObject::PrintHeader(out, "CodeCache"); |
| 653 | PrintF(out, "\n - default_cache: "); |
| 654 | default_cache()->ShortPrint(out); |
| 655 | PrintF(out, "\n - normal_type_cache: "); |
| 656 | normal_type_cache()->ShortPrint(out); |
| 657 | } |
| 658 | |
| 659 | |
jkummerow@chromium.org | e297f59 | 2011-06-08 10:05:15 +0000 | [diff] [blame] | 660 | void PolymorphicCodeCache::PolymorphicCodeCachePrint(FILE* out) { |
| 661 | HeapObject::PrintHeader(out, "PolymorphicCodeCache"); |
| 662 | PrintF(out, "\n - cache: "); |
| 663 | cache()->ShortPrint(out); |
| 664 | } |
| 665 | |
| 666 | |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 667 | void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { |
| 668 | HeapObject::PrintHeader(out, "TypeFeedbackInfo"); |
ulan@chromium.org | ea52b5f | 2012-07-30 13:05:33 +0000 | [diff] [blame] | 669 | PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 670 | ic_total_count(), ic_with_type_info_count()); |
ulan@chromium.org | ea52b5f | 2012-07-30 13:05:33 +0000 | [diff] [blame] | 671 | PrintF(out, " - type_feedback_cells: "); |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 672 | type_feedback_cells()->FixedArrayPrint(out); |
| 673 | } |
| 674 | |
| 675 | |
yangguo@chromium.org | ab30bb8 | 2012-02-24 14:41:46 +0000 | [diff] [blame] | 676 | void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) { |
| 677 | HeapObject::PrintHeader(out, "AliasedArgumentsEntry"); |
| 678 | PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot()); |
| 679 | } |
| 680 | |
| 681 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 682 | void FixedArray::FixedArrayPrint(FILE* out) { |
| 683 | HeapObject::PrintHeader(out, "FixedArray"); |
| 684 | PrintF(out, " - length: %d", length()); |
| 685 | for (int i = 0; i < length(); i++) { |
| 686 | PrintF(out, "\n [%d]: ", i); |
| 687 | get(i)->ShortPrint(out); |
| 688 | } |
| 689 | PrintF(out, "\n"); |
| 690 | } |
| 691 | |
| 692 | |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 693 | void FixedDoubleArray::FixedDoubleArrayPrint(FILE* out) { |
| 694 | HeapObject::PrintHeader(out, "FixedDoubleArray"); |
| 695 | PrintF(out, " - length: %d", length()); |
| 696 | for (int i = 0; i < length(); i++) { |
jkummerow@chromium.org | 1145ef8 | 2012-02-02 16:21:15 +0000 | [diff] [blame] | 697 | if (is_the_hole(i)) { |
| 698 | PrintF(out, "\n [%d]: <the hole>", i); |
| 699 | } else { |
| 700 | PrintF(out, "\n [%d]: %g", i, get_scalar(i)); |
| 701 | } |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 702 | } |
| 703 | PrintF(out, "\n"); |
| 704 | } |
| 705 | |
| 706 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 707 | void JSValue::JSValuePrint(FILE* out) { |
| 708 | HeapObject::PrintHeader(out, "ValueObject"); |
| 709 | value()->Print(out); |
| 710 | } |
| 711 | |
| 712 | |
kmillikin@chromium.org | 31b1277 | 2011-02-02 16:08:26 +0000 | [diff] [blame] | 713 | void JSMessageObject::JSMessageObjectPrint(FILE* out) { |
| 714 | HeapObject::PrintHeader(out, "JSMessageObject"); |
| 715 | PrintF(out, " - type: "); |
| 716 | type()->ShortPrint(out); |
| 717 | PrintF(out, "\n - arguments: "); |
| 718 | arguments()->ShortPrint(out); |
| 719 | PrintF(out, "\n - start_position: %d", start_position()); |
| 720 | PrintF(out, "\n - end_position: %d", end_position()); |
| 721 | PrintF(out, "\n - script: "); |
| 722 | script()->ShortPrint(out); |
| 723 | PrintF(out, "\n - stack_trace: "); |
| 724 | stack_trace()->ShortPrint(out); |
| 725 | PrintF(out, "\n - stack_frames: "); |
| 726 | stack_frames()->ShortPrint(out); |
| 727 | PrintF(out, "\n"); |
| 728 | } |
| 729 | |
| 730 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 731 | void String::StringPrint(FILE* out) { |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 732 | if (StringShape(this).IsInternalized()) { |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 733 | PrintF(out, "#"); |
| 734 | } else if (StringShape(this).IsCons()) { |
| 735 | PrintF(out, "c\""); |
| 736 | } else { |
| 737 | PrintF(out, "\""); |
| 738 | } |
| 739 | |
| 740 | const char truncated_epilogue[] = "...<truncated>"; |
| 741 | int len = length(); |
| 742 | if (!FLAG_use_verbose_printer) { |
| 743 | if (len > 100) { |
| 744 | len = 100 - sizeof(truncated_epilogue); |
| 745 | } |
| 746 | } |
| 747 | for (int i = 0; i < len; i++) { |
| 748 | PrintF(out, "%c", Get(i)); |
| 749 | } |
| 750 | if (len != length()) { |
| 751 | PrintF(out, "%s", truncated_epilogue); |
| 752 | } |
| 753 | |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 754 | if (!StringShape(this).IsInternalized()) PrintF(out, "\""); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 755 | } |
| 756 | |
| 757 | |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 758 | void Name::NamePrint(FILE* out) { |
| 759 | if (IsString()) |
| 760 | String::cast(this)->StringPrint(out); |
| 761 | else |
| 762 | ShortPrint(); |
| 763 | } |
| 764 | |
| 765 | |
vegorov@chromium.org | 7943d46 | 2011-08-01 11:41:52 +0000 | [diff] [blame] | 766 | // This method is only meant to be called from gdb for debugging purposes. |
ulan@chromium.org | 2efb900 | 2012-01-19 15:36:35 +0000 | [diff] [blame] | 767 | // Since the string can also be in two-byte encoding, non-ASCII characters |
vegorov@chromium.org | 7943d46 | 2011-08-01 11:41:52 +0000 | [diff] [blame] | 768 | // will be ignored in the output. |
| 769 | char* String::ToAsciiArray() { |
| 770 | // Static so that subsequent calls frees previously allocated space. |
| 771 | // This also means that previous results will be overwritten. |
| 772 | static char* buffer = NULL; |
| 773 | if (buffer != NULL) free(buffer); |
| 774 | buffer = new char[length()+1]; |
jkummerow@chromium.org | 9439d1f | 2013-01-09 17:13:11 +0000 | [diff] [blame] | 775 | WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length()); |
vegorov@chromium.org | 7943d46 | 2011-08-01 11:41:52 +0000 | [diff] [blame] | 776 | buffer[length()] = 0; |
| 777 | return buffer; |
| 778 | } |
| 779 | |
| 780 | |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 781 | static const char* const weekdays[] = { |
| 782 | "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" |
| 783 | }; |
| 784 | |
mstarzinger@chromium.org | e0e1b0d | 2013-07-08 08:38:06 +0000 | [diff] [blame] | 785 | |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 786 | void JSDate::JSDatePrint(FILE* out) { |
| 787 | HeapObject::PrintHeader(out, "JSDate"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 788 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 789 | PrintF(out, " - value = "); |
| 790 | value()->Print(out); |
| 791 | if (!year()->IsSmi()) { |
| 792 | PrintF(out, " - time = NaN\n"); |
| 793 | } else { |
| 794 | PrintF(out, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n", |
| 795 | weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0], |
| 796 | year()->IsSmi() ? Smi::cast(year())->value() : -1, |
| 797 | month()->IsSmi() ? Smi::cast(month())->value() : -1, |
| 798 | day()->IsSmi() ? Smi::cast(day())->value() : -1, |
| 799 | hour()->IsSmi() ? Smi::cast(hour())->value() : -1, |
| 800 | min()->IsSmi() ? Smi::cast(min())->value() : -1, |
| 801 | sec()->IsSmi() ? Smi::cast(sec())->value() : -1); |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 806 | void JSProxy::JSProxyPrint(FILE* out) { |
| 807 | HeapObject::PrintHeader(out, "JSProxy"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 808 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 809 | PrintF(out, " - handler = "); |
| 810 | handler()->Print(out); |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 811 | PrintF(out, " - hash = "); |
| 812 | hash()->Print(out); |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 813 | PrintF(out, "\n"); |
| 814 | } |
| 815 | |
| 816 | |
lrn@chromium.org | 34e6078 | 2011-09-15 07:25:40 +0000 | [diff] [blame] | 817 | void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) { |
| 818 | HeapObject::PrintHeader(out, "JSFunctionProxy"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 819 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
lrn@chromium.org | 34e6078 | 2011-09-15 07:25:40 +0000 | [diff] [blame] | 820 | PrintF(out, " - handler = "); |
| 821 | handler()->Print(out); |
| 822 | PrintF(out, " - call_trap = "); |
| 823 | call_trap()->Print(out); |
| 824 | PrintF(out, " - construct_trap = "); |
| 825 | construct_trap()->Print(out); |
| 826 | PrintF(out, "\n"); |
| 827 | } |
| 828 | |
| 829 | |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 830 | void JSSet::JSSetPrint(FILE* out) { |
| 831 | HeapObject::PrintHeader(out, "JSSet"); |
| 832 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
| 833 | PrintF(out, " - table = "); |
| 834 | table()->ShortPrint(out); |
| 835 | PrintF(out, "\n"); |
| 836 | } |
| 837 | |
| 838 | |
| 839 | void JSMap::JSMapPrint(FILE* out) { |
| 840 | HeapObject::PrintHeader(out, "JSMap"); |
| 841 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
| 842 | PrintF(out, " - table = "); |
| 843 | table()->ShortPrint(out); |
| 844 | PrintF(out, "\n"); |
| 845 | } |
| 846 | |
| 847 | |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 848 | void JSWeakMap::JSWeakMapPrint(FILE* out) { |
| 849 | HeapObject::PrintHeader(out, "JSWeakMap"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 850 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
kmillikin@chromium.org | 7c2628c | 2011-08-10 11:27:35 +0000 | [diff] [blame] | 851 | PrintF(out, " - table = "); |
| 852 | table()->ShortPrint(out); |
| 853 | PrintF(out, "\n"); |
| 854 | } |
| 855 | |
| 856 | |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 857 | void JSWeakSet::JSWeakSetPrint(FILE* out) { |
| 858 | HeapObject::PrintHeader(out, "JSWeakSet"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 859 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 860 | PrintF(out, " - table = "); |
| 861 | table()->ShortPrint(out); |
| 862 | PrintF(out, "\n"); |
| 863 | } |
| 864 | |
| 865 | |
mstarzinger@chromium.org | f705b50 | 2013-04-04 11:38:09 +0000 | [diff] [blame] | 866 | void JSArrayBuffer::JSArrayBufferPrint(FILE* out) { |
| 867 | HeapObject::PrintHeader(out, "JSArrayBuffer"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 868 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
| 869 | PrintF(out, " - backing_store = %p\n", backing_store()); |
mstarzinger@chromium.org | f705b50 | 2013-04-04 11:38:09 +0000 | [diff] [blame] | 870 | PrintF(out, " - byte_length = "); |
| 871 | byte_length()->ShortPrint(out); |
| 872 | PrintF(out, "\n"); |
| 873 | } |
| 874 | |
| 875 | |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 876 | void JSTypedArray::JSTypedArrayPrint(FILE* out) { |
| 877 | HeapObject::PrintHeader(out, "JSTypedArray"); |
mstarzinger@chromium.org | 1510d58 | 2013-06-28 14:00:48 +0000 | [diff] [blame] | 878 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 879 | PrintF(out, " - buffer ="); |
| 880 | buffer()->ShortPrint(out); |
| 881 | PrintF(out, "\n - byte_offset = "); |
| 882 | byte_offset()->ShortPrint(out); |
| 883 | PrintF(out, "\n - byte_length = "); |
| 884 | byte_length()->ShortPrint(out); |
ulan@chromium.org | dfe5307 | 2013-06-06 14:14:51 +0000 | [diff] [blame] | 885 | PrintF(out, "\n - length = "); |
mstarzinger@chromium.org | e27d617 | 2013-04-17 11:51:44 +0000 | [diff] [blame] | 886 | length()->ShortPrint(out); |
| 887 | PrintF("\n"); |
| 888 | PrintElements(out); |
| 889 | } |
| 890 | |
| 891 | |
mstarzinger@chromium.org | 1510d58 | 2013-06-28 14:00:48 +0000 | [diff] [blame] | 892 | void JSDataView::JSDataViewPrint(FILE* out) { |
| 893 | HeapObject::PrintHeader(out, "JSDataView"); |
| 894 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
| 895 | PrintF(out, " - buffer ="); |
| 896 | buffer()->ShortPrint(out); |
| 897 | PrintF(out, "\n - byte_offset = "); |
| 898 | byte_offset()->ShortPrint(out); |
| 899 | PrintF(out, "\n - byte_length = "); |
| 900 | byte_length()->ShortPrint(out); |
| 901 | PrintF("\n"); |
| 902 | } |
| 903 | |
| 904 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 905 | void JSFunction::JSFunctionPrint(FILE* out) { |
| 906 | HeapObject::PrintHeader(out, "Function"); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 907 | PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 908 | PrintF(out, " - initial_map = "); |
| 909 | if (has_initial_map()) { |
| 910 | initial_map()->ShortPrint(out); |
| 911 | } |
| 912 | PrintF(out, "\n - shared_info = "); |
| 913 | shared()->ShortPrint(out); |
| 914 | PrintF(out, "\n - name = "); |
| 915 | shared()->name()->Print(out); |
| 916 | PrintF(out, "\n - context = "); |
mstarzinger@chromium.org | 1510d58 | 2013-06-28 14:00:48 +0000 | [diff] [blame] | 917 | context()->ShortPrint(out); |
yangguo@chromium.org | 9c741c8 | 2012-06-28 15:04:22 +0000 | [diff] [blame] | 918 | PrintF(out, "\n - literals = "); |
| 919 | literals()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 920 | PrintF(out, "\n - code = "); |
| 921 | code()->ShortPrint(out); |
| 922 | PrintF(out, "\n"); |
| 923 | |
| 924 | PrintProperties(out); |
| 925 | PrintElements(out); |
| 926 | |
| 927 | PrintF(out, "\n"); |
| 928 | } |
| 929 | |
| 930 | |
| 931 | void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) { |
| 932 | HeapObject::PrintHeader(out, "SharedFunctionInfo"); |
| 933 | PrintF(out, " - name: "); |
| 934 | name()->ShortPrint(out); |
| 935 | PrintF(out, "\n - expected_nof_properties: %d", expected_nof_properties()); |
| 936 | PrintF(out, "\n - instance class name = "); |
| 937 | instance_class_name()->Print(out); |
| 938 | PrintF(out, "\n - code = "); |
| 939 | code()->ShortPrint(out); |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 940 | if (HasSourceCode()) { |
| 941 | PrintF(out, "\n - source code = "); |
ulan@chromium.org | ea52b5f | 2012-07-30 13:05:33 +0000 | [diff] [blame] | 942 | String* source = String::cast(Script::cast(script())->source()); |
| 943 | int start = start_position(); |
| 944 | int length = end_position() - start; |
| 945 | SmartArrayPointer<char> source_string = |
| 946 | source->ToCString(DISALLOW_NULLS, |
| 947 | FAST_STRING_TRAVERSAL, |
| 948 | start, length, NULL); |
| 949 | PrintF(out, "%s", *source_string); |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 950 | } |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 951 | // Script files are often large, hard to read. |
| 952 | // PrintF(out, "\n - script ="); |
| 953 | // script()->Print(out); |
| 954 | PrintF(out, "\n - function token position = %d", function_token_position()); |
| 955 | PrintF(out, "\n - start position = %d", start_position()); |
| 956 | PrintF(out, "\n - end position = %d", end_position()); |
| 957 | PrintF(out, "\n - is expression = %d", is_expression()); |
| 958 | PrintF(out, "\n - debug info = "); |
| 959 | debug_info()->ShortPrint(out); |
| 960 | PrintF(out, "\n - length = %d", length()); |
svenpanne@chromium.org | a53e8e0 | 2013-05-24 12:35:50 +0000 | [diff] [blame] | 961 | PrintF(out, "\n - optimized_code_map = "); |
| 962 | optimized_code_map()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 963 | PrintF(out, "\n"); |
| 964 | } |
| 965 | |
| 966 | |
| 967 | void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) { |
ulan@chromium.org | ea52b5f | 2012-07-30 13:05:33 +0000 | [diff] [blame] | 968 | PrintF(out, "global_proxy "); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 969 | JSObjectPrint(out); |
yangguo@chromium.org | 46839fb | 2012-08-28 09:06:19 +0000 | [diff] [blame] | 970 | PrintF(out, "native context : "); |
| 971 | native_context()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 972 | PrintF(out, "\n"); |
| 973 | } |
| 974 | |
| 975 | |
| 976 | void JSGlobalObject::JSGlobalObjectPrint(FILE* out) { |
| 977 | PrintF(out, "global "); |
| 978 | JSObjectPrint(out); |
yangguo@chromium.org | 46839fb | 2012-08-28 09:06:19 +0000 | [diff] [blame] | 979 | PrintF(out, "native context : "); |
| 980 | native_context()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 981 | PrintF(out, "\n"); |
| 982 | } |
| 983 | |
| 984 | |
| 985 | void JSBuiltinsObject::JSBuiltinsObjectPrint(FILE* out) { |
| 986 | PrintF(out, "builtins "); |
| 987 | JSObjectPrint(out); |
| 988 | } |
| 989 | |
| 990 | |
danno@chromium.org | 4172848 | 2013-06-12 22:31:22 +0000 | [diff] [blame] | 991 | void Cell::CellPrint(FILE* out) { |
| 992 | HeapObject::PrintHeader(out, "Cell"); |
| 993 | } |
| 994 | |
| 995 | |
dslomov@chromium.org | b752d40 | 2013-06-18 11:54:54 +0000 | [diff] [blame] | 996 | void PropertyCell::PropertyCellPrint(FILE* out) { |
| 997 | HeapObject::PrintHeader(out, "PropertyCell"); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 998 | } |
| 999 | |
| 1000 | |
| 1001 | void Code::CodePrint(FILE* out) { |
| 1002 | HeapObject::PrintHeader(out, "Code"); |
| 1003 | #ifdef ENABLE_DISASSEMBLER |
| 1004 | if (FLAG_use_verbose_printer) { |
| 1005 | Disassemble(NULL, out); |
| 1006 | } |
| 1007 | #endif |
| 1008 | } |
| 1009 | |
| 1010 | |
ager@chromium.org | ea91cc5 | 2011-05-23 06:06:11 +0000 | [diff] [blame] | 1011 | void Foreign::ForeignPrint(FILE* out) { |
jkummerow@chromium.org | c3b3712 | 2011-11-07 10:14:12 +0000 | [diff] [blame] | 1012 | PrintF(out, "foreign address : %p", foreign_address()); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1013 | } |
| 1014 | |
| 1015 | |
hpayer@chromium.org | 7c3372b | 2013-02-13 17:26:04 +0000 | [diff] [blame] | 1016 | void ExecutableAccessorInfo::ExecutableAccessorInfoPrint(FILE* out) { |
| 1017 | HeapObject::PrintHeader(out, "ExecutableAccessorInfo"); |
| 1018 | PrintF(out, "\n - name: "); |
| 1019 | name()->ShortPrint(out); |
| 1020 | PrintF(out, "\n - flag: "); |
| 1021 | flag()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1022 | PrintF(out, "\n - getter: "); |
| 1023 | getter()->ShortPrint(out); |
| 1024 | PrintF(out, "\n - setter: "); |
| 1025 | setter()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1026 | PrintF(out, "\n - data: "); |
| 1027 | data()->ShortPrint(out); |
hpayer@chromium.org | 7c3372b | 2013-02-13 17:26:04 +0000 | [diff] [blame] | 1028 | } |
| 1029 | |
| 1030 | |
| 1031 | void DeclaredAccessorInfo::DeclaredAccessorInfoPrint(FILE* out) { |
| 1032 | HeapObject::PrintHeader(out, "DeclaredAccessorInfo"); |
| 1033 | PrintF(out, "\n - name: "); |
| 1034 | name()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1035 | PrintF(out, "\n - flag: "); |
| 1036 | flag()->ShortPrint(out); |
hpayer@chromium.org | 7c3372b | 2013-02-13 17:26:04 +0000 | [diff] [blame] | 1037 | PrintF(out, "\n - descriptor: "); |
| 1038 | descriptor()->ShortPrint(out); |
| 1039 | } |
| 1040 | |
| 1041 | |
| 1042 | void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorPrint(FILE* out) { |
| 1043 | HeapObject::PrintHeader(out, "DeclaredAccessorDescriptor"); |
| 1044 | PrintF(out, "\n - internal field: "); |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 1045 | serialized_data()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1046 | } |
| 1047 | |
| 1048 | |
danno@chromium.org | 1fd77d5 | 2013-06-07 16:01:45 +0000 | [diff] [blame] | 1049 | void Box::BoxPrint(FILE* out) { |
| 1050 | HeapObject::PrintHeader(out, "Box"); |
| 1051 | PrintF(out, "\n - value: "); |
| 1052 | value()->ShortPrint(out); |
| 1053 | } |
| 1054 | |
| 1055 | |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 1056 | void AccessorPair::AccessorPairPrint(FILE* out) { |
| 1057 | HeapObject::PrintHeader(out, "AccessorPair"); |
| 1058 | PrintF(out, "\n - getter: "); |
| 1059 | getter()->ShortPrint(out); |
| 1060 | PrintF(out, "\n - setter: "); |
| 1061 | setter()->ShortPrint(out); |
| 1062 | } |
| 1063 | |
| 1064 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1065 | void AccessCheckInfo::AccessCheckInfoPrint(FILE* out) { |
| 1066 | HeapObject::PrintHeader(out, "AccessCheckInfo"); |
| 1067 | PrintF(out, "\n - named_callback: "); |
| 1068 | named_callback()->ShortPrint(out); |
| 1069 | PrintF(out, "\n - indexed_callback: "); |
| 1070 | indexed_callback()->ShortPrint(out); |
| 1071 | PrintF(out, "\n - data: "); |
| 1072 | data()->ShortPrint(out); |
| 1073 | } |
| 1074 | |
| 1075 | |
| 1076 | void InterceptorInfo::InterceptorInfoPrint(FILE* out) { |
| 1077 | HeapObject::PrintHeader(out, "InterceptorInfo"); |
| 1078 | PrintF(out, "\n - getter: "); |
| 1079 | getter()->ShortPrint(out); |
| 1080 | PrintF(out, "\n - setter: "); |
| 1081 | setter()->ShortPrint(out); |
| 1082 | PrintF(out, "\n - query: "); |
| 1083 | query()->ShortPrint(out); |
| 1084 | PrintF(out, "\n - deleter: "); |
| 1085 | deleter()->ShortPrint(out); |
| 1086 | PrintF(out, "\n - enumerator: "); |
| 1087 | enumerator()->ShortPrint(out); |
| 1088 | PrintF(out, "\n - data: "); |
| 1089 | data()->ShortPrint(out); |
| 1090 | } |
| 1091 | |
| 1092 | |
| 1093 | void CallHandlerInfo::CallHandlerInfoPrint(FILE* out) { |
| 1094 | HeapObject::PrintHeader(out, "CallHandlerInfo"); |
| 1095 | PrintF(out, "\n - callback: "); |
| 1096 | callback()->ShortPrint(out); |
| 1097 | PrintF(out, "\n - data: "); |
| 1098 | data()->ShortPrint(out); |
| 1099 | PrintF(out, "\n - call_stub_cache: "); |
| 1100 | } |
| 1101 | |
| 1102 | |
| 1103 | void FunctionTemplateInfo::FunctionTemplateInfoPrint(FILE* out) { |
| 1104 | HeapObject::PrintHeader(out, "FunctionTemplateInfo"); |
| 1105 | PrintF(out, "\n - class name: "); |
| 1106 | class_name()->ShortPrint(out); |
| 1107 | PrintF(out, "\n - tag: "); |
| 1108 | tag()->ShortPrint(out); |
| 1109 | PrintF(out, "\n - property_list: "); |
| 1110 | property_list()->ShortPrint(out); |
| 1111 | PrintF(out, "\n - serial_number: "); |
| 1112 | serial_number()->ShortPrint(out); |
| 1113 | PrintF(out, "\n - call_code: "); |
| 1114 | call_code()->ShortPrint(out); |
| 1115 | PrintF(out, "\n - property_accessors: "); |
| 1116 | property_accessors()->ShortPrint(out); |
| 1117 | PrintF(out, "\n - prototype_template: "); |
| 1118 | prototype_template()->ShortPrint(out); |
| 1119 | PrintF(out, "\n - parent_template: "); |
| 1120 | parent_template()->ShortPrint(out); |
| 1121 | PrintF(out, "\n - named_property_handler: "); |
| 1122 | named_property_handler()->ShortPrint(out); |
| 1123 | PrintF(out, "\n - indexed_property_handler: "); |
| 1124 | indexed_property_handler()->ShortPrint(out); |
| 1125 | PrintF(out, "\n - instance_template: "); |
| 1126 | instance_template()->ShortPrint(out); |
| 1127 | PrintF(out, "\n - signature: "); |
| 1128 | signature()->ShortPrint(out); |
| 1129 | PrintF(out, "\n - access_check_info: "); |
| 1130 | access_check_info()->ShortPrint(out); |
| 1131 | PrintF(out, "\n - hidden_prototype: %s", |
| 1132 | hidden_prototype() ? "true" : "false"); |
| 1133 | PrintF(out, "\n - undetectable: %s", undetectable() ? "true" : "false"); |
| 1134 | PrintF(out, "\n - need_access_check: %s", |
| 1135 | needs_access_check() ? "true" : "false"); |
| 1136 | } |
| 1137 | |
| 1138 | |
| 1139 | void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) { |
| 1140 | HeapObject::PrintHeader(out, "ObjectTemplateInfo"); |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 1141 | PrintF(out, " - tag: "); |
| 1142 | tag()->ShortPrint(out); |
| 1143 | PrintF(out, "\n - property_list: "); |
| 1144 | property_list()->ShortPrint(out); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1145 | PrintF(out, "\n - constructor: "); |
| 1146 | constructor()->ShortPrint(out); |
| 1147 | PrintF(out, "\n - internal_field_count: "); |
| 1148 | internal_field_count()->ShortPrint(out); |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 1149 | PrintF(out, "\n"); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1150 | } |
| 1151 | |
| 1152 | |
| 1153 | void SignatureInfo::SignatureInfoPrint(FILE* out) { |
| 1154 | HeapObject::PrintHeader(out, "SignatureInfo"); |
| 1155 | PrintF(out, "\n - receiver: "); |
| 1156 | receiver()->ShortPrint(out); |
| 1157 | PrintF(out, "\n - args: "); |
| 1158 | args()->ShortPrint(out); |
| 1159 | } |
| 1160 | |
| 1161 | |
| 1162 | void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { |
| 1163 | HeapObject::PrintHeader(out, "TypeSwitchInfo"); |
| 1164 | PrintF(out, "\n - types: "); |
| 1165 | types()->ShortPrint(out); |
| 1166 | } |
| 1167 | |
| 1168 | |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1169 | void AllocationSite::AllocationSitePrint(FILE* out) { |
| 1170 | HeapObject::PrintHeader(out, "AllocationSite"); |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 1171 | PrintF(out, " - weak_next: "); |
| 1172 | weak_next()->ShortPrint(out); |
| 1173 | PrintF(out, "\n"); |
| 1174 | |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1175 | PrintF(out, " - transition_info: "); |
| 1176 | if (transition_info()->IsCell()) { |
| 1177 | Cell* cell = Cell::cast(transition_info()); |
yangguo@chromium.org | 4a9f655 | 2013-03-04 14:46:33 +0000 | [diff] [blame] | 1178 | Object* cell_contents = cell->value(); |
| 1179 | if (cell_contents->IsSmi()) { |
| 1180 | ElementsKind kind = static_cast<ElementsKind>( |
| 1181 | Smi::cast(cell_contents)->value()); |
| 1182 | PrintF(out, "Array allocation with ElementsKind "); |
| 1183 | PrintElementsKind(out, kind); |
| 1184 | PrintF(out, "\n"); |
| 1185 | return; |
| 1186 | } |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1187 | } else if (transition_info()->IsJSArray()) { |
jkummerow@chromium.org | 59297c7 | 2013-01-09 16:32:23 +0000 | [diff] [blame] | 1188 | PrintF(out, "Array literal "); |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1189 | transition_info()->ShortPrint(out); |
jkummerow@chromium.org | 59297c7 | 2013-01-09 16:32:23 +0000 | [diff] [blame] | 1190 | PrintF(out, "\n"); |
| 1191 | return; |
| 1192 | } |
| 1193 | |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1194 | PrintF(out, "unknown transition_info"); |
| 1195 | transition_info()->ShortPrint(out); |
jkummerow@chromium.org | 59297c7 | 2013-01-09 16:32:23 +0000 | [diff] [blame] | 1196 | PrintF(out, "\n"); |
| 1197 | } |
| 1198 | |
| 1199 | |
jkummerow@chromium.org | ba72ec8 | 2013-07-22 09:21:20 +0000 | [diff] [blame] | 1200 | void AllocationMemento::AllocationMementoPrint(FILE* out) { |
| 1201 | HeapObject::PrintHeader(out, "AllocationMemento"); |
danno@chromium.org | bee5199 | 2013-07-10 14:57:15 +0000 | [diff] [blame] | 1202 | PrintF(out, " - allocation site: "); |
| 1203 | if (IsValid()) { |
| 1204 | GetAllocationSite()->Print(); |
| 1205 | } else { |
| 1206 | PrintF(out, "<invalid>\n"); |
| 1207 | } |
| 1208 | } |
| 1209 | |
| 1210 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1211 | void Script::ScriptPrint(FILE* out) { |
| 1212 | HeapObject::PrintHeader(out, "Script"); |
| 1213 | PrintF(out, "\n - source: "); |
| 1214 | source()->ShortPrint(out); |
| 1215 | PrintF(out, "\n - name: "); |
| 1216 | name()->ShortPrint(out); |
| 1217 | PrintF(out, "\n - line_offset: "); |
| 1218 | line_offset()->ShortPrint(out); |
| 1219 | PrintF(out, "\n - column_offset: "); |
| 1220 | column_offset()->ShortPrint(out); |
| 1221 | PrintF(out, "\n - type: "); |
| 1222 | type()->ShortPrint(out); |
| 1223 | PrintF(out, "\n - id: "); |
| 1224 | id()->ShortPrint(out); |
| 1225 | PrintF(out, "\n - data: "); |
| 1226 | data()->ShortPrint(out); |
| 1227 | PrintF(out, "\n - context data: "); |
| 1228 | context_data()->ShortPrint(out); |
| 1229 | PrintF(out, "\n - wrapper: "); |
| 1230 | wrapper()->ShortPrint(out); |
danno@chromium.org | d3c4210 | 2013-08-01 16:58:23 +0000 | [diff] [blame] | 1231 | PrintF(out, "\n - compilation type: %d", compilation_type()); |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1232 | PrintF(out, "\n - line ends: "); |
| 1233 | line_ends()->ShortPrint(out); |
| 1234 | PrintF(out, "\n - eval from shared: "); |
| 1235 | eval_from_shared()->ShortPrint(out); |
| 1236 | PrintF(out, "\n - eval from instructions offset: "); |
| 1237 | eval_from_instructions_offset()->ShortPrint(out); |
| 1238 | PrintF(out, "\n"); |
| 1239 | } |
| 1240 | |
| 1241 | |
| 1242 | #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1243 | void DebugInfo::DebugInfoPrint(FILE* out) { |
| 1244 | HeapObject::PrintHeader(out, "DebugInfo"); |
| 1245 | PrintF(out, "\n - shared: "); |
| 1246 | shared()->ShortPrint(out); |
| 1247 | PrintF(out, "\n - original_code: "); |
| 1248 | original_code()->ShortPrint(out); |
| 1249 | PrintF(out, "\n - code: "); |
| 1250 | code()->ShortPrint(out); |
| 1251 | PrintF(out, "\n - break_points: "); |
| 1252 | break_points()->Print(out); |
| 1253 | } |
| 1254 | |
| 1255 | |
| 1256 | void BreakPointInfo::BreakPointInfoPrint(FILE* out) { |
| 1257 | HeapObject::PrintHeader(out, "BreakPointInfo"); |
| 1258 | PrintF(out, "\n - code_position: %d", code_position()->value()); |
| 1259 | PrintF(out, "\n - source_position: %d", source_position()->value()); |
| 1260 | PrintF(out, "\n - statement_position: %d", statement_position()->value()); |
| 1261 | PrintF(out, "\n - break_point_objects: "); |
| 1262 | break_point_objects()->ShortPrint(out); |
| 1263 | } |
| 1264 | #endif // ENABLE_DEBUGGER_SUPPORT |
| 1265 | |
| 1266 | |
| 1267 | void DescriptorArray::PrintDescriptors(FILE* out) { |
| 1268 | PrintF(out, "Descriptor array %d\n", number_of_descriptors()); |
| 1269 | for (int i = 0; i < number_of_descriptors(); i++) { |
| 1270 | PrintF(out, " %d: ", i); |
| 1271 | Descriptor desc; |
| 1272 | Get(i, &desc); |
| 1273 | desc.Print(out); |
| 1274 | } |
| 1275 | PrintF(out, "\n"); |
| 1276 | } |
| 1277 | |
| 1278 | |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 1279 | void TransitionArray::PrintTransitions(FILE* out) { |
| 1280 | PrintF(out, "Transition array %d\n", number_of_transitions()); |
| 1281 | for (int i = 0; i < number_of_transitions(); i++) { |
| 1282 | PrintF(out, " %d: ", i); |
ulan@chromium.org | 750145a | 2013-03-07 15:14:13 +0000 | [diff] [blame] | 1283 | GetKey(i)->NamePrint(out); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 1284 | PrintF(out, ": "); |
| 1285 | switch (GetTargetDetails(i).type()) { |
| 1286 | case FIELD: { |
| 1287 | PrintF(out, " (transition to field)\n"); |
| 1288 | break; |
| 1289 | } |
jkummerow@chromium.org | fb732b1 | 2013-07-26 10:27:09 +0000 | [diff] [blame] | 1290 | case CONSTANT: |
| 1291 | PrintF(out, " (transition to constant)\n"); |
yangguo@chromium.org | 99aa490 | 2012-07-06 16:21:55 +0000 | [diff] [blame] | 1292 | break; |
| 1293 | case CALLBACKS: |
| 1294 | PrintF(out, " (transition to callback)\n"); |
| 1295 | break; |
| 1296 | // Values below are never in the target descriptor array. |
| 1297 | case NORMAL: |
| 1298 | case HANDLER: |
| 1299 | case INTERCEPTOR: |
| 1300 | case TRANSITION: |
| 1301 | case NONEXISTENT: |
| 1302 | UNREACHABLE(); |
| 1303 | break; |
| 1304 | } |
| 1305 | } |
| 1306 | PrintF(out, "\n"); |
| 1307 | } |
| 1308 | |
| 1309 | |
fschneider@chromium.org | 9e3e0b6 | 2011-01-03 10:16:46 +0000 | [diff] [blame] | 1310 | #endif // OBJECT_PRINT |
| 1311 | |
| 1312 | |
| 1313 | } } // namespace v8::internal |