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

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: comments 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 48f0c3c354f0c59cbcf51d83005a14b2d7839943..cb133c365eb053b713b31638e1c7d23ec6716668 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -3211,18 +3211,9 @@ 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);
VisitFunctionClosureForContext();
- builder()
- ->StoreAccumulatorInRegister(closure)
- .CallRuntime(Runtime::kPushBlockContext, scope_info, 2);
+
+ builder()->CreateBlockContext(scope->GetScopeInfo(isolate()));
execution_result()->SetResultInAccumulator();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698