Commit 644f1177 authored by Evan Welsh's avatar Evan Welsh Committed by Philip Chimento

engine: Use JS_SetGlobalJitCompilerOption to control the JIT

The setIon and setBaseline APIs are being removed in SpiderMonkey 78. It
appears that JS_SetGlobalJitCompilerOption() is the correct way to do
this.

See: #329
parent 065df982
...@@ -256,9 +256,14 @@ JSContext* gjs_create_js_context(GjsContextPrivate* uninitialized_gjs) { ...@@ -256,9 +256,14 @@ JSContext* gjs_create_js_context(GjsContextPrivate* uninitialized_gjs) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT"); gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
} }
JS::ContextOptionsRef(cx) JS::ContextOptionsRef(cx)
.setIon(enable_jit)
.setBaseline(enable_jit)
.setAsmJS(enable_jit); .setAsmJS(enable_jit);
uint32_t value = enable_jit ? 1 : 0;
JS_SetGlobalJitCompilerOption(
cx, JSJitCompilerOption::JSJITCOMPILER_ION_ENABLE, value);
JS_SetGlobalJitCompilerOption(
cx, JSJitCompilerOption::JSJITCOMPILER_BASELINE_ENABLE, value);
return cx; return cx;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment