summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/turbofan-disabled.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/turbofan-disabled.cc')
-rw-r--r--deps/v8/src/compiler/turbofan-disabled.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/turbofan-disabled.cc b/deps/v8/src/compiler/turbofan-disabled.cc
new file mode 100644
index 0000000000..53c91a24e6
--- /dev/null
+++ b/deps/v8/src/compiler/turbofan-disabled.cc
@@ -0,0 +1,25 @@
+// 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.
+//
+// This file stubs out the Turbofan API when TF is disabled.
+// See also v8_enable_turbofan in BUILD.gn.
+
+#include "src/codegen/compiler.h"
+#include "src/compiler/turbofan.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+std::unique_ptr<TurbofanCompilationJob> NewCompilationJob(
+ Isolate* isolate, Handle<JSFunction> function, IsScriptAvailable has_script,
+ BytecodeOffset osr_offset) {
+ FATAL(
+ "compiler::NewCompilationJob must not be called when Turbofan is "
+ "disabled (`v8_enable_turbofan = false`)");
+}
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8