[Webkit-unassigned] [Bug 142424] New: ES6: Iterator toString names should consistent
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 6 18:16:53 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=142424
Bug ID: 142424
Summary: ES6: Iterator toString names should consistent
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: joepeck at webkit.org
CC: ggaren at apple.com, utatane.tea at gmail.com
* SUMMARY
Iterator Object Names in the spec right now have spaces. In our implementation some do and some don't.
* TEST
js> "string"[Symbol.iterator]().toString()
<- "[object StringIterator]"
js> (new Map).entries().toString()
<- "[object Map Iterator]"
We have Map/Set with spaces, but String/Array without spaces. Also, I don't know what would be expected of "ArgumentsIterator" given it is an internal type.
* SPEC
> 21.1.5.2.2 %StringIteratorPrototype% [ @@toStringTag ]
> The initial value of the @@toStringTag property is the string value "String Iterator".
>
> 22.1.5.2.2 %ArrayIteratorPrototype% [ @@toStringTag ]
> The initial value of the @@toStringTag property is the string value "Array Iterator".
>
> 23.1.5.2.2 %MapIteratorPrototype% [ @@toStringTag ]
> The initial value of the @@toStringTag property is the string value "Map Iterator".
>
> 23.2.5.2.2 %SetIteratorPrototype% [ @@toStringTag ]
> The initial value of the @@toStringTag property is the string value "Set Iterator".
I think it is weird to have spaces. The spec defines "GeneratorFunction" without a space.
Maybe this is something that should change in the spec or be discussed.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150307/580730d4/attachment-0002.html>
More information about the webkit-unassigned
mailing list