From 7995577154dcc072d3983d844010d0db5257dcb5 Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Mon, 21 Dec 2009 09:55:45 -0500 Subject: [PATCH] Backed out changeset 94561cb0f0bd, bug 474500 because of static-analysis bustage. --- js/src/jsapi.cpp | 6 ------ js/src/jsapi.h | 9 --------- js/src/jsregexp.cpp | 2 +- js/src/jstracer.cpp | 6 ------ js/src/jstracer.h | 2 +- 5 files changed, 2 insertions(+), 23 deletions(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index e23d9b2f464..eb08f7fb917 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -2604,12 +2604,6 @@ JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key) #endif } -JS_PUBLIC_API(void) -JS_FlushCaches(JSContext *cx) -{ - js_FlushJITCache(cx); -} - JS_PUBLIC_API(intN) JS_AddExternalStringFinalizer(JSStringFinalizeOp finalizer) { diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 40a8b4d2682..7e15b36b4a4 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1324,15 +1324,6 @@ JS_SetGCParameterForThread(JSContext *cx, JSGCParamKey key, uint32 value); extern JS_PUBLIC_API(uint32) JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key); -/* - * Flush the code cache for the current thread. The operation might be - * delayed if the cache cannot be flushed currently because native - * code is currently executing. - */ - -extern JS_PUBLIC_API(void) -JS_FlushCaches(JSContext *cx); - /* * Add a finalizer for external strings created by JS_NewExternalString (see * below) using a type-code returned from this function, and that understands diff --git a/js/src/jsregexp.cpp b/js/src/jsregexp.cpp index 3d0e75324c5..f641792e886 100644 --- a/js/src/jsregexp.cpp +++ b/js/src/jsregexp.cpp @@ -3267,7 +3267,7 @@ class RegExpNativeCompiler { js_FragProfiling_FragFinalizer(frag, tm); } ) - js_FlushJITCache(cx); + js_ResetJIT(cx); } else { if (!guard) insertGuard(loopLabel, re_chars, re_length); re->flags |= JSREG_NOCOMPILE; diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index d1f6d45801a..00e00a24e39 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -2293,12 +2293,6 @@ ResetJIT(JSContext* cx, TraceVisFlushReason r) #define ResetJIT(cx, r) ResetJITImpl(cx) #endif -void -js_FlushJITCache(JSContext *cx) -{ - ResetJIT(cx, FR_OOM); -} - static void TrashTree(JSContext* cx, TreeFragment* f); diff --git a/js/src/jstracer.h b/js/src/jstracer.h index 30507f72fb0..c593e3bfb6b 100644 --- a/js/src/jstracer.h +++ b/js/src/jstracer.h @@ -1479,7 +1479,7 @@ extern bool js_OverfullJITCache(JSTraceMonitor* tm); extern void -js_FlushJITCache(JSContext* cx); +js_ResetJIT(JSContext* cx); extern void js_PurgeJITOracle();