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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 void ALAA::VisitCompareOperation(CompareOperation* e) { | 187 void ALAA::VisitCompareOperation(CompareOperation* e) { |
188 Visit(e->left()); | 188 Visit(e->left()); |
189 Visit(e->right()); | 189 Visit(e->right()); |
190 } | 190 } |
191 | 191 |
192 | 192 |
193 void ALAA::VisitSpread(Spread* e) { Visit(e->expression()); } | 193 void ALAA::VisitSpread(Spread* e) { Visit(e->expression()); } |
194 | 194 |
195 | 195 |
196 void ALAA::VisitEmptyParentheses(EmptyParentheses* e) { UNREACHABLE(); } | |
197 | |
198 | |
199 void ALAA::VisitCaseClause(CaseClause* cc) { | 196 void ALAA::VisitCaseClause(CaseClause* cc) { |
200 if (!cc->is_default()) Visit(cc->label()); | 197 if (!cc->is_default()) Visit(cc->label()); |
201 VisitStatements(cc->statements()); | 198 VisitStatements(cc->statements()); |
202 } | 199 } |
203 | 200 |
204 | 201 |
205 // --------------------------------------------------------------------------- | 202 // --------------------------------------------------------------------------- |
206 // -- Interesting nodes------------------------------------------------------- | 203 // -- Interesting nodes------------------------------------------------------- |
207 // --------------------------------------------------------------------------- | 204 // --------------------------------------------------------------------------- |
208 void ALAA::VisitTryCatchStatement(TryCatchStatement* stmt) { | 205 void ALAA::VisitTryCatchStatement(TryCatchStatement* stmt) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 int count = 0; | 289 int count = 0; |
293 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); | 290 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); |
294 for (size_t i = 0; i < list_.size(); i++) { | 291 for (size_t i = 0; i < list_.size(); i++) { |
295 if (list_[i].second->Contains(var_index)) count++; | 292 if (list_[i].second->Contains(var_index)) count++; |
296 } | 293 } |
297 return count; | 294 return count; |
298 } | 295 } |
299 } // namespace compiler | 296 } // namespace compiler |
300 } // namespace internal | 297 } // namespace internal |
301 } // namespace v8 | 298 } // namespace v8 |
OLD | NEW |