v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-inlining-into-js.h
Go to the documentation of this file.
1// Copyright 2023 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_COMPILER_WASM_INLINING_INTO_JS_H_
6#define V8_COMPILER_WASM_INLINING_INTO_JS_H_
7
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
10#endif // !V8_ENABLE_WEBASSEMBLY
11
12#include "src/base/vector.h"
13#include "src/common/globals.h"
14
15namespace v8::internal {
16class Zone;
17
18namespace wasm {
19struct FunctionBody;
20struct WasmModule;
21} // namespace wasm
22
23namespace compiler {
24class MachineGraph;
25class Node;
26class SourcePositionTable;
27
28// The WasmIntoJsInliner provides support for inlining very small wasm functions
29// which only contain very specific supported instructions into JS.
31 public:
32 static bool TryInlining(Zone* zone, const wasm::WasmModule* module,
33 MachineGraph* mcgraph, const wasm::FunctionBody& body,
35 SourcePositionTable* source_position_table,
36 int inlining_id);
37};
38
39} // namespace compiler
40} // namespace v8::internal
41
42#endif // V8_COMPILER_WASM_INLINING_INTO_JS_H_
friend Zone
Definition asm-types.cc:195
static bool TryInlining(Zone *zone, const wasm::WasmModule *module, MachineGraph *mcgraph, const wasm::FunctionBody &body, base::Vector< const uint8_t > bytes, SourcePositionTable *source_position_table, int inlining_id)
wasm::WasmModule WasmModule
Definition c-api.cc:87