| 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/ast/scopes.h" | 6 #include "src/ast/scopes.h" |
| 7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
| 8 #include "src/objects-inl.h" | 8 #include "src/objects-inl.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 Visit(properties->at(i)->key()); | 144 Visit(properties->at(i)->key()); |
| 145 Visit(properties->at(i)->value()); | 145 Visit(properties->at(i)->value()); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 | 149 |
| 150 void ALAA::VisitArrayLiteral(ArrayLiteral* e) { VisitExpressions(e->values()); } | 150 void ALAA::VisitArrayLiteral(ArrayLiteral* e) { VisitExpressions(e->values()); } |
| 151 | 151 |
| 152 | 152 |
| 153 void ALAA::VisitYield(Yield* stmt) { | 153 void ALAA::VisitYield(Yield* stmt) { |
| 154 Visit(stmt->generator_object()); | |
| 155 Visit(stmt->expression()); | 154 Visit(stmt->expression()); |
| 156 } | 155 } |
| 157 | 156 |
| 158 | 157 |
| 159 void ALAA::VisitThrow(Throw* stmt) { Visit(stmt->exception()); } | 158 void ALAA::VisitThrow(Throw* stmt) { Visit(stmt->exception()); } |
| 160 | 159 |
| 161 | 160 |
| 162 void ALAA::VisitProperty(Property* e) { | 161 void ALAA::VisitProperty(Property* e) { |
| 163 Visit(e->obj()); | 162 Visit(e->obj()); |
| 164 Visit(e->key()); | 163 Visit(e->key()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 196 } |
| 198 | 197 |
| 199 | 198 |
| 200 void ALAA::VisitSpread(Spread* e) { UNREACHABLE(); } | 199 void ALAA::VisitSpread(Spread* e) { UNREACHABLE(); } |
| 201 | 200 |
| 202 | 201 |
| 203 void ALAA::VisitEmptyParentheses(EmptyParentheses* e) { UNREACHABLE(); } | 202 void ALAA::VisitEmptyParentheses(EmptyParentheses* e) { UNREACHABLE(); } |
| 204 | 203 |
| 205 void ALAA::VisitGetIterator(GetIterator* e) { UNREACHABLE(); } | 204 void ALAA::VisitGetIterator(GetIterator* e) { UNREACHABLE(); } |
| 206 | 205 |
| 206 void ALAA::VisitInternalVariable(InternalVariable* e) { UNREACHABLE(); } |
| 207 |
| 207 void ALAA::VisitCaseClause(CaseClause* cc) { | 208 void ALAA::VisitCaseClause(CaseClause* cc) { |
| 208 if (!cc->is_default()) Visit(cc->label()); | 209 if (!cc->is_default()) Visit(cc->label()); |
| 209 VisitStatements(cc->statements()); | 210 VisitStatements(cc->statements()); |
| 210 } | 211 } |
| 211 | 212 |
| 212 | 213 |
| 213 void ALAA::VisitSloppyBlockFunctionStatement( | 214 void ALAA::VisitSloppyBlockFunctionStatement( |
| 214 SloppyBlockFunctionStatement* stmt) { | 215 SloppyBlockFunctionStatement* stmt) { |
| 215 Visit(stmt->statement()); | 216 Visit(stmt->statement()); |
| 216 } | 217 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 int count = 0; | 314 int count = 0; |
| 314 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); | 315 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); |
| 315 for (size_t i = 0; i < list_.size(); i++) { | 316 for (size_t i = 0; i < list_.size(); i++) { |
| 316 if (list_[i].second->Contains(var_index)) count++; | 317 if (list_[i].second->Contains(var_index)) count++; |
| 317 } | 318 } |
| 318 return count; | 319 return count; |
| 319 } | 320 } |
| 320 } // namespace compiler | 321 } // namespace compiler |
| 321 } // namespace internal | 322 } // namespace internal |
| 322 } // namespace v8 | 323 } // namespace v8 |
| OLD | NEW |