| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart'; | 8 import '../common/names.dart'; |
| 9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
| 10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 @override | 526 @override |
| 527 void visitTryCatch(ir.TryCatch node) { | 527 void visitTryCatch(ir.TryCatch node) { |
| 528 visitNode(node.body); | 528 visitNode(node.body); |
| 529 visitNodes(node.catches); | 529 visitNodes(node.catches); |
| 530 } | 530 } |
| 531 | 531 |
| 532 @override | 532 @override |
| 533 void visitCatch(ir.Catch node) { | 533 void visitCatch(ir.Catch node) { |
| 534 impactBuilder.registerFeature(Feature.CATCH_STATEMENT); | 534 impactBuilder.registerFeature(Feature.CATCH_STATEMENT); |
| 535 visitNode(node.exception); | |
| 536 if (node.stackTrace != null) { | 535 if (node.stackTrace != null) { |
| 537 impactBuilder.registerFeature(Feature.STACK_TRACE_IN_CATCH); | 536 impactBuilder.registerFeature(Feature.STACK_TRACE_IN_CATCH); |
| 538 } | 537 } |
| 539 if (node.guard is! ir.DynamicType) { | 538 if (node.guard is! ir.DynamicType) { |
| 540 impactBuilder.registerTypeUse( | 539 impactBuilder.registerTypeUse( |
| 541 new TypeUse.catchType(astAdapter.getDartType(node.guard))); | 540 new TypeUse.catchType(astAdapter.getDartType(node.guard))); |
| 542 } | 541 } |
| 543 visitNode(node.body); | 542 visitNode(node.body); |
| 544 } | 543 } |
| 545 | 544 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 568 Element target = astAdapter.getElement(node.target).declaration; | 567 Element target = astAdapter.getElement(node.target).declaration; |
| 569 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( | 568 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( |
| 570 target, astAdapter.getCallStructure(node.arguments))); | 569 target, astAdapter.getCallStructure(node.arguments))); |
| 571 } | 570 } |
| 572 | 571 |
| 573 // TODO(johnniwinther): Make this throw and visit child nodes explicitly | 572 // TODO(johnniwinther): Make this throw and visit child nodes explicitly |
| 574 // instead to ensure that we don't visit unwanted parts of the ir. | 573 // instead to ensure that we don't visit unwanted parts of the ir. |
| 575 @override | 574 @override |
| 576 void defaultNode(ir.Node node) => node.visitChildren(this); | 575 void defaultNode(ir.Node node) => node.visitChildren(this); |
| 577 } | 576 } |
| OLD | NEW |