xref: /third_party/node/deps/v8/src/wasm/module-instantiate.h (revision 1cb0ef41)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/deps/v8/src/wasm/
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
16namespace v8 {
17namespace internal {
18
19class Isolate;
20class JSArrayBuffer;
21class JSReceiver;
22class WasmModuleObject;
23class WasmInstanceObject;
24class Zone;
25
26template <typename T>
27class Handle;
28template <typename T>
29class MaybeHandle;
30
31namespace wasm {
32
33class ErrorThrower;
34
35MaybeHandle<WasmInstanceObject> InstantiateToInstanceObject(
36    Isolate* isolate, ErrorThrower* thrower,
37    Handle<WasmModuleObject> module_object, MaybeHandle<JSReceiver> imports,
38    MaybeHandle<JSArrayBuffer> memory);
39
40bool 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

Indexes created Thu Nov 07 10:32:03 CST 2024