Commented on some of them; I think we're not in sync here somehow on spec
reading.


https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js
File test/mjsunit/harmony/symbols.js (right):

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode75
test/mjsunit/harmony/symbols.js:75: assertSame(Function.prototype,
Symbol.prototype)
On 2014/01/08 17:52:25, rossberg wrote:
That seems wrong. Symbol.prototype is an ordinary object.

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-symbol-constructor
says it's Function.prototype.

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode78
test/mjsunit/harmony/symbols.js:78: assertSame(symbolPrototype,
Object(Symbol()).__proto__)
On 2014/01/08 17:52:25, rossberg wrote:
Is this different from Symbol.prototype? Why?

Yes, Object(Symbol()).__proto__ is the prototype of the wrapper object,
not Symbol.prototype.

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode81
test/mjsunit/harmony/symbols.js:81: assertSame(Function.prototype,
(Symbol()).__proto__)
On 2014/01/08 17:52:25, rossberg wrote:
And Symbol().__proto__ should be Symbol.prototype

Definitely not.

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode82
test/mjsunit/harmony/symbols.js:82: assertTrue(typeof
((Symbol()).prototype) === "undefined")
On 2014/01/08 17:52:25, rossberg wrote:
Not sure why this test is necessary.

Just testing that typeof over this .prototype is behaving like it does
for other primitive values.

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode91
test/mjsunit/harmony/symbols.js:91: assertFalse(Object ===
Symbol.prototype.constructor)
On 2014/01/08 17:52:25, rossberg wrote:
This should be true now.

No, I believe this is correct.

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode93
test/mjsunit/harmony/symbols.js:93: assertSame(Function,
Symbol.prototype.constructor)
On 2014/01/08 17:52:25, rossberg wrote:
This should be Object, not Function

Same; are we reading the same draft version of the spec?

https://codereview.chromium.org/118553003/diff/1/test/mjsunit/harmony/symbols.js#newcode205
test/mjsunit/harmony/symbols.js:205: assertEquals(symbols[i],
Object(symbols[i]).valueOf())
On 2014/01/08 17:52:25, rossberg wrote:
Why is Object() needed?

To test that the wrapper object's valueOf() returns the same symbol
value.

https://codereview.chromium.org/118553003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to