OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/wasm/wasm-interpreter.h" | 5 #include "src/wasm/wasm-interpreter.h" |
6 | 6 |
7 #include "src/utils.h" | 7 #include "src/utils.h" |
8 #include "src/wasm/decoder.h" | 8 #include "src/wasm/decoder.h" |
9 #include "src/wasm/function-body-decoder.h" | 9 #include "src/wasm/function-body-decoder.h" |
10 #include "src/wasm/wasm-external-refs.h" | 10 #include "src/wasm/wasm-external-refs.h" |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1771 const ZoneVector<uint8_t> module_bytes_; | 1771 const ZoneVector<uint8_t> module_bytes_; |
1772 CodeMap codemap_; | 1772 CodeMap codemap_; |
1773 ZoneVector<ThreadImpl> threads_; | 1773 ZoneVector<ThreadImpl> threads_; |
1774 | 1774 |
1775 WasmInterpreterInternals(Zone* zone, const ModuleBytesEnv& env) | 1775 WasmInterpreterInternals(Zone* zone, const ModuleBytesEnv& env) |
1776 : instance_(env.instance), | 1776 : instance_(env.instance), |
1777 module_bytes_(env.module_bytes.start(), env.module_bytes.end(), zone), | 1777 module_bytes_(env.module_bytes.start(), env.module_bytes.end(), zone), |
1778 codemap_(env.instance ? env.instance->module : nullptr, | 1778 codemap_(env.instance ? env.instance->module : nullptr, |
1779 module_bytes_.data(), zone), | 1779 module_bytes_.data(), zone), |
1780 threads_(zone) { | 1780 threads_(zone) { |
1781 threads_.push_back(ThreadImpl(zone, &codemap_, env.instance)); | 1781 threads_.emplace_back(zone, &codemap_, env.instance); |
1782 } | 1782 } |
1783 | 1783 |
1784 void Delete() { threads_.clear(); } | 1784 void Delete() { threads_.clear(); } |
1785 }; | 1785 }; |
1786 | 1786 |
1787 //============================================================================ | 1787 //============================================================================ |
1788 // Implementation of the public interface of the interpreter. | 1788 // Implementation of the public interface of the interpreter. |
1789 //============================================================================ | 1789 //============================================================================ |
1790 WasmInterpreter::WasmInterpreter(const ModuleBytesEnv& env, | 1790 WasmInterpreter::WasmInterpreter(const ModuleBytesEnv& env, |
1791 AccountingAllocator* allocator) | 1791 AccountingAllocator* allocator) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 | 1892 |
1893 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting( | 1893 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting( |
1894 Zone* zone, const byte* start, const byte* end) { | 1894 Zone* zone, const byte* start, const byte* end) { |
1895 ControlTransfers targets(zone, nullptr, start, end); | 1895 ControlTransfers targets(zone, nullptr, start, end); |
1896 return targets.map_; | 1896 return targets.map_; |
1897 } | 1897 } |
1898 | 1898 |
1899 } // namespace wasm | 1899 } // namespace wasm |
1900 } // namespace internal | 1900 } // namespace internal |
1901 } // namespace v8 | 1901 } // namespace v8 |
OLD | NEW |