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

Side by Side Diff: src/wasm/ast-decoder.h

Issue 1956703002: [wasm] Improve output of PrintAstForDebugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/ast-decoder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_WASM_AST_DECODER_H_ 5 #ifndef V8_WASM_AST_DECODER_H_
6 #define V8_WASM_AST_DECODER_H_ 6 #define V8_WASM_AST_DECODER_H_
7 7
8 #include "src/signature.h" 8 #include "src/signature.h"
9 #include "src/wasm/decoder.h" 9 #include "src/wasm/decoder.h"
10 #include "src/wasm/wasm-opcodes.h" 10 #include "src/wasm/wasm-opcodes.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 typedef Result<Tree*> TreeResult; 217 typedef Result<Tree*> TreeResult;
218 218
219 std::ostream& operator<<(std::ostream& os, const Tree& tree); 219 std::ostream& operator<<(std::ostream& os, const Tree& tree);
220 220
221 TreeResult VerifyWasmCode(base::AccountingAllocator* allocator, 221 TreeResult VerifyWasmCode(base::AccountingAllocator* allocator,
222 FunctionBody& body); 222 FunctionBody& body);
223 TreeResult BuildTFGraph(base::AccountingAllocator* allocator, 223 TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
224 TFBuilder* builder, FunctionBody& body); 224 TFBuilder* builder, FunctionBody& body);
225 void PrintAst(base::AccountingAllocator* allocator, FunctionBody& body); 225 void PrintAst(base::AccountingAllocator* allocator, FunctionBody& body);
226 226
227 void PrintAstForDebugging(const byte* start, const byte* end);
Clemens Hammacher 2016/05/06 14:11:05 Is the (current) purpose to be called from gdb? Th
titzer 2016/05/06 16:00:57 Done.
228
227 inline TreeResult VerifyWasmCode(base::AccountingAllocator* allocator, 229 inline TreeResult VerifyWasmCode(base::AccountingAllocator* allocator,
228 ModuleEnv* module, FunctionSig* sig, 230 ModuleEnv* module, FunctionSig* sig,
229 const byte* start, const byte* end) { 231 const byte* start, const byte* end) {
230 FunctionBody body = {module, sig, nullptr, start, end}; 232 FunctionBody body = {module, sig, nullptr, start, end};
231 return VerifyWasmCode(allocator, body); 233 return VerifyWasmCode(allocator, body);
232 } 234 }
233 235
234 inline TreeResult BuildTFGraph(base::AccountingAllocator* allocator, 236 inline TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
235 TFBuilder* builder, ModuleEnv* module, 237 TFBuilder* builder, ModuleEnv* module,
236 FunctionSig* sig, const byte* start, 238 FunctionSig* sig, const byte* start,
(...skipping 25 matching lines...) Expand all
262 int OpcodeLength(const byte* pc, const byte* end); 264 int OpcodeLength(const byte* pc, const byte* end);
263 265
264 // Computes the arity (number of sub-nodes) of the opcode at the given address. 266 // Computes the arity (number of sub-nodes) of the opcode at the given address.
265 int OpcodeArity(const byte* pc, const byte* end); 267 int OpcodeArity(const byte* pc, const byte* end);
266 268
267 } // namespace wasm 269 } // namespace wasm
268 } // namespace internal 270 } // namespace internal
269 } // namespace v8 271 } // namespace v8
270 272
271 #endif // V8_WASM_AST_DECODER_H_ 273 #endif // V8_WASM_AST_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/ast-decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698