Comment #5 on issue 4307 by [email protected]: Implement well-known
symbol `Symbol.toPrimitive`
https://code.google.com/p/v8/issues/detail?id=4307#c5
The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/f6c6d713b4a1bb94457571f9e627ce2dea531b68
commit f6c6d713b4a1bb94457571f9e627ce2dea531b68
Author: bmeurer <[email protected]>
Date: Fri Aug 28 09:21:23 2015
[es6] Implement spec compliant ToPrimitive in the runtime.
This is the first step towards a spec compliant ToPrimitive
implementation (and therefore spec compliant ToNumber, ToString,
ToName, and friends). It adds support for the @@toPrimitive
symbol that was introduced with ES2015, and also adds the new
Symbol.prototype[@@toPrimitive] and Date.prototype[@@toPrimitive]
initial properties.
There are now runtime functions for %ToPrimitive, %ToNumber and
%ToString, which do the right thing and should be used as fallbacks
instead of the hairy runtime.js implementations. I will do the
same for the other conversion operations mentioned by the spec in
follow up CLs. Once everything is in place we can look into
optimizing things further, so that we don't always call into the
runtime.
Also fixed Date.prototype.toJSON to be spec compliant.
[email protected], [email protected]
BUG=v8:4307
LOG=y
Review URL: https://codereview.chromium.org/1306303003
Cr-Commit-Position: refs/heads/master@{#30434}
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/accessors.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/api.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/arm/code-stubs-arm.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/arm64/code-stubs-arm64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/compiler/linkage.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/contexts.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/date.js
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/debug/debug.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/execution.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/execution.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/arm/full-codegen-arm.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/arm64/full-codegen-arm64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/ia32/full-codegen-ia32.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/mips/full-codegen-mips.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/mips64/full-codegen-mips64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/ppc/full-codegen-ppc.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/x64/full-codegen-x64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/full-codegen/x87/full-codegen-x87.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/heap/heap.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/ia32/code-stubs-ia32.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/json-stringifier.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/macros.py
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/messages.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/messages.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/mips/code-stubs-mips.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/mips64/code-stubs-mips64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/objects-inl.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/objects.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/objects.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/ppc/code-stubs-ppc.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime.js
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime/runtime-i18n.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime/runtime-numbers.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime/runtime-object.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime/runtime-scopes.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/runtime/runtime.h
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/symbol.js
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/x64/code-stubs-x64.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/src/x87/code-stubs-x87.cc
[modify]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/test/cctest/test-heap.cc
[add]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/test/mjsunit/harmony/to-number.js
[add]
http://crrev.com/f6c6d713b4a1bb94457571f9e627ce2dea531b68/test/mjsunit/harmony/to-primitive.js
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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/d/optout.