Skip to content

Commit

Permalink
Version 4.3.61.20 (cherry-pick)
Browse files Browse the repository at this point in the history
Merged 5f047ff

X87: Handle the case when derived constructor is [[Call]]ed with 0 args.

R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/branch-heads/4.3@{crosswalk-project#24}
Cr-Branched-From: f5c0a23-refs/heads/4.3.61@{#1}
Cr-Branched-From: 0a7d4f4-refs/heads/master@{#27508}
  • Loading branch information
cdai2 committed May 11, 2015
1 parent da46129 commit d93816d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/x87/code-stubs-x87.cc
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,15 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
__ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));

if (has_new_target()) {
// If the constructor was [[Call]]ed, the call will not push a new.target
// onto the stack. In that case the arguments array we construct is bogus,
// bu we do not care as the constructor throws immediately.
__ cmp(ecx, Immediate(Smi::FromInt(0)));
Label skip_decrement;
__ j(equal, &skip_decrement);
// Subtract 1 from smi-tagged arguments count.
__ sub(ecx, Immediate(2));
__ bind(&skip_decrement);
}

__ lea(edx, Operand(edx, ecx, times_2,
Expand Down

0 comments on commit d93816d

Please sign in to comment.