mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
Remove code for JS_HAS_ARRAY_EXTRAS, and make the extra methods ES5 added to Array.prototype always present. rs=luke
--HG-- extra : rebase_source : 8dd08dee39ae2ff15d326ece9ad82ffe6ab1946a
This commit is contained in:
parent
f77e110a62
commit
afc3d711b1
@ -2607,8 +2607,6 @@ array_slice(JSContext *cx, uintN argc, Value *vp)
|
|||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if JS_HAS_ARRAY_EXTRAS
|
|
||||||
|
|
||||||
static JSBool
|
static JSBool
|
||||||
array_indexOfHelper(JSContext *cx, JSBool isLast, uintN argc, Value *vp)
|
array_indexOfHelper(JSContext *cx, JSBool isLast, uintN argc, Value *vp)
|
||||||
{
|
{
|
||||||
@ -2929,7 +2927,6 @@ array_every(JSContext *cx, uintN argc, Value *vp)
|
|||||||
{
|
{
|
||||||
return array_extra(cx, EVERY, argc, vp);
|
return array_extra(cx, EVERY, argc, vp);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static JSBool
|
static JSBool
|
||||||
array_isArray(JSContext *cx, uintN argc, Value *vp)
|
array_isArray(JSContext *cx, uintN argc, Value *vp)
|
||||||
@ -2963,7 +2960,6 @@ static JSFunctionSpec array_methods[] = {
|
|||||||
JS_FN("concat", array_concat, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("concat", array_concat, 1,JSFUN_GENERIC_NATIVE),
|
||||||
JS_FN("slice", array_slice, 2,JSFUN_GENERIC_NATIVE),
|
JS_FN("slice", array_slice, 2,JSFUN_GENERIC_NATIVE),
|
||||||
|
|
||||||
#if JS_HAS_ARRAY_EXTRAS
|
|
||||||
JS_FN("indexOf", array_indexOf, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("indexOf", array_indexOf, 1,JSFUN_GENERIC_NATIVE),
|
||||||
JS_FN("lastIndexOf", array_lastIndexOf, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("lastIndexOf", array_lastIndexOf, 1,JSFUN_GENERIC_NATIVE),
|
||||||
JS_FN("forEach", array_forEach, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("forEach", array_forEach, 1,JSFUN_GENERIC_NATIVE),
|
||||||
@ -2973,7 +2969,6 @@ static JSFunctionSpec array_methods[] = {
|
|||||||
JS_FN("filter", array_filter, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("filter", array_filter, 1,JSFUN_GENERIC_NATIVE),
|
||||||
JS_FN("some", array_some, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("some", array_some, 1,JSFUN_GENERIC_NATIVE),
|
||||||
JS_FN("every", array_every, 1,JSFUN_GENERIC_NATIVE),
|
JS_FN("every", array_every, 1,JSFUN_GENERIC_NATIVE),
|
||||||
#endif
|
|
||||||
|
|
||||||
JS_FS_END
|
JS_FS_END
|
||||||
};
|
};
|
||||||
|
@ -96,7 +96,6 @@
|
|||||||
#define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
|
#define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
|
||||||
#define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
|
#define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
|
||||||
#define JS_HAS_XML_SUPPORT 0 /* has ECMAScript for XML support */
|
#define JS_HAS_XML_SUPPORT 0 /* has ECMAScript for XML support */
|
||||||
#define JS_HAS_ARRAY_EXTRAS 0 /* has indexOf and Lispy extras */
|
|
||||||
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
||||||
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
||||||
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
||||||
@ -123,7 +122,6 @@
|
|||||||
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
||||||
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
||||||
#define JS_HAS_XML_SUPPORT 0 /* has ECMAScript for XML support */
|
#define JS_HAS_XML_SUPPORT 0 /* has ECMAScript for XML support */
|
||||||
#define JS_HAS_ARRAY_EXTRAS 0 /* has indexOf and Lispy extras */
|
|
||||||
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
||||||
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
||||||
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
||||||
@ -146,7 +144,6 @@
|
|||||||
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
||||||
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
||||||
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
||||||
#define JS_HAS_ARRAY_EXTRAS 1 /* has indexOf and Lispy extras */
|
|
||||||
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
#define JS_HAS_GENERATORS 0 /* has yield in generator function */
|
||||||
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
#define JS_HAS_BLOCK_SCOPE 0 /* has block scope via let/arraycomp */
|
||||||
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
#define JS_HAS_DESTRUCTURING 0 /* has [a,b] = ... or {p:a,q:b} = ... */
|
||||||
@ -169,7 +166,6 @@
|
|||||||
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
||||||
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
||||||
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
||||||
#define JS_HAS_ARRAY_EXTRAS 1 /* has indexOf and Lispy extras */
|
|
||||||
#define JS_HAS_GENERATORS 1 /* has yield in generator function */
|
#define JS_HAS_GENERATORS 1 /* has yield in generator function */
|
||||||
#define JS_HAS_BLOCK_SCOPE 1 /* has block scope via let/arraycomp */
|
#define JS_HAS_BLOCK_SCOPE 1 /* has block scope via let/arraycomp */
|
||||||
#define JS_HAS_DESTRUCTURING 1 /* has [a,b] = ... or {p:a,q:b} = ... */
|
#define JS_HAS_DESTRUCTURING 1 /* has [a,b] = ... or {p:a,q:b} = ... */
|
||||||
@ -192,7 +188,6 @@
|
|||||||
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
||||||
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
||||||
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
#define JS_HAS_XML_SUPPORT 1 /* has ECMAScript for XML support */
|
||||||
#define JS_HAS_ARRAY_EXTRAS 1 /* has indexOf and Lispy extras */
|
|
||||||
#define JS_HAS_GENERATORS 1 /* has yield in generator function */
|
#define JS_HAS_GENERATORS 1 /* has yield in generator function */
|
||||||
#define JS_HAS_BLOCK_SCOPE 1 /* has block scope via let/arraycomp */
|
#define JS_HAS_BLOCK_SCOPE 1 /* has block scope via let/arraycomp */
|
||||||
#define JS_HAS_DESTRUCTURING 2 /* has [a,b] = ... or {p:a,q:b} = ... */
|
#define JS_HAS_DESTRUCTURING 2 /* has [a,b] = ... or {p:a,q:b} = ... */
|
||||||
|
Loading…
Reference in New Issue
Block a user