| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index 10c78ffc4984518e5b8cafa0a0d64cdc05095e21..37d33a736be118b65e4192247985f2c0e10df9a3 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -894,10 +894,12 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| builder()->CastAccumulatorToJSObject();
|
| builder()->JumpIfNull(¬_object_label);
|
| builder()->StoreAccumulatorInRegister(receiver);
|
| - Register cache_type = execution_result()->NewRegister();
|
| - Register cache_array = execution_result()->NewRegister();
|
| - Register cache_length = execution_result()->NewRegister();
|
| - builder()->ForInPrepare(cache_type, cache_array, cache_length);
|
| +
|
| + execution_result()->PrepareForConsecutiveAllocations(3);
|
| + Register cache_type = execution_result()->NextConsecutiveRegister();
|
| + Register cache_array = execution_result()->NextConsecutiveRegister();
|
| + Register cache_length = execution_result()->NextConsecutiveRegister();
|
| + builder()->ForInPrepare(cache_type);
|
|
|
| // Set up loop counter
|
| Register index = execution_result()->NewRegister();
|
| @@ -909,7 +911,8 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| loop_builder.Condition();
|
| builder()->ForInDone(index, cache_length);
|
| loop_builder.BreakIfTrue();
|
| - builder()->ForInNext(receiver, cache_type, cache_array, index);
|
| + DCHECK(Register::AreContiguous(cache_type, cache_array));
|
| + builder()->ForInNext(receiver, index, cache_type);
|
| loop_builder.ContinueIfUndefined();
|
| VisitForInAssignment(stmt->each(), stmt->EachFeedbackSlot());
|
| Visit(stmt->body());
|
|
|