Revision: 14424
Author:   [email protected]
Date:     Wed Apr 24 09:07:44 2013
Log:      Fix generator suspend and resume on ARM

This CL fixes a number of rookie mistakes in
FullCodeGenerator::VisitYield and
FullCodeGenerator::EmitGeneratorResume, and re-enables the
generators-iteration test on ARM.

[email protected]
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/13843022

Patch from Andy Wingo <[email protected]>.
http://code.google.com/p/v8/source/detail?r=14424

Modified:
 /branches/bleeding_edge/src/arm/full-codegen-arm.cc
 /branches/bleeding_edge/test/mjsunit/mjsunit.status

=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Apr 24 06:00:16 2013 +++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Apr 24 09:07:44 2013
@@ -2002,12 +2002,12 @@
   __ ldr(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
   __ ldr(r3,
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
-  __ Move(r2, isolate()->factory()->the_hole_value());
+  __ LoadRoot(r2, Heap::kTheHoleValueRootIndex);
   Label push_argument_holes;
   __ bind(&push_argument_holes);
   __ push(r2);
-  __ sub(r3, r3, Operand(1));
-  __ b(vc, &push_argument_holes);
+  __ sub(r3, r3, Operand(1), SetCC);
+  __ b(pl, &push_argument_holes);

// Enter a new JavaScript frame, and initialize its slots as they were when
   // the generator was suspended.
@@ -2016,6 +2016,7 @@
   __ bl(&resume_frame);
   __ jmp(&done);
   __ bind(&resume_frame);
+  __ push(lr);  // Return address.
   __ push(fp);  // Caller's frame pointer.
   __ mov(fp, sp);
   __ push(cp);  // Callee's context.
@@ -2046,8 +2047,8 @@
   // up the stack and the handlers.
   Label push_operand_holes, call_resume;
   __ bind(&push_operand_holes);
-  __ sub(r3, r3, Operand(1));
-  __ b(vs, &call_resume);
+  __ sub(r3, r3, Operand(1), SetCC);
+  __ b(mi, &call_resume);
   __ push(r2);
   __ b(&push_operand_holes);
   __ bind(&call_resume);
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Wed Apr 24 06:00:16 2013 +++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Wed Apr 24 09:07:44 2013
@@ -37,9 +37,6 @@
 # TODO(wingo): Currently fails in no-snapshot mode, hence disabled for now.
 harmony/generators-objects: SKIP

-# TODO(wingo): Resuming of iterators currently crashes in ARM.
-harmony/generators-iteration: SKIP if ($arch == arm || $arch == android_arm)
-
 # Issue 1719: Slow to collect arrays over several contexts.
 regress/regress-524: SKIP
 # When that bug is fixed, revert the expectation to:

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to