| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 && !compiler.enableUserAssertions) { | 548 && !compiler.enableUserAssertions) { |
| 549 return; | 549 return; |
| 550 } | 550 } |
| 551 node.visitChildren(this); | 551 node.visitChildren(this); |
| 552 } | 552 } |
| 553 | 553 |
| 554 visitSendSet(SendSet node) { | 554 visitSendSet(SendSet node) { |
| 555 Element element = elements[node]; | 555 Element element = elements[node]; |
| 556 if (Elements.isLocal(element)) { | 556 if (Elements.isLocal(element)) { |
| 557 mutatedVariables.add(element); | 557 mutatedVariables.add(element); |
| 558 } | 558 if (compiler.enableTypeAssertions) { |
| 559 if (Elements.isLocal(element) && | 559 analyzeTypeVariables(element.computeType(compiler)); |
| 560 element.computeType(compiler).containsTypeVariables) { | 560 } |
| 561 registerNeedsThis(); | |
| 562 } | 561 } |
| 563 super.visitSendSet(node); | 562 super.visitSendSet(node); |
| 564 } | 563 } |
| 565 | 564 |
| 566 visitNewExpression(NewExpression node) { | 565 visitNewExpression(NewExpression node) { |
| 567 DartType type = elements.getType(node); | 566 DartType type = elements.getType(node); |
| 568 analyzeType(type); | 567 analyzeType(type); |
| 569 node.visitChildren(this); | 568 node.visitChildren(this); |
| 570 } | 569 } |
| 571 | 570 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 } | 827 } |
| 829 | 828 |
| 830 visitTryStatement(TryStatement node) { | 829 visitTryStatement(TryStatement node) { |
| 831 // TODO(ngeoffray): implement finer grain state. | 830 // TODO(ngeoffray): implement finer grain state. |
| 832 bool oldInTryStatement = inTryStatement; | 831 bool oldInTryStatement = inTryStatement; |
| 833 inTryStatement = true; | 832 inTryStatement = true; |
| 834 node.visitChildren(this); | 833 node.visitChildren(this); |
| 835 inTryStatement = oldInTryStatement; | 834 inTryStatement = oldInTryStatement; |
| 836 } | 835 } |
| 837 } | 836 } |
| OLD | NEW |