Index: lib/compiler/implementation/universe.dart |
diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart |
index cbe0b532a173254114c9a289b38fb4bebad67bfe..1428ae1f272acd93444ab0bcf84a64687e598016 100644 |
--- a/lib/compiler/implementation/universe.dart |
+++ b/lib/compiler/implementation/universe.dart |
@@ -163,6 +163,14 @@ class Selector implements Hashable { |
bool isUnaryOperator() => isOperator() && argumentCount == 0; |
bool isBinaryOperator() => isOperator() && argumentCount == 1; |
+ /** Check whether this is a call to 'assert' with one positional parameter. */ |
+ bool isAssertSyntax() { |
+ return (isCall() && |
+ name == const SourceString("assert") && |
ahe
2012/09/06 22:25:53
name.stringValue === 'assert'
Lasse Reichstein Nielsen
2012/09/07 10:18:57
Done.
|
+ argumentCount == 1 && |
+ namedArgumentCount == 0); |
+ } |
+ |
int hashCode() => argumentCount + 1000 * namedArguments.length; |
int get namedArgumentCount => namedArguments.length; |
int get positionalArgumentCount => argumentCount - namedArgumentCount; |
@@ -297,8 +305,9 @@ class Selector implements Hashable { |
bool operator ==(other) { |
if (other is !Selector) return false; |
- return receiverType === other.receiverType |
- && equalsUntyped(other); |
+ Selector otherSelector = other; |
ahe
2012/09/06 22:25:53
This change is unnecessary and doesn't improve rea
Lasse Reichstein Nielsen
2012/09/07 10:18:57
Done.
|
+ return receiverType === otherSelector.receiverType |
+ && equalsUntyped(otherSelector); |
} |
bool equalsUntyped(Selector other) { |