MIPS: ES6 symbols: Implement Symbol intrinsic and basic functionality
authorpalfia@homejinni.com <palfia@homejinni.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Mar 2013 00:42:59 +0000 (00:42 +0000)
committerpalfia@homejinni.com <palfia@homejinni.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Mar 2013 00:42:59 +0000 (00:42 +0000)
commitf4abb7afc6c3e1d93361e19ed1af62637d2d5df7
tree429f0ad93834bd36ac6cd0e4e5e3c3a284d85b6b
parent25acd805f5bcb51a4156855bdb443db117ac4f55
MIPS: ES6 symbols: Implement Symbol intrinsic and basic functionality

Port r13786 (b5e7a82a)

Original commit message:
- 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/)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/mips/builtins-mips.cc
src/mips/code-stubs-mips.cc
src/mips/full-codegen-mips.cc
src/mips/lithium-codegen-mips.cc
src/mips/stub-cache-mips.cc