Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 <algorithm> | 5 #include <algorithm> | 
| 6 #include <cmath> | 6 #include <cmath> | 
| 7 | 7 | 
| 8 #include "src/base/platform/platform.h" // For isinf/isnan with MSVC | 8 #include "src/base/platform/platform.h" // For isinf/isnan with MSVC | 
| 9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" | 
| 10 | 10 | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 | 158 | 
| 159 | 159 | 
| 160 OFStream& OFStream::flush() { | 160 OFStream& OFStream::flush() { | 
| 161 if (f_) fflush(f_); | 161 if (f_) fflush(f_); | 
| 162 return *this; | 162 return *this; | 
| 163 } | 163 } | 
| 164 | 164 | 
| 165 | 165 | 
| 166 OStream& operator<<(OStream& os, const AsUC16& c) { | 166 OStream& operator<<(OStream& os, const AsUC16& c) { | 
| 167 char buf[10]; | 167 char buf[10]; | 
| 168 const char* format = (0x20 <= c.value && c.value <= 0x7F) | 168 const char* format = (c.value == '\n') || (c.value == '\t') || | 
| 169 (c.value == '\r') || | |
| 
 
Sven Panne
2014/08/25 13:07:20
This indentation looks funny, is "git cl format" h
 
Vyacheslav Egorov (Google)
2014/08/25 15:56:33
The funny indentation is actually the result of ap
 
 | |
| 170 (0x20 <= c.value && c.value <= 0x7F) | |
| 169 ? "%c" | 171 ? "%c" | 
| 170 : (c.value <= 0xff) ? "\\x%02x" : "\\u%04x"; | 172 : (c.value <= 0xff) ? "\\x%02x" : "\\u%04x"; | 
| 171 snprintf(buf, sizeof(buf), format, c.value); | 173 snprintf(buf, sizeof(buf), format, c.value); | 
| 172 return os << buf; | 174 return os << buf; | 
| 173 } | 175 } | 
| 174 } } // namespace v8::internal | 176 } } // namespace v8::internal | 
| OLD | NEW |