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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/universe/universe.dart

Issue 1259553002: Emit program and dependency information as relations in a Prolog database. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
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 '../elements/elements.dart'; 7 import '../elements/elements.dart';
8 import '../dart2jslib.dart'; 8 import '../dart2jslib.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../types/types.dart'; 10 import '../types/types.dart';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool hasMatchingSelector(Set<Selector> selectors, 75 bool hasMatchingSelector(Set<Selector> selectors,
76 Element member, 76 Element member,
77 Compiler compiler) { 77 Compiler compiler) {
78 if (selectors == null) return false; 78 if (selectors == null) return false;
79 for (Selector selector in selectors) { 79 for (Selector selector in selectors) {
80 if (selector.appliesUnnamed(member, compiler)) return true; 80 if (selector.appliesUnnamed(member, compiler)) return true;
81 } 81 }
82 return false; 82 return false;
83 } 83 }
84 84
85 Iterable<Selector> getMatchingSelectors(Element member, Compiler compiler) {
86 return invokedNames[member.name].where((Selector selector) {
87 return selector.appliesUnnamed(member, compiler);
88 });
89 }
90
85 bool hasInvocation(Element member, Compiler compiler) { 91 bool hasInvocation(Element member, Compiler compiler) {
86 return hasMatchingSelector(invokedNames[member.name], member, compiler); 92 return hasMatchingSelector(invokedNames[member.name], member, compiler);
87 } 93 }
88 94
89 bool hasInvokedGetter(Element member, Compiler compiler) { 95 bool hasInvokedGetter(Element member, Compiler compiler) {
90 return hasMatchingSelector(invokedGetters[member.name], member, compiler); 96 return hasMatchingSelector(invokedGetters[member.name], member, compiler);
91 } 97 }
92 98
93 bool hasInvokedSetter(Element member, Compiler compiler) { 99 bool hasInvokedSetter(Element member, Compiler compiler) {
94 return hasMatchingSelector(invokedSetters[member.name], member, compiler); 100 return hasMatchingSelector(invokedSetters[member.name], member, compiler);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 682 }
677 683
678 Selector extendIfReachesAll(Compiler compiler) { 684 Selector extendIfReachesAll(Compiler compiler) {
679 bool canReachAll = compiler.enabledInvokeOn 685 bool canReachAll = compiler.enabledInvokeOn
680 && mask.needsNoSuchMethodHandling(this, compiler); 686 && mask.needsNoSuchMethodHandling(this, compiler);
681 return canReachAll 687 return canReachAll
682 ? new TypedSelector(compiler.typesTask.dynamicType, this) 688 ? new TypedSelector(compiler.typesTask.dynamicType, this)
683 : this; 689 : this;
684 } 690 }
685 } 691 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698