Chromium Code Reviews| Index: src/interpreter/bytecode-generator.cc |
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
| index 268b9fd79a1282e64e661dfc28222b309fcc646d..9a8c0540de3c633d72fcdb6f9d75dee9b00eb717 100644 |
| --- a/src/interpreter/bytecode-generator.cc |
| +++ b/src/interpreter/bytecode-generator.cc |
| @@ -942,7 +942,13 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
| if (property->IsCompileTimeValue()) continue; |
| if (literal_in_accumulator) { |
| - literal = temporary_register_scope.NewRegister(); |
| + // We reserve for 5 though we use only one in this scope. This register |
| + // is used as a parameter along with other registers allocated in the |
| + // inner scope. Since they have to be contiguous, reserving 5 registers |
| + // lets inner scope allocate consecutive registers starting with this |
| + // register. |
| + temporary_register_scope.PrepareForConsecutiveAllocations(5); |
|
mythria
2016/01/14 10:08:55
This increases the number of registers used. So al
|
| + literal = temporary_register_scope.NextConsecutiveRegister(); |
| builder()->StoreAccumulatorInRegister(literal); |
| literal_in_accumulator = false; |
| } |