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

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

Issue 10414022: Merged r11533, r11570 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
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.cc ('k') | src/version.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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 FixedArray* p = FixedArray::cast(elements()); 321 FixedArray* p = FixedArray::cast(elements());
322 for (int i = 0; i < p->length(); i++) { 322 for (int i = 0; i < p->length(); i++) {
323 PrintF(out, " %d: ", i); 323 PrintF(out, " %d: ", i);
324 p->get(i)->ShortPrint(out); 324 p->get(i)->ShortPrint(out);
325 PrintF(out, "\n"); 325 PrintF(out, "\n");
326 } 326 }
327 break; 327 break;
328 } 328 }
329 case FAST_DOUBLE_ELEMENTS: { 329 case FAST_DOUBLE_ELEMENTS: {
330 // Print in array notation for non-sparse arrays. 330 // Print in array notation for non-sparse arrays.
331 FixedDoubleArray* p = FixedDoubleArray::cast(elements()); 331 if (elements()->length() > 0) {
332 for (int i = 0; i < p->length(); i++) { 332 FixedDoubleArray* p = FixedDoubleArray::cast(elements());
333 if (p->is_the_hole(i)) { 333 for (int i = 0; i < p->length(); i++) {
334 PrintF(out, " %d: <the hole>", i); 334 if (p->is_the_hole(i)) {
335 } else { 335 PrintF(out, " %d: <the hole>", i);
336 PrintF(out, " %d: %g", i, p->get_scalar(i)); 336 } else {
337 PrintF(out, " %d: %g", i, p->get_scalar(i));
338 }
339 PrintF(out, "\n");
337 } 340 }
338 PrintF(out, "\n");
339 } 341 }
340 break; 342 break;
341 } 343 }
342 case EXTERNAL_PIXEL_ELEMENTS: { 344 case EXTERNAL_PIXEL_ELEMENTS: {
343 ExternalPixelArray* p = ExternalPixelArray::cast(elements()); 345 ExternalPixelArray* p = ExternalPixelArray::cast(elements());
344 for (int i = 0; i < p->length(); i++) { 346 for (int i = 0; i < p->length(); i++) {
345 PrintF(out, " %d: %d\n", i, p->get_scalar(i)); 347 PrintF(out, " %d: %d\n", i, p->get_scalar(i));
346 } 348 }
347 break; 349 break;
348 } 350 }
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 desc.Print(out); 1013 desc.Print(out);
1012 } 1014 }
1013 PrintF(out, "\n"); 1015 PrintF(out, "\n");
1014 } 1016 }
1015 1017
1016 1018
1017 #endif // OBJECT_PRINT 1019 #endif // OBJECT_PRINT
1018 1020
1019 1021
1020 } } // namespace v8::internal 1022 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698