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

Side by Side Diff: src/ostreams.cc

Issue 2050213002: [wasm] Implement AST printing into an ostream (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactor-function-names-table
Patch Set: address ahaas' comments Created 4 years, 6 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
« no previous file with comments | « src/ostreams.h ('k') | src/wasm/ast-decoder.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 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
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
OLDNEW
« no previous file with comments | « src/ostreams.h ('k') | src/wasm/ast-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698