From 7f62a06cd64b18e25944ff5f04f366c8a7381a83 Mon Sep 17 00:00:00 2001 From: Robert Sayre Date: Thu, 21 Aug 2008 14:16:33 -0400 Subject: [PATCH 1/5] Turn on the JIT for tracemonkey mochitests. --- build/pgo/automation.py.in | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pgo/automation.py.in b/build/pgo/automation.py.in index 88b5b791db7..ee418a3db88 100644 --- a/build/pgo/automation.py.in +++ b/build/pgo/automation.py.in @@ -279,6 +279,7 @@ user_pref("accessibility.typeaheadfind.autostart", false); user_pref("javascript.options.showInConsole", true); user_pref("layout.debug.enable_data_xbl", true); user_pref("browser.EULA.override", true); +user_pref("javascript.options.jit.content", true); user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others """ From 80088cd7771d0494eaffe710c259e49b9b6e634a Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Thu, 21 Aug 2008 11:40:56 -0700 Subject: [PATCH 2/5] Fix warning about signed/unsigned comparison. --- js/src/jstracer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 45a349c4f68..3eaea57e8ee 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -578,7 +578,7 @@ nativeStackSlots(JSContext *cx, unsigned callDepth) #endif for (;;) { unsigned operands = fp->regs->sp - StackBase(fp); - JS_ASSERT(operands <= fp->script->nslots - fp->script->nfixed); + JS_ASSERT(operands <= unsigned(fp->script->nslots - fp->script->nfixed)); slots += operands; if (fp->callee) slots += fp->script->nfixed; From 26c3cd4ea94d5df5a0f1eccc5b361b09ad822b11 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Thu, 21 Aug 2008 15:17:47 -0700 Subject: [PATCH 3/5] Fixed js_String_p_split passing in an undersized array. --- js/src/jsbuiltins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsbuiltins.cpp b/js/src/jsbuiltins.cpp index d3ff6b22e96..16bb314bfb4 100644 --- a/js/src/jsbuiltins.cpp +++ b/js/src/jsbuiltins.cpp @@ -307,7 +307,7 @@ JSObject* FASTCALL js_String_p_split(JSContext* cx, JSString* str, JSString* sepstr) { // FIXME: optimize by calling into a lower level exported from jsstr.cpp. - jsval vp[3] = { JSVAL_NULL, STRING_TO_JSVAL(str), STRING_TO_JSVAL(sepstr) }; + jsval vp[4] = { JSVAL_NULL, STRING_TO_JSVAL(str), STRING_TO_JSVAL(sepstr), JSVAL_VOID }; if (!js_str_split(cx, 2, vp)) return NULL; JS_ASSERT(JSVAL_IS_OBJECT(vp[0])); From 7da39648cf49e58cc906e82fd42504d382339110 Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Thu, 21 Aug 2008 16:35:05 -0700 Subject: [PATCH 4/5] Cleanup spacing in builtins.tbl --- js/src/builtins.tbl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/js/src/builtins.tbl b/js/src/builtins.tbl index 6cd62eaf078..715fd3510cb 100644 --- a/js/src/builtins.tbl +++ b/js/src/builtins.tbl @@ -36,18 +36,18 @@ * * ***** END LICENSE BLOCK ***** */ -BUILTIN2(BoxDouble, LO, F, P, jsval, JSContext*, jsdouble, 1, 1) -BUILTIN2(BoxInt32, LO, LO, P, jsval, JSContext*, jsint, 1, 1) -BUILTIN1(UnboxDouble, LO, F, jsdouble, jsval, 1, 1) -BUILTIN1(UnboxInt32, LO, LO, int32, jsval, 1, 1) -BUILTIN2(dmod, F, F, F, jsdouble, jsdouble, jsdouble, 1, 1) -BUILTIN1(DoubleToInt32, F, LO, int32, jsdouble, 1, 1) -BUILTIN1(DoubleToUint32, F, LO, int32, jsdouble, 1, 1) -BUILTIN1(Math_sin, F, F, jsdouble, jsdouble, 1, 1) -BUILTIN1(Math_cos, F, F, jsdouble, jsdouble, 1, 1) -BUILTIN2(Math_pow, F, F, F, jsdouble, jsdouble, jsdouble, 1, 1) -BUILTIN1(Math_sqrt, F, F, jsdouble, jsdouble, 1, 1) -BUILTIN1(Math_floor, F, F, jsdouble, jsdouble, 1, 1) +BUILTIN2(BoxDouble, LO, F, P, jsval, JSContext*, jsdouble, 1, 1) +BUILTIN2(BoxInt32, LO, LO, P, jsval, JSContext*, jsint, 1, 1) +BUILTIN1(UnboxDouble, LO, F, jsdouble, jsval, 1, 1) +BUILTIN1(UnboxInt32, LO, LO, int32, jsval, 1, 1) +BUILTIN2(dmod, F, F, F, jsdouble, jsdouble, jsdouble, 1, 1) +BUILTIN1(DoubleToInt32, F, LO, int32, jsdouble, 1, 1) +BUILTIN1(DoubleToUint32, F, LO, int32, jsdouble, 1, 1) +BUILTIN1(Math_sin, F, F, jsdouble, jsdouble, 1, 1) +BUILTIN1(Math_cos, F, F, jsdouble, jsdouble, 1, 1) +BUILTIN2(Math_pow, F, F, F, jsdouble, jsdouble, jsdouble, 1, 1) +BUILTIN1(Math_sqrt, F, F, jsdouble, jsdouble, 1, 1) +BUILTIN1(Math_floor, F, F, jsdouble, jsdouble, 1, 1) BUILTIN4(Array_dense_setelem, LO, LO, LO, LO, LO, bool, JSContext*, JSObject*, jsint, jsval, 1, 1) BUILTIN3(Array_p_join, LO, LO, LO, P, JSString*, JSContext*, JSObject*, JSString*, 1, 1) BUILTIN4(String_p_substring, LO, LO, LO, LO, P, JSString*, JSContext*, JSString*, jsint, jsint, 1, 1) From 666aeff29ea4e00ef47c35132a43e9550d938495 Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Thu, 21 Aug 2008 16:49:51 -0700 Subject: [PATCH 5/5] Fix builtins that were accidentally flagged as CSE/FOLD but really aren't (Math.random i.e.) --- js/src/builtins.tbl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/js/src/builtins.tbl b/js/src/builtins.tbl index 715fd3510cb..e649f5e4f19 100644 --- a/js/src/builtins.tbl +++ b/js/src/builtins.tbl @@ -48,8 +48,8 @@ BUILTIN1(Math_cos, F, F, jsdouble, jsdouble, 1, 1) BUILTIN2(Math_pow, F, F, F, jsdouble, jsdouble, jsdouble, 1, 1) BUILTIN1(Math_sqrt, F, F, jsdouble, jsdouble, 1, 1) BUILTIN1(Math_floor, F, F, jsdouble, jsdouble, 1, 1) -BUILTIN4(Array_dense_setelem, LO, LO, LO, LO, LO, bool, JSContext*, JSObject*, jsint, jsval, 1, 1) -BUILTIN3(Array_p_join, LO, LO, LO, P, JSString*, JSContext*, JSObject*, JSString*, 1, 1) +BUILTIN4(Array_dense_setelem, LO, LO, LO, LO, LO, bool, JSContext*, JSObject*, jsint, jsval, 0, 0) +BUILTIN3(Array_p_join, LO, LO, LO, P, JSString*, JSContext*, JSObject*, JSString*, 0, 0) BUILTIN4(String_p_substring, LO, LO, LO, LO, P, JSString*, JSContext*, JSString*, jsint, jsint, 1, 1) BUILTIN3(String_p_substring_1, LO, LO, LO, P, JSString*, JSContext*, JSString*, jsint, 1, 1) BUILTIN3(ConcatStrings, LO, LO, LO, P, JSString*, JSContext*, JSString*, JSString*, 1, 1) @@ -60,30 +60,30 @@ BUILTIN3(String_p_concat_1int, LO, LO, LO, P, JSString*, JSContest*, JSString* BUILTIN4(String_p_match, LO, LO, LO, LO, P, JSObject*, JSContext*, JSString*, jsbytecode*, JSObject*, 1, 1) BUILTIN4(String_p_replace_str, LO, LO, LO, LO, P, JSString*, JSContext*, JSString*, JSObject*, JSString*, 1, 1) BUILTIN5(String_p_replace_str3, LO, LO, LO, LO, LO, P, JSString*, JSContext*, JSString*, JSString*, JSString*, JSString*, 1, 1) -BUILTIN3(String_p_split, LO, LO, LO, P, JSObject*, JSContext*, JSString*, JSString*, 1, 1) -BUILTIN1(Math_random, LO, F, jsdouble, JSRuntime*, 1, 1) +BUILTIN3(String_p_split, LO, LO, LO, P, JSObject*, JSContext*, JSString*, JSString*, 0, 0) +BUILTIN1(Math_random, LO, F, jsdouble, JSRuntime*, 0, 0) BUILTIN2(EqualStrings, LO, LO, LO, bool, JSString*, JSString*, 1, 1) BUILTIN2(CompareStrings, LO, LO, LO, bool, JSString*, JSString*, 1, 1) BUILTIN2(StringToNumber, LO, LO, F, jsdouble, JSContext*, JSString*, 1, 1) BUILTIN2(StringToInt32, LO, LO, LO, jsint, JSContext*, JSString*, 1, 1) BUILTIN2(ParseInt, LO, LO, F, jsdouble, JSContext*, JSString*, 1, 1) BUILTIN2(ParseFloat, LO, LO, F, jsdouble, JSContext*, JSString*, 1, 1) -BUILTIN3(Any_getelem, LO, LO, LO, P, jsval, JSContext*, JSObject*, JSString*, 1, 1) -BUILTIN4(Any_setelem, LO, LO, LO, LO, LO, bool, JSContext*, JSObject*, JSString*, jsval, 1, 1) -BUILTIN3(FastValueToIterator, LO, LO, LO, P, JSObject*, JSContext*, jsuint, jsval, 1, 1) -BUILTIN2(FastCallIteratorNext, LO, LO, P, JSObject*, JSContext*, JSObject*, 1, 1) -BUILTIN2(CloseIterator, LO, LO, LO, bool, JSContext*, jsval, 1, 1) +BUILTIN3(Any_getelem, LO, LO, LO, P, jsval, JSContext*, JSObject*, JSString*, 0, 0) +BUILTIN4(Any_setelem, LO, LO, LO, LO, LO, bool, JSContext*, JSObject*, JSString*, jsval, 0, 0) +BUILTIN3(FastValueToIterator, LO, LO, LO, P, JSObject*, JSContext*, jsuint, jsval, 0, 0) +BUILTIN2(FastCallIteratorNext, LO, LO, P, JSObject*, JSContext*, JSObject*, 0, 0) +BUILTIN2(CloseIterator, LO, LO, LO, bool, JSContext*, jsval, 0, 0) BUILTIN2(CallTree, LO, LO, P, nanojit::GuardRecord*, avmplus::InterpState*, nanojit::Fragment*, 0, 0) -BUILTIN2(FastNewObject, LO, LO, P, JSObject*, JSContext*, JSObject*, 1, 1) -BUILTIN3(AddProperty, LO, LO, LO, LO, bool, JSContext*, JSObject*, JSScopeProperty*, 1, 1) -BUILTIN3(CallGetter, LO, LO, LO, P, jsval, JSContext*, JSObject*, JSScopeProperty*, 1, 1) +BUILTIN2(FastNewObject, LO, LO, P, JSObject*, JSContext*, JSObject*, 0, 0) +BUILTIN3(AddProperty, LO, LO, LO, LO, bool, JSContext*, JSObject*, JSScopeProperty*, 0, 0) +BUILTIN3(CallGetter, LO, LO, LO, P, jsval, JSContext*, JSObject*, JSScopeProperty*, 0, 0) BUILTIN2(TypeOfObject, LO, LO, P, JSString*, JSContext*, JSObject*, 1, 1) BUILTIN2(TypeOfBoolean, LO, LO, P, JSString*, JSContext*, jsint, 1, 1) BUILTIN2(NumberToString, LO, F, P, JSString*, JSContext*, jsdouble, 1, 1) BUILTIN3(Object_p_hasOwnProperty, - LO, LO, LO, LO, jsint, JSContext*, JSObject*, JSString*, 1, 1) + LO, LO, LO, LO, jsint, JSContext*, JSObject*, JSString*, 0, 0) BUILTIN3(Object_p_propertyIsEnumerable, - LO, LO, LO, LO, jsint, JSContext*, JSObject*, JSString*, 1, 1) + LO, LO, LO, LO, jsint, JSContext*, JSObject*, JSString*, 0, 0) BUILTIN2(BooleanToNumber, LO, LO, F, jsdouble, JSContext*, jsint, 1, 1) -BUILTIN2(ObjectToString, LO, LO, P, JSString*, JSContext*, JSObject*, 1, 1) -BUILTIN3(Array_1int, LO, LO, LO, P, JSObject*, JSContext*, JSObject*, jsint, 1, 1) +BUILTIN2(ObjectToString, LO, LO, P, JSString*, JSContext*, JSObject*, 0, 0) +BUILTIN3(Array_1int, LO, LO, LO, P, JSObject*, JSContext*, JSObject*, jsint, 0, 0)