landing more fixes from tracemonkey repo

This commit is contained in:
shaver@mozilla.org 2008-08-21 17:07:21 -07:00
commit 30c9836354
4 changed files with 31 additions and 30 deletions

View File

@ -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
"""

View File

@ -36,20 +36,20 @@
*
* ***** 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)
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)
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, 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)

View File

@ -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]));

View File

@ -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;