[es6] Introduce %ToInteger and %ToLength.
authorbmeurer <bmeurer@chromium.org>
Tue, 29 Sep 2015 07:41:03 +0000 (00:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 29 Sep 2015 07:41:13 +0000 (07:41 +0000)
commit93b2b2622ba80d93d036b66736da1346c6e0638c
tree341c5135ff585fd0582654a058b332ef7fddcf9e
parent283981158449b36fa27eb5d4ad2a99734518b3c7
[es6] Introduce %ToInteger and %ToLength.

This adds ES6 compliant Object::ToInteger, Object::ToInt32,
Object::ToUint32 and Object::ToLength, and replaces the old
Execution wrappers of those abstract operations (which were
not using the correct ToPrimitive).

This also introduces proper %ToInteger and %ToLength runtime
entries, with a fast path %_ToInteger supported in fullcodegen
and Crankshaft (for now). Internal JavaScript code should use
TO_INTEGER and TO_LENGTH respectively.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30993}
33 files changed:
src/accessors.cc
src/api.cc
src/builtins.cc
src/compiler/linkage.cc
src/contexts.h
src/execution.cc
src/execution.h
src/full-codegen/arm/full-codegen-arm.cc
src/full-codegen/arm64/full-codegen-arm64.cc
src/full-codegen/full-codegen.h
src/full-codegen/ia32/full-codegen-ia32.cc
src/full-codegen/mips/full-codegen-mips.cc
src/full-codegen/mips64/full-codegen-mips64.cc
src/full-codegen/ppc/full-codegen-ppc.cc
src/full-codegen/x64/full-codegen-x64.cc
src/full-codegen/x87/full-codegen-x87.cc
src/globals.h
src/harmony-array-includes.js
src/harmony-array.js
src/harmony-atomics.js
src/hydrogen.cc
src/hydrogen.h
src/json.js
src/macros.py
src/object-observe.js
src/objects.cc
src/objects.h
src/runtime.js
src/runtime/runtime-numbers.cc
src/runtime/runtime-object.cc
src/runtime/runtime.h
src/string.js
src/typedarray.js