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