@@ -40204,7 +40204,7 @@ typedef struct JSIteratorHelperData {
40204
40204
JSValue func; // predicate (filter) or mapper (flatMap, map)
40205
40205
JSValue inner; // innerValue (flatMap)
40206
40206
int64_t count; // limit (drop, take) or counter (filter, map, flatMap)
40207
- JSIteratorHelperKindEnum kind : 8;
40207
+ JSIteratorHelperKindEnum kind : 8;
40208
40208
uint8_t executing : 1;
40209
40209
uint8_t done : 1;
40210
40210
} JSIteratorHelperData;
@@ -48318,6 +48318,10 @@ static const JSCFunctionListEntry js_map_funcs[] = {
48318
48318
JS_CGETSET_DEF("[Symbol.species]", js_get_this, NULL ),
48319
48319
};
48320
48320
48321
+ static const JSCFunctionListEntry js_set_funcs[] = {
48322
+ JS_CGETSET_DEF("[Symbol.species]", js_get_this, NULL ),
48323
+ };
48324
+
48321
48325
static const JSCFunctionListEntry js_map_proto_funcs[] = {
48322
48326
JS_CFUNC_MAGIC_DEF("set", 2, js_map_set, 0 ),
48323
48327
JS_CFUNC_MAGIC_DEF("get", 1, js_map_get, 0 ),
@@ -48406,17 +48410,19 @@ void JS_AddIntrinsicMapSet(JSContext *ctx)
48406
48410
for(i = 0; i < 4; i++) {
48407
48411
const char *name = JS_AtomGetStr(ctx, buf, sizeof(buf),
48408
48412
JS_ATOM_Map + i);
48409
- ctx->class_proto[JS_CLASS_MAP + i] = JS_NewObject(ctx);
48410
- JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_MAP + i],
48413
+ int class_id = JS_CLASS_MAP + i;
48414
+ ctx->class_proto[class_id] = JS_NewObject(ctx);
48415
+ JS_SetPropertyFunctionList(ctx, ctx->class_proto[class_id],
48411
48416
js_map_proto_funcs_ptr[i],
48412
48417
js_map_proto_funcs_count[i]);
48413
48418
obj1 = JS_NewCFunctionMagic(ctx, js_map_constructor, name, 0,
48414
48419
JS_CFUNC_constructor_magic, i);
48415
- if (i < 2) {
48416
- JS_SetPropertyFunctionList(ctx, obj1, js_map_funcs,
48417
- countof(js_map_funcs));
48418
- }
48419
- JS_NewGlobalCConstructor2(ctx, obj1, name, ctx->class_proto[JS_CLASS_MAP + i]);
48420
+ if (class_id == JS_CLASS_MAP)
48421
+ JS_SetPropertyFunctionList(ctx, obj1, js_map_funcs, countof(js_map_funcs));
48422
+ else if (class_id == JS_CLASS_SET)
48423
+ JS_SetPropertyFunctionList(ctx, obj1, js_set_funcs, countof(js_set_funcs));
48424
+
48425
+ JS_NewGlobalCConstructor2(ctx, obj1, name, ctx->class_proto[class_id]);
48420
48426
}
48421
48427
48422
48428
for(i = 0; i < 2; i++) {
0 commit comments