Backed out changeset cb4cd38abdc5 (bug 945596) for bustage.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-01-02 11:17:12 -05:00
Родитель 4721c0729c
Коммит 16ff3f2889
4 изменённых файлов: 1 добавлений и 54 удалений

Просмотреть файл

@ -271,7 +271,7 @@ static const struct ParamPair {
// Keep this in sync with above params. // Keep this in sync with above params.
#define GC_PARAMETER_ARGS_LIST "maxBytes, maxMallocBytes, gcBytes, gcNumber, sliceTimeBudget, or markStackLimit" #define GC_PARAMETER_ARGS_LIST "maxBytes, maxMallocBytes, gcBytes, gcNumber, sliceTimeBudget, or markStackLimit"
static bool static bool
GCParameter(JSContext *cx, unsigned argc, Value *vp) GCParameter(JSContext *cx, unsigned argc, Value *vp)
{ {
@ -1127,30 +1127,6 @@ SetJitCompilerOption(JSContext *cx, unsigned argc, jsval *vp)
return true; return true;
} }
static bool
GetJitCompilerOptions(JSContext *cx, unsigned argc, jsval *vp)
{
RootedObject info(cx, JS_NewObject(cx, nullptr, nullptr, nullptr));
if (!info)
return false;
RootedValue value(cx);
#define JIT_COMPILER_MATCH(key, string) \
opt = JSJITCOMPILER_ ## key; \
value.setInt32(JS_GetGlobalJitCompilerOption(cx, opt)); \
if (!JS_SetProperty(cx, info, string, value)) \
return false;
JSJitCompilerOption opt = JSJITCOMPILER_NOT_AN_OPTION;
JIT_COMPILER_OPTIONS(JIT_COMPILER_MATCH);
#undef JIT_COMPILER_MATCH
*vp = ObjectValue(*info);
return true;
}
static bool static bool
SetIonCheckGraphCoherency(JSContext *cx, unsigned argc, jsval *vp) SetIonCheckGraphCoherency(JSContext *cx, unsigned argc, jsval *vp)
{ {
@ -1570,10 +1546,6 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = {
" Returns whether asm.js compilation is currently available or whether it is disabled\n" " Returns whether asm.js compilation is currently available or whether it is disabled\n"
" (e.g., by the debugger)."), " (e.g., by the debugger)."),
JS_FN_HELP("getJitCompilerOptions", GetJitCompilerOptions, 0, 0,
"getCompilerOptions()",
"Return an object describing some of the JIT compiler options.\n"),
JS_FN_HELP("isAsmJSModule", IsAsmJSModule, 1, 0, JS_FN_HELP("isAsmJSModule", IsAsmJSModule, 1, 0,
"isAsmJSModule(fn)", "isAsmJSModule(fn)",
" Returns whether the given value is a function containing \"use asm\" that has been\n" " Returns whether the given value is a function containing \"use asm\" that has been\n"

Просмотреть файл

@ -21,9 +21,6 @@ var func = [method_A, method_B, method_C, method_D]
for (var n = 0; n < 4; ++n) { for (var n = 0; n < 4; ++n) {
setJitCompilerOption("baseline.enable", n & 1); setJitCompilerOption("baseline.enable", n & 1);
setJitCompilerOption("ion.enable", n & 2 ? 1: 0); setJitCompilerOption("ion.enable", n & 2 ? 1: 0);
var opt = getJitCompilerOptions();
assertEq(opt["baseline.enable"], n & 1);
assertEq(opt["ion.enable"], n & 2 ? 1 : 0);
for (var i = 0; i < 1001; ++i) for (var i = 0; i < 1001; ++i)
func[n](); func[n]();
} }

Просмотреть файл

@ -6040,26 +6040,6 @@ JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t v
#endif #endif
} }
JS_PUBLIC_API(int)
JS_GetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt)
{
#ifdef JS_ION
switch (opt) {
case JSJITCOMPILER_BASELINE_USECOUNT_TRIGGER:
return jit::js_IonOptions.baselineUsesBeforeCompile;
case JSJITCOMPILER_ION_USECOUNT_TRIGGER:
return jit::js_IonOptions.usesBeforeCompile;
case JSJITCOMPILER_ION_ENABLE:
return JS::ContextOptionsRef(cx).ion();
case JSJITCOMPILER_BASELINE_ENABLE:
return JS::ContextOptionsRef(cx).baseline();
default:
break;
}
#endif
return 0;
}
/************************************************************************/ /************************************************************************/
#if !defined(STATIC_EXPORTABLE_JS_API) && !defined(STATIC_JS_API) && defined(XP_WIN) #if !defined(STATIC_EXPORTABLE_JS_API) && !defined(STATIC_JS_API) && defined(XP_WIN)

Просмотреть файл

@ -4544,8 +4544,6 @@ typedef enum JSJitCompilerOption {
extern JS_PUBLIC_API(void) extern JS_PUBLIC_API(void)
JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t value); JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t value);
extern JS_PUBLIC_API(int)
JS_GetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt);
/* /*
* Convert a uint32_t index into a jsid. * Convert a uint32_t index into a jsid.