Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: src/a64/full-codegen-a64.cc

Issue 169533002: A64: Tidy up Push and Pop TODOs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase after Abort code-size optimizations. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/code-stubs-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/a64/code-stubs-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698