Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: src/objects-printer.cc

Issue 22601003: Out-of-line constant pool on Arm: Stage 2 - Introduce ConstantPoolArray object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Enable pointers to be stored in ConstantPoolArray and add tests Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 break; 88 break;
89 case MAP_TYPE: 89 case MAP_TYPE:
90 Map::cast(this)->MapPrint(out); 90 Map::cast(this)->MapPrint(out);
91 break; 91 break;
92 case HEAP_NUMBER_TYPE: 92 case HEAP_NUMBER_TYPE:
93 HeapNumber::cast(this)->HeapNumberPrint(out); 93 HeapNumber::cast(this)->HeapNumberPrint(out);
94 break; 94 break;
95 case FIXED_DOUBLE_ARRAY_TYPE: 95 case FIXED_DOUBLE_ARRAY_TYPE:
96 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); 96 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out);
97 break; 97 break;
98 case CONSTANT_POOL_ARRAY_TYPE:
99 ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(out);
100 break;
98 case FIXED_ARRAY_TYPE: 101 case FIXED_ARRAY_TYPE:
99 FixedArray::cast(this)->FixedArrayPrint(out); 102 FixedArray::cast(this)->FixedArrayPrint(out);
100 break; 103 break;
101 case BYTE_ARRAY_TYPE: 104 case BYTE_ARRAY_TYPE:
102 ByteArray::cast(this)->ByteArrayPrint(out); 105 ByteArray::cast(this)->ByteArrayPrint(out);
103 break; 106 break;
104 case FREE_SPACE_TYPE: 107 case FREE_SPACE_TYPE:
105 FreeSpace::cast(this)->FreeSpacePrint(out); 108 FreeSpace::cast(this)->FreeSpacePrint(out);
106 break; 109 break;
107 case EXTERNAL_PIXEL_ARRAY_TYPE: 110 case EXTERNAL_PIXEL_ARRAY_TYPE:
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 if (is_the_hole(i)) { 626 if (is_the_hole(i)) {
624 PrintF(out, "\n [%d]: <the hole>", i); 627 PrintF(out, "\n [%d]: <the hole>", i);
625 } else { 628 } else {
626 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); 629 PrintF(out, "\n [%d]: %g", i, get_scalar(i));
627 } 630 }
628 } 631 }
629 PrintF(out, "\n"); 632 PrintF(out, "\n");
630 } 633 }
631 634
632 635
636 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) {
637 HeapObject::PrintHeader(out, "ConstantPoolArray");
638 PrintF(out, " - length: %d", length());
639 for (int i = 0; i < length(); i++) {
640 if (i < first_int32_index()) {
641 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i));
642 } else {
643 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i));
644 }
ulan 2013/09/27 12:39:10 The case for pointers is missing.
rmcilroy 2013/10/01 11:21:52 Dang I noticed that after uploading and added it,
645 }
646 PrintF(out, "\n");
647 }
648
649
633 void JSValue::JSValuePrint(FILE* out) { 650 void JSValue::JSValuePrint(FILE* out) {
634 HeapObject::PrintHeader(out, "ValueObject"); 651 HeapObject::PrintHeader(out, "ValueObject");
635 value()->Print(out); 652 value()->Print(out);
636 } 653 }
637 654
638 655
639 void JSMessageObject::JSMessageObjectPrint(FILE* out) { 656 void JSMessageObject::JSMessageObjectPrint(FILE* out) {
640 HeapObject::PrintHeader(out, "JSMessageObject"); 657 HeapObject::PrintHeader(out, "JSMessageObject");
641 PrintF(out, " - type: "); 658 PrintF(out, " - type: ");
642 type()->ShortPrint(out); 659 type()->ShortPrint(out);
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 } 1253 }
1237 } 1254 }
1238 PrintF(out, "\n"); 1255 PrintF(out, "\n");
1239 } 1256 }
1240 1257
1241 1258
1242 #endif // OBJECT_PRINT 1259 #endif // OBJECT_PRINT
1243 1260
1244 1261
1245 } } // namespace v8::internal 1262 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698