| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0784578 commit 7ee31b0
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,9 @@ const { | |||
| 31 | 31 | ArrayPrototype, | |
| 32 | 32 | ArrayPrototypeForEach, | |
| 33 | 33 | ArrayPrototypePush, | |
| 34 | + AsyncFunctionPrototype, | ||
| 35 | + AsyncGeneratorFunctionPrototype, | ||
| 36 | + AsyncGeneratorFunctionPrototypePrototype, | ||
| 34 | 37 | AsyncIteratorPrototype, | |
| 35 | 38 | Atomics, | |
| 36 | 39 | BigInt, | |
@@ -57,14 +60,19 @@ const { | |||
| 57 | 60 | Float64ArrayPrototype, | |
| 58 | 61 | Function, | |
| 59 | 62 | FunctionPrototype, | |
| 63 | + GeneratorFunctionPrototype, | ||
| 64 | + GeneratorFunctionPrototypePrototype, | ||
| 60 | 65 | Int16Array, | |
| 61 | 66 | Int16ArrayPrototype, | |
| 62 | 67 | Int32Array, | |
| 63 | 68 | Int32ArrayPrototype, | |
| 64 | 69 | Int8Array, | |
| 65 | 70 | Int8ArrayPrototype, | |
| 71 | + Iterator, | ||
| 72 | + IteratorHelperPrototype, | ||
| 66 | 73 | IteratorPrototype, | |
| 67 | 74 | Map, | |
| 75 | + MapIteratorPrototype, | ||
| 68 | 76 | MapPrototype, | |
| 69 | 77 | Number, | |
| 70 | 78 | NumberPrototype, | |
@@ -88,15 +96,15 @@ const { | |||
| 88 | 96 | ReflectOwnKeys, | |
| 89 | 97 | RegExp, | |
| 90 | 98 | RegExpPrototype, | |
| 99 | + RegExpStringIteratorPrototype, | ||
| 91 | 100 | SafeSet, | |
| 92 | 101 | Set, | |
| 102 | + SetIteratorPrototype, | ||
| 93 | 103 | SetPrototype, | |
| 94 | 104 | String, | |
| 95 | 105 | StringIteratorPrototype, | |
| 96 | 106 | StringPrototype, | |
| 97 | 107 | Symbol, | |
| 98 | - SymbolIterator, | ||
| 99 | - SymbolMatchAll, | ||
| 100 | 108 | SymbolPrototype, | |
| 101 | 109 | SyntaxError, | |
| 102 | 110 | SyntaxErrorPrototype, | |
@@ -120,6 +128,7 @@ const { | |||
| 120 | 128 | WeakRefPrototype, | |
| 121 | 129 | WeakSet, | |
| 122 | 130 | WeakSetPrototype, | |
| 131 | + WrapForValidIteratorPrototype, | ||
| 123 | 132 | decodeURI, | |
| 124 | 133 | decodeURIComponent, | |
| 125 | 134 | encodeURI, | |
@@ -173,8 +182,7 @@ module.exports = function() { | |||
| 173 | 182 | StringPrototype, // 22.1 | |
| 174 | 183 | StringIteratorPrototype, // 22.1.5 | |
| 175 | 184 | RegExpPrototype, // 22.2 | |
| 176 | - // 22.2.7 RegExpStringIteratorPrototype | ||
| 177 | - ObjectGetPrototypeOf(/e/[SymbolMatchAll]()), | ||
| 185 | + RegExpStringIteratorPrototype, // 22.2.9 | ||
| 178 | 186 | ||
| 179 | 187 | // 23 Indexed Collections | |
| 180 | 188 | ArrayPrototype, // 23.1 | |
@@ -195,11 +203,9 @@ module.exports = function() { | |||
| 195 | 203 | ||
| 196 | 204 | // 24 Keyed Collections | |
| 197 | 205 | MapPrototype, // 24.1 | |
| 198 | - // 24.1.5 MapIteratorPrototype | ||
| 199 | - ObjectGetPrototypeOf(new Map()[SymbolIterator]()), | ||
| 206 | + MapIteratorPrototype, // 24.1.5 | ||
| 200 | 207 | SetPrototype, // 24.2 | |
| 201 | - // 24.2.5 SetIteratorPrototype | ||
| 202 | - ObjectGetPrototypeOf(new Set()[SymbolIterator]()), | ||
| 208 | + SetIteratorPrototype, // 24.2.6 | ||
| 203 | 209 | WeakMapPrototype, // 24.3 | |
| 204 | 210 | WeakSetPrototype, // 24.4 | |
| 205 | 211 | ||
@@ -212,10 +218,18 @@ module.exports = function() { | |||
| 212 | 218 | FinalizationRegistryPrototype, // 26.2 | |
| 213 | 219 | ||
| 214 | 220 | // 27 Control Abstraction Objects | |
| 215 | - // 27.1 Iteration | ||
| 216 | - IteratorPrototype, // 27.1.2 IteratorPrototype | ||
| 217 | - AsyncIteratorPrototype, // 27.1.3 AsyncIteratorPrototype | ||
| 221 | + IteratorHelperPrototype, // 27.1.2 | ||
| 222 | + IteratorPrototype, // 27.1.3 | ||
| 223 | + WrapForValidIteratorPrototype, // 27.1.3.2.2.1 | ||
| 224 | + AsyncIteratorPrototype, // 27.1.4 | ||
| 218 | 225 | PromisePrototype, // 27.2 | |
| 226 | + GeneratorFunctionPrototype, // 27.3 | ||
| 227 | + AsyncGeneratorFunctionPrototype, // 27.4 | ||
| 228 | + // 27.5 GeneratorPrototype | ||
| 229 | + GeneratorFunctionPrototypePrototype, | ||
| 230 | + // 27.6 AsyncGeneratorPrototype | ||
| 231 | + AsyncGeneratorFunctionPrototypePrototype, | ||
| 232 | + AsyncFunctionPrototype, // 27.7 | ||
| 219 | 233 | ||
| 220 | 234 | // Other APIs / Web Compatibility | |
| 221 | 235 | Console.prototype, | |
@@ -268,8 +282,7 @@ module.exports = function() { | |||
| 268 | 282 | String, // 22.1 | |
| 269 | 283 | StringIteratorPrototype, // 22.1.5 | |
| 270 | 284 | RegExp, // 22.2 | |
| 271 | - // 22.2.7 RegExpStringIteratorPrototype | ||
| 272 | - ObjectGetPrototypeOf(/e/[SymbolMatchAll]()), | ||
| 285 | + RegExpStringIteratorPrototype, // 22.2.9 | ||
| 273 | 286 | ||
| 274 | 287 | // 23 Indexed Collections | |
| 275 | 288 | Array, // 23.1 | |
@@ -290,11 +303,9 @@ module.exports = function() { | |||
| 290 | 303 | ||
| 291 | 304 | // 24 Keyed Collections | |
| 292 | 305 | Map, // 24.1 | |
| 293 | - // 24.1.5 MapIteratorPrototype | ||
| 294 | - ObjectGetPrototypeOf(new Map()[SymbolIterator]()), | ||
| 306 | + MapIteratorPrototype, // 24.1.5 | ||
| 295 | 307 | Set, // 24.2 | |
| 296 | - // 24.2.5 SetIteratorPrototype | ||
| 297 | - ObjectGetPrototypeOf(new Set()[SymbolIterator]()), | ||
| 308 | + SetIteratorPrototype, // 24.2.6 | ||
| 298 | 309 | WeakMap, // 24.3 | |
| 299 | 310 | WeakSet, // 24.4 | |
| 300 | 311 | ||
@@ -310,19 +321,19 @@ module.exports = function() { | |||
| 310 | 321 | FinalizationRegistry, // 26.2 | |
| 311 | 322 | ||
| 312 | 323 | // 27 Control Abstraction Objects | |
| 313 | - // 27.1 Iteration | ||
| 314 | - ObjectGetPrototypeOf(ArrayIteratorPrototype), // 27.1.2 IteratorPrototype | ||
| 315 | - // 27.1.3 AsyncIteratorPrototype | ||
| 316 | - ObjectGetPrototypeOf(ObjectGetPrototypeOf(ObjectGetPrototypeOf( | ||
| 317 | - (async function*() {})(), | ||
| 318 | - ))), | ||
| 324 | + IteratorHelperPrototype, // 27.1.2 | ||
| 325 | + Iterator, // 27.1.3 | ||
| 326 | + WrapForValidIteratorPrototype, // 27.1.3.2.2.1 | ||
| 327 | + ArrayIteratorPrototype, // 27.1.4 | ||
| 319 | 328 | Promise, // 27.2 | |
| 320 | 329 | // 27.3 GeneratorFunction | |
| 321 | - ObjectGetPrototypeOf(function* () {}), | ||
| 330 | + // 27.5 Generator | ||
| 331 | + GeneratorFunctionPrototype, | ||
| 322 | 332 | // 27.4 AsyncGeneratorFunction | |
| 323 | - ObjectGetPrototypeOf(async function* () {}), | ||
| 333 | + // 27.6 AsyncGenerator | ||
| 334 | + AsyncGeneratorFunctionPrototype, | ||
| 324 | 335 | // 27.7 AsyncFunction | |
| 325 | - ObjectGetPrototypeOf(async function() {}), | ||
| 336 | + AsyncFunctionPrototype, | ||
| 326 | 337 | ||
| 327 | 338 | // 28 Reflection | |
| 328 | 339 | // eslint-disable-next-line node-core/prefer-primordials | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -263,10 +263,22 @@ function copyPrototype(src, dest, prefix) { | |||
| 263 | 263 | name: 'ArrayIteratorPrototype', | |
| 264 | 264 | original: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), | |
| 265 | 265 | }, | |
| 266 | + { | ||
| 267 | + name: 'AsyncFunctionPrototype', | ||
| 268 | + original: Reflect.getPrototypeOf(async function() {}), | ||
| 269 | + }, | ||
| 270 | + { | ||
| 271 | + name: 'AsyncGeneratorFunctionPrototype', | ||
| 272 | + original: Reflect.getPrototypeOf(async function*() {}), | ||
| 273 | + }, | ||
| 266 | 274 | { | |
| 267 | 275 | name: 'AsyncIteratorPrototype', | |
| 268 | 276 | original: Reflect.getPrototypeOf(Reflect.getPrototypeOf(async function*() {}).prototype), | |
| 269 | 277 | }, | |
| 278 | + { | ||
| 279 | + name: 'GeneratorFunctionPrototype', | ||
| 280 | + original: Reflect.getPrototypeOf(function*() {}), | ||
| 281 | + }, | ||
| 270 | 282 | { | |
| 271 | 283 | name: 'IteratorHelperPrototype', | |
| 272 | 284 | original: Reflect.getPrototypeOf(primordials.IteratorPrototypeDrop({ __proto__: null }, null)), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -561,7 +561,10 @@ declare namespace primordials { | |||
| 561 | 561 | export const IteratorPrototypeSymbolIterator: UncurryMethod<typeof Iterator.prototype, typeof Symbol.iterator> | |
| 562 | 562 | export const ArrayIteratorPrototype: ReturnType<typeof Array.prototype[typeof Symbol.iterator]> | |
| 563 | 563 | export const ArrayIteratorPrototypeNext: UncurryThis<typeof ArrayIteratorPrototype.next> | |
| 564 | + export const AsyncFunctionPrototype: Function | ||
| 565 | + export const AsyncGeneratorFunctionPrototype: Function | ||
| 564 | 566 | export const AsyncIteratorPrototype: AsyncIterable<any> | |
| 567 | + export const GeneratorFunctionPrototype: Function | ||
| 565 | 568 | export const IteratorHelperPrototype: ReturnType<typeof Iterator.prototype.drop> | |
| 566 | 569 | export const MapIteratorPrototype: ReturnType<typeof Map.prototype[typeof Symbol.iterator]> | |
| 567 | 570 | export const MapIteratorPrototypeNext: UncurryThis<typeof MapIteratorPrototype.next> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments