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

Unified Diff: pkg/compiler/lib/src/types/container_type_mask.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/types/constants.dart ('k') | pkg/compiler/lib/src/types/dictionary_type_mask.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/container_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/container_type_mask.dart b/pkg/compiler/lib/src/types/container_type_mask.dart
index c38a03ab5bc8bf2920f7c27c6d0e6810279f6215..6a6ad806bb987ab509da5fba925e1db8f0a55f3e 100644
--- a/pkg/compiler/lib/src/types/container_type_mask.dart
+++ b/pkg/compiler/lib/src/types/container_type_mask.dart
@@ -22,29 +22,20 @@ class ContainerTypeMask extends ForwardingTypeMask {
// The length of the container.
final int length;
- ContainerTypeMask(this.forwardTo,
- this.allocationNode,
- this.allocationElement,
- this.elementType,
- this.length);
+ ContainerTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+ this.elementType, this.length);
TypeMask nullable() {
return isNullable
? this
- : new ContainerTypeMask(forwardTo.nullable(),
- allocationNode,
- allocationElement,
- elementType,
- length);
+ : new ContainerTypeMask(forwardTo.nullable(), allocationNode,
+ allocationElement, elementType, length);
}
TypeMask nonNullable() {
return isNullable
- ? new ContainerTypeMask(forwardTo.nonNullable(),
- allocationNode,
- allocationElement,
- elementType,
- length)
+ ? new ContainerTypeMask(forwardTo.nonNullable(), allocationNode,
+ allocationElement, elementType, length)
: this;
}
@@ -62,9 +53,7 @@ class ContainerTypeMask extends ForwardingTypeMask {
TypeMask intersection(TypeMask other, ClassWorld classWorld) {
TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
- return forwardIntersection.isNullable
- ? nullable()
- : nonNullable();
+ return forwardIntersection.isNullable ? nullable() : nonNullable();
}
TypeMask union(other, ClassWorld classWorld) {
@@ -74,9 +63,9 @@ class ContainerTypeMask extends ForwardingTypeMask {
return other.isNullable ? other : this;
} else if (other.isEmptyOrNull) {
return other.isNullable ? this.nullable() : this;
- } else if (other.isContainer
- && elementType != null
- && other.elementType != null) {
+ } else if (other.isContainer &&
+ elementType != null &&
+ other.elementType != null) {
TypeMask newElementType =
elementType.union(other.elementType, classWorld);
int newLength = (length == other.length) ? length : null;
@@ -84,15 +73,17 @@ class ContainerTypeMask extends ForwardingTypeMask {
return new ContainerTypeMask(
newForwardTo,
allocationNode == other.allocationNode ? allocationNode : null,
- allocationElement == other.allocationElement ? allocationElement
- : null,
- newElementType, newLength);
+ allocationElement == other.allocationElement
+ ? allocationElement
+ : null,
+ newElementType,
+ newLength);
} else {
return forwardTo.union(other, classWorld);
}
}
- bool operator==(other) => super == other;
+ bool operator ==(other) => super == other;
int get hashCode {
return computeHashCode(
« no previous file with comments | « pkg/compiler/lib/src/types/constants.dart ('k') | pkg/compiler/lib/src/types/dictionary_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698