@@ -76,6 +76,10 @@ export const universalPropertyNames = {
7676 URIError : 'URIError' ,
7777 WeakMap : 'WeakMap' ,
7878 WeakSet : 'WeakSet' ,
79+ // https://github.com/tc39/proposal-iterator-helpers
80+ Iterator : 'Iterator' ,
81+ // https://github.com/tc39/proposal-async-iterator-helpers
82+ AsyncIterator : 'AsyncIterator' ,
7983
8084 // *** Other Properties of the Global Object
8185
@@ -246,7 +250,7 @@ export const FunctionInstance = {
246250} ;
247251
248252// AsyncFunction Instances
249- const AsyncFunctionInstance = {
253+ export const AsyncFunctionInstance = {
250254 // This property is not mentioned in ECMA 262, but is present in V8 and
251255 // necessary for lockdown to succeed.
252256 '[[Proto]]' : '%AsyncFunctionPrototype%' ,
@@ -1233,14 +1237,90 @@ export const permitted = {
12331237
12341238 // *** Control Abstraction Objects
12351239
1240+ // https://github.com/tc39/proposal-iterator-helpers
1241+ Iterator : {
1242+ // Properties of the Iterator Constructor
1243+ '[[Proto]]' : '%FunctionPrototype%' ,
1244+ prototype : '%IteratorPrototype%' ,
1245+ from : fn ,
1246+ } ,
1247+
12361248 '%IteratorPrototype%' : {
12371249 // The %IteratorPrototype% Object
12381250 '@@iterator' : fn ,
1251+ // https://github.com/tc39/proposal-iterator-helpers
1252+ constructor : 'Iterator' ,
1253+ map : fn ,
1254+ filter : fn ,
1255+ take : fn ,
1256+ drop : fn ,
1257+ flatMap : fn ,
1258+ reduce : fn ,
1259+ toArray : fn ,
1260+ forEach : fn ,
1261+ some : fn ,
1262+ every : fn ,
1263+ find : fn ,
1264+ '@@toStringTag' : 'string' ,
1265+ // https://github.com/tc39/proposal-async-iterator-helpers
1266+ toAsync : fn ,
1267+ } ,
1268+
1269+ // https://github.com/tc39/proposal-iterator-helpers
1270+ '%WrapForValidIteratorPrototype%' : {
1271+ '[[Proto]]' : '%IteratorPrototype%' ,
1272+ next : fn ,
1273+ return : fn ,
1274+ } ,
1275+
1276+ // https://github.com/tc39/proposal-iterator-helpers
1277+ '%IteratorHelperPrototype%' : {
1278+ '[[Proto]]' : '%IteratorPrototype%' ,
1279+ next : fn ,
1280+ return : fn ,
1281+ '@@toStringTag' : 'string' ,
1282+ } ,
1283+
1284+ // https://github.com/tc39/proposal-async-iterator-helpers
1285+ AsyncIterator : {
1286+ // Properties of the Iterator Constructor
1287+ '[[Proto]]' : '%FunctionPrototype%' ,
1288+ prototype : '%AsyncIteratorPrototype%' ,
1289+ from : fn ,
12391290 } ,
12401291
12411292 '%AsyncIteratorPrototype%' : {
12421293 // The %AsyncIteratorPrototype% Object
12431294 '@@asyncIterator' : fn ,
1295+ // https://github.com/tc39/proposal-async-iterator-helpers
1296+ constructor : 'AsyncIterator' ,
1297+ map : fn ,
1298+ filter : fn ,
1299+ take : fn ,
1300+ drop : fn ,
1301+ flatMap : fn ,
1302+ reduce : fn ,
1303+ toArray : fn ,
1304+ forEach : fn ,
1305+ some : fn ,
1306+ every : fn ,
1307+ find : fn ,
1308+ '@@toStringTag' : 'string' ,
1309+ } ,
1310+
1311+ // https://github.com/tc39/proposal-async-iterator-helpers
1312+ '%WrapForValidAsyncIteratorPrototype%' : {
1313+ '[[Proto]]' : '%AsyncIteratorPrototype%' ,
1314+ next : fn ,
1315+ return : fn ,
1316+ } ,
1317+
1318+ // https://github.com/tc39/proposal-async-iterator-helpers
1319+ '%AsyncIteratorHelperPrototype%' : {
1320+ '[[Proto]]' : 'Async%IteratorPrototype%' ,
1321+ next : fn ,
1322+ return : fn ,
1323+ '@@toStringTag' : 'string' ,
12441324 } ,
12451325
12461326 '%InertGeneratorFunction%' : {
0 commit comments