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

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

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } else { 311 } else {
312 property_dictionary()->Print(out); 312 property_dictionary()->Print(out);
313 } 313 }
314 } 314 }
315 315
316 316
317 void JSObject::PrintElements(FILE* out) { 317 void JSObject::PrintElements(FILE* out) {
318 // Don't call GetElementsKind, its validation code can cause the printer to 318 // Don't call GetElementsKind, its validation code can cause the printer to
319 // fail when debugging. 319 // fail when debugging.
320 switch (map()->elements_kind()) { 320 switch (map()->elements_kind()) {
321 case FAST_HOLEY_SMI_ELEMENTS: 321 case FAST_SMI_ONLY_ELEMENTS:
322 case FAST_SMI_ELEMENTS:
323 case FAST_HOLEY_ELEMENTS:
324 case FAST_ELEMENTS: { 322 case FAST_ELEMENTS: {
325 // Print in array notation for non-sparse arrays. 323 // Print in array notation for non-sparse arrays.
326 FixedArray* p = FixedArray::cast(elements()); 324 FixedArray* p = FixedArray::cast(elements());
327 for (int i = 0; i < p->length(); i++) { 325 for (int i = 0; i < p->length(); i++) {
328 PrintF(out, " %d: ", i); 326 PrintF(out, " %d: ", i);
329 p->get(i)->ShortPrint(out); 327 p->get(i)->ShortPrint(out);
330 PrintF(out, "\n"); 328 PrintF(out, "\n");
331 } 329 }
332 break; 330 break;
333 } 331 }
334 case FAST_HOLEY_DOUBLE_ELEMENTS:
335 case FAST_DOUBLE_ELEMENTS: { 332 case FAST_DOUBLE_ELEMENTS: {
336 // Print in array notation for non-sparse arrays. 333 // Print in array notation for non-sparse arrays.
337 if (elements()->length() > 0) { 334 if (elements()->length() > 0) {
338 FixedDoubleArray* p = FixedDoubleArray::cast(elements()); 335 FixedDoubleArray* p = FixedDoubleArray::cast(elements());
339 for (int i = 0; i < p->length(); i++) { 336 for (int i = 0; i < p->length(); i++) {
340 if (p->is_the_hole(i)) { 337 if (p->is_the_hole(i)) {
341 PrintF(out, " %d: <the hole>", i); 338 PrintF(out, " %d: <the hole>", i);
342 } else { 339 } else {
343 PrintF(out, " %d: %g", i, p->get_scalar(i)); 340 PrintF(out, " %d: %g", i, p->get_scalar(i));
344 } 341 }
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 desc.Print(out); 1030 desc.Print(out);
1034 } 1031 }
1035 PrintF(out, "\n"); 1032 PrintF(out, "\n");
1036 } 1033 }
1037 1034
1038 1035
1039 #endif // OBJECT_PRINT 1036 #endif // OBJECT_PRINT
1040 1037
1041 1038
1042 } } // namespace v8::internal 1039 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698