From 16ff3f28895d1bb8655d706ae71852cc134d212a Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 2 Jan 2014 11:17:12 -0500 Subject: [PATCH] Backed out changeset cb4cd38abdc5 (bug 945596) for bustage. CLOSED TREE --- js/src/builtin/TestingFunctions.cpp | 30 +------------------------- js/src/jit-test/tests/ion/bug909997.js | 3 --- js/src/jsapi.cpp | 20 ----------------- js/src/jsapi.h | 2 -- 4 files changed, 1 insertion(+), 54 deletions(-) diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index e49eeb0f9ee2..a529fa3ecbf5 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -271,7 +271,7 @@ static const struct ParamPair { // Keep this in sync with above params. #define GC_PARAMETER_ARGS_LIST "maxBytes, maxMallocBytes, gcBytes, gcNumber, sliceTimeBudget, or markStackLimit" - + static bool GCParameter(JSContext *cx, unsigned argc, Value *vp) { @@ -1127,30 +1127,6 @@ SetJitCompilerOption(JSContext *cx, unsigned argc, jsval *vp) 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 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" " (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, "isAsmJSModule(fn)", " Returns whether the given value is a function containing \"use asm\" that has been\n" diff --git a/js/src/jit-test/tests/ion/bug909997.js b/js/src/jit-test/tests/ion/bug909997.js index f03cb9bd224e..35dd1fea865b 100644 --- a/js/src/jit-test/tests/ion/bug909997.js +++ b/js/src/jit-test/tests/ion/bug909997.js @@ -21,9 +21,6 @@ var func = [method_A, method_B, method_C, method_D] for (var n = 0; n < 4; ++n) { setJitCompilerOption("baseline.enable", n & 1); 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) func[n](); } \ No newline at end of file diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index f863ab864ca0..8be17d4ca344 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -6040,26 +6040,6 @@ JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t v #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) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index c4518932d223..4e821fd6baf7 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4544,8 +4544,6 @@ typedef enum JSJitCompilerOption { extern JS_PUBLIC_API(void) 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.