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

Side by Side Diff: src/ostreams.cc

Issue 786763002: Silence --trace-turbo a bit and behave graceful in sandbox. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/compiler/pipeline.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "src/ostreams.h" 5 #include "src/ostreams.h"
6 6
7 #if V8_OS_WIN 7 #if V8_OS_WIN
8 #define snprintf sprintf_s 8 #define snprintf sprintf_s
9 #endif 9 #endif
10 10
(...skipping 10 matching lines...) Expand all
21 std::fflush(f_); 21 std::fflush(f_);
22 return 0; 22 return 0;
23 } 23 }
24 24
25 25
26 OFStreamBase::int_type OFStreamBase::overflow(int_type c) { 26 OFStreamBase::int_type OFStreamBase::overflow(int_type c) {
27 return (c != EOF) ? std::fputc(c, f_) : c; 27 return (c != EOF) ? std::fputc(c, f_) : c;
28 } 28 }
29 29
30 30
31 OFStream::OFStream(FILE* f) : OFStreamBase(f), std::ostream(this) {} 31 OFStream::OFStream(FILE* f) : OFStreamBase(f), std::ostream(this) {
32 DCHECK_NOT_NULL(f);
33 }
32 34
33 35
34 OFStream::~OFStream() {} 36 OFStream::~OFStream() {}
35 37
36 38
37 namespace { 39 namespace {
38 40
39 // Locale-independent predicates. 41 // Locale-independent predicates.
40 bool IsPrint(uint16_t c) { return 0x20 <= c && c <= 0x7e; } 42 bool IsPrint(uint16_t c) { return 0x20 <= c && c <= 0x7e; }
41 bool IsSpace(uint16_t c) { return (0x9 <= c && c <= 0xd) || c == 0x20; } 43 bool IsSpace(uint16_t c) { return (0x9 <= c && c <= 0xd) || c == 0x20; }
(...skipping 14 matching lines...) Expand all
56 return PrintUC16(os, c.value, IsOK); 58 return PrintUC16(os, c.value, IsOK);
57 } 59 }
58 60
59 61
60 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { 62 std::ostream& operator<<(std::ostream& os, const AsUC16& c) {
61 return PrintUC16(os, c.value, IsPrint); 63 return PrintUC16(os, c.value, IsPrint);
62 } 64 }
63 65
64 } // namespace internal 66 } // namespace internal
65 } // namespace v8 67 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698