DescriptionES6 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/
R=mstarzinger@chromium.org
BUG=
Committed: http://code.google.com/p/v8/source/detail?r=13783
Patch Set 1 #
Total comments: 4
Patch Set 2 : Addressed comments #
Messages
Total messages: 3 (0 generated)
|