Revert "[dart2js] Make more use of kernel's static type"

This reverts commit 1057e5575f7565a94d8ef446cc5b462cd4660b31.

Reason for revert: Breakage in product test

Original change's description:
> [dart2js] Make more use of kernel's static type
>
> This change helps with one hang-over from Dart 1.
>
> In code like `a[i] == 1`, the type of the indexed element was inferred
> as the element type of `a`. This was great if `a` was a traced List,
> but too general if the provenance of `a` is unknown, since the general
> element type over all lists is 'top'.
>
> Dart 3 gives much better guarantees than Dart 1. We can now rely on
> the front-end inferred type for `a[i]`. To do so, we track the
> abstract value contraint for the type through SSA so that SSA-level
> type propagation can re-apply the constraint.
>
> This removes about 100 interceptor calls from the main unit of some
> large ACX apps.
>
> Change-Id: I6839a6045d9341633c08678affb35fdb2998a96d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379145
> Reviewed-by: Mayank Patke <fishythefish@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>

Change-Id: I5e2b9fde9ffd7d79332fd493649e8f342219c8ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379667
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 8bb1591..eb7b00b 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -385,13 +385,6 @@
     return _elementMap.getDartType(type);
   }
 
-  DartType _getStaticForInElementType(ir.ForInStatement node) {
-    // TODO(johnniwinther): Substitute the type by the this type and type
-    // arguments of the current frame.
-    ir.DartType type = node.getElementType(_currentFrame!.staticTypeContext!);
-    return _elementMap.getDartType(type);
-  }
-
   static MemberEntity _effectiveTargetElementFor(MemberEntity member) {
     if (member is JGeneratorBody) return member.function;
     return member;
@@ -2364,12 +2357,6 @@
       // the condition.
       HInstruction value = HIndex(array, index, type)
         ..sourceInformation = sourceInformation;
-      final staticType = _abstractValueDomain
-          .createFromStaticType(_getStaticForInElementType(node),
-              nullable: true)
-          .abstractValue;
-      value.instructionType =
-          _abstractValueDomain.intersection(value.instructionType, staticType);
       add(value);
 
       Local loopVariableLocal = _localsMap.getLocalVariable(node.variable);
@@ -5754,15 +5741,6 @@
       invoke.isInvariant = node.isInvariant;
       invoke.isBoundsSafe = node.isBoundsSafe;
     }
-    if (node is ir.InstanceInvocation || node is ir.FunctionInvocation) {
-      final staticType = _abstractValueDomain
-          .createFromStaticType(_getStaticType(node as ir.Expression),
-              nullable: true)
-          .abstractValue;
-      invoke.staticType = staticType;
-      invoke.instructionType =
-          _abstractValueDomain.intersection(resultType, staticType);
-    }
     push(invoke);
     if (element != null &&
         _abstractValueDomain.isNull(resultType).isDefinitelyFalse) {
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index d5b028d..e72309a 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1808,9 +1808,6 @@
   AbstractValue _receiverType;
   final AbstractValue _originalReceiverType;
 
-  /// Static type at call-site, often better than union-over-targets.
-  AbstractValue? staticType;
-
   /// `true` if the type parameters at the call known to be invariant with
   /// respect to the type parameters of the receiver instance. This corresponds
   /// to the [ir.MethodInvocation.isInvariant] property and may be updated with
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index 75c36dd..09a271d 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -440,13 +440,8 @@
       }
     }
 
-    var result = instruction.specializer
+    return instruction.specializer
         .computeTypeFromInputTypes(instruction, results, closedWorld);
-    if (instruction.staticType != null) {
-      result =
-          abstractValueDomain.intersection(result, instruction.staticType!);
-    }
-    return result;
   }
 
   @override
