|
ES6 symbols: Implement Symbol intrinsic and basic functionality
- Add --harmony-symbols flag.
- Add Symbol constructor; allow symbols as (unreplaced) return value from constructors.
- Introduce %CreateSymbol and %_IsSymbol natives and respective instructions.
- Extend 'typeof' code generation to handle symbols.
- Extend CompareIC with a UNIQUE_NAMES state that (uniformly) handles internalized strings and symbols.
- Property lookup delegates to SymbolDelegate object for symbols, which only carries the toString method.
- Extend Object.prototype.toString to recognise symbols.
Per the current draft spec, symbols are actually pseudo objects that are frozen with a null prototype and only one property (toString). For simplicity, we do not treat them as proper objects for now, although typeof will return "object". Only property access works as if they were (frozen) objects (via the internal delegate object).
(Baseline CL: https://codereview.chromium.org/12223071/)
R=mstarzinger@chromium.org
BUG= v8:2158
Committed: http://code.google.com/p/v8/source/detail?r=13786
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+562 lines, -49 lines) |
Patch |
|
M |
src/SConscript
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/builtins-arm.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
src/arm/code-stubs-arm.cc
|
View
|
|
1 chunk |
+51 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/full-codegen-arm.cc
|
View
|
|
2 chunks |
+26 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.cc
|
View
|
|
1 chunk |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/arm/stub-cache-arm.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/bootstrapper.cc
|
View
|
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.h
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/contexts.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
2
3
|
2 chunks |
+23 lines, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/builtins-ia32.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/code-stubs-ia32.cc
|
View
|
|
1 chunk |
+57 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
|
3 chunks |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/stub-cache-ia32.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ic.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/ic.cc
|
View
|
|
6 chunks |
+19 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/ic-inl.h
|
View
|
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/macros.py
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
3 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
3
|
5 chunks |
+17 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
1
2
3
|
2 chunks |
+10 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/runtime.h
|
View
|
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
1
2
3
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/stub-cache.cc
|
View
|
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
A + |
src/symbol.js
|
View
|
|
1 chunk |
+9 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/type-info.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/v8globals.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/v8natives.js
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/x64/builtins-x64.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/code-stubs-x64.cc
|
View
|
|
1 chunk |
+55 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
|
2 chunks |
+26 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
|
M |
src/x64/stub-cache-x64.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/symbols.js
|
View
|
1
2
3
|
1 chunk |
+127 lines, -0 lines |
0 comments
|
Download
|
|
M |
tools/gyp/v8.gyp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|