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

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

Issue 1545003003: [Interpreter] Fixes VisitNewLocalBlockContext to reserve consecutive registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | 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 e3349bcbc8903428ad73baade7189f265b755af6..5d8857440975f6684cf69d732985963449e2aaa1 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2074,9 +2074,10 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) {
// Allocate a new local block context.
TemporaryRegisterScope temporary_register_scope(builder());
- Register scope_info = temporary_register_scope.NewRegister();
- Register closure = temporary_register_scope.NewRegister();
- DCHECK(Register::AreContiguous(scope_info, closure));
+ temporary_register_scope.PrepareForConsecutiveAllocations(2);
+ Register scope_info = temporary_register_scope.NextConsecutiveRegister();
+ Register closure = temporary_register_scope.NextConsecutiveRegister();
+
builder()
->LoadLiteral(scope->GetScopeInfo(isolate()))
.StoreAccumulatorInRegister(scope_info);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698