| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7f4af55 commit 823efe8
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, | |
@@ -172,8 +181,7 @@ module.exports = function() { | |||
| 172 | 181 | StringPrototype, // 22.1 | |
| 173 | 182 | StringIteratorPrototype, // 22.1.5 | |
| 174 | 183 | RegExpPrototype, // 22.2 | |
| 175 | - // 22.2.7 RegExpStringIteratorPrototype | ||
| 176 | - ObjectGetPrototypeOf(/e/[SymbolMatchAll]()), | ||
| 184 | + RegExpStringIteratorPrototype, // 22.2.9 | ||
| 177 | 185 | ||
| 178 | 186 | // 23 Indexed Collections | |
| 179 | 187 | ArrayPrototype, // 23.1 | |
@@ -194,11 +202,9 @@ module.exports = function() { | |||
| 194 | 202 | ||
| 195 | 203 | // 24 Keyed Collections | |
| 196 | 204 | MapPrototype, // 24.1 | |
| 197 | - // 24.1.5 MapIteratorPrototype | ||
| 198 | - ObjectGetPrototypeOf(new Map()[SymbolIterator]()), | ||
| 205 | + MapIteratorPrototype, // 24.1.5 | ||
| 199 | 206 | SetPrototype, // 24.2 | |
| 200 | - // 24.2.5 SetIteratorPrototype | ||
| 201 | - ObjectGetPrototypeOf(new Set()[SymbolIterator]()), | ||
| 207 | + SetIteratorPrototype, // 24.2.6 | ||
| 202 | 208 | WeakMapPrototype, // 24.3 | |
| 203 | 209 | WeakSetPrototype, // 24.4 | |
| 204 | 210 | ||
@@ -211,10 +217,18 @@ module.exports = function() { | |||
| 211 | 217 | FinalizationRegistryPrototype, // 26.2 | |
| 212 | 218 | ||
| 213 | 219 | // 27 Control Abstraction Objects | |
| 214 | - // 27.1 Iteration | ||
| 215 | - IteratorPrototype, // 27.1.2 IteratorPrototype | ||
| 216 | - AsyncIteratorPrototype, // 27.1.3 AsyncIteratorPrototype | ||
| 220 | + IteratorHelperPrototype, // 27.1.2 | ||
| 221 | + IteratorPrototype, // 27.1.3 | ||
| 222 | + WrapForValidIteratorPrototype, // 27.1.3.2.2.1 | ||
| 223 | + AsyncIteratorPrototype, // 27.1.4 | ||
| 217 | 224 | PromisePrototype, // 27.2 | |
| 225 | + GeneratorFunctionPrototype, // 27.3 | ||
| 226 | + AsyncGeneratorFunctionPrototype, // 27.4 | ||
| 227 | + // 27.5 GeneratorPrototype | ||
| 228 | + GeneratorFunctionPrototypePrototype, | ||
| 229 | + // 27.6 AsyncGeneratorPrototype | ||
| 230 | + AsyncGeneratorFunctionPrototypePrototype, | ||
| 231 | + AsyncFunctionPrototype, // 27.7 | ||
| 218 | 232 | ||
| 219 | 233 | // Other APIs / Web Compatibility | |
| 220 | 234 | Console.prototype, | |
@@ -267,8 +281,7 @@ module.exports = function() { | |||
| 267 | 281 | String, // 22.1 | |
| 268 | 282 | StringIteratorPrototype, // 22.1.5 | |
| 269 | 283 | RegExp, // 22.2 | |
| 270 | - // 22.2.7 RegExpStringIteratorPrototype | ||
| 271 | - ObjectGetPrototypeOf(/e/[SymbolMatchAll]()), | ||
| 284 | + RegExpStringIteratorPrototype, // 22.2.9 | ||
| 272 | 285 | ||
| 273 | 286 | // 23 Indexed Collections | |
| 274 | 287 | Array, // 23.1 | |
@@ -289,11 +302,9 @@ module.exports = function() { | |||
| 289 | 302 | ||
| 290 | 303 | // 24 Keyed Collections | |
| 291 | 304 | Map, // 24.1 | |
| 292 | - // 24.1.5 MapIteratorPrototype | ||
| 293 | - ObjectGetPrototypeOf(new Map()[SymbolIterator]()), | ||
| 305 | + MapIteratorPrototype, // 24.1.5 | ||
| 294 | 306 | Set, // 24.2 | |
| 295 | - // 24.2.5 SetIteratorPrototype | ||
| 296 | - ObjectGetPrototypeOf(new Set()[SymbolIterator]()), | ||
| 307 | + SetIteratorPrototype, // 24.2.6 | ||
| 297 | 308 | WeakMap, // 24.3 | |
| 298 | 309 | WeakSet, // 24.4 | |
| 299 | 310 | ||
@@ -309,19 +320,19 @@ module.exports = function() { | |||
| 309 | 320 | FinalizationRegistry, // 26.2 | |
| 310 | 321 | ||
| 311 | 322 | // 27 Control Abstraction Objects | |
| 312 | - // 27.1 Iteration | ||
| 313 | - ObjectGetPrototypeOf(ArrayIteratorPrototype), // 27.1.2 IteratorPrototype | ||
| 314 | - // 27.1.3 AsyncIteratorPrototype | ||
| 315 | - ObjectGetPrototypeOf(ObjectGetPrototypeOf(ObjectGetPrototypeOf( | ||
| 316 | - (async function*() {})(), | ||
| 317 | - ))), | ||
| 323 | + IteratorHelperPrototype, // 27.1.2 | ||
| 324 | + Iterator, // 27.1.3 | ||
| 325 | + WrapForValidIteratorPrototype, // 27.1.3.2.2.1 | ||
| 326 | + ArrayIteratorPrototype, // 27.1.4 | ||
| 318 | 327 | Promise, // 27.2 | |
| 319 | 328 | // 27.3 GeneratorFunction | |
| 320 | - ObjectGetPrototypeOf(function* () {}), | ||
| 329 | + // 27.5 Generator | ||
| 330 | + GeneratorFunctionPrototype, | ||
| 321 | 331 | // 27.4 AsyncGeneratorFunction | |
| 322 | - ObjectGetPrototypeOf(async function* () {}), | ||
| 332 | + // 27.6 AsyncGenerator | ||
| 333 | + AsyncGeneratorFunctionPrototype, | ||
| 323 | 334 | // 27.7 AsyncFunction | |
| 324 | - ObjectGetPrototypeOf(async function() {}), | ||
| 335 | + AsyncFunctionPrototype, | ||
| 325 | 336 | ||
| 326 | 337 | // 28 Reflection | |
| 327 | 338 | // 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