| 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 "js_backend/js_backend.dart" show JavaScriptBackend; | 10 import "js_backend/js_backend.dart" show JavaScriptBackend; |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 inTryStatement = true; | 1027 inTryStatement = true; |
| 1028 node.visitChildren(this); | 1028 node.visitChildren(this); |
| 1029 inTryStatement = oldInTryStatement; | 1029 inTryStatement = oldInTryStatement; |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 visitForIn(ForIn node) { | 1032 visitForIn(ForIn node) { |
| 1033 if (node.awaitToken != null) { | 1033 if (node.awaitToken != null) { |
| 1034 // An `await for` loop is enclosed in an implicit try-finally. | 1034 // An `await for` loop is enclosed in an implicit try-finally. |
| 1035 bool oldInTryStatement = inTryStatement; | 1035 bool oldInTryStatement = inTryStatement; |
| 1036 inTryStatement = true; | 1036 inTryStatement = true; |
| 1037 node.visitChildren(this); | 1037 visitLoop(node); |
| 1038 inTryStatement = oldInTryStatement; | 1038 inTryStatement = oldInTryStatement; |
| 1039 } else { | 1039 } else { |
| 1040 node.visitChildren(this); | 1040 visitLoop(node); |
| 1041 } | 1041 } |
| 1042 } | 1042 } |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 /// A type variable as a local variable. | 1045 /// A type variable as a local variable. |
| 1046 class TypeVariableLocal implements Local { | 1046 class TypeVariableLocal implements Local { |
| 1047 final TypeVariableType typeVariable; | 1047 final TypeVariableType typeVariable; |
| 1048 final ExecutableElement executableContext; | 1048 final ExecutableElement executableContext; |
| 1049 | 1049 |
| 1050 TypeVariableLocal(this.typeVariable, this.executableContext); | 1050 TypeVariableLocal(this.typeVariable, this.executableContext); |
| 1051 | 1051 |
| 1052 String get name => typeVariable.name; | 1052 String get name => typeVariable.name; |
| 1053 | 1053 |
| 1054 int get hashCode => typeVariable.hashCode; | 1054 int get hashCode => typeVariable.hashCode; |
| 1055 | 1055 |
| 1056 bool operator ==(other) { | 1056 bool operator ==(other) { |
| 1057 if (other is! TypeVariableLocal) return false; | 1057 if (other is! TypeVariableLocal) return false; |
| 1058 return typeVariable == other.typeVariable; | 1058 return typeVariable == other.typeVariable; |
| 1059 } | 1059 } |
| 1060 } | 1060 } |
| OLD | NEW |