Chromium Code Reviews| Index: src/interpreter/bytecode-generator.cc |
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
| index 4163d0786c195317b5685a0e653ec1a290bb50dc..704ac87ec65284a517a144b61581c187758060fc 100644 |
| --- a/src/interpreter/bytecode-generator.cc |
| +++ b/src/interpreter/bytecode-generator.cc |
| @@ -2175,8 +2175,8 @@ void BytecodeGenerator::VisitCall(Call* expr) { |
| // The receiver and arguments need to be allocated consecutively for |
| // Call(). We allocate the callee and receiver consecutively for calls to |
| - // kLoadLookupSlot. Future optimizations could avoid this there are no |
| - // arguments or the receiver and arguments are already consecutive. |
| + // %LoadLookupSlotForCall. Future optimizations could avoid this there are |
| + // no arguments or the receiver and arguments are already consecutive. |
| ZoneList<Expression*>* args = expr->arguments(); |
| register_allocator()->PrepareForConsecutiveAllocations(args->length() + 2); |
| Register callee = register_allocator()->NextConsecutiveRegister(); |
| @@ -2206,18 +2206,17 @@ void BytecodeGenerator::VisitCall(Call* expr) { |
| case Call::POSSIBLY_EVAL_CALL: { |
| if (callee_expr->AsVariableProxy()->var()->IsLookupSlot()) { |
| RegisterAllocationScope inner_register_scope(this); |
| - register_allocator()->PrepareForConsecutiveAllocations(2); |
| - Register context = register_allocator()->NextConsecutiveRegister(); |
| + register_allocator()->PrepareForConsecutiveAllocations(1); |
| Register name = register_allocator()->NextConsecutiveRegister(); |
|
rmcilroy
2016/02/10 13:39:31
No need for PrepareForConsecutiveAllocations ... N
Benedikt Meurer
2016/02/10 13:50:06
Done.
|
| - // Call LoadLookupSlot to get the callee and receiver. |
| + // Call %LoadLookupSlotForCall to get the callee and receiver. |
| DCHECK(Register::AreContiguous(callee, receiver)); |
| Variable* variable = callee_expr->AsVariableProxy()->var(); |
| builder() |
| - ->MoveRegister(Register::current_context(), context) |
| - .LoadLiteral(variable->name()) |
| + ->LoadLiteral(variable->name()) |
| .StoreAccumulatorInRegister(name) |
| - .CallRuntimeForPair(Runtime::kLoadLookupSlot, context, 2, callee); |
| + .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, name, 1, |
| + callee); |
| break; |
| } |
| // Fall through. |