1 // Copyright 2019 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_WASM_MODULE_INSTANTIATE_H_ 6 #define V8_WASM_MODULE_INSTANTIATE_H_ 7 8 #include <stdint.h> 9 10 #include "include/v8-metrics.h" 11 #include "include/v8config.h" 12 13 namespace v8 { 14 namespace internal { 15 16 class Isolate; 17 class JSArrayBuffer; 18 class JSReceiver; 19 class WasmModuleObject; 20 class WasmInstanceObject; 21 22 template <typename T> 23 class Handle; 24 template <typename T> 25 class MaybeHandle; 26 27 namespace wasm { 28 29 class ErrorThrower; 30 31 MaybeHandle<WasmInstanceObject> InstantiateToInstanceObject( 32 Isolate* isolate, ErrorThrower* thrower, 33 Handle<WasmModuleObject> module_object, MaybeHandle<JSReceiver> imports, 34 MaybeHandle<JSArrayBuffer> memory); 35 36 bool LoadElemSegment(Isolate* isolate, Handle<WasmInstanceObject> instance, 37 uint32_t table_index, uint32_t segment_index, uint32_t dst, 38 uint32_t src, uint32_t count) V8_WARN_UNUSED_RESULT; 39 40 } // namespace wasm 41 } // namespace internal 42 } // namespace v8 43 44 #endif // V8_WASM_MODULE_INSTANTIATE_H_ 45