| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library closureToClassMapper; | 5 library closureToClassMapper; |
| 6 | 6 |
| 7 import "elements/elements.dart"; | 7 import "elements/elements.dart"; |
| 8 import "dart2jslib.dart"; | 8 import "dart2jslib.dart"; |
| 9 import "dart_types.dart"; | 9 import "dart_types.dart"; |
| 10 import "scanner/scannerlib.dart" show Token; | 10 import "scanner/scannerlib.dart" show Token; |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 } else if (node.isTypeTest || node.isTypeCast) { | 529 } else if (node.isTypeTest || node.isTypeCast) { |
| 530 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast; | 530 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast; |
| 531 DartType type = elements.getType(annotation); | 531 DartType type = elements.getType(annotation); |
| 532 analyzeType(type); | 532 analyzeType(type); |
| 533 } else if (node.isTypeTest) { | 533 } else if (node.isTypeTest) { |
| 534 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast); | 534 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast); |
| 535 analyzeType(type); | 535 analyzeType(type); |
| 536 } else if (node.isTypeCast) { | 536 } else if (node.isTypeCast) { |
| 537 DartType type = elements.getType(node.arguments.head); | 537 DartType type = elements.getType(node.arguments.head); |
| 538 analyzeType(type); | 538 analyzeType(type); |
| 539 } else if (element == compiler.assertMethod | |
| 540 && !compiler.enableUserAssertions) { | |
| 541 return; | |
| 542 } | 539 } |
| 543 node.visitChildren(this); | 540 node.visitChildren(this); |
| 544 } | 541 } |
| 545 | 542 |
| 546 visitSendSet(SendSet node) { | 543 visitSendSet(SendSet node) { |
| 547 Element element = elements[node]; | 544 Element element = elements[node]; |
| 548 if (Elements.isLocal(element)) { | 545 if (Elements.isLocal(element)) { |
| 549 mutatedVariables.add(element); | 546 mutatedVariables.add(element); |
| 550 } | 547 } |
| 551 if (Elements.isLocal(element) && | 548 if (Elements.isLocal(element) && |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 } | 825 } |
| 829 | 826 |
| 830 visitTryStatement(TryStatement node) { | 827 visitTryStatement(TryStatement node) { |
| 831 // TODO(ngeoffray): implement finer grain state. | 828 // TODO(ngeoffray): implement finer grain state. |
| 832 bool oldInTryStatement = inTryStatement; | 829 bool oldInTryStatement = inTryStatement; |
| 833 inTryStatement = true; | 830 inTryStatement = true; |
| 834 node.visitChildren(this); | 831 node.visitChildren(this); |
| 835 inTryStatement = oldInTryStatement; | 832 inTryStatement = oldInTryStatement; |
| 836 } | 833 } |
| 837 } | 834 } |
| OLD | NEW |