OLD | NEW |
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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 decoder.DecodeLocalDecls(decls); | 1514 decoder.DecodeLocalDecls(decls); |
1515 const byte* pc = decoder.pc(); | 1515 const byte* pc = decoder.pc(); |
1516 if (body.start != decoder.pc()) { | 1516 if (body.start != decoder.pc()) { |
1517 os << "// locals: "; | 1517 os << "// locals: "; |
1518 for (auto p : decls.local_types) { | 1518 for (auto p : decls.local_types) { |
1519 LocalType type = p.first; | 1519 LocalType type = p.first; |
1520 uint32_t count = p.second; | 1520 uint32_t count = p.second; |
1521 os << " " << count << " " << WasmOpcodes::TypeName(type); | 1521 os << " " << count << " " << WasmOpcodes::TypeName(type); |
1522 } | 1522 } |
1523 os << std::endl; | 1523 os << std::endl; |
| 1524 ++line_nr; |
1524 | 1525 |
1525 for (const byte* locals = body.start; locals < pc; locals++) { | 1526 for (const byte* locals = body.start; locals < pc; locals++) { |
1526 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ","; | 1527 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ","; |
1527 } | 1528 } |
1528 os << std::endl; | 1529 os << std::endl; |
1529 ++line_nr; | 1530 ++line_nr; |
1530 } | 1531 } |
1531 | 1532 |
1532 os << "// body: " << std::endl; | 1533 os << "// body: " << std::endl; |
1533 ++line_nr; | 1534 ++line_nr; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 1630 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
1630 const byte* start, const byte* end) { | 1631 const byte* start, const byte* end) { |
1631 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; | 1632 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; |
1632 WasmFullDecoder decoder(zone, nullptr, body); | 1633 WasmFullDecoder decoder(zone, nullptr, body); |
1633 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); | 1634 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); |
1634 } | 1635 } |
1635 | 1636 |
1636 } // namespace wasm | 1637 } // namespace wasm |
1637 } // namespace internal | 1638 } // namespace internal |
1638 } // namespace v8 | 1639 } // namespace v8 |
OLD | NEW |