OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |