diff options
Diffstat (limited to 'deps/v8/src/compiler/turbofan.h')
-rw-r--r-- | deps/v8/src/compiler/turbofan.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/turbofan.h b/deps/v8/src/compiler/turbofan.h new file mode 100644 index 0000000000..5a91951902 --- /dev/null +++ b/deps/v8/src/compiler/turbofan.h @@ -0,0 +1,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_ |