1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
|
// Generated by `bun src/js/builtins/codegen`
// Do not edit by hand.
namespace Zig { class GlobalObject; }
#include "root.h"
#include "config.h"
#include "JSDOMGlobalObject.h"
#include "WebCoreJSClientData.h"
#include <JavaScriptCore/JSObjectInlines.h>
namespace WebCore {
/* ReadableStreamDefaultController.ts */
// initializeReadableStreamDefaultController
const JSC::ConstructAbility s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCodeLength = 333;
static const JSC::Intrinsic s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCode = "(function (stream,underlyingSource,size,highWaterMark){\"use strict\";if(arguments.length!==5&&arguments[4]!==@isReadableStream)@throwTypeError(\"ReadableStreamDefaultController constructor should not be called directly\");return @privateInitializeReadableStreamDefaultController.@call(this,stream,underlyingSource,size,highWaterMark)})\n";
// enqueue
const JSC::ConstructAbility s_readableStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultControllerEnqueueCodeLength = 364;
static const JSC::Intrinsic s_readableStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultControllerEnqueueCode = "(function (chunk){\"use strict\";if(!@isReadableStreamDefaultController(this))throw @makeThisTypeError(\"ReadableStreamDefaultController\",\"enqueue\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(this))@throwTypeError(\"ReadableStreamDefaultController is not in a state where chunk can be enqueued\");return @readableStreamDefaultControllerEnqueue(this,chunk)})\n";
// error
const JSC::ConstructAbility s_readableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultControllerErrorCodeLength = 192;
static const JSC::Intrinsic s_readableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultControllerErrorCode = "(function (err){\"use strict\";if(!@isReadableStreamDefaultController(this))throw @makeThisTypeError(\"ReadableStreamDefaultController\",\"error\");@readableStreamDefaultControllerError(this,err)})\n";
// close
const JSC::ConstructAbility s_readableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultControllerCloseCodeLength = 337;
static const JSC::Intrinsic s_readableStreamDefaultControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultControllerCloseCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultController(this))throw @makeThisTypeError(\"ReadableStreamDefaultController\",\"close\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(this))@throwTypeError(\"ReadableStreamDefaultController is not in a state where it can be closed\");@readableStreamDefaultControllerClose(this)})\n";
// desiredSize
const JSC::ConstructAbility s_readableStreamDefaultControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultControllerDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultControllerDesiredSizeCodeLength = 209;
static const JSC::Intrinsic s_readableStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultController(this))throw @makeGetterTypeError(\"ReadableStreamDefaultController\",\"desiredSize\");return @readableStreamDefaultControllerGetDesiredSize(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamBYOBReader.ts */
// initializeReadableStreamBYOBReader
const JSC::ConstructAbility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength = 510;
static const JSC::Intrinsic s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableStream\");if(!@isReadableByteStreamController(@getByIdDirectPrivate(stream,\"readableStreamController\")))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableByteStreamController\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readIntoRequests\",@createFIFO()),this})\n";
// cancel
const JSC::ConstructAbility s_readableStreamBYOBReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBReaderCancelCodeLength = 361;
static const JSC::Intrinsic s_readableStreamBYOBReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
// read
const JSC::ConstructAbility s_readableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBReaderReadCodeLength = 663;
static const JSC::Intrinsic s_readableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBReaderReadCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));if(!@isObject(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an object\"));if(!@ArrayBuffer.@isView(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an ArrayBufferView\"));if(view.byteLength===0)return @Promise.@reject(@makeTypeError(\"Provided view cannot have a 0 byteLength\"));return @readableStreamBYOBReaderRead(this,view)})\n";
// releaseLock
const JSC::ConstructAbility s_readableStreamBYOBReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBReaderReleaseLockCodeLength = 382;
static const JSC::Intrinsic s_readableStreamBYOBReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))throw @makeThisTypeError(\"ReadableStreamBYOBReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readIntoRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
// closed
const JSC::ConstructAbility s_readableStreamBYOBReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBReaderClosedCodeLength = 218;
static const JSC::Intrinsic s_readableStreamBYOBReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamBYOBReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableByteStreamInternals.ts */
// privateInitializeReadableByteStreamController
const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength = 1896;
static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (stream,underlyingByteSource,highWaterMark){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(stream,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",stream),@putByIdDirectPrivate(this,\"underlyingByteSource\",underlyingByteSource),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let hwm=@toNumber(highWaterMark);if(hwm!==hwm||hwm<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",hwm);let autoAllocateChunkSize=underlyingByteSource.autoAllocateChunkSize;if(autoAllocateChunkSize!==@undefined){if(autoAllocateChunkSize=@toNumber(autoAllocateChunkSize),autoAllocateChunkSize<=0||autoAllocateChunkSize===@Infinity||autoAllocateChunkSize===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",autoAllocateChunkSize),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const controller=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"start\",[controller]).@then(()=>{@putByIdDirectPrivate(controller,\"started\",1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(stream,\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n";
// readableStreamByteStreamControllerStart
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength = 91;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"start\",@undefined)})\n";
// privateInitializeReadableStreamBYOBRequest
const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength = 163;
static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";@putByIdDirectPrivate(this,\"associatedReadableByteStreamController\",controller),@putByIdDirectPrivate(this,\"view\",view)})\n";
// isReadableByteStreamController
const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength = 127;
static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsIsReadableByteStreamControllerCode = "(function (controller){\"use strict\";return @isObject(controller)&&!!@getByIdDirectPrivate(controller,\"underlyingByteSource\")})\n";
// isReadableStreamBYOBRequest
const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength = 148;
static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsIsReadableStreamBYOBRequestCode = "(function (byobRequest){\"use strict\";return @isObject(byobRequest)&&!!@getByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\")})\n";
// isReadableStreamBYOBReader
const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength = 111;
static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsIsReadableStreamBYOBReaderCode = "(function (reader){\"use strict\";return @isObject(reader)&&!!@getByIdDirectPrivate(reader,\"readIntoRequests\")})\n";
// readableByteStreamControllerCancel
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 336;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (controller,reason){\"use strict\";var pendingPullIntos=@getByIdDirectPrivate(controller,\"pendingPullIntos\"),first=pendingPullIntos.peek();if(first)first.bytesFilled=0;return @putByIdDirectPrivate(controller,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"cancel\",[reason])})\n";
// readableByteStreamControllerError
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength = 242;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerErrorCode = "(function (controller,e){\"use strict\";@readableByteStreamControllerClearPendingPullIntos(controller),@putByIdDirectPrivate(controller,\"queue\",@newQueue()),@readableStreamError(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),e)})\n";
// readableByteStreamControllerClose
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength = 473;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerCloseCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"queue\").size>0){@putByIdDirectPrivate(controller,\"closeRequested\",!0);return}var first=@getByIdDirectPrivate(controller,\"pendingPullIntos\")\?.peek();if(first){if(first.bytesFilled>0){const e=@makeTypeError(\"Close requested while there remain pending bytes\");throw @readableByteStreamControllerError(controller,e),e}}@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"))})\n";
// readableByteStreamControllerClearPendingPullIntos
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength = 281;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode = "(function (controller){\"use strict\";@readableByteStreamControllerInvalidateBYOBRequest(controller);var existing=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(existing!==@undefined)existing.clear();else @putByIdDirectPrivate(controller,\"pendingPullIntos\",@createFIFO())})\n";
// readableByteStreamControllerGetDesiredSize
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength = 330;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===@streamErrored)return null;if(state===@streamClosed)return 0;return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
// readableStreamHasBYOBReader
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength = 150;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamBYOBReader(reader)})\n";
// readableStreamHasDefaultReader
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength = 153;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamDefaultReader(reader)})\n";
// readableByteStreamControllerHandleQueueDrain
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength = 287;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode = "(function (controller){\"use strict\";if(!@getByIdDirectPrivate(controller,\"queue\").size&&@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else @readableByteStreamControllerCallPullIfNeeded(controller)})\n";
// readableByteStreamControllerPull
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength = 1169;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(controller,\"queue\").content\?.isNotEmpty()){const entry=@getByIdDirectPrivate(controller,\"queue\").content.shift();@getByIdDirectPrivate(controller,\"queue\").size-=entry.byteLength,@readableByteStreamControllerHandleQueueDrain(controller);let view;try{view=new @Uint8Array(entry.buffer,entry.byteOffset,entry.byteLength)}catch(error){return @Promise.@reject(error)}return @createFulfilledPromise({value:view,done:!1})}if(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\")!==@undefined){let buffer;try{buffer=@createUninitializedArrayBuffer(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"))}catch(error){return @Promise.@reject(error)}const pullIntoDescriptor={buffer,byteOffset:0,byteLength:@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor)}const promise=@readableStreamAddReadRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
// readableByteStreamControllerShouldCallPull
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength = 709;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return!1;if(@getByIdDirectPrivate(controller,\"closeRequested\"))return!1;if(!(@getByIdDirectPrivate(controller,\"started\")>0))return!1;const reader=@getByIdDirectPrivate(stream,\"reader\");if(reader&&(@getByIdDirectPrivate(reader,\"readRequests\")\?.isNotEmpty()||!!@getByIdDirectPrivate(reader,\"bunNativePtr\")))return!0;if(@readableStreamHasBYOBReader(stream)&&@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\")\?.isNotEmpty())return!0;if(@readableByteStreamControllerGetDesiredSize(controller)>0)return!0;return!1})\n";
// readableByteStreamControllerCallPullIfNeeded
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength = 748;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode = "(function (controller){\"use strict\";if(!@readableByteStreamControllerShouldCallPull(controller))return;if(@getByIdDirectPrivate(controller,\"pulling\")){@putByIdDirectPrivate(controller,\"pullAgain\",!0);return}@putByIdDirectPrivate(controller,\"pulling\",!0),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"pull\",[controller]).@then(()=>{if(@putByIdDirectPrivate(controller,\"pulling\",!1),@getByIdDirectPrivate(controller,\"pullAgain\"))@putByIdDirectPrivate(controller,\"pullAgain\",!1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)})})\n";
// transferBufferToCurrentRealm
const JSC::ConstructAbility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength = 48;
static const JSC::Intrinsic s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsTransferBufferToCurrentRealmCode = "(function (buffer){\"use strict\";return buffer})\n";
// readableStreamReaderKind
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamReaderKindCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamReaderKindCodeLength = 208;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamReaderKindCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamReaderKindCode = "(function (reader){\"use strict\";if(@getByIdDirectPrivate(reader,\"readRequests\"))return @getByIdDirectPrivate(reader,\"bunNativePtr\")\?3:1;if(@getByIdDirectPrivate(reader,\"readIntoRequests\"))return 2;return 0})\n";
// readableByteStreamControllerEnqueue
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength = 1036;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");switch(@getByIdDirectPrivate(stream,\"reader\")\?@readableStreamReaderKind(@getByIdDirectPrivate(stream,\"reader\")):0){case 1:{if(!@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty())@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);else{const transferredView=chunk.constructor===@Uint8Array\?chunk:new @Uint8Array(chunk.buffer,chunk.byteOffset,chunk.byteLength);@readableStreamFulfillReadRequest(stream,transferredView,!1)}break}case 2:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength),@readableByteStreamControllerProcessPullDescriptors(controller);break}case 3:break;default:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);break}}})\n";
// readableByteStreamControllerEnqueueChunk
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength = 213;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode = "(function (controller,buffer,byteOffset,byteLength){\"use strict\";@getByIdDirectPrivate(controller,\"queue\").content.push({buffer,byteOffset,byteLength}),@getByIdDirectPrivate(controller,\"queue\").size+=byteLength})\n";
// readableByteStreamControllerRespondWithNewView
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength = 463;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode = "(function (controller,view){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(firstDescriptor.byteOffset+firstDescriptor.bytesFilled!==view.byteOffset)@throwRangeError(\"Invalid value for view.byteOffset\");if(firstDescriptor.byteLength!==view.byteLength)@throwRangeError(\"Invalid value for view.byteLength\");firstDescriptor.buffer=view.buffer,@readableByteStreamControllerRespondInternal(controller,view.byteLength)})\n";
// readableByteStreamControllerRespond
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength = 287;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode = "(function (controller,bytesWritten){\"use strict\";if(bytesWritten=@toNumber(bytesWritten),bytesWritten!==bytesWritten||bytesWritten===@Infinity||bytesWritten<0)@throwRangeError(\"bytesWritten has an incorrect value\");@readableByteStreamControllerRespondInternal(controller,bytesWritten)})\n";
// readableByteStreamControllerRespondInternal
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength = 534;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (controller,bytesWritten){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek(),stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){if(bytesWritten!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(controller,firstDescriptor)}else @readableByteStreamControllerRespondInReadableState(controller,bytesWritten,firstDescriptor)})\n";
// readableByteStreamControllerRespondInReadableState
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength = 1110;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode = "(function (controller,bytesWritten,pullIntoDescriptor){\"use strict\";if(pullIntoDescriptor.bytesFilled+bytesWritten>pullIntoDescriptor.byteLength)@throwRangeError(\"bytesWritten value is too great\");if(@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesWritten,pullIntoDescriptor.bytesFilled<pullIntoDescriptor.elementSize)return;@readableByteStreamControllerShiftPendingDescriptor(controller);const remainderSize=pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize;if(remainderSize>0){const end=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled,remainder=@cloneArrayBuffer(pullIntoDescriptor.buffer,end-remainderSize,remainderSize);@readableByteStreamControllerEnqueueChunk(controller,remainder,0,remainder.byteLength)}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pullIntoDescriptor.bytesFilled-=remainderSize,@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor),@readableByteStreamControllerProcessPullDescriptors(controller)})\n";
// readableByteStreamControllerRespondInClosedState
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength = 596;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode = "(function (controller,firstDescriptor){\"use strict\";if(firstDescriptor.buffer=@transferBufferToCurrentRealm(firstDescriptor.buffer),@readableStreamHasBYOBReader(@getByIdDirectPrivate(controller,\"controlledReadableStream\")))while(@getByIdDirectPrivate(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"reader\"),\"readIntoRequests\")\?.isNotEmpty()){let pullIntoDescriptor=@readableByteStreamControllerShiftPendingDescriptor(controller);@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
// readableByteStreamControllerProcessPullDescriptors
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength = 534;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode = "(function (controller){\"use strict\";while(@getByIdDirectPrivate(controller,\"pendingPullIntos\").isNotEmpty()){if(@getByIdDirectPrivate(controller,\"queue\").size===0)return;let pullIntoDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor))@readableByteStreamControllerShiftPendingDescriptor(controller),@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
// readableByteStreamControllerFillDescriptorFromQueue
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 1538;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (controller,pullIntoDescriptor){\"use strict\";const currentAlignedBytes=pullIntoDescriptor.bytesFilled-pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize,maxBytesToCopy=@getByIdDirectPrivate(controller,\"queue\").size<pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled\?@getByIdDirectPrivate(controller,\"queue\").size:pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled,maxBytesFilled=pullIntoDescriptor.bytesFilled+maxBytesToCopy,maxAlignedBytes=maxBytesFilled-maxBytesFilled%pullIntoDescriptor.elementSize;let totalBytesToCopyRemaining=maxBytesToCopy,ready=!1;if(maxAlignedBytes>currentAlignedBytes)totalBytesToCopyRemaining=maxAlignedBytes-pullIntoDescriptor.bytesFilled,ready=!0;while(totalBytesToCopyRemaining>0){let headOfQueue=@getByIdDirectPrivate(controller,\"queue\").content.peek();const bytesToCopy=totalBytesToCopyRemaining<headOfQueue.byteLength\?totalBytesToCopyRemaining:headOfQueue.byteLength,destStart=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;if(new @Uint8Array(pullIntoDescriptor.buffer).set(new @Uint8Array(headOfQueue.buffer,headOfQueue.byteOffset,bytesToCopy),destStart),headOfQueue.byteLength===bytesToCopy)@getByIdDirectPrivate(controller,\"queue\").content.shift();else headOfQueue.byteOffset+=bytesToCopy,headOfQueue.byteLength-=bytesToCopy;@getByIdDirectPrivate(controller,\"queue\").size-=bytesToCopy,@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesToCopy,totalBytesToCopyRemaining-=bytesToCopy}return ready})\n";
// readableByteStreamControllerShiftPendingDescriptor
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength = 195;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode = "(function (controller){\"use strict\";let descriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").shift();return @readableByteStreamControllerInvalidateBYOBRequest(controller),descriptor})\n";
// readableByteStreamControllerInvalidateBYOBRequest
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength = 374;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"byobRequest\")===@undefined)return;const byobRequest=@getByIdDirectPrivate(controller,\"byobRequest\");@putByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\",@undefined),@putByIdDirectPrivate(byobRequest,\"view\",@undefined),@putByIdDirectPrivate(controller,\"byobRequest\",@undefined)})\n";
// readableByteStreamControllerCommitDescriptor
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength = 382;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode = "(function (stream,pullIntoDescriptor){\"use strict\";let done=!1;if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed)done=!0;let filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);if(pullIntoDescriptor.readerType===\"default\")@readableStreamFulfillReadRequest(stream,filledView,done);else @readableStreamFulfillReadIntoRequest(stream,filledView,done)})\n";
// readableByteStreamControllerConvertDescriptor
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength = 200;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode = "(function (pullIntoDescriptor){\"use strict\";return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,pullIntoDescriptor.bytesFilled/pullIntoDescriptor.elementSize)})\n";
// readableStreamFulfillReadIntoRequest
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength = 208;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (stream,chunk,done){\"use strict\";const readIntoRequest=@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(readIntoRequest,{value:chunk,done})})\n";
// readableStreamBYOBReaderRead
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength = 384;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode = "(function (reader,view){\"use strict\";const stream=@getByIdDirectPrivate(reader,\"ownerReadableStream\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),@getByIdDirectPrivate(stream,\"state\")===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @readableByteStreamControllerPullInto(@getByIdDirectPrivate(stream,\"readableStreamController\"),view)})\n";
// readableByteStreamControllerPullInto
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength = 1659;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (controller,view){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");let elementSize=1;if(view.BYTES_PER_ELEMENT!==@undefined)elementSize=view.BYTES_PER_ELEMENT;const ctor=view.constructor,pullIntoDescriptor={buffer:view.buffer,byteOffset:view.byteOffset,byteLength:view.byteLength,bytesFilled:0,elementSize,ctor,readerType:\"byob\"};var pending=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(pending\?.isNotEmpty())return pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pending.push(pullIntoDescriptor),@readableStreamAddReadIntoRequest(stream);if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){const emptyView=new ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,0);return @createFulfilledPromise({value:emptyView,done:!0})}if(@getByIdDirectPrivate(controller,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor)){const filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);return @readableByteStreamControllerHandleQueueDrain(controller),@createFulfilledPromise({value:filledView,done:!1})}if(@getByIdDirectPrivate(controller,\"closeRequested\")){const e=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(controller,e),@Promise.@reject(e)}}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor);const promise=@readableStreamAddReadIntoRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
// readableStreamAddReadIntoRequest
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength = 184;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode = "(function (stream){\"use strict\";const readRequest=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").push(readRequest),readRequest})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* StreamInternals.ts */
// markPromiseAsHandled
const JSC::ConstructAbility s_streamInternalsMarkPromiseAsHandledCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsMarkPromiseAsHandledCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsMarkPromiseAsHandledCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsMarkPromiseAsHandledCodeLength = 164;
static const JSC::Intrinsic s_streamInternalsMarkPromiseAsHandledCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsMarkPromiseAsHandledCode = "(function (promise){\"use strict\";@putPromiseInternalField(promise,@promiseFieldFlags,@getPromiseInternalField(promise,@promiseFieldFlags)|@promiseFlagsIsHandled)})\n";
// shieldingPromiseResolve
const JSC::ConstructAbility s_streamInternalsShieldingPromiseResolveCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsShieldingPromiseResolveCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsShieldingPromiseResolveCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsShieldingPromiseResolveCodeLength = 158;
static const JSC::Intrinsic s_streamInternalsShieldingPromiseResolveCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsShieldingPromiseResolveCode = "(function (result){\"use strict\";const promise=@Promise.@resolve(result);if(promise.@then===@undefined)promise.@then=@Promise.prototype.@then;return promise})\n";
// promiseInvokeOrNoopMethodNoCatch
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength = 156;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCode = "(function (object,method,args){\"use strict\";if(method===@undefined)return @Promise.@resolve();return @shieldingPromiseResolve(method.@apply(object,args))})\n";
// promiseInvokeOrNoopNoCatch
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopNoCatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopNoCatchCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopNoCatchCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength = 109;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopNoCatchCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPromiseInvokeOrNoopNoCatchCode = "(function (object,key,args){\"use strict\";return @promiseInvokeOrNoopMethodNoCatch(object,object[key],args)})\n";
// promiseInvokeOrNoopMethod
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopMethodCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopMethodCodeLength = 156;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopMethodCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPromiseInvokeOrNoopMethodCode = "(function (object,method,args){\"use strict\";try{return @promiseInvokeOrNoopMethodNoCatch(object,method,args)}catch(error){return @Promise.@reject(error)}})\n";
// promiseInvokeOrNoop
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopCodeLength = 144;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPromiseInvokeOrNoopCode = "(function (object,key,args){\"use strict\";try{return @promiseInvokeOrNoopNoCatch(object,key,args)}catch(error){return @Promise.@reject(error)}})\n";
// promiseInvokeOrFallbackOrNoop
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength = 269;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPromiseInvokeOrFallbackOrNoopCode = "(function (object,key1,args1,key2,args2){\"use strict\";try{const method=object[key1];if(method===@undefined)return @promiseInvokeOrNoopNoCatch(object,key2,args2);return @shieldingPromiseResolve(method.@apply(object,args1))}catch(error){return @Promise.@reject(error)}})\n";
// validateAndNormalizeQueuingStrategy
const JSC::ConstructAbility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsValidateAndNormalizeQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength = 365;
static const JSC::Intrinsic s_streamInternalsValidateAndNormalizeQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsValidateAndNormalizeQueuingStrategyCode = "(function (size,highWaterMark){\"use strict\";if(size!==@undefined&&typeof size!==\"function\")@throwTypeError(\"size parameter must be a function\");const newHighWaterMark=@toNumber(highWaterMark);if(newHighWaterMark!==newHighWaterMark||newHighWaterMark<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return{size,highWaterMark:newHighWaterMark}})\n";
// createFIFO
const JSC::ConstructAbility s_streamInternalsCreateFIFOCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsCreateFIFOCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsCreateFIFOCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_streamInternalsCreateFIFOCodeLength = 1650;
static const JSC::Intrinsic s_streamInternalsCreateFIFOCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var slice=@Array.prototype.slice;class Denqueue{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)}isEmpty(){return this.size()==0}isNotEmpty(){return this.size()>0}shift(){var{_head:head,_tail,_list,_capacityMask}=this;if(head===_tail)return @undefined;var item=_list[head];if(@putByValDirect(_list,head,@undefined),head=this._head=head+1&_capacityMask,head<2&&_tail>1e4&&_tail<=_list.length>>>2)this._shrinkArray();return item}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(item){var tail=this._tail;if(@putByValDirect(this._list,tail,item),this._tail=tail+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(fullCopy){var list=this._list,len=@toLength(list.length);if(fullCopy||this._head>this._tail){var _head=@toLength(this._head),_tail=@toLength(this._tail),total=@toLength(len-_head+_tail),array=@newArrayWithSize(total),j=0;for(var i=_head;i<len;i++)@putByValDirect(array,j++,list[i]);for(var i=0;i<_tail;i++)@putByValDirect(array,j++,list[i]);return array}else return slice.@call(list,this._head,this._tail)}clear(){this._head=0,this._tail=0,this._list.fill(@undefined)}_growArray(){if(this._head)this._list=this.toArray(!0),this._head=0;this._tail=@toLength(this._list.length),this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1}_shrinkArray(){this._list.length>>>=1,this._capacityMask>>>=1}}return new Denqueue})\n";
// newQueue
const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsNewQueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsNewQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsNewQueueCodeLength = 65;
static const JSC::Intrinsic s_streamInternalsNewQueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsNewQueueCode = "(function (){\"use strict\";return{content:@createFIFO(),size:0}})\n";
// dequeueValue
const JSC::ConstructAbility s_streamInternalsDequeueValueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsDequeueValueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsDequeueValueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsDequeueValueCodeLength = 141;
static const JSC::Intrinsic s_streamInternalsDequeueValueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsDequeueValueCode = "(function (queue){\"use strict\";const record=queue.content.shift();if(queue.size-=record.size,queue.size<0)queue.size=0;return record.value})\n";
// enqueueValueWithSize
const JSC::ConstructAbility s_streamInternalsEnqueueValueWithSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsEnqueueValueWithSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsEnqueueValueWithSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsEnqueueValueWithSizeCodeLength = 191;
static const JSC::Intrinsic s_streamInternalsEnqueueValueWithSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsEnqueueValueWithSizeCode = "(function (queue,value,size){\"use strict\";if(size=@toNumber(size),!@isFinite(size)||size<0)@throwRangeError(\"size has an incorrect value\");queue.content.push({value,size}),queue.size+=size})\n";
// peekQueueValue
const JSC::ConstructAbility s_streamInternalsPeekQueueValueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsPeekQueueValueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsPeekQueueValueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPeekQueueValueCodeLength = 68;
static const JSC::Intrinsic s_streamInternalsPeekQueueValueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsPeekQueueValueCode = "(function (queue){\"use strict\";return queue.content.peek()\?.value})\n";
// resetQueue
const JSC::ConstructAbility s_streamInternalsResetQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsResetQueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsResetQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsResetQueueCodeLength = 68;
static const JSC::Intrinsic s_streamInternalsResetQueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsResetQueueCode = "(function (queue){\"use strict\";queue.content.clear(),queue.size=0})\n";
// extractSizeAlgorithm
const JSC::ConstructAbility s_streamInternalsExtractSizeAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsExtractSizeAlgorithmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsExtractSizeAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsExtractSizeAlgorithmCodeLength = 246;
static const JSC::Intrinsic s_streamInternalsExtractSizeAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsExtractSizeAlgorithmCode = "(function (strategy){\"use strict\";const sizeAlgorithm=strategy.size;if(sizeAlgorithm===@undefined)return()=>1;if(typeof sizeAlgorithm!==\"function\")@throwTypeError(\"strategy.size must be a function\");return(chunk)=>{return sizeAlgorithm(chunk)}})\n";
// extractHighWaterMark
const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsExtractHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsExtractHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsExtractHighWaterMarkCodeLength = 288;
static const JSC::Intrinsic s_streamInternalsExtractHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsExtractHighWaterMarkCode = "(function (strategy,defaultHWM){\"use strict\";const highWaterMark=strategy.highWaterMark;if(highWaterMark===@undefined)return defaultHWM;if(highWaterMark!==highWaterMark||highWaterMark<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return @toNumber(highWaterMark)})\n";
// extractHighWaterMarkFromQueuingStrategyInit
const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength = 280;
static const JSC::Intrinsic s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode = "(function (init){\"use strict\";if(!@isObject(init))@throwTypeError(\"QueuingStrategyInit argument must be an object.\");const{highWaterMark}=init;if(highWaterMark===@undefined)@throwTypeError(\"QueuingStrategyInit.highWaterMark member is required.\");return @toNumber(highWaterMark)})\n";
// createFulfilledPromise
const JSC::ConstructAbility s_streamInternalsCreateFulfilledPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsCreateFulfilledPromiseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsCreateFulfilledPromiseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsCreateFulfilledPromiseCodeLength = 107;
static const JSC::Intrinsic s_streamInternalsCreateFulfilledPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsCreateFulfilledPromiseCode = "(function (value){\"use strict\";const promise=@newPromise();return @fulfillPromise(promise,value),promise})\n";
// toDictionary
const JSC::ConstructAbility s_streamInternalsToDictionaryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_streamInternalsToDictionaryCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_streamInternalsToDictionaryCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsToDictionaryCodeLength = 179;
static const JSC::Intrinsic s_streamInternalsToDictionaryCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_streamInternalsToDictionaryCode = "(function (value,defaultValue,errorMessage){\"use strict\";if(value===@undefined||value===null)return defaultValue;if(!@isObject(value))@throwTypeError(errorMessage);return value})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().streamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().streamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamDefaultReader.ts */
// initializeReadableStreamDefaultReader
const JSC::ConstructAbility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength = 334;
static const JSC::Intrinsic s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamDefaultReader needs a ReadableStream\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readRequests\",@createFIFO()),this})\n";
// cancel
const JSC::ConstructAbility s_readableStreamDefaultReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderCancelCodeLength = 367;
static const JSC::Intrinsic s_readableStreamDefaultReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
// readMany
const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderReadManyCodeLength = 3230;
static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const stream=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!stream)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const state=@getByIdDirectPrivate(stream,\"state\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),state===@streamClosed)return{value:[],size:0,done:!0};else if(state===@streamErrored)throw @getByIdDirectPrivate(stream,\"storedError\");var controller=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue=@getByIdDirectPrivate(controller,\"queue\");if(!queue)return controller.@pull(controller).@then(function({done,value}){return done\?{done:!0,value:[],size:0}:{value:[value],size:1,done:!1}});const content=queue.content;var size=queue.size,values=content.toArray(!1),length=values.length;if(length>0){var outValues=@newArrayWithSize(length);if(@isReadableByteStreamController(controller)){{const buf=values[0];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,0,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,0,buf)}for(var i=1;i<length;i++){const buf=values[i];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,i,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,i,buf)}}else{@putByValDirect(outValues,0,values[0].value);for(var i=1;i<length;i++)@putByValDirect(outValues,i,values[i].value)}if(@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller))@readableStreamDefaultControllerCallPullIfNeeded(controller);else if(@isReadableByteStreamController(controller))@readableByteStreamControllerCallPullIfNeeded(controller);return{value:outValues,size,done:!1}}var onPullMany=(result)=>{if(result.done)return{value:[],size:0,done:!0};var controller2=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue2=@getByIdDirectPrivate(controller2,\"queue\"),value=[result.value].concat(queue2.content.toArray(!1)),length2=value.length;if(@isReadableByteStreamController(controller2))for(var i2=0;i2<length2;i2++){const buf=value[i2];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer)){const{buffer,byteOffset,byteLength}=buf;@putByValDirect(value,i2,new @Uint8Array(buffer,byteOffset,byteLength))}}else for(var i2=1;i2<length2;i2++)@putByValDirect(value,i2,value[i2].value);var size2=queue2.size;if(@resetQueue(queue2),@getByIdDirectPrivate(controller2,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller2,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller2))@readableStreamDefaultControllerCallPullIfNeeded(controller2);else if(@isReadableByteStreamController(controller2))@readableByteStreamControllerCallPullIfNeeded(controller2);return{value,size:size2,done:!1}},pullResult=controller.@pull(controller);if(pullResult&&@isPromise(pullResult))return pullResult.@then(onPullMany);return onPullMany(pullResult)})\n";
// read
const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderReadCodeLength = 348;
static const JSC::Intrinsic s_readableStreamDefaultReaderReadCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderReadCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));return @readableStreamDefaultReaderRead(this)})\n";
// releaseLock
const JSC::ConstructAbility s_readableStreamDefaultReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderReleaseLockCodeLength = 384;
static const JSC::Intrinsic s_readableStreamDefaultReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))throw @makeThisTypeError(\"ReadableStreamDefaultReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
// closed
const JSC::ConstructAbility s_readableStreamDefaultReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderClosedCodeLength = 224;
static const JSC::Intrinsic s_readableStreamDefaultReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamDefaultReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* EventSource.ts */
// getEventSource
const JSC::ConstructAbility s_eventSourceGetEventSourceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_eventSourceGetEventSourceCodeLength = 8458;
static const JSC::Intrinsic s_eventSourceGetEventSourceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class EventSource extends EventTarget{#url;#state;#onerror;#onmessage;#onopen;#is_tls=!1;#socket=null;#data_buffer=\"\";#send_buffer=\"\";#lastEventID=\"\";#reconnect=!0;#content_length=0;#received_length=0;#reconnection_time=0;#reconnection_timer=null;static#ConnectNextTick(self){self.#connect()}static#SendRequest(socket,url){const self=socket.data,last_event_header=self.#lastEventID\?`Last-Event-ID: ${self.#lastEventID}\\r\\n`:\"\",request=`GET ${url.pathname}${url.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${last_event_header}\\r\\n`,sended=socket.write(request);if(sended!==request.length)self.#send_buffer=request.substring(sended)}static#ProcessChunk(self,chunks,offset){for(;;){if(offset>=chunks.length)return;let chunk_end_idx=-1,start_idx=chunks.indexOf(\"\\r\\n\",offset);const chunk_start_idx=start_idx+2;if(start_idx>0)if(self.#content_length===0){const chunk_size=parseInt(chunks.substring(offset,start_idx),16);if(chunk_size===0){self.#state=2,self.#socket\?.end();return}chunk_end_idx=chunk_start_idx+chunk_size}else chunk_end_idx=chunks.length;else{if(self.#data_buffer.length===0){self.#data_buffer+=chunks.substring(offset);return}chunk_end_idx=chunks.length}let chunk=chunks.substring(chunk_start_idx,chunk_end_idx);offset=chunk_end_idx+2;let chunk_offset=0,event_idx=chunk.indexOf(\"\\n\\n\");if(event_idx==-1){self.#data_buffer+=chunks.substring(chunk_start_idx);return}if(self.#data_buffer.length)self.#data_buffer+=chunk,chunk=self.#data_buffer,self.#data_buffer=\"\";let more_events=!0;while(more_events){const event_data=chunk.substring(chunk_offset,event_idx);let type,data=\"\",id,event_line_idx=0,retry=-1;for(;;){let idx=event_data.indexOf(\"\\n\",event_line_idx);if(idx===-1){if(event_line_idx>=event_data.length)break;idx=event_data.length}const line=event_data.substring(event_line_idx,idx);if(line.startsWith(\"data:\"))if(data.length)data+=`\\n${line.substring(5).trim()}`;else data=line.substring(5).trim();else if(line.startsWith(\"event:\"))type=line.substring(6).trim();else if(line.startsWith(\"id:\"))id=line.substring(3).trim();else if(line.startsWith(\"retry:\")){if(retry=parseInt(line.substring(6).trim(),10),retry!==retry)retry=-1}event_line_idx=idx+1}if(self.#lastEventID=id||\"\",retry>=0)self.#reconnection_time=retry;if(data||id||type)self.dispatchEvent(new MessageEvent(type||\"message\",{data:data||\"\",origin:self.#url.origin,source:self,lastEventId:id}));if(chunk.length===event_idx+2){more_events=!1;break}const next_event_idx=chunk.indexOf(\"\\n\\n\",event_idx+1);if(next_event_idx===-1)break;chunk_offset=event_idx,event_idx=next_event_idx}}}static#Handlers={open(socket){const self=socket.data;if(self.#socket=socket,!self.#is_tls)EventSource.#SendRequest(socket,self.#url)},handshake(socket,success,verifyError){const self=socket.data;if(success)EventSource.#SendRequest(socket,self.#url);else self.#state=2,self.dispatchEvent(new ErrorEvent(\"error\",{error:verifyError})),socket.end()},data(socket,buffer){const self=socket.data;switch(self.#state){case 0:{let text=buffer.toString();const headers_idx=text.indexOf(\"\\r\\n\\r\\n\");if(headers_idx===-1){self.#data_buffer+=text;return}if(self.#data_buffer.length)self.#data_buffer+=text,text=self.#data_buffer,self.#data_buffer=\"\";const headers=text.substring(0,headers_idx),status_idx=headers.indexOf(\"\\r\\n\");if(status_idx===-1){self.#state=2,self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),socket.end();return}const status=headers.substring(0,status_idx);if(status!==\"HTTP/1.1 200 OK\"){self.#state=2,self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(status)})),socket.end();return}let start_idx=status_idx+1,mime_type_ok=!1,content_length=-1;for(;;){let header_idx=headers.indexOf(\"\\r\\n\",start_idx);if(header_idx===-1){if(start_idx>=headers.length){if(!mime_type_ok)self.#state=2,self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),socket.end();return}header_idx=headers.length}const header=headers.substring(start_idx+1,header_idx),header_name_idx=header.indexOf(\":\"),header_name=header.substring(0,header_name_idx),is_content_type=header_name.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(start_idx=header_idx+1,is_content_type)if(header.endsWith(\" text/event-stream\"))mime_type_ok=!0;else{self.#state=2,self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),socket.end();return}else if(header_name.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(content_length=parseInt(header.substring(header_name_idx+1).trim(),10),content_length!==content_length||content_length<=0){self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"EventSource's Content-Length is invalid. Aborting the connection.\")})),socket.end();return}if(mime_type_ok)break}else if(header_name.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(header.substring(header_name_idx+1).trim()!==\"chunked\"){self.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"EventSource's Transfer-Encoding is invalid. Aborting the connection.\")})),socket.end();return}if(content_length=0,mime_type_ok)break}}self.#content_length=content_length,self.#state=1,self.dispatchEvent(new Event(\"open\"));const chunks=text.substring(headers_idx+4);if(EventSource.#ProcessChunk(self,chunks,0),self.#content_length>0){if(self.#received_length+=chunks.length,self.#received_length>=self.#content_length)self.#state=2,socket.end()}return}case 1:if(EventSource.#ProcessChunk(self,buffer.toString(),2),self.#content_length>0){if(self.#received_length+=buffer.byteLength,self.#received_length>=self.#content_length)self.#state=2,socket.end()}return;default:break}},drain(socket){const self=socket.data;if(self.#state===0){const request=self.#data_buffer;if(request.length){const sended=socket.write(request);if(sended!==request.length)socket.data.#send_buffer=request.substring(sended);else socket.data.#send_buffer=\"\"}}},close:EventSource.#Close,end(socket){EventSource.#Close(socket).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(socket){EventSource.#Close(socket).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#Close(socket){const self=socket.data;if(self.#socket=null,self.#received_length=0,self.#state=2,self.#reconnect){if(self.#reconnection_timer)clearTimeout(self.#reconnection_timer);self.#reconnection_timer=setTimeout(EventSource.#ConnectNextTick,self.#reconnection_time,self)}return self}constructor(url,options=@undefined){super();const uri=new URL(url);this.#is_tls=uri.protocol===\"https:\",this.#url=uri,this.#state=2,process.nextTick(EventSource.#ConnectNextTick,this)}ref(){this.#reconnection_timer\?.ref(),this.#socket\?.ref()}unref(){this.#reconnection_timer\?.unref(),this.#socket\?.unref()}#connect(){if(this.#state!==2)return;const uri=this.#url,is_tls=this.#is_tls;this.#state=0,@Bun.connect({data:this,socket:EventSource.#Handlers,hostname:uri.hostname,port:parseInt(uri.port||(is_tls\?\"443\":\"80\"),10),tls:is_tls\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((err)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:err})),this.#reconnect){if(this.#reconnection_timer)this.#reconnection_timer.unref\?.();this.#reconnection_timer=setTimeout(EventSource.#ConnectNextTick,1000,this)}})}get url(){return this.#url.href}get readyState(){return this.#state}close(){this.#reconnect=!1,this.#state=2,this.#socket\?.unref(),this.#socket\?.end()}get onopen(){return this.#onopen}get onerror(){return this.#onerror}get onmessage(){return this.#onmessage}set onopen(cb){if(this.#onopen)super.removeEventListener(\"close\",this.#onopen);super.addEventListener(\"open\",cb),this.#onopen=cb}set onerror(cb){if(this.#onerror)super.removeEventListener(\"error\",this.#onerror);super.addEventListener(\"error\",cb),this.#onerror=cb}set onmessage(cb){if(this.#onmessage)super.removeEventListener(\"message\",this.#onmessage);super.addEventListener(\"message\",cb),this.#onmessage=cb}}return Object.defineProperty(EventSource.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(EventSource.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(EventSource.prototype,\"CLOSED\",{enumerable:!0,value:2}),EventSource})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().eventSourceBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().eventSourceBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* UtilInspect.ts */
// getStylizeWithColor
const JSC::ConstructAbility s_utilInspectGetStylizeWithColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_utilInspectGetStylizeWithColorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_utilInspectGetStylizeWithColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_utilInspectGetStylizeWithColorCodeLength = 261;
static const JSC::Intrinsic s_utilInspectGetStylizeWithColorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_utilInspectGetStylizeWithColorCode = "(function (inspect){\"use strict\";return function stylizeWithColor(str,styleType){const style=inspect.styles[styleType];if(style!==@undefined){const color=inspect.colors[style];if(color!==@undefined)return`\\x1B[${color[0]}m${str}\\x1B[${color[1]}m`}return str}})\n";
// stylizeWithNoColor
const JSC::ConstructAbility s_utilInspectStylizeWithNoColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_utilInspectStylizeWithNoColorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_utilInspectStylizeWithNoColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_utilInspectStylizeWithNoColorCodeLength = 42;
static const JSC::Intrinsic s_utilInspectStylizeWithNoColorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_utilInspectStylizeWithNoColorCode = "(function (str){\"use strict\";return str})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().utilInspectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().utilInspectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* TransformStreamDefaultController.ts */
// initializeTransformStreamDefaultController
const JSC::ConstructAbility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength = 40;
static const JSC::Intrinsic s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode = "(function (){\"use strict\";return this})\n";
// desiredSize
const JSC::ConstructAbility s_transformStreamDefaultControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamDefaultControllerDesiredSizeCodeLength = 397;
static const JSC::Intrinsic s_transformStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const stream=@getByIdDirectPrivate(this,\"stream\"),readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(readableController)})\n";
// enqueue
const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamDefaultControllerEnqueueCodeLength = 203;
static const JSC::Intrinsic s_transformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamDefaultControllerEnqueueCode = "(function (chunk){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");@transformStreamDefaultControllerEnqueue(this,chunk)})\n";
// error
const JSC::ConstructAbility s_transformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamDefaultControllerErrorCodeLength = 191;
static const JSC::Intrinsic s_transformStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"error\");@transformStreamDefaultControllerError(this,e)})\n";
// terminate
const JSC::ConstructAbility s_transformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamDefaultControllerTerminateCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamDefaultControllerTerminateCodeLength = 196;
static const JSC::Intrinsic s_transformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamDefaultControllerTerminateCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"terminate\");@transformStreamDefaultControllerTerminate(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ConsoleObject.ts */
// asyncIterator
const JSC::ConstructAbility s_consoleObjectAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_consoleObjectAsyncIteratorCodeLength = 949;
static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const Iterator=async function*ConsoleAsyncIterator(){var reader=@Bun.stdin.stream().getReader(),decoder=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),deferredError,indexOf=@Bun.indexOfLine;try{while(!0){var done,value,pendingChunk;const firstResult=reader.readMany();if(@isPromise(firstResult))({done,value}=await firstResult);else({done,value}=firstResult);if(done){if(pendingChunk)yield decoder.decode(pendingChunk);return}var actualChunk;for(let chunk of value){if(actualChunk=chunk,pendingChunk)actualChunk=@Buffer.concat([pendingChunk,chunk]),pendingChunk=null;var last=0,i=indexOf(actualChunk,last);while(i!==-1)yield decoder.decode(actualChunk.subarray(last,i)),last=i+1,i=indexOf(actualChunk,last);pendingChunk=actualChunk.subarray(last)}}}catch(e){deferredError=e}finally{if(reader.releaseLock(),deferredError)throw deferredError}},symbol=globalThis.Symbol.asyncIterator;return this[symbol]=Iterator,Iterator()})\n";
// write
const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_consoleObjectWriteCodeLength = 392;
static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_consoleObjectWriteCode = "(function (input){\"use strict\";var writer=@getByIdDirectPrivate(this,\"writer\");if(!writer){var length=@toLength(input\?.length\?\?0);writer=@Bun.stdout.writer({highWaterMark:length>65536\?length:65536}),@putByIdDirectPrivate(this,\"writer\",writer)}var wrote=writer.write(input);const count=@argumentCount();for(var i=1;i<count;i++)wrote+=writer.write(@argument(i));return writer.flush(!0),wrote})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().consoleObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().consoleObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* JSBufferConstructor.ts */
// from
const JSC::ConstructAbility s_jsBufferConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferConstructorFromCodeLength = 1274;
static const JSC::Intrinsic s_jsBufferConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferConstructorFromCode = "(function (items){\"use strict\";if(@isUndefinedOrNull(items))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof items===\"string\"||typeof items===\"object\"&&(@isTypedArrayView(items)||items instanceof @ArrayBuffer||items instanceof SharedArrayBuffer||items instanceof @String))switch(@argumentCount()){case 1:return new @Buffer(items);case 2:return new @Buffer(items,@argument(1));default:return new @Buffer(items,@argument(1),@argument(2))}var arrayLike=@toObject(items,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(arrayLike)){const toPrimitive=@tryGetByIdWithWellKnownSymbol(items,\"toPrimitive\");if(toPrimitive){const primitive=toPrimitive.@call(items,\"string\");if(typeof primitive===\"string\")switch(@argumentCount()){case 1:return new @Buffer(primitive);case 2:return new @Buffer(primitive,@argument(1));default:return new @Buffer(primitive,@argument(1),@argument(2))}}if(!(\"length\"in arrayLike)||@isCallable(arrayLike))@throwTypeError(\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\")}return new @Buffer(@Uint8Array.from(arrayLike).buffer)})\n";
// isBuffer
const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferConstructorIsBufferCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferConstructorIsBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferConstructorIsBufferCodeLength = 75;
static const JSC::Intrinsic s_jsBufferConstructorIsBufferCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferConstructorIsBufferCode = "(function (bufferlike){\"use strict\";return bufferlike instanceof @Buffer})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* TransformStream.ts */
// initializeTransformStream
const JSC::ConstructAbility s_transformStreamInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInitializeTransformStreamCodeLength = 2041;
static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let transformer=arguments[0];if(@isObject(transformer)&&@getByIdDirectPrivate(transformer,\"TransformStream\"))return this;let writableStrategy=arguments[1],readableStrategy=arguments[2];if(transformer===@undefined)transformer=null;if(readableStrategy===@undefined)readableStrategy={};if(writableStrategy===@undefined)writableStrategy={};let transformerDict={};if(transformer!==null){if(\"start\"in transformer){if(transformerDict.start=transformer.start,typeof transformerDict.start!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in transformer){if(transformerDict.transform=transformer.transform,typeof transformerDict.transform!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in transformer){if(transformerDict.flush=transformer.flush,typeof transformerDict.flush!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in transformer)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in transformer)@throwRangeError(\"TransformStream transformer has a writableType\")}const readableHighWaterMark=@extractHighWaterMark(readableStrategy,0),readableSizeAlgorithm=@extractSizeAlgorithm(readableStrategy),writableHighWaterMark=@extractHighWaterMark(writableStrategy,1),writableSizeAlgorithm=@extractSizeAlgorithm(writableStrategy),startPromiseCapability=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,startPromiseCapability.promise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm),@setUpTransformStreamDefaultControllerFromTransformer(this,transformer,transformerDict),(\"start\"in transformerDict)){const controller=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(transformer,transformerDict.start,[controller]))().@then(()=>{startPromiseCapability.resolve.@call()},(error)=>{startPromiseCapability.reject.@call(@undefined,error)})}else startPromiseCapability.resolve.@call();return this})\n";
// readable
const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamReadableCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamReadableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamReadableCodeLength = 158;
static const JSC::Intrinsic s_transformStreamReadableCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamReadableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"readable\");return @getByIdDirectPrivate(this,\"readable\")})\n";
// writable
const JSC::ConstructAbility s_transformStreamWritableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamWritableCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamWritableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamWritableCodeLength = 158;
static const JSC::Intrinsic s_transformStreamWritableCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamWritableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"writable\");return @getByIdDirectPrivate(this,\"writable\")})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().transformStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* CountQueuingStrategy.ts */
// highWaterMark
const JSC::ConstructAbility s_countQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_countQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_countQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_countQueuingStrategyHighWaterMarkCodeLength = 241;
static const JSC::Intrinsic s_countQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_countQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"CountQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
// size
const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_countQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_countQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_countQueuingStrategySizeCodeLength = 37;
static const JSC::Intrinsic s_countQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_countQueuingStrategySizeCode = "(function (){\"use strict\";return 1})\n";
// initializeCountQueuingStrategy
const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_countQueuingStrategyInitializeCountQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength = 139;
static const JSC::Intrinsic s_countQueuingStrategyInitializeCountQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* BundlerPlugin.ts */
// runSetupFunction
const JSC::ConstructAbility s_bundlerPluginRunSetupFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_bundlerPluginRunSetupFunctionCodeLength = 3224;
static const JSC::Intrinsic s_bundlerPluginRunSetupFunctionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_bundlerPluginRunSetupFunctionCode = "(function (setup,config){\"use strict\";var onLoadPlugins=new Map,onResolvePlugins=new Map;function validate(filterObject,callback,map){if(!filterObject||!@isObject(filterObject))@throwTypeError('Expected an object with \"filter\" RegExp');if(!callback||!@isCallable(callback))@throwTypeError(\"callback must be a function\");var{filter,namespace=\"file\"}=filterObject;if(!filter)@throwTypeError('Expected an object with \"filter\" RegExp');if(!@isRegExpObject(filter))@throwTypeError(\"filter must be a RegExp\");if(namespace&&typeof namespace!==\"string\")@throwTypeError(\"namespace must be a string\");if((namespace\?.length\?\?0)===0)namespace=\"file\";if(!/^([/@a-zA-Z0-9_\\\\-]+)$/.test(namespace))@throwTypeError(\"namespace can only contain $a-zA-Z0-9_\\\\-\");var callbacks=map.@get(namespace);if(!callbacks)map.@set(namespace,[[filter,callback]]);else @arrayPush(callbacks,[filter,callback])}function onLoad(filterObject,callback){validate(filterObject,callback,onLoadPlugins)}function onResolve(filterObject,callback){validate(filterObject,callback,onResolvePlugins)}const processSetupResult=()=>{var anyOnLoad=!1,anyOnResolve=!1;for(var[namespace,callbacks]of onLoadPlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,1),anyOnLoad=!0;for(var[namespace,callbacks]of onResolvePlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,0),anyOnResolve=!0;if(anyOnResolve){var onResolveObject=this.onResolve;if(!onResolveObject)this.onResolve=onResolvePlugins;else for(var[namespace,callbacks]of onResolvePlugins.entries()){var existing=onResolveObject.@get(namespace);if(!existing)onResolveObject.@set(namespace,callbacks);else onResolveObject.@set(namespace,existing.concat(callbacks))}}if(anyOnLoad){var onLoadObject=this.onLoad;if(!onLoadObject)this.onLoad=onLoadPlugins;else for(var[namespace,callbacks]of onLoadPlugins.entries()){var existing=onLoadObject.@get(namespace);if(!existing)onLoadObject.@set(namespace,callbacks);else onLoadObject.@set(namespace,existing.concat(callbacks))}}return anyOnLoad||anyOnResolve};var setupResult=setup({config,onDispose:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onEnd:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onLoad,onResolve,onStart:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),resolve:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),initialOptions:{...config,bundle:!0,entryPoints:config.entrypoints\?\?config.entryPoints\?\?[],minify:typeof config.minify===\"boolean\"\?config.minify:!1,minifyIdentifiers:config.minify===!0||config.minify\?.identifiers,minifyWhitespace:config.minify===!0||config.minify\?.whitespace,minifySyntax:config.minify===!0||config.minify\?.syntax,outbase:config.root,platform:config.target===\"bun\"\?\"node\":config.target},esbuild:{}});if(setupResult&&@isPromise(setupResult))if(@getPromiseInternalField(setupResult,@promiseFieldFlags)&@promiseStateFulfilled)setupResult=@getPromiseInternalField(setupResult,@promiseFieldReactionsOrResult);else return setupResult.@then(processSetupResult);return processSetupResult()})\n";
// runOnResolvePlugins
const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_bundlerPluginRunOnResolvePluginsCodeLength = 2359;
static const JSC::Intrinsic s_bundlerPluginRunOnResolvePluginsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_bundlerPluginRunOnResolvePluginsCode = "(function (specifier,inputNamespace,importer,internalID,kindId){\"use strict\";const kind=[\"entry-point\",\"import-statement\",\"require-call\",\"dynamic-import\",\"require-resolve\",\"import-rule\",\"url-token\",\"internal\"][kindId];var promiseResult=(async(inputPath,inputNamespace2,importer2,kind2)=>{var{onResolve,onLoad}=this,results=onResolve.@get(inputNamespace2);if(!results)return this.onResolveAsync(internalID,null,null,null),null;for(let[filter,callback]of results)if(filter.test(inputPath)){var result=callback({path:inputPath,importer:importer2,namespace:inputNamespace2,kind:kind2});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{path,namespace:userNamespace=inputNamespace2,external}=result;if(typeof path!==\"string\"||typeof userNamespace!==\"string\")@throwTypeError(\"onResolve plugins must return an object with a string 'path' and string 'loader' field\");if(!path)continue;if(!userNamespace)userNamespace=inputNamespace2;if(typeof external!==\"boolean\"&&!@isUndefinedOrNull(external))@throwTypeError('onResolve plugins \"external\" field must be boolean or unspecified');if(!external){if(userNamespace===\"file\"){if(process.platform!==\"win32\"){if(path[0]!==\"/\"||path.includes(\"..\"))@throwTypeError('onResolve plugin \"path\" must be absolute when the namespace is \"file\"')}}if(userNamespace===\"dataurl\"){if(!path.startsWith(\"data:\"))@throwTypeError('onResolve plugin \"path\" must start with \"data:\" when the namespace is \"dataurl\"')}if(userNamespace&&userNamespace!==\"file\"&&(!onLoad||!onLoad.@has(userNamespace)))@throwTypeError(`Expected onLoad plugin for namespace ${userNamespace} to exist`)}return this.onResolveAsync(internalID,path,userNamespace,external),null}return this.onResolveAsync(internalID,null,null,null),null})(specifier,inputNamespace,importer,kind);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,0)})})\n";
// runOnLoadPlugins
const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_bundlerPluginRunOnLoadPluginsCodeLength = 1835;
static const JSC::Intrinsic s_bundlerPluginRunOnLoadPluginsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_bundlerPluginRunOnLoadPluginsCode = "(function (internalID,path,namespace,defaultLoaderId){\"use strict\";const LOADERS_MAP={jsx:0,js:1,ts:2,tsx:3,css:4,file:5,json:6,toml:7,wasm:8,napi:9,base64:10,dataurl:11,text:12},loaderName=[\"jsx\",\"js\",\"ts\",\"tsx\",\"css\",\"file\",\"json\",\"toml\",\"wasm\",\"napi\",\"base64\",\"dataurl\",\"text\"][defaultLoaderId];var promiseResult=(async(internalID2,path2,namespace2,defaultLoader)=>{var results=this.onLoad.@get(namespace2);if(!results)return this.onLoadAsync(internalID2,null,null),null;for(let[filter,callback]of results)if(filter.test(path2)){var result=callback({path:path2,namespace:namespace2,loader:defaultLoader});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{contents,loader=defaultLoader}=result;if(typeof contents!==\"string\"&&!@isTypedArrayView(contents))@throwTypeError('onLoad plugins must return an object with \"contents\" as a string or Uint8Array');if(typeof loader!==\"string\")@throwTypeError('onLoad plugins must return an object with \"loader\" as a string');const chosenLoader=LOADERS_MAP[loader];if(chosenLoader===@undefined)@throwTypeError(`Loader ${loader} is not supported.`);return this.onLoadAsync(internalID2,contents,chosenLoader),null}return this.onLoadAsync(internalID2,null,null),null})(internalID,path,namespace,loaderName);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,1)})})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamInternals.ts */
// readableStreamReaderGenericInitialize
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeLength = 584;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamReaderGenericInitializeCode = "(function (reader,stream){\"use strict\";if(@putByIdDirectPrivate(reader,\"ownerReadableStream\",stream),@putByIdDirectPrivate(stream,\"reader\",reader),@getByIdDirectPrivate(stream,\"state\")===@streamReadable)@putByIdDirectPrivate(reader,\"closedPromiseCapability\",@newPromiseCapability(@Promise));else if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed)@putByIdDirectPrivate(reader,\"closedPromiseCapability\",{promise:@Promise.@resolve()});else @putByIdDirectPrivate(reader,\"closedPromiseCapability\",{promise:@newHandledRejectedPromise(@getByIdDirectPrivate(stream,\"storedError\"))})})\n";
// privateInitializeReadableStreamDefaultController
const JSC::ConstructAbility s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeLength = 755;
static const JSC::Intrinsic s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCode = "(function (stream,underlyingSource,size,highWaterMark){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamDefaultController needs a ReadableStream\");if(@getByIdDirectPrivate(stream,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");return @putByIdDirectPrivate(this,\"controlledReadableStream\",stream),@putByIdDirectPrivate(this,\"underlyingSource\",underlyingSource),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",-1),@putByIdDirectPrivate(this,\"closeRequested\",!1),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@putByIdDirectPrivate(this,\"strategy\",@validateAndNormalizeQueuingStrategy(size,highWaterMark)),this})\n";
// readableStreamDefaultControllerError
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeLength = 273;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerErrorCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return;@putByIdDirectPrivate(controller,\"queue\",@newQueue()),@readableStreamError(stream,error)})\n";
// readableStreamPipeTo
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamPipeToCodeLength = 469;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamPipeToCode = "(function (stream,sink){\"use strict\";const reader=new @ReadableStreamDefaultReader(stream);@getByIdDirectPrivate(reader,\"closedPromiseCapability\").promise.@then(()=>{},(e)=>{sink.error(e)});function doPipe(){@readableStreamDefaultReaderRead(reader).@then(function(result){if(result.done){sink.close();return}try{sink.enqueue(result.value)}catch(e){sink.error(\"ReadableStream chunk enqueueing in the sink failed\");return}doPipe()},function(e){sink.error(e)})}doPipe()})\n";
// acquireReadableStreamDefaultReader
const JSC::ConstructAbility s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeLength = 159;
static const JSC::Intrinsic s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsAcquireReadableStreamDefaultReaderCode = "(function (stream){\"use strict\";var start=@getByIdDirectPrivate(stream,\"start\");if(start)start.@call(stream);return new @ReadableStreamDefaultReader(stream)})\n";
// setupReadableStreamDefaultController
const JSC::ConstructAbility s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeLength = 1105;
static const JSC::Intrinsic s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (stream,underlyingSource,size,highWaterMark,startMethod,pullMethod,cancelMethod){\"use strict\";const controller=new @ReadableStreamDefaultController(stream,underlyingSource,size,highWaterMark,@isReadableStream);var asyncContext=stream.@asyncContext;const pullAlgorithm=()=>@promiseInvokeOrNoopMethod(underlyingSource,pullMethod,[controller]),cancelAlgorithm=asyncContext\?(reason)=>{var prev=@getInternalField(@asyncContext,0);@putInternalField(@asyncContext,0,asyncContext);var result=@promiseInvokeOrNoopMethod(underlyingSource,cancelMethod,[reason]);return @putInternalField(@asyncContext,0,prev),result}:(reason)=>@promiseInvokeOrNoopMethod(underlyingSource,cancelMethod,[reason]);@putByIdDirectPrivate(controller,\"pullAlgorithm\",pullAlgorithm),@putByIdDirectPrivate(controller,\"cancelAlgorithm\",cancelAlgorithm),@putByIdDirectPrivate(controller,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(controller,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(stream,\"readableStreamController\",controller),@readableStreamDefaultControllerStart(controller)})\n";
// createReadableStreamController
const JSC::ConstructAbility s_readableStreamInternalsCreateReadableStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsCreateReadableStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsCreateReadableStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsCreateReadableStreamControllerCodeLength = 946;
static const JSC::Intrinsic s_readableStreamInternalsCreateReadableStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (stream,underlyingSource,strategy){\"use strict\";const type=underlyingSource.type,typeString=@toString(type);if(typeString===\"bytes\"){if(strategy.highWaterMark===@undefined)strategy.highWaterMark=0;if(strategy.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(stream,\"readableStreamController\",new @ReadableByteStreamController(stream,underlyingSource,strategy.highWaterMark,@isReadableStream))}else if(typeString===\"direct\"){var highWaterMark=strategy\?.highWaterMark;@initializeArrayBufferStream.@call(stream,underlyingSource,highWaterMark)}else if(type===@undefined){if(strategy.highWaterMark===@undefined)strategy.highWaterMark=1;@setupReadableStreamDefaultController(stream,underlyingSource,strategy.size,strategy.highWaterMark,underlyingSource.start,underlyingSource.pull,underlyingSource.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n";
// readableStreamDefaultControllerStart
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerStartCodeLength = 518;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerStartCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"started\")!==-1)return;const underlyingSource=@getByIdDirectPrivate(controller,\"underlyingSource\"),startMethod=underlyingSource.start;@putByIdDirectPrivate(controller,\"started\",0),@promiseInvokeOrNoopMethodNoCatch(underlyingSource,startMethod,[controller]).@then(()=>{@putByIdDirectPrivate(controller,\"started\",1),@readableStreamDefaultControllerCallPullIfNeeded(controller)},(error)=>{@readableStreamDefaultControllerError(controller,error)})})\n";
// readableStreamPipeToWritableStream
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeLength = 2022;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (source,destination,preventClose,preventAbort,preventCancel,signal){\"use strict\";if(@getByIdDirectPrivate(source,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let pipeState={source,destination,preventAbort,preventCancel,preventClose,signal};if(pipeState.reader=@acquireReadableStreamDefaultReader(source),pipeState.writer=@acquireWritableStreamDefaultWriter(destination),@putByIdDirectPrivate(source,\"disturbed\",!0),pipeState.finalized=!1,pipeState.shuttingDown=!1,pipeState.promiseCapability=@newPromiseCapability(@Promise),pipeState.pendingReadPromiseCapability=@newPromiseCapability(@Promise),pipeState.pendingReadPromiseCapability.resolve.@call(),pipeState.pendingWritePromise=@Promise.@resolve(),signal!==@undefined){const algorithm=(reason)=>{if(pipeState.finalized)return;@pipeToShutdownWithAction(pipeState,()=>{const promiseDestination=!pipeState.preventAbort&&@getByIdDirectPrivate(pipeState.destination,\"state\")===\"writable\"\?@writableStreamAbort(pipeState.destination,reason):@Promise.@resolve(),promiseSource=!pipeState.preventCancel&&@getByIdDirectPrivate(pipeState.source,\"state\")===@streamReadable\?@readableStreamCancel(pipeState.source,reason):@Promise.@resolve();let promiseCapability=@newPromiseCapability(@Promise),shouldWait=!0,handleResolvedPromise=()=>{if(shouldWait){shouldWait=!1;return}promiseCapability.resolve.@call()},handleRejectedPromise=(e)=>{promiseCapability.reject.@call(@undefined,e)};return promiseDestination.@then(handleResolvedPromise,handleRejectedPromise),promiseSource.@then(handleResolvedPromise,handleRejectedPromise),promiseCapability.promise},reason)};if(@whenSignalAborted(signal,algorithm))return pipeState.promiseCapability.promise}return @pipeToErrorsMustBePropagatedForward(pipeState),@pipeToErrorsMustBePropagatedBackward(pipeState),@pipeToClosingMustBePropagatedForward(pipeState),@pipeToClosingMustBePropagatedBackward(pipeState),@pipeToLoop(pipeState),pipeState.promiseCapability.promise})\n";
// pipeToLoop
const JSC::ConstructAbility s_readableStreamInternalsPipeToLoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToLoopCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToLoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToLoopCodeLength = 152;
static const JSC::Intrinsic s_readableStreamInternalsPipeToLoopCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToLoopCode = "(function (pipeState){\"use strict\";if(pipeState.shuttingDown)return;@pipeToDoReadWrite(pipeState).@then((result)=>{if(result)@pipeToLoop(pipeState)})})\n";
// pipeToDoReadWrite
const JSC::ConstructAbility s_readableStreamInternalsPipeToDoReadWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToDoReadWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToDoReadWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToDoReadWriteCodeLength = 840;
static const JSC::Intrinsic s_readableStreamInternalsPipeToDoReadWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToDoReadWriteCode = "(function (pipeState){\"use strict\";return pipeState.pendingReadPromiseCapability=@newPromiseCapability(@Promise),@getByIdDirectPrivate(pipeState.writer,\"readyPromise\").promise.@then(()=>{if(pipeState.shuttingDown){pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,!1);return}@readableStreamDefaultReaderRead(pipeState.reader).@then((result)=>{const canWrite=!result.done&&@getByIdDirectPrivate(pipeState.writer,\"stream\")!==@undefined;if(pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,canWrite),!canWrite)return;pipeState.pendingWritePromise=@writableStreamDefaultWriterWrite(pipeState.writer,result.value)},(e)=>{pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,!1)})},(e)=>{pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,!1)}),pipeState.pendingReadPromiseCapability.promise})\n";
// pipeToErrorsMustBePropagatedForward
const JSC::ConstructAbility s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeLength = 539;
static const JSC::Intrinsic s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCode = "(function (pipeState){\"use strict\";const action=()=>{pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,!1);const error=@getByIdDirectPrivate(pipeState.source,\"storedError\");if(!pipeState.preventAbort){@pipeToShutdownWithAction(pipeState,()=>@writableStreamAbort(pipeState.destination,error),error);return}@pipeToShutdown(pipeState,error)};if(@getByIdDirectPrivate(pipeState.source,\"state\")===@streamErrored){action();return}@getByIdDirectPrivate(pipeState.reader,\"closedPromiseCapability\").promise.@then(@undefined,action)})\n";
// pipeToErrorsMustBePropagatedBackward
const JSC::ConstructAbility s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeLength = 463;
static const JSC::Intrinsic s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCode = "(function (pipeState){\"use strict\";const action=()=>{const error=@getByIdDirectPrivate(pipeState.destination,\"storedError\");if(!pipeState.preventCancel){@pipeToShutdownWithAction(pipeState,()=>@readableStreamCancel(pipeState.source,error),error);return}@pipeToShutdown(pipeState,error)};if(@getByIdDirectPrivate(pipeState.destination,\"state\")===\"errored\"){action();return}@getByIdDirectPrivate(pipeState.writer,\"closedPromise\").promise.@then(@undefined,action)})\n";
// pipeToClosingMustBePropagatedForward
const JSC::ConstructAbility s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeLength = 482;
static const JSC::Intrinsic s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCode = "(function (pipeState){\"use strict\";const action=()=>{if(pipeState.pendingReadPromiseCapability.resolve.@call(@undefined,!1),!pipeState.preventClose){@pipeToShutdownWithAction(pipeState,()=>@writableStreamDefaultWriterCloseWithErrorPropagation(pipeState.writer));return}@pipeToShutdown(pipeState)};if(@getByIdDirectPrivate(pipeState.source,\"state\")===@streamClosed){action();return}@getByIdDirectPrivate(pipeState.reader,\"closedPromiseCapability\").promise.@then(action,@undefined)})\n";
// pipeToClosingMustBePropagatedBackward
const JSC::ConstructAbility s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeLength = 396;
static const JSC::Intrinsic s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCode = "(function (pipeState){\"use strict\";if(!@writableStreamCloseQueuedOrInFlight(pipeState.destination)&&@getByIdDirectPrivate(pipeState.destination,\"state\")!==\"closed\")return;const error=@makeTypeError(\"closing is propagated backward\");if(!pipeState.preventCancel){@pipeToShutdownWithAction(pipeState,()=>@readableStreamCancel(pipeState.source,error),error);return}@pipeToShutdown(pipeState,error)})\n";
// pipeToShutdownWithAction
const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownWithActionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownWithActionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownWithActionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToShutdownWithActionCodeLength = 605;
static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownWithActionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (pipeState,action){\"use strict\";if(pipeState.shuttingDown)return;pipeState.shuttingDown=!0;const hasError=arguments.length>2,error=arguments[2],finalize=()=>{action().@then(()=>{if(hasError)@pipeToFinalize(pipeState,error);else @pipeToFinalize(pipeState)},(e)=>{@pipeToFinalize(pipeState,e)})};if(@getByIdDirectPrivate(pipeState.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(pipeState.destination)){pipeState.pendingReadPromiseCapability.promise.@then(()=>{pipeState.pendingWritePromise.@then(finalize,finalize)},(e)=>@pipeToFinalize(pipeState,e));return}finalize()})\n";
// pipeToShutdown
const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToShutdownCodeLength = 540;
static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToShutdownCode = "(function (pipeState){\"use strict\";if(pipeState.shuttingDown)return;pipeState.shuttingDown=!0;const hasError=arguments.length>1,error=arguments[1],finalize=()=>{if(hasError)@pipeToFinalize(pipeState,error);else @pipeToFinalize(pipeState)};if(@getByIdDirectPrivate(pipeState.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(pipeState.destination)){pipeState.pendingReadPromiseCapability.promise.@then(()=>{pipeState.pendingWritePromise.@then(finalize,finalize)},(e)=>@pipeToFinalize(pipeState,e));return}finalize()})\n";
// pipeToFinalize
const JSC::ConstructAbility s_readableStreamInternalsPipeToFinalizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsPipeToFinalizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToFinalizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToFinalizeCodeLength = 305;
static const JSC::Intrinsic s_readableStreamInternalsPipeToFinalizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsPipeToFinalizeCode = "(function (pipeState){\"use strict\";if(@writableStreamDefaultWriterRelease(pipeState.writer),@readableStreamReaderGenericRelease(pipeState.reader),pipeState.finalized=!0,arguments.length>1)pipeState.promiseCapability.reject.@call(@undefined,arguments[1]);else pipeState.promiseCapability.resolve.@call()})\n";
// readableStreamTee
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1383;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (stream,shouldClone){\"use strict\";var start_=@getByIdDirectPrivate(stream,\"start\");if(start_)@putByIdDirectPrivate(stream,\"start\",@undefined),start_();const reader=new @ReadableStreamDefaultReader(stream),teeState={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};teeState.cancelPromiseCapability=@newPromiseCapability(@Promise);const pullFunction=@readableStreamTeePullFunction(teeState,reader,shouldClone),branch1Source={};@putByIdDirectPrivate(branch1Source,\"pull\",pullFunction),@putByIdDirectPrivate(branch1Source,\"cancel\",@readableStreamTeeBranch1CancelFunction(teeState,stream));const branch2Source={};@putByIdDirectPrivate(branch2Source,\"pull\",pullFunction),@putByIdDirectPrivate(branch2Source,\"cancel\",@readableStreamTeeBranch2CancelFunction(teeState,stream));const branch1=new @ReadableStream(branch1Source),branch2=new @ReadableStream(branch2Source);return @getByIdDirectPrivate(reader,\"closedPromiseCapability\").promise.@then(@undefined,function(e){if(teeState.closedOrErrored)return;if(@readableStreamDefaultControllerError(branch1.@readableStreamController,e),@readableStreamDefaultControllerError(branch2.@readableStreamController,e),teeState.closedOrErrored=!0,!teeState.canceled1||!teeState.canceled2)teeState.cancelPromiseCapability.resolve.@call()}),teeState.branch1=branch1,teeState.branch2=branch2,[branch1,branch2]})\n";
// readableStreamTeePullFunction
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeePullFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeePullFunctionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeePullFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeePullFunctionCodeLength = 866;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeePullFunctionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (teeState,reader,shouldClone){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(reader),function(result){if(result.done&&!teeState.closedOrErrored){if(!teeState.canceled1)@readableStreamDefaultControllerClose(teeState.branch1.@readableStreamController);if(!teeState.canceled2)@readableStreamDefaultControllerClose(teeState.branch2.@readableStreamController);if(teeState.closedOrErrored=!0,!teeState.canceled1||!teeState.canceled2)teeState.cancelPromiseCapability.resolve.@call()}if(teeState.closedOrErrored)return;if(!teeState.canceled1)@readableStreamDefaultControllerEnqueue(teeState.branch1.@readableStreamController,result.value);if(!teeState.canceled2)@readableStreamDefaultControllerEnqueue(teeState.branch2.@readableStreamController,shouldClone\?@structuredCloneForStream(result.value):result.value)})}})\n";
// readableStreamTeeBranch1CancelFunction
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeLength = 330;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCode = "(function (teeState,stream){\"use strict\";return function(r){if(teeState.canceled1=!0,teeState.reason1=r,teeState.canceled2)@readableStreamCancel(stream,[teeState.reason1,teeState.reason2]).@then(teeState.cancelPromiseCapability.@resolve,teeState.cancelPromiseCapability.@reject);return teeState.cancelPromiseCapability.promise}})\n";
// readableStreamTeeBranch2CancelFunction
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeLength = 330;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCode = "(function (teeState,stream){\"use strict\";return function(r){if(teeState.canceled2=!0,teeState.reason2=r,teeState.canceled1)@readableStreamCancel(stream,[teeState.reason1,teeState.reason2]).@then(teeState.cancelPromiseCapability.@resolve,teeState.cancelPromiseCapability.@reject);return teeState.cancelPromiseCapability.promise}})\n";
// isReadableStream
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsIsReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsIsReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsIsReadableStreamCodeLength = 130;
static const JSC::Intrinsic s_readableStreamInternalsIsReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsIsReadableStreamCode = "(function (stream){\"use strict\";return @isObject(stream)&&@getByIdDirectPrivate(stream,\"readableStreamController\")!==@undefined})\n";
// isReadableStreamDefaultReader
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsIsReadableStreamDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsIsReadableStreamDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsIsReadableStreamDefaultReaderCodeLength = 107;
static const JSC::Intrinsic s_readableStreamInternalsIsReadableStreamDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsIsReadableStreamDefaultReaderCode = "(function (reader){\"use strict\";return @isObject(reader)&&!!@getByIdDirectPrivate(reader,\"readRequests\")})\n";
// isReadableStreamDefaultController
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsIsReadableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsIsReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsIsReadableStreamDefaultControllerCodeLength = 123;
static const JSC::Intrinsic s_readableStreamInternalsIsReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsIsReadableStreamDefaultControllerCode = "(function (controller){\"use strict\";return @isObject(controller)&&!!@getByIdDirectPrivate(controller,\"underlyingSource\")})\n";
// readDirectStream
const JSC::ConstructAbility s_readableStreamInternalsReadDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadDirectStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadDirectStreamCodeLength = 1281;
static const JSC::Intrinsic s_readableStreamInternalsReadDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (stream,sink,underlyingSource){\"use strict\";@putByIdDirectPrivate(stream,\"underlyingSource\",@undefined),@putByIdDirectPrivate(stream,\"start\",@undefined);function close(stream2,reason){if(reason&&underlyingSource\?.cancel){try{var prom=underlyingSource.cancel(reason);@markPromiseAsHandled(prom)}catch(e){}underlyingSource=@undefined}if(stream2){if(@putByIdDirectPrivate(stream2,\"readableStreamController\",@undefined),@putByIdDirectPrivate(stream2,\"reader\",@undefined),reason)@putByIdDirectPrivate(stream2,\"state\",@streamErrored),@putByIdDirectPrivate(stream2,\"storedError\",reason);else @putByIdDirectPrivate(stream2,\"state\",@streamClosed);stream2=@undefined}}if(!underlyingSource.pull){close();return}if(!@isCallable(underlyingSource.pull)){close(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(stream,\"readableStreamController\",sink);const highWaterMark=@getByIdDirectPrivate(stream,\"highWaterMark\");sink.start({highWaterMark:!highWaterMark||highWaterMark<64\?64:highWaterMark}),@startDirectStream.@call(sink,stream,underlyingSource.pull,close,stream.@asyncContext),@putByIdDirectPrivate(stream,\"reader\",{});var maybePromise=underlyingSource.pull(sink);if(sink=@undefined,maybePromise&&@isPromise(maybePromise))return maybePromise.@then(()=>{})})\n";
// assignToStream
const JSC::ConstructAbility s_readableStreamInternalsAssignToStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsAssignToStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsAssignToStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamInternalsAssignToStreamCodeLength = 318;
static const JSC::Intrinsic s_readableStreamInternalsAssignToStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsAssignToStreamCode = "(function (stream,sink){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource)try{return @readDirectStream(stream,sink,underlyingSource)}catch(e){throw e}finally{underlyingSource=@undefined,stream=@undefined,sink=@undefined}return @readStreamIntoSink(stream,sink,!0)})\n";
// readStreamIntoSink
const JSC::ConstructAbility s_readableStreamInternalsReadStreamIntoSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadStreamIntoSinkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadStreamIntoSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadStreamIntoSinkCodeLength = 1943;
static const JSC::Intrinsic s_readableStreamInternalsReadStreamIntoSinkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (stream,sink,isNative){\"use strict\";var didClose=!1,didThrow=!1;try{var reader=stream.getReader(),many=reader.readMany();if(many&&@isPromise(many))many=await many;if(many.done)return didClose=!0,sink.end();var wroteCount=many.value.length;const highWaterMark=@getByIdDirectPrivate(stream,\"highWaterMark\");if(isNative)@startDirectStream.@call(sink,stream,@undefined,()=>!didThrow&&@markPromiseAsHandled(stream.cancel()),stream.@asyncContext);sink.start({highWaterMark:highWaterMark||0});for(var i=0,values=many.value,length=many.value.length;i<length;i++)sink.write(values[i]);var streamState=@getByIdDirectPrivate(stream,\"state\");if(streamState===@streamClosed)return didClose=!0,sink.end();while(!0){var{value,done}=await reader.read();if(done)return didClose=!0,sink.end();sink.write(value)}}catch(e){didThrow=!0;try{reader=@undefined;const prom=stream.cancel(e);@markPromiseAsHandled(prom)}catch(j){}if(sink&&!didClose){didClose=!0;try{sink.close(e)}catch(j){throw new globalThis.AggregateError([e,j])}}throw e}finally{if(reader){try{reader.releaseLock()}catch(e){}reader=@undefined}sink=@undefined;var streamState=@getByIdDirectPrivate(stream,\"state\");if(stream){var readableStreamController=@getByIdDirectPrivate(stream,\"readableStreamController\");if(readableStreamController){if(@getByIdDirectPrivate(readableStreamController,\"underlyingSource\"))@putByIdDirectPrivate(readableStreamController,\"underlyingSource\",@undefined);if(@getByIdDirectPrivate(readableStreamController,\"controlledReadableStream\"))@putByIdDirectPrivate(readableStreamController,\"controlledReadableStream\",@undefined);if(@putByIdDirectPrivate(stream,\"readableStreamController\",null),@getByIdDirectPrivate(stream,\"underlyingSource\"))@putByIdDirectPrivate(stream,\"underlyingSource\",@undefined);readableStreamController=@undefined}if(!didThrow&&streamState!==@streamClosed&&streamState!==@streamErrored)@readableStreamClose(stream);stream=@undefined}}})\n";
// handleDirectStreamError
const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsHandleDirectStreamErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsHandleDirectStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsHandleDirectStreamErrorCodeLength = 584;
static const JSC::Intrinsic s_readableStreamInternalsHandleDirectStreamErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsHandleDirectStreamErrorCode = "(function (e){\"use strict\";var controller=this,sink=controller.@sink;if(sink){@putByIdDirectPrivate(controller,\"sink\",@undefined);try{sink.close(e)}catch(f){}}if(this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed,typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,e)}catch(e2){}try{var pend=controller._pendingRead;if(pend)controller._pendingRead=@undefined,@rejectPromise(pend,e)}catch(f){}var stream=controller.@controlledReadableStream;if(stream)@readableStreamError(stream,e)})\n";
// handleDirectStreamErrorReject
const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorRejectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsHandleDirectStreamErrorRejectCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsHandleDirectStreamErrorRejectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsHandleDirectStreamErrorRejectCodeLength = 95;
static const JSC::Intrinsic s_readableStreamInternalsHandleDirectStreamErrorRejectCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsHandleDirectStreamErrorRejectCode = "(function (e){\"use strict\";return @handleDirectStreamError.@call(this,e),@Promise.@reject(e)})\n";
// onPullDirectStream
const JSC::ConstructAbility s_readableStreamInternalsOnPullDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsOnPullDirectStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsOnPullDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnPullDirectStreamCodeLength = 1356;
static const JSC::Intrinsic s_readableStreamInternalsOnPullDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsOnPullDirectStreamCode = "(function (controller){\"use strict\";var stream=controller.@controlledReadableStream;if(!stream||@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return;if(controller._deferClose===-1)return;controller._deferClose=-1,controller._deferFlush=-1;var deferClose,deferFlush,asyncContext=stream.@asyncContext;if(asyncContext){var prev=@getInternalField(@asyncContext,0);@putInternalField(@asyncContext,0,asyncContext)}try{var result=controller.@underlyingSource.pull(controller);if(result&&@isPromise(result)){if(controller._handleError===@undefined)controller._handleError=@handleDirectStreamErrorReject.bind(controller);@Promise.prototype.catch.@call(result,controller._handleError)}}catch(e){return @handleDirectStreamErrorReject.@call(controller,e)}finally{if(deferClose=controller._deferClose,deferFlush=controller._deferFlush,controller._deferFlush=controller._deferClose=0,asyncContext)@putInternalField(@asyncContext,0,prev)}var promiseToReturn;if(controller._pendingRead===@undefined)controller._pendingRead=promiseToReturn=@newPromise();else promiseToReturn=@readableStreamAddReadRequest(stream);if(deferClose===1){var reason=controller._deferCloseReason;return controller._deferCloseReason=@undefined,@onCloseDirectStream.@call(controller,reason),promiseToReturn}if(deferFlush===1)@onFlushDirectStream.@call(controller);return promiseToReturn})\n";
// noopDoneFunction
const JSC::ConstructAbility s_readableStreamInternalsNoopDoneFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsNoopDoneFunctionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsNoopDoneFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsNoopDoneFunctionCodeLength = 81;
static const JSC::Intrinsic s_readableStreamInternalsNoopDoneFunctionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsNoopDoneFunctionCode = "(function (){\"use strict\";return @Promise.@resolve({value:@undefined,done:!0})})\n";
// onReadableStreamDirectControllerClosed
const JSC::ConstructAbility s_readableStreamInternalsOnReadableStreamDirectControllerClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsOnReadableStreamDirectControllerClosedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsOnReadableStreamDirectControllerClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnReadableStreamDirectControllerClosedCodeLength = 98;
static const JSC::Intrinsic s_readableStreamInternalsOnReadableStreamDirectControllerClosedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsOnReadableStreamDirectControllerClosedCode = "(function (reason){\"use strict\";@throwTypeError(\"ReadableStreamDirectController is now closed\")})\n";
// onCloseDirectStream
const JSC::ConstructAbility s_readableStreamInternalsOnCloseDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsOnCloseDirectStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsOnCloseDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnCloseDirectStreamCodeLength = 1696;
static const JSC::Intrinsic s_readableStreamInternalsOnCloseDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (reason){\"use strict\";var stream=this.@controlledReadableStream;if(!stream||@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=reason;return}if(@putByIdDirectPrivate(stream,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,reason)}catch(e){}var flushed;try{flushed=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(e){if(this._pendingRead){var read=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(read,e)}@readableStreamError(stream,e);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var reader=@getByIdDirectPrivate(stream,\"reader\");if(reader&&@isReadableStreamDefaultReader(reader)){var _pendingRead=this._pendingRead;if(_pendingRead&&@isPromise(_pendingRead)&&flushed\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(_pendingRead,{value:flushed,done:!1}),@readableStreamClose(stream);return}}if(flushed\?.byteLength){var requests=@getByIdDirectPrivate(reader,\"readRequests\");if(requests\?.isNotEmpty()){@readableStreamFulfillReadRequest(stream,flushed,!1),@readableStreamClose(stream);return}@putByIdDirectPrivate(stream,\"state\",@streamReadable),this.@pull=()=>{var thisResult=@createFulfilledPromise({value:flushed,done:!1});return flushed=@undefined,@readableStreamClose(stream),stream=@undefined,thisResult}}else if(this._pendingRead){var read=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(read,{value:@undefined,done:!0})}@readableStreamClose(stream)})\n";
// onFlushDirectStream
const JSC::ConstructAbility s_readableStreamInternalsOnFlushDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsOnFlushDirectStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsOnFlushDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnFlushDirectStreamCodeLength = 722;
static const JSC::Intrinsic s_readableStreamInternalsOnFlushDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var stream=this.@controlledReadableStream,reader=@getByIdDirectPrivate(stream,\"reader\");if(!reader||!@isReadableStreamDefaultReader(reader))return;var _pendingRead=this._pendingRead;if(this._pendingRead=@undefined,_pendingRead&&@isPromise(_pendingRead)){var flushed=this.@sink.flush();if(flushed\?.byteLength)this._pendingRead=@getByIdDirectPrivate(stream,\"readRequests\")\?.shift(),@fulfillPromise(_pendingRead,{value:flushed,done:!1});else this._pendingRead=_pendingRead}else if(@getByIdDirectPrivate(stream,\"readRequests\")\?.isNotEmpty()){var flushed=this.@sink.flush();if(flushed\?.byteLength)@readableStreamFulfillReadRequest(stream,flushed,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n";
// createTextStream
const JSC::ConstructAbility s_readableStreamInternalsCreateTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsCreateTextStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsCreateTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsCreateTextStreamCodeLength = 1479;
static const JSC::Intrinsic s_readableStreamInternalsCreateTextStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (highWaterMark){\"use strict\";var sink,array=[],hasString=!1,hasBuffer=!1,rope=\"\",estimatedLength=@toLength(0),capability=@newPromiseCapability(@Promise),calledDone=!1;return sink={start(){},write(chunk){if(typeof chunk===\"string\"){var chunkLength=@toLength(chunk.length);if(chunkLength>0)rope+=chunk,hasString=!0,estimatedLength+=chunkLength;return chunkLength}if(!chunk||!(@ArrayBuffer.@isView(chunk)||chunk instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const byteLength=@toLength(chunk.byteLength);if(byteLength>0)if(hasBuffer=!0,rope.length>0)@arrayPush(array,rope,chunk),rope=\"\";else @arrayPush(array,chunk);return estimatedLength+=byteLength,byteLength},flush(){return 0},end(){if(calledDone)return\"\";return sink.fulfill()},fulfill(){calledDone=!0;const result=sink.finishInternal();return @fulfillPromise(capability.promise,result),result},finishInternal(){if(!hasString&&!hasBuffer)return\"\";if(hasString&&!hasBuffer)return rope;if(hasBuffer&&!hasString)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(array));var arrayBufferSink=new @Bun.ArrayBufferSink;arrayBufferSink.start({highWaterMark:estimatedLength,asUint8Array:!0});for(let item of array)arrayBufferSink.write(item);if(array.length=0,rope.length>0)arrayBufferSink.write(rope),rope=\"\";return new globalThis.TextDecoder().decode(arrayBufferSink.end())},close(){try{if(!calledDone)calledDone=!0,sink.fulfill()}catch(e){}}},[sink,capability]})\n";
// initializeTextStream
const JSC::ConstructAbility s_readableStreamInternalsInitializeTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsInitializeTextStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsInitializeTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsInitializeTextStreamCodeLength = 685;
static const JSC::Intrinsic s_readableStreamInternalsInitializeTextStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsInitializeTextStreamCode = "(function (underlyingSource,highWaterMark){\"use strict\";var[sink,closingPromise]=@createTextStream(highWaterMark),controller={@underlyingSource:underlyingSource,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:sink,close:@onCloseDirectStream,write:sink.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",controller),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),closingPromise})\n";
// initializeArrayStream
const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsInitializeArrayStreamCodeLength = 990;
static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (underlyingSource,highWaterMark){\"use strict\";var array=[],closingPromise=@newPromiseCapability(@Promise),calledDone=!1;function fulfill(){return calledDone=!0,closingPromise.resolve.@call(@undefined,array),array}var sink={start(){},write(chunk){return @arrayPush(array,chunk),chunk.byteLength||chunk.length},flush(){return 0},end(){if(calledDone)return[];return fulfill()},close(){if(!calledDone)fulfill()}},controller={@underlyingSource:underlyingSource,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:sink,close:@onCloseDirectStream,write:sink.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",controller),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),closingPromise})\n";
// initializeArrayBufferStream
const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayBufferStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayBufferStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayBufferStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsInitializeArrayBufferStreamCodeLength = 793;
static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayBufferStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (underlyingSource,highWaterMark){\"use strict\";var opts=highWaterMark&&typeof highWaterMark===\"number\"\?{highWaterMark,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},sink=new @Bun.ArrayBufferSink;sink.start(opts);var controller={@underlyingSource:underlyingSource,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:sink,close:@onCloseDirectStream,write:sink.write.bind(sink),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",controller),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n";
// readableStreamError
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamErrorCodeLength = 895;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (stream,error){\"use strict\";@putByIdDirectPrivate(stream,\"state\",@streamErrored),@putByIdDirectPrivate(stream,\"storedError\",error);const reader=@getByIdDirectPrivate(stream,\"reader\");if(!reader)return;if(@isReadableStreamDefaultReader(reader)){const requests=@getByIdDirectPrivate(reader,\"readRequests\");@putByIdDirectPrivate(reader,\"readRequests\",@createFIFO());for(var request=requests.shift();request;request=requests.shift())@rejectPromise(request,error)}else{const requests=@getByIdDirectPrivate(reader,\"readIntoRequests\");@putByIdDirectPrivate(reader,\"readIntoRequests\",@createFIFO());for(var request=requests.shift();request;request=requests.shift())@rejectPromise(request,error)}@getByIdDirectPrivate(reader,\"closedPromiseCapability\").reject.@call(@undefined,error);const promise=@getByIdDirectPrivate(reader,\"closedPromiseCapability\").promise;@markPromiseAsHandled(promise)})\n";
// readableStreamDefaultControllerShouldCallPull
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeLength = 518;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(controller))return!1;if(@getByIdDirectPrivate(controller,\"started\")!==1)return!1;if((!@isReadableStreamLocked(stream)||!@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty())&&@readableStreamDefaultControllerGetDesiredSize(controller)<=0)return!1;return @readableStreamDefaultControllerGetDesiredSize(controller)>0})\n";
// readableStreamDefaultControllerCallPullIfNeeded
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeLength = 961;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(controller))return;if(@getByIdDirectPrivate(controller,\"started\")!==1)return;if((!@isReadableStreamLocked(stream)||!@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty())&&@readableStreamDefaultControllerGetDesiredSize(controller)<=0)return;if(@getByIdDirectPrivate(controller,\"pulling\")){@putByIdDirectPrivate(controller,\"pullAgain\",!0);return}@putByIdDirectPrivate(controller,\"pulling\",!0),@getByIdDirectPrivate(controller,\"pullAlgorithm\").@call(@undefined).@then(function(){if(@putByIdDirectPrivate(controller,\"pulling\",!1),@getByIdDirectPrivate(controller,\"pullAgain\"))@putByIdDirectPrivate(controller,\"pullAgain\",!1),@readableStreamDefaultControllerCallPullIfNeeded(controller)},function(error){@readableStreamDefaultControllerError(controller,error)})})\n";
// isReadableStreamLocked
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsIsReadableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsIsReadableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsIsReadableStreamLockedCodeLength = 81;
static const JSC::Intrinsic s_readableStreamInternalsIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsIsReadableStreamLockedCode = "(function (stream){\"use strict\";return!!@getByIdDirectPrivate(stream,\"reader\")})\n";
// readableStreamDefaultControllerGetDesiredSize
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeLength = 341;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===@streamErrored)return null;if(state===@streamClosed)return 0;return @getByIdDirectPrivate(controller,\"strategy\").highWaterMark-@getByIdDirectPrivate(controller,\"queue\").size})\n";
// readableStreamReaderGenericCancel
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamReaderGenericCancelCodeLength = 150;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode = "(function (reader,reason){\"use strict\";const stream=@getByIdDirectPrivate(reader,\"ownerReadableStream\");return @readableStreamCancel(stream,reason)})\n";
// readableStreamCancel
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamCancelCodeLength = 634;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (stream,reason){\"use strict\";@putByIdDirectPrivate(stream,\"disturbed\",!0);const state=@getByIdDirectPrivate(stream,\"state\");if(state===@streamClosed)return @Promise.@resolve();if(state===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));@readableStreamClose(stream);var controller=@getByIdDirectPrivate(stream,\"readableStreamController\"),cancel=controller.@cancel;if(cancel)return cancel(controller,reason).@then(function(){});var close=controller.close;if(close)return @Promise.@resolve(controller.close(reason));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n";
// readableStreamDefaultControllerCancel
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeLength = 183;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerCancelCode = "(function (controller,reason){\"use strict\";return @putByIdDirectPrivate(controller,\"queue\",@newQueue()),@getByIdDirectPrivate(controller,\"cancelAlgorithm\").@call(@undefined,reason)})\n";
// readableStreamDefaultControllerPull
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerPullCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerPullCodeLength = 632;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerPullCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerPullCode = "(function (controller){\"use strict\";var queue=@getByIdDirectPrivate(controller,\"queue\");if(queue.content.isNotEmpty()){const chunk=@dequeueValue(queue);if(@getByIdDirectPrivate(controller,\"closeRequested\")&&queue.content.isEmpty())@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else @readableStreamDefaultControllerCallPullIfNeeded(controller);return @createFulfilledPromise({value:chunk,done:!1})}const pendingPromise=@readableStreamAddReadRequest(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));return @readableStreamDefaultControllerCallPullIfNeeded(controller),pendingPromise})\n";
// readableStreamDefaultControllerClose
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeLength = 240;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerCloseCode = "(function (controller){\"use strict\";if(@putByIdDirectPrivate(controller,\"closeRequested\",!0),@getByIdDirectPrivate(controller,\"queue\")\?.content\?.isEmpty())@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"))})\n";
// readableStreamClose
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamCloseCodeLength = 643;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamCloseCode = "(function (stream){\"use strict\";if(@putByIdDirectPrivate(stream,\"state\",@streamClosed),!@getByIdDirectPrivate(stream,\"reader\"))return;if(@isReadableStreamDefaultReader(@getByIdDirectPrivate(stream,\"reader\"))){const requests=@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\");if(requests.isNotEmpty()){@putByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\",@createFIFO());for(var request=requests.shift();request;request=requests.shift())@fulfillPromise(request,{value:@undefined,done:!0})}}@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"closedPromiseCapability\").resolve.@call()})\n";
// readableStreamFulfillReadRequest
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamFulfillReadRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamFulfillReadRequestCodeLength = 196;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamFulfillReadRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamFulfillReadRequestCode = "(function (stream,chunk,done){\"use strict\";const readRequest=@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\").shift();@fulfillPromise(readRequest,{value:chunk,done})})\n";
// readableStreamDefaultControllerEnqueue
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeLength = 741;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@isReadableStreamLocked(stream)&&@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty()){@readableStreamFulfillReadRequest(stream,chunk,!1),@readableStreamDefaultControllerCallPullIfNeeded(controller);return}try{let chunkSize=1;if(@getByIdDirectPrivate(controller,\"strategy\").size!==@undefined)chunkSize=@getByIdDirectPrivate(controller,\"strategy\").size(chunk);@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),chunk,chunkSize)}catch(error){throw @readableStreamDefaultControllerError(controller,error),error}@readableStreamDefaultControllerCallPullIfNeeded(controller)})\n";
// readableStreamDefaultReaderRead
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultReaderReadCodeLength = 495;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultReaderReadCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultReaderReadCode = "(function (reader){\"use strict\";const stream=@getByIdDirectPrivate(reader,\"ownerReadableStream\"),state=@getByIdDirectPrivate(stream,\"state\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),state===@streamClosed)return @createFulfilledPromise({value:@undefined,done:!0});if(state===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @getByIdDirectPrivate(stream,\"readableStreamController\").@pull(@getByIdDirectPrivate(stream,\"readableStreamController\"))})\n";
// readableStreamAddReadRequest
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamAddReadRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamAddReadRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamAddReadRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamAddReadRequestCodeLength = 180;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamAddReadRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamAddReadRequestCode = "(function (stream){\"use strict\";const readRequest=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\").push(readRequest),readRequest})\n";
// isReadableStreamDisturbed
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamDisturbedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsIsReadableStreamDisturbedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsIsReadableStreamDisturbedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsIsReadableStreamDisturbedCodeLength = 83;
static const JSC::Intrinsic s_readableStreamInternalsIsReadableStreamDisturbedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsIsReadableStreamDisturbedCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"disturbed\")})\n";
// readableStreamReaderGenericRelease
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamReaderGenericReleaseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericReleaseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericReleaseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamReaderGenericReleaseCodeLength = 707;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericReleaseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamReaderGenericReleaseCode = "(function (reader){\"use strict\";if(@getByIdDirectPrivate(@getByIdDirectPrivate(reader,\"ownerReadableStream\"),\"state\")===@streamReadable)@getByIdDirectPrivate(reader,\"closedPromiseCapability\").reject.@call(@undefined,@makeTypeError(\"releasing lock of reader whose stream is still in readable state\"));else @putByIdDirectPrivate(reader,\"closedPromiseCapability\",{promise:@newHandledRejectedPromise(@makeTypeError(\"reader released lock\"))});const promise=@getByIdDirectPrivate(reader,\"closedPromiseCapability\").promise;@markPromiseAsHandled(promise),@putByIdDirectPrivate(@getByIdDirectPrivate(reader,\"ownerReadableStream\"),\"reader\",@undefined),@putByIdDirectPrivate(reader,\"ownerReadableStream\",@undefined)})\n";
// readableStreamDefaultControllerCanCloseOrEnqueue
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCodeLength = 207;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefaultControllerCanCloseOrEnqueueCode = "(function (controller){\"use strict\";return!@getByIdDirectPrivate(controller,\"closeRequested\")&&@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"state\")===@streamReadable})\n";
// lazyLoadStream
const JSC::ConstructAbility s_readableStreamInternalsLazyLoadStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsLazyLoadStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsLazyLoadStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsLazyLoadStreamCodeLength = 2994;
static const JSC::Intrinsic s_readableStreamInternalsLazyLoadStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (stream,autoAllocateChunkSize){\"use strict\";var nativeType=@getByIdDirectPrivate(stream,\"bunNativeType\"),nativePtr=@getByIdDirectPrivate(stream,\"bunNativePtr\"),Prototype=@lazyStreamPrototypeMap.@get(nativeType);if(Prototype===@undefined){let handleNativeReadableStreamPromiseResult2=function(val){var{c,v}=this;this.c=@undefined,this.v=@undefined,handleResult(val,c,v)},callClose2=function(controller){try{if(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"state\")===@streamReadable)controller.close()}catch(e){globalThis.reportError(e)}},createResult2=function(tag,controller,view,closer2){closer2[0]=!1;var result;try{result=pull(tag,view,closer2)}catch(err){return controller.error(err)}return handleResult(result,controller,view)};var handleNativeReadableStreamPromiseResult=handleNativeReadableStreamPromiseResult2,callClose=callClose2,createResult=createResult2,[pull,start,cancel,setClose,deinit,setRefOrUnref,drain]=@lazyLoad(nativeType),closer=[!1],handleResult;handleResult=function handleResult(result,controller,view){if(result&&@isPromise(result))return result.then(handleNativeReadableStreamPromiseResult2.bind({c:controller,v:view}),(err)=>controller.error(err));else if(typeof result===\"number\")if(view&&view.byteLength===result&&view.buffer===controller.byobRequest\?.view\?.buffer)controller.byobRequest.respondWithNewView(view);else controller.byobRequest.respond(result);else if(result.constructor===@Uint8Array)controller.enqueue(result);if(closer[0]||result===!1)@enqueueJob(callClose2,controller),closer[0]=!1};const registry=deinit\?new FinalizationRegistry(deinit):null;Prototype=class NativeReadableStreamSource{constructor(tag,autoAllocateChunkSize2,drainValue2){if(this.#tag=tag,this.#cancellationToken={},this.pull=this.#pull.bind(this),this.cancel=this.#cancel.bind(this),this.autoAllocateChunkSize=autoAllocateChunkSize2,drainValue2!==@undefined)this.start=(controller)=>{controller.enqueue(drainValue2)};if(registry)registry.register(this,tag,this.#cancellationToken)}#cancellationToken;pull;cancel;start;#tag;type=\"bytes\";autoAllocateChunkSize=0;static startSync=start;#pull(controller){var tag=this.#tag;if(!tag){controller.close();return}createResult2(tag,controller,controller.byobRequest.view,closer)}#cancel(reason){var tag=this.#tag;registry&®istry.unregister(this.#cancellationToken),setRefOrUnref&&setRefOrUnref(tag,!1),cancel(tag,reason)}static deinit=deinit;static drain=drain},@lazyStreamPrototypeMap.@set(nativeType,Prototype)}const chunkSize=Prototype.startSync(nativePtr,autoAllocateChunkSize);var drainValue;const{drain:drainFn,deinit:deinitFn}=Prototype;if(drainFn)drainValue=drainFn(nativePtr);if(chunkSize===0){if(deinit&&nativePtr&&@enqueueJob(deinit,nativePtr),(drainValue\?.byteLength\?\?0)>0)return{start(controller){controller.enqueue(drainValue),controller.close()},type:\"bytes\"};return{start(controller){controller.close()},type:\"bytes\"}}return new Prototype(nativePtr,chunkSize,drainValue)})\n";
// readableStreamIntoArray
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoArrayCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamIntoArrayCodeLength = 427;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (stream){\"use strict\";var reader=stream.getReader(),manyResult=reader.readMany();async function processManyResult(result){if(result.done)return[];var chunks=result.value||[];while(!0){var thisResult=await reader.read();if(thisResult.done)break;chunks=chunks.concat(thisResult.value)}return chunks}if(manyResult&&@isPromise(manyResult))return manyResult.@then(processManyResult);return processManyResult(manyResult)})\n";
// readableStreamIntoText
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoTextCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoTextCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamIntoTextCodeLength = 272;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoTextCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamIntoTextCode = "(function (stream){\"use strict\";const[textStream,closer]=@createTextStream(@getByIdDirectPrivate(stream,\"highWaterMark\")),prom=@readStreamIntoSink(stream,textStream,!1);if(prom&&@isPromise(prom))return @Promise.@resolve(prom).@then(closer.promise);return closer.promise})\n";
// readableStreamToArrayBufferDirect
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeLength = 1079;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (stream,underlyingSource){\"use strict\";var sink=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(stream,\"underlyingSource\",@undefined);var highWaterMark=@getByIdDirectPrivate(stream,\"highWaterMark\");sink.start(highWaterMark\?{highWaterMark}:{});var capability=@newPromiseCapability(@Promise),ended=!1,pull=underlyingSource.pull,close=underlyingSource.close,controller={start(){},close(reason){if(!ended){if(ended=!0,close)close();@fulfillPromise(capability.promise,sink.end())}},end(){if(!ended){if(ended=!0,close)close();@fulfillPromise(capability.promise,sink.end())}},flush(){return 0},write:sink.write.bind(sink)},didError=!1;try{const firstPull=pull(controller);if(firstPull&&@isObject(firstPull)&&@isPromise(firstPull))return async function(controller2,promise2,pull2){while(!ended)await pull2(controller2);return await promise2}(controller,promise,pull);return capability.promise}catch(e){return didError=!0,@readableStreamError(stream,e),@Promise.@reject(e)}finally{if(!didError&&stream)@readableStreamClose(stream);controller=close=sink=pull=stream=@undefined}})\n";
// readableStreamToTextDirect
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToTextDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToTextDirectCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToTextDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToTextDirectCodeLength = 388;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToTextDirectCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (stream,underlyingSource){\"use strict\";const capability=@initializeTextStream.@call(stream,underlyingSource,@undefined);var reader=stream.getReader();while(@getByIdDirectPrivate(stream,\"state\")===@streamReadable){var thisResult=await reader.read();if(thisResult.done)break}try{reader.releaseLock()}catch(e){}return reader=@undefined,stream=@undefined,capability.promise})\n";
// readableStreamToArrayDirect
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayDirectCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToArrayDirectCodeLength = 484;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayDirectCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (stream,underlyingSource){\"use strict\";const capability=@initializeArrayStream.@call(stream,underlyingSource,@undefined);underlyingSource=@undefined;var reader=stream.getReader();try{while(@getByIdDirectPrivate(stream,\"state\")===@streamReadable){var thisResult=await reader.read();if(thisResult.done)break}try{reader.releaseLock()}catch(e){}return reader=@undefined,@Promise.@resolve(capability.promise)}catch(e){throw e}finally{stream=@undefined,reader=@undefined}})\n";
// readableStreamDefineLazyIterators
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeLength = 921;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamDefineLazyIteratorsCode = "(function (prototype){\"use strict\";var asyncIterator=globalThis.Symbol.asyncIterator,ReadableStreamAsyncIterator=async function*ReadableStreamAsyncIterator(stream,preventCancel){var reader=stream.getReader(),deferredError;try{while(!0){var done,value;const firstResult=reader.readMany();if(@isPromise(firstResult))({done,value}=await firstResult);else({done,value}=firstResult);if(done)return;yield*value}}catch(e){deferredError=e}finally{if(reader.releaseLock(),!preventCancel)stream.cancel(deferredError);if(deferredError)throw deferredError}},createAsyncIterator=function asyncIterator(){return ReadableStreamAsyncIterator(this,!1)},createValues=function values({preventCancel=!1}={preventCancel:!1}){return ReadableStreamAsyncIterator(this,preventCancel)};return @Object.@defineProperty(prototype,asyncIterator,{value:createAsyncIterator}),@Object.@defineProperty(prototype,\"values\",{value:createValues}),prototype})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* WritableStreamInternals.ts */
// isWritableStream
const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsIsWritableStreamCodeLength = 109;
static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsIsWritableStreamCode = "(function (stream){\"use strict\";return @isObject(stream)&&!!@getByIdDirectPrivate(stream,\"underlyingSink\")})\n";
// isWritableStreamDefaultWriter
const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength = 108;
static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsIsWritableStreamDefaultWriterCode = "(function (writer){\"use strict\";return @isObject(writer)&&!!@getByIdDirectPrivate(writer,\"closedPromise\")})\n";
// acquireWritableStreamDefaultWriter
const JSC::ConstructAbility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength = 82;
static const JSC::Intrinsic s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsAcquireWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";return new @WritableStreamDefaultWriter(stream)})\n";
// createWritableStream
const JSC::ConstructAbility s_writableStreamInternalsCreateWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsCreateWritableStreamCodeLength = 453;
static const JSC::Intrinsic s_writableStreamInternalsCreateWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";const internalStream={};@initializeWritableStreamSlots(internalStream,{});const controller=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(internalStream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm),@createWritableStreamFromInternal(internalStream)})\n";
// createInternalWritableStreamFromUnderlyingSink
const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 1388;
static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (underlyingSink,strategy){\"use strict\";const stream={};if(underlyingSink===@undefined)underlyingSink={};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSink))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in underlyingSink)@throwRangeError(\"Invalid type is specified\");const sizeAlgorithm=@extractSizeAlgorithm(strategy),highWaterMark=@extractHighWaterMark(strategy,1),underlyingSinkDict={};if(\"start\"in underlyingSink){if(underlyingSinkDict.start=underlyingSink.start,typeof underlyingSinkDict.start!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in underlyingSink){if(underlyingSinkDict.write=underlyingSink.write,typeof underlyingSinkDict.write!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in underlyingSink){if(underlyingSinkDict.close=underlyingSink.close,typeof underlyingSinkDict.close!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in underlyingSink){if(underlyingSinkDict.abort=underlyingSink.abort,typeof underlyingSinkDict.abort!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(stream,underlyingSink),@setUpWritableStreamDefaultControllerFromUnderlyingSink(stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm),stream})\n";
// initializeWritableStreamSlots
const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsInitializeWritableStreamSlotsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength = 674;
static const JSC::Intrinsic s_writableStreamInternalsInitializeWritableStreamSlotsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsInitializeWritableStreamSlotsCode = "(function (stream,underlyingSink){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"writable\"),@putByIdDirectPrivate(stream,\"storedError\",@undefined),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(stream,\"controller\",@undefined),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO()),@putByIdDirectPrivate(stream,\"backpressure\",!1),@putByIdDirectPrivate(stream,\"underlyingSink\",underlyingSink)})\n";
// writableStreamCloseForBindings
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength = 390;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseForBindingsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamCloseForBindingsCode = "(function (stream){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on non locked WritableStream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on a being close WritableStream\"));return @writableStreamClose(stream)})\n";
// writableStreamAbortForBindings
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength = 236;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortForBindingsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamAbortForBindingsCode = "(function (stream,reason){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.abort method can only be used on non locked WritableStream\"));return @writableStreamAbort(stream,reason)})\n";
// isWritableStreamLocked
const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsIsWritableStreamLockedCodeLength = 93;
static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsIsWritableStreamLockedCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"writer\")!==@undefined})\n";
// setUpWritableStreamDefaultWriter
const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength = 1249;
static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (writer,stream){\"use strict\";if(@isWritableStreamLocked(stream))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(writer,\"stream\",stream),@putByIdDirectPrivate(stream,\"writer\",writer);const readyPromiseCapability=@newPromiseCapability(@Promise),closedPromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability),@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(stream)||!@getByIdDirectPrivate(stream,\"backpressure\"))readyPromiseCapability.resolve.@call()}else if(state===\"erroring\")readyPromiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(stream,\"storedError\")),@markPromiseAsHandled(readyPromiseCapability.promise);else if(state===\"closed\")readyPromiseCapability.resolve.@call(),closedPromiseCapability.resolve.@call();else{const storedError=@getByIdDirectPrivate(stream,\"storedError\");readyPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(readyPromiseCapability.promise),closedPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromiseCapability.promise)}})\n";
// writableStreamAbort
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamAbortCodeLength = 679;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (stream,reason){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@resolve();const pendingAbortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(pendingAbortRequest!==@undefined)return pendingAbortRequest.promise.promise;let wasAlreadyErroring=!1;if(state===\"erroring\")wasAlreadyErroring=!0,reason=@undefined;const abortPromiseCapability=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",{promise:abortPromiseCapability,reason,wasAlreadyErroring}),!wasAlreadyErroring)@writableStreamStartErroring(stream,reason);return abortPromiseCapability.promise})\n";
// writableStreamClose
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamCloseCodeLength = 674;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamCloseCode = "(function (stream){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@reject(@makeTypeError(\"Cannot close a writable stream that is closed or errored\"));const closePromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(stream,\"closeRequest\",closePromiseCapability);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&@getByIdDirectPrivate(stream,\"backpressure\")&&state===\"writable\")@getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();return @writableStreamDefaultControllerClose(@getByIdDirectPrivate(stream,\"controller\")),closePromiseCapability.promise})\n";
// writableStreamAddWriteRequest
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength = 208;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAddWriteRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode = "(function (stream){\"use strict\";const writePromiseCapability=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(stream,\"writeRequests\").push(writePromiseCapability),writePromiseCapability.promise})\n";
// writableStreamCloseQueuedOrInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength = 166;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"closeRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
// writableStreamDealWithRejection
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength = 183;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDealWithRejectionCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode = "(function (stream,error){\"use strict\";if(@getByIdDirectPrivate(stream,\"state\")===\"writable\"){@writableStreamStartErroring(stream,error);return}@writableStreamFinishErroring(stream)})\n";
// writableStreamFinishErroring
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroringCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength = 1193;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishErroringCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (stream){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"errored\");const controller=@getByIdDirectPrivate(stream,\"controller\");@getByIdDirectPrivate(controller,\"errorSteps\").@call();const storedError=@getByIdDirectPrivate(stream,\"storedError\"),requests=@getByIdDirectPrivate(stream,\"writeRequests\");for(var request=requests.shift();request;request=requests.shift())request.reject.@call(@undefined,storedError);@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO());const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),abortRequest.wasAlreadyErroring){abortRequest.promise.reject.@call(@undefined,storedError),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}@getByIdDirectPrivate(controller,\"abortSteps\").@call(@undefined,abortRequest.reason).@then(()=>{abortRequest.promise.resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)},(reason)=>{abortRequest.promise.reject.@call(@undefined,reason),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)})})\n";
// writableStreamFinishInFlightClose
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 661;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (stream){\"use strict\";if(@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@putByIdDirectPrivate(stream,\"storedError\",@undefined);const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.resolve.@call(),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(stream,\"state\",\"closed\");const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@getByIdDirectPrivate(writer,\"closedPromise\").resolve.@call()})\n";
// writableStreamFinishInFlightCloseWithError
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength = 494;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\"),abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined);@writableStreamDealWithRejection(stream,error)})\n";
// writableStreamFinishInFlightWrite
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength = 167;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteCode = "(function (stream){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined)})\n";
// writableStreamFinishInFlightWriteWithError
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength = 285;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\");@writableStreamDealWithRejection(stream,error)})\n";
// writableStreamHasOperationMarkedInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength = 174;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
// writableStreamMarkCloseRequestInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength = 220;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode = "(function (stream){\"use strict\";const closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",closeRequest),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined)})\n";
// writableStreamMarkFirstWriteRequestInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength = 173;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode = "(function (stream){\"use strict\";const writeRequest=@getByIdDirectPrivate(stream,\"writeRequests\").shift();@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",writeRequest)})\n";
// writableStreamRejectCloseAndClosedPromiseIfNeeded
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength = 528;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode = "(function (stream){\"use strict\";const storedError=@getByIdDirectPrivate(stream,\"storedError\"),closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");if(closeRequest!==@undefined)closeRequest.reject.@call(@undefined,storedError),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined){const closedPromise=@getByIdDirectPrivate(writer,\"closedPromise\");closedPromise.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromise.promise)}})\n";
// writableStreamStartErroring
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamStartErroringCodeLength = 487;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamStartErroringCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamStartErroringCode = "(function (stream,reason){\"use strict\";const controller=@getByIdDirectPrivate(stream,\"controller\");@putByIdDirectPrivate(stream,\"state\",\"erroring\"),@putByIdDirectPrivate(stream,\"storedError\",reason);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,reason);if(!@writableStreamHasOperationMarkedInFlight(stream)&&@getByIdDirectPrivate(controller,\"started\")===1)@writableStreamFinishErroring(stream)})\n";
// writableStreamUpdateBackpressure
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength = 400;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamUpdateBackpressureCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamUpdateBackpressureCode = "(function (stream,backpressure){\"use strict\";const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&backpressure!==@getByIdDirectPrivate(stream,\"backpressure\"))if(backpressure)@putByIdDirectPrivate(writer,\"readyPromise\",@newPromiseCapability(@Promise));else @getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();@putByIdDirectPrivate(stream,\"backpressure\",backpressure)})\n";
// writableStreamDefaultWriterAbort
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength = 136;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode = "(function (writer,reason){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamAbort(stream,reason)})\n";
// writableStreamDefaultWriterClose
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength = 122;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamClose(stream)})\n";
// writableStreamDefaultWriterCloseWithErrorPropagation
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength = 362;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@resolve();if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @writableStreamDefaultWriterClose(writer)})\n";
// writableStreamDefaultWriterEnsureClosedPromiseRejected
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength = 529;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode = "(function (writer,error){\"use strict\";let closedPromiseCapability=@getByIdDirectPrivate(writer,\"closedPromise\"),closedPromise=closedPromiseCapability.promise;if((@getPromiseInternalField(closedPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)closedPromiseCapability=@newPromiseCapability(@Promise),closedPromise=closedPromiseCapability.promise,@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);closedPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(closedPromise)})\n";
// writableStreamDefaultWriterEnsureReadyPromiseRejected
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength = 517;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (writer,error){\"use strict\";let readyPromiseCapability=@getByIdDirectPrivate(writer,\"readyPromise\"),readyPromise=readyPromiseCapability.promise;if((@getPromiseInternalField(readyPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)readyPromiseCapability=@newPromiseCapability(@Promise),readyPromise=readyPromiseCapability.promise,@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability);readyPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(readyPromise)})\n";
// writableStreamDefaultWriterGetDesiredSize
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength = 310;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\"||state===\"erroring\")return null;if(state===\"closed\")return 0;return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(stream,\"controller\"))})\n";
// writableStreamDefaultWriterRelease
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength = 408;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),releasedError=@makeTypeError(\"writableStreamDefaultWriterRelease\");@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,releasedError),@writableStreamDefaultWriterEnsureClosedPromiseRejected(writer,releasedError),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(writer,\"stream\",@undefined)})\n";
// writableStreamDefaultWriterWrite
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 982;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (writer,chunk){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),controller=@getByIdDirectPrivate(stream,\"controller\"),chunkSize=@writableStreamDefaultControllerGetChunkSize(controller,chunk);if(stream!==@getByIdDirectPrivate(writer,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(state===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));const promise=@writableStreamAddWriteRequest(stream);return @writableStreamDefaultControllerWrite(controller,chunk,chunkSize),promise})\n";
// setUpWritableStreamDefaultController
const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength = 921;
static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";@putByIdDirectPrivate(controller,\"stream\",stream),@putByIdDirectPrivate(stream,\"controller\",controller),@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@putByIdDirectPrivate(controller,\"started\",-1),@putByIdDirectPrivate(controller,\"startAlgorithm\",startAlgorithm),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",sizeAlgorithm),@putByIdDirectPrivate(controller,\"strategyHWM\",highWaterMark),@putByIdDirectPrivate(controller,\"writeAlgorithm\",writeAlgorithm),@putByIdDirectPrivate(controller,\"closeAlgorithm\",closeAlgorithm),@putByIdDirectPrivate(controller,\"abortAlgorithm\",abortAlgorithm);const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure),@writableStreamDefaultControllerStart(controller)})\n";
// writableStreamDefaultControllerStart
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength = 710;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"started\")!==-1)return;@putByIdDirectPrivate(controller,\"started\",0);const startAlgorithm=@getByIdDirectPrivate(controller,\"startAlgorithm\");@putByIdDirectPrivate(controller,\"startAlgorithm\",@undefined);const stream=@getByIdDirectPrivate(controller,\"stream\");return @Promise.@resolve(startAlgorithm.@call()).@then(()=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(error)=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDealWithRejection(stream,error)})})\n";
// setUpWritableStreamDefaultControllerFromUnderlyingSink
const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 1127;
static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm){\"use strict\";const controller=new @WritableStreamDefaultController;let startAlgorithm=()=>{},writeAlgorithm=()=>{return @Promise.@resolve()},closeAlgorithm=()=>{return @Promise.@resolve()},abortAlgorithm=()=>{return @Promise.@resolve()};if(\"start\"in underlyingSinkDict){const startMethod=underlyingSinkDict.start;startAlgorithm=()=>@promiseInvokeOrNoopMethodNoCatch(underlyingSink,startMethod,[controller])}if(\"write\"in underlyingSinkDict){const writeMethod=underlyingSinkDict.write;writeAlgorithm=(chunk)=>@promiseInvokeOrNoopMethod(underlyingSink,writeMethod,[chunk,controller])}if(\"close\"in underlyingSinkDict){const closeMethod=underlyingSinkDict.close;closeAlgorithm=()=>@promiseInvokeOrNoopMethod(underlyingSink,closeMethod,[])}if(\"abort\"in underlyingSinkDict){const abortMethod=underlyingSinkDict.abort;abortAlgorithm=(reason)=>@promiseInvokeOrNoopMethod(underlyingSink,abortMethod,[reason])}@setUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm)})\n";
// writableStreamDefaultControllerAdvanceQueueIfNeeded
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength = 609;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(controller,\"started\")!==1)return;if(@getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined)return;if(@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@writableStreamFinishErroring(stream);return}const queue=@getByIdDirectPrivate(controller,\"queue\");if(queue.content\?.isEmpty()\?\?!1)return;const value=@peekQueueValue(queue);if(value===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(controller);else @writableStreamDefaultControllerProcessWrite(controller,value)})\n";
// isCloseSentinel
const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsIsCloseSentinelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsIsCloseSentinelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsIsCloseSentinelCodeLength = 29;
static const JSC::Intrinsic s_writableStreamInternalsIsCloseSentinelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsIsCloseSentinelCode = "(function (){\"use strict\";})\n";
// writableStreamDefaultControllerClearAlgorithms
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength = 293;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"writeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"closeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"abortAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",@undefined)})\n";
// writableStreamDefaultControllerClose
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength = 187;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerCloseCode = "(function (controller){\"use strict\";@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),@isCloseSentinel,0),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)})\n";
// writableStreamDefaultControllerError
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength = 203;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamDefaultControllerClearAlgorithms(controller),@writableStreamStartErroring(stream,error)})\n";
// writableStreamDefaultControllerErrorIfNeeded
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength = 210;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerError(controller,error)})\n";
// writableStreamDefaultControllerGetBackpressure
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength = 107;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode = "(function (controller){\"use strict\";return @writableStreamDefaultControllerGetDesiredSize(controller)<=0})\n";
// writableStreamDefaultControllerGetChunkSize
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength = 216;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode = "(function (controller,chunk){\"use strict\";try{return @getByIdDirectPrivate(controller,\"strategySizeAlgorithm\").@call(@undefined,chunk)}catch(e){return @writableStreamDefaultControllerErrorIfNeeded(controller,e),1}})\n";
// writableStreamDefaultControllerGetDesiredSize
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength = 140;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode = "(function (controller){\"use strict\";return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
// writableStreamDefaultControllerProcessClose
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength = 485;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkCloseRequestInFlight(stream),@dequeueValue(@getByIdDirectPrivate(controller,\"queue\"));const sinkClosePromise=@getByIdDirectPrivate(controller,\"closeAlgorithm\").@call();@writableStreamDefaultControllerClearAlgorithms(controller),sinkClosePromise.@then(()=>{@writableStreamFinishInFlightClose(stream)},(reason)=>{@writableStreamFinishInFlightCloseWithError(stream,reason)})})\n";
// writableStreamDefaultControllerProcessWrite
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength = 845;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(stream),@getByIdDirectPrivate(controller,\"writeAlgorithm\").@call(@undefined,chunk).@then(()=>{@writableStreamFinishInFlightWrite(stream);const state=@getByIdDirectPrivate(stream,\"state\");if(@dequeueValue(@getByIdDirectPrivate(controller,\"queue\")),!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(reason)=>{if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(controller);@writableStreamFinishInFlightWriteWithError(stream,reason)})})\n";
// writableStreamDefaultControllerWrite
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 578;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (controller,chunk,chunkSize){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),chunk,chunkSize);const stream=@getByIdDirectPrivate(controller,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)}catch(e){@writableStreamDefaultControllerErrorIfNeeded(controller,e)}})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamBYOBRequest.ts */
// initializeReadableStreamBYOBRequest
const JSC::ConstructAbility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength = 267;
static const JSC::Intrinsic s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";if(arguments.length!==3&&arguments[2]!==@isReadableStream)@throwTypeError(\"ReadableStreamBYOBRequest constructor should not be called directly\");return @privateInitializeReadableStreamBYOBRequest.@call(this,controller,view)})\n";
// respond
const JSC::ConstructAbility s_readableStreamBYOBRequestRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBRequestRespondCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBRequestRespondCodeLength = 452;
static const JSC::Intrinsic s_readableStreamBYOBRequestRespondCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBRequestRespondCode = "(function (bytesWritten){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");return @readableByteStreamControllerRespond(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),bytesWritten)})\n";
// respondWithNewView
const JSC::ConstructAbility s_readableStreamBYOBRequestRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBRequestRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBRequestRespondWithNewViewCodeLength = 607;
static const JSC::Intrinsic s_readableStreamBYOBRequestRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBRequestRespondWithNewViewCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");if(!@isObject(view))@throwTypeError(\"Provided view is not an object\");if(!@ArrayBuffer.@isView(view))@throwTypeError(\"Provided view is not an ArrayBufferView\");return @readableByteStreamControllerRespondWithNewView(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),view)})\n";
// view
const JSC::ConstructAbility s_readableStreamBYOBRequestViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamBYOBRequestViewCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamBYOBRequestViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamBYOBRequestViewCodeLength = 172;
static const JSC::Intrinsic s_readableStreamBYOBRequestViewCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamBYOBRequestViewCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeGetterTypeError(\"ReadableStreamBYOBRequest\",\"view\");return @getByIdDirectPrivate(this,\"view\")})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ProcessObjectInternals.ts */
// binding
const JSC::ConstructAbility s_processObjectInternalsBindingCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsBindingCodeLength = 511;
static const JSC::Intrinsic s_processObjectInternalsBindingCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_processObjectInternalsBindingCode = "(function (bindingName){\"use strict\";if(bindingName===\"constants\")return @processBindingConstants;const issue={fs:3546,buffer:2020,natives:2254,uv:2891}[bindingName];if(issue)throw new Error(`process.binding(\"${bindingName}\") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`);@throwTypeError(`process.binding(\"${bindingName}\") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`)})\n";
// getStdioWriteStream
const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 621;
static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (fd){\"use strict\";const stream=(@getInternalField(@internalModuleRegistry,45)||@createInternalModuleById(45)).WriteStream(fd);if(process.on(\"SIGWINCH\",()=>{stream._refreshSize()}),fd===1)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};else if(fd===2)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};return stream._type=\"tty\",stream._isStdio=!0,stream.fd=fd,stream})\n";
// getStdinStream
const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsGetStdinStreamCodeLength = 1386;
static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_processObjectInternalsGetStdinStreamCode = "(function (fd){\"use strict\";var reader,readerRef;function ref(){reader\?\?=@Bun.stdin.stream().getReader(),readerRef\?\?=setInterval(()=>{},1<<30)}function unref(){if(readerRef)clearInterval(readerRef),readerRef=@undefined;if(reader)reader.cancel(),reader=@undefined}const stream=new((@getInternalField(@internalModuleRegistry,45))||(@createInternalModuleById(45))).ReadStream(fd),originalOn=stream.on;stream.on=function(event,listener){if(event===\"readable\")ref();return originalOn.call(this,event,listener)},stream.fd=fd;const originalPause=stream.pause;stream.pause=function(){return unref(),originalPause.call(this)};const originalResume=stream.resume;stream.resume=function(){return ref(),originalResume.call(this)};async function internalRead(stream2){try{var done,value;const read=reader\?.readMany();if(@isPromise(read))({done,value}=await read);else({done,value}=read);if(!done){stream2.push(value[0]);const length=value.length;for(let i=1;i<length;i++)stream2.push(value[i])}else stream2.emit(\"end\"),stream2.pause()}catch(err){stream2.destroy(err)}}return stream._read=function(size){internalRead(this)},stream.on(\"resume\",()=>{ref(),stream._undestroy()}),stream._readableState.reading=!1,stream.on(\"pause\",()=>{process.nextTick(()=>{if(!stream.readableFlowing)stream._readableState.reading=!1})}),stream.on(\"close\",()=>{process.nextTick(()=>{stream.destroy(),unref()})}),stream})\n";
// initializeNextTickQueue
const JSC::ConstructAbility s_processObjectInternalsInitializeNextTickQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_processObjectInternalsInitializeNextTickQueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_processObjectInternalsInitializeNextTickQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsInitializeNextTickQueueCodeLength = 2336;
static const JSC::Intrinsic s_processObjectInternalsInitializeNextTickQueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_processObjectInternalsInitializeNextTickQueueCode = "(function (process,nextTickQueue,drainMicrotasksFn,reportUncaughtExceptionFn){\"use strict\";var queue,process,nextTickQueue=nextTickQueue,drainMicrotasks=drainMicrotasksFn,reportUncaughtException=reportUncaughtExceptionFn;function validateFunction(cb){if(typeof cb!==\"function\"){const err=@makeTypeError(`The \"callback\" argument must be of type \"function\". Received type ${typeof cb}`);throw err.code=\"ERR_INVALID_ARG_TYPE\",err}}var setup=()=>{queue=function createQueue(){class FixedCircularBuffer{constructor(){this.bottom=0,this.top=0,this.list=@newArrayWithSize(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(data){this.list[this.top]=data,this.top=this.top+1&2047}shift(){var{list,bottom}=this;const nextItem=list[bottom];if(nextItem===@undefined)return null;return list[bottom]=@undefined,this.bottom=bottom+1&2047,nextItem}}class FixedQueue{constructor(){this.head=this.tail=new FixedCircularBuffer}isEmpty(){return this.head.isEmpty()}push(data){if(this.head.isFull())this.head=this.head.next=new FixedCircularBuffer;this.head.push(data)}shift(){const tail=this.tail,next=tail.shift();if(tail.isEmpty()&&tail.next!==null)this.tail=tail.next,tail.next=null;return next}}return new FixedQueue}();function processTicksAndRejections(){var tock;do{while((tock=queue.shift())!==null){var{callback,args,frame}=tock,restore=@getInternalField(@asyncContext,0);@putInternalField(@asyncContext,0,frame);try{if(args===@undefined)callback();else switch(args.length){case 1:callback(args[0]);break;case 2:callback(args[0],args[1]);break;case 3:callback(args[0],args[1],args[2]);break;case 4:callback(args[0],args[1],args[2],args[3]);break;default:callback(...args);break}}catch(e){reportUncaughtException(e)}finally{@putInternalField(@asyncContext,0,restore)}}drainMicrotasks()}while(!queue.isEmpty())}@putInternalField(nextTickQueue,0,0),@putInternalField(nextTickQueue,1,queue),@putInternalField(nextTickQueue,2,processTicksAndRejections),setup=@undefined};function nextTick(cb,args){if(validateFunction(cb),setup)setup(),process=globalThis.process;if(process._exiting)return;queue.push({callback:cb,args:@argumentCount()>1\?@Array.prototype.slice.@call(arguments,1):@undefined,frame:@getInternalField(@asyncContext,0)}),@putInternalField(nextTickQueue,0,1)}return nextTick})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStream.ts */
// initializeReadableStream
const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInitializeReadableStreamCodeLength = 2702;
static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInitializeReadableStreamCode = "(function (underlyingSource,strategy){\"use strict\";if(underlyingSource===@undefined)underlyingSource={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSource))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(strategy!==@undefined&&!@isObject(strategy))@throwTypeError(\"ReadableStream constructor takes an object as second argument, if any\");@putByIdDirectPrivate(this,\"state\",@streamReadable),@putByIdDirectPrivate(this,\"reader\",@undefined),@putByIdDirectPrivate(this,\"storedError\",@undefined),@putByIdDirectPrivate(this,\"disturbed\",!1),@putByIdDirectPrivate(this,\"readableStreamController\",null),@putByIdDirectPrivate(this,\"bunNativeType\",@getByIdDirectPrivate(underlyingSource,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(underlyingSource,\"bunNativePtr\")\?\?0),@putByIdDirectPrivate(this,\"asyncContext\",@getInternalField(@asyncContext,0));const isDirect=underlyingSource.type===\"direct\",isUnderlyingSourceLazy=!!underlyingSource.@lazy,isLazy=isDirect||isUnderlyingSourceLazy;if(@getByIdDirectPrivate(underlyingSource,\"pull\")!==@undefined&&!isLazy){const size=@getByIdDirectPrivate(strategy,\"size\"),highWaterMark=@getByIdDirectPrivate(strategy,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",highWaterMark),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,underlyingSource,size,highWaterMark!==@undefined\?highWaterMark:1,@getByIdDirectPrivate(underlyingSource,\"start\"),@getByIdDirectPrivate(underlyingSource,\"pull\"),@getByIdDirectPrivate(underlyingSource,\"cancel\")),this}if(isDirect)@putByIdDirectPrivate(this,\"underlyingSource\",underlyingSource),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,underlyingSource,strategy));else if(isLazy){const autoAllocateChunkSize=underlyingSource.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",autoAllocateChunkSize||@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const instance=@lazyLoadStream(this,autoAllocateChunkSize);if(instance)@createReadableStreamController(this,instance,strategy)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,underlyingSource,strategy);return this})\n";
// readableStreamToArray
const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToArrayCodeLength = 238;
static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToArrayCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayDirect(stream,underlyingSource);return @readableStreamIntoArray(stream)})\n";
// readableStreamToText
const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToTextCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToTextCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToTextCodeLength = 236;
static const JSC::Intrinsic s_readableStreamReadableStreamToTextCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToTextCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToTextDirect(stream,underlyingSource);return @readableStreamIntoText(stream)})\n";
// readableStreamToArrayBuffer
const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToArrayBufferCodeLength = 355;
static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayBufferDirect(stream,underlyingSource);var result=@Bun.readableStreamToArray(stream);if(@isPromise(result))return result.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(result)})\n";
// readableStreamToFormData
const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToFormDataCodeLength = 142;
static const JSC::Intrinsic s_readableStreamReadableStreamToFormDataCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToFormDataCode = "(function (stream,contentType){\"use strict\";return @Bun.readableStreamToBlob(stream).then((blob)=>{return FormData.from(blob,contentType)})})\n";
// readableStreamToJSON
const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToJSONCodeLength = 104;
static const JSC::Intrinsic s_readableStreamReadableStreamToJSONCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToJSONCode = "(function (stream){\"use strict\";return @Bun.readableStreamToText(stream).@then(globalThis.JSON.parse)})\n";
// readableStreamToBlob
const JSC::ConstructAbility s_readableStreamReadableStreamToBlobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamReadableStreamToBlobCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamReadableStreamToBlobCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToBlobCodeLength = 126;
static const JSC::Intrinsic s_readableStreamReadableStreamToBlobCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamReadableStreamToBlobCode = "(function (stream){\"use strict\";return @Promise.resolve(@Bun.readableStreamToArray(stream)).@then((array)=>new Blob(array))})\n";
// consumeReadableStream
const JSC::ConstructAbility s_readableStreamConsumeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamConsumeReadableStreamCodeLength = 2131;
static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamConsumeReadableStreamCode = "(function (nativePtr,nativeType,inputStream){\"use strict\";const symbol=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var cached=globalThis[symbol];if(!cached)cached=globalThis[symbol]=[];var Prototype=cached[nativeType];if(Prototype===@undefined){var[doRead,doError,doReadMany,doClose,onClose,deinit]=globalThis[globalThis.Symbol.for('Bun.lazy')](nativeType);Prototype=class NativeReadableStreamSink{handleError;handleClosed;processResult;constructor(reader,ptr){this.#ptr=ptr,this.#reader=reader,this.#didClose=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),reader.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doClose(ptr),deinit(ptr)}_handleError(error){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doError(ptr,error),deinit(ptr)}#ptr;#didClose=!1;#reader;_handleReadMany({value,done,size}){if(done){this.handleClosed();return}if(this.#didClose)return;doReadMany(this.#ptr,value,done,size)}read(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.read())}_processResult(result){if(result&&@isPromise(result)){if(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateFulfilled){const fulfilledValue=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(fulfilledValue)result=fulfilledValue}}if(result&&@isPromise(result))return result.then(this.processResult,this.handleError),null;if(result.done)return this.handleClosed(),0;else if(result.value)return result.value;else return-1}readMany(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.readMany())}};const minlength=nativeType+1;if(cached.length<minlength)cached.length=minlength;@putByValDirect(cached,nativeType,Prototype)}if(@isReadableStreamLocked(inputStream))@throwTypeError(\"Cannot start reading from a locked stream\");return new Prototype(inputStream.getReader(),nativePtr)})\n";
// createEmptyReadableStream
const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamCreateEmptyReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamCreateEmptyReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamCreateEmptyReadableStreamCodeLength = 114;
static const JSC::Intrinsic s_readableStreamCreateEmptyReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamCreateEmptyReadableStreamCode = "(function (){\"use strict\";var stream=new @ReadableStream({pull(){}});return @readableStreamClose(stream),stream})\n";
// createNativeReadableStream
const JSC::ConstructAbility s_readableStreamCreateNativeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamCreateNativeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamCreateNativeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamCreateNativeReadableStreamCodeLength = 181;
static const JSC::Intrinsic s_readableStreamCreateNativeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamCreateNativeReadableStreamCode = "(function (nativePtr,nativeType,autoAllocateChunkSize){\"use strict\";return new @ReadableStream({@lazy:!0,@bunNativeType:nativeType,@bunNativePtr:nativePtr,autoAllocateChunkSize})})\n";
// cancel
const JSC::ConstructAbility s_readableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamCancelCodeLength = 276;
static const JSC::Intrinsic s_readableStreamCancelCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamCancelCode = "(function (reason){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"cancel\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));return @readableStreamCancel(this,reason)})\n";
// getReader
const JSC::ConstructAbility s_readableStreamGetReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamGetReaderCodeLength = 506;
static const JSC::Intrinsic s_readableStreamGetReaderCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamGetReaderCode = "(function (options){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"getReader\");const mode=@toDictionary(options,{},\"ReadableStream.getReader takes an object as first argument\").mode;if(mode===@undefined){var start_=@getByIdDirectPrivate(this,\"start\");if(start_)@putByIdDirectPrivate(this,\"start\",@undefined),start_();return new @ReadableStreamDefaultReader(this)}if(mode==\"byob\")return new @ReadableStreamBYOBReader(this);@throwTypeError(\"Invalid mode is specified\")})\n";
// pipeThrough
const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamPipeThroughCodeLength = 1162;
static const JSC::Intrinsic s_readableStreamPipeThroughCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamPipeThroughCode = "(function (streams,options){\"use strict\";const transforms=streams,readable=transforms.readable;if(!@isReadableStream(readable))throw @makeTypeError(\"readable should be ReadableStream\");const writable=transforms.writable,internalWritable=@getInternalWritableStream(writable);if(!@isWritableStream(internalWritable))throw @makeTypeError(\"writable should be WritableStream\");let preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))throw @makeTypeError(\"options must be an object\");if(preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal,signal!==@undefined&&!@isAbortSignal(signal))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(internalWritable))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,internalWritable,preventClose,preventAbort,preventCancel,signal),readable})\n";
// pipeTo
const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamPipeToCodeLength = 1175;
static const JSC::Intrinsic s_readableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamPipeToCode = "(function (destination){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"pipeTo\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));let options=@argument(1),preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))return @Promise.@reject(@makeTypeError(\"options must be an object\"));try{preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal}catch(e){return @Promise.@reject(e)}if(signal!==@undefined&&!@isAbortSignal(signal))return @Promise.@reject(@makeTypeError(\"options.signal must be AbortSignal\"))}const internalDestination=@getInternalWritableStream(destination);if(!@isWritableStream(internalDestination))return @Promise.@reject(@makeTypeError(\"ReadableStream pipeTo requires a WritableStream\"));if(@isWritableStreamLocked(internalDestination))return @Promise.@reject(@makeTypeError(\"WritableStream is locked\"));return @readableStreamPipeToWritableStream(this,internalDestination,preventClose,preventAbort,preventCancel,signal)})\n";
// tee
const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamTeeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamTeeCodeLength = 140;
static const JSC::Intrinsic s_readableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamTeeCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"tee\");return @readableStreamTee(this,!1)})\n";
// locked
const JSC::ConstructAbility s_readableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamLockedCodeLength = 147;
static const JSC::Intrinsic s_readableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamLockedCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeGetterTypeError(\"ReadableStream\",\"locked\");return @isReadableStreamLocked(this)})\n";
// values
const JSC::ConstructAbility s_readableStreamValuesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamValuesCodeLength = 165;
static const JSC::Intrinsic s_readableStreamValuesCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamValuesCode = "(function (options){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype.values.@call(this,options)})\n";
// lazyAsyncIterator
const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamLazyAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamLazyAsyncIteratorCodeLength = 176;
static const JSC::Intrinsic s_readableStreamLazyAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamLazyAsyncIteratorCode = "(function (){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype[globalThis.Symbol.asyncIterator].@call(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* JSBufferPrototype.ts */
// setBigUint64
const JSC::ConstructAbility s_jsBufferPrototypeSetBigUint64CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeSetBigUint64CodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeSetBigUint64CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeSetBigUint64CodeLength = 156;
static const JSC::Intrinsic s_jsBufferPrototypeSetBigUint64CodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeSetBigUint64Code = "(function (offset,value,le){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,le)})\n";
// readInt8
const JSC::ConstructAbility s_jsBufferPrototypeReadInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadInt8CodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadInt8CodeLength = 133;
static const JSC::Intrinsic s_jsBufferPrototypeReadInt8CodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt8(offset)})\n";
// readUInt8
const JSC::ConstructAbility s_jsBufferPrototypeReadUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUInt8CodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUInt8CodeLength = 134;
static const JSC::Intrinsic s_jsBufferPrototypeReadUInt8CodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint8(offset)})\n";
// readInt16LE
const JSC::ConstructAbility s_jsBufferPrototypeReadInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadInt16LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadInt16LECodeLength = 137;
static const JSC::Intrinsic s_jsBufferPrototypeReadInt16LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!0)})\n";
// readInt16BE
const JSC::ConstructAbility s_jsBufferPrototypeReadInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadInt16BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadInt16BECodeLength = 137;
static const JSC::Intrinsic s_jsBufferPrototypeReadInt16BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!1)})\n";
// readUInt16LE
const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUInt16LECodeLength = 138;
static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!0)})\n";
// readUInt16BE
const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUInt16BECodeLength = 138;
static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!1)})\n";
// readInt32LE
const JSC::ConstructAbility s_jsBufferPrototypeReadInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadInt32LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadInt32LECodeLength = 137;
static const JSC::Intrinsic s_jsBufferPrototypeReadInt32LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!0)})\n";
// readInt32BE
const JSC::ConstructAbility s_jsBufferPrototypeReadInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadInt32BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadInt32BECodeLength = 137;
static const JSC::Intrinsic s_jsBufferPrototypeReadInt32BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!1)})\n";
// readUInt32LE
const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUInt32LECodeLength = 138;
static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!0)})\n";
// readUInt32BE
const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUInt32BECodeLength = 138;
static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!1)})\n";
// readIntLE
const JSC::ConstructAbility s_jsBufferPrototypeReadIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadIntLECodeLength = 650;
static const JSC::Intrinsic s_jsBufferPrototypeReadIntLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!0);case 3:{const val=view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!0);case 5:{const last=view.getUint8(offset+4);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset,!0)}case 6:{const last=view.getUint16(offset+4,!0);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
// readIntBE
const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadIntBECodeLength = 650;
static const JSC::Intrinsic s_jsBufferPrototypeReadIntBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!1);case 3:{const val=view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
// readUIntLE
const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUIntLECodeLength = 543;
static const JSC::Intrinsic s_jsBufferPrototypeReadUIntLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!0);case 3:return view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;case 4:return view.getUint32(offset,!0);case 5:return view.getUint8(offset+4)*4294967296+view.getUint32(offset,!0);case 6:return view.getUint16(offset+4,!0)*4294967296+view.getUint32(offset,!0)}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
// readUIntBE
const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadUIntBECodeLength = 620;
static const JSC::Intrinsic s_jsBufferPrototypeReadUIntBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadUIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!1);case 3:return view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;case 4:return view.getUint32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
// readFloatLE
const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadFloatLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadFloatLECodeLength = 139;
static const JSC::Intrinsic s_jsBufferPrototypeReadFloatLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadFloatLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!0)})\n";
// readFloatBE
const JSC::ConstructAbility s_jsBufferPrototypeReadFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadFloatBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadFloatBECodeLength = 139;
static const JSC::Intrinsic s_jsBufferPrototypeReadFloatBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadFloatBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!1)})\n";
// readDoubleLE
const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadDoubleLECodeLength = 139;
static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadDoubleLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!0)})\n";
// readDoubleBE
const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadDoubleBECodeLength = 139;
static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadDoubleBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!1)})\n";
// readBigInt64LE
const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadBigInt64LECodeLength = 140;
static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadBigInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!0)})\n";
// readBigInt64BE
const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadBigInt64BECodeLength = 140;
static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadBigInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!1)})\n";
// readBigUInt64LE
const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadBigUInt64LECodeLength = 141;
static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadBigUInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!0)})\n";
// readBigUInt64BE
const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeReadBigUInt64BECodeLength = 141;
static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeReadBigUInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!1)})\n";
// writeInt8
const JSC::ConstructAbility s_jsBufferPrototypeWriteInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt8CodeLength = 154;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt8CodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt8(offset,value),offset+1})\n";
// writeUInt8
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUInt8CodeLength = 155;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt8CodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint8(offset,value),offset+1})\n";
// writeInt16LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt16LECodeLength = 158;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!0),offset+2})\n";
// writeInt16BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt16BECodeLength = 158;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!1),offset+2})\n";
// writeUInt16LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUInt16LECodeLength = 159;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!0),offset+2})\n";
// writeUInt16BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUInt16BECodeLength = 159;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!1),offset+2})\n";
// writeInt32LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt32LECodeLength = 158;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!0),offset+4})\n";
// writeInt32BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt32BECodeLength = 158;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!1),offset+4})\n";
// writeUInt32LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUInt32LECodeLength = 159;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!0),offset+4})\n";
// writeUInt32BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUInt32BECodeLength = 159;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!1),offset+4})\n";
// writeIntLE
const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteIntLECodeLength = 725;
static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setInt8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setInt8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setInt16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
// writeIntBE
const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteIntBECodeLength = 725;
static const JSC::Intrinsic s_jsBufferPrototypeWriteIntBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setInt8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setInt8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setInt16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
// writeUIntLE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUIntLECodeLength = 731;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setUint8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setUint8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setUint16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
// writeUIntBE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUIntBECodeLength = 731;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setUint8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setUint8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setUint16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
// writeFloatLE
const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteFloatLECodeLength = 160;
static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteFloatLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!0),offset+4})\n";
// writeFloatBE
const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteFloatBECodeLength = 160;
static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteFloatBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!1),offset+4})\n";
// writeDoubleLE
const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteDoubleLECodeLength = 160;
static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleLECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteDoubleLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!0),offset+8})\n";
// writeDoubleBE
const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteDoubleBECodeLength = 160;
static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleBECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteDoubleBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!1),offset+8})\n";
// writeBigInt64LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteBigInt64LECodeLength = 161;
static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteBigInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!0),offset+8})\n";
// writeBigInt64BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteBigInt64BECodeLength = 161;
static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteBigInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!1),offset+8})\n";
// writeBigUInt64LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteBigUInt64LECodeLength = 162;
static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteBigUInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!0),offset+8})\n";
// writeBigUInt64BE
const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteBigUInt64BECodeLength = 162;
static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeWriteBigUInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!1),offset+8})\n";
// utf8Write
const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUtf8WriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUtf8WriteCodeLength = 91;
static const JSC::Intrinsic s_jsBufferPrototypeUtf8WriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUtf8WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf8\")})\n";
// ucs2Write
const JSC::ConstructAbility s_jsBufferPrototypeUcs2WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUcs2WriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUcs2WriteCodeLength = 91;
static const JSC::Intrinsic s_jsBufferPrototypeUcs2WriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUcs2WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ucs2\")})\n";
// utf16leWrite
const JSC::ConstructAbility s_jsBufferPrototypeUtf16leWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUtf16leWriteCodeLength = 94;
static const JSC::Intrinsic s_jsBufferPrototypeUtf16leWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUtf16leWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf16le\")})\n";
// latin1Write
const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeLatin1WriteCodeLength = 93;
static const JSC::Intrinsic s_jsBufferPrototypeLatin1WriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeLatin1WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"latin1\")})\n";
// asciiWrite
const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeAsciiWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeAsciiWriteCodeLength = 92;
static const JSC::Intrinsic s_jsBufferPrototypeAsciiWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeAsciiWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ascii\")})\n";
// base64Write
const JSC::ConstructAbility s_jsBufferPrototypeBase64WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeBase64WriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeBase64WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeBase64WriteCodeLength = 93;
static const JSC::Intrinsic s_jsBufferPrototypeBase64WriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeBase64WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64\")})\n";
// base64urlWrite
const JSC::ConstructAbility s_jsBufferPrototypeBase64urlWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeBase64urlWriteCodeLength = 96;
static const JSC::Intrinsic s_jsBufferPrototypeBase64urlWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeBase64urlWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64url\")})\n";
// hexWrite
const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeHexWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeHexWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeHexWriteCodeLength = 90;
static const JSC::Intrinsic s_jsBufferPrototypeHexWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeHexWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"hex\")})\n";
// utf8Slice
const JSC::ConstructAbility s_jsBufferPrototypeUtf8SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUtf8SliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUtf8SliceCodeLength = 76;
static const JSC::Intrinsic s_jsBufferPrototypeUtf8SliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUtf8SliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf8\",start,end)})\n";
// ucs2Slice
const JSC::ConstructAbility s_jsBufferPrototypeUcs2SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUcs2SliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUcs2SliceCodeLength = 76;
static const JSC::Intrinsic s_jsBufferPrototypeUcs2SliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUcs2SliceCode = "(function (start,end){\"use strict\";return this.toString(\"ucs2\",start,end)})\n";
// utf16leSlice
const JSC::ConstructAbility s_jsBufferPrototypeUtf16leSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeUtf16leSliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeUtf16leSliceCodeLength = 79;
static const JSC::Intrinsic s_jsBufferPrototypeUtf16leSliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeUtf16leSliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf16le\",start,end)})\n";
// latin1Slice
const JSC::ConstructAbility s_jsBufferPrototypeLatin1SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeLatin1SliceCodeLength = 78;
static const JSC::Intrinsic s_jsBufferPrototypeLatin1SliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeLatin1SliceCode = "(function (start,end){\"use strict\";return this.toString(\"latin1\",start,end)})\n";
// asciiSlice
const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeAsciiSliceCodeLength = 77;
static const JSC::Intrinsic s_jsBufferPrototypeAsciiSliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeAsciiSliceCode = "(function (start,end){\"use strict\";return this.toString(\"ascii\",start,end)})\n";
// base64Slice
const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeBase64SliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeBase64SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeBase64SliceCodeLength = 78;
static const JSC::Intrinsic s_jsBufferPrototypeBase64SliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeBase64SliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64\",start,end)})\n";
// base64urlSlice
const JSC::ConstructAbility s_jsBufferPrototypeBase64urlSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeBase64urlSliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeBase64urlSliceCodeLength = 81;
static const JSC::Intrinsic s_jsBufferPrototypeBase64urlSliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeBase64urlSliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64url\",start,end)})\n";
// hexSlice
const JSC::ConstructAbility s_jsBufferPrototypeHexSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeHexSliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeHexSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeHexSliceCodeLength = 75;
static const JSC::Intrinsic s_jsBufferPrototypeHexSliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeHexSliceCode = "(function (start,end){\"use strict\";return this.toString(\"hex\",start,end)})\n";
// toJSON
const JSC::ConstructAbility s_jsBufferPrototypeToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeToJSONCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeToJSONCodeLength = 73;
static const JSC::Intrinsic s_jsBufferPrototypeToJSONCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeToJSONCode = "(function (){\"use strict\";return{type:\"Buffer\",data:@Array.from(this)}})\n";
// slice
const JSC::ConstructAbility s_jsBufferPrototypeSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeSliceCodeLength = 447;
static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeSliceCode = "(function (start,end){\"use strict\";var{buffer,byteOffset,byteLength}=this;function adjustOffset(offset,length){if(offset=@trunc(offset),offset===0||offset!==offset)return 0;else if(offset<0)return offset+=length,offset>0\?offset:0;else return offset<length\?offset:length}var start_=adjustOffset(start,byteLength),end_=end!==@undefined\?adjustOffset(end,byteLength):byteLength;return new @Buffer(buffer,byteOffset+start_,end_>start_\?end_-start_:0)})\n";
// parent
const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeParentCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeParentCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeParentCodeLength = 99;
static const JSC::Intrinsic s_jsBufferPrototypeParentCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeParentCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.buffer:@undefined})\n";
// offset
const JSC::ConstructAbility s_jsBufferPrototypeOffsetCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeOffsetCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeOffsetCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeOffsetCodeLength = 103;
static const JSC::Intrinsic s_jsBufferPrototypeOffsetCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeOffsetCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.byteOffset:@undefined})\n";
// inspect
const JSC::ConstructAbility s_jsBufferPrototypeInspectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_jsBufferPrototypeInspectCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_jsBufferPrototypeInspectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeInspectCodeLength = 70;
static const JSC::Intrinsic s_jsBufferPrototypeInspectCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_jsBufferPrototypeInspectCode = "(function (recurseTimes,ctx){\"use strict\";return @Bun.inspect(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* TransformStreamInternals.ts */
// isTransformStream
const JSC::ConstructAbility s_transformStreamInternalsIsTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsIsTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsIsTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsIsTransformStreamCodeLength = 103;
static const JSC::Intrinsic s_transformStreamInternalsIsTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsIsTransformStreamCode = "(function (stream){\"use strict\";return @isObject(stream)&&!!@getByIdDirectPrivate(stream,\"readable\")})\n";
// isTransformStreamDefaultController
const JSC::ConstructAbility s_transformStreamInternalsIsTransformStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsIsTransformStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsIsTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsIsTransformStreamDefaultControllerCodeLength = 125;
static const JSC::Intrinsic s_transformStreamInternalsIsTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsIsTransformStreamDefaultControllerCode = "(function (controller){\"use strict\";return @isObject(controller)&&!!@getByIdDirectPrivate(controller,\"transformAlgorithm\")})\n";
// createTransformStream
const JSC::ConstructAbility s_transformStreamInternalsCreateTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsCreateTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsCreateTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsCreateTransformStreamCodeLength = 1042;
static const JSC::Intrinsic s_transformStreamInternalsCreateTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (startAlgorithm,transformAlgorithm,flushAlgorithm,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm){\"use strict\";if(writableHighWaterMark===@undefined)writableHighWaterMark=1;if(writableSizeAlgorithm===@undefined)writableSizeAlgorithm=()=>1;if(readableHighWaterMark===@undefined)readableHighWaterMark=0;if(readableSizeAlgorithm===@undefined)readableSizeAlgorithm=()=>1;const transform={};@putByIdDirectPrivate(transform,\"TransformStream\",!0);const stream=new @TransformStream(transform),startPromiseCapability=@newPromiseCapability(@Promise);@initializeTransformStream(stream,startPromiseCapability.promise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm);const controller=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(stream,controller,transformAlgorithm,flushAlgorithm),startAlgorithm().@then(()=>{startPromiseCapability.resolve.@call()},(error)=>{startPromiseCapability.reject.@call(@undefined,error)}),stream})\n";
// initializeTransformStream
const JSC::ConstructAbility s_transformStreamInternalsInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsInitializeTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsInitializeTransformStreamCodeLength = 1593;
static const JSC::Intrinsic s_transformStreamInternalsInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (stream,startPromise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm){\"use strict\";const startAlgorithm=()=>{return startPromise},writeAlgorithm=(chunk)=>{return @transformStreamDefaultSinkWriteAlgorithm(stream,chunk)},abortAlgorithm=(reason)=>{return @transformStreamDefaultSinkAbortAlgorithm(stream,reason)},closeAlgorithm=()=>{return @transformStreamDefaultSinkCloseAlgorithm(stream)},writable=@createWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,writableHighWaterMark,writableSizeAlgorithm),pullAlgorithm=()=>{return @transformStreamDefaultSourcePullAlgorithm(stream)},cancelAlgorithm=(reason)=>{return @transformStreamErrorWritableAndUnblockWrite(stream,reason),@Promise.@resolve()},underlyingSource={};@putByIdDirectPrivate(underlyingSource,\"start\",startAlgorithm),@putByIdDirectPrivate(underlyingSource,\"pull\",pullAlgorithm),@putByIdDirectPrivate(underlyingSource,\"cancel\",cancelAlgorithm);const options={};@putByIdDirectPrivate(options,\"size\",readableSizeAlgorithm),@putByIdDirectPrivate(options,\"highWaterMark\",readableHighWaterMark);const readable=new @ReadableStream(underlyingSource,options);@putByIdDirectPrivate(stream,\"writable\",writable),@putByIdDirectPrivate(stream,\"internalWritable\",@getInternalWritableStream(writable)),@putByIdDirectPrivate(stream,\"readable\",readable),@putByIdDirectPrivate(stream,\"backpressure\",@undefined),@putByIdDirectPrivate(stream,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(stream,!0),@putByIdDirectPrivate(stream,\"controller\",@undefined)})\n";
// transformStreamError
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamErrorCodeLength = 285;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamErrorCode = "(function (stream,e){\"use strict\";const readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");@readableStreamDefaultControllerError(readableController,e),@transformStreamErrorWritableAndUnblockWrite(stream,e)})\n";
// transformStreamErrorWritableAndUnblockWrite
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeLength = 378;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCode = "(function (stream,e){\"use strict\";@transformStreamDefaultControllerClearAlgorithms(@getByIdDirectPrivate(stream,\"controller\"));const writable=@getByIdDirectPrivate(stream,\"internalWritable\");if(@writableStreamDefaultControllerErrorIfNeeded(@getByIdDirectPrivate(writable,\"controller\"),e),@getByIdDirectPrivate(stream,\"backpressure\"))@transformStreamSetBackpressure(stream,!1)})\n";
// transformStreamSetBackpressure
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamSetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamSetBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamSetBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamSetBackpressureCodeLength = 369;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamSetBackpressureCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamSetBackpressureCode = "(function (stream,backpressure){\"use strict\";const backpressureChangePromise=@getByIdDirectPrivate(stream,\"backpressureChangePromise\");if(backpressureChangePromise!==@undefined)backpressureChangePromise.resolve.@call();@putByIdDirectPrivate(stream,\"backpressureChangePromise\",@newPromiseCapability(@Promise)),@putByIdDirectPrivate(stream,\"backpressure\",backpressure)})\n";
// setUpTransformStreamDefaultController
const JSC::ConstructAbility s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeLength = 323;
static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerCode = "(function (stream,controller,transformAlgorithm,flushAlgorithm){\"use strict\";@putByIdDirectPrivate(controller,\"stream\",stream),@putByIdDirectPrivate(stream,\"controller\",controller),@putByIdDirectPrivate(controller,\"transformAlgorithm\",transformAlgorithm),@putByIdDirectPrivate(controller,\"flushAlgorithm\",flushAlgorithm)})\n";
// setUpTransformStreamDefaultControllerFromTransformer
const JSC::ConstructAbility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeLength = 704;
static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCode = "(function (stream,transformer,transformerDict){\"use strict\";const controller=new @TransformStreamDefaultController;let transformAlgorithm=(chunk)=>{try{@transformStreamDefaultControllerEnqueue(controller,chunk)}catch(e){return @Promise.@reject(e)}return @Promise.@resolve()},flushAlgorithm=()=>{return @Promise.@resolve()};if(\"transform\"in transformerDict)transformAlgorithm=(chunk)=>{return @promiseInvokeOrNoopMethod(transformer,transformerDict.transform,[chunk,controller])};if(\"flush\"in transformerDict)flushAlgorithm=()=>{return @promiseInvokeOrNoopMethod(transformer,transformerDict.flush,[controller])};@setUpTransformStreamDefaultController(stream,controller,transformAlgorithm,flushAlgorithm)})\n";
// transformStreamDefaultControllerClearAlgorithms
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeLength = 158;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"transformAlgorithm\",!0),@putByIdDirectPrivate(controller,\"flushAlgorithm\",@undefined)})\n";
// transformStreamDefaultControllerEnqueue
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeLength = 717;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\"),readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(readableController))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(readableController,chunk)}catch(e){throw @transformStreamErrorWritableAndUnblockWrite(stream,e),@getByIdDirectPrivate(readable,\"storedError\")}if(!@readableStreamDefaultControllerShouldCallPull(readableController)!==@getByIdDirectPrivate(stream,\"backpressure\"))@transformStreamSetBackpressure(stream,!0)})\n";
// transformStreamDefaultControllerError
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeLength = 108;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultControllerErrorCode = "(function (controller,e){\"use strict\";@transformStreamError(@getByIdDirectPrivate(controller,\"stream\"),e)})\n";
// transformStreamDefaultControllerPerformTransform
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeLength = 373;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (controller,chunk){\"use strict\";const promiseCapability=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(controller,\"transformAlgorithm\").@call(@undefined,chunk).@then(()=>{promiseCapability.resolve()},(r)=>{@transformStreamError(@getByIdDirectPrivate(controller,\"stream\"),r),promiseCapability.reject.@call(@undefined,r)}),promiseCapability.promise})\n";
// transformStreamDefaultControllerTerminate
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeLength = 473;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultControllerTerminateCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\"),readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");if(@readableStreamDefaultControllerCanCloseOrEnqueue(readableController))@readableStreamDefaultControllerClose(readableController);const error=@makeTypeError(\"the stream has been terminated\");@transformStreamErrorWritableAndUnblockWrite(stream,error)})\n";
// transformStreamDefaultSinkWriteAlgorithm
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeLength = 816;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCode = "(function (stream,chunk){\"use strict\";const writable=@getByIdDirectPrivate(stream,\"internalWritable\"),controller=@getByIdDirectPrivate(stream,\"controller\");if(@getByIdDirectPrivate(stream,\"backpressure\")){const promiseCapability=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(stream,\"backpressureChangePromise\").promise.@then(()=>{if(@getByIdDirectPrivate(writable,\"state\")===\"erroring\"){promiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(writable,\"storedError\"));return}@transformStreamDefaultControllerPerformTransform(controller,chunk).@then(()=>{promiseCapability.resolve()},(e)=>{promiseCapability.reject.@call(@undefined,e)})},(e)=>{promiseCapability.reject.@call(@undefined,e)}),promiseCapability.promise}return @transformStreamDefaultControllerPerformTransform(controller,chunk)})\n";
// transformStreamDefaultSinkAbortAlgorithm
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeLength = 105;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCode = "(function (stream,reason){\"use strict\";return @transformStreamError(stream,reason),@Promise.@resolve()})\n";
// transformStreamDefaultSinkCloseAlgorithm
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeLength = 1016;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCode = "(function (stream){\"use strict\";const readable=@getByIdDirectPrivate(stream,\"readable\"),controller=@getByIdDirectPrivate(stream,\"controller\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\"),flushAlgorithm=@getByIdDirectPrivate(controller,\"flushAlgorithm\"),flushPromise=@getByIdDirectPrivate(controller,\"flushAlgorithm\").@call();@transformStreamDefaultControllerClearAlgorithms(controller);const promiseCapability=@newPromiseCapability(@Promise);return flushPromise.@then(()=>{if(@getByIdDirectPrivate(readable,\"state\")===@streamErrored){promiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(readable,\"storedError\"));return}if(@readableStreamDefaultControllerCanCloseOrEnqueue(readableController))@readableStreamDefaultControllerClose(readableController);promiseCapability.resolve()},(r)=>{@transformStreamError(@getByIdDirectPrivate(controller,\"stream\"),r),promiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(readable,\"storedError\"))}),promiseCapability.promise})\n";
// transformStreamDefaultSourcePullAlgorithm
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeLength = 150;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCode = "(function (stream){\"use strict\";return @transformStreamSetBackpressure(stream,!1),@getByIdDirectPrivate(stream,\"backpressureChangePromise\").promise})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().transformStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_TRANSFORMSTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* WritableStreamDefaultWriter.ts */
// initializeWritableStreamDefaultWriter
const JSC::ConstructAbility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength = 301;
static const JSC::Intrinsic s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";const internalStream=@getInternalWritableStream(stream);if(internalStream)stream=internalStream;if(!@isWritableStream(stream))@throwTypeError(\"WritableStreamDefaultWriter constructor takes a WritableStream\");return @setUpWritableStreamDefaultWriter(this,stream),this})\n";
// closed
const JSC::ConstructAbility s_writableStreamDefaultWriterClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterClosedCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterClosedCodeLength = 214;
static const JSC::Intrinsic s_writableStreamDefaultWriterClosedCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterClosedCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeGetterTypeError(\"WritableStreamDefaultWriter\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromise\").promise})\n";
// desiredSize
const JSC::ConstructAbility s_writableStreamDefaultWriterDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterDesiredSizeCodeLength = 309;
static const JSC::Intrinsic s_writableStreamDefaultWriterDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterDesiredSizeCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"desiredSize\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)@throwTypeError(\"WritableStreamDefaultWriter has no stream\");return @writableStreamDefaultWriterGetDesiredSize(this)})\n";
// ready
const JSC::ConstructAbility s_writableStreamDefaultWriterReadyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterReadyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterReadyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterReadyCodeLength = 210;
static const JSC::Intrinsic s_writableStreamDefaultWriterReadyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterReadyCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"ready\"));return @getByIdDirectPrivate(this,\"readyPromise\").promise})\n";
// abort
const JSC::ConstructAbility s_writableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterAbortCodeLength = 350;
static const JSC::Intrinsic s_writableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterAbortCode = "(function (reason){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"abort\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterAbort(this,reason)})\n";
// close
const JSC::ConstructAbility s_writableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterCloseCodeLength = 492;
static const JSC::Intrinsic s_writableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterCloseCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"close\"));const stream=@getByIdDirectPrivate(this,\"stream\");if(stream===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter is being closed\"));return @writableStreamDefaultWriterClose(this)})\n";
// releaseLock
const JSC::ConstructAbility s_writableStreamDefaultWriterReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterReleaseLockCodeLength = 241;
static const JSC::Intrinsic s_writableStreamDefaultWriterReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterReleaseLockCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"releaseLock\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return;@writableStreamDefaultWriterRelease(this)})\n";
// write
const JSC::ConstructAbility s_writableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultWriterWriteCodeLength = 348;
static const JSC::Intrinsic s_writableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultWriterWriteCode = "(function (chunk){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"write\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterWrite(this,chunk)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableByteStreamController.ts */
// initializeReadableByteStreamController
const JSC::ConstructAbility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength = 325;
static const JSC::Intrinsic s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerInitializeReadableByteStreamControllerCode = "(function (stream,underlyingByteSource,highWaterMark){\"use strict\";if(arguments.length!==4&&arguments[3]!==@isReadableStream)@throwTypeError(\"ReadableByteStreamController constructor should not be called directly\");return @privateInitializeReadableByteStreamController.@call(this,stream,underlyingByteSource,highWaterMark)})\n";
// enqueue
const JSC::ConstructAbility s_readableByteStreamControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerEnqueueCodeLength = 578;
static const JSC::Intrinsic s_readableByteStreamControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerEnqueueCode = "(function (chunk){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeThisTypeError(\"ReadableByteStreamController\",\"enqueue\");if(@getByIdDirectPrivate(this,\"closeRequested\"))@throwTypeError(\"ReadableByteStreamController is requested to close\");if(@getByIdDirectPrivate(@getByIdDirectPrivate(this,\"controlledReadableStream\"),\"state\")!==@streamReadable)@throwTypeError(\"ReadableStream is not readable\");if(!@isObject(chunk)||!@ArrayBuffer.@isView(chunk))@throwTypeError(\"Provided chunk is not a TypedArray\");return @readableByteStreamControllerEnqueue(this,chunk)})\n";
// error
const JSC::ConstructAbility s_readableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerErrorCodeLength = 344;
static const JSC::Intrinsic s_readableByteStreamControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerErrorCode = "(function (error){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeThisTypeError(\"ReadableByteStreamController\",\"error\");if(@getByIdDirectPrivate(@getByIdDirectPrivate(this,\"controlledReadableStream\"),\"state\")!==@streamReadable)@throwTypeError(\"ReadableStream is not readable\");@readableByteStreamControllerError(this,error)})\n";
// close
const JSC::ConstructAbility s_readableByteStreamControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerCloseCodeLength = 433;
static const JSC::Intrinsic s_readableByteStreamControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerCloseCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeThisTypeError(\"ReadableByteStreamController\",\"close\");if(@getByIdDirectPrivate(this,\"closeRequested\"))@throwTypeError(\"Close has already been requested\");if(@getByIdDirectPrivate(@getByIdDirectPrivate(this,\"controlledReadableStream\"),\"state\")!==@streamReadable)@throwTypeError(\"ReadableStream is not readable\");@readableByteStreamControllerClose(this)})\n";
// byobRequest
const JSC::ConstructAbility s_readableByteStreamControllerByobRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerByobRequestCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerByobRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerByobRequestCodeLength = 651;
static const JSC::Intrinsic s_readableByteStreamControllerByobRequestCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerByobRequestCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"byobRequest\");var request=@getByIdDirectPrivate(this,\"byobRequest\");if(request===@undefined){var pending=@getByIdDirectPrivate(this,\"pendingPullIntos\");const firstDescriptor=pending.peek();if(firstDescriptor){const view=new @Uint8Array(firstDescriptor.buffer,firstDescriptor.byteOffset+firstDescriptor.bytesFilled,firstDescriptor.byteLength-firstDescriptor.bytesFilled);@putByIdDirectPrivate(this,\"byobRequest\",new @ReadableStreamBYOBRequest(this,view,@isReadableStream))}}return @getByIdDirectPrivate(this,\"byobRequest\")})\n";
// desiredSize
const JSC::ConstructAbility s_readableByteStreamControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableByteStreamControllerDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableByteStreamControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamControllerDesiredSizeCodeLength = 200;
static const JSC::Intrinsic s_readableByteStreamControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableByteStreamControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"desiredSize\");return @readableByteStreamControllerGetDesiredSize(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().readableByteStreamControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableByteStreamControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ByteLengthQueuingStrategy.ts */
// highWaterMark
const JSC::ConstructAbility s_byteLengthQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_byteLengthQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_byteLengthQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_byteLengthQueuingStrategyHighWaterMarkCodeLength = 246;
static const JSC::Intrinsic s_byteLengthQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_byteLengthQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"ByteLengthQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
// size
const JSC::ConstructAbility s_byteLengthQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_byteLengthQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_byteLengthQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_byteLengthQueuingStrategySizeCodeLength = 57;
static const JSC::Intrinsic s_byteLengthQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_byteLengthQueuingStrategySizeCode = "(function (chunk){\"use strict\";return chunk.byteLength})\n";
// initializeByteLengthQueuingStrategy
const JSC::ConstructAbility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength = 139;
static const JSC::Intrinsic s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* WritableStreamDefaultController.ts */
// initializeWritableStreamDefaultController
const JSC::ConstructAbility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength = 388;
static const JSC::Intrinsic s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode = "(function (){\"use strict\";return @putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"abortSteps\",(reason)=>{const result=@getByIdDirectPrivate(this,\"abortAlgorithm\").@call(@undefined,reason);return @writableStreamDefaultControllerClearAlgorithms(this),result}),@putByIdDirectPrivate(this,\"errorSteps\",()=>{@resetQueue(@getByIdDirectPrivate(this,\"queue\"))}),this})\n";
// error
const JSC::ConstructAbility s_writableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamDefaultControllerErrorCodeLength = 311;
static const JSC::Intrinsic s_writableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_writableStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(@getByIdDirectPrivate(this,\"abortSteps\")===@undefined)throw @makeThisTypeError(\"WritableStreamDefaultController\",\"error\");const stream=@getByIdDirectPrivate(this,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")!==\"writable\")return;@writableStreamDefaultControllerError(this,e)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ImportMetaObject.ts */
// loadCJS2ESM
const JSC::ConstructAbility s_importMetaObjectLoadCJS2ESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectLoadCJS2ESMCodeLength = 2214;
static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (resolvedSpecifier){\"use strict\";var loader=@Loader,queue=@createFIFO(),key=resolvedSpecifier;while(key){var entry=loader.registry.@get(key);if((entry\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(key),entry=loader.registry.@get(key);var sourceCodeObject=@getPromiseInternalField(entry.fetch,@promiseFieldReactionsOrResult),moduleRecordPromise=loader.parseModule(key,sourceCodeObject),mod=entry.module;if(moduleRecordPromise&&@isPromise(moduleRecordPromise)){var reactionsOrResult=@getPromiseInternalField(moduleRecordPromise,@promiseFieldReactionsOrResult),flags=@getPromiseInternalField(moduleRecordPromise,@promiseFieldFlags),state=flags&@promiseStateMask;if(state===@promiseStatePending||reactionsOrResult&&@isPromise(reactionsOrResult))@throwTypeError(`require() async module \"${key}\" is unsupported. use \"await import()\" instead.`);else if(state===@promiseStateRejected){if(!reactionsOrResult\?.message)@throwTypeError(`${reactionsOrResult+\"\"\?reactionsOrResult:\"An error occurred\"} occurred while parsing module \\\"${key}\\\"`);throw reactionsOrResult}entry.module=mod=reactionsOrResult}else if(moduleRecordPromise&&!mod)entry.module=mod=moduleRecordPromise;@setStateToMax(entry,@ModuleLink);var dependenciesMap=mod.dependenciesMap,requestedModules=loader.requestedModules(mod),dependencies=@newArrayWithSize(requestedModules.length);for(var i=0,length=requestedModules.length;i<length;++i){var depName=requestedModules[i],depKey=depName[0]===\"/\"\?depName:loader.resolve(depName,key),depEntry=loader.ensureRegistered(depKey);if(depEntry.state<@ModuleLink)queue.push(depKey);@putByValDirect(dependencies,i,depEntry),dependenciesMap.@set(depName,depEntry)}entry.dependencies=dependencies,entry.instantiate=@Promise.@resolve(entry),entry.satisfy=@Promise.@resolve(entry),entry.isSatisfied=!0,key=queue.shift();while(key&&(loader.registry.@get(key)\?.state\?\?@ModuleFetch)>=@ModuleLink)key=queue.shift()}var linkAndEvaluateResult=loader.linkAndEvaluateModule(resolvedSpecifier,@undefined);if(linkAndEvaluateResult&&@isPromise(linkAndEvaluateResult))@throwTypeError(`require() async module \\\"${resolvedSpecifier}\\\" is unsupported. use \"await import()\" instead.`);return loader.registry.@get(resolvedSpecifier)})\n";
// requireESM
const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectRequireESMCodeLength = 364;
static const JSC::Intrinsic s_importMetaObjectRequireESMCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_importMetaObjectRequireESMCode = "(function (resolved){\"use strict\";var entry=@Loader.registry.@get(resolved);if(!entry||!entry.evaluated)entry=@loadCJS2ESM(resolved);if(!entry||!entry.evaluated||!entry.module)@throwTypeError(`require() failed to evaluate module \"${resolved}\". This is an internal consistentency error.`);var exports=@Loader.getModuleNamespaceObject(entry.module);return exports})\n";
// internalRequire
const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectInternalRequireCodeLength = 857;
static const JSC::Intrinsic s_importMetaObjectInternalRequireCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_importMetaObjectInternalRequireCode = "(function (id){\"use strict\";var cached=@requireMap.@get(id);const last5=id.substring(id.length-5);if(cached)return cached.exports;if(last5===\".json\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=JSON.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else if(last5===\".node\"){const module=@createCommonJSModule(id,{},!0);return process.dlopen(module,id),@requireMap.@set(id,module),module.exports}else if(last5===\".toml\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=@Bun.TOML.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else{var exports=@requireESM(id);const cachedModule=@requireMap.@get(id);if(cachedModule)return cachedModule.exports;return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}})\n";
// createRequireCache
const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectCreateRequireCacheCodeLength = 978;
static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var moduleMap=new Map,inner={};return new Proxy(inner,{get(target,key){const entry=@requireMap.@get(key);if(entry)return entry;const esm=@Loader.registry.@get(key);if(esm\?.evaluated){const namespace=@Loader.getModuleNamespaceObject(esm.module),mod=@createCommonJSModule(key,namespace,!0);return @requireMap.@set(key,mod),mod}return inner[key]},set(target,key,value){return @requireMap.@set(key,value),!0},has(target,key){return @requireMap.@has(key)||@Loader.registry.@has(key)},deleteProperty(target,key){return moduleMap.@delete(key),@requireMap.@delete(key),@Loader.registry.@delete(key),!0},ownKeys(target){var array=[...@requireMap.@keys()];const registryKeys=[...@Loader.registry.@keys()];for(let key of registryKeys)if(!array.includes(key))@arrayPush(array,key);return array},getPrototypeOf(target){return null},getOwnPropertyDescriptor(target,key){if(@requireMap.@has(key)||@Loader.registry.@has(key))return{configurable:!0,enumerable:!0}}})})\n";
// main
const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_importMetaObjectMainCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_importMetaObjectMainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectMainCodeLength = 76;
static const JSC::Intrinsic s_importMetaObjectMainCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_importMetaObjectMainCode = "(function (){\"use strict\";return this.path===@Bun.main&&@Bun.isMainThread})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* Module.ts */
// main
const JSC::ConstructAbility s_moduleMainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_moduleMainCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_moduleMainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_moduleMainCodeLength = 63;
static const JSC::Intrinsic s_moduleMainCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_moduleMainCode = "(function (){\"use strict\";return @requireMap.@get(@Bun.main)})\n";
// require
const JSC::ConstructAbility s_moduleRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_moduleRequireCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_moduleRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_moduleRequireCodeLength = 769;
static const JSC::Intrinsic s_moduleRequireCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_moduleRequireCode = "(function (id){\"use strict\";const existing=@requireMap.@get(id)||@requireMap.@get(id=@resolveSync(id,this.path,!1));if(existing)return @evaluateCommonJSModule(existing),existing.exports;if(id.endsWith(\".json\")||id.endsWith(\".toml\")||id.endsWith(\".node\"))return @internalRequire(id);const mod=@createCommonJSModule(id,{},!1);@requireMap.@set(id,mod);var out=this.@require(id,mod);if(out===-1){try{out=@requireESM(id)}catch(exception){throw @requireMap.@delete(id),exception}const esm=@Loader.registry.@get(id);if(esm\?.evaluated&&(esm.state\?\?0)>=@ModuleReady){const namespace=@Loader.getModuleNamespaceObject(esm.module);return mod.exports=namespace.__esModule\?namespace:Object.create(namespace,{__esModule:{value:!0}})}}return @evaluateCommonJSModule(mod),mod.exports})\n";
// requireResolve
const JSC::ConstructAbility s_moduleRequireResolveCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_moduleRequireResolveCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_moduleRequireResolveCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_moduleRequireResolveCodeLength = 96;
static const JSC::Intrinsic s_moduleRequireResolveCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_moduleRequireResolveCode = "(function (id){\"use strict\";return @resolveSync(id,typeof this===\"string\"\?this:this\?.path,!1)})\n";
// requireNativeModule
const JSC::ConstructAbility s_moduleRequireNativeModuleCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_moduleRequireNativeModuleCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_moduleRequireNativeModuleCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_moduleRequireNativeModuleCodeLength = 203;
static const JSC::Intrinsic s_moduleRequireNativeModuleCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_moduleRequireNativeModuleCode = "(function (id){\"use strict\";let esm=@Loader.registry.@get(id);if(esm\?.evaluated&&(esm.state\?\?0)>=@ModuleReady)return @Loader.getModuleNamespaceObject(esm.module).default;return @requireESM(id).default})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
return clientData->builtinFunctions().moduleBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().moduleBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
WEBCORE_FOREACH_MODULE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
JSBuiltinInternalFunctions::JSBuiltinInternalFunctions(JSC::VM& vm)
: m_vm(vm)
, m_readableByteStreamInternals(vm)
, m_streamInternals(vm)
, m_readableStreamInternals(vm)
, m_writableStreamInternals(vm)
, m_transformStreamInternals(vm)
{
UNUSED_PARAM(vm);
}
template<typename Visitor>
void JSBuiltinInternalFunctions::visit(Visitor& visitor)
{
m_readableByteStreamInternals.visit(visitor);
m_streamInternals.visit(visitor);
m_readableStreamInternals.visit(visitor);
m_writableStreamInternals.visit(visitor);
m_transformStreamInternals.visit(visitor);
UNUSED_PARAM(visitor);
}
template void JSBuiltinInternalFunctions::visit(AbstractSlotVisitor&);
template void JSBuiltinInternalFunctions::visit(SlotVisitor&);
SUPPRESS_ASAN void JSBuiltinInternalFunctions::initialize(Zig::GlobalObject& globalObject)
{
UNUSED_PARAM(globalObject);
m_readableByteStreamInternals.init(globalObject);
m_streamInternals.init(globalObject);
m_readableStreamInternals.init(globalObject);
m_writableStreamInternals.init(globalObject);
m_transformStreamInternals.init(globalObject);
JSVMClientData& clientData = *static_cast<JSVMClientData*>(m_vm.clientData);
Zig::GlobalObject::GlobalPropertyInfo staticGlobals[] = {
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().readableByteStreamInternalsBuiltins().name##PrivateName(), readableByteStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().streamInternalsBuiltins().name##PrivateName(), streamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), readableStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), writableStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().transformStreamInternalsBuiltins().name##PrivateName(), transformStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_TRANSFORMSTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
};
globalObject.addStaticGlobals(staticGlobals, std::size(staticGlobals));
UNUSED_PARAM(clientData);
}
} // namespace WebCore
|