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

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

Issue 2223283002: [Interpreter] Create ScopeInfos in ast-numbering phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_varchecks
Patch Set: 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
« src/ast/ast-numbering.cc ('K') | « src/ast/ast-numbering.cc ('k') | 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 e89107afae072e921fb0c06e39e61b174d151473..6ad4a49ac281c7fe02b50890319d287f53fa6d42 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -3052,18 +3052,6 @@ void BytecodeGenerator::VisitRewritableExpression(RewritableExpression* expr) {
Visit(expr->expression());
}
-namespace {
-
-Handle<ScopeInfo> GetScopeInfo(Scope* scope, Isolate* isolate) {
- // TODO(5203): Remove this temporary exception.
- AllowHeapAllocation allow_allocation;
- AllowHandleAllocation allow_handles;
- AllowHandleDereference allow_deref;
- return scope->GetScopeInfo(isolate);
-}
-
-} // namespace
-
void BytecodeGenerator::VisitNewLocalFunctionContext() {
AccumulatorResultScope accumulator_execution_result(this);
Scope* scope = this->scope();
@@ -3077,7 +3065,7 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() {
builder()
->LoadAccumulatorWithRegister(Register::function_closure())
.StoreAccumulatorInRegister(closure)
- .LoadLiteral(GetScopeInfo(scope, isolate()))
+ .LoadLiteral(scope->GetScopeInfo(isolate()))
.StoreAccumulatorInRegister(scope_info)
.CallRuntime(Runtime::kNewScriptContext, closure, 2);
} else {
@@ -3125,7 +3113,7 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) {
Register closure = register_allocator()->NextConsecutiveRegister();
builder()
- ->LoadLiteral(GetScopeInfo(scope, isolate()))
+ ->LoadLiteral(scope->GetScopeInfo(isolate()))
.StoreAccumulatorInRegister(scope_info);
VisitFunctionClosureForContext();
builder()
« src/ast/ast-numbering.cc ('K') | « src/ast/ast-numbering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698