diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp index 9dc86d04a222..726b8cda720e 100644 --- a/js/src/jit/JitOptions.cpp +++ b/js/src/jit/JitOptions.cpp @@ -287,8 +287,13 @@ bool DefaultJitOptions::isSmallFunction(JSScript* script) const { void DefaultJitOptions::enableGvn(bool enable) { disableGvn = !enable; } -void DefaultJitOptions::setEagerIonCompilation() { +void DefaultJitOptions::setEagerBaselineCompilation() { + baselineInterpreterWarmUpThreshold = 0; baselineWarmUpThreshold = 0; +} + +void DefaultJitOptions::setEagerIonCompilation() { + setEagerBaselineCompilation(); normalIonWarmUpThreshold = 0; fullIonWarmUpThreshold = 0; } diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h index c469a4e80573..6ba6f4be1cd9 100644 --- a/js/src/jit/JitOptions.h +++ b/js/src/jit/JitOptions.h @@ -117,6 +117,7 @@ struct DefaultJitOptions { DefaultJitOptions(); bool isSmallFunction(JSScript* script) const; + void setEagerBaselineCompilation(); void setEagerIonCompilation(); void setNormalIonWarmUpThreshold(uint32_t warmUpThreshold); void setFullIonWarmUpThreshold(uint32_t warmUpThreshold); diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 96f0f701d461..395eda01baa6 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -10404,8 +10404,7 @@ static bool SetContextOptions(JSContext* cx, const OptionParser& op) { } if (op.getBoolOption("baseline-eager")) { - jit::JitOptions.baselineInterpreterWarmUpThreshold = 0; - jit::JitOptions.baselineWarmUpThreshold = 0; + jit::JitOptions.setEagerBaselineCompilation(); } if (op.getBoolOption("blinterp")) {