diff --git a/pkg/compiler/test/codegen/builtin_equals_test.dart b/pkg/compiler/test/codegen/builtin_equals_test.dart
new file mode 100644
index 0000000..a31fd38
--- /dev/null
+++ b/pkg/compiler/test/codegen/builtin_equals_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+import '../helpers/compiler_helper.dart';
+
+const String TEST = r"""
+foo() {
+  String? s = Object()?.toString();
+  Object? o = Object()?.toString();
+  return s == 'foo'
+    && s == null
+    && null == s
+    && null == o;
+}
+""";
+
+main() {
+  test() async {
+    await compile(TEST, entry: 'foo', enableTypeAssertions: true,
+        check: (String generated) {
+      Expect.isTrue(!generated.contains('eqB'));
+
+      RegExp regexp = RegExp('==');
+      Iterator<Match> matches = regexp.allMatches(generated).iterator;
+      // `s == null` and `null == s` now both encoded as `s == null` allowing
+      // the second to be optimized away.
+      checkNumberOfMatches(matches, 3);
+    });
+  }
+
+  asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
+    await test();
+  });
+}
diff --git a/pkg/compiler/test/codegen/data/equals.dart b/pkg/compiler/test/codegen/data/equals.dart
deleted file mode 100644
index d8943ab..0000000
--- a/pkg/compiler/test/codegen/data/equals.dart
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Primitive '==' tests compile to '===', or '==' when both sides can be null.
-
-/*member: test1a:function(value) {
-  return value == null;
-}*/
-test1a(int? value) {
-  return value == null;
-}
-
-/*member: test1b:function(value) {
-  return value == null;
-}*/
-test1b(int? value) {
-  return null == value;
-}
-
-/*member: test2a:function(value) {
-  return value === 1;
-}*/
-test2a(int? value) {
-  return value == 1;
-}
-
-/*member: test2b:function(value) {
-  return 1 === value;
-}*/
-test2b(int? value) {
-  return 1 == value;
-}
-
-/*member: test3a:function(value) {
-  return value === "foo";
-}*/
-test3a(String? value) {
-  return value == 'foo';
-}
-
-/*member: test3b:function(value) {
-  return "foo" === value;
-}*/
-test3b(String? value) {
-  return 'foo' == value;
-}
-
-/*member: test4a:function(value) {
-  return value === 1;
-}*/
-test4a(int value) {
-  return value == 1;
-}
-
-/*member: test4b:function(value) {
-  return 1 === value;
-}*/
-test4b(int value) {
-  return 1 == value;
-}
-
-/*member: test5:function(x, y) {
-  return x === y;
-}*/
-test5(int x, int y) {
-  return x == y;
-}
-
-/*member: test6:function(x, y) {
-  return x == y;
-}*/
-test6(int? x, int? y) {
-  return x == y;
-}
-
-/*member: test7a:function(value) {
-  return value === "foo";
-}*/
-test7a(String value) {
-  return value == 'foo';
-}
-
-/*member: test7b:function(value) {
-  return "foo" === value;
-}*/
-test7b(String value) {
-  return 'foo' == value;
-}
-
-/*member: test8:function(a, b) {
-  return a === b;
-}*/
-test8(String a, String b) {
-  return a == b;
-}
-
-/*member: test9:function(a, b) {
-  return a == b;
-}*/
-test9(String? a, String? b) {
-  return a == b;
-}
-
-/*member: main:ignore*/
-@pragma('dart2js:disable-inlining')
-main() {
-  test1a(-1);
-  test1a(1);
-  test1a(null);
-  test1b(-1);
-  test1b(1);
-  test1b(null);
-
-  test2a(-1);
-  test2a(1);
-  test2a(null);
-  test2b(-1);
-  test2b(1);
-  test2b(null);
-
-  test3a('x');
-  test3a('y');
-  test3a(null);
-  test3b('x');
-  test3b('y');
-  test3b(null);
-
-  test4a(-1);
-  test4a(1);
-  test4b(-1);
-  test4b(1);
-
-  test5(1, -1);
-  test5(1, 1);
-  test5(-1, 1);
-  test5(-1, -1);
-
-  test6(null, -1);
-  test6(1, -1);
-  test6(1, 1);
-  test6(-1, 1);
-  test6(-1, null);
-
-  test7a('foo');
-  test7a('bar');
-  test7b('foo');
-  test7b('bar');
-
-  test8('foo', 'bar');
-  test8('foo', 'foo');
-  test8('bar', 'foo');
-  test8('bar', 'bar');
-
-  test9(null, 'foo');
-  test9(null, null);
-  test9('foo', 'foo');
-  test9('foo', 'bar');
-  test9('bar', null);
-}
diff --git a/pkg/compiler/test/dump_info/data/closures.dart b/pkg/compiler/test/dump_info/data/closures.dart
index 2077999..6bded67 100644
--- a/pkg/compiler/test/dump_info/data/closures.dart
+++ b/pkg/compiler/test/dump_info/data/closures.dart
@@ -1,67 +1,4 @@
-/*spec.library: 
- constant=[
-  {
-  "id": "constant/B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 131,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n"
-},
-  {
-  "id": "constant/B.Interceptor_methods = J.Interceptor.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 49,
-  "outputUnit": "outputUnit/main",
-  "code": "B.Interceptor_methods = J.Interceptor.prototype;\n"
-},
-  {
-  "id": "constant/B.JSArray_methods = J.JSArray.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 41,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JSArray_methods = J.JSArray.prototype;\n"
-},
-  {
-  "id": "constant/B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 59,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n"
-}],
- deferredFiles=[{}],
- dependencies=[{}],
- library=[{
-  "id": "library/memory:sdk/tests/web/native/main.dart::",
-  "kind": "library",
-  "name": "<unnamed>",
-  "size": 12352,
-  "children": [
-    "class/memory:sdk/tests/web/native/main.dart::Class1",
-    "function/memory:sdk/tests/web/native/main.dart::main",
-    "function/memory:sdk/tests/web/native/main.dart::nested",
-    "function/memory:sdk/tests/web/native/main.dart::nested2",
-    "function/memory:sdk/tests/web/native/main.dart::siblings",
-    "function/memory:sdk/tests/web/native/main.dart::topLevelMethod1",
-    "function/memory:sdk/tests/web/native/main.dart::topLevelMethod2",
-    "function/memory:sdk/tests/web/native/main.dart::topLevelMethod3",
-    "function/memory:sdk/tests/web/native/main.dart::topLevelMethod4",
-    "function/memory:sdk/tests/web/native/main.dart::twoLocals"
-  ],
-  "canonicalUri": "memory:sdk/tests/web/native/main.dart"
-}],
- outputUnits=[{
-  "id": "outputUnit/main",
-  "kind": "outputUnit",
-  "name": "main",
-  "filename": "out",
-  "imports": []
-}]
-*/
-/*kernel.library: 
+/*library: 
  constant=[
   {
   "id": "constant/B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n",
@@ -1927,139 +1864,7 @@
   x();
 }
 
-/*spec.member: nested2:
- closure=[
-  {
-  "id": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1",
-  "kind": "closure",
-  "name": "nested2_local1",
-  "size": 195,
-  "outputUnit": "outputUnit/main",
-  "parent": "function/memory:sdk/tests/web/native/main.dart::nested2",
-  "function": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1.call"
-},
-  {
-  "id": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1__closure",
-  "kind": "closure",
-  "name": "nested2_local1__closure",
-  "size": 193,
-  "outputUnit": "outputUnit/main",
-  "parent": "function/memory:sdk/tests/web/native/main.dart::nested2",
-  "function": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1__closure.call"
-},
-  {
-  "id": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1_closure",
-  "kind": "closure",
-  "name": "nested2_local1_closure",
-  "size": 232,
-  "outputUnit": "outputUnit/main",
-  "parent": "function/memory:sdk/tests/web/native/main.dart::nested2",
-  "function": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1_closure.call"
-}],
- function=[
-  {
-  "id": "function/memory:sdk/tests/web/native/main.dart::nested2",
-  "kind": "function",
-  "name": "nested2",
-  "size": 685,
-  "outputUnit": "outputUnit/main",
-  "parent": "library/memory:sdk/tests/web/native/main.dart::",
-  "children": [
-    "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1",
-    "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1__closure",
-    "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1_closure"
-  ],
-  "modifiers": {
-    "static": false,
-    "const": false,
-    "factory": false,
-    "external": false
-  },
-  "returnType": "dynamic",
-  "inferredReturnType": "[null]",
-  "parameters": [],
-  "sideEffects": "SideEffects(reads anything; writes anything)",
-  "inlinedCount": 0,
-  "code": "nested2() {\n      A.print(new A.nested2_local1().call$0());\n    }",
-  "type": "dynamic Function()",
-  "functionKind": 0
-},
-  {
-  "id": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1.call",
-  "kind": "function",
-  "name": "call",
-  "size": 70,
-  "outputUnit": "outputUnit/main",
-  "parent": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1",
-  "children": [],
-  "modifiers": {
-    "static": false,
-    "const": false,
-    "factory": false,
-    "external": false
-  },
-  "returnType": "int",
-  "inferredReturnType": "[subclass=JSInt]",
-  "parameters": [],
-  "sideEffects": "SideEffects(reads anything; writes anything)",
-  "inlinedCount": 0,
-  "code": "call$0() {\n      return new A.nested2_local1_closure().call$0();\n    }",
-  "type": "int Function()",
-  "functionKind": 2
-},
-  {
-  "id": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1__closure.call",
-  "kind": "function",
-  "name": "call",
-  "size": 32,
-  "outputUnit": "outputUnit/main",
-  "parent": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1__closure",
-  "children": [],
-  "modifiers": {
-    "static": false,
-    "const": false,
-    "factory": false,
-    "external": false
-  },
-  "returnType": "int",
-  "inferredReturnType": "[exact=JSUInt31]",
-  "parameters": [],
-  "sideEffects": "SideEffects(reads nothing; writes nothing)",
-  "inlinedCount": 0,
-  "code": "call$0() {\n      return 2;\n    }",
-  "type": "int Function()",
-  "functionKind": 2
-},
-  {
-  "id": "function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1_closure.call",
-  "kind": "function",
-  "name": "call",
-  "size": 75,
-  "outputUnit": "outputUnit/main",
-  "parent": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1_closure",
-  "children": [],
-  "modifiers": {
-    "static": false,
-    "const": false,
-    "factory": false,
-    "external": false
-  },
-  "returnType": "int",
-  "inferredReturnType": "[subclass=JSInt]",
-  "parameters": [],
-  "sideEffects": "SideEffects(reads anything; writes anything)",
-  "inlinedCount": 0,
-  "code": "call$0() {\n      return 1 + new A.nested2_local1__closure().call$0();\n    }",
-  "type": "int Function()",
-  "functionKind": 2
-}],
- holding=[
-  {"id":"function/dart:_rti::_setArrayType"},
-  {"id":"function/dart:core::print"},
-  {"id":"function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1.call"},
-  {"id":"function/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1.call"}]
-*/
-/*kernel.member: nested2:
+/*member: nested2:
  closure=[
   {
   "id": "closure/memory:sdk/tests/web/native/main.dart::nested2.nested2_local1",
diff --git a/pkg/compiler/test/dump_info/data/js_members.dart b/pkg/compiler/test/dump_info/data/js_members.dart
index 5061226..cabb0d7 100644
--- a/pkg/compiler/test/dump_info/data/js_members.dart
+++ b/pkg/compiler/test/dump_info/data/js_members.dart
@@ -1,140 +1,4 @@
-/*spec.library: 
- constant=[
-  {
-  "id": "constant/B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 131,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST0 = function() {\n  var toStringFunction = Object.prototype.toString;\n  function getTag(o) {\n    var s = toStringFunction.call(o);\n    return s.substring(8, s.length - 1);\n  }\n  function getUnknownTag(object, tag) {\n    if (/^HTML[A-Z].*Element$/.test(tag)) {\n      var name = toStringFunction.call(object);\n      if (name == \"[object Object]\") return null;\n      return \"HTMLElement\";\n    }\n  }\n  function getUnknownTagGenericBrowser(object, tag) {\n    if (object instanceof HTMLElement) return \"HTMLElement\";\n    return getUnknownTag(object, tag);\n  }\n  function prototypeForTag(tag) {\n    if (typeof window == \"undefined\") return null;\n    if (typeof window[tag] == \"undefined\") return null;\n    var constructor = window[tag];\n    if (typeof constructor != \"function\") return null;\n    return constructor.prototype;\n  }\n  function discriminator(tag) { return null; }\n  var isBrowser = typeof HTMLElement == \"function\";\n  return {\n    getTag: getTag,\n    getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,\n    prototypeForTag: prototypeForTag,\n    discriminator: discriminator };\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 1117,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST0 = function() {\n  var toStringFunction = Object.prototype.toString;\n  function getTag(o) {\n    var s = toStringFunction.call(o);\n    return s.substring(8, s.length - 1);\n  }\n  function getUnknownTag(object, tag) {\n    if (/^HTML[A-Z].*Element$/.test(tag)) {\n      var name = toStringFunction.call(object);\n      if (name == \"[object Object]\") return null;\n      return \"HTMLElement\";\n    }\n  }\n  function getUnknownTagGenericBrowser(object, tag) {\n    if (object instanceof HTMLElement) return \"HTMLElement\";\n    return getUnknownTag(object, tag);\n  }\n  function prototypeForTag(tag) {\n    if (typeof window == \"undefined\") return null;\n    if (typeof window[tag] == \"undefined\") return null;\n    var constructor = window[tag];\n    if (typeof constructor != \"function\") return null;\n    return constructor.prototype;\n  }\n  function discriminator(tag) { return null; }\n  var isBrowser = typeof HTMLElement == \"function\";\n  return {\n    getTag: getTag,\n    getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,\n    prototypeForTag: prototypeForTag,\n    discriminator: discriminator };\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST1 = function(hooks) {\n  if (typeof dartExperimentalFixupGetTag != \"function\") return hooks;\n  hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 167,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST1 = function(hooks) {\n  if (typeof dartExperimentalFixupGetTag != \"function\") return hooks;\n  hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST2 = function(hooks) {\n  var getTag = hooks.getTag;\n  var prototypeForTag = hooks.prototypeForTag;\n  function getTagFixed(o) {\n    var tag = getTag(o);\n    if (tag == \"Document\") {\n      if (!!o.xmlVersion) return \"!Document\";\n      return \"!HTMLDocument\";\n    }\n    return tag;\n  }\n  function prototypeForTagFixed(tag) {\n    if (tag == \"Document\") return null;\n    return prototypeForTag(tag);\n  }\n  hooks.getTag = getTagFixed;\n  hooks.prototypeForTag = prototypeForTagFixed;\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 491,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST2 = function(hooks) {\n  var getTag = hooks.getTag;\n  var prototypeForTag = hooks.prototypeForTag;\n  function getTagFixed(o) {\n    var tag = getTag(o);\n    if (tag == \"Document\") {\n      if (!!o.xmlVersion) return \"!Document\";\n      return \"!HTMLDocument\";\n    }\n    return tag;\n  }\n  function prototypeForTagFixed(tag) {\n    if (tag == \"Document\") return null;\n    return prototypeForTag(tag);\n  }\n  hooks.getTag = getTagFixed;\n  hooks.prototypeForTag = prototypeForTagFixed;\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST3 = function(hooks) { return hooks; }\n;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 52,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST3 = function(hooks) { return hooks; }\n;\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST4 = function(hooks) {\n  if (typeof navigator != \"object\") return hooks;\n  var userAgent = navigator.userAgent;\n  if (typeof userAgent != \"string\") return hooks;\n  if (userAgent.indexOf(\"Trident/\") == -1) return hooks;\n  var getTag = hooks.getTag;\n  var quickMap = {\n    \"BeforeUnloadEvent\": \"Event\",\n    \"DataTransfer\": \"Clipboard\",\n    \"HTMLDDElement\": \"HTMLElement\",\n    \"HTMLDTElement\": \"HTMLElement\",\n    \"HTMLPhraseElement\": \"HTMLElement\",\n    \"Position\": \"Geoposition\"\n  };\n  function getTagIE(o) {\n    var tag = getTag(o);\n    var newTag = quickMap[tag];\n    if (newTag) return newTag;\n    if (tag == \"Object\") {\n      if (window.DataView && (o instanceof window.DataView)) return \"DataView\";\n    }\n    return tag;\n  }\n  function prototypeForTagIE(tag) {\n    var constructor = window[tag];\n    if (constructor == null) return null;\n    return constructor.prototype;\n  }\n  hooks.getTag = getTagIE;\n  hooks.prototypeForTag = prototypeForTagIE;\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 964,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST4 = function(hooks) {\n  if (typeof navigator != \"object\") return hooks;\n  var userAgent = navigator.userAgent;\n  if (typeof userAgent != \"string\") return hooks;\n  if (userAgent.indexOf(\"Trident/\") == -1) return hooks;\n  var getTag = hooks.getTag;\n  var quickMap = {\n    \"BeforeUnloadEvent\": \"Event\",\n    \"DataTransfer\": \"Clipboard\",\n    \"HTMLDDElement\": \"HTMLElement\",\n    \"HTMLDTElement\": \"HTMLElement\",\n    \"HTMLPhraseElement\": \"HTMLElement\",\n    \"Position\": \"Geoposition\"\n  };\n  function getTagIE(o) {\n    var tag = getTag(o);\n    var newTag = quickMap[tag];\n    if (newTag) return newTag;\n    if (tag == \"Object\") {\n      if (window.DataView && (o instanceof window.DataView)) return \"DataView\";\n    }\n    return tag;\n  }\n  function prototypeForTagIE(tag) {\n    var constructor = window[tag];\n    if (constructor == null) return null;\n    return constructor.prototype;\n  }\n  hooks.getTag = getTagIE;\n  hooks.prototypeForTag = prototypeForTagIE;\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST5 = function(hooks) {\n  if (typeof navigator != \"object\") return hooks;\n  var userAgent = navigator.userAgent;\n  if (typeof userAgent != \"string\") return hooks;\n  if (userAgent.indexOf(\"Firefox\") == -1) return hooks;\n  var getTag = hooks.getTag;\n  var quickMap = {\n    \"BeforeUnloadEvent\": \"Event\",\n    \"DataTransfer\": \"Clipboard\",\n    \"GeoGeolocation\": \"Geolocation\",\n    \"Location\": \"!Location\",\n    \"WorkerMessageEvent\": \"MessageEvent\",\n    \"XMLDocument\": \"!Document\"};\n  function getTagFirefox(o) {\n    var tag = getTag(o);\n    return quickMap[tag] || tag;\n  }\n  hooks.getTag = getTagFirefox;\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 612,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST5 = function(hooks) {\n  if (typeof navigator != \"object\") return hooks;\n  var userAgent = navigator.userAgent;\n  if (typeof userAgent != \"string\") return hooks;\n  if (userAgent.indexOf(\"Firefox\") == -1) return hooks;\n  var getTag = hooks.getTag;\n  var quickMap = {\n    \"BeforeUnloadEvent\": \"Event\",\n    \"DataTransfer\": \"Clipboard\",\n    \"GeoGeolocation\": \"Geolocation\",\n    \"Location\": \"!Location\",\n    \"WorkerMessageEvent\": \"MessageEvent\",\n    \"XMLDocument\": \"!Document\"};\n  function getTagFirefox(o) {\n    var tag = getTag(o);\n    return quickMap[tag] || tag;\n  }\n  hooks.getTag = getTagFirefox;\n};\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST6 = function(getTagFallback) {\n  return function(hooks) {\n    if (typeof navigator != \"object\") return hooks;\n    var userAgent = navigator.userAgent;\n    if (typeof userAgent != \"string\") return hooks;\n    if (userAgent.indexOf(\"DumpRenderTree\") >= 0) return hooks;\n    if (userAgent.indexOf(\"Chrome\") >= 0) {\n      function confirm(p) {\n        return typeof window == \"object\" && window[p] && window[p].name == p;\n      }\n      if (confirm(\"Window\") && confirm(\"HTMLElement\")) return hooks;\n    }\n    hooks.getTag = getTagFallback;\n  };\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 555,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST6 = function(getTagFallback) {\n  return function(hooks) {\n    if (typeof navigator != \"object\") return hooks;\n    var userAgent = navigator.userAgent;\n    if (typeof userAgent != \"string\") return hooks;\n    if (userAgent.indexOf(\"DumpRenderTree\") >= 0) return hooks;\n    if (userAgent.indexOf(\"Chrome\") >= 0) {\n      function confirm(p) {\n        return typeof window == \"object\" && window[p] && window[p].name == p;\n      }\n      if (confirm(\"Window\") && confirm(\"HTMLElement\")) return hooks;\n    }\n    hooks.getTag = getTagFallback;\n  };\n};\n"
-},
-  {
-  "id": "constant/B.Interceptor_methods = J.Interceptor.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 49,
-  "outputUnit": "outputUnit/main",
-  "code": "B.Interceptor_methods = J.Interceptor.prototype;\n"
-},
-  {
-  "id": "constant/B.JSArray_methods = J.JSArray.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 41,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JSArray_methods = J.JSArray.prototype;\n"
-},
-  {
-  "id": "constant/B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 63,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype;\n"
-},
-  {
-  "id": "constant/B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 59,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n"
-},
-  {
-  "id": "constant/B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 69,
-  "outputUnit": "outputUnit/main",
-  "code": "B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype;\n"
-},
-  {
-  "id": "constant/B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 73,
-  "outputUnit": "outputUnit/main",
-  "code": "B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype;\n"
-}],
- deferredFiles=[{}],
- dependencies=[{}],
- library=[{
-  "id": "library/memory:sdk/tests/web/native/main.dart::",
-  "kind": "library",
-  "name": "js_parameters_test",
-  "size": 1891,
-  "children": [
-    "class/memory:sdk/tests/web/native/main.dart::Bar",
-    "class/memory:sdk/tests/web/native/main.dart::Foo",
-    "function/memory:sdk/tests/web/native/main.dart::main"
-  ],
-  "canonicalUri": "memory:sdk/tests/web/native/main.dart"
-}],
- outputUnits=[{
-  "id": "outputUnit/main",
-  "kind": "outputUnit",
-  "name": "main",
-  "filename": "out",
-  "imports": []
-}]
-*/
-/*kernel.library: 
+/*library: 
  constant=[
   {
   "id": "constant/B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n",
diff --git a/pkg/compiler/test/dump_info/data/members.dart b/pkg/compiler/test/dump_info/data/members.dart
index 56dd9c5..be37e39 100644
--- a/pkg/compiler/test/dump_info/data/members.dart
+++ b/pkg/compiler/test/dump_info/data/members.dart
@@ -1,79 +1,4 @@
-/*spec.library: 
- constant=[
-  {
-  "id": "constant/B.C_A = new A.A();\n",
-  "kind": "constant",
-  "name": "",
-  "size": 19,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_A = new A.A();\n"
-},
-  {
-  "id": "constant/B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n",
-  "kind": "constant",
-  "name": "",
-  "size": 131,
-  "outputUnit": "outputUnit/main",
-  "code": "B.C_JS_CONST = function getTagFallback(o) {\n  var s = Object.prototype.toString.call(o);\n  return s.substring(8, s.length - 1);\n};\n"
-},
-  {
-  "id": "constant/B.Interceptor_methods = J.Interceptor.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 49,
-  "outputUnit": "outputUnit/main",
-  "code": "B.Interceptor_methods = J.Interceptor.prototype;\n"
-},
-  {
-  "id": "constant/B.JSArray_methods = J.JSArray.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 41,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JSArray_methods = J.JSArray.prototype;\n"
-},
-  {
-  "id": "constant/B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n",
-  "kind": "constant",
-  "name": "",
-  "size": 59,
-  "outputUnit": "outputUnit/main",
-  "code": "B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n"
-},
-  {
-  "id": "constant/B.List_A = A._setArrayType(makeConstList([B.C_A]), A.findType(\"JSArray<A>\"));\n",
-  "kind": "constant",
-  "name": "",
-  "size": 78,
-  "outputUnit": "outputUnit/main",
-  "code": "B.List_A = A._setArrayType(makeConstList([B.C_A]), A.findType(\"JSArray<A>\"));\n"
-}],
- deferredFiles=[{}],
- dependencies=[{}],
- library=[{
-  "id": "library/memory:sdk/tests/web/native/main.dart::",
-  "kind": "library",
-  "name": "<unnamed>",
-  "size": 475,
-  "children": [
-    "class/memory:sdk/tests/web/native/main.dart::A",
-    "class/memory:sdk/tests/web/native/main.dart::C",
-    "classType/memory:sdk/tests/web/native/main.dart::A",
-    "field/memory:sdk/tests/web/native/main.dart::constList",
-    "function/memory:sdk/tests/web/native/main.dart::F",
-    "function/memory:sdk/tests/web/native/main.dart::main"
-  ],
-  "canonicalUri": "memory:sdk/tests/web/native/main.dart"
-}],
- outputUnits=[{
-  "id": "outputUnit/main",
-  "kind": "outputUnit",
-  "name": "main",
-  "filename": "out",
-  "imports": []
-}]
-*/
-/*kernel.library: 
+/*library: 
  constant=[
   {
   "id": "constant/B.C_A = new A.A();\n",
diff --git a/pkg/compiler/test/dump_info/data_new/mixin_with_tearoff_test.dart b/pkg/compiler/test/dump_info/data_new/mixin_with_tearoff_test.dart
index b76e41b..44b0e74 100644
--- a/pkg/compiler/test/dump_info/data_new/mixin_with_tearoff_test.dart
+++ b/pkg/compiler/test/dump_info/data_new/mixin_with_tearoff_test.dart
@@ -33,6 +33,14 @@
   "code": "B.JSInt_methods = J.JSInt.prototype;\n"
 },
   {
+  "id": "constant/B.JSString_methods = J.JSString.prototype;\n",
+  "kind": "constant",
+  "name": "",
+  "size": 43,
+  "outputUnit": "outputUnit/main",
+  "code": "B.JSString_methods = J.JSString.prototype;\n"
+},
+  {
   "id": "constant/B.JavaScriptObject_methods = J.JavaScriptObject.prototype;\n",
   "kind": "constant",
   "name": "",