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

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

Issue 2314483002: Store the ScopeInfo in WithContexts (Closed)
Patch Set: updates Created 4 years, 3 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-generator.h ('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 16ba1039ac04977277bdf0058bc82e085a75f556..ad484c869dc92400da7c0a475340bc1ffcbd855e 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1093,7 +1093,7 @@ void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
void BytecodeGenerator::VisitWithStatement(WithStatement* stmt) {
builder()->SetStatementPosition(stmt);
VisitForAccumulatorValue(stmt->expression());
- VisitNewLocalWithContext();
+ VisitNewLocalWithContext(stmt->scope());
VisitInScope(stmt->statement(), stmt->scope());
}
@@ -3199,14 +3199,14 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) {
execution_result()->SetResultInAccumulator();
}
-void BytecodeGenerator::VisitNewLocalWithContext() {
+void BytecodeGenerator::VisitNewLocalWithContext(Scope* scope) {
AccumulatorResultScope accumulator_execution_result(this);
Register extension_object = register_allocator()->NewRegister();
builder()->ConvertAccumulatorToObject(extension_object);
VisitFunctionClosureForContext();
- builder()->CreateWithContext(extension_object);
+ builder()->CreateWithContext(extension_object, scope->scope_info());
execution_result()->SetResultInAccumulator();
}
« no previous file with comments | « src/interpreter/bytecode-generator.h ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698