Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/closure.dart

Issue 626433004: Forget closure classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40894 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/enqueue.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698