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

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

Issue 2814973003: Extract ClosedWorldRefiner implementation from ClosedWorldImpl to ClosedWorldBase (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ClosureClassMap closureClassMap = _closureMappingCache[element]; 46 ClosureClassMap closureClassMap = _closureMappingCache[element];
47 assert(invariant(resolvedAst.element, closureClassMap != null, 47 assert(invariant(resolvedAst.element, closureClassMap != null,
48 message: "No ClosureClassMap computed for ${element}.")); 48 message: "No ClosureClassMap computed for ${element}."));
49 return closureClassMap; 49 return closureClassMap;
50 }); 50 });
51 } 51 }
52 52
53 /// Create [ClosureClassMap]s for all live members. 53 /// Create [ClosureClassMap]s for all live members.
54 void createClosureClasses(ClosedWorldRefiner closedWorldRefiner) { 54 void createClosureClasses(ClosedWorldRefiner closedWorldRefiner) {
55 compiler.enqueuer.resolution.processedEntities 55 compiler.enqueuer.resolution.processedEntities
56 .forEach((AstElement element) { 56 .forEach((MemberElement element) {
57 // TODO(johnniwinther): Typedefs should never be in processedElements.
58 if (element.isTypedef) return;
59 ResolvedAst resolvedAst = element.resolvedAst; 57 ResolvedAst resolvedAst = element.resolvedAst;
60 if (element.isAbstract) return; 58 if (element.isAbstract) return;
61 if (element.isField && 59 if (element.isField &&
62 !element.isInstanceMember && 60 !element.isInstanceMember &&
63 resolvedAst.body == null) { 61 resolvedAst.body == null) {
64 // Skip top-level/static fields without an initializer. 62 // Skip top-level/static fields without an initializer.
65 return; 63 return;
66 } 64 }
67 computeClosureToClassMapping(resolvedAst, closedWorldRefiner); 65 computeClosureToClassMapping(resolvedAst, closedWorldRefiner);
68 }); 66 });
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 /// 1222 ///
1225 /// Move the below classes to a JS model eventually. 1223 /// Move the below classes to a JS model eventually.
1226 /// 1224 ///
1227 abstract class JSEntity implements Entity { 1225 abstract class JSEntity implements Entity {
1228 Entity get declaredEntity; 1226 Entity get declaredEntity;
1229 } 1227 }
1230 1228
1231 abstract class PrivatelyNamedJSEntity implements JSEntity { 1229 abstract class PrivatelyNamedJSEntity implements JSEntity {
1232 Entity get rootOfScope; 1230 Entity get rootOfScope;
1233 } 1231 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698