v8/test
rossberg@chromium.org 0d34254f8d Upgrade Symbol implementation to match current ES6 behavior.
Refresh the implementation of Symbols to catch up with what the
specification now mandates:

* The global Symbol() function manufactures new Symbol values,
  optionally with a string description attached.

* Invoking Symbol() as a constructor will now throw.

* ToString() over Symbol values still throws, and
  Object.prototype.toString() stringifies like before.

* A Symbol value is wrapped in a Symbol object either implicitly if
  it is the receiver, or explicitly done via Object(symbolValue) or
  (new Object(symbolValue).)

* The Symbol.prototype.toString() method no longer throws on Symbol
  wrapper objects (nor Symbol values.) Ditto for Symbol.prototype.valueOf().

* Symbol.prototype.toString() stringifies as "Symbol("<description>"),
  valueOf() returns the wrapper's Symbol value.

* ToPrimitive() over Symbol wrapper objects now throws.

Overall, this provides a stricter separation between Symbol values and
wrapper objects than before, and the explicit fetching out of the
description (nee name) via the "name" property is no longer supported
(by the spec nor the implementation.)

Adjusted existing Symbol test files to fit current, adding some extra
tests for new/changed behavior.

LOG=N
R=arv@chromium.org, rossberg@chromium.org, arv, rossberg
BUG=v8:3053

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

Patch from Sigbjorn Finne <sigbjornf@opera.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 14:19:42 +00:00
..
benchmarks Merge experimental/a64 to bleeding_edge. 2014-02-12 09:19:30 +00:00
cctest Upgrade Symbol implementation to match current ES6 behavior. 2014-02-19 14:19:42 +00:00
intl Merge experimental/a64 to bleeding_edge. 2014-02-12 09:19:30 +00:00
message Clean up some A64 specific code in common code that was introduced by A64 merge 2014-02-12 13:27:13 +00:00
mjsunit Upgrade Symbol implementation to match current ES6 behavior. 2014-02-19 14:19:42 +00:00
mozilla A64: Let the MacroAssembler resolve branches to distant targets. 2014-02-18 13:15:32 +00:00
preparser Merge experimental/a64 to bleeding_edge. 2014-02-12 09:19:30 +00:00
test262 Merge experimental/a64 to bleeding_edge. 2014-02-12 09:19:30 +00:00
webkit Merge experimental/a64 to bleeding_edge. 2014-02-12 09:19:30 +00:00