Reviewers: Michael Starzinger,

Description:
ES6 symbols: Introduce Symbol class, along with abstract Name class

The new instance type 'Symbol' represents ES6 symbols (a.k.a. private/unique
names). Currently, symbols are simple data objects that only carry a hash code,
random-generated upon allocation.

The new type 'Name' now serves as the common super class for strings and
symbols, and is supposed to represent property names. We will eventually migrate
APIs from String to Name for the standard key type.

Strings and symbols share the same hash field representation, via the Name
class. This way, we should be able to use the same code paths for symbols and
internalized strings in most cases. Also, Symbol's instance type code is
allocated adjacent to internalized string codes in the enum, allowing a simple
range check for the common case.

Baseline CL: https://codereview.chromium.org/12210083/

[email protected]
BUG=


Please review this at https://codereview.chromium.org/12223071/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M include/v8.h
  M src/factory.h
  M src/factory.cc
  M src/heap.h
  M src/heap.cc
  M src/objects-debug.cc
  M src/objects-inl.h
  M src/objects-printer.cc
  M src/objects-visiting.cc
  M src/objects.h
  M src/objects.cc
  M test/cctest/SConscript
  M test/cctest/cctest.gyp
  A test/cctest/test-symbols.cc


--
--
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