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

Side by Side Diff: src/ostreams.h

Issue 882973002: [turbofan] Improve JSON output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ASAN Created 5 years, 10 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
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 #ifndef V8_OSTREAMS_H_ 5 #ifndef V8_OSTREAMS_H_
6 #define V8_OSTREAMS_H_ 6 #define V8_OSTREAMS_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdio> 9 #include <cstdio>
10 #include <cstring> 10 #include <cstring>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 explicit AsUC16(uint16_t v) : value(v) {} 48 explicit AsUC16(uint16_t v) : value(v) {}
49 uint16_t value; 49 uint16_t value;
50 }; 50 };
51 51
52 52
53 struct AsReversiblyEscapedUC16 { 53 struct AsReversiblyEscapedUC16 {
54 explicit AsReversiblyEscapedUC16(uint16_t v) : value(v) {} 54 explicit AsReversiblyEscapedUC16(uint16_t v) : value(v) {}
55 uint16_t value; 55 uint16_t value;
56 }; 56 };
57 57
58 struct AsEscapedUC16ForJSON {
59 explicit AsEscapedUC16ForJSON(uint16_t v) : value(v) {}
60 uint16_t value;
61 };
62
58 63
59 // Writes the given character to the output escaping everything outside of 64 // Writes the given character to the output escaping everything outside of
60 // printable/space ASCII range. Additionally escapes '\' making escaping 65 // printable/space ASCII range. Additionally escapes '\' making escaping
61 // reversible. 66 // reversible.
62 std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c); 67 std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c);
63 68
69 // Same as AsReversiblyEscapedUC16 with additional escaping of \n, \r, " and '.
70 std::ostream& operator<<(std::ostream& os, const AsEscapedUC16ForJSON& c);
71
64 // Writes the given character to the output escaping everything outside 72 // Writes the given character to the output escaping everything outside
65 // of printable ASCII range. 73 // of printable ASCII range.
66 std::ostream& operator<<(std::ostream& os, const AsUC16& c); 74 std::ostream& operator<<(std::ostream& os, const AsUC16& c);
67 75
68 } // namespace internal 76 } // namespace internal
69 } // namespace v8 77 } // namespace v8
70 78
71 #endif // V8_OSTREAMS_H_ 79 #endif // V8_OSTREAMS_H_
OLDNEW
« src/compiler/pipeline.cc ('K') | « src/objects-inl.h ('k') | src/ostreams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698