OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 case EXTERNAL_FLOAT_ELEMENTS: { | 377 case EXTERNAL_FLOAT_ELEMENTS: { |
378 ExternalFloatArray* p = ExternalFloatArray::cast(elements()); | 378 ExternalFloatArray* p = ExternalFloatArray::cast(elements()); |
379 for (int i = 0; i < p->length(); i++) { | 379 for (int i = 0; i < p->length(); i++) { |
380 PrintF(out, " %d: %f\n", i, p->get_scalar(i)); | 380 PrintF(out, " %d: %f\n", i, p->get_scalar(i)); |
381 } | 381 } |
382 break; | 382 break; |
383 } | 383 } |
384 case EXTERNAL_DOUBLE_ELEMENTS: { | 384 case EXTERNAL_DOUBLE_ELEMENTS: { |
385 ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); | 385 ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); |
386 for (int i = 0; i < p->length(); i++) { | 386 for (int i = 0; i < p->length(); i++) { |
387 PrintF(out, " %d: %f\n", i, p->get_scalar(i)); | 387 PrintF(out, " %d: %f\n", i, p->get_scalar(i)); |
388 } | 388 } |
389 break; | 389 break; |
390 } | 390 } |
391 case DICTIONARY_ELEMENTS: | 391 case DICTIONARY_ELEMENTS: |
392 elements()->Print(out); | 392 elements()->Print(out); |
393 break; | 393 break; |
394 case NON_STRICT_ARGUMENTS_ELEMENTS: { | 394 case NON_STRICT_ARGUMENTS_ELEMENTS: { |
395 FixedArray* p = FixedArray::cast(elements()); | 395 FixedArray* p = FixedArray::cast(elements()); |
396 PrintF(out, " parameter map:"); | |
396 for (int i = 2; i < p->length(); i++) { | 397 for (int i = 2; i < p->length(); i++) { |
397 PrintF(out, " %d: ", i); | 398 PrintF(out, " %d:", i - 2); |
Toon Verwaest
2012/11/28 13:20:54
Magic constants ftw. If there is a k-version of th
| |
398 p->get(i)->ShortPrint(out); | 399 p->get(i)->ShortPrint(out); |
399 PrintF(out, "\n"); | |
400 } | 400 } |
401 PrintF(out, "\n context: "); | |
402 p->get(0)->ShortPrint(out); | |
403 PrintF(out, "\n arguments: "); | |
404 p->get(1)->ShortPrint(out); | |
405 PrintF(out, "\n"); | |
401 break; | 406 break; |
402 } | 407 } |
403 } | 408 } |
404 } | 409 } |
405 | 410 |
406 | 411 |
407 void JSObject::PrintTransitions(FILE* out) { | 412 void JSObject::PrintTransitions(FILE* out) { |
408 if (!map()->HasTransitionArray()) return; | 413 if (!map()->HasTransitionArray()) return; |
409 TransitionArray* transitions = map()->transitions(); | 414 TransitionArray* transitions = map()->transitions(); |
410 for (int i = 0; i < transitions->number_of_transitions(); i++) { | 415 for (int i = 0; i < transitions->number_of_transitions(); i++) { |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1094 } | 1099 } |
1095 } | 1100 } |
1096 PrintF(out, "\n"); | 1101 PrintF(out, "\n"); |
1097 } | 1102 } |
1098 | 1103 |
1099 | 1104 |
1100 #endif // OBJECT_PRINT | 1105 #endif // OBJECT_PRINT |
1101 | 1106 |
1102 | 1107 |
1103 } } // namespace v8::internal | 1108 } } // namespace v8::internal |
OLD | NEW |