| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 Universe universe = compiler.enqueuer.codegen.universe; | 95 Universe universe = compiler.enqueuer.codegen.universe; |
| 96 universe.instantiatedTypes | 96 universe.instantiatedTypes |
| 97 ..remove(cls.rawType) | 97 ..remove(cls.rawType) |
| 98 ..remove(cls.thisType); | 98 ..remove(cls.thisType); |
| 99 universe.instantiatedClasses.remove(cls); | 99 universe.instantiatedClasses.remove(cls); |
| 100 cls.forEachLocalMember((Element e) { | 100 cls.forEachLocalMember((Element e) { |
| 101 universe.closurizedMembers.remove(e); | 101 universe.closurizedMembers.remove(e); |
| 102 universe.fieldSetters.remove(e); | 102 universe.fieldSetters.remove(e); |
| 103 universe.fieldGetters.remove(e); | 103 universe.fieldGetters.remove(e); |
| 104 }); | 104 }); |
| 105 compiler.enqueuer.codegen.seenClasses.remove(cls); |
| 105 } | 106 } |
| 106 } | 107 } |
| 107 | 108 |
| 108 /// Common interface for [BoxFieldElement] and [ClosureFieldElement] as | 109 /// Common interface for [BoxFieldElement] and [ClosureFieldElement] as |
| 109 /// non-elements. | 110 /// non-elements. |
| 110 abstract class CapturedVariable {} | 111 abstract class CapturedVariable {} |
| 111 | 112 |
| 112 // TODO(ahe): These classes continuously cause problems. We need to | 113 // TODO(ahe): These classes continuously cause problems. We need to |
| 113 // find a more general solution. | 114 // find a more general solution. |
| 114 class ClosureFieldElement extends ElementX | 115 class ClosureFieldElement extends ElementX |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 | 1032 |
| 1032 String get name => typeVariable.name; | 1033 String get name => typeVariable.name; |
| 1033 | 1034 |
| 1034 int get hashCode => typeVariable.hashCode; | 1035 int get hashCode => typeVariable.hashCode; |
| 1035 | 1036 |
| 1036 bool operator ==(other) { | 1037 bool operator ==(other) { |
| 1037 if (other is! TypeVariableLocal) return false; | 1038 if (other is! TypeVariableLocal) return false; |
| 1038 return typeVariable == other.typeVariable; | 1039 return typeVariable == other.typeVariable; |
| 1039 } | 1040 } |
| 1040 } | 1041 } |
| OLD | NEW |