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

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

Issue 14158006: Capture receiver in generator object (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Rebase on master, fix for ARM Created 7 years, 8 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 | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index 2a8b9eea4457a002acb22a9f613630a0665cd651..0ef4be064dac2b7b049c8fdf967a659e190275c8 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -1998,20 +1998,25 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ ldr(cp, FieldMemOperand(r1, JSGeneratorObject::kContextOffset));
__ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset));
- // Push holes for arguments to generator function.
+ // Load receiver and store as the first argument.
+ __ ldr(r2, FieldMemOperand(r1, JSGeneratorObject::kReceiverOffset));
+ __ push(r2);
+
+ // Push holes for the rest of the arguments to the generator function.
__ ldr(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
__ ldr(r3,
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
__ LoadRoot(r2, Heap::kTheHoleValueRootIndex);
- Label push_argument_holes;
+ Label push_argument_holes, push_frame;
__ bind(&push_argument_holes);
- __ push(r2);
__ sub(r3, r3, Operand(1), SetCC);
- __ b(pl, &push_argument_holes);
+ __ b(mi, &push_frame);
+ __ push(r2);
+ __ jmp(&push_argument_holes);
// Enter a new JavaScript frame, and initialize its slots as they were when
// the generator was suspended.
- Label push_frame, resume_frame;
+ Label resume_frame;
__ bind(&push_frame);
__ bl(&resume_frame);
__ jmp(&done);
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698