[builtins] Add support for NewTarget to Execution::New.
authorbmeurer <bmeurer@chromium.org>
Tue, 22 Sep 2015 04:27:14 +0000 (21:27 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 22 Sep 2015 04:27:28 +0000 (04:27 +0000)
commit1dfac69f1fb5ad8e2db2d5be591c094def55d451
treea4a2063c16905dddd34505138efd0d5455b50dbe
parent3d7c45371e26a3ca7b688ed73892cba44cb23c0d
[builtins] Add support for NewTarget to Execution::New.

Introduce new builtins Construct and ConstructFunction (in line
with the Call and CallFunction builtins that we already have) as
proper bottleneck for Construct and [[Construct]] on JSFunctions.
Use these builtins to support passing NewTarget from C++ to
JavaScript land.

Long-term we want the CallConstructStub to be used for
gathering feedback on entry to construction chain (i.e. the
initial new Foo), and use the Construct builtins to do the
actual work inside the construction chain (i.e. calling into
super and stuff).

MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.

R=jarin@chromium.org
BUG=v8:4430
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30857}
28 files changed:
src/arm/builtins-arm.cc
src/arm/code-stubs-arm.cc
src/arm64/builtins-arm64.cc
src/arm64/code-stubs-arm64.cc
src/arm64/macro-assembler-arm64.cc
src/arm64/macro-assembler-arm64.h
src/arm64/simulator-arm64.cc
src/arm64/simulator-arm64.h
src/builtins.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/ia32/full-codegen-ia32.cc
src/full-codegen/mips/full-codegen-mips.cc
src/full-codegen/mips64/full-codegen-mips64.cc
src/full-codegen/x64/full-codegen-x64.cc
src/globals.h
src/ia32/builtins-ia32.cc
src/ia32/code-stubs-ia32.cc
src/ia32/frames-ia32.h
src/mips/builtins-mips.cc
src/mips/code-stubs-mips.cc
src/mips64/builtins-mips64.cc
src/mips64/code-stubs-mips64.cc
src/runtime/runtime-classes.cc
src/x64/builtins-x64.cc
src/x64/code-stubs-x64.cc