@@ -461,7 +461,7 @@ case class Intrinsics(cfg: CFG) {
461461 typeName = " OrdinaryObject" ,
462462 imap = List (
463463 " Extensible" -> Bool (true ),
464- " Prototype" -> intrAddr(" IteratorPrototype " ),
464+ " Prototype" -> intrAddr(" Iterator.prototype " ),
465465 ),
466466 nmap = List (
467467 " %Symbol.toStringTag%" -> DataProperty (Str (" String Iterator" ), F , F , T ),
@@ -558,7 +558,7 @@ case class Intrinsics(cfg: CFG) {
558558 typeName = " OrdinaryObject" ,
559559 imap = List (
560560 " Extensible" -> Bool (true ),
561- " Prototype" -> intrAddr(" IteratorPrototype " ),
561+ " Prototype" -> intrAddr(" Iterator.prototype " ),
562562 ),
563563 nmap = List (
564564 " %Symbol.toStringTag%" -> DataProperty (Str (" Array Iterator" ), F , F , T ),
@@ -590,7 +590,7 @@ case class Intrinsics(cfg: CFG) {
590590 typeName = " OrdinaryObject" ,
591591 imap = List (
592592 " Extensible" -> Bool (true ),
593- " Prototype" -> intrAddr(" IteratorPrototype " ),
593+ " Prototype" -> intrAddr(" Iterator.prototype " ),
594594 ),
595595 nmap = List (
596596 " %Symbol.toStringTag%" -> DataProperty (Str (" Map Iterator" ), F , F , T ),
@@ -627,7 +627,7 @@ case class Intrinsics(cfg: CFG) {
627627 typeName = " OrdinaryObject" ,
628628 imap = List (
629629 " Extensible" -> Bool (true ),
630- " Prototype" -> intrAddr(" IteratorPrototype " ),
630+ " Prototype" -> intrAddr(" Iterator.prototype " ),
631631 ),
632632 nmap = List (
633633 " %Symbol.toStringTag%" -> DataProperty (Str (" Set Iterator" ), F , F , T ),
@@ -728,17 +728,31 @@ case class Intrinsics(cfg: CFG) {
728728 " %Symbol.toStringTag%" -> DataProperty (Str (" Map" ), F , F , T ),
729729 ),
730730 ),
731- " IteratorPrototype " -> Struct (
731+ " Iterator.prototype " -> Struct (
732732 typeName = " OrdinaryObject" ,
733733 imap = List (
734734 " Extensible" -> Bool (true ),
735735 " Prototype" -> intrAddr(" Object.prototype" ),
736736 ),
737+ nmap = List (
738+ " constructor" -> AccessorProperty (
739+ intrAddr(" get Iterator.prototype.constructor" ),
740+ intrAddr(" set Iterator.prototype.constructor" ),
741+ F ,
742+ T ,
743+ ),
744+ " %Symbol.toStringTag%" -> AccessorProperty (
745+ intrAddr(" get Iterator.prototype[%Symbol.toStringTag%]" ),
746+ intrAddr(" set Iterator.prototype[%Symbol.toStringTag%]" ),
747+ F ,
748+ T ,
749+ ),
750+ ),
737751 ),
738752 " ForInIteratorPrototype" -> Struct (
739753 typeName = " OrdinaryObject" ,
740754 imap = List (
741- " Prototype" -> intrAddr(" IteratorPrototype " ),
755+ " Prototype" -> intrAddr(" Iterator.prototype " ),
742756 ),
743757 ),
744758 " AsyncIteratorPrototype" -> Struct (
@@ -850,18 +864,18 @@ case class Intrinsics(cfg: CFG) {
850864 typeName = " OrdinaryObject" ,
851865 imap = List (
852866 " Extensible" -> Bool (true ),
853- " Prototype" -> intrAddr(" IteratorPrototype " ),
867+ " Prototype" -> intrAddr(" Iterator.prototype " ),
854868 ),
855869 nmap = List (
856870 " constructor" ->
857871 DataProperty (intrAddr(" GeneratorFunction.prototype" ), F , F , T ),
858872 // XXX need to be documented
859- " next" -> DataProperty (
860- intrAddr(" GeneratorPrototype.next" ),
861- T ,
862- F ,
863- T ,
864- ),
873+ // "next" -> DataProperty(
874+ // intrAddr("GeneratorPrototype.next"),
875+ // T,
876+ // F,
877+ // T,
878+ // ),
865879 " %Symbol.toStringTag%" -> DataProperty (Str (" Generator" ), F , F , T ),
866880 ),
867881 ),
@@ -956,6 +970,37 @@ case class Intrinsics(cfg: CFG) {
956970 " name" -> DataProperty (Str (" " ), F , F , F ),
957971 ),
958972 ),
973+ " Iterator" -> Struct (
974+ typeName = " BuiltinFunctionObject" ,
975+ imap = List (
976+ " Construct" -> clo(" Record[BuiltinFunctionObject].Construct" ),
977+ ),
978+ nmap = List (
979+ " prototype" -> DataProperty (
980+ intrAddr(" Iterator.prototype" ),
981+ F ,
982+ F ,
983+ F ,
984+ ),
985+ " %Symbol.toStringTag%" -> DataProperty (Str (" Iterator" ), F , F , T ),
986+ ),
987+ ),
988+ " IteratorHelperPrototype" -> Struct (
989+ typeName = " OrdinaryObject" ,
990+ imap = List (
991+ " Extensible" -> Bool (true ),
992+ " Prototype" -> intrAddr(" Iterator.prototype" ),
993+ ),
994+ nmap = List (
995+ " %Symbol.toStringTag%" -> DataProperty (Str (" Iterator Helper" ), F , F , T ),
996+ ),
997+ ),
998+ " WrapForValidIteratorPrototype" -> Struct (
999+ typeName = " OrdinaryObject" ,
1000+ imap = List (
1001+ " Prototype" -> intrAddr(" Iterator.prototype" ),
1002+ ),
1003+ ),
9591004 )
9601005
9611006 // error constructors
0 commit comments