Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Encode IteratorPrototypes as Intrinsic Names
Browse files Browse the repository at this point in the history
Kind of abusing the intrinsic string name here but that's ok.
  • Loading branch information
sebmarkbage committed May 9, 2017
1 parent b3804b5 commit b548ce1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/intrinsics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ export function initialize(i: Intrinsics, realm: Realm): Intrinsics {
i.Uint32ArrayPrototype = new ObjectValue(realm, i.ObjectPrototype, "Uint32Array.prototype");

// iterator prototypes
i.IteratorPrototype = new ObjectValue(realm, i.ObjectPrototype, "IteratorPrototype");
i.MapIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "MapIteratorPrototype");
i.SetIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "SetIteratorPrototype");
i.ArrayIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "ArrayIteratorPrototype");
i.StringIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "StringIteratorPrototype");
i.IteratorPrototype = new ObjectValue(realm, i.ObjectPrototype, "([][Symbol.iterator]().__proto__.__proto__)");
i.MapIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "(new Map()[Symbol.iterator]().__proto__)");
i.SetIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "(new Set()[Symbol.iterator]().__proto__)");
i.ArrayIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "([][Symbol.iterator]().__proto__)");
i.StringIteratorPrototype = new ObjectValue(realm, i.IteratorPrototype, "(\"\"[Symbol.iterator]().__proto__)");

//
initializeObjectPrototype(realm, i.ObjectPrototype);
Expand Down

0 comments on commit b548ce1

Please sign in to comment.