| 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 "src/ostreams.h" | 5 #include "src/ostreams.h" |
| 6 #include "src/objects.h" | 6 #include "src/objects.h" |
| 7 | 7 |
| 8 #if V8_OS_WIN | 8 #if V8_OS_WIN |
| 9 #if _MSC_VER < 1900 | 9 #if _MSC_VER < 1900 |
| 10 #define snprintf sprintf_s | 10 #define snprintf sprintf_s |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { | 91 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { |
| 92 return PrintUC16(os, c.value, IsPrint); | 92 return PrintUC16(os, c.value, IsPrint); |
| 93 } | 93 } |
| 94 | 94 |
| 95 | 95 |
| 96 std::ostream& operator<<(std::ostream& os, const AsUC32& c) { | 96 std::ostream& operator<<(std::ostream& os, const AsUC32& c) { |
| 97 return PrintUC32(os, c.value, IsPrint); | 97 return PrintUC32(os, c.value, IsPrint); |
| 98 } | 98 } |
| 99 | 99 |
| 100 std::ostream& operator<<(std::ostream& os, const AsHex& hex) { |
| 101 char buf[20]; |
| 102 snprintf(buf, sizeof(buf), "%.*" PRIx64, hex.min_width, hex.value); |
| 103 return os << buf; |
| 104 } |
| 105 |
| 100 } // namespace internal | 106 } // namespace internal |
| 101 } // namespace v8 | 107 } // namespace v8 |
| OLD | NEW |