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

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

Issue 2613833005: Use entities in the TypeMask interface. (Closed)
Patch Set: dartfmt Created 3 years, 11 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; 5 library universe;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../cache_strategy.dart'; 9 import '../cache_strategy.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 /// class A { 74 /// class A {
75 /// foo(a, b) {} 75 /// foo(a, b) {}
76 /// } 76 /// }
77 /// class B { 77 /// class B {
78 /// foo(a, b) {} 78 /// foo(a, b) {}
79 /// } 79 /// }
80 /// new A().foo(a, b); 80 /// new A().foo(a, b);
81 /// 81 ///
82 /// Ideally the selector constraints for calls `foo` with two positional 82 /// Ideally the selector constraints for calls `foo` with two positional
83 /// arguments apply to `A.foo` but `B.foo`. 83 /// arguments apply to `A.foo` but `B.foo`.
84 bool applies(Element element, Selector selector, World world); 84 bool applies(MemberElement element, Selector selector, World world);
85 85
86 /// Returns `true` if at least one of the receivers matching these constraints 86 /// Returns `true` if at least one of the receivers matching these constraints
87 /// in the closed [world] have no implementation matching [selector]. 87 /// in the closed [world] have no implementation matching [selector].
88 /// 88 ///
89 /// For instance for this code snippet 89 /// For instance for this code snippet
90 /// 90 ///
91 /// class A {} 91 /// class A {}
92 /// class B { foo() {} } 92 /// class B { foo() {} }
93 /// m(b) => (b ? new A() : new B()).foo(); 93 /// m(b) => (b ? new A() : new B()).foo();
94 /// 94 ///
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 @override 1966 @override
1967 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC; 1967 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC;
1968 } 1968 }
1969 1969
1970 void removeFromSet(Map<String, Set<_MemberUsage>> map, Element element) { 1970 void removeFromSet(Map<String, Set<_MemberUsage>> map, Element element) {
1971 Set<_MemberUsage> set = map[element.name]; 1971 Set<_MemberUsage> set = map[element.name];
1972 if (set == null) return; 1972 if (set == null) return;
1973 set.removeAll( 1973 set.removeAll(
1974 set.where((_MemberUsage usage) => usage.entity == element).toList()); 1974 set.where((_MemberUsage usage) => usage.entity == element).toList());
1975 } 1975 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698