| Index: pkg/compiler/lib/src/universe/use.dart
|
| diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
|
| index a398ad99a04ea03d9c5b80c2afa3d0c2501fdd56..a59e162d86f046d36944446eea603f420f6e8080 100644
|
| --- a/pkg/compiler/lib/src/universe/use.dart
|
| +++ b/pkg/compiler/lib/src/universe/use.dart
|
| @@ -8,11 +8,56 @@ import '../closure.dart' show
|
| BoxFieldElement;
|
| import '../common.dart';
|
| import '../elements/elements.dart';
|
| +import '../world.dart' show
|
| + ClassWorld;
|
| import '../util/util.dart' show
|
| Hashing;
|
|
|
| import 'call_structure.dart' show
|
| CallStructure;
|
| +import 'selector.dart' show
|
| + Selector;
|
| +import 'universe.dart' show
|
| + ReceiverConstraint;
|
| +
|
| +
|
| +enum DynamicUseKind {
|
| + INVOKE,
|
| + GET,
|
| + SET,
|
| +}
|
| +
|
| +class DynamicUse {
|
| + final Selector selector;
|
| + final ReceiverConstraint mask;
|
| +
|
| + DynamicUse(this.selector, this.mask);
|
| +
|
| + bool appliesUnnamed(Element element, ClassWorld world) {
|
| + return selector.appliesUnnamed(element, world) &&
|
| + (mask == null || mask.canHit(element, selector, world));
|
| + }
|
| +
|
| + DynamicUseKind get kind {
|
| + if (selector.isGetter) {
|
| + return DynamicUseKind.GET;
|
| + } else if (selector.isSetter) {
|
| + return DynamicUseKind.SET;
|
| + } else {
|
| + return DynamicUseKind.INVOKE;
|
| + }
|
| + }
|
| +
|
| + int get hashCode => selector.hashCode * 13 + mask.hashCode * 17;
|
| +
|
| + bool operator ==(other) {
|
| + if (identical(this, other)) return true;
|
| + if (other is! DynamicUse) return false;
|
| + return selector == other.selector && mask == other.mask;
|
| + }
|
| +
|
| + String toString() => '$selector,$mask';
|
| +}
|
|
|
| enum StaticUseKind {
|
| GENERAL,
|
|
|