blob: 0b78d6c51bdb367af456ac3e96b16b19c0d416fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright 2023 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif // !V8_ENABLE_WEBASSEMBLY
#ifndef V8_COMPILER_WASM_INLINING_INTO_JS_H_
#define V8_COMPILER_WASM_INLINING_INTO_JS_H_
#include "src/base/vector.h"
#include "src/common/globals.h"
namespace v8::internal {
class Zone;
namespace wasm {
struct FunctionBody;
struct WasmModule;
} // namespace wasm
namespace compiler {
class MachineGraph;
class Node;
class SourcePositionTable;
// The WasmIntoJsInliner provides support for inlining very small wasm functions
// which only contain very specific supported instructions into JS.
class WasmIntoJSInliner {
public:
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);
};
} // namespace compiler
} // namespace v8::internal
#endif // V8_COMPILER_WASM_INLINING_INTO_JS_H_
|