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

Side by Side Diff: src/compiler/ast-loop-assignment-analyzer.cc

Issue 1332873003: Implement sloppy-mode block-defined functions (Annex B 3.3) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve type clarity Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('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-loop-assignment-analyzer.h" 5 #include "src/compiler/ast-loop-assignment-analyzer.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/parser.h" 7 #include "src/parser.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 void ALAA::VisitEmptyParentheses(EmptyParentheses* e) { UNREACHABLE(); } 196 void ALAA::VisitEmptyParentheses(EmptyParentheses* e) { UNREACHABLE(); }
197 197
198 198
199 void ALAA::VisitCaseClause(CaseClause* cc) { 199 void ALAA::VisitCaseClause(CaseClause* cc) {
200 if (!cc->is_default()) Visit(cc->label()); 200 if (!cc->is_default()) Visit(cc->label());
201 VisitStatements(cc->statements()); 201 VisitStatements(cc->statements());
202 } 202 }
203 203
204 204
205 void ALAA::VisitSloppyBlockFunctionStatement(
206 SloppyBlockFunctionStatement* stmt) {
207 Visit(stmt->statement());
208 }
209
210
205 // --------------------------------------------------------------------------- 211 // ---------------------------------------------------------------------------
206 // -- Interesting nodes------------------------------------------------------- 212 // -- Interesting nodes-------------------------------------------------------
207 // --------------------------------------------------------------------------- 213 // ---------------------------------------------------------------------------
208 void ALAA::VisitTryCatchStatement(TryCatchStatement* stmt) { 214 void ALAA::VisitTryCatchStatement(TryCatchStatement* stmt) {
209 Visit(stmt->try_block()); 215 Visit(stmt->try_block());
210 Visit(stmt->catch_block()); 216 Visit(stmt->catch_block());
211 // TODO(turbofan): are catch variables well-scoped? 217 // TODO(turbofan): are catch variables well-scoped?
212 AnalyzeAssignment(stmt->variable()); 218 AnalyzeAssignment(stmt->variable());
213 } 219 }
214 220
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 int count = 0; 298 int count = 0;
293 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); 299 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var);
294 for (size_t i = 0; i < list_.size(); i++) { 300 for (size_t i = 0; i < list_.size(); i++) {
295 if (list_[i].second->Contains(var_index)) count++; 301 if (list_[i].second->Contains(var_index)) count++;
296 } 302 }
297 return count; 303 return count;
298 } 304 }
299 } // namespace compiler 305 } // namespace compiler
300 } // namespace internal 306 } // namespace internal
301 } // namespace v8 307 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698