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

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

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 years 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 bool hasInvokedGetter(Element member, Compiler compiler) { 87 bool hasInvokedGetter(Element member, Compiler compiler) {
88 return hasMatchingSelector(invokedGetters[member.name], member, compiler); 88 return hasMatchingSelector(invokedGetters[member.name], member, compiler);
89 } 89 }
90 90
91 bool hasInvokedSetter(Element member, Compiler compiler) { 91 bool hasInvokedSetter(Element member, Compiler compiler) {
92 return hasMatchingSelector(invokedSetters[member.name], member, compiler); 92 return hasMatchingSelector(invokedSetters[member.name], member, compiler);
93 } 93 }
94 94
95 bool hasFieldGetter(Element member, Compiler compiler) {
96 return fieldGetters.contains(member);
97 }
98
99 bool hasFieldSetter(Element member, Compiler compiler) {
100 return fieldSetters.contains(member);
101 }
102
103 DartType registerIsCheck(DartType type, Compiler compiler) { 95 DartType registerIsCheck(DartType type, Compiler compiler) {
104 type = type.unalias(compiler); 96 type = type.unalias(compiler);
105 // Even in checked mode, type annotations for return type and argument 97 // Even in checked mode, type annotations for return type and argument
106 // types do not imply type checks, so there should never be a check 98 // types do not imply type checks, so there should never be a check
107 // against the type variable of a typedef. 99 // against the type variable of a typedef.
108 isChecks.add(type); 100 isChecks.add(type);
109 return type; 101 return type;
110 } 102 }
111 } 103 }
112 104
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 bool isClosureCall() { 263 bool isClosureCall() {
272 String callName = Compiler.CALL_OPERATOR_NAME; 264 String callName = Compiler.CALL_OPERATOR_NAME;
273 return isCall() && name == callName; 265 return isCall() && name == callName;
274 } 266 }
275 267
276 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; 268 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1;
277 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2 ; 269 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2 ;
278 270
279 bool isOperator() => identical(kind, SelectorKind.OPERATOR); 271 bool isOperator() => identical(kind, SelectorKind.OPERATOR);
280 bool isUnaryOperator() => isOperator() && argumentCount == 0; 272 bool isUnaryOperator() => isOperator() && argumentCount == 0;
281 bool isBinaryOperator() => isOperator() && argumentCount == 1;
282 273
283 /** Check whether this is a call to 'assert'. */ 274 /** Check whether this is a call to 'assert'. */
284 bool isAssert() => isCall() && identical(name, "assert"); 275 bool isAssert() => isCall() && identical(name, "assert");
285 276
286 int get namedArgumentCount => namedArguments.length; 277 int get namedArgumentCount => namedArguments.length;
287 int get positionalArgumentCount => argumentCount - namedArgumentCount; 278 int get positionalArgumentCount => argumentCount - namedArgumentCount;
288 279
289 bool get hasExactMask => false; 280 bool get hasExactMask => false;
290 TypeMask get mask => null; 281 TypeMask get mask => null;
291 Selector get asUntyped => this; 282 Selector get asUntyped => this;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 654 }
664 655
665 Selector extendIfReachesAll(Compiler compiler) { 656 Selector extendIfReachesAll(Compiler compiler) {
666 bool canReachAll = compiler.enabledInvokeOn 657 bool canReachAll = compiler.enabledInvokeOn
667 && mask.needsNoSuchMethodHandling(this, compiler); 658 && mask.needsNoSuchMethodHandling(this, compiler);
668 return canReachAll 659 return canReachAll
669 ? new TypedSelector(compiler.typesTask.dynamicType, this) 660 ? new TypedSelector(compiler.typesTask.dynamicType, this)
670 : this; 661 : this;
671 } 662 }
672 } 663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698