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

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

Issue 2912083002: Add compile_from_dill test (Closed)
Patch Set: 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
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 dart2js.world; 5 library dart2js.world;
6 6
7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX; 7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX;
8 import 'common.dart'; 8 import 'common.dart';
9 import 'constants/constant_system.dart'; 9 import 'constants/constant_system.dart';
10 import 'common_elements.dart' show CommonElements; 10 import 'common_elements.dart' show CommonElements;
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 return getMightBePassedToApply(element.expression); 1113 return getMightBePassedToApply(element.expression);
1114 } 1114 }
1115 return _functionsThatMightBePassedToApply.contains(element); 1115 return _functionsThatMightBePassedToApply.contains(element);
1116 } 1116 }
1117 1117
1118 @override 1118 @override
1119 bool getCurrentlyKnownMightBePassedToApply(Entity element) { 1119 bool getCurrentlyKnownMightBePassedToApply(Entity element) {
1120 return getMightBePassedToApply(element); 1120 return getMightBePassedToApply(element);
1121 } 1121 }
1122 1122
1123 // TODO(johnniwinther): Support [cls] as a [ClassEntity]. 1123 // TODO(johnniwinther): Support [cls] as a [ClassEntity].
Siggi Cherem (dart-lang) 2017/05/30 22:34:42 nit: move the TODO to the `if` below
Johnni Winther 2017/05/31 09:08:40 Done.
1124 @override 1124 @override
1125 String dump([ClassElement cls]) { 1125 String dump([ClassEntity cls]) {
1126 StringBuffer sb = new StringBuffer(); 1126 StringBuffer sb = new StringBuffer();
1127 if (cls != null) { 1127 if (cls != null) {
1128 sb.write("Classes in the closed world related to $cls:\n"); 1128 sb.write("Classes in the closed world related to $cls:\n");
1129 } else { 1129 } else {
1130 sb.write("Instantiated classes in the closed world:\n"); 1130 sb.write("Instantiated classes in the closed world:\n");
1131 } 1131 }
1132 if (cls is! ClassElement) {
Siggi Cherem (dart-lang) 2017/05/30 22:34:43 should we just do this upfront instead?
Johnni Winther 2017/05/31 09:08:40 Done.
1133 cls = null;
1134 }
1132 getClassHierarchyNode(commonElements.objectClass) 1135 getClassHierarchyNode(commonElements.objectClass)
1133 .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls); 1136 .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls);
1134 return sb.toString(); 1137 return sb.toString();
1135 } 1138 }
1136 } 1139 }
1137 1140
1138 class ClosedWorldImpl extends ClosedWorldBase { 1141 class ClosedWorldImpl extends ClosedWorldBase {
1139 ClosedWorldImpl( 1142 ClosedWorldImpl(
1140 {CommonElements commonElements, 1143 {CommonElements commonElements,
1141 ConstantSystem constantSystem, 1144 ConstantSystem constantSystem,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 @override 1361 @override
1359 void registerClosureClass(ClassElement cls) { 1362 void registerClosureClass(ClassElement cls) {
1360 throw new UnimplementedError('KernelClosedWorld.registerClosureClass'); 1363 throw new UnimplementedError('KernelClosedWorld.registerClosureClass');
1361 } 1364 }
1362 1365
1363 @override 1366 @override
1364 bool hasElementIn(ClassEntity cls, Selector selector, Entity element) { 1367 bool hasElementIn(ClassEntity cls, Selector selector, Entity element) {
1365 throw new UnimplementedError('KernelClosedWorld.hasElementIn'); 1368 throw new UnimplementedError('KernelClosedWorld.hasElementIn');
1366 } 1369 }
1367 } 1370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698