OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast-expression-visitor.h" | 7 #include "src/ast-expression-visitor.h" |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 } | 225 } |
226 | 226 |
227 | 227 |
228 void AstExpressionVisitor::VisitAssignment(Assignment* expr) { | 228 void AstExpressionVisitor::VisitAssignment(Assignment* expr) { |
229 VisitExpression(expr); | 229 VisitExpression(expr); |
230 RECURSE_EXPRESSION(Visit(expr->target())); | 230 RECURSE_EXPRESSION(Visit(expr->target())); |
231 RECURSE_EXPRESSION(Visit(expr->value())); | 231 RECURSE_EXPRESSION(Visit(expr->value())); |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 void AstExpressionVisitor::VisitYield(Yield* expr) { | 235 void AstExpressionVisitor::VisitYield(Yield* expr) { |
rossberg
2015/08/25 12:29:01
Shouldn't this change as well?
bradn
2015/08/25 18:15:04
Done.
| |
236 RECURSE(Visit(expr->generator_object())); | 236 RECURSE(Visit(expr->generator_object())); |
237 RECURSE(Visit(expr->expression())); | 237 RECURSE(Visit(expr->expression())); |
238 } | 238 } |
239 | 239 |
240 | 240 |
241 void AstExpressionVisitor::VisitThrow(Throw* expr) { | 241 void AstExpressionVisitor::VisitThrow(Throw* expr) { |
rossberg
2015/08/25 12:29:01
And this one?
bradn
2015/08/25 18:15:04
Done.
| |
242 RECURSE(Visit(expr->exception())); | 242 RECURSE(Visit(expr->exception())); |
243 } | 243 } |
244 | 244 |
245 | 245 |
246 void AstExpressionVisitor::VisitProperty(Property* expr) { | 246 void AstExpressionVisitor::VisitProperty(Property* expr) { |
247 RECURSE(Visit(expr->obj())); | 247 VisitExpression(expr); |
248 RECURSE(Visit(expr->key())); | 248 RECURSE_EXPRESSION(Visit(expr->obj())); |
249 RECURSE_EXPRESSION(Visit(expr->key())); | |
249 } | 250 } |
250 | 251 |
251 | 252 |
252 void AstExpressionVisitor::VisitCall(Call* expr) { | 253 void AstExpressionVisitor::VisitCall(Call* expr) { |
253 VisitExpression(expr); | 254 VisitExpression(expr); |
254 RECURSE_EXPRESSION(Visit(expr->expression())); | 255 RECURSE_EXPRESSION(Visit(expr->expression())); |
255 ZoneList<Expression*>* args = expr->arguments(); | 256 ZoneList<Expression*>* args = expr->arguments(); |
256 for (int i = 0; i < args->length(); ++i) { | 257 for (int i = 0; i < args->length(); ++i) { |
257 Expression* arg = args->at(i); | 258 Expression* arg = args->at(i); |
258 RECURSE_EXPRESSION(Visit(arg)); | 259 RECURSE_EXPRESSION(Visit(arg)); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 | 329 |
329 void AstExpressionVisitor::VisitSuperPropertyReference( | 330 void AstExpressionVisitor::VisitSuperPropertyReference( |
330 SuperPropertyReference* expr) {} | 331 SuperPropertyReference* expr) {} |
331 | 332 |
332 | 333 |
333 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {} | 334 void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {} |
334 } | 335 } |
335 | 336 |
336 | 337 |
337 } // namespace v8::internal | 338 } // namespace v8::internal |
OLD | NEW |