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

Unified Diff: pkg/compiler/lib/src/universe/member_usage.dart

Issue 2913713004: Add model test of CodegenWorldBuilder to compile_from_dill_test (Closed)
Patch Set: Created 3 years, 7 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: pkg/compiler/lib/src/universe/member_usage.dart
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 08b37c96f5e2f2e76ffc2d5eb4a6ec66521dff7d..b58e5a28a14737a6dd1f0088a60695f3d5aaf0ab 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -21,6 +21,15 @@ abstract class _AbstractUsage<T> {
/// `true` if the [appliedUse] is non-empty.
bool get hasUse => appliedUse.isNotEmpty;
+
+ int get hashCode => _originalUse.hashCode * 13 + _pendingUse.hashCode * 17;
+
+ bool operator ==(other) {
+ if (identical(this, other)) return true;
+ if (other is! _AbstractUsage) return false;
+ return _originalUse.value == other._originalUse.value &&
+ _pendingUse.value == other._pendingUse.value;
+ }
}
/// Registry for the observed use of a member [entity] in the open world.

Powered by Google App Engine
This is Rietveld 408576698