summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/turbofan.h
blob: 5a91951902b55421467a710fd14848f5d0587b40 (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
// 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.

#ifndef V8_COMPILER_TURBOFAN_H_
#define V8_COMPILER_TURBOFAN_H_

#include <memory>

// Clients of this interface shouldn't depend on compiler internals.
// Do not include anything from src/compiler here, and keep includes minimal.

#include "src/base/macros.h"
#include "src/utils/utils.h"

namespace v8 {
namespace internal {

class Isolate;
class JSFunction;
class TurbofanCompilationJob;

namespace compiler {

// Whether the given JSFunction has an associated Script.
enum class IsScriptAvailable {
  kNo,
  kYes,
};

V8_EXPORT_PRIVATE std::unique_ptr<TurbofanCompilationJob> NewCompilationJob(
    Isolate* isolate, Handle<JSFunction> function, IsScriptAvailable has_script,
    BytecodeOffset osr_offset = BytecodeOffset::None());

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_TURBOFAN_H_