[dart2js] `Instantiation.==` and `Instantiation.hashCode`

Change-Id: Ic4e9c882b27a6490a913899d74141ff73c4aebab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210981
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
index bf10d09..509c0ef 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
@@ -16,7 +16,19 @@
   c=(f3, f2)]
 */
 
-/*two-frag|three-frag.library: 
+/*two-frag.library: 
+ a_pre_fragments=[
+  p1: {units: [3{c}, 1{b}], usedBy: [p2], needs: []},
+  p2: {units: [2{b, c}], usedBy: [], needs: [p1]}],
+ b_finalized_fragments=[
+  f1: [3{c}, 1{b}],
+  f2: [2{b, c}]],
+ c_steps=[
+  b=(f2, f1),
+  c=(f2, f1)]
+*/
+
+/*three-frag.library: 
  a_pre_fragments=[
   p1: {units: [1{b}], usedBy: [p3], needs: []},
   p2: {units: [3{c}], usedBy: [p3], needs: []},
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
index 0ba4442..2d808b3 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
@@ -16,7 +16,19 @@
   c=(f3, f2)]
 */
 
-/*two-frag|three-frag.library: 
+/*two-frag.library: 
+ a_pre_fragments=[
+  p1: {units: [3{c}, 1{b}], usedBy: [p2], needs: []},
+  p2: {units: [2{b, c}], usedBy: [], needs: [p1]}],
+ b_finalized_fragments=[
+  f1: [3{c}, 1{b}],
+  f2: [2{b, c}]],
+ c_steps=[
+  b=(f2, f1),
+  c=(f2, f1)]
+*/
+
+/*three-frag.library: 
  a_pre_fragments=[
   p1: {units: [1{b}], usedBy: [p3], needs: []},
   p2: {units: [3{c}], usedBy: [p3], needs: []},
diff --git a/sdk/lib/_internal/js_runtime/lib/instantiation.dart b/sdk/lib/_internal/js_runtime/lib/instantiation.dart
index da3fcbd..38c403d 100644
--- a/sdk/lib/_internal/js_runtime/lib/instantiation.dart
+++ b/sdk/lib/_internal/js_runtime/lib/instantiation.dart
@@ -22,6 +22,13 @@
     }
   }
 
+  bool operator ==(Object other) =>
+      other is Instantiation &&
+      this._genericClosure == other._genericClosure &&
+      this.runtimeType == other.runtimeType;
+
+  int get hashCode => Object.hash(_genericClosure, runtimeType);
+
   /// Returns a list of the bound types.
   List get _types;