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 #if !V8_ENABLE_WEBASSEMBLY 6 #error This header should only be included if WebAssembly is enabled. 7 #endif // !V8_ENABLE_WEBASSEMBLY 8 9 #ifndef V8_WASM_MODULE_INSTANTIATE_H_ 10 #define V8_WASM_MODULE_INSTANTIATE_H_ 11 12 #include <stdint.h> 13 14 #include "include/v8config.h" 15 16 namespace v8 { 17 namespace internal { 18 19 class Isolate; 20 class JSArrayBuffer; 21 class JSReceiver; 22 class WasmModuleObject; 23 class WasmInstanceObject; 24 class Zone; 25 26 template <typename T> 27 class Handle; 28 template <typename T> 29 class MaybeHandle; 30 31 namespace wasm { 32 33 class ErrorThrower; 34 35 MaybeHandle<WasmInstanceObject> InstantiateToInstanceObject( 36 Isolate* isolate, ErrorThrower* thrower, 37 Handle<WasmModuleObject> module_object, MaybeHandle<JSReceiver> imports, 38 MaybeHandle<JSArrayBuffer> memory); 39 40 bool LoadElemSegment(Isolate* isolate, Handle<WasmInstanceObject> instance, 41 uint32_t table_index, uint32_t segment_index, uint32_t dst, 42 uint32_t src, uint32_t count) V8_WARN_UNUSED_RESULT; 43 44 } // namespace wasm 45 } // namespace internal 46 } // namespace v8 47 48 #endif // V8_WASM_MODULE_INSTANTIATE_H_ 49