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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1292753007: [es6] Parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 1132
1133 void AstGraphBuilder::VisitBlock(Block* stmt) { 1133 void AstGraphBuilder::VisitBlock(Block* stmt) {
1134 BlockBuilder block(this); 1134 BlockBuilder block(this);
1135 ControlScopeForBreakable scope(this, stmt, &block); 1135 ControlScopeForBreakable scope(this, stmt, &block);
1136 if (stmt->labels() != NULL) block.BeginBlock(); 1136 if (stmt->labels() != NULL) block.BeginBlock();
1137 if (stmt->scope() == NULL) { 1137 if (stmt->scope() == NULL) {
1138 // Visit statements in the same scope, no declarations. 1138 // Visit statements in the same scope, no declarations.
1139 VisitStatements(stmt->statements()); 1139 VisitStatements(stmt->statements());
1140 } else { 1140 } else {
1141 // Visit declarations and statements in a block scope. 1141 // Visit declarations and statements in a block scope.
1142 if (stmt->scope()->ContextLocalCount() > 0) { 1142 if (stmt->scope()->NeedsContext()) {
1143 Node* context = BuildLocalBlockContext(stmt->scope()); 1143 Node* context = BuildLocalBlockContext(stmt->scope());
1144 ContextScope scope(this, stmt->scope(), context); 1144 ContextScope scope(this, stmt->scope(), context);
1145 VisitDeclarations(stmt->scope()->declarations()); 1145 VisitDeclarations(stmt->scope()->declarations());
1146 VisitStatements(stmt->statements()); 1146 VisitStatements(stmt->statements());
1147 } else { 1147 } else {
1148 VisitDeclarations(stmt->scope()->declarations()); 1148 VisitDeclarations(stmt->scope()->declarations());
1149 VisitStatements(stmt->statements()); 1149 VisitStatements(stmt->statements());
1150 } 1150 }
1151 } 1151 }
1152 if (stmt->labels() != NULL) block.EndBlock(); 1152 if (stmt->labels() != NULL) block.EndBlock();
(...skipping 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after
4302 // Phi does not exist yet, introduce one. 4302 // Phi does not exist yet, introduce one.
4303 value = NewPhi(inputs, value, control); 4303 value = NewPhi(inputs, value, control);
4304 value->ReplaceInput(inputs - 1, other); 4304 value->ReplaceInput(inputs - 1, other);
4305 } 4305 }
4306 return value; 4306 return value;
4307 } 4307 }
4308 4308
4309 } // namespace compiler 4309 } // namespace compiler
4310 } // namespace internal 4310 } // namespace internal
4311 } // namespace v8 4311 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698