| 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("leg.dart"); | 8 import "dart2jslib.dart"; |
| 9 #import("scanner/scannerlib.dart"); | 9 import "tree/tree.dart"; |
| 10 #import("tree/tree.dart"); | 10 import "util/util.dart"; |
| 11 #import("util/util.dart"); | |
| 12 | 11 |
| 13 class ClosureTask extends CompilerTask { | 12 class ClosureTask extends CompilerTask { |
| 14 Map<Node, ClosureClassMap> closureMappingCache; | 13 Map<Node, ClosureClassMap> closureMappingCache; |
| 15 ClosureTask(Compiler compiler) | 14 ClosureTask(Compiler compiler) |
| 16 : closureMappingCache = new Map<Node, ClosureClassMap>(), | 15 : closureMappingCache = new Map<Node, ClosureClassMap>(), |
| 17 super(compiler); | 16 super(compiler); |
| 18 | 17 |
| 19 String get name => "Closure Simplifier"; | 18 String get name => "Closure Simplifier"; |
| 20 | 19 |
| 21 ClosureClassMap computeClosureToClassMapping(Element element, | 20 ClosureClassMap computeClosureToClassMapping(Element element, |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 624 } |
| 626 | 625 |
| 627 visitTryStatement(TryStatement node) { | 626 visitTryStatement(TryStatement node) { |
| 628 // TODO(ngeoffray): implement finer grain state. | 627 // TODO(ngeoffray): implement finer grain state. |
| 629 bool oldInTryStatement = inTryStatement; | 628 bool oldInTryStatement = inTryStatement; |
| 630 inTryStatement = true; | 629 inTryStatement = true; |
| 631 node.visitChildren(this); | 630 node.visitChildren(this); |
| 632 inTryStatement = oldInTryStatement; | 631 inTryStatement = oldInTryStatement; |
| 633 } | 632 } |
| 634 } | 633 } |
| OLD | NEW |