| Index: src/a64/full-codegen-a64.cc
|
| diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
|
| index ec5d3397818dc0e11254ac8af21ef9ec5516acae..41ee16e1a92be4aadaed95a3435e2722c9524890 100644
|
| --- a/src/a64/full-codegen-a64.cc
|
| +++ b/src/a64/full-codegen-a64.cc
|
| @@ -183,7 +183,7 @@ void FullCodeGenerator::Generate() {
|
|
|
| if (locals_count > 0) {
|
| __ LoadRoot(x10, Heap::kUndefinedValueRootIndex);
|
| - __ PushMultipleTimes(locals_count, x10);
|
| + __ PushMultipleTimes(x10, locals_count);
|
| }
|
| }
|
|
|
| @@ -4622,20 +4622,11 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
|
| __ Ldr(w10, FieldMemOperand(x10,
|
| SharedFunctionInfo::kFormalParameterCountOffset));
|
| __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex);
|
| -
|
| - // TODO(jbramley): Write a variant of PushMultipleTimes which takes a register
|
| - // instead of a constant count, and use it to replace this loop.
|
| - Label push_argument_holes, push_frame;
|
| - __ Bind(&push_argument_holes);
|
| - __ Subs(w10, w10, 1);
|
| - __ B(mi, &push_frame);
|
| - __ Push(the_hole);
|
| - __ B(&push_argument_holes);
|
| + __ PushMultipleTimes(the_hole, w10);
|
|
|
| // Enter a new JavaScript frame, and initialize its slots as they were when
|
| // the generator was suspended.
|
| Label resume_frame;
|
| - __ Bind(&push_frame);
|
| __ Bl(&resume_frame);
|
| __ B(&done);
|
|
|
| @@ -4672,16 +4663,8 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
|
|
|
| // Otherwise, we push holes for the operand stack and call the runtime to fix
|
| // up the stack and the handlers.
|
| - // TODO(jbramley): Write a variant of PushMultipleTimes which takes a register
|
| - // instead of a constant count, and use it to replace this loop.
|
| - Label push_operand_holes, call_resume;
|
| - __ Bind(&push_operand_holes);
|
| - __ Subs(operand_stack_size, operand_stack_size, 1);
|
| - __ B(mi, &call_resume);
|
| - __ Push(the_hole);
|
| - __ B(&push_operand_holes);
|
| -
|
| - __ Bind(&call_resume);
|
| + __ PushMultipleTimes(the_hole, operand_stack_size);
|
| +
|
| __ Mov(x10, Operand(Smi::FromInt(resume_mode)));
|
| __ Push(generator_object, result_register(), x10);
|
| __ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
|
|
|