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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index f4b4a4fa890a07b452fa6db4cd94e4367382f75b..a7a1e0cc956f7257848bd6cc4face7bd87e60be6 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -95,6 +95,9 @@ void HeapObject::HeapObjectPrint(FILE* out) {
case FIXED_DOUBLE_ARRAY_TYPE:
FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out);
break;
+ case CONSTANT_POOL_ARRAY_TYPE:
+ ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(out);
+ break;
case FIXED_ARRAY_TYPE:
FixedArray::cast(this)->FixedArrayPrint(out);
break;
@@ -630,6 +633,20 @@ void FixedDoubleArray::FixedDoubleArrayPrint(FILE* out) {
}
+void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) {
+ HeapObject::PrintHeader(out, "ConstantPoolArray");
+ PrintF(out, " - length: %d", length());
+ for (int i = 0; i < length(); i++) {
+ if (i < first_int32_index()) {
+ PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i));
+ } else {
+ PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i));
+ }
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,
+ }
+ PrintF(out, "\n");
+}
+
+
void JSValue::JSValuePrint(FILE* out) {
HeapObject::PrintHeader(out, "ValueObject");
value()->Print(out);

Powered by Google App Engine
This is Rietveld 408576698