OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 break; | 308 break; |
309 } | 309 } |
310 case CONSTANT_FUNCTION: | 310 case CONSTANT_FUNCTION: |
311 descs->GetConstantFunction(i)->ShortPrint(out); | 311 descs->GetConstantFunction(i)->ShortPrint(out); |
312 PrintF(out, " (constant function)\n"); | 312 PrintF(out, " (constant function)\n"); |
313 break; | 313 break; |
314 case CALLBACKS: | 314 case CALLBACKS: |
315 descs->GetCallbacksObject(i)->ShortPrint(out); | 315 descs->GetCallbacksObject(i)->ShortPrint(out); |
316 PrintF(out, " (callback)\n"); | 316 PrintF(out, " (callback)\n"); |
317 break; | 317 break; |
318 case ELEMENTS_TRANSITION: | 318 case ELEMENTS_TRANSITION: { |
319 PrintF(out, "(elements transition to "); | 319 PrintF(out, "(elements transition to "); |
320 PrintElementsKind(out, | 320 Object* descriptor_contents = descs->GetValue(i); |
321 Map::cast(descs->GetValue(i))->elements_kind()); | 321 if (descriptor_contents->IsMap()) { |
| 322 Map* map = Map::cast(descriptor_contents); |
| 323 PrintElementsKind(out, map->elements_kind()); |
| 324 } else { |
| 325 FixedArray* map_array = FixedArray::cast(descriptor_contents); |
| 326 for (int i = 0; i < map_array->length(); ++i) { |
| 327 Map* map = Map::cast(map_array->get(i)); |
| 328 if (i != 0) { |
| 329 PrintF(out, ", "); |
| 330 } |
| 331 PrintElementsKind(out, map->elements_kind()); |
| 332 } |
| 333 } |
322 PrintF(out, ")\n"); | 334 PrintF(out, ")\n"); |
323 break; | 335 break; |
| 336 } |
324 case MAP_TRANSITION: | 337 case MAP_TRANSITION: |
325 PrintF(out, "(map transition)\n"); | 338 PrintF(out, "(map transition)\n"); |
326 break; | 339 break; |
327 case CONSTANT_TRANSITION: | 340 case CONSTANT_TRANSITION: |
328 PrintF(out, "(constant transition)\n"); | 341 PrintF(out, "(constant transition)\n"); |
329 break; | 342 break; |
330 case NULL_DESCRIPTOR: | 343 case NULL_DESCRIPTOR: |
331 PrintF(out, "(null descriptor)\n"); | 344 PrintF(out, "(null descriptor)\n"); |
332 break; | 345 break; |
333 default: | 346 default: |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 desc.Print(out); | 997 desc.Print(out); |
985 } | 998 } |
986 PrintF(out, "\n"); | 999 PrintF(out, "\n"); |
987 } | 1000 } |
988 | 1001 |
989 | 1002 |
990 #endif // OBJECT_PRINT | 1003 #endif // OBJECT_PRINT |
991 | 1004 |
992 | 1005 |
993 } } // namespace v8::internal | 1006 } } // namespace v8::internal |
OLD | NEW |