| 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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 decoder.DecodeLocalDecls(decls); | 1570 decoder.DecodeLocalDecls(decls); |
| 1571 const byte* pc = decoder.pc(); | 1571 const byte* pc = decoder.pc(); |
| 1572 if (body.start != decoder.pc()) { | 1572 if (body.start != decoder.pc()) { |
| 1573 os << "// locals: "; | 1573 os << "// locals: "; |
| 1574 for (auto p : decls.local_types) { | 1574 for (auto p : decls.local_types) { |
| 1575 LocalType type = p.first; | 1575 LocalType type = p.first; |
| 1576 uint32_t count = p.second; | 1576 uint32_t count = p.second; |
| 1577 os << " " << count << " " << WasmOpcodes::TypeName(type); | 1577 os << " " << count << " " << WasmOpcodes::TypeName(type); |
| 1578 } | 1578 } |
| 1579 os << std::endl; | 1579 os << std::endl; |
| 1580 ++line_nr; |
| 1580 | 1581 |
| 1581 for (const byte* locals = body.start; locals < pc; locals++) { | 1582 for (const byte* locals = body.start; locals < pc; locals++) { |
| 1582 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ","; | 1583 os << (locals == body.start ? "0x" : " 0x") << AsHex(*locals, 2) << ","; |
| 1583 } | 1584 } |
| 1584 os << std::endl; | 1585 os << std::endl; |
| 1585 ++line_nr; | 1586 ++line_nr; |
| 1586 } | 1587 } |
| 1587 | 1588 |
| 1588 os << "// body: " << std::endl; | 1589 os << "// body: " << std::endl; |
| 1589 ++line_nr; | 1590 ++line_nr; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 1686 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
| 1686 const byte* start, const byte* end) { | 1687 const byte* start, const byte* end) { |
| 1687 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; | 1688 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; |
| 1688 SR_WasmDecoder decoder(zone, nullptr, body); | 1689 SR_WasmDecoder decoder(zone, nullptr, body); |
| 1689 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); | 1690 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); |
| 1690 } | 1691 } |
| 1691 | 1692 |
| 1692 } // namespace wasm | 1693 } // namespace wasm |
| 1693 } // namespace internal | 1694 } // namespace internal |
| 1694 } // namespace v8 | 1695 } // namespace v8 |
| OLD | NEW |