X87: [stubs] Simplify the non-function case of CallConstructStub.
authorchunyang.dai <chunyang.dai@intel.com>
Tue, 15 Sep 2015 11:26:51 +0000 (04:26 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 15 Sep 2015 11:27:06 +0000 (11:27 +0000)
commitec2f11c577c6e804a822f5af7a1e2e9837340068
treef7d96b168ac0e9808ea5b43f15dcceb8f0a7acaf
parent1b8610088cf46fb031638005c7933cdef71cf1f7
X87: [stubs] Simplify the non-function case of CallConstructStub.

port 622fa0ea21b3517b1feaed447c87e580bafac865 (r30691).

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).

BUG=

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

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