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

Side by Side Diff: src/utils.cc

Issue 5998001: 1. Added support for object printing for release mode using the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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/string-stream.cc ('k') | src/v8utils.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 27 matching lines...) Expand all
38 38
39 39
40 void PrintF(const char* format, ...) { 40 void PrintF(const char* format, ...) {
41 va_list arguments; 41 va_list arguments;
42 va_start(arguments, format); 42 va_start(arguments, format);
43 OS::VPrint(format, arguments); 43 OS::VPrint(format, arguments);
44 va_end(arguments); 44 va_end(arguments);
45 } 45 }
46 46
47 47
48 void Flush() { 48 void PrintF(FILE* out, const char* format, ...) {
49 fflush(stdout); 49 va_list arguments;
50 va_start(arguments, format);
51 OS::VFPrint(out, format, arguments);
52 va_end(arguments);
53 }
54
55
56 void Flush(FILE* out) {
57 fflush(out);
50 } 58 }
51 59
52 60
53 char* ReadLine(const char* prompt) { 61 char* ReadLine(const char* prompt) {
54 char* result = NULL; 62 char* result = NULL;
55 char line_buf[256]; 63 char line_buf[256];
56 int offset = 0; 64 int offset = 0;
57 bool keep_going = true; 65 bool keep_going = true;
58 fprintf(stdout, "%s", prompt); 66 fprintf(stdout, "%s", prompt);
59 fflush(stdout); 67 fflush(stdout);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Make sure nobody managed to add a 0-character to the 270 // Make sure nobody managed to add a 0-character to the
263 // buffer while building the string. 271 // buffer while building the string.
264 ASSERT(strlen(buffer_.start()) == static_cast<size_t>(position_)); 272 ASSERT(strlen(buffer_.start()) == static_cast<size_t>(position_));
265 position_ = -1; 273 position_ = -1;
266 ASSERT(is_finalized()); 274 ASSERT(is_finalized());
267 return buffer_.start(); 275 return buffer_.start();
268 } 276 }
269 277
270 278
271 } } // namespace v8::internal 279 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/string-stream.cc ('k') | src/v8utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698