Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 45a60e5377dbc26e61e43ff4912943ec990a5ef3..dde076b74ff59f95321ef93b6455dffecb5812c1 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -994,14 +994,14 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
FeedbackVectorSlot slot = stmt->ForInFeedbackSlot(); |
- Label loop, exit; |
- ForIn loop_statement(this, stmt); |
- increment_loop_depth(); |
- |
// Get the object to enumerate over. |
SetExpressionAsStatementPosition(stmt->enumerable()); |
VisitForAccumulatorValue(stmt->enumerable()); |
- OperandStackDepthIncrement(ForIn::kElementCount); |
+ OperandStackDepthIncrement(5); |
+ |
+ Label loop, exit; |
+ Iteration loop_statement(this, stmt); |
+ increment_loop_depth(); |
// If the object is null or undefined, skip over the loop, otherwise convert |
// it to a JS receiver. See ECMA-262 version 5, section 12.6.4. |
@@ -1888,7 +1888,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
case Yield::kSuspend: |
// Pop value from top-of-stack slot; box result into result register. |
EmitCreateIteratorResult(false); |
- __ push(result_register()); |
+ PushOperand(result_register()); |
// Fall through. |
case Yield::kInitial: { |
Label suspend, continuation, post_runtime, resume; |
@@ -1907,6 +1907,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
EmitUnwindAndReturn(); |
__ bind(&suspend); |
+ OperandStackDepthIncrement(1); // Not popped on this path. |
VisitForAccumulatorValue(expr->generator_object()); |
DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); |
__ mov(r1, Operand(Smi::FromInt(continuation.pos()))); |
@@ -1932,7 +1933,6 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
case Yield::kFinal: { |
// Pop value from top-of-stack slot, box result into result register. |
- OperandStackDepthDecrement(1); |
EmitCreateIteratorResult(true); |
EmitUnwindAndReturn(); |
break; |
@@ -2081,7 +2081,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
__ bind(&done_allocate); |
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r1); |
- __ pop(r2); |
+ PopOperand(r2); |
__ LoadRoot(r3, |
done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); |
__ LoadRoot(r4, Heap::kEmptyFixedArrayRootIndex); |