Commit 375fc067 authored by petermarshall's avatar petermarshall Committed by Commit bot

[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}
parent 522815a6
......@@ -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 =
......
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment