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

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

Issue 2063013004: [wasm] Disassemble wasm code from script (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-frame-inspection
Patch Set: remove unimplemented wasm SetBreakPoint method Created 4 years, 5 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/runtime/runtime-debug.cc ('k') | src/wasm/wasm-debug.cc » ('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 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 #include "src/signature.h" 5 #include "src/signature.h"
6 6
7 #include "src/bit-vector.h" 7 #include "src/bit-vector.h"
8 #include "src/flags.h" 8 #include "src/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 decoder.DecodeLocalDecls(decls); 1569 decoder.DecodeLocalDecls(decls);
1570 const byte* pc = decoder.pc(); 1570 const byte* pc = decoder.pc();
1571 if (body.start != decoder.pc()) { 1571 if (body.start != decoder.pc()) {
1572 os << "// locals: "; 1572 os << "// locals: ";
1573 for (auto p : decls.local_types) { 1573 for (auto p : decls.local_types) {
1574 LocalType type = p.first; 1574 LocalType type = p.first;
1575 uint32_t count = p.second; 1575 uint32_t count = p.second;
1576 os << " " << count << " " << WasmOpcodes::TypeName(type); 1576 os << " " << count << " " << WasmOpcodes::TypeName(type);
1577 } 1577 }
1578 os << std::endl; 1578 os << std::endl;
1579 ++line_nr;
1579 1580
1580 for (const byte* locals = body.start; locals < pc; locals++) { 1581 for (const byte* locals = body.start; locals < pc; locals++) {
1581 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ","; 1582 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ",";
1582 } 1583 }
1583 os << std::endl; 1584 os << std::endl;
1584 ++line_nr; 1585 ++line_nr;
1585 } 1586 }
1586 1587
1587 os << "// body: " << std::endl; 1588 os << "// body: " << std::endl;
1588 ++line_nr; 1589 ++line_nr;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, 1685 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals,
1685 const byte* start, const byte* end) { 1686 const byte* start, const byte* end) {
1686 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; 1687 FunctionBody body = {nullptr, nullptr, nullptr, start, end};
1687 SR_WasmDecoder decoder(zone, nullptr, body); 1688 SR_WasmDecoder decoder(zone, nullptr, body);
1688 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); 1689 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals);
1689 } 1690 }
1690 1691
1691 } // namespace wasm 1692 } // namespace wasm
1692 } // namespace internal 1693 } // namespace internal
1693 } // namespace v8 1694 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698