Index: pkg/compiler/lib/src/universe/function_set.dart |
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart |
index 9f13c1ea2293b8a2eecbd0fddca6ebbb9be8596b..ae42ac2dc80a10bc2d393e8953daf87c4bdfe37d 100644 |
--- a/pkg/compiler/lib/src/universe/function_set.dart |
+++ b/pkg/compiler/lib/src/universe/function_set.dart |
@@ -19,6 +19,8 @@ import '../world.dart' show |
import 'selector.dart' show |
Selector; |
+import 'universe.dart' show |
+ ReceiverConstraint; |
// TODO(kasperl): This actually holds getters and setters just fine |
// too and stricly they aren't functions. Maybe this needs a better |
@@ -64,22 +66,22 @@ class FunctionSet { |
/// Returns an object that allows iterating over all the functions |
/// that may be invoked with the given [selector]. |
- Iterable<Element> filter(Selector selector, TypeMask mask) { |
+ Iterable<Element> filter(Selector selector, ReceiverConstraint mask) { |
Siggi Cherem (dart-lang)
2015/11/12 01:10:59
rename all [mask] to [constraint]? or add TODO?
Harry Terkelsen
2015/11/12 01:25:40
Done.
|
return query(selector, mask).functions; |
} |
/// Returns the mask for the potential receivers of a dynamic call to |
/// [selector] on [mask]. |
/// |
- /// This will reduce the set of classes in [mask] to a [TypeMask] of the set |
+ /// This will narrow the constraints of [mask] to a [TypeMask] of the set |
/// of classes that actually implement the selected member or implement the |
/// handling 'noSuchMethod' where the selected member is unimplemented. |
- TypeMask receiverType(Selector selector, TypeMask mask) { |
+ TypeMask receiverType(Selector selector, ReceiverConstraint mask) { |
return query(selector, mask).computeMask(classWorld); |
} |
SelectorMask _createSelectorMask( |
- Selector selector, TypeMask mask, ClassWorld classWorld) { |
+ Selector selector, ReceiverConstraint mask, ClassWorld classWorld) { |
return mask != null |
? new SelectorMask(selector, mask) |
: new SelectorMask(selector, |
@@ -87,9 +89,9 @@ class FunctionSet { |
} |
/// Returns the set of functions that can be the target of a call to |
- /// [selector] on a receiver of type [mask] including 'noSuchMethod' methods |
- /// where applicable. |
- FunctionSetQuery query(Selector selector, TypeMask mask) { |
+ /// [selector] on a receiver constrained by [mask] including 'noSuchMethod' |
+ /// methods where applicable. |
+ FunctionSetQuery query(Selector selector, ReceiverConstraint mask) { |
String name = selector.name; |
SelectorMask selectorMask = _createSelectorMask(selector, mask, classWorld); |
SelectorMask noSuchMethodMask = |
@@ -119,10 +121,10 @@ class FunctionSet { |
/// a receiver of type [mask]. |
class SelectorMask { |
final Selector selector; |
- final TypeMask mask; |
+ final ReceiverConstraint mask; |
final int hashCode; |
- SelectorMask(Selector selector, TypeMask mask) |
+ SelectorMask(Selector selector, ReceiverConstraint mask) |
: this.selector = selector, |
this.mask = mask, |
this.hashCode = |