On 2014/03/22 17:15:49, arv wrote:
I'm not sure that we should install Symbol.x if we do not support x, where x
is
a certain feature. For example, one might expect us to support @@create
because
we have Symbol.create. I think adding these once we support the feature would
allow code to use feature detection.

I agree. But not having them would make testing the underlying machinery that this CL introduces somewhat difficult. I consider disabling them before we ship
symbols.

There are some details that need more work and expanded tests.

Addressed in new CL: https://codereview.chromium.org/208423013


https://codereview.chromium.org/203243004/diff/50010/src/symbol.js
File src/symbol.js (right):

https://codereview.chromium.org/203243004/diff/50010/src/symbol.js#newcode68
src/symbol.js:68: if (!('internal' in registry)) {
Maybe this could have been

if (IS_UNDEFINED(registry.internal)) {

since the in operator is slow.

https://codereview.chromium.org/203243004/diff/50010/src/symbol.js#newcode121
src/symbol.js:121: var symbolCreate = InternalSymbol("@@create");
Doesn't '@' in a property name cause the object to become slow?

The [[Description]] should be "Symbol.create".

http://people.mozilla.org/%7Ejorendorff/es6-draft.html#sec-well-known-symbols

https://codereview.chromium.org/203243004/diff/50010/src/symbol.js#newcode138
src/symbol.js:138: %SetProperty($Symbol, "create", symbolCreate, DONT_ENUM);
Also, non writable, non configurable.

http://people.mozilla.org/%7Ejorendorff/es6-draft.html#sec-symbol.create


https://codereview.chromium.org/203243004/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to