[es6] Implement Date.prototype[@@toPrimitive] as C++ builtin.
authorbmeurer <bmeurer@chromium.org>
Mon, 31 Aug 2015 12:52:59 +0000 (05:52 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 31 Aug 2015 12:53:10 +0000 (12:53 +0000)
commit3c164506f566ad99016f80c21caa56c060e3e262
tree2fcc9a016ab6cc7733b7ff6db502addbfd99c8c4
parent89fd5b09c908537dd7775a9916ff0e6c7da7b568
[es6] Implement Date.prototype[@@toPrimitive] as C++ builtin.

This way we don't need to expose JSReceiver::OrdinaryToPrimitive
as runtime function, and we don't need the separate JS trampoline.

This also adds tests for ToPrimitive on date objects, which are
special.

R=mstarzinger@chromium.org
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30473}
13 files changed:
src/bootstrapper.cc
src/builtins.cc
src/builtins.h
src/compiler/linkage.cc
src/date.js
src/objects.cc
src/objects.h
src/runtime/runtime-object.cc
src/runtime/runtime.h
test/mjsunit/harmony/to-name.js
test/mjsunit/harmony/to-number.js
test/mjsunit/harmony/to-primitive.js
test/mjsunit/harmony/to-string.js