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

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

Issue 2320583002: Introduce OpenWorld. (Closed)
Patch Set: Created 4 years, 3 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 universe.function_set; 5 library universe.function_set;
6 6
7 import '../common/names.dart' show Identifiers, Selectors; 7 import '../common/names.dart' show Identifiers, Selectors;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../types/types.dart'; 10 import '../types/types.dart';
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 : this.selector = selector, 118 : this.selector = selector,
119 this.constraint = constraint, 119 this.constraint = constraint,
120 this.hashCode = 120 this.hashCode =
121 Hashing.mixHashCodeBits(selector.hashCode, constraint.hashCode) { 121 Hashing.mixHashCodeBits(selector.hashCode, constraint.hashCode) {
122 assert(constraint != null); 122 assert(constraint != null);
123 } 123 }
124 124
125 String get name => selector.name; 125 String get name => selector.name;
126 126
127 bool applies(Element element, ClassWorld classWorld) { 127 bool applies(Element element, ClassWorld classWorld) {
128 if (!selector.appliesUnnamed(element, classWorld)) return false; 128 if (!selector.appliesUnnamed(element, classWorld.backend)) return false;
129 return constraint.canHit(element, selector, classWorld); 129 return constraint.canHit(element, selector, classWorld);
130 } 130 }
131 131
132 bool needsNoSuchMethodHandling(ClassWorld classWorld) { 132 bool needsNoSuchMethodHandling(ClassWorld classWorld) {
133 return constraint.needsNoSuchMethodHandling(selector, classWorld); 133 return constraint.needsNoSuchMethodHandling(selector, classWorld);
134 } 134 }
135 135
136 bool operator ==(other) { 136 bool operator ==(other) {
137 if (identical(this, other)) return true; 137 if (identical(this, other)) return true;
138 return selector == other.selector && constraint == other.constraint; 138 return selector == other.selector && constraint == other.constraint;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } else if (classWorld.isInstantiated(cls.declaration)) { 290 } else if (classWorld.isInstantiated(cls.declaration)) {
291 return new TypeMask.nonNullSubclass(cls.declaration, classWorld); 291 return new TypeMask.nonNullSubclass(cls.declaration, classWorld);
292 } else { 292 } else {
293 // TODO(johnniwinther): Avoid the need for this case. 293 // TODO(johnniwinther): Avoid the need for this case.
294 return const TypeMask.empty(); 294 return const TypeMask.empty();
295 } 295 }
296 }), 296 }),
297 classWorld); 297 classWorld);
298 } 298 }
299 } 299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698