зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 79a1f60d83df (bug 909997) for bustage.
CLOSED TREE
This commit is contained in:
Родитель
3cc09d4c0a
Коммит
e133b9c29a
|
@ -1,28 +0,0 @@
|
||||||
var wait = 100;
|
|
||||||
|
|
||||||
var method_A = function() {
|
|
||||||
for (var t = 0; t < wait; ++t) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
var method_B = function() {
|
|
||||||
for (var t = 0; t < wait; ++t) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
var method_C = function() {
|
|
||||||
for (var t = 0; t < wait; ++t) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
var method_D = function() {
|
|
||||||
for (var t = 0; t < wait; ++t) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
var func = [method_A, method_B, method_C, method_D]
|
|
||||||
var opts = ["baseline.enable", "ion.enable"];
|
|
||||||
|
|
||||||
for (var n = 0; n < opts.length; ++n) {
|
|
||||||
for (var m = 0; m < 2; ++m) {
|
|
||||||
setJitCompilerOption(opts[n], m & 1);
|
|
||||||
for (var i = 0; i < 1001; ++i)
|
|
||||||
func[n*2+m]();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1023,14 +1023,6 @@ JS_SetOptions(JSContext *cx, uint32_t options)
|
||||||
return SetOptionsCommon(cx, options);
|
return SetOptionsCommon(cx, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_PUBLIC_API(uint32_t)
|
|
||||||
JS_ResetOptions(JSContext *cx, uint32_t options)
|
|
||||||
{
|
|
||||||
unsigned oldopts = cx->options();
|
|
||||||
unsigned newopts = oldopts & ~options;
|
|
||||||
return SetOptionsCommon(cx, newopts);
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_PUBLIC_API(uint32_t)
|
JS_PUBLIC_API(uint32_t)
|
||||||
JS_ToggleOptions(JSContext *cx, uint32_t options)
|
JS_ToggleOptions(JSContext *cx, uint32_t options)
|
||||||
{
|
{
|
||||||
|
@ -6093,24 +6085,7 @@ JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t v
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
jit::js_IonOptions.setEagerCompilation();
|
jit::js_IonOptions.setEagerCompilation();
|
||||||
break;
|
break;
|
||||||
case JSJITCOMPILER_ION_ENABLE:
|
|
||||||
if (value == 1) {
|
|
||||||
JS_SetOptions(cx, JSOPTION_BASELINE | JSOPTION_ION);
|
|
||||||
IonSpew(js::jit::IonSpew_Scripts, "Enable ion");
|
|
||||||
} else if (value == 0) {
|
|
||||||
JS_ResetOptions(cx, JSOPTION_BASELINE | JSOPTION_ION);
|
|
||||||
IonSpew(js::jit::IonSpew_Scripts, "Disable ion");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case JSJITCOMPILER_BASELINE_ENABLE:
|
|
||||||
if (value == 1) {
|
|
||||||
JS_SetOptions(cx, JSOPTION_BASELINE);
|
|
||||||
IonSpew(js::jit::IonSpew_BaselineScripts, "Enable baseline");
|
|
||||||
} else if (value == 0) {
|
|
||||||
JS_ResetOptions(cx, JSOPTION_BASELINE);
|
|
||||||
IonSpew(js::jit::IonSpew_BaselineScripts, "Disable baseline");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4426,9 +4426,7 @@ JS_SetParallelIonCompilationEnabled(JSContext *cx, bool enabled);
|
||||||
|
|
||||||
#define JIT_COMPILER_OPTIONS(Register) \
|
#define JIT_COMPILER_OPTIONS(Register) \
|
||||||
Register(BASELINE_USECOUNT_TRIGGER, "baseline.usecount.trigger") \
|
Register(BASELINE_USECOUNT_TRIGGER, "baseline.usecount.trigger") \
|
||||||
Register(ION_USECOUNT_TRIGGER, "ion.usecount.trigger") \
|
Register(ION_USECOUNT_TRIGGER, "ion.usecount.trigger")
|
||||||
Register(ION_ENABLE, "ion.enable") \
|
|
||||||
Register(BASELINE_ENABLE, "baseline.enable")
|
|
||||||
|
|
||||||
typedef enum JSJitCompilerOption {
|
typedef enum JSJitCompilerOption {
|
||||||
#define JIT_COMPILER_DECLARE(key, str) \
|
#define JIT_COMPILER_DECLARE(key, str) \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче