• mbrandy's avatar
    PPC: Handle the case when derived constructor is [[Call]]ed with 0 args. · c7e02041
    mbrandy authored
    Port cf53fed9
    
    Original commit message:
    ArgumentsAdaptorStub for derived constructor (the one that needs
    new.target) works in this way:
     - If the constructor is invoked via the Construct stub, we know that
       actual arguments always include new.target. ``arguments`` object
       however should not include a new.target, therefore we remove it.
       We achieve this by decrementing the argument count.
     - If the constructor is invoked as a call, we do not care for a correct
       ``arguments`` array since the constructor will immediately throw on
       entrance.
    The bug is that the call could actually pass 0 actual arguments, but I
    decrement unconditionally :(. The fix is to detect this case and avoid
    decrementing. ``arguments`` is bogus, but it is ok as constructor
    throws.
    
    Long-term we should just remove mucking about with arguments for
    new.target and just get it from the stack.
    
    R=dslomov@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
    BUG=
    
    Review URL: https://codereview.chromium.org/1125223002
    
    Cr-Commit-Position: refs/heads/master@{#28269}
    c7e02041
Name
Last commit
Last update
..
OWNERS Loading commit data...
assembler-ppc-inl.h Loading commit data...
assembler-ppc.cc Loading commit data...
assembler-ppc.h Loading commit data...
builtins-ppc.cc Loading commit data...
code-stubs-ppc.cc Loading commit data...
code-stubs-ppc.h Loading commit data...
codegen-ppc.cc Loading commit data...
codegen-ppc.h Loading commit data...
constants-ppc.cc Loading commit data...
constants-ppc.h Loading commit data...
cpu-ppc.cc Loading commit data...
debug-ppc.cc Loading commit data...
deoptimizer-ppc.cc Loading commit data...
disasm-ppc.cc Loading commit data...
frames-ppc.cc Loading commit data...
frames-ppc.h Loading commit data...
full-codegen-ppc.cc Loading commit data...
interface-descriptors-ppc.cc Loading commit data...
lithium-codegen-ppc.cc Loading commit data...
lithium-codegen-ppc.h Loading commit data...
lithium-gap-resolver-ppc.cc Loading commit data...
lithium-gap-resolver-ppc.h Loading commit data...
lithium-ppc.cc Loading commit data...
lithium-ppc.h Loading commit data...
macro-assembler-ppc.cc Loading commit data...
macro-assembler-ppc.h Loading commit data...
regexp-macro-assembler-ppc.cc Loading commit data...
regexp-macro-assembler-ppc.h Loading commit data...
simulator-ppc.cc Loading commit data...
simulator-ppc.h Loading commit data...