Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2630)

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2248633002: [interpreter] Add CreateBlockContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: regenerate golden files Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698