[stubs] Unify (and optimize) implementation of ToObject.
authorbmeurer <bmeurer@chromium.org>
Fri, 31 Jul 2015 12:25:28 +0000 (05:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 31 Jul 2015 12:25:44 +0000 (12:25 +0000)
commit4fc6f5472441523c1a46d0d273ba8b216f96250f
treed986f89fa05d3ea6aa446a2b2fa638636daee98c
parentf8a4afa7bdc6304946e5ed63a196db6e84fd7755
[stubs] Unify (and optimize) implementation of ToObject.

This is the initial (big) step towards a more uniform implementation of
the ToObject abstract operation (ES6 7.1.13), where we have a fallback
implementation in JSReceiver::ToObject() and a fast (hydrogen) CodeStub
to deal with the fast case (we should be able to do more cleanup on this
in a followup CL).  For natives we expose the abstract operation via a
%_ToObject intrinsic, also exposed via a macro TO_OBJECT, that unifies
the previous confusion with TO_OBJECT_INLINE, ToObject, TO_OBJECT,
$toObject and %$toObject.  Now the whole implementation of the abstract
operation is context independent, meaning we don't need any magic in the
builtins object nor the native context.

R=mvstanton@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29953}
72 files changed:
include/v8.h
src/arm/builtins-arm.cc
src/arm/code-stubs-arm.cc
src/arm/interface-descriptors-arm.cc
src/arm64/builtins-arm64.cc
src/arm64/code-stubs-arm64.cc
src/arm64/interface-descriptors-arm64.cc
src/array-iterator.js
src/array.js
src/bootstrapper.cc
src/builtins.h
src/code-factory.cc
src/code-factory.h
src/code-stubs-hydrogen.cc
src/code-stubs.cc
src/code-stubs.h
src/collection.js
src/compiler/js-generic-lowering.cc
src/compiler/js-intrinsic-lowering.cc
src/compiler/js-intrinsic-lowering.h
src/compiler/linkage.cc
src/compiler/typer.cc
src/contexts.h
src/date.js
src/deoptimizer.h
src/execution.cc
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/harmony-array-includes.js
src/harmony-array.js
src/harmony-object.js
src/hydrogen.cc
src/hydrogen.h
src/i18n.js
src/ia32/builtins-ia32.cc
src/ia32/code-stubs-ia32.cc
src/ia32/interface-descriptors-ia32.cc
src/interface-descriptors.cc
src/interface-descriptors.h
src/macros.py
src/messages.js
src/mips/builtins-mips.cc
src/mips/code-stubs-mips.cc
src/mips/interface-descriptors-mips.cc
src/mips64/builtins-mips64.cc
src/mips64/code-stubs-mips64.cc
src/mips64/interface-descriptors-mips64.cc
src/ppc/builtins-ppc.cc
src/ppc/code-stubs-ppc.cc
src/ppc/interface-descriptors-ppc.cc
src/runtime.js
src/runtime/runtime-object.cc
src/runtime/runtime-simd.cc
src/runtime/runtime-symbol.cc
src/runtime/runtime.h
src/string-iterator.js
src/string.js
src/symbol.js
src/v8natives.js
src/x64/builtins-x64.cc
src/x64/code-stubs-x64.cc
src/x64/interface-descriptors-x64.cc
src/x87/builtins-x87.cc
src/x87/code-stubs-x87.cc
src/x87/interface-descriptors-x87.cc