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

Side by Side Diff: src/arm/simulator-arm.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/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.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 // 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 <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 PrintF("%s unrecognized\n", arg1); 335 PrintF("%s unrecognized\n", arg1);
336 } 336 }
337 } 337 }
338 } else { 338 } else {
339 PrintF("print <register>\n"); 339 PrintF("print <register>\n");
340 } 340 }
341 } else if ((strcmp(cmd, "po") == 0) 341 } else if ((strcmp(cmd, "po") == 0)
342 || (strcmp(cmd, "printobject") == 0)) { 342 || (strcmp(cmd, "printobject") == 0)) {
343 if (argc == 2) { 343 if (argc == 2) {
344 int32_t value; 344 int32_t value;
345 OFStream os(stdout);
345 if (GetValue(arg1, &value)) { 346 if (GetValue(arg1, &value)) {
346 Object* obj = reinterpret_cast<Object*>(value); 347 Object* obj = reinterpret_cast<Object*>(value);
347 PrintF("%s: \n", arg1); 348 os << arg1 << ": \n";
348 #ifdef DEBUG 349 #ifdef DEBUG
349 obj->PrintLn(); 350 obj->Print(os);
351 os << "\n";
350 #else 352 #else
351 obj->ShortPrint(); 353 os << Brief(obj) << "\n";
352 PrintF("\n");
353 #endif 354 #endif
354 } else { 355 } else {
355 PrintF("%s unrecognized\n", arg1); 356 os << arg1 << " unrecognized\n";
356 } 357 }
357 } else { 358 } else {
358 PrintF("printobject <value>\n"); 359 PrintF("printobject <value>\n");
359 } 360 }
360 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { 361 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) {
361 int32_t* cur = NULL; 362 int32_t* cur = NULL;
362 int32_t* end = NULL; 363 int32_t* end = NULL;
363 int next_arg = 1; 364 int next_arg = 1;
364 365
365 if (strcmp(cmd, "stack") == 0) { 366 if (strcmp(cmd, "stack") == 0) {
(...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 uintptr_t address = *stack_slot; 3830 uintptr_t address = *stack_slot;
3830 set_register(sp, current_sp + sizeof(uintptr_t)); 3831 set_register(sp, current_sp + sizeof(uintptr_t));
3831 return address; 3832 return address;
3832 } 3833 }
3833 3834
3834 } } // namespace v8::internal 3835 } } // namespace v8::internal
3835 3836
3836 #endif // USE_SIMULATOR 3837 #endif // USE_SIMULATOR
3837 3838
3838 #endif // V8_TARGET_ARCH_ARM 3839 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698