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

Side by Side Diff: pkg/compiler/lib/src/universe/function_set.dart

Issue 1224753002: Remove ClassWorld.subclassesOf and ClassWorld.subtypesOf. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/types/union_type_mask.dart ('k') | pkg/compiler/lib/src/world.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 part of universe; 5 part of universe;
6 6
7 // TODO(kasperl): This actually holds getters and setters just fine 7 // TODO(kasperl): This actually holds getters and setters just fine
8 // too and stricly they aren't functions. Maybe this needs a better 8 // too and stricly they aren't functions. Maybe this needs a better
9 // name -- something like ElementSet seems a bit too generic. 9 // name -- something like ElementSet seems a bit too generic.
10 class FunctionSet { 10 class FunctionSet {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 const FunctionSetQuery(this.functions); 236 const FunctionSetQuery(this.functions);
237 } 237 }
238 238
239 class FullFunctionSetQuery extends FunctionSetQuery { 239 class FullFunctionSetQuery extends FunctionSetQuery {
240 TypeMask _mask; 240 TypeMask _mask;
241 241
242 /** 242 /**
243 * Compute the type of all potential receivers of this function set. 243 * Compute the type of all potential receivers of this function set.
244 */ 244 */
245 TypeMask computeMask(ClassWorld classWorld) { 245 TypeMask computeMask(ClassWorld classWorld) {
246 assert(classWorld.hasAnySubclass(classWorld.objectClass)); 246 assert(classWorld.hasAnyStrictSubclass(classWorld.objectClass));
247 if (_mask != null) return _mask; 247 if (_mask != null) return _mask;
248 return _mask = new TypeMask.unionOf(functions 248 return _mask = new TypeMask.unionOf(functions
249 .expand((element) { 249 .expand((element) {
250 ClassElement cls = element.enclosingClass; 250 ClassElement cls = element.enclosingClass;
251 return [cls]..addAll(classWorld.mixinUsesOf(cls)); 251 return [cls]..addAll(classWorld.mixinUsesOf(cls));
252 }) 252 })
253 .map((cls) { 253 .map((cls) {
254 if (classWorld.backend.isNullImplementation(cls)) { 254 if (classWorld.backend.isNullImplementation(cls)) {
255 return const TypeMask.empty(); 255 return const TypeMask.empty();
256 } else { 256 } else {
257 return new TypeMask.nonNullSubclass(cls.declaration, classWorld); 257 return new TypeMask.nonNullSubclass(cls.declaration, classWorld);
258 } 258 }
259 }), 259 }),
260 classWorld); 260 classWorld);
261 } 261 }
262 262
263 FullFunctionSetQuery(functions) : super(functions); 263 FullFunctionSetQuery(functions) : super(functions);
264 } 264 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/types/union_type_mask.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698