n = 0;
for(k = 0; k < len; k++) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
if (special & special_TA) {
val = JS_GetPropertyInt64(ctx, obj, k);
if (JS_IsException(val))
acc = JS_DupValue(ctx, argv[1]);
} else {
for(;;) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
if (k >= len) {
JS_ThrowTypeError(ctx, "empty array");
goto exception;
}
}
for (; k < len; k++) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
k1 = (special & special_reduceRight) ? len - k - 1 : k;
if (special & special_TA) {
val = JS_GetPropertyInt64(ctx, obj, k1);
}
}
for (; n < len; n++) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
val = JS_GetPropertyInt64(ctx, obj, n);
if (JS_IsException(val))
goto exception;
}
}
for (; n < len; n++) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
int present = JS_TryGetPropertyInt64(ctx, obj, n, &val);
if (present < 0)
goto exception;
}
/* XXX: should special case fast arrays */
for (; n >= 0; n--) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
present = JS_TryGetPropertyInt64(ctx, obj, n, &val);
if (present < 0)
goto exception;
// TODO(bnoordhuis) add fast path for fast arrays
for(; k != end; k += dir) {
+ if (js_poll_interrupts(ctx))
+ goto exception;
index_val = JS_NewInt64(ctx, k);
if (JS_IsException(index_val))
goto exception;