Lines Matching refs:predicate
14 function ArrayFind(predicate /* thisArg */) { // length == 1 argument
20 if (!IS_SPEC_FUNCTION(predicate)) {
21 throw MakeTypeError('called_non_callable', [predicate]);
30 thisArg = %GetDefaultReceiver(predicate) || thisArg;
31 } else if (!IS_SPEC_OBJECT(thisArg) && %IsSloppyModeFunction(predicate)) {
38 if (%_CallFunction(thisArg, element, i, array, predicate)) {
49 function ArrayFindIndex(predicate /* thisArg */) { // length == 1 argument
55 if (!IS_SPEC_FUNCTION(predicate)) {
56 throw MakeTypeError('called_non_callable', [predicate]);
65 thisArg = %GetDefaultReceiver(predicate) || thisArg;
66 } else if (!IS_SPEC_OBJECT(thisArg) && %IsSloppyModeFunction(predicate)) {
73 if (%_CallFunction(thisArg, element, i, array, predicate)) {