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

Unified Diff: lib/compiler/implementation/types/types.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/types/types.dart
diff --git a/lib/compiler/implementation/types/types.dart b/lib/compiler/implementation/types/types.dart
index 428102b20eb1953fda6232ecf108596dba8d34b9..c41fd9347bc74802d6a27d1659d7390934cee236 100644
--- a/lib/compiler/implementation/types/types.dart
+++ b/lib/compiler/implementation/types/types.dart
@@ -68,7 +68,7 @@ class TypesTask extends CompilerTask {
FunctionElement function = holder;
FunctionSignature signature = function.computeSignature(compiler);
for (Element parameter in signature.requiredParameters) {
- if (types.isEmpty()) return null;
+ if (types.isEmpty) return null;
if (element == parameter) {
return new ConcreteType.singleton(new ClassBaseType(types.head));
}
@@ -165,7 +165,7 @@ class ConcreteTypeInferencer extends Visitor {
Link<Element> computeConcreteSendArguments(Send node) {
if (node.argumentsNode == null) return null;
- if (node.arguments.isEmpty()) return const Link<Element>();
+ if (node.arguments.isEmpty) return const Link<Element>();
if (node.receiver != null && concreteTypes[node.receiver] == null) {
return null;
}
@@ -226,14 +226,14 @@ class ConcreteTypeInferencer extends Visitor {
*/
Link<Element> computeLubs(Link<Element> a, Link<Element> b) {
LinkBuilder<Element> lubs = new LinkBuilder<Element>();
- while (!a.isEmpty() && !b.isEmpty()) {
+ while (!a.isEmpty && !b.isEmpty) {
Element lub = computeLub(a.head, b.head);
if (lub == null) return null;
lubs.addLast(lub);
a = a.tail;
b = b.tail;
}
- return (a.isEmpty() && b.isEmpty()) ? lubs.toLink() : null;
+ return (a.isEmpty && b.isEmpty) ? lubs.toLink() : null;
}
/**

Powered by Google App Engine
This is Rietveld 408576698