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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 2938823002: Starting making dart2js strong mode clean. (Closed)
Patch Set: Address some comments. Created 3 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/apiimpl.dart ('k') | pkg/compiler/lib/src/js_backend/namer.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 'common/names.dart' show Identifiers; 7 import 'common/names.dart' show Identifiers;
8 import 'common/resolution.dart' show ParsingContext, Resolution; 8 import 'common/resolution.dart' show ParsingContext, Resolution;
9 import 'common/tasks.dart' show CompilerTask; 9 import 'common/tasks.dart' show CompilerTask;
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ClosureClassMap closureClassMap = _closureMappingCache[element]; 135 ClosureClassMap closureClassMap = _closureMappingCache[element];
136 assert(closureClassMap != null, 136 assert(closureClassMap != null,
137 failedAt(element, "No ClosureClassMap computed for ${element}.")); 137 failedAt(element, "No ClosureClassMap computed for ${element}."));
138 return closureClassMap; 138 return closureClassMap;
139 }); 139 });
140 } 140 }
141 141
142 /// Create [ClosureClassMap]s for all live members. 142 /// Create [ClosureClassMap]s for all live members.
143 void createClosureClasses(ClosedWorldRefiner closedWorldRefiner) { 143 void createClosureClasses(ClosedWorldRefiner closedWorldRefiner) {
144 compiler.enqueuer.resolution.processedEntities 144 compiler.enqueuer.resolution.processedEntities
145 .forEach((MemberElement element) { 145 .forEach((MemberEntity _element) {
146 MemberElement element = _element;
146 ResolvedAst resolvedAst = element.resolvedAst; 147 ResolvedAst resolvedAst = element.resolvedAst;
147 if (element.isAbstract) return; 148 if (element.isAbstract) return;
148 if (element.isField && 149 if (element.isField &&
149 !element.isInstanceMember && 150 !element.isInstanceMember &&
150 resolvedAst.body == null) { 151 resolvedAst.body == null) {
151 // Skip top-level/static fields without an initializer. 152 // Skip top-level/static fields without an initializer.
152 return; 153 return;
153 } 154 }
154 computeClosureToClassMapping(element, closedWorldRefiner); 155 computeClosureToClassMapping(element, closedWorldRefiner);
155 }); 156 });
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 /// 1336 ///
1336 /// Move the below classes to a JS model eventually. 1337 /// Move the below classes to a JS model eventually.
1337 /// 1338 ///
1338 abstract class JSEntity implements MemberEntity { 1339 abstract class JSEntity implements MemberEntity {
1339 Local get declaredEntity; 1340 Local get declaredEntity;
1340 } 1341 }
1341 1342
1342 abstract class PrivatelyNamedJSEntity implements JSEntity { 1343 abstract class PrivatelyNamedJSEntity implements JSEntity {
1343 Entity get rootOfScope; 1344 Entity get rootOfScope;
1344 } 1345 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/apiimpl.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698