PPC: [stubs] Simplify the non-function case of CallConstructStub.
authormbrandy <mbrandy@us.ibm.com>
Fri, 11 Sep 2015 15:07:42 +0000 (08:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 11 Sep 2015 15:07:53 +0000 (15:07 +0000)
commite7a3e2aae4270c7f368ea4172d98f03512f5aeab
tree8d8d03b09e2b6bace8fd65b2eb9b1d516e2da3fe
parent9fc4fc141fa1d1aa1a3ccb901518cdffa0d6d268
PPC: [stubs] Simplify the non-function case of CallConstructStub.

Port 622fa0ea21b3517b1feaed447c87e580bafac865

Original commit message:
    Currently we do this dance between the CallConstructStub, the
    CALL_* builtins and the %GetConstructorDelegate, %GetProxyTrap,
    and %Apply runtime functions for every [[Construct]] operation on
    non-function callables. This is complexity is unnecessary, and can
    be simplified to work without any JS builtin. This will also make it
    a lot easier to implement ES6 compliant [[Construct]] for proxies.

    Also sanitize the invariant for CallConstructStub, which up until now
    always restored the context itself, but that force us to always create
    another copy of all arguments in case of proxies and other callables,
    so we can relax that constraint by making the caller restore the context
    (this only affects fullcodegen, since the optimizing compilers already
    properly restore the context anyway).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30696}
src/full-codegen/ppc/full-codegen-ppc.cc
src/ppc/code-stubs-ppc.cc