[Ignition] Fix incorrect arg evaluation order for some super calls.

The evaluation order of this argument was accidentally changed when the
special-case was added for super calls with a final spread argument.

Review-Url: https://codereview.chromium.org/2563423002
Cr-Commit-Position: refs/heads/master@{#41633}
This commit is contained in:
petermarshall 2016-12-12 00:45:09 -08:00 committed by Commit bot
parent 522815a63b
commit 375fc067b0
2 changed files with 2 additions and 2 deletions

View File

@ -2518,8 +2518,8 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
RegisterList args_regs =
register_allocator()->NewRegisterList(args->length() + 2);
builder()->MoveRegister(constructor, args_regs[0]);
VisitForRegisterValue(super->new_target_var(), args_regs[1]);
VisitArguments(args, args_regs, 2);
VisitForRegisterValue(super->new_target_var(), args_regs[1]);
builder()->NewWithSpread(args_regs);
} else {
RegisterList args_regs =

View File

@ -70,7 +70,7 @@ bytecodes: [
B(Mov), R(3), R(4),
B(Mov), R(0), R(5),
B(Mov), R(2), R(7),
/* 152 E> */ B(NewWithSpread), R(4), U8(4),
/* 140 E> */ B(NewWithSpread), R(4), U8(4),
B(Star), R(3),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),