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

Side by Side Diff: src/mips/simulator-mips.cc

Issue 373773002: MIPS: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 PrintF("print <fpu register> single\n"); 448 PrintF("print <fpu register> single\n");
449 } 449 }
450 } else { 450 } else {
451 PrintF("print <register> or print <fpu register> single\n"); 451 PrintF("print <register> or print <fpu register> single\n");
452 } 452 }
453 } 453 }
454 } else if ((strcmp(cmd, "po") == 0) 454 } else if ((strcmp(cmd, "po") == 0)
455 || (strcmp(cmd, "printobject") == 0)) { 455 || (strcmp(cmd, "printobject") == 0)) {
456 if (argc == 2) { 456 if (argc == 2) {
457 int32_t value; 457 int32_t value;
458 OFStream os(stdout);
458 if (GetValue(arg1, &value)) { 459 if (GetValue(arg1, &value)) {
459 Object* obj = reinterpret_cast<Object*>(value); 460 Object* obj = reinterpret_cast<Object*>(value);
460 PrintF("%s: \n", arg1); 461 os << arg1 << ": \n";
461 #ifdef DEBUG 462 #ifdef DEBUG
462 obj->PrintLn(); 463 obj->Print(os);
464 os << "\n";
463 #else 465 #else
464 obj->ShortPrint(); 466 os << Brief(obj) << "\n";
465 PrintF("\n");
466 #endif 467 #endif
467 } else { 468 } else {
468 PrintF("%s unrecognized\n", arg1); 469 os << arg1 << " unrecognized\n";
469 } 470 }
470 } else { 471 } else {
471 PrintF("printobject <value>\n"); 472 PrintF("printobject <value>\n");
472 } 473 }
473 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { 474 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) {
474 int32_t* cur = NULL; 475 int32_t* cur = NULL;
475 int32_t* end = NULL; 476 int32_t* end = NULL;
476 int next_arg = 1; 477 int next_arg = 1;
477 478
478 if (strcmp(cmd, "stack") == 0) { 479 if (strcmp(cmd, "stack") == 0) {
(...skipping 2438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2917 } 2918 }
2918 2919
2919 2920
2920 #undef UNSUPPORTED 2921 #undef UNSUPPORTED
2921 2922
2922 } } // namespace v8::internal 2923 } } // namespace v8::internal
2923 2924
2924 #endif // USE_SIMULATOR 2925 #endif // USE_SIMULATOR
2925 2926
2926 #endif // V8_TARGET_ARCH_MIPS 2927 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698