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

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

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. 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/arm64/lithium-arm64.cc ('k') | src/assembler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <cmath> 6 #include <cmath>
7 #include <cstdarg> 7 #include <cstdarg>
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #if V8_TARGET_ARCH_ARM64 10 #if V8_TARGET_ARCH_ARM64
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after
3337 " Print the content of a register. (alias 'p')\n" 3337 " Print the content of a register. (alias 'p')\n"
3338 " 'print all' will print all registers.\n" 3338 " 'print all' will print all registers.\n"
3339 " Use 'printobject' to get more details about the value.\n"); 3339 " Use 'printobject' to get more details about the value.\n");
3340 } 3340 }
3341 3341
3342 // printobject / po ------------------------------------------------------ 3342 // printobject / po ------------------------------------------------------
3343 } else if ((strcmp(cmd, "printobject") == 0) || 3343 } else if ((strcmp(cmd, "printobject") == 0) ||
3344 (strcmp(cmd, "po") == 0)) { 3344 (strcmp(cmd, "po") == 0)) {
3345 if (argc == 2) { 3345 if (argc == 2) {
3346 int64_t value; 3346 int64_t value;
3347 OFStream os(stdout);
3347 if (GetValue(arg1, &value)) { 3348 if (GetValue(arg1, &value)) {
3348 Object* obj = reinterpret_cast<Object*>(value); 3349 Object* obj = reinterpret_cast<Object*>(value);
3349 PrintF("%s: \n", arg1); 3350 os << arg1 << ": \n";
3350 #ifdef DEBUG 3351 #ifdef DEBUG
3351 obj->PrintLn(); 3352 obj->Print(os);
3353 os << "\n";
3352 #else 3354 #else
3353 obj->ShortPrint(); 3355 os << Brief(obj) << "\n";
3354 PrintF("\n");
3355 #endif 3356 #endif
3356 } else { 3357 } else {
3357 PrintF("%s unrecognized\n", arg1); 3358 os << arg1 << " unrecognized\n";
3358 } 3359 }
3359 } else { 3360 } else {
3360 PrintF("printobject <value>\n" 3361 PrintF("printobject <value>\n"
3361 "printobject <register>\n" 3362 "printobject <register>\n"
3362 " Print details about the value. (alias 'po')\n"); 3363 " Print details about the value. (alias 'po')\n");
3363 } 3364 }
3364 3365
3365 // stack / mem ---------------------------------------------------------- 3366 // stack / mem ----------------------------------------------------------
3366 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { 3367 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) {
3367 int64_t* cur = NULL; 3368 int64_t* cur = NULL;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
3727 3728
3728 delete[] format; 3729 delete[] format;
3729 } 3730 }
3730 3731
3731 3732
3732 #endif // USE_SIMULATOR 3733 #endif // USE_SIMULATOR
3733 3734
3734 } } // namespace v8::internal 3735 } } // namespace v8::internal
3735 3736
3736 #endif // V8_TARGET_ARCH_ARM64 3737 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698