/* Note: always return JS_UNDEFINED when *pdone = TRUE. */
static JSValue JS_IteratorNext(JSContext *ctx, JSValueConst enum_obj,
- JSValueConst method,
- int argc, JSValueConst *argv, BOOL *pdone)
+ JSValueConst method, BOOL *pdone)
{
JSValue obj, value, done_val;
int done;
- obj = JS_IteratorNext2(ctx, enum_obj, method, argc, argv, &done);
+ obj = JS_IteratorNext2(ctx, enum_obj, method, 0, NULL, &done);
if (JS_IsException(obj))
goto fail;
if (likely(done == 0)) {
int done = 1;
if (likely(!JS_IsUndefined(sp[offset]))) {
- value = JS_IteratorNext(ctx, sp[offset], sp[offset + 1], 0, NULL, &done);
+ value = JS_IteratorNext(ctx, sp[offset], sp[offset + 1], &done);
if (JS_IsException(value))
done = -1;
if (done) {
general_case:
for (;;) {
BOOL done;
- value = JS_IteratorNext(ctx, enumobj, method, 0, NULL, &done);
+ value = JS_IteratorNext(ctx, enumobj, method, &done);
if (JS_IsException(value))
goto exception;
if (done) {
for(;;) {
JSValue key, value, item;
- item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(item))
goto fail;
if (done)
if (JS_IsException(r))
goto exception;
for (k = 0;; k++) {
- v = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ v = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(v))
goto exception_close;
if (done)
if (JS_IsException(next_method))
goto exception;
for (k = 0;; k++) {
- v = JS_IteratorNext(ctx, enum_obj, next_method, 0, NULL, &done);
+ v = JS_IteratorNext(ctx, enum_obj, next_method, &done);
if (JS_IsException(v))
goto exception;
if (done)
if (!it)
return JS_EXCEPTION;
if (magic == GEN_MAGIC_NEXT) {
- return JS_IteratorNext(ctx, it->wrapped_iter, it->wrapped_next, 0, NULL, pdone);
+ return JS_IteratorNext(ctx, it->wrapped_iter, it->wrapped_next, pdone);
} else {
method = JS_GetProperty(ctx, it->wrapped_iter, JS_ATOM_return);
if (JS_IsException(method))
{
r = JS_TRUE;
for (idx = 0; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto fail_no_close;
if (done)
case JS_ITERATOR_HELPER_KIND_FIND:
{
for (idx = 0; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto fail_no_close;
if (done)
case JS_ITERATOR_HELPER_KIND_FOR_EACH:
{
for (idx = 0; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto fail_no_close;
if (done)
{
r = JS_FALSE;
for (idx = 0; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto fail_no_close;
if (done)
acc = JS_DupValue(ctx, argv[1]);
idx = 0;
} else {
- acc = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ acc = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(acc))
goto exception_no_close;
if (done) {
idx = 1;
}
for (/* empty */; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto exception_no_close;
if (done)
if (JS_IsException(result))
goto exception;
for (idx = 0; /*empty*/; idx++) {
- item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, this_val, method, &done);
if (JS_IsException(item))
goto exception;
if (done)
JSValue item;
while (it->count > 0) {
it->count--;
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
JS_FreeValue(ctx, item);
}
}
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
ret = item;
JSValue item, selected, index_val;
JSValueConst args[2];
for(;;) {
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
if (*pdone) {
JSValueConst args[2];
for(;;) {
if (JS_IsUndefined(it->inner)) {
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
if (*pdone) {
it->inner_next = method;
}
- item = JS_IteratorNext(ctx, it->inner, it->inner_next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->inner, it->inner_next, pdone);
if (JS_IsException(item)) {
inner_fail:
JS_IteratorClose(ctx, it->inner, FALSE);
{
JSValue item, index_val;
JSValueConst args[2];
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
if (*pdone) {
JSValue item;
if (it->count > 0) {
it->count--;
- item = JS_IteratorNext(ctx, it->obj, it->next, 0, NULL, pdone);
+ item = JS_IteratorNext(ctx, it->obj, it->next, pdone);
if (JS_IsException(item))
goto fail_no_close;
ret = item;
goto fail;
sum_precise_init(s);
for (;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto fail;
if (done)
goto fail;
for(;;) {
- item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(item))
goto fail;
if (done)
JS_ThrowTypeError(ctx, "too many elements");
goto iterator_close_exception;
}
- v = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ v = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(v))
goto exception;
if (done)
goto exception;
found = FALSE;
for(;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
goto exception;
found = TRUE;
for(;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
goto exception;
t = JS_GetOpaque(newset, JS_CLASS_SET);
for (;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
if (JS_IsException(next))
goto exception;
for (;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
goto exception;
t = JS_GetOpaque(newset, JS_CLASS_SET);
for (;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
goto exception;
for (;;) {
- item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
for(;;) {
/* XXX: conformance: should close the iterator if error on 'done'
access, but not on 'value' access */
- item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(item))
goto fail_reject;
if (done)
for(;;) {
/* XXX: conformance: should close the iterator if error on 'done'
access, but not on 'value' access */
- item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ item = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(item))
goto fail_reject;
if (done)
goto fail;
k = 0;
for(;;) {
- val = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done);
+ val = JS_IteratorNext(ctx, iter, next_method, &done);
if (JS_IsException(val))
goto fail;
if (done)