Chromium Code Reviews| Index: src/interpreter/bytecode-generator.cc |
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
| index 48f0c3c354f0c59cbcf51d83005a14b2d7839943..5760db74d5f0adf27b1522634e586fbdad54dc9d 100644 |
| --- a/src/interpreter/bytecode-generator.cc |
| +++ b/src/interpreter/bytecode-generator.cc |
| @@ -3211,18 +3211,12 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) { |
| AccumulatorResultScope accumulator_execution_result(this); |
| DCHECK(scope->is_block_scope()); |
| - // Allocate a new local block context. |
| - register_allocator()->PrepareForConsecutiveAllocations(2); |
| - Register scope_info = register_allocator()->NextConsecutiveRegister(); |
| - Register closure = register_allocator()->NextConsecutiveRegister(); |
| - |
| - builder() |
| - ->LoadLiteral(scope->GetScopeInfo(isolate())) |
| - .StoreAccumulatorInRegister(scope_info); |
| + size_t scope_info = builder()->AllocateConstantPoolEntry(); |
| + builder()->InsertConstantPoolEntryAt(scope_info, |
| + scope->GetScopeInfo(isolate())); |
|
rmcilroy
2016/08/15 16:01:04
Don't use AllocateConstantPoolEntry() (That's only
klaasb
2016/08/16 10:40:09
Done.
|
| VisitFunctionClosureForContext(); |
| - builder() |
| - ->StoreAccumulatorInRegister(closure) |
| - .CallRuntime(Runtime::kPushBlockContext, scope_info, 2); |
| + |
| + builder()->CreateBlockContext(scope_info); |
| execution_result()->SetResultInAccumulator(); |
| } |