Version 2.11.0-209.0.dev

Merge commit 'e9aa232066472941a0cb309c5d958c14435c42cb' into 'dev'
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index 3137119..f280248 100644
--- a/.dart_tool/package_config.json
+++ b/.dart_tool/package_config.json
@@ -11,7 +11,7 @@
     "constraint, update this by running tools/generate_package_config.dart."
   ],
   "configVersion": 2,
-  "generated": "2020-09-18T09:56:27.880444",
+  "generated": "2020-10-09T10:15:45.502457",
   "generator": "tools/generate_package_config.dart",
   "packages": [
     {
@@ -136,7 +136,7 @@
       "name": "build_integration",
       "rootUri": "../pkg/build_integration",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.1"
     },
     {
       "name": "charcode",
@@ -178,7 +178,7 @@
       "name": "csslib",
       "rootUri": "../third_party/pkg/csslib",
       "packageUri": "lib/",
-      "languageVersion": "2.10"
+      "languageVersion": "2.11"
     },
     {
       "name": "dart2js_info",
@@ -207,7 +207,8 @@
     {
       "name": "dart_style",
       "rootUri": "../third_party/pkg_tested/dart_style",
-      "packageUri": "lib/"
+      "packageUri": "lib/",
+      "languageVersion": "2.9"
     },
     {
       "name": "dartdev",
@@ -219,7 +220,7 @@
       "name": "dartdoc",
       "rootUri": "../third_party/pkg/dartdoc",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.10"
     },
     {
       "name": "dartfix",
@@ -493,7 +494,8 @@
     {
       "name": "pub",
       "rootUri": "../third_party/pkg/pub",
-      "packageUri": "lib/"
+      "packageUri": "lib/",
+      "languageVersion": "2.9"
     },
     {
       "name": "pub_semver",
diff --git a/pkg/_fe_analyzer_shared/lib/src/testing/features.dart b/pkg/_fe_analyzer_shared/lib/src/testing/features.dart
index 7725a34..79072a1 100644
--- a/pkg/_fe_analyzer_shared/lib/src/testing/features.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/testing/features.dart
@@ -9,6 +9,25 @@
   Map<String, Object> _features = {};
   Set<String> _unsorted = new Set<String>();
 
+  Features();
+
+  /// Creates a [Features] registering each key in [featuresMap] as a features
+  /// with the corresponding value(s) in the map. Note: values are expected to
+  /// be either a single `String` value or a `List<String>`.
+  factory Features.fromMap(Map<String, dynamic> featuresMap) {
+    Features features = new Features();
+    featuresMap.forEach((key, value) {
+      if (value is List) {
+        for (dynamic v in value) {
+          features.addElement(key, v);
+        }
+      } else {
+        features.add(key, value: value);
+      }
+    });
+    return features;
+  }
+
   /// Mark the feature [key] as existing. If [value] is provided, the feature
   /// [key] is set to have this value.
   void add(String key, {var value: ''}) {
diff --git a/pkg/compiler/test/deferred_loading/data/basic_deferred/lib.dart b/pkg/compiler/test/deferred_loading/data/basic_deferred/lib.dart
index 3120bea..88ba170 100644
--- a/pkg/compiler/test/deferred_loading/data/basic_deferred/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/basic_deferred/lib.dart
@@ -4,12 +4,12 @@
 
 // @dart = 2.7
 
-/*member: defaultArg:OutputUnit(1, {lib})*/
+/*member: defaultArg:member_unit=1{lib}*/
 defaultArg() => "";
 
 /*member: funky:
- OutputUnit(1, {lib}),
- constants=[FunctionConstant(defaultArg)=OutputUnit(1, {lib})]
+ constants=[FunctionConstant(defaultArg)=1{lib}],
+ member_unit=1{lib}
 */
 funky([x = defaultArg]) => x();
 
diff --git a/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart b/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
index 11d445d..ca84a9f 100644
--- a/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
@@ -7,9 +7,9 @@
 import 'lib.dart' deferred as lib;
 
 /*member: main:
- OutputUnit(main, {}),
- constants=[FunctionConstant(funky)=OutputUnit(1, {lib})]
+ constants=[FunctionConstant(funky)=1{lib}],
+ member_unit=main{}
 */
-main() => lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+main() => lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
       (lib.funky)();
     });
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_class/lib.dart b/pkg/compiler/test/deferred_loading/data/deferred_class/lib.dart
index faac240..f41bc37 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_class/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_class/lib.dart
@@ -8,12 +8,15 @@
 
 library deferred_class_library;
 
-/*class: MyClass:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: MyClass:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class MyClass {
-  /*member: MyClass.:OutputUnit(1, {lib})*/
+  /*member: MyClass.:member_unit=1{lib}*/
   const MyClass();
 
-  /*member: MyClass.foo:OutputUnit(1, {lib})*/
+  /*member: MyClass.foo:member_unit=1{lib}*/
   foo(x) {
     print('MyClass.foo($x)');
     return (x - 3) ~/ 2;
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
index 90fd81f..bb45d8c 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
@@ -6,9 +6,9 @@
 
 import 'lib.dart' deferred as lib;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     return new lib.MyClass().foo(87);
   });
 }
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant1/lib3.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant1/lib3.dart
index 5d63ed2..8351313 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant1/lib3.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant1/lib3.dart
@@ -6,9 +6,12 @@
 
 library deferred_constants1_lib3;
 
-/*class: C:OutputUnit(main, {}), type=OutputUnit(main, {})*/
+/*class: C:
+ class_unit=main{},
+ type_unit=main{}
+*/
 class C {
-  /*member: C.value:OutputUnit(main, {})*/
+  /*member: C.value:member_unit=main{}*/
   final value;
 
   const C(this.value);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
index 0f40d1c..5a1c77d 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
@@ -8,18 +8,18 @@
 import 'lib2.dart' deferred as lib2;
 
 /*member: main:
- OutputUnit(main, {}),
  constants=[
-  ConstructedConstant(C(value=ConstructedConstant(C(value=IntConstant(7)))))=OutputUnit(1, {lib2}),
-  ConstructedConstant(C(value=IntConstant(1)))=OutputUnit(main, {}),
-  ConstructedConstant(C(value=IntConstant(2)))=OutputUnit(1, {lib2}),
-  ConstructedConstant(C(value=IntConstant(4)))=OutputUnit(main, {}),
-  ConstructedConstant(C(value=IntConstant(5)))=OutputUnit(main, {})]
+  ConstructedConstant(C(value=ConstructedConstant(C(value=IntConstant(7)))))=1{lib2},
+  ConstructedConstant(C(value=IntConstant(1)))=main{},
+  ConstructedConstant(C(value=IntConstant(2)))=1{lib2},
+  ConstructedConstant(C(value=IntConstant(4)))=main{},
+  ConstructedConstant(C(value=IntConstant(5)))=main{}],
+ member_unit=main{}
 */
 main() async {
   C1.value;
   print(const C(4));
-  /*OutputUnit(main, {})*/ () => print(const C(5));
+  /*closure_unit=main{}*/ () => print(const C(5));
   await lib2.loadLibrary();
   print(lib2.C2.value);
   print(lib2.C3.value);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant2/lib.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant2/lib.dart
index 9d06cea..da8377c 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant2/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant2/lib.dart
@@ -6,18 +6,21 @@
 
 library deferred_constants2_lib;
 
-/*class: Constant:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: Constant:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class Constant {
-  /*member: Constant.value:OutputUnit(1, {lib})*/
+  /*member: Constant.value:member_unit=1{lib}*/
   final value;
 
   const Constant(this.value);
 
-  /*member: Constant.==:OutputUnit(1, {lib})*/
+  /*member: Constant.==:member_unit=1{lib}*/
   @override
   operator ==(other) => other is Constant && value == other.value;
 
-  /*member: Constant.hashCode:OutputUnit(1, {lib})*/
+  /*member: Constant.hashCode:member_unit=1{lib}*/
   @override
   get hashCode => 0;
 }
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
index a35addc..71a715b 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
@@ -9,12 +9,11 @@
 import 'lib.dart' deferred as lib;
 
 /*member: main:
- OutputUnit(main, {}),
- constants=[
-  ConstructedConstant(Constant(value=IntConstant(499)))=OutputUnit(1, {lib})]
+ constants=[ConstructedConstant(Constant(value=IntConstant(499)))=1{lib}],
+ member_unit=main{}
 */
 main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     Expect.equals(499, lib.C1.value);
   });
 }
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
index 061d9d1..54f922e 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
@@ -12,12 +12,12 @@
 const c3 = const C(3);
 
 /*member: m1:
- OutputUnit(1, {l1}),
  constants=[
-  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
-  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1}),
-  ConstructedConstant(C(x=IntConstant(3)))=OutputUnit(1, {l1}),
-  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2})]
+  ConstructedConstant(C(x=IntConstant(1)))=main{},
+  ConstructedConstant(C(x=IntConstant(2)))=1{l1},
+  ConstructedConstant(C(x=IntConstant(3)))=1{l1},
+  ConstructedConstant(C(x=IntConstant(4)))=2{l2}],
+ member_unit=1{l1}
 */
 m1() async {
   print(c2);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
index 71db665..51392c1 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
@@ -13,11 +13,11 @@
 const c5 = const C(5);
 
 /*member: m2:
- OutputUnit(2, {l2}),
  constants=[
-  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
-  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2}),
-  ConstructedConstant(C(x=IntConstant(5)))=OutputUnit(2, {l2})]
+  ConstructedConstant(C(x=IntConstant(1)))=main{},
+  ConstructedConstant(C(x=IntConstant(4)))=2{l2},
+  ConstructedConstant(C(x=IntConstant(5)))=2{l2}],
+ member_unit=2{l2}
 */
 m2() async {
   print(c3);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
index da731a5..5bc723e 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
@@ -10,10 +10,10 @@
 const c1 = const C(1);
 
 /*member: main:
- OutputUnit(main, {}),
  constants=[
-  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
-  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1})]
+  ConstructedConstant(C(x=IntConstant(1)))=main{},
+  ConstructedConstant(C(x=IntConstant(2)))=1{l1}],
+ member_unit=main{}
 */
 main() async {
   print(c1.x);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/shared.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/shared.dart
index 57c860b..60a3657 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/shared.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/shared.dart
@@ -4,10 +4,13 @@
 
 // @dart = 2.7
 
-/*class: C:OutputUnit(main, {}), type=OutputUnit(main, {})*/
+/*class: C:
+ class_unit=main{},
+ type_unit=main{}
+*/
 class C {
   const C(this.x);
 
-  /*member: C.x:OutputUnit(main, {})*/
+  /*member: C.x:member_unit=main{}*/
   final x;
 }
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/lib.dart b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/lib.dart
index 8cab462..c26bea6 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/lib.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*member: foo:OutputUnit(1, {lib})*/
+/*member: foo:member_unit=1{lib}*/
 foo() {
   return "loaded";
 }
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
index 67201ca..167b145 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
@@ -11,7 +11,7 @@
 import "package:async_helper/async_helper.dart";
 import "dart:js" as js;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
   // We patch document.body.appendChild to change the script src on first
   // invocation.
@@ -36,14 +36,14 @@
   ]);
 
   asyncStart();
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     Expect.fail("Library should not have loaded");
-  }, onError: /*OutputUnit(main, {})*/ (error) {
-    lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  }, onError: /*closure_unit=main{}*/ (error) {
+    lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
       Expect.equals("loaded", lib.foo());
-    }, onError: /*OutputUnit(main, {})*/ (error) {
+    }, onError: /*closure_unit=main{}*/ (error) {
       Expect.fail("Library should have loaded this time");
-    }).whenComplete(/*OutputUnit(main, {})*/ () {
+    }).whenComplete(/*closure_unit=main{}*/ () {
       asyncEnd();
     });
   });
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_function/lib.dart b/pkg/compiler/test/deferred_loading/data/deferred_function/lib.dart
index 8406ca6..efaf766 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_function/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_function/lib.dart
@@ -8,7 +8,7 @@
 
 library deferred_function_library;
 
-/*member: foo:OutputUnit(1, {lib})*/
+/*member: foo:member_unit=1{lib}*/
 foo(x) {
   print('foo($x)');
   return 42;
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
index cf774ed..3c99316 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
@@ -10,16 +10,16 @@
 import 'lib.dart' deferred as lib;
 
 /*member: readFoo:
- OutputUnit(main, {}),
- constants=[FunctionConstant(foo)=OutputUnit(1, {lib})]
+ constants=[FunctionConstant(foo)=1{lib}],
+ member_unit=main{}
 */
 readFoo() {
   return lib.foo;
 }
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     lib.foo('b');
     readFoo();
   });
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/deferred_overlapping_lib3.dart b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/deferred_overlapping_lib3.dart
index a4170a9..55ced68 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/deferred_overlapping_lib3.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/deferred_overlapping_lib3.dart
@@ -4,6 +4,9 @@
 
 // @dart = 2.7
 
-/*class: C3:OutputUnit(1, {lib1, lib2}), type=OutputUnit(1, {lib1, lib2})*/
-/*member: C3.:OutputUnit(1, {lib1, lib2})*/
+/*class: C3:
+ class_unit=1{lib1, lib2},
+ type_unit=1{lib1, lib2}
+*/
+/*member: C3.:member_unit=1{lib1, lib2}*/
 class C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib1.dart b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib1.dart
index 1f1586c..ca698b0 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib1.dart
@@ -6,6 +6,9 @@
 
 import "deferred_overlapping_lib3.dart";
 
-/*class: C1:OutputUnit(2, {lib1}), type=OutputUnit(2, {lib1})*/
-/*member: C1.:OutputUnit(2, {lib1})*/
+/*class: C1:
+ class_unit=2{lib1},
+ type_unit=2{lib1}
+*/
+/*member: C1.:member_unit=2{lib1}*/
 class C1 extends C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib2.dart b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib2.dart
index 748d2cd..449b2c4 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/lib2.dart
@@ -6,6 +6,9 @@
 
 import "deferred_overlapping_lib3.dart";
 
-/*class: C2:OutputUnit(3, {lib2}), type=OutputUnit(3, {lib2})*/
-/*member: C2.:OutputUnit(3, {lib2})*/
+/*class: C2:
+ class_unit=3{lib2},
+ type_unit=3{lib2}
+*/
+/*member: C2.:member_unit=3{lib2}*/
 class C2 extends C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
index b766437..782e177 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
@@ -8,11 +8,11 @@
 import 'lib2.dart' deferred as lib2;
 
 // lib1.C1 and lib2.C2 has a shared base class. It will go in its own hunk.
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 void main() {
-  lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib1.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     new lib1.C1();
-    lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+    lib2.loadLibrary().then(/*closure_unit=main{}*/ (_) {
       new lib2.C2();
     });
   });
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/lib1.dart b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/lib1.dart
index 0c7ae5a..d59813b 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/lib1.dart
@@ -4,15 +4,18 @@
 
 // @dart = 2.7
 
-/*class: M:none, type=OutputUnit(1, {lib})*/
+/*class: M:
+ class_unit=none,
+ type_unit=1{lib}
+*/
 class M {}
 
 typedef dynamic FF({M b});
 
 const table = const <int, FF>{1: f1, 2: f2};
 
-/*member: f1:OutputUnit(1, {lib})*/
+/*member: f1:member_unit=1{lib}*/
 dynamic f1({M b}) => null;
 
-/*member: f2:OutputUnit(1, {lib})*/
+/*member: f2:member_unit=1{lib}*/
 dynamic f2({M b}) => null;
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
index 9150c50..20bb44c 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
@@ -6,7 +6,10 @@
 
 import 'lib1.dart' deferred as lib;
 
-/*member: main:OutputUnit(main, {}),constants=[MapConstant(<int*, dynamic Function({M* b})*>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=OutputUnit(1, {lib})]*/
+/*member: main:
+ constants=[MapConstant(<int*, dynamic Function({M* b})*>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=1{lib}],
+ member_unit=main{}
+*/
 main() async {
   await lib.loadLibrary();
   print(lib.table[1]);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typedef/lib1.dart b/pkg/compiler/test/deferred_loading/data/deferred_typedef/lib1.dart
index e1a6bb8..b3181b4 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typedef/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typedef/lib1.dart
@@ -6,12 +6,15 @@
 
 library deferred_typedef_lib1;
 
-/*class: C:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C {
-  /*member: C.a:OutputUnit(1, {lib1})*/
+  /*member: C.a:member_unit=1{lib1}*/
   final a;
 
-  /*member: C.b:OutputUnit(1, {lib1})*/
+  /*member: C.b:member_unit=1{lib1}*/
   final b;
 
   const C(this.a, this.b);
@@ -21,7 +24,7 @@
 
 typedef void MyF2();
 
-/*member: topLevelMethod:OutputUnit(1, {lib1})*/
+/*member: topLevelMethod:member_unit=1{lib1}*/
 topLevelMethod() {}
 
 const cA = const C(MyF1, topLevelMethod);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
index a5bccc8..9c56b84 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
@@ -6,7 +6,12 @@
 
 import 'lib1.dart' deferred as lib1;
 
-/*member: main:OutputUnit(main, {}),constants=[ConstructedConstant(C(a=TypeConstant(void Function()),b=FunctionConstant(topLevelMethod)))=OutputUnit(1, {lib1}),TypeConstant(void Function())=OutputUnit(1, {lib1})]*/
+/*member: main:
+ constants=[
+  ConstructedConstant(C(a=TypeConstant(void Function()),b=FunctionConstant(topLevelMethod)))=1{lib1},
+  TypeConstant(void Function())=1{lib1}],
+ member_unit=main{}
+*/
 main() async {
   await lib1.loadLibrary();
   print(lib1.cA);
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/exported_main.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/exported_main.dart
index 2fcc514..f22f054 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/exported_main.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/exported_main.dart
@@ -9,29 +9,32 @@
 
 const c = "string3";
 
-/*class: C:OutputUnit(main, {}), type=OutputUnit(main, {})*/
+/*class: C:
+ class_unit=main{},
+ type_unit=main{}
+*/
 class C {
-  /*member: C.p:OutputUnit(main, {})*/
+  /*member: C.p:member_unit=main{}*/
   final p;
 
   const C(this.p);
 }
 
-/*member: foo:OutputUnit(2, {lib1, lib2})*/
+/*member: foo:member_unit=2{lib1, lib2}*/
 foo() => print("main");
 
 /*member: main:
- OutputUnit(main, {}),
  constants=[
-  ConstructedConstant(C(p=IntConstant(1)))=OutputUnit(main, {}),
-  ConstructedConstant(C(p=IntConstant(1010)))=OutputUnit(1, {lib1}),
-  ConstructedConstant(C(p=IntConstant(2)))=OutputUnit(2, {lib1, lib2}),
-  ConstructedConstant(C(p=StringConstant("string1")))=OutputUnit(1, {lib1}),
-  ConstructedConstant(C(p=StringConstant("string2")))=OutputUnit(1, {lib1})]
+  ConstructedConstant(C(p=IntConstant(1)))=main{},
+  ConstructedConstant(C(p=IntConstant(1010)))=1{lib1},
+  ConstructedConstant(C(p=IntConstant(2)))=2{lib1, lib2},
+  ConstructedConstant(C(p=StringConstant("string1")))=1{lib1},
+  ConstructedConstant(C(p=StringConstant("string2")))=1{lib1}],
+ member_unit=main{}
 */
 void main() {
-  lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
-    lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib1.loadLibrary().then(/*closure_unit=main{}*/ (_) {
+    lib2.loadLibrary().then(/*closure_unit=main{}*/ (_) {
       lib1.foo();
       lib2.foo();
       print(lib1.C1);
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib1.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib1.dart
index c017966..a147c36 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib1.dart
@@ -15,7 +15,10 @@
 
 const C2b = const C(1010);
 
-/*class: D:none, type=none*/
+/*class: D:
+ class_unit=none,
+ type_unit=none
+*/
 class D {
   static const C3 = "string2";
 
@@ -28,7 +31,7 @@
 
 const C6 = const C(2);
 
-/*member: foo:OutputUnit(1, {lib1})*/
+/*member: foo:member_unit=1{lib1}*/
 foo() {
   print("lib1");
   main.foo();
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib2.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib2.dart
index cacae15..d421b89 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/lib2.dart
@@ -13,7 +13,7 @@
 
 const C6 = const C(2);
 
-/*member: foo:OutputUnit(3, {lib2})*/
+/*member: foo:member_unit=3{lib2}*/
 foo() {
   print("lib2");
   main.foo();
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/lib.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/lib.dart
index 18fced0..ec89e79 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/lib.dart
@@ -4,8 +4,8 @@
 
 // @dart = 2.7
 
-/*member: finalVar:OutputUnit(1, {lib})*/
+/*member: finalVar:member_unit=1{lib}*/
 final finalVar = "string1";
 
-/*member: globalVar:OutputUnit(1, {lib})*/
+/*member: globalVar:member_unit=1{lib}*/
 var globalVar = "string2";
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
index 22cbcb4..3a45b3e 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
@@ -6,9 +6,9 @@
 
 import 'lib.dart' deferred as lib;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 void main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     print(lib.finalVar);
     print(lib.globalVar);
     lib.globalVar = "foobar";
diff --git a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart
index f305b51..ab4dc02 100644
--- a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart
@@ -4,93 +4,135 @@
 
 // @dart = 2.7
 
-/*member: a:OutputUnit(1, {lib})*/
+/*member: a:member_unit=1{lib}*/
 a() => print("123");
 
-/*member: b:OutputUnit(1, {lib})*/
+/*member: b:member_unit=1{lib}*/
 b() => print("123");
 
-/*member: c:OutputUnit(1, {lib})*/
+/*member: c:member_unit=1{lib}*/
 c() => print("123");
 
-/*member: d:OutputUnit(1, {lib})*/
+/*member: d:member_unit=1{lib}*/
 d() => print("123");
 
-/*class: B:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: B:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class B {
-  /*member: B.:OutputUnit(1, {lib})*/
+  /*member: B.:member_unit=1{lib}*/
   B() {
     b();
   }
 }
 
-/*class: B2:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: B2.:OutputUnit(1, {lib})*/
+/*class: B2:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: B2.:member_unit=1{lib}*/
 class B2 extends B {
   // No constructor creates a synthetic constructor that has an implicit
   // super-call.
 }
 
-/*class: A:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: A:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class A {
-  /*member: A.:OutputUnit(1, {lib})*/
+  /*member: A.:member_unit=1{lib}*/
   A() {
     a();
   }
 }
 
-/*class: A2:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: A2:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class A2 extends A {
   // Implicit super call.
-  /*member: A2.:OutputUnit(1, {lib})*/
+  /*member: A2.:member_unit=1{lib}*/
   A2();
 }
 
-/*class: C1:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: C1:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class C1 {}
 
-/*class: C2:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: C2:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class C2 {
-  /*member: C2.:OutputUnit(1, {lib})*/
+  /*member: C2.:member_unit=1{lib}*/
   C2() {
     c();
   }
 }
 
-/*class: C2p:none, type=none*/
+/*class: C2p:
+ class_unit=none,
+ type_unit=none
+*/
 class C2p {
   C2() {
     c();
   }
 }
 
-/*class: C3:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: C3.:OutputUnit(1, {lib})*/
+/*class: C3:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: C3.:member_unit=1{lib}*/
 class C3 extends C2 with C1 {
   // Implicit redirecting "super" call via mixin.
 }
 
-/*class: E:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: E:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class E {}
 
-/*class: F:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: F:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class F {}
 
-/*class: G:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: G.:OutputUnit(1, {lib})*/
+/*class: G:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: G.:member_unit=1{lib}*/
 class G extends C3 with C1, E, F {}
 
-/*class: D1:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: D1:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class D1 {}
 
-/*class: D2:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: D2:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class D2 {
-  /*member: D2.:OutputUnit(1, {lib})*/
+  /*member: D2.:member_unit=1{lib}*/
   D2(x) {
     d();
   }
 }
 
 // Implicit redirecting "super" call with a parameter via mixin.
-/*class: D3:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
+/*class: D3:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
 class D3 = D2 with D1;
diff --git a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
index fe41fa5..74cd88d 100644
--- a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
@@ -6,9 +6,9 @@
 
 import "lib.dart" deferred as lib;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 void main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     new lib.A2();
     new lib.B2();
     new lib.C3();
diff --git a/pkg/compiler/test/deferred_loading/data/future_or/lib2.dart b/pkg/compiler/test/deferred_loading/data/future_or/lib2.dart
index d222767..aad0cf2 100644
--- a/pkg/compiler/test/deferred_loading/data/future_or/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/future_or/lib2.dart
@@ -4,10 +4,13 @@
 
 // @dart = 2.7
 
-/*class: A:OutputUnit(1, {lib1}), type=OutputUnit(main, {})*/
+/*class: A:
+ class_unit=1{lib1},
+ type_unit=main{}
+*/
 class A {
   const A();
 
-  /*member: A.method:OutputUnit(1, {lib1})*/
+  /*member: A.method:member_unit=1{lib1}*/
   method() {}
 }
diff --git a/pkg/compiler/test/deferred_loading/data/future_or/main.dart b/pkg/compiler/test/deferred_loading/data/future_or/main.dart
index ed02ff6..de44d54 100644
--- a/pkg/compiler/test/deferred_loading/data/future_or/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/future_or/main.dart
@@ -8,7 +8,10 @@
 import 'lib1.dart' deferred as lib1;
 import 'lib2.dart' as lib2;
 
-/*member: main:OutputUnit(main, {}),constants=[ConstructedConstant(A())=OutputUnit(1, {lib1})]*/
+/*member: main:
+ constants=[ConstructedConstant(A())=1{lib1}],
+ member_unit=main{}
+*/
 main() async {
   await lib1.loadLibrary();
   lib1.field is FutureOr<lib2.A>;
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation0/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation0/lib1.dart
index 3904f05..59fba08 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation0/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation0/lib1.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(1, {b})*/
+/*member: getFoo:member_unit=1{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(1, {b}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=1{b}],
+ member_unit=1{b}
 */
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
index 0b94d3a..5da17d9 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
@@ -6,12 +6,12 @@
 
 // Test instantiation used only in a deferred library.
 
-/*class: global#Instantiation:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
-/*class: global#Instantiation1:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
+/*class: global#Instantiation:class_unit=1{b},type_unit=1{b}*/
+/*class: global#Instantiation1:class_unit=1{b},type_unit=1{b}*/
 
 import 'lib1.dart' deferred as b;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   print(b.m(3));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation1/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation1/lib1.dart
index 3904f05..59fba08 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation1/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation1/lib1.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(1, {b})*/
+/*member: getFoo:member_unit=1{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(1, {b}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=1{b}],
+ member_unit=1{b}
 */
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation1/lib2.dart b/pkg/compiler/test/deferred_loading/data/instantiation1/lib2.dart
index e0ae1fb..faddc09 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation1/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation1/lib2.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(3, {c})*/
+/*member: getFoo:member_unit=3{c}*/
 T getFoo<T, S>(T v, S w) => v;
 
 typedef dynamic G<T, S>(T v, S w);
 
 /*member: m:
- OutputUnit(3, {c}),
- constants=[
-  InstantiationConstant([int*, int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+ constants=[InstantiationConstant([int*, int*],FunctionConstant(getFoo))=3{c}],
+ member_unit=3{c}
 */
 m(int x, int y, {G<int, int> f: getFoo}) {
   print(f(x, y));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
index 2e0e4ef..ae2c5a7 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
@@ -7,14 +7,14 @@
 // Test instantiations with different type argument count used only in two
 // deferred libraries.
 
-/*class: global#Instantiation:OutputUnit(2, {b, c}), type=OutputUnit(2, {b, c})*/
-/*class: global#Instantiation1:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
-/*class: global#Instantiation2:OutputUnit(3, {c}), type=OutputUnit(3, {c})*/
+/*class: global#Instantiation:class_unit=2{b, c},type_unit=2{b, c}*/
+/*class: global#Instantiation1:class_unit=1{b},type_unit=1{b}*/
+/*class: global#Instantiation2:class_unit=3{c},type_unit=3{c}*/
 
 import 'lib1.dart' deferred as b;
 import 'lib2.dart' deferred as c;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   await c.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation2/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation2/lib1.dart
index 75e44c2..50dde94 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation2/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation2/lib1.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(2, {b})*/
+/*member: getFoo:member_unit=2{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(2, {b}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(2, {b})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=2{b}],
+ member_unit=2{b}
 */
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation2/lib2.dart b/pkg/compiler/test/deferred_loading/data/instantiation2/lib2.dart
index c81081d..c7537c6 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation2/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation2/lib2.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(3, {c})*/
+/*member: getFoo:member_unit=3{c}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(3, {c}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=3{c}],
+ member_unit=3{c}
 */
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
index 70dc5f6..3ff8f46 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
@@ -7,13 +7,13 @@
 // Test instantiations with the same type argument count used only in two
 // deferred libraries.
 
-/*class: global#Instantiation:OutputUnit(1, {b, c}), type=OutputUnit(1, {b, c})*/
-/*class: global#Instantiation1:OutputUnit(1, {b, c}), type=OutputUnit(1, {b, c})*/
+/*class: global#Instantiation:class_unit=1{b, c},type_unit=1{b, c}*/
+/*class: global#Instantiation1:class_unit=1{b, c},type_unit=1{b, c}*/
 
 import 'lib1.dart' deferred as b;
 import 'lib2.dart' deferred as c;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   await c.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation3/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation3/lib1.dart
index 843596b..a211ccb 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation3/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation3/lib1.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(1, {b})*/
+/*member: getFoo:member_unit=1{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(1, {b}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=1{b}],
+ member_unit=1{b}
 */
 m(int x, {G<int> f}) {
   f ??= getFoo;
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
index 3cb4f5a..b0d3a8f 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
@@ -6,14 +6,14 @@
 
 // Test instantiation used only in a deferred library.
 
-/*class: global#Instantiation:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
-/*class: global#Instantiation1:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
+/*class: global#Instantiation:class_unit=1{b},type_unit=1{b}*/
+/*class: global#Instantiation1:class_unit=1{b},type_unit=1{b}*/
 
-/*member: global#instantiate1:OutputUnit(1, {b})*/
+/*member: global#instantiate1:member_unit=1{b}*/
 
 import 'lib1.dart' deferred as b;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   print(b.m(3));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation4/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation4/lib1.dart
index 57e5118..a211ccb 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation4/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation4/lib1.dart
@@ -4,12 +4,15 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(1, {b})*/
+/*member: getFoo:member_unit=1{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
-/*member: m:OutputUnit(1, {b}),constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]*/
+/*member: m:
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=1{b}],
+ member_unit=1{b}
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation4/lib2.dart b/pkg/compiler/test/deferred_loading/data/instantiation4/lib2.dart
index 99d9dcd..ea8657c 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation4/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation4/lib2.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(3, {c})*/
+/*member: getFoo:member_unit=3{c}*/
 T getFoo<T, S>(T v, S w) => v;
 
 typedef dynamic G<T, S>(T v, S w);
 
 /*member: m:
- OutputUnit(3, {c}),
- constants=[
-  InstantiationConstant([int*, int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+ constants=[InstantiationConstant([int*, int*],FunctionConstant(getFoo))=3{c}],
+ member_unit=3{c}
 */
 m(int x, int y, {G<int, int> f}) {
   f ??= getFoo;
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
index 361d35a..34bf22a 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
@@ -7,17 +7,17 @@
 // Test instantiations with different type argument count used only in two
 // deferred libraries.
 
-/*class: global#Instantiation:OutputUnit(2, {b, c}), type=OutputUnit(2, {b, c})*/
-/*class: global#Instantiation1:OutputUnit(1, {b}), type=OutputUnit(1, {b})*/
-/*class: global#Instantiation2:OutputUnit(3, {c}), type=OutputUnit(3, {c})*/
+/*class: global#Instantiation:class_unit=2{b, c},type_unit=2{b, c}*/
+/*class: global#Instantiation1:class_unit=1{b},type_unit=1{b}*/
+/*class: global#Instantiation2:class_unit=3{c},type_unit=3{c}*/
 
-/*member: global#instantiate1:OutputUnit(1, {b})*/
-/*member: global#instantiate2:OutputUnit(3, {c})*/
+/*member: global#instantiate1:member_unit=1{b}*/
+/*member: global#instantiate2:member_unit=3{c}*/
 
 import 'lib1.dart' deferred as b;
 import 'lib2.dart' deferred as c;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   await c.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation5/lib1.dart b/pkg/compiler/test/deferred_loading/data/instantiation5/lib1.dart
index 562d112..506a6b3 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation5/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation5/lib1.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(2, {b})*/
+/*member: getFoo:member_unit=2{b}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(2, {b}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(2, {b})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=2{b}],
+ member_unit=2{b}
 */
 m(int x, {G<int> f}) {
   f ??= getFoo;
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation5/lib2.dart b/pkg/compiler/test/deferred_loading/data/instantiation5/lib2.dart
index a2f7a32..8a5d498 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation5/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation5/lib2.dart
@@ -4,15 +4,14 @@
 
 // @dart = 2.7
 
-/*member: getFoo:OutputUnit(3, {c})*/
+/*member: getFoo:member_unit=3{c}*/
 T getFoo<T>(T v) => v;
 
 typedef dynamic G<T>(T v);
 
 /*member: m:
- OutputUnit(3, {c}),
- constants=[
-  InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+ constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=3{c}],
+ member_unit=3{c}
 */
 m(int x, {G<int> f}) {
   f ??= getFoo;
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
index 9f270b1..5612525 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
@@ -7,15 +7,15 @@
 // Test instantiations with the same type argument count used only in two
 // deferred libraries.
 
-/*class: global#Instantiation:OutputUnit(1, {b, c}), type=OutputUnit(1, {b, c})*/
-/*class: global#Instantiation1:OutputUnit(1, {b, c}), type=OutputUnit(1, {b, c})*/
+/*class: global#Instantiation:class_unit=1{b, c},type_unit=1{b, c}*/
+/*class: global#Instantiation1:class_unit=1{b, c},type_unit=1{b, c}*/
 
-/*member: global#instantiate1:OutputUnit(1, {b, c})*/
+/*member: global#instantiate1:member_unit=1{b, c}*/
 
 import 'lib1.dart' deferred as b;
 import 'lib2.dart' deferred as c;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await b.loadLibrary();
   await c.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart
index 95c9a26..d20e094 100644
--- a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart
@@ -4,38 +4,62 @@
 
 // @dart = 2.7
 
-/*class: A:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: A.:OutputUnit(1, {lib})*/
+/*class: A:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: A.:member_unit=1{lib}*/
 class A {}
 
-/*class: I:none, type=OutputUnit(1, {lib})*/
+/*class: I:
+ class_unit=none,
+ type_unit=1{lib}
+*/
 class I<T> {}
 
-/*class: J:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: J.:OutputUnit(1, {lib})*/
+/*class: J:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: J.:member_unit=1{lib}*/
 class J<T> {}
 
 // C needs to include "N", otherwise checking for `is I<A>` will likely cause
 // problems
-/*class: C:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: C.:OutputUnit(1, {lib})*/
+/*class: C:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: C.:member_unit=1{lib}*/
 class C extends A implements I<N> {}
 
-/*class: C1:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: C1.:OutputUnit(1, {lib})*/
+/*class: C1:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: C1.:member_unit=1{lib}*/
 class C1 extends J<M> implements A {}
 
-/*class: C2:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: C2.:OutputUnit(1, {lib})*/
+/*class: C2:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: C2.:member_unit=1{lib}*/
 class C2 extends J<M> implements I<N> {}
 
-/*class: N:none, type=OutputUnit(1, {lib})*/
+/*class: N:
+ class_unit=none,
+ type_unit=1{lib}
+*/
 class N extends A {}
 
-/*class: M:none, type=OutputUnit(1, {lib})*/
+/*class: M:
+ class_unit=none,
+ type_unit=1{lib}
+*/
 class M extends A {}
 
-/*member: doCheck1:OutputUnit(1, {lib})*/
+/*member: doCheck1:member_unit=1{lib}*/
 doCheck1(x) => x is I<A>;
-/*member: doCheck2:OutputUnit(1, {lib})*/
+/*member: doCheck2:member_unit=1{lib}*/
 doCheck2(x) => x is J<A>;
diff --git a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
index d9075e9..d4b10fb 100644
--- a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
@@ -11,9 +11,9 @@
 ///
 /// If not, we may include it in the main unit and may not see that the base
 /// class is not added to the main unit.
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     lib.doCheck1(dontInline(new lib.C()));
     lib.doCheck1(dontInline(new lib.C1()));
     lib.doCheck1(dontInline(new lib.C2()));
@@ -24,5 +24,5 @@
 }
 
 @pragma('dart2js:noInline')
-/*member: dontInline:OutputUnit(main, {})*/
+/*member: dontInline:member_unit=main{}*/
 dontInline(x) => x;
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart
index 3e9dbdf..4cd9f15 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart
@@ -4,24 +4,27 @@
 
 // @dart = 2.7
 
-/*class: Foo:OutputUnit(1, {libB}), type=OutputUnit(3, {libA, libB, libC})*/
+/*class: Foo:
+ class_unit=1{libB},
+ type_unit=3{libA, libB, libC}
+*/
 class Foo {
-  /*member: Foo.x:OutputUnit(1, {libB})*/
+  /*member: Foo.x:member_unit=1{libB}*/
   int x;
-  /*member: Foo.:OutputUnit(1, {libB})*/
+  /*member: Foo.:member_unit=1{libB}*/
   Foo() {
     x = DateTime.now().millisecond;
   }
-  /*member: Foo.method:OutputUnit(1, {libB})*/
+  /*member: Foo.method:member_unit=1{libB}*/
   int method() => x;
 }
 
-/*member: isFoo:OutputUnit(3, {libA, libB, libC})*/
+/*member: isFoo:member_unit=3{libA, libB, libC}*/
 bool isFoo(o) {
   return o is Foo;
 }
 
-/*member: callFooMethod:OutputUnit(1, {libB})*/
+/*member: callFooMethod:member_unit=1{libB}*/
 int callFooMethod() {
   return Foo().method();
 }
@@ -29,58 +32,94 @@
 typedef int FunFoo(Foo a);
 typedef int FunFunFoo(FunFoo b, int c);
 
-/*member: isFunFunFoo:OutputUnit(3, {libA, libB, libC})*/
+/*member: isFunFunFoo:member_unit=3{libA, libB, libC}*/
 bool isFunFunFoo(o) {
   return o is FunFunFoo;
 }
 
-/*class: Aoo:none, type=OutputUnit(2, {libC})*/
+/*class: Aoo:
+ class_unit=none,
+ type_unit=2{libC}
+*/
 class Aoo<T> {}
 
-/*class: Boo:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
+/*class: Boo:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
 class Boo<T> implements Aoo<T> {}
 
-/*class: Coo:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
-/*member: Coo.:OutputUnit(2, {libC})*/
+/*class: Coo:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
+/*member: Coo.:member_unit=2{libC}*/
 class Coo<T> {}
 
-/*class: Doo:OutputUnit(2, {libC}), type=OutputUnit(5, {libB, libC})*/
-/*member: Doo.:OutputUnit(2, {libC})*/
+/*class: Doo:
+ class_unit=2{libC},
+ type_unit=5{libB, libC}
+*/
+/*member: Doo.:member_unit=2{libC}*/
 class Doo<T> extends Coo<T> with Boo<T> {}
 
-/*member: createDooFunFunFoo:OutputUnit(2, {libC})*/
+/*member: createDooFunFunFoo:member_unit=2{libC}*/
 createDooFunFunFoo() => Doo<FunFunFoo>();
 
-/*class: B:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
-/*member: B.:OutputUnit(2, {libC})*/
+/*class: B:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
+/*member: B.:member_unit=2{libC}*/
 class B {}
 
-/*class: B2:OutputUnit(2, {libC}), type=OutputUnit(4, {libA, libC})*/
-/*member: B2.:OutputUnit(2, {libC})*/
+/*class: B2:
+ class_unit=2{libC},
+ type_unit=4{libA, libC}
+*/
+/*member: B2.:member_unit=2{libC}*/
 class B2 extends B {}
 
-/*class: C1:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
+/*class: C1:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
 class C1 {}
 
-/*class: C2:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
-/*member: C2.:OutputUnit(2, {libC})*/
+/*class: C2:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
+/*member: C2.:member_unit=2{libC}*/
 class C2 {}
 
-/*class: C3:OutputUnit(2, {libC}), type=OutputUnit(4, {libA, libC})*/
-/*member: C3.:OutputUnit(2, {libC})*/
+/*class: C3:
+ class_unit=2{libC},
+ type_unit=4{libA, libC}
+*/
+/*member: C3.:member_unit=2{libC}*/
 class C3 extends C2 with C1 {}
 
-/*class: D1:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
+/*class: D1:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
 class D1 {}
 
-/*class: D2:OutputUnit(2, {libC}), type=OutputUnit(2, {libC})*/
-/*member: D2.:OutputUnit(2, {libC})*/
+/*class: D2:
+ class_unit=2{libC},
+ type_unit=2{libC}
+*/
+/*member: D2.:member_unit=2{libC}*/
 class D2 {}
 
-/*class: D3:OutputUnit(2, {libC}), type=OutputUnit(4, {libA, libC})*/
+/*class: D3:
+ class_unit=2{libC},
+ type_unit=4{libA, libC}
+*/
 class D3 = D2 with D1;
 
-/*member: isMega:OutputUnit(6, {libA})*/
+/*member: isMega:member_unit=6{libA}*/
 bool isMega(o) {
   return o is B2 || o is C3 || o is D3;
 }
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart
index 5601618..447ec58 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart
@@ -6,11 +6,11 @@
 
 import 'lib.dart' as lib;
 
-/*member: isFoo:OutputUnit(6, {libA})*/
+/*member: isFoo:member_unit=6{libA}*/
 bool isFoo(o) => lib.isFoo(o);
 
-/*member: isFunFunFoo:OutputUnit(6, {libA})*/
+/*member: isFunFunFoo:member_unit=6{libA}*/
 bool isFunFunFoo(o) => lib.isFunFunFoo(o);
 
-/*member: isMega:OutputUnit(6, {libA})*/
+/*member: isMega:member_unit=6{libA}*/
 bool isMega(o) => lib.isMega(o);
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart
index 2b28333..20c2423 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart
@@ -6,14 +6,14 @@
 
 import 'lib.dart' as lib;
 
-/*member: callFooMethod:OutputUnit(1, {libB})*/
+/*member: callFooMethod:member_unit=1{libB}*/
 int callFooMethod() => lib.callFooMethod();
 
-/*member: isFoo:OutputUnit(1, {libB})*/
+/*member: isFoo:member_unit=1{libB}*/
 bool isFoo(o) => lib.isFoo(o);
 
-/*member: isFunFunFoo:OutputUnit(1, {libB})*/
+/*member: isFunFunFoo:member_unit=1{libB}*/
 bool isFunFunFoo(o) => lib.isFunFunFoo(o);
 
-/*member: isDooFunFunFoo:OutputUnit(1, {libB})*/
+/*member: isDooFunFunFoo:member_unit=1{libB}*/
 bool isDooFunFunFoo(o) => o is lib.Doo<lib.FunFunFoo>;
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart
index 8e9708b..ddc592e 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart
@@ -6,20 +6,20 @@
 
 import 'lib.dart' as lib;
 
-/*member: isFoo:OutputUnit(2, {libC})*/
+/*member: isFoo:member_unit=2{libC}*/
 bool isFoo(o) => lib.isFoo(o);
 
-/*member: isFunFunFoo:OutputUnit(2, {libC})*/
+/*member: isFunFunFoo:member_unit=2{libC}*/
 bool isFunFunFoo(o) => lib.isFunFunFoo(o);
 
-/*member: createB2:OutputUnit(2, {libC})*/
+/*member: createB2:member_unit=2{libC}*/
 createB2() => new lib.B2();
 
-/*member: createC3:OutputUnit(2, {libC})*/
+/*member: createC3:member_unit=2{libC}*/
 createC3() => new lib.C3();
 
-/*member: createD3:OutputUnit(2, {libC})*/
+/*member: createD3:member_unit=2{libC}*/
 createD3() => new lib.D3();
 
-/*member: createDooFunFunFoo:OutputUnit(2, {libC})*/
+/*member: createDooFunFunFoo:member_unit=2{libC}*/
 createDooFunFunFoo() => lib.createDooFunFunFoo();
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
index 541070c..ca9bb68 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
@@ -8,7 +8,23 @@
 import 'libb.dart' deferred as libB;
 import 'libc.dart' deferred as libC;
 
-/*member: foo:OutputUnit(main, {}),constants=[FunctionConstant(callFooMethod)=OutputUnit(1, {libB}),FunctionConstant(createB2)=OutputUnit(2, {libC}),FunctionConstant(createC3)=OutputUnit(2, {libC}),FunctionConstant(createD3)=OutputUnit(2, {libC}),FunctionConstant(createDooFunFunFoo)=OutputUnit(2, {libC}),FunctionConstant(isDooFunFunFoo)=OutputUnit(1, {libB}),FunctionConstant(isFoo)=OutputUnit(1, {libB}),FunctionConstant(isFoo)=OutputUnit(2, {libC}),FunctionConstant(isFoo)=OutputUnit(6, {libA}),FunctionConstant(isFunFunFoo)=OutputUnit(1, {libB}),FunctionConstant(isFunFunFoo)=OutputUnit(2, {libC}),FunctionConstant(isFunFunFoo)=OutputUnit(6, {libA}),FunctionConstant(isMega)=OutputUnit(6, {libA})]*/
+/*member: foo:
+ constants=[
+  FunctionConstant(callFooMethod)=1{libB},
+  FunctionConstant(createB2)=2{libC},
+  FunctionConstant(createC3)=2{libC},
+  FunctionConstant(createD3)=2{libC},
+  FunctionConstant(createDooFunFunFoo)=2{libC},
+  FunctionConstant(isDooFunFunFoo)=1{libB},
+  FunctionConstant(isFoo)=1{libB},
+  FunctionConstant(isFoo)=2{libC},
+  FunctionConstant(isFoo)=6{libA},
+  FunctionConstant(isFunFunFoo)=1{libB},
+  FunctionConstant(isFunFunFoo)=2{libC},
+  FunctionConstant(isFunFunFoo)=6{libA},
+  FunctionConstant(isMega)=6{libA}],
+ member_unit=main{}
+*/
 void foo() async {
   await libA.loadLibrary();
   await libB.loadLibrary();
@@ -31,7 +47,7 @@
   print((libC.createDooFunFunFoo)());
 }
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
   foo();
 }
diff --git a/pkg/compiler/test/deferred_loading/data/regress_35311/lib.dart b/pkg/compiler/test/deferred_loading/data/regress_35311/lib.dart
index ee3d8b3..b7ecf26 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_35311/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_35311/lib.dart
@@ -2,12 +2,15 @@
 // 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.
 
-/*class: B:OutputUnit(1, {lib}), type=OutputUnit(main, {})*/
-/*member: B.:OutputUnit(1, {lib})*/
+/*class: B:
+ class_unit=1{lib},
+ type_unit=main{}
+*/
+/*member: B.:member_unit=1{lib}*/
 class B {
-  /*member: B.value:OutputUnit(1, {lib})*/
+  /*member: B.value:member_unit=1{lib}*/
   B value = null;
 }
 
-/*member: list:OutputUnit(1, {lib})*/
+/*member: list:member_unit=1{lib}*/
 List<B> list = [];
diff --git a/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart b/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
index 7b8802a..9489c7f 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
@@ -4,19 +4,19 @@
 
 import 'lib.dart' deferred as lib;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await lib.loadLibrary();
 
   // inferred return-type in closures:
   // lib.B f1() => lib.B(); // Compile time error(see tests/dart2js)
-  var f2 = /*OutputUnit(main, {})*/ () =>
+  var f2 = /*closure_unit=main{}*/ () =>
       lib.B(); // no compile error, but f1 has inferred type: () -> d.B
 
   // inferred type-arguments
   // lib.list = <lib.B>[]; // Compile time error(see tests/dart2js)
   lib.list = []; // no error, but type parameter was injected here
   lib.list = lib.list
-      .map(/*OutputUnit(main, {})*/ (x) => x.value)
+      .map(/*closure_unit=main{}*/ (x) => x.value)
       .toList(); // no Compile error, type parameter inferred on closure and map<T>.
 }
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart
index b72819b..c88e3f0 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart
@@ -6,6 +6,9 @@
 
 import 'libc.dart';
 
-/*class: C1:OutputUnit(1, {libb}), type=OutputUnit(main, {})*/
-/*member: C1.:OutputUnit(1, {libb})*/
+/*class: C1:
+ class_unit=1{libb},
+ type_unit=main{}
+*/
+/*member: C1.:member_unit=1{libb}*/
 class C1 extends C2 implements C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart
index a1300e3..70f5c4b 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart
@@ -4,9 +4,15 @@
 
 // @dart = 2.7
 
-/*class: C2:OutputUnit(1, {libb}), type=OutputUnit(main, {})*/
-/*member: C2.:OutputUnit(1, {libb})*/
+/*class: C2:
+ class_unit=1{libb},
+ type_unit=main{}
+*/
+/*member: C2.:member_unit=1{libb}*/
 class C2 {}
 
-/*class: C3:none, type=OutputUnit(main, {})*/
+/*class: C3:
+ class_unit=none,
+ type_unit=main{}
+*/
 class C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
index f916de5..dfbc3c4 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
@@ -6,9 +6,9 @@
 import 'libb.dart' deferred as libb;
 import 'libc.dart';
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
-  var f = /*OutputUnit(main, {})*/ () => libb.C1();
+  var f = /*closure_unit=main{}*/ () => libb.C1();
   print(f is C2 Function());
   print(f is C3 Function());
   await libb.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_a.dart b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_a.dart
index 174c5a5..f4c32dc 100644
--- a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_a.dart
+++ b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_a.dart
@@ -7,8 +7,8 @@
 import 'shared.dart' deferred as s1;
 
 /*member: doA:
- OutputUnit(main, {}),
- constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+ constants=[ConstructedConstant(C())=1{s1, s2}],
+ member_unit=main{}
 */
 doA() async {
   await s1.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_b.dart b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_b.dart
index 814bff6..5e0922c 100644
--- a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_b.dart
+++ b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_b.dart
@@ -7,8 +7,8 @@
 import 'shared.dart' deferred as s2;
 
 /*member: doB:
- OutputUnit(main, {}),
- constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+ constants=[ConstructedConstant(C())=1{s1, s2}],
+ member_unit=main{}
 */
 doB() async {
   await s2.loadLibrary();
diff --git a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_c.dart b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_c.dart
index 71f2233..3a8da8a 100644
--- a/pkg/compiler/test/deferred_loading/data/shared_constant/lib_c.dart
+++ b/pkg/compiler/test/deferred_loading/data/shared_constant/lib_c.dart
@@ -4,10 +4,13 @@
 
 // @dart = 2.7
 
-/*class: C:OutputUnit(1, {s1, s2}), type=OutputUnit(1, {s1, s2})*/
+/*class: C:
+ class_unit=1{s1, s2},
+ type_unit=1{s1, s2}
+*/
 class C {
   const C();
 
-  /*member: C.method:OutputUnit(1, {s1, s2})*/
+  /*member: C.method:member_unit=1{s1, s2}*/
   method() => print("1");
 }
diff --git a/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart b/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
index 00dffbc..8337bc0 100644
--- a/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
@@ -13,7 +13,7 @@
 import 'lib_a.dart';
 import 'lib_b.dart';
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   (await doA()).method();
   await doB();
diff --git a/pkg/compiler/test/deferred_loading/data/static_separate/lib1.dart b/pkg/compiler/test/deferred_loading/data/static_separate/lib1.dart
index ebec04b..18c2288 100644
--- a/pkg/compiler/test/deferred_loading/data/static_separate/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/static_separate/lib1.dart
@@ -6,102 +6,123 @@
 
 library lib1;
 
-/*class: ConstClass:OutputUnit(2, {lib1, lib2}), type=OutputUnit(2, {lib1, lib2})*/
+/*class: ConstClass:
+ class_unit=2{lib1, lib2},
+ type_unit=2{lib1, lib2}
+*/
 class ConstClass {
-  /*member: ConstClass.x:OutputUnit(2, {lib1, lib2})*/
+  /*member: ConstClass.x:member_unit=2{lib1, lib2}*/
   final x;
 
   const ConstClass(this.x);
 }
 
 /*member: x:
- OutputUnit(2, {lib1, lib2}),
- constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+ constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=2{lib1, lib2}],
+ member_unit=2{lib1, lib2}
 */
 var x = const ConstClass(const ConstClass(1));
 
-/*class: C:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C {
-  /*member: C.foo:OutputUnit(3, {lib2})*/
+  /*member: C.foo:member_unit=3{lib2}*/
   static foo() {
-    /*OutputUnit(3, {lib2})*/ () {}(); // Hack to avoid inlining.
+    /*closure_unit=3{lib2}*/ () {}(); // Hack to avoid inlining.
     return 1;
   }
 
-  /*member: C.:OutputUnit(1, {lib1})*/
+  /*member: C.:member_unit=1{lib1}*/
   C();
 
-  /*member: C.bar:OutputUnit(1, {lib1})*/
+  /*member: C.bar:member_unit=1{lib1}*/
   bar() {
-    /*OutputUnit(1, {lib1})*/ () {}(); // Hack to avoid inlining.
+    /*closure_unit=1{lib1}*/ () {}(); // Hack to avoid inlining.
     return 1;
   }
 }
 
-/*class: C1:none, type=none*/
+/*class: C1:
+ class_unit=none,
+ type_unit=none
+*/
 class C1 {
   /*member: C1.foo:
-   OutputUnit(3, {lib2}),
-   constants=[MapConstant({})=OutputUnit(3, {lib2})]
+   constants=[MapConstant({})=3{lib2}],
+   member_unit=3{lib2}
   */
   static var foo = const {};
   var bar = const {};
 }
 
-/*class: C2:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C2:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C2 {
-  /*member: C2.foo:OutputUnit(3, {lib2})*/
+  /*member: C2.foo:member_unit=3{lib2}*/
   static var foo = new Map<int, int>.from({1: 2});
 
-  /*member: C2.bar:OutputUnit(1, {lib1})*/
+  /*member: C2.bar:member_unit=1{lib1}*/
   var bar = new Map<int, int>.from({1: 2});
 
-  /*member: C2.:OutputUnit(1, {lib1})*/
+  /*member: C2.:member_unit=1{lib1}*/
   C2();
 }
 
-/*class: C3:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C3:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C3 {
   /*member: C3.foo:
-   OutputUnit(3, {lib2}),
-   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=2{lib1, lib2}],
+   member_unit=3{lib2}
   */
   static final foo = const ConstClass(const ConstClass(1));
 
   /*member: C3.bar:
-   OutputUnit(1, {lib1}),
-   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=2{lib1, lib2}],
+   member_unit=1{lib1}
   */
   final bar = const ConstClass(const ConstClass(1));
 
-  /*member: C3.:OutputUnit(1, {lib1})*/
+  /*member: C3.:member_unit=1{lib1}*/
   C3();
 }
 
-/*class: C4:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C4:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C4 {
-  /*member: C4.foo:OutputUnit(3, {lib2})*/
+  /*member: C4.foo:member_unit=3{lib2}*/
   static final foo = new Map<ConstClass, ConstClass>.from({x: x});
 
-  /*member: C4.bar:OutputUnit(1, {lib1})*/
+  /*member: C4.bar:member_unit=1{lib1}*/
   final bar = new Map<ConstClass, ConstClass>.from({x: x});
 
-  /*member: C4.:OutputUnit(1, {lib1})*/
+  /*member: C4.:member_unit=1{lib1}*/
   C4();
 }
 
-/*class: C5:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: C5:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class C5 {
   static const foo = const [
     const {1: 3}
   ];
 
-  /*member: C5.:OutputUnit(1, {lib1})*/
+  /*member: C5.:member_unit=1{lib1}*/
   C5();
 
-  /*member: C5.bar:OutputUnit(1, {lib1})*/
+  /*member: C5.bar:member_unit=1{lib1}*/
   bar() {
-    /*OutputUnit(1, {lib1})*/ () {}(); // Hack to avoid inlining.
+    /*closure_unit=1{lib1}*/ () {}(); // Hack to avoid inlining.
     return 1;
   }
 }
diff --git a/pkg/compiler/test/deferred_loading/data/static_separate/lib2.dart b/pkg/compiler/test/deferred_loading/data/static_separate/lib2.dart
index 404e560..79c236c 100644
--- a/pkg/compiler/test/deferred_loading/data/static_separate/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/static_separate/lib2.dart
@@ -10,10 +10,10 @@
 import "lib1.dart";
 
 /*member: foo:
- OutputUnit(3, {lib2}),
  constants=[
-  ListConstant(<Map<int*,int*>*>[MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})])=OutputUnit(3, {lib2}),
-  MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})=OutputUnit(3, {lib2})]
+  ListConstant(<Map<int*,int*>*>[MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})])=3{lib2},
+  MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})=3{lib2}],
+ member_unit=3{lib2}
 */
 foo() {
   Expect.equals(1, C.foo());
diff --git a/pkg/compiler/test/deferred_loading/data/static_separate/main.dart b/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
index eb82cbf..78918bf 100644
--- a/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
@@ -14,14 +14,14 @@
 import 'lib1.dart' deferred as lib1;
 import 'lib2.dart' deferred as lib2;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 void main() {
   asyncStart();
-  Expect.throws(/*OutputUnit(main, {})*/ () {
+  Expect.throws(/*closure_unit=main{}*/ () {
     new lib1.C();
   });
-  lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
-    lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib1.loadLibrary().then(/*closure_unit=main{}*/ (_) {
+    lib2.loadLibrary().then(/*closure_unit=main{}*/ (_) {
       print("HERE");
       Expect.equals(1, new lib1.C().bar());
       var x = new lib1.C2();
diff --git a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib1.dart b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib1.dart
index 4ef7683..de7cb74 100644
--- a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib1.dart
@@ -6,5 +6,5 @@
 
 import 'lib2.dart';
 
-/*member: doCast:OutputUnit(main, {})*/
-doCast(List<dynamic> l) => l.cast<B>().map(/*OutputUnit(main, {})*/ (x) => 1);
+/*member: doCast:member_unit=main{}*/
+doCast(List<dynamic> l) => l.cast<B>().map(/*closure_unit=main{}*/ (x) => 1);
diff --git a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib2.dart b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib2.dart
index d6a1146..1a0b2fe 100644
--- a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/lib2.dart
@@ -4,14 +4,20 @@
 
 // @dart = 2.7
 
-/*class: A:OutputUnit(1, {c}), type=OutputUnit(1, {c})*/
+/*class: A:
+ class_unit=1{c},
+ type_unit=1{c}
+*/
 class A {
-  /*member: A.:OutputUnit(1, {c})*/
+  /*member: A.:member_unit=1{c}*/
   A();
 }
 
-/*class: B:none, type=OutputUnit(main, {})*/
+/*class: B:
+ class_unit=none,
+ type_unit=main{}
+*/
 class B extends A {}
 
-/*member: createA:OutputUnit(1, {c})*/
+/*member: createA:member_unit=1{c}*/
 createA() => new A();
diff --git a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
index 70024a3..c279b65 100644
--- a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
@@ -7,7 +7,7 @@
 import 'lib1.dart';
 import 'lib2.dart' deferred as c;
 
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() async {
   await c.loadLibrary();
   c.createA();
diff --git a/pkg/compiler/test/deferred_loading/data/type_arguments/lib1.dart b/pkg/compiler/test/deferred_loading/data/type_arguments/lib1.dart
index 1886af2..0d00710 100644
--- a/pkg/compiler/test/deferred_loading/data/type_arguments/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_arguments/lib1.dart
@@ -6,12 +6,18 @@
 
 import 'lib3.dart';
 
-/*class: A:OutputUnit(1, {lib1}), type=OutputUnit(1, {lib1})*/
+/*class: A:
+ class_unit=1{lib1},
+ type_unit=1{lib1}
+*/
 class A<T> {
   const A();
 }
 
-/*class: B:none, type=OutputUnit(1, {lib1})*/
+/*class: B:
+ class_unit=none,
+ type_unit=1{lib1}
+*/
 class B {}
 
 const dynamic field1 = const A<B>();
diff --git a/pkg/compiler/test/deferred_loading/data/type_arguments/lib2.dart b/pkg/compiler/test/deferred_loading/data/type_arguments/lib2.dart
index 3f18084..2e07747 100644
--- a/pkg/compiler/test/deferred_loading/data/type_arguments/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_arguments/lib2.dart
@@ -4,12 +4,18 @@
 
 // @dart = 2.7
 
-/*class: C:OutputUnit(main, {}), type=OutputUnit(main, {})*/
+/*class: C:
+ class_unit=main{},
+ type_unit=main{}
+*/
 class C<T> {
   const C();
 }
 
-/*class: D:none, type=OutputUnit(main, {})*/
+/*class: D:
+ class_unit=none,
+ type_unit=main{}
+*/
 class D {}
 
 const dynamic field = const C<D>();
diff --git a/pkg/compiler/test/deferred_loading/data/type_arguments/lib3.dart b/pkg/compiler/test/deferred_loading/data/type_arguments/lib3.dart
index 8e2f533..9b56057 100644
--- a/pkg/compiler/test/deferred_loading/data/type_arguments/lib3.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_arguments/lib3.dart
@@ -4,12 +4,18 @@
 
 // @dart = 2.7
 
-/*class: E:OutputUnit(2, {lib3}), type=OutputUnit(2, {lib3})*/
+/*class: E:
+ class_unit=2{lib3},
+ type_unit=2{lib3}
+*/
 class E<T> {
   const E();
 }
 
-/*class: F:none, type=OutputUnit(3, {lib1, lib3})*/
+/*class: F:
+ class_unit=none,
+ type_unit=3{lib1, lib3}
+*/
 class F {}
 
 const dynamic field = const E<F>();
diff --git a/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart b/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
index 2e5f732..dd5873b 100644
--- a/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
@@ -8,7 +8,14 @@
 import 'lib2.dart' as lib2;
 import 'lib3.dart' deferred as lib3;
 
-/*member: main:OutputUnit(main, {}),constants=[ConstructedConstant(A<B*>())=OutputUnit(1, {lib1}),ConstructedConstant(A<F*>())=OutputUnit(1, {lib1}),ConstructedConstant(C<D*>())=OutputUnit(main, {}),ConstructedConstant(E<F*>())=OutputUnit(2, {lib3})]*/
+/*member: main:
+ constants=[
+  ConstructedConstant(A<B*>())=1{lib1},
+  ConstructedConstant(A<F*>())=1{lib1},
+  ConstructedConstant(C<D*>())=main{},
+  ConstructedConstant(E<F*>())=2{lib3}],
+ member_unit=main{}
+*/
 main() async {
   await lib1.loadLibrary();
   lib1.field1;
diff --git a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart
index 51880ac..62e44b1 100644
--- a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart
+++ b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart
@@ -7,26 +7,38 @@
 // All of these types are considered instantiated because we create an instance
 // of [C].
 
-/*class: A:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: A.:OutputUnit(1, {lib})*/
+/*class: A:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: A.:member_unit=1{lib}*/
 class A {}
 
-/*class: Box:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: Box.:OutputUnit(1, {lib})*/
+/*class: Box:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: Box.:member_unit=1{lib}*/
 class Box<T> {
-  /*member: Box.value:OutputUnit(1, {lib})*/
+  /*member: Box.value:member_unit=1{lib}*/
   int value;
 }
 
-/*class: B:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: B.:OutputUnit(1, {lib})*/
+/*class: B:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: B.:member_unit=1{lib}*/
 class B<T> extends A {
-  /*member: B.box:OutputUnit(1, {lib})*/
+  /*member: B.box:member_unit=1{lib}*/
   final box = new Box<T>();
 }
 
-/*class: C:OutputUnit(1, {lib}), type=OutputUnit(1, {lib})*/
-/*member: C.:OutputUnit(1, {lib})*/
+/*class: C:
+ class_unit=1{lib},
+ type_unit=1{lib}
+*/
+/*member: C.:member_unit=1{lib}*/
 class C extends B<N> {}
 
 // N is not instantiated, but used as a type argument in C and indirectly in a
@@ -35,5 +47,8 @@
 // to the main output unit. However, A is in the output unit of C so we fail
 // when trying to finalize the declaration of N while loading the main output
 // unit.
-/*class: N:none, type=OutputUnit(1, {lib})*/
+/*class: N:
+ class_unit=none,
+ type_unit=1{lib}
+*/
 class N extends A {}
diff --git a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
index 0f072de..8b8ad89 100644
--- a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
@@ -11,13 +11,13 @@
 ///
 /// If not, we may include it in the main unit and may not see that the base
 /// class is not added to the main unit.
-/*member: main:OutputUnit(main, {})*/
+/*member: main:member_unit=main{}*/
 main() {
-  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
     dontInline(new lib.C()).box.value;
   });
 }
 
 @pragma('dart2js:noInline')
-/*member: dontInline:OutputUnit(main, {})*/
+/*member: dontInline:member_unit=main{}*/
 dontInline(x) => x;
diff --git a/pkg/compiler/test/deferred_loading/deferred_loading_test.dart b/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
index e2ad132..43f6ffa 100644
--- a/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
+++ b/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
@@ -5,6 +5,7 @@
 // @dart = 2.7
 
 import 'dart:io' hide Link;
+import 'package:_fe_analyzer_shared/src/testing/features.dart';
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
@@ -23,7 +24,7 @@
 
 ///  Add in options to pass to the compiler like
 /// `Flags.disableTypeInference` or `Flags.disableInlining`
-const List<String> compilerOptions = const <String>[];
+const List<String> compilerOptions = const [];
 
 /// Compute the [OutputUnit]s for all source files involved in the test, and
 /// ensure that the compiler is correctly calculating what is used and what is
@@ -32,7 +33,7 @@
 /// same name as the original file in `data`.
 main(List<String> args) {
   asyncTest(() async {
-    Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
+    Directory dataDir = Directory.fromUri(Platform.script.resolve('data'));
     await checkTests(dataDir, const OutputUnitDataComputer(),
         options: compilerOptions, args: args, setUpFunction: () {
       importPrefixes.clear();
@@ -44,13 +45,13 @@
 // artificial constraint of requiring every deferred import use a different
 // named prefix per test. We enforce this constraint here by checking that no
 // prefix name responds to two different libraries.
-Map<String, Uri> importPrefixes = <String, Uri>{};
+Map<String, Uri> importPrefixes = {};
 
 /// Create a consistent string representation of [OutputUnit]s for both
 /// KImportEntities and ImportElements.
 String outputUnitString(OutputUnit unit) {
   if (unit == null) return 'none';
-  StringBuffer sb = new StringBuffer();
+  StringBuffer sb = StringBuffer();
   bool first = true;
   for (ImportEntity import in unit.importsForTesting) {
     if (!first) sb.write(', ');
@@ -72,10 +73,18 @@
     }
     importPrefixes[import.name] = import.enclosingLibraryUri;
   }
-  return 'OutputUnit(${unit.name}, {$sb})';
+  return '${unit.name}{$sb}';
 }
 
-class OutputUnitDataComputer extends DataComputer<String> {
+class Tags {
+  static const String cls = 'class_unit';
+  static const String member = 'member_unit';
+  static const String closure = 'closure_unit';
+  static const String constants = 'constants';
+  static const String type = 'type_unit';
+}
+
+class OutputUnitDataComputer extends DataComputer<Features> {
   const OutputUnitDataComputer();
 
   /// OutputData for [member] as a kernel based element.
@@ -86,33 +95,34 @@
   /// is.
   @override
   void computeMemberData(Compiler compiler, MemberEntity member,
-      Map<Id, ActualData<String>> actualMap,
+      Map<Id, ActualData<Features>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
     MemberDefinition definition = elementMap.getMemberDefinition(member);
-    new OutputUnitIrComputer(compiler.reporter, actualMap, elementMap,
+    OutputUnitIrComputer(compiler.reporter, actualMap, elementMap,
             closedWorld.outputUnitData, closedWorld.closureDataLookup)
         .run(definition.node);
   }
 
   @override
-  void computeClassData(
-      Compiler compiler, ClassEntity cls, Map<Id, ActualData<String>> actualMap,
+  void computeClassData(Compiler compiler, ClassEntity cls,
+      Map<Id, ActualData<Features>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
     ClassDefinition definition = elementMap.getClassDefinition(cls);
-    new OutputUnitIrComputer(compiler.reporter, actualMap, elementMap,
+    OutputUnitIrComputer(compiler.reporter, actualMap, elementMap,
             closedWorld.outputUnitData, closedWorld.closureDataLookup)
         .computeForClass(definition.node);
   }
 
   @override
-  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
+  DataInterpreter<Features> get dataValidator =>
+      const FeaturesDataInterpreter();
 }
 
-class OutputUnitIrComputer extends IrDataExtractor<String> {
+class OutputUnitIrComputer extends IrDataExtractor<Features> {
   final JsToElementMap _elementMap;
   final OutputUnitData _data;
   final ClosureData _closureDataLookup;
@@ -121,34 +131,36 @@
 
   OutputUnitIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData<String>> actualMap,
+      Map<Id, ActualData<Features>> actualMap,
       this._elementMap,
       this._data,
       this._closureDataLookup)
       : super(reporter, actualMap);
 
-  String getMemberValue(MemberEntity member, Set<String> constants) {
-    StringBuffer sb = new StringBuffer();
-    sb.write(outputUnitString(_data.outputUnitForMemberForTesting(member)));
-    if (constants.isNotEmpty) {
-      List<String> text = constants.toList()..sort();
-      sb.write(',constants=[${text.join(',')}]');
+  Features getMemberValue(
+      String tag, MemberEntity member, Set<String> constants) {
+    Features features = Features();
+    features.add(tag,
+        value: outputUnitString(_data.outputUnitForMemberForTesting(member)));
+    for (var constant in constants) {
+      features.addElement(Tags.constants, constant);
     }
-    return sb.toString();
+    return features;
   }
 
   @override
-  String computeClassValue(Id id, ir.Class node) {
+  Features computeClassValue(Id id, ir.Class node) {
     var cls = _elementMap.getClass(node);
-    StringBuffer sb = new StringBuffer();
-    sb.write(outputUnitString(_data.outputUnitForClassForTesting(cls)));
-    sb.write(', type=');
-    sb.write(outputUnitString(_data.outputUnitForClassTypeForTesting(cls)));
-    return sb.toString();
+    Features features = Features();
+    features.add(Tags.cls,
+        value: outputUnitString(_data.outputUnitForClassForTesting(cls)));
+    features.add(Tags.type,
+        value: outputUnitString(_data.outputUnitForClassTypeForTesting(cls)));
+    return features;
   }
 
   @override
-  String computeMemberValue(Id id, ir.Member node) {
+  Features computeMemberValue(Id id, ir.Member node) {
     if (node is ir.Field && node.isConst) {
       ir.Expression initializer = node.initializer;
       ConstantValue constant = _elementMap.getConstantValue(node, initializer);
@@ -160,11 +172,14 @@
           // front of the constructor. The "-6" is an approximation assuming that
           // there is just a single space after "const" and no prefix.
           // TODO(sigmund): offsets should be fixed in the FE instead.
-          span = new SourceSpan(span.uri, span.begin - 6, span.end - 6);
+          span = SourceSpan(span.uri, span.begin - 6, span.end - 6);
         }
         _registerValue(
-            new NodeId(span.begin, IdKind.node),
-            outputUnitString(_data.outputUnitForConstantForTesting(constant)),
+            NodeId(span.begin, IdKind.node),
+            Features.fromMap({
+              Tags.member: outputUnitString(
+                  _data.outputUnitForConstantForTesting(constant))
+            }),
             node,
             span,
             actualMap,
@@ -172,9 +187,10 @@
       }
     }
 
-    String value = getMemberValue(_elementMap.getMember(node), _constants);
+    Features features =
+        getMemberValue(Tags.member, _elementMap.getMember(node), _constants);
     _constants = {};
-    return value;
+    return features;
   }
 
   @override
@@ -188,10 +204,10 @@
   }
 
   @override
-  String computeNodeValue(Id id, ir.TreeNode node) {
+  Features computeNodeValue(Id id, ir.TreeNode node) {
     if (node is ir.FunctionExpression || node is ir.FunctionDeclaration) {
       ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
-      return getMemberValue(info.callMethod, const {});
+      return getMemberValue(Tags.closure, info.callMethod, const {});
     }
     return null;
   }
@@ -215,6 +231,6 @@
   }
   if (value != null) {
     actualMap[id] =
-        new ActualData<T>(id, value, sourceSpan.uri, sourceSpan.begin, object);
+        ActualData<T>(id, value, sourceSpan.uri, sourceSpan.begin, object);
   }
 }
diff --git a/pkg/dartdev/lib/src/commands/analyze_impl.dart b/pkg/dartdev/lib/src/analysis_server.dart
similarity index 60%
rename from pkg/dartdev/lib/src/commands/analyze_impl.dart
rename to pkg/dartdev/lib/src/analysis_server.dart
index 3f315b8..907b5104 100644
--- a/pkg/dartdev/lib/src/commands/analyze_impl.dart
+++ b/pkg/dartdev/lib/src/analysis_server.dart
@@ -10,49 +10,57 @@
     show EditBulkFixesResult, ResponseDecoder;
 import 'package:path/path.dart' as path;
 
-import '../core.dart';
-import '../sdk.dart';
-import '../utils.dart';
+import 'core.dart';
+import 'sdk.dart';
+import 'utils.dart';
 
 /// A class to provide an API wrapper around an analysis server process.
 class AnalysisServer {
-  AnalysisServer(this.sdkPath, this.directories);
+  AnalysisServer(this.sdkPath, this.directory);
 
   final Directory sdkPath;
-  final List<Directory> directories;
+  final Directory directory;
 
   Process _process;
-  final StreamController<bool> _analyzingController =
-      StreamController<bool>.broadcast();
-  Completer<bool> _analysisFinished = Completer();
-  final StreamController<EditBulkFixesResult> _bulkFixesController =
-      StreamController<EditBulkFixesResult>.broadcast();
-  final StreamController<FileAnalysisErrors> _errorsController =
-      StreamController<FileAnalysisErrors>.broadcast();
-  bool _didServerErrorOccur = false;
 
-  final _shutdownRequestCompleter = Completer<void>();
+  Completer<bool> _analysisFinished = Completer();
 
   int _id = 0;
 
-  String _fixRequestId;
-  String _shutdownRequestId;
-
-  bool get didServerErrorOccur => _didServerErrorOccur;
-
-  Stream<bool> get onAnalyzing => _analyzingController.stream;
+  Stream<bool> get onAnalyzing {
+    // {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
+    return _streamController('server.status')
+        .stream
+        .where((event) => event['analysis'] != null)
+        .map((event) => event['analysis']['isAnalyzing'] as bool);
+  }
 
   /// This future completes when we next receive an analysis finished event
-  /// (unless there's not current analysis and we've already received a complete
-  /// event, in which case this future immediately completes).
+  /// (unless there's no current analysis and we've already received a complete
+  /// event, in which case this future completes immediately).
   Future<bool> get analysisFinished => _analysisFinished.future;
 
-  Stream<FileAnalysisErrors> get onErrors => _errorsController.stream;
-
-  Stream<EditBulkFixesResult> get onBulkFixes => _bulkFixesController.stream;
+  Stream<FileAnalysisErrors> get onErrors {
+    // {"event":"analysis.errors","params":{"file":"/Users/.../lib/main.dart","errors":[]}}
+    return _streamController('analysis.errors').stream.map((event) {
+      final file = event['file'] as String;
+      final errorsList = event['errors'] as List<dynamic>;
+      final errors = errorsList
+          .map<Map<String, dynamic>>(castStringKeyedMap)
+          .map<AnalysisError>(
+              (Map<String, dynamic> json) => AnalysisError(json))
+          .toList();
+      return FileAnalysisErrors(file, errors);
+    });
+  }
 
   Future<int> get onExit => _process.exitCode;
 
+  final Map<String, StreamController<Map<String, dynamic>>> _streamControllers =
+      {};
+
+  final Map<String, Completer<Map<String, dynamic>>> _requestCompleters = {};
+
   Future<void> start() async {
     final List<String> command = <String>[
       sdk.analysisServerSnapshot,
@@ -77,7 +85,10 @@
         .transform<String>(const LineSplitter());
     inStream.listen(_handleServerResponse);
 
-    _sendCommand('server.setSubscriptions', <String, dynamic>{
+    _streamController('server.error').stream.listen(_handleServerError);
+
+    // ignore: unawaited_futures
+    _sendCommand('server.setSubscriptions', params: <String, dynamic>{
       'subscriptions': <String>['STATUS'],
     });
 
@@ -85,10 +96,10 @@
     // protocol throws an error (INVALID_FILE_PATH_FORMAT) if there is a
     // trailing slash.
     //
-    // The call to absolute.resolveSymbolicLinksSync() canonicalizes the path
-    // to be passed to the analysis server.
+    // The call to absolute.resolveSymbolicLinksSync() canonicalizes the path to
+    // be passed to the analysis server.
     var dirPath = trimEnd(
-      directories.single.absolute.resolveSymbolicLinksSync(),
+      directory.absolute.resolveSymbolicLinksSync(),
       path.context.separator,
     );
 
@@ -102,40 +113,53 @@
       }
     });
 
-    _sendCommand('analysis.setAnalysisRoots', <String, dynamic>{
+    // ignore: unawaited_futures
+    _sendCommand('analysis.setAnalysisRoots', params: <String, dynamic>{
       'included': [dirPath],
       'excluded': <String>[]
     });
   }
 
-  void requestBulkFixes(String filePath) {
-    _sendCommand('edit.bulkFixes', <String, dynamic>{
+  Future<String> getVersion() {
+    return _sendCommand('server.getVersion')
+        .then((response) => response['version']);
+  }
+
+  Future<EditBulkFixesResult> requestBulkFixes(String filePath) {
+    return _sendCommand('edit.bulkFixes', params: <String, dynamic>{
       'included': [path.canonicalize(filePath)],
+    }).then((result) {
+      return EditBulkFixesResult.fromJson(
+          ResponseDecoder(null), 'result', result);
     });
-    _fixRequestId = _id.toString();
   }
 
-  Future<void> shutdown({Duration timeLimit}) async {
-    timeLimit ??= const Duration(seconds: 5);
-    // Cleanup streams.
-    await _closeStreamControllers();
-
+  Future<void> shutdown({Duration timeout = const Duration(seconds: 5)}) async {
     // Request shutdown.
-    _sendCommand('server.shutdown', null);
-    _shutdownRequestId = _id.toString();
-    await _shutdownRequestCompleter.future.timeout(timeLimit, onTimeout: () {
-      _process?.kill();
+    await _sendCommand('server.shutdown').then((value) {
+      return null;
+    }).timeout(timeout, onTimeout: () async {
+      await dispose();
+    }).then((value) async {
+      await dispose();
     });
   }
 
-  void _sendCommand(String method, Map<String, dynamic> params) {
+  Future<Map<String, dynamic>> _sendCommand(String method,
+      {Map<String, dynamic> params}) {
+    final String id = (++_id).toString();
     final String message = json.encode(<String, dynamic>{
-      'id': (++_id).toString(),
+      'id': id,
       'method': method,
       'params': params,
     });
+
+    _requestCompleters[id] = Completer();
     _process.stdin.writeln(message);
+
     log.trace('==> $message');
+
+    return _requestCompleters[id].future;
   }
 
   void _handleServerResponse(String line) {
@@ -145,47 +169,24 @@
 
     if (response is Map<String, dynamic>) {
       if (response['event'] != null) {
-        final String event = response['event'] as String;
+        final event = response['event'] as String;
         final dynamic params = response['params'];
 
         if (params is Map<String, dynamic>) {
-          if (event == 'server.status') {
-            _handleStatus(castStringKeyedMap(response['params']));
-          } else if (event == 'analysis.errors') {
-            _handleAnalysisIssues(castStringKeyedMap(response['params']));
-          } else if (event == 'server.error') {
-            _handleServerError(castStringKeyedMap(response['params']));
-          }
+          _streamController(event).add(castStringKeyedMap(params));
         }
-      } else if (response['error'] != null) {
-        // Fields are 'code', 'message', and 'stackTrace'.
-        final Map<String, dynamic> error =
-            castStringKeyedMap(response['error']);
-        log.stderr(
-          'Error response from the server: '
-          '${error['code']} ${error['message']}',
-        );
-        if (error['stackTrace'] != null) {
-          log.stderr(error['stackTrace'] as String);
-        }
-        // Dispose of the process at this point so the process doesn't hang.
-        dispose();
-      } else if (response['id'] == _fixRequestId) {
-        var decoder = ResponseDecoder(null);
-        var result =
-            EditBulkFixesResult.fromJson(decoder, 'result', response['result']);
-        _bulkFixesController.add(result);
-      } else if (response['id'] == _shutdownRequestId) {
-        _shutdownRequestCompleter.complete();
-      }
-    }
-  }
+      } else if (response['id'] != null) {
+        final id = response['id'];
 
-  void _handleStatus(Map<String, dynamic> statusInfo) {
-    // {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
-    if (statusInfo['analysis'] != null && !_analyzingController.isClosed) {
-      final bool isAnalyzing = statusInfo['analysis']['isAnalyzing'] as bool;
-      _analyzingController.add(isAnalyzing);
+        if (response['error'] != null) {
+          final error = castStringKeyedMap(response['error']);
+          _requestCompleters
+              .remove(id)
+              ?.completeError(RequestError.parse(error));
+        } else {
+          _requestCompleters.remove(id)?.complete(response['result']);
+        }
+      }
     }
   }
 
@@ -195,30 +196,14 @@
     if (error['stackTrace'] != null) {
       log.stderr(error['stackTrace'] as String);
     }
-    _didServerErrorOccur = true;
   }
 
-  void _handleAnalysisIssues(Map<String, dynamic> issueInfo) {
-    // {"event":"analysis.errors","params":{"file":"/Users/.../lib/main.dart","errors":[]}}
-    final String file = issueInfo['file'] as String;
-    final List<dynamic> errorsList = issueInfo['errors'] as List<dynamic>;
-    final List<AnalysisError> errors = errorsList
-        .map<Map<String, dynamic>>(castStringKeyedMap)
-        .map<AnalysisError>((Map<String, dynamic> json) => AnalysisError(json))
-        .toList();
-    if (!_errorsController.isClosed) {
-      _errorsController.add(FileAnalysisErrors(file, errors));
-    }
-  }
-
-  void _closeStreamControllers() async {
-    await _analyzingController.close();
-    await _errorsController.close();
-    await _bulkFixesController.close();
+  StreamController<Map<String, dynamic>> _streamController(String streamId) {
+    return _streamControllers.putIfAbsent(
+        streamId, () => StreamController<Map<String, dynamic>>.broadcast());
   }
 
   Future<bool> dispose() async {
-    await _closeStreamControllers();
     return _process?.kill();
   }
 }
@@ -286,8 +271,8 @@
   }
 
   // TODO(jwren) add some tests to verify that the results are what we are
-  //  expecting, 'other' is not always on the RHS of the subtraction in the
-  //  implementation.
+  // expecting, 'other' is not always on the RHS of the subtraction in the
+  // implementation.
   @override
   int compareTo(AnalysisError other) {
     // Sort in order of file path, error location, severity, and message.
@@ -333,3 +318,22 @@
 
   FileAnalysisErrors(this.file, this.errors);
 }
+
+class RequestError {
+  static RequestError parse(dynamic error) {
+    return RequestError(
+      error['code'],
+      error['message'],
+      stackTrace: error['stackTrace'],
+    );
+  }
+
+  final String code;
+  final String message;
+  final String stackTrace;
+
+  RequestError(this.code, this.message, {this.stackTrace});
+
+  @override
+  String toString() => '[RequestError code: $code, message: $message]';
+}
diff --git a/pkg/dartdev/lib/src/commands/analyze.dart b/pkg/dartdev/lib/src/commands/analyze.dart
index 6ea3dbe..80ef119 100644
--- a/pkg/dartdev/lib/src/commands/analyze.dart
+++ b/pkg/dartdev/lib/src/commands/analyze.dart
@@ -8,11 +8,11 @@
 import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 
+import '../analysis_server.dart';
 import '../core.dart';
 import '../events.dart';
 import '../sdk.dart';
 import '../utils.dart';
-import 'analyze_impl.dart';
 
 class AnalyzeCommand extends DartdevCommand<int> {
   static const String cmdName = 'analyze';
@@ -55,7 +55,7 @@
 
     final AnalysisServer server = AnalysisServer(
       io.Directory(sdk.sdkPath),
-      [dir],
+      dir,
     );
 
     server.onErrors.listen((FileAnalysisErrors fileErrors) {
@@ -78,81 +78,81 @@
     await server.analysisFinished;
     analysisFinished = true;
 
-    // todo (pq): consider server.shutdown() for cleaner dispose.
-    await server.dispose();
+    await server.shutdown(timeout: Duration(milliseconds: 100));
+
     progress.finish(showTiming: true);
 
     errors.sort();
 
-    if (errors.isNotEmpty) {
-      final bullet = log.ansi.bullet;
-
-      log.stdout('');
-
-      bool hasErrors = false;
-      bool hasWarnings = false;
-      bool hasInfos = false;
-
-      for (final AnalysisError error in errors) {
-        // error • Message ... at path.dart:line:col • (code)
-
-        var filePath = path.relative(error.file, from: dir.path);
-        var severity = error.severity.toLowerCase().padLeft(_severityWidth);
-        if (error.isError) {
-          severity = log.ansi.error(severity);
-        }
-
-        log.stdout(
-          '$severity $bullet '
-          '${log.ansi.emphasized(error.messageSentenceFragment)} '
-          'at $filePath:${error.startLine}:${error.startColumn} $bullet '
-          '(${error.code})',
-        );
-
-        if (verbose) {
-          var padding = ' ' * _bodyIndentWidth;
-          for (var message in error.contextMessages) {
-            log.stdout('$padding${message.message} '
-                'at ${message.filePath}:${message.line}:${message.column}');
-          }
-          if (error.correction != null) {
-            log.stdout('$padding${error.correction}');
-          }
-          if (error.url != null) {
-            log.stdout('$padding${error.url}');
-          }
-        }
-
-        hasErrors |= error.isError;
-        hasWarnings |= error.isWarning;
-        hasInfos |= error.isInfo;
-      }
-
-      log.stdout('');
-
-      final errorCount = errors.length;
-      log.stdout('$errorCount ${pluralize('issue', errorCount)} found.');
-
-      // Return an error code in the range [0-3] dependent on the severity of
-      // the issue(s) found.
-      if (hasErrors) {
-        return 3;
-      }
-
-      bool fatalWarnings = argResults['fatal-warnings'];
-      bool fatalInfos = argResults['fatal-infos'];
-
-      if (fatalWarnings && hasWarnings) {
-        return 2;
-      } else if (fatalInfos && hasInfos) {
-        return 1;
-      } else {
-        return 0;
-      }
-    } else {
+    if (errors.isEmpty) {
       log.stdout('No issues found!');
       return 0;
     }
+
+    final bullet = log.ansi.bullet;
+
+    log.stdout('');
+
+    bool hasErrors = false;
+    bool hasWarnings = false;
+    bool hasInfos = false;
+
+    for (final AnalysisError error in errors) {
+      // error • Message ... at path.dart:line:col • (code)
+
+      var filePath = path.relative(error.file, from: dir.path);
+      var severity = error.severity.toLowerCase().padLeft(_severityWidth);
+      if (error.isError) {
+        severity = log.ansi.error(severity);
+      }
+
+      log.stdout(
+        '$severity $bullet '
+        '${log.ansi.emphasized(error.messageSentenceFragment)} '
+        'at $filePath:${error.startLine}:${error.startColumn} $bullet '
+        '(${error.code})',
+      );
+
+      if (verbose) {
+        var padding = ' ' * _bodyIndentWidth;
+        for (var message in error.contextMessages) {
+          log.stdout('$padding${message.message} '
+              'at ${message.filePath}:${message.line}:${message.column}');
+        }
+        if (error.correction != null) {
+          log.stdout('$padding${error.correction}');
+        }
+        if (error.url != null) {
+          log.stdout('$padding${error.url}');
+        }
+      }
+
+      hasErrors |= error.isError;
+      hasWarnings |= error.isWarning;
+      hasInfos |= error.isInfo;
+    }
+
+    log.stdout('');
+
+    final errorCount = errors.length;
+    log.stdout('$errorCount ${pluralize('issue', errorCount)} found.');
+
+    // Return an error code in the range [0-3] dependent on the severity of
+    // the issue(s) found.
+    if (hasErrors) {
+      return 3;
+    }
+
+    bool fatalWarnings = argResults['fatal-warnings'];
+    bool fatalInfos = argResults['fatal-infos'];
+
+    if (fatalWarnings && hasWarnings) {
+      return 2;
+    } else if (fatalInfos && hasInfos) {
+      return 1;
+    } else {
+      return 0;
+    }
   }
 
   @override
diff --git a/pkg/dartdev/lib/src/commands/fix.dart b/pkg/dartdev/lib/src/commands/fix.dart
index 7cd14e0..990da09 100644
--- a/pkg/dartdev/lib/src/commands/fix.dart
+++ b/pkg/dartdev/lib/src/commands/fix.dart
@@ -3,16 +3,16 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
+import 'dart:io' as io;
 
 import 'package:analysis_server_client/protocol.dart' hide AnalysisError;
 import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 
+import '../analysis_server.dart';
 import '../core.dart';
 import '../events.dart';
 import '../sdk.dart';
-import 'analyze_impl.dart';
 
 class FixCommand extends DartdevCommand<int> {
   static const String cmdName = 'fix';
@@ -37,37 +37,34 @@
     }
 
     var dir = argResults.rest.isEmpty
-        ? Directory.current
-        : Directory(argResults.rest.single);
+        ? io.Directory.current
+        : io.Directory(argResults.rest.single);
     if (!dir.existsSync()) {
       usageException("Directory doesn't exist: ${dir.path}");
     }
 
-    var bulkFixCompleter = Completer<void>();
     var progress =
         log.progress('Computing fixes in ${path.basename(dir.path)}');
 
     var server = AnalysisServer(
-      Directory(sdk.sdkPath),
-      [dir],
+      io.Directory(sdk.sdkPath),
+      dir,
     );
 
     await server.start();
+
+    EditBulkFixesResult fixes;
     //ignore: unawaited_futures
     server.onExit.then((int exitCode) {
-      if (!bulkFixCompleter.isCompleted) {
-        bulkFixCompleter.completeError('analysis server exited: $exitCode');
+      if (fixes == null && exitCode != 0) {
+        progress?.cancel();
+        io.exitCode = exitCode;
       }
     });
 
-    List<SourceFileEdit> edits;
-    server.onBulkFixes.listen((EditBulkFixesResult fixes) {
-      edits = fixes.edits;
-      bulkFixCompleter.complete();
-    });
-    server.requestBulkFixes(dir.absolute.path);
+    fixes = await server.requestBulkFixes(dir.absolute.path);
+    final List<SourceFileEdit> edits = fixes.edits;
 
-    await bulkFixCompleter.future;
     await server.shutdown();
 
     progress.finish(showTiming: true);
@@ -82,6 +79,7 @@
         log.stdout('Fixed $fileCount files.');
       }
     }
+
     return 0;
   }
 
@@ -90,7 +88,7 @@
     for (var edit in edits) {
       var fileName = edit.file;
       files.add(fileName);
-      var file = File(fileName);
+      var file = io.File(fileName);
       var code = await file.exists() ? await file.readAsString() : '';
       code = SourceEdit.applySequence(code, edit.edits);
       await file.writeAsString(code);
diff --git a/pkg/dartdev/test/analysis_server_test.dart b/pkg/dartdev/test/analysis_server_test.dart
new file mode 100644
index 0000000..27f5b3f
--- /dev/null
+++ b/pkg/dartdev/test/analysis_server_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2020, 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 'dart:io' as io;
+
+import 'package:cli_util/cli_logging.dart';
+import 'package:dartdev/src/analysis_server.dart';
+import 'package:dartdev/src/core.dart';
+import 'package:dartdev/src/sdk.dart';
+import 'package:test/test.dart';
+
+import 'utils.dart';
+
+void main() {
+  group('AnalysisServer', () {
+    TestProject p;
+
+    setUp(() {
+      log = Logger.standard();
+      p = project();
+    });
+
+    tearDown(() => p?.dispose());
+
+    test('can start', () async {
+      AnalysisServer server = AnalysisServer(io.Directory(sdk.sdkPath), p.dir);
+      await server.start();
+      await server.shutdown();
+    });
+
+    test('can send message', () async {
+      AnalysisServer server = AnalysisServer(io.Directory(sdk.sdkPath), p.dir);
+      await server.start();
+
+      final response = await server.getVersion();
+      expect(response, isNotEmpty);
+
+      await server.shutdown();
+    });
+  });
+}
diff --git a/pkg/dartdev/test/commands/analyze_test.dart b/pkg/dartdev/test/commands/analyze_test.dart
index aa4e2eb..f7791c2 100644
--- a/pkg/dartdev/test/commands/analyze_test.dart
+++ b/pkg/dartdev/test/commands/analyze_test.dart
@@ -2,7 +2,7 @@
 // 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:dartdev/src/commands/analyze_impl.dart';
+import 'package:dartdev/src/analysis_server.dart';
 import 'package:test/test.dart';
 
 import '../utils.dart';
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index f06a7d0..e5d4c71 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -5654,6 +5654,10 @@
           callName,
           new Arguments(<Expression>[rhs])..fileOffset = node.fileOffset)
         ..fileOffset = node.fileOffset;
+      // Future calls to flow analysis will be using `resultExpression` to refer
+      // to the variable set, so instruct flow analysis to forward the
+      // expression information.
+      inferrer.flowAnalysis.forwardExpression(resultExpression, node);
     } else {
       node.value = rhs..parent = node;
       resultExpression = node;
@@ -5927,6 +5931,10 @@
           callName,
           new Arguments(<Expression>[])..fileOffset = node.fileOffset)
         ..fileOffset = node.fileOffset;
+      // Future calls to flow analysis will be using `resultExpression` to refer
+      // to the variable get, so instruct flow analysis to forward the
+      // expression information.
+      inferrer.flowAnalysis.forwardExpression(resultExpression, node);
     } else {
       resultExpression = node;
     }
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 0fc4c97..7e46518 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE.md file.
 
 import 'package:_fe_analyzer_shared/src/flow_analysis/flow_analysis.dart';
+import 'package:front_end/src/fasta/kernel/internal_ast.dart';
 
 import 'package:kernel/ast.dart'
     show
@@ -314,7 +315,15 @@
   }
 
   @override
-  DartType variableType(VariableDeclaration variable) => variable.type;
+  DartType variableType(VariableDeclaration variable) {
+    if (variable is VariableDeclarationImpl) {
+      // When late variables get lowered, their type is changed, but the
+      // original type is stored in `VariableDeclarationImpl.lateType`, so we
+      // use that if it exists.
+      return variable.lateType ?? variable.type;
+    }
+    return variable.type;
+  }
 
   @override
   DartType tryPromoteToType(DartType to, DartType from) {
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 4a2893b..18581dd4 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -903,6 +903,7 @@
 reflective
 reg
 regis
+registering
 rehash
 reindexed
 reissued
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index 62f6492..f3a1c47 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -1537,6 +1537,7 @@
 instantiation
 instantiations
 instead
+instruct
 instruction
 instructions
 instrumentation
diff --git a/pkg/wasm/lib/src/function.dart b/pkg/wasm/lib/src/function.dart
index 4ac694e..e9a23c5 100644
--- a/pkg/wasm/lib/src/function.dart
+++ b/pkg/wasm/lib/src/function.dart
@@ -10,35 +10,43 @@
 /// WasmFunction is a callable function from a WasmInstance.
 class WasmFunction {
   String _name;
-  Pointer<WasmerExportFunc> _func;
+  Pointer<WasmerFunc> _func;
   List<int> _argTypes;
   int _returnType;
-  Pointer<WasmerValue> _args;
-  Pointer<WasmerValue> _result;
+  Pointer<WasmerVal> _args;
+  Pointer<WasmerVal> _results;
 
   WasmFunction(this._name, this._func, this._argTypes, this._returnType)
-      : _args = allocate<WasmerValue>(count: _argTypes.length),
-        _result = allocate<WasmerValue>() {
+      : _args = _argTypes.length == 0
+            ? nullptr
+            : allocate<WasmerVal>(count: _argTypes.length),
+        _results =
+            _returnType == WasmerValKindVoid ? nullptr : allocate<WasmerVal>() {
     for (var i = 0; i < _argTypes.length; ++i) {
-      _args[i].tag = _argTypes[i];
+      _args[i].kind = _argTypes[i];
     }
   }
 
+  String toString() {
+    return "${wasmerValKindName(_returnType)} $_name" +
+        "(${_argTypes.map(wasmerValKindName).join(", ")})";
+  }
+
   bool _fillArg(dynamic arg, int i) {
     switch (_argTypes[i]) {
-      case WasmerValueTagI32:
+      case WasmerValKindI32:
         if (arg is! int) return false;
         _args[i].i32 = arg;
         return true;
-      case WasmerValueTagI64:
+      case WasmerValKindI64:
         if (arg is! int) return false;
         _args[i].i64 = arg;
         return true;
-      case WasmerValueTagF32:
+      case WasmerValKindF32:
         if (arg is! num) return false;
         _args[i].f32 = arg;
         return true;
-      case WasmerValueTagF64:
+      case WasmerValKindF64:
         if (arg is! num) return false;
         _args[i].f64 = arg;
         return true;
@@ -48,29 +56,29 @@
 
   dynamic apply(List<dynamic> args) {
     if (args.length != _argTypes.length) {
-      throw ArgumentError("Wrong number arguments for WASM function: $_name");
+      throw ArgumentError("Wrong number arguments for WASM function: $this");
     }
     for (var i = 0; i < args.length; ++i) {
       if (!_fillArg(args[i], i)) {
-        throw ArgumentError("Bad argument type for WASM function: $_name");
+        throw ArgumentError("Bad argument type for WASM function: $this");
       }
     }
-    WasmRuntime().call(_func, _args, _argTypes.length, _result,
-        _returnType == WasmerValueTagVoid ? 0 : 1);
+    WasmRuntime().call(_func, _args, _results);
 
-    if (_returnType == WasmerValueTagVoid) {
+    if (_returnType == WasmerValKindVoid) {
       return null;
     }
-    assert(_returnType == _result.ref.tag);
+    var result = _results[0];
+    assert(_returnType == result.kind);
     switch (_returnType) {
-      case WasmerValueTagI32:
-        return _result.ref.i32;
-      case WasmerValueTagI64:
-        return _result.ref.i64;
-      case WasmerValueTagF32:
-        return _result.ref.f32;
-      case WasmerValueTagF64:
-        return _result.ref.f64;
+      case WasmerValKindI32:
+        return result.i32;
+      case WasmerValKindI64:
+        return result.i64;
+      case WasmerValKindF32:
+        return result.f32;
+      case WasmerValKindF64:
+        return result.f64;
     }
   }
 
diff --git a/pkg/wasm/lib/src/module.dart b/pkg/wasm/lib/src/module.dart
index 4013966..a2a9944 100644
--- a/pkg/wasm/lib/src/module.dart
+++ b/pkg/wasm/lib/src/module.dart
@@ -11,14 +11,23 @@
 
 /// WasmModule is a compiled module that can be instantiated.
 class WasmModule {
-  Pointer<WasmerModule> _module;
+  Pointer<WasmerStore> _store;
+  late Pointer<WasmerModule> _module;
 
   /// Compile a module.
-  WasmModule(Uint8List data) : _module = WasmRuntime().compile(data) {}
+  WasmModule(Uint8List data) : _store = WasmRuntime().newStore() {
+    _module = WasmRuntime().compile(_store, data);
+  }
 
   /// Instantiate the module with the given imports.
   WasmInstance instantiate(WasmImports imports) {
-    return WasmInstance(_module, imports);
+    return WasmInstance(_store, _module, imports);
+  }
+
+  /// Create a new memory with the given number of initial pages, and optional
+  /// maximum number of pages.
+  WasmMemory createMemory(int pages, [int? maxPages]) {
+    return WasmMemory._create(_store, pages, maxPages);
   }
 
   /// Returns a description of all of the module's imports and exports, for
@@ -28,12 +37,12 @@
     var runtime = WasmRuntime();
     var imports = runtime.importDescriptors(_module);
     for (var imp in imports) {
-      var kind = wasmerImpExpKindName(imp.kind);
+      var kind = wasmerExternKindName(imp.kind);
       description.write('import $kind: ${imp.moduleName}::${imp.name}\n');
     }
     var exports = runtime.exportDescriptors(_module);
     for (var exp in exports) {
-      var kind = wasmerImpExpKindName(exp.kind);
+      var kind = wasmerExternKindName(exp.kind);
       description.write('export $kind: ${exp.name}\n');
     }
     return description.toString();
@@ -42,13 +51,13 @@
 
 /// WasmImports holds all the imports for a WasmInstance.
 class WasmImports {
-  Pointer<WasmerImport> _imports;
+  Pointer<Pointer<WasmerExtern>> _imports;
   int _capacity;
   int _length;
 
   /// Create an imports object.
   WasmImports([this._capacity = 4])
-      : _imports = allocate<WasmerImport>(count: _capacity),
+      : _imports = allocate<Pointer<WasmerExtern>>(count: _capacity),
         _length = 0 {}
 
   /// Returns the number of imports.
@@ -57,26 +66,31 @@
 
 /// WasmInstance is an instantiated WasmModule.
 class WasmInstance {
+  Pointer<WasmerStore> _store;
   Pointer<WasmerModule> _module;
   Pointer<WasmerInstance> _instance;
   Pointer<WasmerMemory>? _exportedMemory;
   Map<String, WasmFunction> _functions = {};
 
-  WasmInstance(this._module, WasmImports imports)
+  WasmInstance(this._store, this._module, WasmImports imports)
       : _instance = WasmRuntime()
-            .instantiate(_module, imports._imports, imports.length) {
+            .instantiate(_store, _module, imports._imports, imports.length) {
     var runtime = WasmRuntime();
-    var exps = runtime.exports(_instance);
-    for (var e in exps) {
-      var kind = runtime.exportKind(e);
-      String name = runtime.exportName(e);
-      if (kind == WasmerImpExpKindFunction) {
-        var f = runtime.exportToFunction(e);
+    var exports = runtime.exports(_instance);
+    var exportDescs = runtime.exportDescriptors(_module);
+    assert(exports.ref.length == exportDescs.length);
+    for (var i = 0; i < exports.ref.length; ++i) {
+      var e = exports.ref.data[i];
+      var kind = runtime.externKind(exports.ref.data[i]);
+      String name = exportDescs[i].name;
+      if (kind == WasmerExternKindFunction) {
+        var f = runtime.externToFunction(e);
+        var ft = exportDescs[i].funcType;
         _functions[name] = WasmFunction(
-            name, f, runtime.getArgTypes(f), runtime.getReturnType(f));
-      } else if (kind == WasmerImpExpKindMemory) {
+            name, f, runtime.getArgTypes(ft), runtime.getReturnType(ft));
+      } else if (kind == WasmerExternKindMemory) {
         // WASM currently allows only one memory per module.
-        _exportedMemory = runtime.exportToMemory(e);
+        _exportedMemory = runtime.externToMemory(e);
       }
     }
   }
@@ -107,8 +121,8 @@
 
   /// Create a new memory with the given number of initial pages, and optional
   /// maximum number of pages.
-  WasmMemory(int pages, [int? maxPages])
-      : _mem = WasmRuntime().newMemory(pages, maxPages) {
+  WasmMemory._create(Pointer<WasmerStore> store, int pages, int? maxPages)
+      : _mem = WasmRuntime().newMemory(store, pages, maxPages) {
     _view = WasmRuntime().memoryView(_mem);
   }
 
diff --git a/pkg/wasm/lib/src/runtime.dart b/pkg/wasm/lib/src/runtime.dart
index 4ddec1d..6f09208 100644
--- a/pkg/wasm/lib/src/runtime.dart
+++ b/pkg/wasm/lib/src/runtime.dart
@@ -2,6 +2,10 @@
 // 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.
 
+// This file has been automatically generated. Please do not edit it manually.
+// To regenerate the file, use the following command
+// "generate_ffi_boilerplate.py".
+
 import 'dart:convert';
 import 'dart:ffi';
 import 'dart:io';
@@ -14,62 +18,92 @@
   int kind;
   String moduleName;
   String name;
-  WasmImportDescriptor(this.kind, this.moduleName, this.name);
+  Pointer<WasmerFunctype> funcType;
+  WasmImportDescriptor(this.kind, this.moduleName, this.name, this.funcType);
 }
 
 class WasmExportDescriptor {
   int kind;
   String name;
-  WasmExportDescriptor(this.kind, this.name);
+  Pointer<WasmerFunctype> funcType;
+  WasmExportDescriptor(this.kind, this.name, this.funcType);
 }
 
 class WasmRuntime {
   static WasmRuntime? _inst;
 
   DynamicLibrary _lib;
-  late WasmerCompileFn _compile;
-  late WasmerInstantiateFn _instantiate;
+  late Pointer<WasmerEngine> _engine;
+  late WasmerByteVecDeleteFn _byte_vec_delete;
+  late WasmerByteVecNewFn _byte_vec_new;
+  late WasmerByteVecNewEmptyFn _byte_vec_new_empty;
+  late WasmerByteVecNewUninitializedFn _byte_vec_new_uninitialized;
+  late WasmerEngineDeleteFn _engine_delete;
+  late WasmerEngineNewFn _engine_new;
+  late WasmerExporttypeNameFn _exporttype_name;
+  late WasmerExporttypeTypeFn _exporttype_type;
+  late WasmerExporttypeVecDeleteFn _exporttype_vec_delete;
+  late WasmerExporttypeVecNewFn _exporttype_vec_new;
+  late WasmerExporttypeVecNewEmptyFn _exporttype_vec_new_empty;
+  late WasmerExporttypeVecNewUninitializedFn _exporttype_vec_new_uninitialized;
+  late WasmerExternAsFuncFn _extern_as_func;
+  late WasmerExternAsMemoryFn _extern_as_memory;
+  late WasmerExternDeleteFn _extern_delete;
+  late WasmerExternKindFn _extern_kind;
+  late WasmerExternVecDeleteFn _extern_vec_delete;
+  late WasmerExternVecNewFn _extern_vec_new;
+  late WasmerExternVecNewEmptyFn _extern_vec_new_empty;
+  late WasmerExternVecNewUninitializedFn _extern_vec_new_uninitialized;
+  late WasmerExterntypeAsFunctypeFn _externtype_as_functype;
+  late WasmerExterntypeDeleteFn _externtype_delete;
+  late WasmerExterntypeKindFn _externtype_kind;
+  late WasmerFuncCallFn _func_call;
+  late WasmerFuncDeleteFn _func_delete;
+  late WasmerFunctypeDeleteFn _functype_delete;
+  late WasmerFunctypeParamsFn _functype_params;
+  late WasmerFunctypeResultsFn _functype_results;
+  late WasmerImporttypeModuleFn _importtype_module;
+  late WasmerImporttypeNameFn _importtype_name;
+  late WasmerImporttypeTypeFn _importtype_type;
+  late WasmerImporttypeVecDeleteFn _importtype_vec_delete;
+  late WasmerImporttypeVecNewFn _importtype_vec_new;
+  late WasmerImporttypeVecNewEmptyFn _importtype_vec_new_empty;
+  late WasmerImporttypeVecNewUninitializedFn _importtype_vec_new_uninitialized;
+  late WasmerInstanceDeleteFn _instance_delete;
   late WasmerInstanceExportsFn _instance_exports;
-  late WasmerExportsLenFn _exports_len;
-  late WasmerExportsGetFn _exports_get;
-  late WasmerExportKindFn _export_kind;
-  late WasmerExportToFuncFn _export_to_func;
-  late WasmerExportFuncReturnsArityFn _export_func_returns_arity;
-  late WasmerExportFuncReturnsFn _export_func_returns;
-  late WasmerExportFuncParamsArityFn _export_func_params_arity;
-  late WasmerExportFuncParamsFn _export_func_params;
-  late WasmerExportFuncCallFn _export_func_call;
-  late WasmerExportNamePtrFn _export_name_ptr;
-  late WasmerExportDescriptorsFn _export_descriptors;
-  late WasmerExportDescriptorsDestroyFn _export_descriptors_destroy;
-  late WasmerExportDescriptorsLenFn _export_descriptors_len;
-  late WasmerExportDescriptorsGetFn _export_descriptors_get;
-  late WasmerExportDescriptorKindFn _export_descriptor_kind;
-  late WasmerExportDescriptorNamePtrFn _export_descriptor_name_ptr;
-  late WasmerImportDescriptorModuleNamePtrFn _import_descriptor_module_name_ptr;
-  late WasmerImportDescriptorNamePtrFn _import_descriptor_name_ptr;
-  late WasmerImportDescriptorsFn _import_descriptors;
-  late WasmerImportDescriptorsDestroyFn _import_descriptors_destroy;
-  late WasmerImportDescriptorsLenFn _import_descriptors_len;
-  late WasmerImportDescriptorsGetFn _import_descriptors_get;
-  late WasmerImportDescriptorKindFn _import_descriptor_kind;
-  late WasmerExportToMemoryFn _export_to_memory;
-  late WasmerMemoryNewPtrFn _memory_new_ptr;
-  late WasmerMemoryGrowFn _memory_grow;
-  late WasmerMemoryLengthFn _memory_length;
+  late WasmerInstanceNewFn _instance_new;
   late WasmerMemoryDataFn _memory_data;
-  late WasmerMemoryDataLengthFn _memory_data_length;
+  late WasmerMemoryDataSizeFn _memory_data_size;
+  late WasmerMemoryDeleteFn _memory_delete;
+  late WasmerMemoryGrowFn _memory_grow;
+  late WasmerMemoryNewFn _memory_new;
+  late WasmerMemorySizeFn _memory_size;
+  late WasmerMemorytypeDeleteFn _memorytype_delete;
+  late WasmerMemorytypeNewFn _memorytype_new;
+  late WasmerModuleDeleteFn _module_delete;
+  late WasmerModuleExportsFn _module_exports;
+  late WasmerModuleImportsFn _module_imports;
+  late WasmerModuleNewFn _module_new;
+  late WasmerStoreDeleteFn _store_delete;
+  late WasmerStoreNewFn _store_new;
+  late WasmerTrapDeleteFn _trap_delete;
+  late WasmerValtypeDeleteFn _valtype_delete;
+  late WasmerValtypeKindFn _valtype_kind;
+  late WasmerValtypeVecDeleteFn _valtype_vec_delete;
+  late WasmerValtypeVecNewFn _valtype_vec_new;
+  late WasmerValtypeVecNewEmptyFn _valtype_vec_new_empty;
+  late WasmerValtypeVecNewUninitializedFn _valtype_vec_new_uninitialized;
 
   factory WasmRuntime() {
-    if (_inst == null) {
-      _inst = WasmRuntime._init();
-    }
-    return _inst as WasmRuntime;
+    WasmRuntime inst = _inst ?? WasmRuntime._init();
+    _inst = inst;
+    return inst;
   }
 
   static String _getLibName() {
-    if (Platform.isMacOS) return "libwasmer_wrapper.dylib";
-    if (Platform.isLinux) return "libwasmer_wrapper.so";
+    if (Platform.isMacOS) return "libwasmer.dylib";
+    if (Platform.isLinux) return "libwasmer.so";
+    // TODO(dartbug.com/37882): Support more platforms.
     throw Exception("Wasm not currently supported on this platform");
   }
 
@@ -104,296 +138,322 @@
 
   WasmRuntime._init()
       : _lib = DynamicLibrary.open(path.join(_getLibDir(), _getLibName())) {
-    _compile = _lib.lookupFunction<NativeWasmerCompileFn, WasmerCompileFn>(
-        'wasmer_compile');
-    _instantiate =
-        _lib.lookupFunction<NativeWasmerInstantiateFn, WasmerInstantiateFn>(
-            'wasmer_module_instantiate');
+    _byte_vec_delete =
+        _lib.lookupFunction<NativeWasmerByteVecDeleteFn, WasmerByteVecDeleteFn>(
+            'wasm_byte_vec_delete');
+    _byte_vec_new =
+        _lib.lookupFunction<NativeWasmerByteVecNewFn, WasmerByteVecNewFn>(
+            'wasm_byte_vec_new');
+    _byte_vec_new_empty = _lib.lookupFunction<NativeWasmerByteVecNewEmptyFn,
+        WasmerByteVecNewEmptyFn>('wasm_byte_vec_new_empty');
+    _byte_vec_new_uninitialized = _lib.lookupFunction<
+        NativeWasmerByteVecNewUninitializedFn,
+        WasmerByteVecNewUninitializedFn>('wasm_byte_vec_new_uninitialized');
+    _engine_delete =
+        _lib.lookupFunction<NativeWasmerEngineDeleteFn, WasmerEngineDeleteFn>(
+            'wasm_engine_delete');
+    _engine_new =
+        _lib.lookupFunction<NativeWasmerEngineNewFn, WasmerEngineNewFn>(
+            'wasm_engine_new');
+    _exporttype_name = _lib.lookupFunction<NativeWasmerExporttypeNameFn,
+        WasmerExporttypeNameFn>('wasm_exporttype_name');
+    _exporttype_type = _lib.lookupFunction<NativeWasmerExporttypeTypeFn,
+        WasmerExporttypeTypeFn>('wasm_exporttype_type');
+    _exporttype_vec_delete = _lib.lookupFunction<
+        NativeWasmerExporttypeVecDeleteFn,
+        WasmerExporttypeVecDeleteFn>('wasm_exporttype_vec_delete');
+    _exporttype_vec_new = _lib.lookupFunction<NativeWasmerExporttypeVecNewFn,
+        WasmerExporttypeVecNewFn>('wasm_exporttype_vec_new');
+    _exporttype_vec_new_empty = _lib.lookupFunction<
+        NativeWasmerExporttypeVecNewEmptyFn,
+        WasmerExporttypeVecNewEmptyFn>('wasm_exporttype_vec_new_empty');
+    _exporttype_vec_new_uninitialized = _lib.lookupFunction<
+            NativeWasmerExporttypeVecNewUninitializedFn,
+            WasmerExporttypeVecNewUninitializedFn>(
+        'wasm_exporttype_vec_new_uninitialized');
+    _extern_as_func =
+        _lib.lookupFunction<NativeWasmerExternAsFuncFn, WasmerExternAsFuncFn>(
+            'wasm_extern_as_func');
+    _extern_as_memory = _lib.lookupFunction<NativeWasmerExternAsMemoryFn,
+        WasmerExternAsMemoryFn>('wasm_extern_as_memory');
+    _extern_delete =
+        _lib.lookupFunction<NativeWasmerExternDeleteFn, WasmerExternDeleteFn>(
+            'wasm_extern_delete');
+    _extern_kind =
+        _lib.lookupFunction<NativeWasmerExternKindFn, WasmerExternKindFn>(
+            'wasm_extern_kind');
+    _extern_vec_delete = _lib.lookupFunction<NativeWasmerExternVecDeleteFn,
+        WasmerExternVecDeleteFn>('wasm_extern_vec_delete');
+    _extern_vec_new =
+        _lib.lookupFunction<NativeWasmerExternVecNewFn, WasmerExternVecNewFn>(
+            'wasm_extern_vec_new');
+    _extern_vec_new_empty = _lib.lookupFunction<NativeWasmerExternVecNewEmptyFn,
+        WasmerExternVecNewEmptyFn>('wasm_extern_vec_new_empty');
+    _extern_vec_new_uninitialized = _lib.lookupFunction<
+        NativeWasmerExternVecNewUninitializedFn,
+        WasmerExternVecNewUninitializedFn>('wasm_extern_vec_new_uninitialized');
+    _externtype_as_functype = _lib.lookupFunction<
+        NativeWasmerExterntypeAsFunctypeFn,
+        WasmerExterntypeAsFunctypeFn>('wasm_externtype_as_functype');
+    _externtype_delete = _lib.lookupFunction<NativeWasmerExterntypeDeleteFn,
+        WasmerExterntypeDeleteFn>('wasm_externtype_delete');
+    _externtype_kind = _lib.lookupFunction<NativeWasmerExterntypeKindFn,
+        WasmerExterntypeKindFn>('wasm_externtype_kind');
+    _func_call = _lib.lookupFunction<NativeWasmerFuncCallFn, WasmerFuncCallFn>(
+        'wasm_func_call');
+    _func_delete =
+        _lib.lookupFunction<NativeWasmerFuncDeleteFn, WasmerFuncDeleteFn>(
+            'wasm_func_delete');
+    _functype_delete = _lib.lookupFunction<NativeWasmerFunctypeDeleteFn,
+        WasmerFunctypeDeleteFn>('wasm_functype_delete');
+    _functype_params = _lib.lookupFunction<NativeWasmerFunctypeParamsFn,
+        WasmerFunctypeParamsFn>('wasm_functype_params');
+    _functype_results = _lib.lookupFunction<NativeWasmerFunctypeResultsFn,
+        WasmerFunctypeResultsFn>('wasm_functype_results');
+    _importtype_module = _lib.lookupFunction<NativeWasmerImporttypeModuleFn,
+        WasmerImporttypeModuleFn>('wasm_importtype_module');
+    _importtype_name = _lib.lookupFunction<NativeWasmerImporttypeNameFn,
+        WasmerImporttypeNameFn>('wasm_importtype_name');
+    _importtype_type = _lib.lookupFunction<NativeWasmerImporttypeTypeFn,
+        WasmerImporttypeTypeFn>('wasm_importtype_type');
+    _importtype_vec_delete = _lib.lookupFunction<
+        NativeWasmerImporttypeVecDeleteFn,
+        WasmerImporttypeVecDeleteFn>('wasm_importtype_vec_delete');
+    _importtype_vec_new = _lib.lookupFunction<NativeWasmerImporttypeVecNewFn,
+        WasmerImporttypeVecNewFn>('wasm_importtype_vec_new');
+    _importtype_vec_new_empty = _lib.lookupFunction<
+        NativeWasmerImporttypeVecNewEmptyFn,
+        WasmerImporttypeVecNewEmptyFn>('wasm_importtype_vec_new_empty');
+    _importtype_vec_new_uninitialized = _lib.lookupFunction<
+            NativeWasmerImporttypeVecNewUninitializedFn,
+            WasmerImporttypeVecNewUninitializedFn>(
+        'wasm_importtype_vec_new_uninitialized');
+    _instance_delete = _lib.lookupFunction<NativeWasmerInstanceDeleteFn,
+        WasmerInstanceDeleteFn>('wasm_instance_delete');
     _instance_exports = _lib.lookupFunction<NativeWasmerInstanceExportsFn,
-        WasmerInstanceExportsFn>('wasmer_instance_exports');
-    _exports_len =
-        _lib.lookupFunction<NativeWasmerExportsLenFn, WasmerExportsLenFn>(
-            'wasmer_exports_len');
-    _exports_get =
-        _lib.lookupFunction<NativeWasmerExportsGetFn, WasmerExportsGetFn>(
-            'wasmer_exports_get');
-    _export_kind =
-        _lib.lookupFunction<NativeWasmerExportKindFn, WasmerExportKindFn>(
-            'wasmer_export_kind');
-    _export_to_func =
-        _lib.lookupFunction<NativeWasmerExportToFuncFn, WasmerExportToFuncFn>(
-            'wasmer_export_to_func');
-    _export_func_returns_arity = _lib.lookupFunction<
-        NativeWasmerExportFuncReturnsArityFn,
-        WasmerExportFuncReturnsArityFn>('wasmer_export_func_returns_arity');
-    _export_func_returns = _lib.lookupFunction<NativeWasmerExportFuncReturnsFn,
-        WasmerExportFuncReturnsFn>('wasmer_export_func_returns');
-    _export_func_params_arity = _lib.lookupFunction<
-        NativeWasmerExportFuncParamsArityFn,
-        WasmerExportFuncParamsArityFn>('wasmer_export_func_params_arity');
-    _export_func_params = _lib.lookupFunction<NativeWasmerExportFuncParamsFn,
-        WasmerExportFuncParamsFn>('wasmer_export_func_params');
-    _export_func_call = _lib.lookupFunction<NativeWasmerExportFuncCallFn,
-        WasmerExportFuncCallFn>('wasmer_export_func_call');
-    _export_descriptors = _lib.lookupFunction<NativeWasmerExportDescriptorsFn,
-        WasmerExportDescriptorsFn>('wasmer_export_descriptors');
-    _export_descriptors_destroy = _lib.lookupFunction<
-        NativeWasmerExportDescriptorsDestroyFn,
-        WasmerExportDescriptorsDestroyFn>('wasmer_export_descriptors_destroy');
-    _export_descriptors_len = _lib.lookupFunction<
-        NativeWasmerExportDescriptorsLenFn,
-        WasmerExportDescriptorsLenFn>('wasmer_export_descriptors_len');
-    _export_descriptors_get = _lib.lookupFunction<
-        NativeWasmerExportDescriptorsGetFn,
-        WasmerExportDescriptorsGetFn>('wasmer_export_descriptors_get');
-    _export_descriptor_kind = _lib.lookupFunction<
-        NativeWasmerExportDescriptorKindFn,
-        WasmerExportDescriptorKindFn>('wasmer_export_descriptor_kind');
-    _export_name_ptr =
-        _lib.lookupFunction<NativeWasmerExportNamePtrFn, WasmerExportNamePtrFn>(
-            'wasmer_export_name_ptr');
-    _export_descriptor_name_ptr = _lib.lookupFunction<
-        NativeWasmerExportDescriptorNamePtrFn,
-        WasmerExportDescriptorNamePtrFn>('wasmer_export_descriptor_name_ptr');
-    _import_descriptors = _lib.lookupFunction<NativeWasmerImportDescriptorsFn,
-        WasmerImportDescriptorsFn>('wasmer_import_descriptors');
-    _import_descriptors_destroy = _lib.lookupFunction<
-        NativeWasmerImportDescriptorsDestroyFn,
-        WasmerImportDescriptorsDestroyFn>('wasmer_import_descriptors_destroy');
-    _import_descriptors_len = _lib.lookupFunction<
-        NativeWasmerImportDescriptorsLenFn,
-        WasmerImportDescriptorsLenFn>('wasmer_import_descriptors_len');
-    _import_descriptors_get = _lib.lookupFunction<
-        NativeWasmerImportDescriptorsGetFn,
-        WasmerImportDescriptorsGetFn>('wasmer_import_descriptors_get');
-    _import_descriptor_kind = _lib.lookupFunction<
-        NativeWasmerImportDescriptorKindFn,
-        WasmerImportDescriptorKindFn>('wasmer_import_descriptor_kind');
-    _import_descriptor_module_name_ptr = _lib.lookupFunction<
-            NativeWasmerImportDescriptorModuleNamePtrFn,
-            WasmerImportDescriptorModuleNamePtrFn>(
-        'wasmer_import_descriptor_module_name_ptr');
-    _import_descriptor_name_ptr = _lib.lookupFunction<
-        NativeWasmerImportDescriptorNamePtrFn,
-        WasmerImportDescriptorNamePtrFn>('wasmer_import_descriptor_name_ptr');
-    _export_to_memory = _lib.lookupFunction<NativeWasmerExportToMemoryFn,
-        WasmerExportToMemoryFn>('wasmer_export_to_memory');
-    _memory_new_ptr =
-        _lib.lookupFunction<NativeWasmerMemoryNewPtrFn, WasmerMemoryNewPtrFn>(
-            'wasmer_memory_new_ptr');
-    _memory_grow =
-        _lib.lookupFunction<NativeWasmerMemoryGrowFn, WasmerMemoryGrowFn>(
-            'wasmer_memory_grow');
-    _memory_length =
-        _lib.lookupFunction<NativeWasmerMemoryLengthFn, WasmerMemoryLengthFn>(
-            'wasmer_memory_length');
+        WasmerInstanceExportsFn>('wasm_instance_exports');
+    _instance_new =
+        _lib.lookupFunction<NativeWasmerInstanceNewFn, WasmerInstanceNewFn>(
+            'wasm_instance_new');
     _memory_data =
         _lib.lookupFunction<NativeWasmerMemoryDataFn, WasmerMemoryDataFn>(
-            'wasmer_memory_data');
-    _memory_data_length = _lib.lookupFunction<NativeWasmerMemoryDataLengthFn,
-        WasmerMemoryDataLengthFn>('wasmer_memory_data_length');
+            'wasm_memory_data');
+    _memory_data_size = _lib.lookupFunction<NativeWasmerMemoryDataSizeFn,
+        WasmerMemoryDataSizeFn>('wasm_memory_data_size');
+    _memory_delete =
+        _lib.lookupFunction<NativeWasmerMemoryDeleteFn, WasmerMemoryDeleteFn>(
+            'wasm_memory_delete');
+    _memory_grow =
+        _lib.lookupFunction<NativeWasmerMemoryGrowFn, WasmerMemoryGrowFn>(
+            'wasm_memory_grow');
+    _memory_new =
+        _lib.lookupFunction<NativeWasmerMemoryNewFn, WasmerMemoryNewFn>(
+            'wasm_memory_new');
+    _memory_size =
+        _lib.lookupFunction<NativeWasmerMemorySizeFn, WasmerMemorySizeFn>(
+            'wasm_memory_size');
+    _memorytype_delete = _lib.lookupFunction<NativeWasmerMemorytypeDeleteFn,
+        WasmerMemorytypeDeleteFn>('wasm_memorytype_delete');
+    _memorytype_new =
+        _lib.lookupFunction<NativeWasmerMemorytypeNewFn, WasmerMemorytypeNewFn>(
+            'wasm_memorytype_new');
+    _module_delete =
+        _lib.lookupFunction<NativeWasmerModuleDeleteFn, WasmerModuleDeleteFn>(
+            'wasm_module_delete');
+    _module_exports =
+        _lib.lookupFunction<NativeWasmerModuleExportsFn, WasmerModuleExportsFn>(
+            'wasm_module_exports');
+    _module_imports =
+        _lib.lookupFunction<NativeWasmerModuleImportsFn, WasmerModuleImportsFn>(
+            'wasm_module_imports');
+    _module_new =
+        _lib.lookupFunction<NativeWasmerModuleNewFn, WasmerModuleNewFn>(
+            'wasm_module_new');
+    _store_delete =
+        _lib.lookupFunction<NativeWasmerStoreDeleteFn, WasmerStoreDeleteFn>(
+            'wasm_store_delete');
+    _store_new = _lib.lookupFunction<NativeWasmerStoreNewFn, WasmerStoreNewFn>(
+        'wasm_store_new');
+    _trap_delete =
+        _lib.lookupFunction<NativeWasmerTrapDeleteFn, WasmerTrapDeleteFn>(
+            'wasm_trap_delete');
+    _valtype_delete =
+        _lib.lookupFunction<NativeWasmerValtypeDeleteFn, WasmerValtypeDeleteFn>(
+            'wasm_valtype_delete');
+    _valtype_kind =
+        _lib.lookupFunction<NativeWasmerValtypeKindFn, WasmerValtypeKindFn>(
+            'wasm_valtype_kind');
+    _valtype_vec_delete = _lib.lookupFunction<NativeWasmerValtypeVecDeleteFn,
+        WasmerValtypeVecDeleteFn>('wasm_valtype_vec_delete');
+    _valtype_vec_new =
+        _lib.lookupFunction<NativeWasmerValtypeVecNewFn, WasmerValtypeVecNewFn>(
+            'wasm_valtype_vec_new');
+    _valtype_vec_new_empty = _lib.lookupFunction<
+        NativeWasmerValtypeVecNewEmptyFn,
+        WasmerValtypeVecNewEmptyFn>('wasm_valtype_vec_new_empty');
+    _valtype_vec_new_uninitialized = _lib.lookupFunction<
+            NativeWasmerValtypeVecNewUninitializedFn,
+            WasmerValtypeVecNewUninitializedFn>(
+        'wasm_valtype_vec_new_uninitialized');
+
+    _engine = _engine_new();
   }
 
-  Pointer<WasmerModule> compile(Uint8List data) {
+  Pointer<WasmerStore> newStore() {
+    return _store_new(_engine);
+  }
+
+  Pointer<WasmerModule> compile(Pointer<WasmerStore> store, Uint8List data) {
     var dataPtr = allocate<Uint8>(count: data.length);
     for (int i = 0; i < data.length; ++i) {
       dataPtr[i] = data[i];
     }
+    var dataVec = allocate<WasmerByteVec>();
+    dataVec.ref.data = dataPtr;
+    dataVec.ref.length = data.length;
 
-    var modulePtrPtr = allocate<Pointer<WasmerModule>>();
-    int result = _compile(modulePtrPtr, dataPtr, data.length);
-    Pointer<WasmerModule> modulePtr = modulePtrPtr.value;
+    var modulePtr = _module_new(store, dataVec);
 
-    free(modulePtrPtr);
     free(dataPtr);
+    free(dataVec);
 
-    if (result != WasmerResultOk) {
+    if (modulePtr == nullptr) {
       throw Exception("Wasm module compile failed");
     }
 
     return modulePtr;
   }
 
-  String _callStringWrapperFunction(Function fn, dynamic arg) {
-    var strPtr = allocate<WasmerByteArray>();
-    fn(arg, strPtr);
-    var str = strPtr.ref.string;
-    free(strPtr);
-    return str;
-  }
-
   List<WasmExportDescriptor> exportDescriptors(Pointer<WasmerModule> module) {
-    var exportsPtrPtr = allocate<Pointer<WasmerExportDescriptors>>();
-    _export_descriptors(module, exportsPtrPtr);
-    Pointer<WasmerExportDescriptors> exportsPtr = exportsPtrPtr.value;
-    free(exportsPtrPtr);
-    var n = _export_descriptors_len(exportsPtr);
+    var exportsVec = allocate<WasmerExporttypeVec>();
+    _module_exports(module, exportsVec);
     var exps = <WasmExportDescriptor>[];
-    for (var i = 0; i < n; ++i) {
-      var exp = _export_descriptors_get(exportsPtr, i);
-      exps.add(WasmExportDescriptor(_export_descriptor_kind(exp),
-          _callStringWrapperFunction(_export_descriptor_name_ptr, exp)));
+    for (var i = 0; i < exportsVec.ref.length; ++i) {
+      var exp = exportsVec.ref.data[i];
+      var extern = _exporttype_type(exp);
+      var kind = _externtype_kind(extern);
+      var fnType = kind == WasmerExternKindFunction
+          ? _externtype_as_functype(extern)
+          : nullptr;
+      exps.add(WasmExportDescriptor(
+          kind, _exporttype_name(exp).ref.toString(), fnType));
     }
-    _export_descriptors_destroy(exportsPtr);
+    free(exportsVec);
     return exps;
   }
 
   List<WasmImportDescriptor> importDescriptors(Pointer<WasmerModule> module) {
-    var importsPtrPtr = allocate<Pointer<WasmerImportDescriptors>>();
-    _import_descriptors(module, importsPtrPtr);
-    Pointer<WasmerImportDescriptors> importsPtr = importsPtrPtr.value;
-    free(importsPtrPtr);
-
-    var n = _import_descriptors_len(importsPtr);
+    var importsVec = allocate<WasmerImporttypeVec>();
+    _module_imports(module, importsVec);
     var imps = <WasmImportDescriptor>[];
-    for (var i = 0; i < n; ++i) {
-      var imp = _import_descriptors_get(importsPtr, i);
+    for (var i = 0; i < importsVec.ref.length; ++i) {
+      var imp = importsVec.ref.data[i];
+      var extern = _importtype_type(imp);
+      var kind = _externtype_kind(extern);
+      var fnType = kind == WasmerExternKindFunction
+          ? _externtype_as_functype(extern)
+          : nullptr;
       imps.add(WasmImportDescriptor(
-          _import_descriptor_kind(imp),
-          _callStringWrapperFunction(_import_descriptor_module_name_ptr, imp),
-          _callStringWrapperFunction(_import_descriptor_name_ptr, imp)));
+          kind,
+          _importtype_module(imp).ref.toString(),
+          _importtype_name(imp).ref.toString(),
+          fnType));
     }
-    _import_descriptors_destroy(importsPtr);
+    free(importsVec);
     return imps;
   }
 
-  Pointer<WasmerInstance> instantiate(Pointer<WasmerModule> module,
-      Pointer<WasmerImport> imports, int numImports) {
-    var instancePtrPtr = allocate<Pointer<WasmerInstance>>();
-    int result = _instantiate(module, instancePtrPtr, imports, numImports);
-    Pointer<WasmerInstance> instancePtr = instancePtrPtr.value;
-    free(instancePtrPtr);
+  Pointer<WasmerInstance> instantiate(
+      Pointer<WasmerStore> store,
+      Pointer<WasmerModule> module,
+      Pointer<Pointer<WasmerExtern>> imports,
+      int numImports) {
+    var importsVec = allocate<WasmerImporttypeVec>();
+    _module_imports(module, importsVec);
+    if (importsVec.ref.length != numImports) {
+      throw Exception(
+          "Wrong number of imports. Expected ${importsVec.ref.length} but " +
+              "found $numImports.");
+    }
+    free(importsVec);
 
-    if (result != WasmerResultOk) {
+    var instancePtr = _instance_new(store, module, imports, nullptr);
+    if (instancePtr == nullptr) {
       throw Exception("Wasm module instantiation failed");
     }
 
     return instancePtr;
   }
 
-  List<Pointer<WasmerExport>> exports(Pointer<WasmerInstance> instancePtr) {
-    var exportsPtrPtr = allocate<Pointer<WasmerExports>>();
-    _instance_exports(instancePtr, exportsPtrPtr);
-    Pointer<WasmerExports> exportsPtr = exportsPtrPtr.value;
-    free(exportsPtrPtr);
-
-    var n = _exports_len(exportsPtr);
-    var exps = <Pointer<WasmerExport>>[];
-    for (var i = 0; i < n; ++i) {
-      exps.add(_exports_get(exportsPtr, i));
-    }
-    return exps;
+  Pointer<WasmerExternVec> exports(Pointer<WasmerInstance> instancePtr) {
+    var exports = allocate<WasmerExternVec>();
+    _instance_exports(instancePtr, exports);
+    return exports;
   }
 
-  int exportKind(Pointer<WasmerExport> export) {
-    return _export_kind(export);
+  int externKind(Pointer<WasmerExtern> extern) {
+    return _extern_kind(extern);
   }
 
-  String exportName(Pointer<WasmerExport> export) {
-    return _callStringWrapperFunction(_export_name_ptr, export);
+  Pointer<WasmerFunc> externToFunction(Pointer<WasmerExtern> extern) {
+    return _extern_as_func(extern);
   }
 
-  Pointer<WasmerExportFunc> exportToFunction(Pointer<WasmerExport> export) {
-    return _export_to_func(export);
-  }
-
-  List<int> getArgTypes(Pointer<WasmerExportFunc> func) {
+  List<int> getArgTypes(Pointer<WasmerFunctype> funcType) {
     var types = <int>[];
-    var nPtr = allocate<Uint32>();
-    var result = _export_func_params_arity(func, nPtr);
-    if (result != WasmerResultOk) {
-      free(nPtr);
-      throw Exception("Failed to get number of WASM function args");
+    var args = _functype_params(funcType);
+    for (var i = 0; i < args.ref.length; ++i) {
+      types.add(_valtype_kind(args.ref.data[i]));
     }
-    var n = nPtr.value;
-    free(nPtr);
-    var argsPtr = allocate<Uint32>(count: n);
-    result = _export_func_params(func, argsPtr, n);
-    if (result != WasmerResultOk) {
-      free(argsPtr);
-      throw Exception("Failed to get WASM function args");
-    }
-    for (var i = 0; i < n; ++i) {
-      types.add(argsPtr[i]);
-    }
-    free(argsPtr);
     return types;
   }
 
-  int getReturnType(Pointer<WasmerExportFunc> func) {
-    var nPtr = allocate<Uint32>();
-    var result = _export_func_returns_arity(func, nPtr);
-    if (result != WasmerResultOk) {
-      free(nPtr);
-      throw Exception("Failed to get number of WASM function returns");
-    }
-    var n = nPtr.value;
-    free(nPtr);
-    if (n == 0) {
-      return WasmerValueTagVoid;
-    } else if (n > 1) {
+  int getReturnType(Pointer<WasmerFunctype> funcType) {
+    var rets = _functype_results(funcType);
+    if (rets.ref.length == 0) {
+      return WasmerValKindVoid;
+    } else if (rets.ref.length > 1) {
       throw Exception("Multiple return values are not supported");
     }
-    var returnsPtr = allocate<Uint32>();
-    result = _export_func_returns(func, returnsPtr, 1);
-    if (result != WasmerResultOk) {
-      free(returnsPtr);
-      throw Exception("Failed to get WASM function args");
-    }
-    var type = returnsPtr.value;
-    free(returnsPtr);
-    return type;
+    return _valtype_kind(rets.ref.data[0]);
   }
 
-  void call(Pointer<WasmerExportFunc> func, Pointer<WasmerValue> args,
-      int numArgs, Pointer<WasmerValue> results, int numResults) {
-    var result = _export_func_call(func, args, numArgs, results, numArgs);
-    if (result != WasmerResultOk) {
-      throw Exception("Failed to call WASM function");
-    }
+  void call(Pointer<WasmerFunc> func, Pointer<WasmerVal> args,
+      Pointer<WasmerVal> results) {
+    _func_call(func, args, results);
   }
 
-  Pointer<WasmerMemory> exportToMemory(Pointer<WasmerExport> export) {
-    var memPtrPtr = allocate<Pointer<WasmerMemory>>();
-    var result = _export_to_memory(export, memPtrPtr);
-    if (result != WasmerResultOk) {
-      free(memPtrPtr);
-      throw Exception("Failed to get exported memory");
-    }
-    Pointer<WasmerMemory> memPtr = memPtrPtr.value;
-    free(memPtrPtr);
-    return memPtr;
+  Pointer<WasmerMemory> externToMemory(Pointer<WasmerExtern> extern) {
+    return _extern_as_memory(extern);
   }
 
-  Pointer<WasmerMemory> newMemory(int pages, int? maxPages) {
-    var memPtrPtr = allocate<Pointer<WasmerMemory>>();
+  Pointer<WasmerMemory> newMemory(
+      Pointer<WasmerStore> store, int pages, int? maxPages) {
     var limPtr = allocate<WasmerLimits>();
     limPtr.ref.min = pages;
-    limPtr.ref.has_max = maxPages != null ? 1 : 0;
-    limPtr.ref.max = maxPages ?? 0;
-    var result = _memory_new_ptr(memPtrPtr, limPtr);
+    limPtr.ref.max = maxPages ?? wasm_limits_max_default;
+    var memType = _memorytype_new(limPtr);
     free(limPtr);
-    if (result != WasmerResultOk) {
-      free(memPtrPtr);
+    Pointer<WasmerMemory> memPtr = _memory_new(store, memType);
+
+    if (memPtr == nullptr) {
       throw Exception("Failed to create memory");
     }
-    Pointer<WasmerMemory> memPtr = memPtrPtr.value;
-    free(memPtrPtr);
     return memPtr;
   }
 
   void growMemory(Pointer<WasmerMemory> memory, int deltaPages) {
     var result = _memory_grow(memory, deltaPages);
-    if (result != WasmerResultOk) {
+    if (result == 0) {
       throw Exception("Failed to grow memory");
     }
   }
 
   int memoryLength(Pointer<WasmerMemory> memory) {
-    return _memory_length(memory);
+    return _memory_size(memory);
   }
 
   Uint8List memoryView(Pointer<WasmerMemory> memory) {
-    return _memory_data(memory).asTypedList(_memory_data_length(memory));
+    return _memory_data(memory).asTypedList(_memory_data_size(memory));
   }
 }
diff --git a/pkg/wasm/lib/src/tools/generate_ffi_boilerplate.py b/pkg/wasm/lib/src/tools/generate_ffi_boilerplate.py
new file mode 100755
index 0000000..cf9621c
--- /dev/null
+++ b/pkg/wasm/lib/src/tools/generate_ffi_boilerplate.py
@@ -0,0 +1,340 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2020, 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.
+
+# This is an ad-hoc script that generates FFI boilderplate for the Wasmer API.
+# The relevant functions from wasm.h have been copied below, and are parsed to
+# figure out the FFI boilerplate. The results are inserted into
+# wasmer_api_template.dart and runtime_template.dart to generate wasmer_api.dart
+# and runtime.dart.
+
+# Usage:
+# generate_ffi_boilerplate.py && dartfmt -w ../runtime.dart ../wasmer_api.dart
+
+import os
+import re
+
+predefTypes = {}
+opaqueTypes = set()
+vecTypes = {}
+fns = []
+unusedFns = set()
+
+
+def camel(t):
+    return ''.join([s[0].upper() + s[1:] for s in t.split('_')])
+
+
+def ptrWrap(t, n):
+    for i in range(n):
+        t = 'Pointer<%s>' % t
+    return t
+
+
+def getDartType(t, i):
+    if t in predefTypes:
+        t = predefTypes[t][i]
+    else:
+        assert (t.startswith('wasm_') and t.endswith('_t'))
+        t = 'Wasmer' + camel(t[5:-2])
+    return t
+
+
+def dartArgType(a, i):
+    n, t = a
+    j = i if n == 0 else 0
+    return ptrWrap(getDartType(t, j), n)
+
+
+def dartFnType(r, a, i):
+    return '%s Function(%s)' % (dartArgType(r, i), ', '.join(
+        [dartArgType(t, i) for t in a]))
+
+
+def dartFnTypeName(n):
+    assert (n.startswith('wasm_'))
+    return camel(n[5:])
+
+
+def dartFnMembName(n):
+    assert (n.startswith('wasm_'))
+    return n[4:]
+
+
+def nativeTypeToFfi(n):
+    return getDartType(n, 0)
+
+
+def nativeTypeToDart(n):
+    return getDartType(n, 1)
+
+
+def getFns():
+    for name, retType, args in sorted(fns):
+        if name not in unusedFns:
+            yield name, retType, args
+
+
+opaqueTypeTemplate = '''// wasm_%s_t
+class Wasmer%s extends Struct {}'''
+
+vecTypeTemplate = '''// wasm_%s_vec_t
+class Wasmer%sVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<%s> data;
+
+  %s
+}'''
+
+byteVecToStringTemplate = '''
+  Uint8List get list => data.asTypedList(length);
+  String toString() => utf8.decode(list);
+'''
+
+fnApiTemplate = '''
+// %s
+typedef NativeWasmer%sFn = %s;
+typedef Wasmer%sFn = %s;'''
+
+
+def getWasmerApi():
+    return ('\n\n'.join([
+        opaqueTypeTemplate % (t, camel(t)) for t in sorted(opaqueTypes)
+    ]) + '\n\n' + '\n\n'.join([
+        vecTypeTemplate %
+        (t, camel(t),
+         ('Pointer<%s>' if ptr else '%s') % nativeTypeToFfi('wasm_%s_t' % t),
+         (byteVecToStringTemplate if t == 'byte' else ''))
+        for t, ptr in sorted(vecTypes.items())
+    ]) + '\n' + '\n'.join([
+        fnApiTemplate %
+        (name, dartFnTypeName(name), dartFnType(retType, args, 0),
+         dartFnTypeName(name), dartFnType(retType, args, 1))
+        for name, retType, args in getFns()
+    ]))
+
+
+def getRuntimeMemb():
+    return '\n'.join([
+        "  late Wasmer%sFn %s;" % (dartFnTypeName(name), dartFnMembName(name))
+        for name, _, _ in getFns()
+    ])
+
+
+def getRuntimeLoad():
+    return '\n'.join([
+        "    %s = _lib.lookupFunction<NativeWasmer%sFn, Wasmer%sFn>('%s');" %
+        (dartFnMembName(name), dartFnTypeName(name), dartFnTypeName(name), name)
+        for name, _, _ in getFns()
+    ])
+
+
+def predefinedType(nativeType, ffiType, dartType):
+    predefTypes[nativeType] = (ffiType, dartType)
+
+
+def match(r, s):
+    return r.fullmatch(s).groups()
+
+
+reReplace = [(re.compile('\\b%s\\b' % k), v) for k, v in [
+    ('const', ''),
+    ('own', ''),
+    ('WASM_API_EXTERN', ''),
+    ('wasm_name_t', 'wasm_byte_vec_t'),
+    ('wasm_memory_pages_t', 'uint32_t'),
+    ('wasm_externkind_t', 'uint8_t'),
+    ('wasm_valkind_t', 'uint8_t'),
+]]
+reWord = re.compile(r'\b\w+\b')
+
+
+def parseType(s):
+    for r, t in reReplace:
+        s = r.sub(t, s)
+    s = s.strip()
+    numWords = len(reWord.findall(s))
+    assert (numWords == 1 or numWords == 2)
+    if numWords == 2:
+        i = 0
+
+        def lastWordRepl(m):
+            nonlocal i
+            i += 1
+            return '' if i == numWords else m.group(0)
+
+        s = reWord.sub(lastWordRepl, s)
+    numPtr = 0
+    while True:
+        s = s.strip()
+        if s.endswith('*'):
+            s = s[:-1]
+        elif s.endswith('[]'):
+            s = s[:-2]
+        else:
+            break
+        numPtr += 1
+    return (numPtr, s)
+
+
+reFnSig = re.compile(r'(.*) ([^ ]*)\((.*)\);?')
+
+
+def addFn(sig):
+    ret, name, argpack = match(reFnSig, sig)
+    retType = parseType(ret)
+    args = [parseType(a) for a in argpack.split(',') if len(a.strip()) > 0]
+    for _, t in args + [retType]:
+        if t not in predefTypes and t[5:-2] not in opaqueTypes and t[
+                5:-6] not in vecTypes:
+            print('Missing type: ' + t)
+    fns.append((name, retType, args))
+
+
+def declareOwn(name):
+    opaqueTypes.add(name)
+    addFn('void wasm_%s_delete(wasm_%s_t*)' % (name, name))
+
+
+def declareVec(name, storePtr):
+    vecTypes[name] = storePtr
+    addFn('void wasm_%s_vec_new_empty(wasm_%s_vec_t* out)' % (name, name))
+    addFn('void wasm_%s_vec_new_uninitialized(wasm_%s_vec_t* out, size_t)' %
+          (name, name))
+    addFn('void wasm_%s_vec_new(wasm_%s_vec_t* out, size_t, wasm_%s_t %s[])' %
+          (name, name, name, '*' if storePtr else ''))
+    addFn('void wasm_%s_vec_copy(wasm_%s_vec_t* out, const wasm_%s_vec_t*)' %
+          (name, name, name))
+    addFn('void wasm_%s_vec_delete(wasm_%s_vec_t*)' % (name, name))
+
+
+def declareType(name, withCopy=True):
+    declareOwn(name)
+    declareVec(name, True)
+    if withCopy:
+        addFn('wasm_%s_t* wasm_%s_copy(wasm_%s_t*)' % (name, name, name))
+
+
+predefinedType('void', 'Void', 'void')
+predefinedType('bool', 'Uint8', 'int')
+predefinedType('byte_t', 'Uint8', 'int')
+predefinedType('wasm_byte_t', 'Uint8', 'int')
+predefinedType('uint8_t', 'Uint8', 'int')
+predefinedType('uint16_t', 'Uint16', 'int')
+predefinedType('uint32_t', 'Uint32', 'int')
+predefinedType('uint64_t', 'Uint64', 'int')
+predefinedType('size_t', 'Uint64', 'int')
+predefinedType('int8_t', 'Int8', 'int')
+predefinedType('int16_t', 'Int16', 'int')
+predefinedType('int32_t', 'Int32', 'int')
+predefinedType('int64_t', 'Int64', 'int')
+predefinedType('float32_t', 'Float32', 'double')
+predefinedType('float64_t', 'Float64', 'double')
+predefinedType('wasm_limits_t', 'WasmerLimits', 'WasmerLimits')
+predefinedType('wasm_val_t', 'WasmerVal', 'WasmerVal')
+
+declareOwn('engine')
+declareOwn('store')
+declareVec('byte', False)
+declareVec('val', False)
+declareType('importtype')
+declareType('exporttype')
+declareType('valtype')
+declareType('extern', False)
+
+# These are actually DECLARE_TYPE, but we don't need the vec or copy stuff.
+declareOwn('memorytype')
+declareOwn('externtype')
+declareOwn('functype')
+
+# These are actually DECLARE_SHARABLE_REF, but we don't need the ref stuff.
+declareOwn('module')
+
+# These are actually DECLARE_REF, but we don't need the ref stuff.
+declareOwn('memory')
+declareOwn('trap')
+declareOwn('instance')
+declareOwn('func')
+
+rawFns = '''
+WASM_API_EXTERN own wasm_engine_t* wasm_engine_new();
+WASM_API_EXTERN own wasm_store_t* wasm_store_new(wasm_engine_t*);
+WASM_API_EXTERN own wasm_memorytype_t* wasm_memorytype_new(const wasm_limits_t*);
+WASM_API_EXTERN own wasm_module_t* wasm_module_new(wasm_store_t*, const wasm_byte_vec_t* binary);
+WASM_API_EXTERN void wasm_module_imports(const wasm_module_t*, own wasm_importtype_vec_t* out);
+WASM_API_EXTERN const wasm_name_t* wasm_importtype_module(const wasm_importtype_t*);
+WASM_API_EXTERN const wasm_name_t* wasm_importtype_name(const wasm_importtype_t*);
+WASM_API_EXTERN const wasm_externtype_t* wasm_importtype_type(const wasm_importtype_t*);
+WASM_API_EXTERN wasm_functype_t* wasm_externtype_as_functype(wasm_externtype_t*);
+WASM_API_EXTERN void wasm_module_exports(const wasm_module_t*, own wasm_exporttype_vec_t* out);
+WASM_API_EXTERN const wasm_name_t* wasm_exporttype_name(const wasm_exporttype_t*);
+WASM_API_EXTERN const wasm_externtype_t* wasm_exporttype_type(const wasm_exporttype_t*);
+WASM_API_EXTERN wasm_externkind_t wasm_externtype_kind(const wasm_externtype_t*);
+WASM_API_EXTERN own wasm_instance_t* wasm_instance_new(wasm_store_t*, const wasm_module_t*, const wasm_extern_t* const imports[], own wasm_trap_t**);
+WASM_API_EXTERN void wasm_instance_exports(const wasm_instance_t*, own wasm_extern_vec_t* out);
+WASM_API_EXTERN own wasm_memory_t* wasm_memory_new(wasm_store_t*, const wasm_memorytype_t*);
+WASM_API_EXTERN byte_t* wasm_memory_data(wasm_memory_t*);
+WASM_API_EXTERN size_t wasm_memory_data_size(const wasm_memory_t*);
+WASM_API_EXTERN wasm_memory_pages_t wasm_memory_size(const wasm_memory_t*);
+WASM_API_EXTERN bool wasm_memory_grow(wasm_memory_t*, wasm_memory_pages_t delta);
+WASM_API_EXTERN wasm_externkind_t wasm_extern_kind(const wasm_extern_t*);
+WASM_API_EXTERN wasm_func_t* wasm_extern_as_func(wasm_extern_t*);
+WASM_API_EXTERN wasm_memory_t* wasm_extern_as_memory(wasm_extern_t*);
+WASM_API_EXTERN const wasm_valtype_vec_t* wasm_functype_params(const wasm_functype_t*);
+WASM_API_EXTERN const wasm_valtype_vec_t* wasm_functype_results(const wasm_functype_t*);
+WASM_API_EXTERN own wasm_trap_t* wasm_func_call(const wasm_func_t*, const wasm_val_t args[], wasm_val_t results[]);
+WASM_API_EXTERN wasm_valkind_t wasm_valtype_kind(const wasm_valtype_t*);
+'''
+for f in rawFns.split('\n'):
+    if len(f.strip()) > 0:
+        addFn(f)
+
+unusedFns = {
+    'wasm_byte_vec_copy',
+    'wasm_exporttype_delete',
+    'wasm_exporttype_copy',
+    'wasm_exporttype_vec_copy',
+    'wasm_extern_vec_copy',
+    'wasm_importtype_delete',
+    'wasm_importtype_copy',
+    'wasm_importtype_vec_copy',
+    'wasm_val_vec_copy',
+    'wasm_val_vec_delete',
+    'wasm_val_vec_new',
+    'wasm_val_vec_new_empty',
+    'wasm_val_vec_new_uninitialized',
+    'wasm_valtype_copy',
+    'wasm_valtype_vec_copy',
+}
+
+genDoc = '''// This file has been automatically generated. Please do not edit it manually.
+// To regenerate the file, use the following command
+// "generate_ffi_boilerplate.py".'''
+
+thisDir = os.path.dirname(os.path.abspath(__file__))
+
+
+def readFile(filename):
+    with open(os.path.abspath(os.path.join(thisDir, filename)), 'r') as f:
+        return f.read()
+
+
+def writeFile(filename, content):
+    with open(os.path.abspath(os.path.join(thisDir, '..', filename)), 'w') as f:
+        f.write(content)
+
+
+wasmerApiText = readFile('wasmer_api_template.dart')
+wasmerApiText = wasmerApiText.replace('/* <WASMER_API> */', getWasmerApi())
+wasmerApiText = wasmerApiText.replace('/* <GEN_DOC> */', genDoc)
+writeFile('wasmer_api.dart', wasmerApiText)
+
+runtimeText = readFile('runtime_template.dart')
+runtimeText = runtimeText.replace('/* <RUNTIME_MEMB> */', getRuntimeMemb())
+runtimeText = runtimeText.replace('/* <RUNTIME_LOAD> */', getRuntimeLoad())
+runtimeText = runtimeText.replace('/* <GEN_DOC> */', genDoc)
+writeFile('runtime.dart', runtimeText)
diff --git a/pkg/wasm/lib/src/tools/runtime_template.dart b/pkg/wasm/lib/src/tools/runtime_template.dart
new file mode 100644
index 0000000..d403882
--- /dev/null
+++ b/pkg/wasm/lib/src/tools/runtime_template.dart
@@ -0,0 +1,243 @@
+// Copyright (c) 2020, 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.
+
+/* <GEN_DOC> */
+
+import 'dart:convert';
+import 'dart:ffi';
+import 'dart:io';
+import 'dart:typed_data';
+import 'package:ffi/ffi.dart';
+import 'package:path/path.dart' as path;
+import 'wasmer_api.dart';
+
+class WasmImportDescriptor {
+  int kind;
+  String moduleName;
+  String name;
+  Pointer<WasmerFunctype> funcType;
+  WasmImportDescriptor(this.kind, this.moduleName, this.name, this.funcType);
+}
+
+class WasmExportDescriptor {
+  int kind;
+  String name;
+  Pointer<WasmerFunctype> funcType;
+  WasmExportDescriptor(this.kind, this.name, this.funcType);
+}
+
+class WasmRuntime {
+  static WasmRuntime? _inst;
+
+  DynamicLibrary _lib;
+  late Pointer<WasmerEngine> _engine;
+/* <RUNTIME_MEMB> */
+
+  factory WasmRuntime() {
+    WasmRuntime inst = _inst ?? WasmRuntime._init();
+    _inst = inst;
+    return inst;
+  }
+
+  static String _getLibName() {
+    if (Platform.isMacOS) return "libwasmer.dylib";
+    if (Platform.isLinux) return "libwasmer.so";
+    // TODO(dartbug.com/37882): Support more platforms.
+    throw Exception("Wasm not currently supported on this platform");
+  }
+
+  static String _getLibDir() {
+    // The common case, and how cli_util.dart computes the Dart SDK directory,
+    // path.dirname called twice on Platform.resolvedExecutable.
+    var commonLibDir = path.join(
+        path.absolute(path.dirname(path.dirname(Platform.resolvedExecutable))),
+        'bin',
+        'third_party',
+        'wasmer');
+    if (Directory(commonLibDir).existsSync()) {
+      return commonLibDir;
+    }
+
+    // This is the less common case where the user is in the checked out Dart
+    // SDK, and is executing dart via:
+    // ./out/ReleaseX64/dart ...
+    var checkedOutLibDir = path.join(
+        path.absolute(path.dirname(Platform.resolvedExecutable)),
+        'dart-sdk',
+        'bin',
+        'third_party',
+        'wasmer');
+    if (Directory(checkedOutLibDir).existsSync()) {
+      return checkedOutLibDir;
+    }
+
+    // If neither returned above, we return the common case:
+    return commonLibDir;
+  }
+
+  WasmRuntime._init()
+      : _lib = DynamicLibrary.open(path.join(_getLibDir(), _getLibName())) {
+/* <RUNTIME_LOAD> */
+
+    _engine = _engine_new();
+  }
+
+  Pointer<WasmerStore> newStore() {
+    return _store_new(_engine);
+  }
+
+  Pointer<WasmerModule> compile(Pointer<WasmerStore> store, Uint8List data) {
+    var dataPtr = allocate<Uint8>(count: data.length);
+    for (int i = 0; i < data.length; ++i) {
+      dataPtr[i] = data[i];
+    }
+    var dataVec = allocate<WasmerByteVec>();
+    dataVec.ref.data = dataPtr;
+    dataVec.ref.length = data.length;
+
+    var modulePtr = _module_new(store, dataVec);
+
+    free(dataPtr);
+    free(dataVec);
+
+    if (modulePtr == nullptr) {
+      throw Exception("Wasm module compile failed");
+    }
+
+    return modulePtr;
+  }
+
+  List<WasmExportDescriptor> exportDescriptors(Pointer<WasmerModule> module) {
+    var exportsVec = allocate<WasmerExporttypeVec>();
+    _module_exports(module, exportsVec);
+    var exps = <WasmExportDescriptor>[];
+    for (var i = 0; i < exportsVec.ref.length; ++i) {
+      var exp = exportsVec.ref.data[i];
+      var extern = _exporttype_type(exp);
+      var kind = _externtype_kind(extern);
+      var fnType = kind == WasmerExternKindFunction
+          ? _externtype_as_functype(extern)
+          : nullptr;
+      exps.add(WasmExportDescriptor(
+          kind, _exporttype_name(exp).ref.toString(), fnType));
+    }
+    free(exportsVec);
+    return exps;
+  }
+
+  List<WasmImportDescriptor> importDescriptors(Pointer<WasmerModule> module) {
+    var importsVec = allocate<WasmerImporttypeVec>();
+    _module_imports(module, importsVec);
+    var imps = <WasmImportDescriptor>[];
+    for (var i = 0; i < importsVec.ref.length; ++i) {
+      var imp = importsVec.ref.data[i];
+      var extern = _importtype_type(imp);
+      var kind = _externtype_kind(extern);
+      var fnType = kind == WasmerExternKindFunction
+          ? _externtype_as_functype(extern)
+          : nullptr;
+      imps.add(WasmImportDescriptor(
+          kind,
+          _importtype_module(imp).ref.toString(),
+          _importtype_name(imp).ref.toString(),
+          fnType));
+    }
+    free(importsVec);
+    return imps;
+  }
+
+  Pointer<WasmerInstance> instantiate(
+      Pointer<WasmerStore> store,
+      Pointer<WasmerModule> module,
+      Pointer<Pointer<WasmerExtern>> imports,
+      int numImports) {
+    var importsVec = allocate<WasmerImporttypeVec>();
+    _module_imports(module, importsVec);
+    if (importsVec.ref.length != numImports) {
+      throw Exception(
+          "Wrong number of imports. Expected ${importsVec.ref.length} but " +
+              "found $numImports.");
+    }
+    free(importsVec);
+
+    var instancePtr = _instance_new(store, module, imports, nullptr);
+    if (instancePtr == nullptr) {
+      throw Exception("Wasm module instantiation failed");
+    }
+
+    return instancePtr;
+  }
+
+  Pointer<WasmerExternVec> exports(Pointer<WasmerInstance> instancePtr) {
+    var exports = allocate<WasmerExternVec>();
+    _instance_exports(instancePtr, exports);
+    return exports;
+  }
+
+  int externKind(Pointer<WasmerExtern> extern) {
+    return _extern_kind(extern);
+  }
+
+  Pointer<WasmerFunc> externToFunction(Pointer<WasmerExtern> extern) {
+    return _extern_as_func(extern);
+  }
+
+  List<int> getArgTypes(Pointer<WasmerFunctype> funcType) {
+    var types = <int>[];
+    var args = _functype_params(funcType);
+    for (var i = 0; i < args.ref.length; ++i) {
+      types.add(_valtype_kind(args.ref.data[i]));
+    }
+    return types;
+  }
+
+  int getReturnType(Pointer<WasmerFunctype> funcType) {
+    var rets = _functype_results(funcType);
+    if (rets.ref.length == 0) {
+      return WasmerValKindVoid;
+    } else if (rets.ref.length > 1) {
+      throw Exception("Multiple return values are not supported");
+    }
+    return _valtype_kind(rets.ref.data[0]);
+  }
+
+  void call(Pointer<WasmerFunc> func, Pointer<WasmerVal> args,
+      Pointer<WasmerVal> results) {
+    _func_call(func, args, results);
+  }
+
+  Pointer<WasmerMemory> externToMemory(Pointer<WasmerExtern> extern) {
+    return _extern_as_memory(extern);
+  }
+
+  Pointer<WasmerMemory> newMemory(
+      Pointer<WasmerStore> store, int pages, int? maxPages) {
+    var limPtr = allocate<WasmerLimits>();
+    limPtr.ref.min = pages;
+    limPtr.ref.max = maxPages ?? wasm_limits_max_default;
+    var memType = _memorytype_new(limPtr);
+    free(limPtr);
+    Pointer<WasmerMemory> memPtr = _memory_new(store, memType);
+
+    if (memPtr == nullptr) {
+      throw Exception("Failed to create memory");
+    }
+    return memPtr;
+  }
+
+  void growMemory(Pointer<WasmerMemory> memory, int deltaPages) {
+    var result = _memory_grow(memory, deltaPages);
+    if (result == 0) {
+      throw Exception("Failed to grow memory");
+    }
+  }
+
+  int memoryLength(Pointer<WasmerMemory> memory) {
+    return _memory_size(memory);
+  }
+
+  Uint8List memoryView(Pointer<WasmerMemory> memory) {
+    return _memory_data(memory).asTypedList(_memory_data_size(memory));
+  }
+}
diff --git a/pkg/wasm/lib/src/tools/wasmer_api_template.dart b/pkg/wasm/lib/src/tools/wasmer_api_template.dart
new file mode 100644
index 0000000..6a77171
--- /dev/null
+++ b/pkg/wasm/lib/src/tools/wasmer_api_template.dart
@@ -0,0 +1,103 @@
+// Copyright (c) 2020, 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.
+
+/* <GEN_DOC> */
+
+import 'dart:convert';
+import 'dart:ffi';
+import 'dart:typed_data';
+
+// wasm_valkind_enum
+const int WasmerValKindI32 = 0;
+const int WasmerValKindI64 = 1;
+const int WasmerValKindF32 = 2;
+const int WasmerValKindF64 = 3;
+// The void tag is not part of the C API. It's used to represent the return type
+// of a void function.
+const int WasmerValKindVoid = -1;
+
+// wasm_externkind_enum
+const int WasmerExternKindFunction = 0;
+const int WasmerExternKindGlobal = 1;
+const int WasmerExternKindTable = 2;
+const int WasmerExternKindMemory = 3;
+
+String wasmerExternKindName(int kind) {
+  switch (kind) {
+    case WasmerExternKindFunction:
+      return "function";
+    case WasmerExternKindGlobal:
+      return "global";
+    case WasmerExternKindTable:
+      return "table";
+    case WasmerExternKindMemory:
+      return "memory";
+    default:
+      return "unknown";
+  }
+}
+
+String wasmerValKindName(int kind) {
+  switch (kind) {
+    case WasmerValKindI32:
+      return "int32";
+    case WasmerValKindI64:
+      return "int64";
+    case WasmerValKindF32:
+      return "float32";
+    case WasmerValKindF64:
+      return "float64";
+    case WasmerValKindVoid:
+      return "void";
+    default:
+      return "unknown";
+  }
+}
+
+// wasm_val_t
+class WasmerVal extends Struct {
+  // wasm_valkind_t
+  @Uint8()
+  external int kind;
+
+  // This is a union of int32_t, int64_t, float, and double. The kind determines
+  // which type it is. It's declared as an int64_t because that's large enough
+  // to hold all the types. We use ByteData to get the other types.
+  @Int64()
+  external int value;
+
+  int get _off32 => Endian.host == Endian.little ? 0 : 4;
+  int get i64 => value;
+  ByteData get _getterBytes => ByteData(8)..setInt64(0, value, Endian.host);
+  int get i32 => _getterBytes.getInt32(_off32, Endian.host);
+  double get f32 => _getterBytes.getFloat32(_off32, Endian.host);
+  double get f64 => _getterBytes.getFloat64(0, Endian.host);
+
+  set i64(int val) => value = val;
+  set _val(ByteData bytes) => value = bytes.getInt64(0, Endian.host);
+  set i32(int val) => _val = ByteData(8)..setInt32(_off32, val, Endian.host);
+  set f32(num val) =>
+      _val = ByteData(8)..setFloat32(_off32, val as double, Endian.host);
+  set f64(num val) =>
+      _val = ByteData(8)..setFloat64(0, val as double, Endian.host);
+
+  bool get isI32 => kind == WasmerValKindI32;
+  bool get isI64 => kind == WasmerValKindI64;
+  bool get isF32 => kind == WasmerValKindF32;
+  bool get isF64 => kind == WasmerValKindF64;
+}
+
+// wasmer_limits_t
+class WasmerLimits extends Struct {
+  @Uint32()
+  external int min;
+
+  @Uint32()
+  external int max;
+}
+
+// Default maximum, which indicates no upper limit.
+const int wasm_limits_max_default = 0xffffffff;
+
+/* <WASMER_API> */
diff --git a/pkg/wasm/lib/src/wasmer_api.dart b/pkg/wasm/lib/src/wasmer_api.dart
index 94dd651..ad8219d 100644
--- a/pkg/wasm/lib/src/wasmer_api.dart
+++ b/pkg/wasm/lib/src/wasmer_api.dart
@@ -2,116 +2,70 @@
 // 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.
 
+// This file has been automatically generated. Please do not edit it manually.
+// To regenerate the file, use the following command
+// "generate_ffi_boilerplate.py".
+
 import 'dart:convert';
 import 'dart:ffi';
 import 'dart:typed_data';
 
-// wasmer_result_t
-const int WasmerResultOk = 1;
-const int WasmerResultError = 2;
-
-// wasmer_value_tag
-const int WasmerValueTagI32 = 0;
-const int WasmerValueTagI64 = 1;
-const int WasmerValueTagF32 = 2;
-const int WasmerValueTagF64 = 3;
+// wasm_valkind_enum
+const int WasmerValKindI32 = 0;
+const int WasmerValKindI64 = 1;
+const int WasmerValKindF32 = 2;
+const int WasmerValKindF64 = 3;
 // The void tag is not part of the C API. It's used to represent the return type
 // of a void function.
-const int WasmerValueTagVoid = -1;
+const int WasmerValKindVoid = -1;
 
-// wasmer_import_export_kind
-const int WasmerImpExpKindFunction = 0;
-const int WasmerImpExpKindGlobal = 1;
-const int WasmerImpExpKindMemory = 2;
-const int WasmerImpExpKindTable = 3;
+// wasm_externkind_enum
+const int WasmerExternKindFunction = 0;
+const int WasmerExternKindGlobal = 1;
+const int WasmerExternKindTable = 2;
+const int WasmerExternKindMemory = 3;
 
-String wasmerImpExpKindName(int kind) {
+String wasmerExternKindName(int kind) {
   switch (kind) {
-    case WasmerImpExpKindFunction:
+    case WasmerExternKindFunction:
       return "function";
-    case WasmerImpExpKindGlobal:
+    case WasmerExternKindGlobal:
       return "global";
-    case WasmerImpExpKindMemory:
-      return "memory";
-    case WasmerImpExpKindTable:
+    case WasmerExternKindTable:
       return "table";
+    case WasmerExternKindMemory:
+      return "memory";
     default:
       return "unknown";
   }
 }
 
-// wasmer_module_t
-class WasmerModule extends Struct {}
-
-// wasmer_instance_t
-class WasmerInstance extends Struct {}
-
-// wasmer_exports_t
-class WasmerExports extends Struct {}
-
-// wasmer_export_t
-class WasmerExport extends Struct {}
-
-// wasmer_export_descriptors_t
-class WasmerExportDescriptors extends Struct {}
-
-// wasmer_export_descriptor_t
-class WasmerExportDescriptor extends Struct {}
-
-// wasmer_export_func_t
-class WasmerExportFunc extends Struct {}
-
-// wasmer_import_descriptors_t
-class WasmerImportDescriptors extends Struct {}
-
-// wasmer_import_descriptor_t
-class WasmerImportDescriptor extends Struct {}
-
-// wasmer_memory_t
-class WasmerMemory extends Struct {}
-
-// wasmer_import_t
-class WasmerImport extends Struct {
-  external Pointer<Uint8> module_name;
-
-  @Uint32()
-  external int module_name_length;
-
-  external Pointer<Uint8> import_name;
-
-  @Uint32()
-  external int import_name_length;
-
-  // wasmer_import_export_kind
-  @Uint32()
-  external int tag;
-
-  // wasmer_import_export_value, which is a union of wasmer_import_func_t*,
-  // wasmer_table_t*, wasmer_memory_t*, and wasmer_global_t*. The tag determines
-  // which type it is.
-  external Pointer<Void> value;
+String wasmerValKindName(int kind) {
+  switch (kind) {
+    case WasmerValKindI32:
+      return "int32";
+    case WasmerValKindI64:
+      return "int64";
+    case WasmerValKindF32:
+      return "float32";
+    case WasmerValKindF64:
+      return "float64";
+    case WasmerValKindVoid:
+      return "void";
+    default:
+      return "unknown";
+  }
 }
 
-// wasmer_byte_array
-class WasmerByteArray extends Struct {
-  external Pointer<Uint8> bytes;
+// wasm_val_t
+class WasmerVal extends Struct {
+  // wasm_valkind_t
+  @Uint8()
+  external int kind;
 
-  @Uint32()
-  external int length;
-
-  Uint8List get list => bytes.asTypedList(length);
-  String get string => utf8.decode(list);
-}
-
-// wasmer_value_t
-class WasmerValue extends Struct {
-  // wasmer_value_tag
-  @Uint32()
-  external int tag;
-
-  // wasmer_value, which is a union of int32_t, int64_t, float, and double. The
-  // tag determines which type it is. It's declared as an int64_t because that's
-  // large enough to hold all the types. We use ByteData to get the other types.
+  // This is a union of int32_t, int64_t, float, and double. The kind determines
+  // which type it is. It's declared as an int64_t because that's large enough
+  // to hold all the types. We use ByteData to get the other types.
   @Int64()
   external int value;
 
@@ -130,10 +84,10 @@
   set f64(num val) =>
       _val = ByteData(8)..setFloat64(0, val as double, Endian.host);
 
-  bool get isI32 => tag == WasmerValueTagI32;
-  bool get isI64 => tag == WasmerValueTagI64;
-  bool get isF32 => tag == WasmerValueTagF32;
-  bool get isF64 => tag == WasmerValueTagF64;
+  bool get isI32 => kind == WasmerValKindI32;
+  bool get isI64 => kind == WasmerValKindI64;
+  bool get isF32 => kind == WasmerValKindF32;
+  bool get isF64 => kind == WasmerValKindF64;
 }
 
 // wasmer_limits_t
@@ -141,196 +95,417 @@
   @Uint32()
   external int min;
 
-  // bool
-  @Uint8()
-  external int has_max;
-
   @Uint32()
   external int max;
 }
 
-// wasmer_compile
-typedef NativeWasmerCompileFn = Uint32 Function(
-    Pointer<Pointer<WasmerModule>>, Pointer<Uint8>, Uint32);
-typedef WasmerCompileFn = int Function(
-    Pointer<Pointer<WasmerModule>>, Pointer<Uint8>, int);
+// Default maximum, which indicates no upper limit.
+const int wasm_limits_max_default = 0xffffffff;
 
-// wasmer_module_instantiate
-typedef NativeWasmerInstantiateFn = Uint32 Function(Pointer<WasmerModule>,
-    Pointer<Pointer<WasmerInstance>>, Pointer<WasmerImport>, Int32);
-typedef WasmerInstantiateFn = int Function(Pointer<WasmerModule>,
-    Pointer<Pointer<WasmerInstance>>, Pointer<WasmerImport>, int);
+// wasm_engine_t
+class WasmerEngine extends Struct {}
 
-// wasmer_instance_exports
+// wasm_exporttype_t
+class WasmerExporttype extends Struct {}
+
+// wasm_extern_t
+class WasmerExtern extends Struct {}
+
+// wasm_externtype_t
+class WasmerExterntype extends Struct {}
+
+// wasm_func_t
+class WasmerFunc extends Struct {}
+
+// wasm_functype_t
+class WasmerFunctype extends Struct {}
+
+// wasm_importtype_t
+class WasmerImporttype extends Struct {}
+
+// wasm_instance_t
+class WasmerInstance extends Struct {}
+
+// wasm_memory_t
+class WasmerMemory extends Struct {}
+
+// wasm_memorytype_t
+class WasmerMemorytype extends Struct {}
+
+// wasm_module_t
+class WasmerModule extends Struct {}
+
+// wasm_store_t
+class WasmerStore extends Struct {}
+
+// wasm_trap_t
+class WasmerTrap extends Struct {}
+
+// wasm_valtype_t
+class WasmerValtype extends Struct {}
+
+// wasm_byte_vec_t
+class WasmerByteVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<Uint8> data;
+
+  Uint8List get list => data.asTypedList(length);
+  String toString() => utf8.decode(list);
+}
+
+// wasm_exporttype_vec_t
+class WasmerExporttypeVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<Pointer<WasmerExporttype>> data;
+}
+
+// wasm_extern_vec_t
+class WasmerExternVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<Pointer<WasmerExtern>> data;
+}
+
+// wasm_importtype_vec_t
+class WasmerImporttypeVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<Pointer<WasmerImporttype>> data;
+}
+
+// wasm_val_vec_t
+class WasmerValVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<WasmerVal> data;
+}
+
+// wasm_valtype_vec_t
+class WasmerValtypeVec extends Struct {
+  @Uint64()
+  external int length;
+
+  external Pointer<Pointer<WasmerValtype>> data;
+}
+
+// wasm_byte_vec_delete
+typedef NativeWasmerByteVecDeleteFn = Void Function(Pointer<WasmerByteVec>);
+typedef WasmerByteVecDeleteFn = void Function(Pointer<WasmerByteVec>);
+
+// wasm_byte_vec_new
+typedef NativeWasmerByteVecNewFn = Void Function(
+    Pointer<WasmerByteVec>, Uint64, Pointer<Uint8>);
+typedef WasmerByteVecNewFn = void Function(
+    Pointer<WasmerByteVec>, int, Pointer<Uint8>);
+
+// wasm_byte_vec_new_empty
+typedef NativeWasmerByteVecNewEmptyFn = Void Function(Pointer<WasmerByteVec>);
+typedef WasmerByteVecNewEmptyFn = void Function(Pointer<WasmerByteVec>);
+
+// wasm_byte_vec_new_uninitialized
+typedef NativeWasmerByteVecNewUninitializedFn = Void Function(
+    Pointer<WasmerByteVec>, Uint64);
+typedef WasmerByteVecNewUninitializedFn = void Function(
+    Pointer<WasmerByteVec>, int);
+
+// wasm_engine_delete
+typedef NativeWasmerEngineDeleteFn = Void Function(Pointer<WasmerEngine>);
+typedef WasmerEngineDeleteFn = void Function(Pointer<WasmerEngine>);
+
+// wasm_engine_new
+typedef NativeWasmerEngineNewFn = Pointer<WasmerEngine> Function();
+typedef WasmerEngineNewFn = Pointer<WasmerEngine> Function();
+
+// wasm_exporttype_name
+typedef NativeWasmerExporttypeNameFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerExporttype>);
+typedef WasmerExporttypeNameFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerExporttype>);
+
+// wasm_exporttype_type
+typedef NativeWasmerExporttypeTypeFn = Pointer<WasmerExterntype> Function(
+    Pointer<WasmerExporttype>);
+typedef WasmerExporttypeTypeFn = Pointer<WasmerExterntype> Function(
+    Pointer<WasmerExporttype>);
+
+// wasm_exporttype_vec_delete
+typedef NativeWasmerExporttypeVecDeleteFn = Void Function(
+    Pointer<WasmerExporttypeVec>);
+typedef WasmerExporttypeVecDeleteFn = void Function(
+    Pointer<WasmerExporttypeVec>);
+
+// wasm_exporttype_vec_new
+typedef NativeWasmerExporttypeVecNewFn = Void Function(
+    Pointer<WasmerExporttypeVec>, Uint64, Pointer<Pointer<WasmerExporttype>>);
+typedef WasmerExporttypeVecNewFn = void Function(
+    Pointer<WasmerExporttypeVec>, int, Pointer<Pointer<WasmerExporttype>>);
+
+// wasm_exporttype_vec_new_empty
+typedef NativeWasmerExporttypeVecNewEmptyFn = Void Function(
+    Pointer<WasmerExporttypeVec>);
+typedef WasmerExporttypeVecNewEmptyFn = void Function(
+    Pointer<WasmerExporttypeVec>);
+
+// wasm_exporttype_vec_new_uninitialized
+typedef NativeWasmerExporttypeVecNewUninitializedFn = Void Function(
+    Pointer<WasmerExporttypeVec>, Uint64);
+typedef WasmerExporttypeVecNewUninitializedFn = void Function(
+    Pointer<WasmerExporttypeVec>, int);
+
+// wasm_extern_as_func
+typedef NativeWasmerExternAsFuncFn = Pointer<WasmerFunc> Function(
+    Pointer<WasmerExtern>);
+typedef WasmerExternAsFuncFn = Pointer<WasmerFunc> Function(
+    Pointer<WasmerExtern>);
+
+// wasm_extern_as_memory
+typedef NativeWasmerExternAsMemoryFn = Pointer<WasmerMemory> Function(
+    Pointer<WasmerExtern>);
+typedef WasmerExternAsMemoryFn = Pointer<WasmerMemory> Function(
+    Pointer<WasmerExtern>);
+
+// wasm_extern_delete
+typedef NativeWasmerExternDeleteFn = Void Function(Pointer<WasmerExtern>);
+typedef WasmerExternDeleteFn = void Function(Pointer<WasmerExtern>);
+
+// wasm_extern_kind
+typedef NativeWasmerExternKindFn = Uint8 Function(Pointer<WasmerExtern>);
+typedef WasmerExternKindFn = int Function(Pointer<WasmerExtern>);
+
+// wasm_extern_vec_delete
+typedef NativeWasmerExternVecDeleteFn = Void Function(Pointer<WasmerExternVec>);
+typedef WasmerExternVecDeleteFn = void Function(Pointer<WasmerExternVec>);
+
+// wasm_extern_vec_new
+typedef NativeWasmerExternVecNewFn = Void Function(
+    Pointer<WasmerExternVec>, Uint64, Pointer<Pointer<WasmerExtern>>);
+typedef WasmerExternVecNewFn = void Function(
+    Pointer<WasmerExternVec>, int, Pointer<Pointer<WasmerExtern>>);
+
+// wasm_extern_vec_new_empty
+typedef NativeWasmerExternVecNewEmptyFn = Void Function(
+    Pointer<WasmerExternVec>);
+typedef WasmerExternVecNewEmptyFn = void Function(Pointer<WasmerExternVec>);
+
+// wasm_extern_vec_new_uninitialized
+typedef NativeWasmerExternVecNewUninitializedFn = Void Function(
+    Pointer<WasmerExternVec>, Uint64);
+typedef WasmerExternVecNewUninitializedFn = void Function(
+    Pointer<WasmerExternVec>, int);
+
+// wasm_externtype_as_functype
+typedef NativeWasmerExterntypeAsFunctypeFn = Pointer<WasmerFunctype> Function(
+    Pointer<WasmerExterntype>);
+typedef WasmerExterntypeAsFunctypeFn = Pointer<WasmerFunctype> Function(
+    Pointer<WasmerExterntype>);
+
+// wasm_externtype_delete
+typedef NativeWasmerExterntypeDeleteFn = Void Function(
+    Pointer<WasmerExterntype>);
+typedef WasmerExterntypeDeleteFn = void Function(Pointer<WasmerExterntype>);
+
+// wasm_externtype_kind
+typedef NativeWasmerExterntypeKindFn = Uint8 Function(
+    Pointer<WasmerExterntype>);
+typedef WasmerExterntypeKindFn = int Function(Pointer<WasmerExterntype>);
+
+// wasm_func_call
+typedef NativeWasmerFuncCallFn = Pointer<WasmerTrap> Function(
+    Pointer<WasmerFunc>, Pointer<WasmerVal>, Pointer<WasmerVal>);
+typedef WasmerFuncCallFn = Pointer<WasmerTrap> Function(
+    Pointer<WasmerFunc>, Pointer<WasmerVal>, Pointer<WasmerVal>);
+
+// wasm_func_delete
+typedef NativeWasmerFuncDeleteFn = Void Function(Pointer<WasmerFunc>);
+typedef WasmerFuncDeleteFn = void Function(Pointer<WasmerFunc>);
+
+// wasm_functype_delete
+typedef NativeWasmerFunctypeDeleteFn = Void Function(Pointer<WasmerFunctype>);
+typedef WasmerFunctypeDeleteFn = void Function(Pointer<WasmerFunctype>);
+
+// wasm_functype_params
+typedef NativeWasmerFunctypeParamsFn = Pointer<WasmerValtypeVec> Function(
+    Pointer<WasmerFunctype>);
+typedef WasmerFunctypeParamsFn = Pointer<WasmerValtypeVec> Function(
+    Pointer<WasmerFunctype>);
+
+// wasm_functype_results
+typedef NativeWasmerFunctypeResultsFn = Pointer<WasmerValtypeVec> Function(
+    Pointer<WasmerFunctype>);
+typedef WasmerFunctypeResultsFn = Pointer<WasmerValtypeVec> Function(
+    Pointer<WasmerFunctype>);
+
+// wasm_importtype_module
+typedef NativeWasmerImporttypeModuleFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerImporttype>);
+typedef WasmerImporttypeModuleFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerImporttype>);
+
+// wasm_importtype_name
+typedef NativeWasmerImporttypeNameFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerImporttype>);
+typedef WasmerImporttypeNameFn = Pointer<WasmerByteVec> Function(
+    Pointer<WasmerImporttype>);
+
+// wasm_importtype_type
+typedef NativeWasmerImporttypeTypeFn = Pointer<WasmerExterntype> Function(
+    Pointer<WasmerImporttype>);
+typedef WasmerImporttypeTypeFn = Pointer<WasmerExterntype> Function(
+    Pointer<WasmerImporttype>);
+
+// wasm_importtype_vec_delete
+typedef NativeWasmerImporttypeVecDeleteFn = Void Function(
+    Pointer<WasmerImporttypeVec>);
+typedef WasmerImporttypeVecDeleteFn = void Function(
+    Pointer<WasmerImporttypeVec>);
+
+// wasm_importtype_vec_new
+typedef NativeWasmerImporttypeVecNewFn = Void Function(
+    Pointer<WasmerImporttypeVec>, Uint64, Pointer<Pointer<WasmerImporttype>>);
+typedef WasmerImporttypeVecNewFn = void Function(
+    Pointer<WasmerImporttypeVec>, int, Pointer<Pointer<WasmerImporttype>>);
+
+// wasm_importtype_vec_new_empty
+typedef NativeWasmerImporttypeVecNewEmptyFn = Void Function(
+    Pointer<WasmerImporttypeVec>);
+typedef WasmerImporttypeVecNewEmptyFn = void Function(
+    Pointer<WasmerImporttypeVec>);
+
+// wasm_importtype_vec_new_uninitialized
+typedef NativeWasmerImporttypeVecNewUninitializedFn = Void Function(
+    Pointer<WasmerImporttypeVec>, Uint64);
+typedef WasmerImporttypeVecNewUninitializedFn = void Function(
+    Pointer<WasmerImporttypeVec>, int);
+
+// wasm_instance_delete
+typedef NativeWasmerInstanceDeleteFn = Void Function(Pointer<WasmerInstance>);
+typedef WasmerInstanceDeleteFn = void Function(Pointer<WasmerInstance>);
+
+// wasm_instance_exports
 typedef NativeWasmerInstanceExportsFn = Void Function(
-    Pointer<WasmerInstance>, Pointer<Pointer<WasmerExports>>);
+    Pointer<WasmerInstance>, Pointer<WasmerExternVec>);
 typedef WasmerInstanceExportsFn = void Function(
-    Pointer<WasmerInstance>, Pointer<Pointer<WasmerExports>>);
+    Pointer<WasmerInstance>, Pointer<WasmerExternVec>);
 
-// wasmer_exports_len
-typedef NativeWasmerExportsLenFn = Int32 Function(Pointer<WasmerExports>);
-typedef WasmerExportsLenFn = int Function(Pointer<WasmerExports>);
+// wasm_instance_new
+typedef NativeWasmerInstanceNewFn = Pointer<WasmerInstance> Function(
+    Pointer<WasmerStore>,
+    Pointer<WasmerModule>,
+    Pointer<Pointer<WasmerExtern>>,
+    Pointer<Pointer<WasmerTrap>>);
+typedef WasmerInstanceNewFn = Pointer<WasmerInstance> Function(
+    Pointer<WasmerStore>,
+    Pointer<WasmerModule>,
+    Pointer<Pointer<WasmerExtern>>,
+    Pointer<Pointer<WasmerTrap>>);
 
-// wasmer_exports_get
-typedef NativeWasmerExportsGetFn = Pointer<WasmerExport> Function(
-    Pointer<WasmerExports>, Int32);
-typedef WasmerExportsGetFn = Pointer<WasmerExport> Function(
-    Pointer<WasmerExports>, int);
-
-// wasmer_export_descriptors
-typedef NativeWasmerExportDescriptorsFn = Void Function(
-    Pointer<WasmerModule>, Pointer<Pointer<WasmerExportDescriptors>>);
-typedef WasmerExportDescriptorsFn = void Function(
-    Pointer<WasmerModule>, Pointer<Pointer<WasmerExportDescriptors>>);
-
-// wasmer_export_descriptors_destroy
-typedef NativeWasmerExportDescriptorsDestroyFn = Void Function(
-    Pointer<WasmerExportDescriptors>);
-typedef WasmerExportDescriptorsDestroyFn = void Function(
-    Pointer<WasmerExportDescriptors>);
-
-// wasmer_export_descriptors_len
-typedef NativeWasmerExportDescriptorsLenFn = Int32 Function(
-    Pointer<WasmerExportDescriptors>);
-typedef WasmerExportDescriptorsLenFn = int Function(
-    Pointer<WasmerExportDescriptors>);
-
-// wasmer_export_descriptors_get
-typedef NativeWasmerExportDescriptorsGetFn = Pointer<WasmerExportDescriptor>
-    Function(Pointer<WasmerExportDescriptors>, Int32);
-typedef WasmerExportDescriptorsGetFn = Pointer<WasmerExportDescriptor> Function(
-    Pointer<WasmerExportDescriptors>, int);
-
-// wasmer_export_descriptor_kind
-typedef NativeWasmerExportDescriptorKindFn = Uint32 Function(
-    Pointer<WasmerExportDescriptor>);
-typedef WasmerExportDescriptorKindFn = int Function(
-    Pointer<WasmerExportDescriptor>);
-
-// wasmer_export_descriptor_name_ptr
-typedef NativeWasmerExportDescriptorNamePtrFn = Void Function(
-    Pointer<WasmerExportDescriptor>, Pointer<WasmerByteArray>);
-typedef WasmerExportDescriptorNamePtrFn = void Function(
-    Pointer<WasmerExportDescriptor>, Pointer<WasmerByteArray>);
-
-// wasmer_import_descriptors
-typedef NativeWasmerImportDescriptorsFn = Void Function(
-    Pointer<WasmerModule>, Pointer<Pointer<WasmerImportDescriptors>>);
-typedef WasmerImportDescriptorsFn = void Function(
-    Pointer<WasmerModule>, Pointer<Pointer<WasmerImportDescriptors>>);
-
-// wasmer_import_descriptors_destroy
-typedef NativeWasmerImportDescriptorsDestroyFn = Void Function(
-    Pointer<WasmerImportDescriptors>);
-typedef WasmerImportDescriptorsDestroyFn = void Function(
-    Pointer<WasmerImportDescriptors>);
-
-// wasmer_import_descriptors_len
-typedef NativeWasmerImportDescriptorsLenFn = Int32 Function(
-    Pointer<WasmerImportDescriptors>);
-typedef WasmerImportDescriptorsLenFn = int Function(
-    Pointer<WasmerImportDescriptors>);
-
-// wasmer_import_descriptors_get
-typedef NativeWasmerImportDescriptorsGetFn = Pointer<WasmerImportDescriptor>
-    Function(Pointer<WasmerImportDescriptors>, Int32);
-typedef WasmerImportDescriptorsGetFn = Pointer<WasmerImportDescriptor> Function(
-    Pointer<WasmerImportDescriptors>, int);
-
-// wasmer_import_descriptor_kind
-typedef NativeWasmerImportDescriptorKindFn = Uint32 Function(
-    Pointer<WasmerImportDescriptor>);
-typedef WasmerImportDescriptorKindFn = int Function(
-    Pointer<WasmerImportDescriptor>);
-
-// wasmer_import_descriptor_module_name_ptr
-typedef NativeWasmerImportDescriptorModuleNamePtrFn = Void Function(
-    Pointer<WasmerImportDescriptor>, Pointer<WasmerByteArray>);
-typedef WasmerImportDescriptorModuleNamePtrFn = void Function(
-    Pointer<WasmerImportDescriptor>, Pointer<WasmerByteArray>);
-
-// wasmer_import_descriptor_name_ptr
-typedef NativeWasmerImportDescriptorNamePtrFn = Void Function(
-    Pointer<WasmerImportDescriptor>, Pointer<WasmerByteArray>);
-typedef WasmerImportDescriptorNamePtrFn = void Function(
-    Pointer<WasmerImportDescriptor>, Pointer<WasmerByteArray>);
-
-// wasmer_export_name_ptr
-typedef NativeWasmerExportNamePtrFn = Void Function(
-    Pointer<WasmerExport>, Pointer<WasmerByteArray>);
-typedef WasmerExportNamePtrFn = void Function(
-    Pointer<WasmerExport>, Pointer<WasmerByteArray>);
-
-// wasmer_export_kind
-typedef NativeWasmerExportKindFn = Uint32 Function(Pointer<WasmerExport>);
-typedef WasmerExportKindFn = int Function(Pointer<WasmerExport>);
-
-// wasmer_export_to_func
-typedef NativeWasmerExportToFuncFn = Pointer<WasmerExportFunc> Function(
-    Pointer<WasmerExport>);
-typedef WasmerExportToFuncFn = Pointer<WasmerExportFunc> Function(
-    Pointer<WasmerExport>);
-
-// wasmer_export_func_returns_arity
-typedef NativeWasmerExportFuncReturnsArityFn = Uint32 Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>);
-typedef WasmerExportFuncReturnsArityFn = int Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>);
-
-// wasmer_export_func_returns
-typedef NativeWasmerExportFuncReturnsFn = Uint32 Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>, Uint32);
-typedef WasmerExportFuncReturnsFn = int Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>, int);
-
-// wasmer_export_func_params_arity
-typedef NativeWasmerExportFuncParamsArityFn = Uint32 Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>);
-typedef WasmerExportFuncParamsArityFn = int Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>);
-
-// wasmer_export_func_params
-typedef NativeWasmerExportFuncParamsFn = Uint32 Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>, Uint32);
-typedef WasmerExportFuncParamsFn = int Function(
-    Pointer<WasmerExportFunc>, Pointer<Uint32>, int);
-
-// wasmer_export_func_call
-typedef NativeWasmerExportFuncCallFn = Uint32 Function(
-    Pointer<WasmerExportFunc>,
-    Pointer<WasmerValue>,
-    Uint32,
-    Pointer<WasmerValue>,
-    Uint32);
-typedef WasmerExportFuncCallFn = int Function(Pointer<WasmerExportFunc>,
-    Pointer<WasmerValue>, int, Pointer<WasmerValue>, int);
-
-// wasmer_export_to_memory
-typedef NativeWasmerExportToMemoryFn = Uint32 Function(
-    Pointer<WasmerExport>, Pointer<Pointer<WasmerMemory>>);
-typedef WasmerExportToMemoryFn = int Function(
-    Pointer<WasmerExport>, Pointer<Pointer<WasmerMemory>>);
-
-// wasmer_memory_new_ptr
-typedef NativeWasmerMemoryNewPtrFn = Uint32 Function(
-    Pointer<Pointer<WasmerMemory>>, Pointer<WasmerLimits>);
-typedef WasmerMemoryNewPtrFn = int Function(
-    Pointer<Pointer<WasmerMemory>>, Pointer<WasmerLimits>);
-
-// wasmer_memory_grow
-typedef NativeWasmerMemoryGrowFn = Uint32 Function(
-    Pointer<WasmerMemory>, Uint32);
-typedef WasmerMemoryGrowFn = int Function(Pointer<WasmerMemory>, int);
-
-// wasmer_memory_length
-typedef NativeWasmerMemoryLengthFn = Uint32 Function(Pointer<WasmerMemory>);
-typedef WasmerMemoryLengthFn = int Function(Pointer<WasmerMemory>);
-
-// wasmer_memory_data
+// wasm_memory_data
 typedef NativeWasmerMemoryDataFn = Pointer<Uint8> Function(
     Pointer<WasmerMemory>);
 typedef WasmerMemoryDataFn = Pointer<Uint8> Function(Pointer<WasmerMemory>);
 
-// wasmer_memory_data_length
-typedef NativeWasmerMemoryDataLengthFn = Uint32 Function(Pointer<WasmerMemory>);
-typedef WasmerMemoryDataLengthFn = int Function(Pointer<WasmerMemory>);
+// wasm_memory_data_size
+typedef NativeWasmerMemoryDataSizeFn = Uint64 Function(Pointer<WasmerMemory>);
+typedef WasmerMemoryDataSizeFn = int Function(Pointer<WasmerMemory>);
+
+// wasm_memory_delete
+typedef NativeWasmerMemoryDeleteFn = Void Function(Pointer<WasmerMemory>);
+typedef WasmerMemoryDeleteFn = void Function(Pointer<WasmerMemory>);
+
+// wasm_memory_grow
+typedef NativeWasmerMemoryGrowFn = Uint8 Function(
+    Pointer<WasmerMemory>, Uint32);
+typedef WasmerMemoryGrowFn = int Function(Pointer<WasmerMemory>, int);
+
+// wasm_memory_new
+typedef NativeWasmerMemoryNewFn = Pointer<WasmerMemory> Function(
+    Pointer<WasmerStore>, Pointer<WasmerMemorytype>);
+typedef WasmerMemoryNewFn = Pointer<WasmerMemory> Function(
+    Pointer<WasmerStore>, Pointer<WasmerMemorytype>);
+
+// wasm_memory_size
+typedef NativeWasmerMemorySizeFn = Uint32 Function(Pointer<WasmerMemory>);
+typedef WasmerMemorySizeFn = int Function(Pointer<WasmerMemory>);
+
+// wasm_memorytype_delete
+typedef NativeWasmerMemorytypeDeleteFn = Void Function(
+    Pointer<WasmerMemorytype>);
+typedef WasmerMemorytypeDeleteFn = void Function(Pointer<WasmerMemorytype>);
+
+// wasm_memorytype_new
+typedef NativeWasmerMemorytypeNewFn = Pointer<WasmerMemorytype> Function(
+    Pointer<WasmerLimits>);
+typedef WasmerMemorytypeNewFn = Pointer<WasmerMemorytype> Function(
+    Pointer<WasmerLimits>);
+
+// wasm_module_delete
+typedef NativeWasmerModuleDeleteFn = Void Function(Pointer<WasmerModule>);
+typedef WasmerModuleDeleteFn = void Function(Pointer<WasmerModule>);
+
+// wasm_module_exports
+typedef NativeWasmerModuleExportsFn = Void Function(
+    Pointer<WasmerModule>, Pointer<WasmerExporttypeVec>);
+typedef WasmerModuleExportsFn = void Function(
+    Pointer<WasmerModule>, Pointer<WasmerExporttypeVec>);
+
+// wasm_module_imports
+typedef NativeWasmerModuleImportsFn = Void Function(
+    Pointer<WasmerModule>, Pointer<WasmerImporttypeVec>);
+typedef WasmerModuleImportsFn = void Function(
+    Pointer<WasmerModule>, Pointer<WasmerImporttypeVec>);
+
+// wasm_module_new
+typedef NativeWasmerModuleNewFn = Pointer<WasmerModule> Function(
+    Pointer<WasmerStore>, Pointer<WasmerByteVec>);
+typedef WasmerModuleNewFn = Pointer<WasmerModule> Function(
+    Pointer<WasmerStore>, Pointer<WasmerByteVec>);
+
+// wasm_store_delete
+typedef NativeWasmerStoreDeleteFn = Void Function(Pointer<WasmerStore>);
+typedef WasmerStoreDeleteFn = void Function(Pointer<WasmerStore>);
+
+// wasm_store_new
+typedef NativeWasmerStoreNewFn = Pointer<WasmerStore> Function(
+    Pointer<WasmerEngine>);
+typedef WasmerStoreNewFn = Pointer<WasmerStore> Function(Pointer<WasmerEngine>);
+
+// wasm_trap_delete
+typedef NativeWasmerTrapDeleteFn = Void Function(Pointer<WasmerTrap>);
+typedef WasmerTrapDeleteFn = void Function(Pointer<WasmerTrap>);
+
+// wasm_valtype_delete
+typedef NativeWasmerValtypeDeleteFn = Void Function(Pointer<WasmerValtype>);
+typedef WasmerValtypeDeleteFn = void Function(Pointer<WasmerValtype>);
+
+// wasm_valtype_kind
+typedef NativeWasmerValtypeKindFn = Uint8 Function(Pointer<WasmerValtype>);
+typedef WasmerValtypeKindFn = int Function(Pointer<WasmerValtype>);
+
+// wasm_valtype_vec_delete
+typedef NativeWasmerValtypeVecDeleteFn = Void Function(
+    Pointer<WasmerValtypeVec>);
+typedef WasmerValtypeVecDeleteFn = void Function(Pointer<WasmerValtypeVec>);
+
+// wasm_valtype_vec_new
+typedef NativeWasmerValtypeVecNewFn = Void Function(
+    Pointer<WasmerValtypeVec>, Uint64, Pointer<Pointer<WasmerValtype>>);
+typedef WasmerValtypeVecNewFn = void Function(
+    Pointer<WasmerValtypeVec>, int, Pointer<Pointer<WasmerValtype>>);
+
+// wasm_valtype_vec_new_empty
+typedef NativeWasmerValtypeVecNewEmptyFn = Void Function(
+    Pointer<WasmerValtypeVec>);
+typedef WasmerValtypeVecNewEmptyFn = void Function(Pointer<WasmerValtypeVec>);
+
+// wasm_valtype_vec_new_uninitialized
+typedef NativeWasmerValtypeVecNewUninitializedFn = Void Function(
+    Pointer<WasmerValtypeVec>, Uint64);
+typedef WasmerValtypeVecNewUninitializedFn = void Function(
+    Pointer<WasmerValtypeVec>, int);
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index ce97313..9e721f2 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -29,6 +29,15 @@
 rewind_optimized_out_test: SkipByDesign # No incremental compiler available.
 rewind_test: SkipByDesign # No incremental compiler available.
 
+[ $compiler == dartk ]
+bad_reload_test: RuntimeError # Issue 34025
+coverage_optimized_function_test: Pass, Slow
+evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
+evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
+evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
+get_source_report_test: RuntimeError # Should pass again when constant evaluation is relanded, see http://dartbug.com/36600
+pause_on_unhandled_async_exceptions2_test: Pass, Slow
+
 [ $compiler == dartkp ]
 add_breakpoint_rpc_kernel_test: SkipByDesign
 async_generator_breakpoint_test: SkipByDesign
@@ -201,19 +210,12 @@
 [ $arch != simarm && $arch != simarm64 && $compiler == dartk ]
 complex_reload_test: RuntimeError
 
-[ $compiler == dartkb && ($builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd || $builder_tag == bytecode_mixed || $builder_tag == bytecode_mixed_nnbd) ]
-*: Skip # There are still timeouts in the interpreter and mixed modes which cause infra timeouts.
-
-[ $mode == debug && $system == windows ]
-debugger_location_second_test: Skip, Timeout
-debugger_location_test: Skip, Timeout
-
-[ $mode == debug && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $mode == debug ]
 isolate_lifecycle_test: Skip # Flaky.
 pause_idle_isolate_test: Skip # Flaky
 rewind_optimized_out_test: Pass, Slow
 
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $system == windows ]
 add_breakpoint_rpc_kernel_test: Skip # Timeout
 break_on_default_constructor_test: Skip # Issues 32137 and 32138.
 breakpoint_in_parts_class_test: Skip # Timeout
@@ -264,7 +266,7 @@
 step_through_switch_test: Skip # Times out. Issue 32137.
 step_through_switch_with_continue_test: Skip # Times out. Issue 32137.
 
-[ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
 add_breakpoint_rpc_kernel_test: RuntimeError # Issue #34736
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
@@ -294,11 +296,6 @@
 simple_reload_test: RuntimeError, Timeout
 valid_source_locations_test: Skip # Issue 34736, too slow.
 
-[ $compiler == dartk || $compiler == dartkb ]
-bad_reload_test: RuntimeError # Issue 34025
-coverage_optimized_function_test: Pass, Slow
-evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
-evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
-evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
-get_source_report_test: RuntimeError # Should pass again when constant evaluation is relanded, see http://dartbug.com/36600
-pause_on_unhandled_async_exceptions2_test: Pass, Slow
+[ $mode == debug && $system == windows ]
+debugger_location_second_test: Skip, Timeout
+debugger_location_test: Skip, Timeout
diff --git a/runtime/observatory_2/tests/service_2/service_2_kernel.status b/runtime/observatory_2/tests/service_2/service_2_kernel.status
index ce97313..9e721f2 100644
--- a/runtime/observatory_2/tests/service_2/service_2_kernel.status
+++ b/runtime/observatory_2/tests/service_2/service_2_kernel.status
@@ -29,6 +29,15 @@
 rewind_optimized_out_test: SkipByDesign # No incremental compiler available.
 rewind_test: SkipByDesign # No incremental compiler available.
 
+[ $compiler == dartk ]
+bad_reload_test: RuntimeError # Issue 34025
+coverage_optimized_function_test: Pass, Slow
+evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
+evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
+evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
+get_source_report_test: RuntimeError # Should pass again when constant evaluation is relanded, see http://dartbug.com/36600
+pause_on_unhandled_async_exceptions2_test: Pass, Slow
+
 [ $compiler == dartkp ]
 add_breakpoint_rpc_kernel_test: SkipByDesign
 async_generator_breakpoint_test: SkipByDesign
@@ -201,19 +210,12 @@
 [ $arch != simarm && $arch != simarm64 && $compiler == dartk ]
 complex_reload_test: RuntimeError
 
-[ $compiler == dartkb && ($builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd || $builder_tag == bytecode_mixed || $builder_tag == bytecode_mixed_nnbd) ]
-*: Skip # There are still timeouts in the interpreter and mixed modes which cause infra timeouts.
-
-[ $mode == debug && $system == windows ]
-debugger_location_second_test: Skip, Timeout
-debugger_location_test: Skip, Timeout
-
-[ $mode == debug && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $mode == debug ]
 isolate_lifecycle_test: Skip # Flaky.
 pause_idle_isolate_test: Skip # Flaky
 rewind_optimized_out_test: Pass, Slow
 
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $system == windows ]
 add_breakpoint_rpc_kernel_test: Skip # Timeout
 break_on_default_constructor_test: Skip # Issues 32137 and 32138.
 breakpoint_in_parts_class_test: Skip # Timeout
@@ -264,7 +266,7 @@
 step_through_switch_test: Skip # Times out. Issue 32137.
 step_through_switch_with_continue_test: Skip # Times out. Issue 32137.
 
-[ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
 add_breakpoint_rpc_kernel_test: RuntimeError # Issue #34736
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
@@ -294,11 +296,6 @@
 simple_reload_test: RuntimeError, Timeout
 valid_source_locations_test: Skip # Issue 34736, too slow.
 
-[ $compiler == dartk || $compiler == dartkb ]
-bad_reload_test: RuntimeError # Issue 34025
-coverage_optimized_function_test: Pass, Slow
-evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
-evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
-evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
-get_source_report_test: RuntimeError # Should pass again when constant evaluation is relanded, see http://dartbug.com/36600
-pause_on_unhandled_async_exceptions2_test: Pass, Slow
+[ $mode == debug && $system == windows ]
+debugger_location_second_test: Skip, Timeout
+debugger_location_test: Skip, Timeout
diff --git a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart b/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart
deleted file mode 100644
index d936339..0000000
--- a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2018, 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.
-
-// OtherResources=appjit_bytecode_simple_test_body.dart
-
-// Verify that app-jit snapshot contains dependencies between classes and CHA
-// optimized code.
-
-import 'dart:async';
-import 'dart:io' show Platform;
-
-import 'snapshot_test_helper.dart';
-
-Future<void> main() => runAppJitBytecodeTest(
-    Platform.script.resolve('appjit_bytecode_simple_test_body.dart'));
diff --git a/runtime/tests/vm/dart/appjit_bytecode_simple_test_body.dart b/runtime/tests/vm/dart/appjit_bytecode_simple_test_body.dart
deleted file mode 100644
index a882e9a..0000000
--- a/runtime/tests/vm/dart/appjit_bytecode_simple_test_body.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2018, 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.
-
-void main(List<String> args) {
-  final isTraining = args.contains("--train");
-  print(isTraining ? 'OK(Trained)' : 'OK(Run)');
-}
diff --git a/runtime/tests/vm/dart/bytecode_and_ast_mix_test.dart b/runtime/tests/vm/dart/bytecode_and_ast_mix_test.dart
deleted file mode 100644
index 72f6b76..0000000
--- a/runtime/tests/vm/dart/bytecode_and_ast_mix_test.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// OtherResources=bytecode_and_ast_mix_test_body.dart
-
-// Tests the mix of kernel AST (test) and bytecode dill files (core libraries).
-// Verifies that kernel AST can reference a not yet loaded bytecode class
-// through a constant in metadata.
-
-import 'dart:io' show Platform;
-
-import 'package:path/path.dart' as path;
-import 'snapshot_test_helper.dart';
-
-main() async {
-  final testScriptUri =
-      Platform.script.resolve('bytecode_and_ast_mix_test_body.dart');
-  await withTempDir((String temp) async {
-    final dillPath = path.join(temp, 'ast.dill');
-    final testPath = testScriptUri.toFilePath();
-
-    final buildResult = await runGenKernel('BUILD AST DILL FILE', [
-      '--no-gen-bytecode',
-      '--output=$dillPath',
-      testPath,
-    ]);
-    print(buildResult);
-    final runResult = await runDart('RUN FROM AST DILL FILE', [dillPath]);
-    expectOutput("OK", runResult);
-  });
-}
diff --git a/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart b/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart
deleted file mode 100644
index 703a2cc..0000000
--- a/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2019, 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 'dart:mirrors';
-import 'package:expect/expect.dart';
-
-class A {
-  void foo() {}
-}
-
-class B extends A {
-  @override
-  void foo() {}
-}
-
-main() {
-  ClassMirror classB = reflectClass(B);
-  MethodMirror foo = classB.declarations[#foo] as MethodMirror;
-  final annotation = foo.metadata[0].reflectee;
-  Expect.isTrue(annotation.toString().contains('_Override'));
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test.dart b/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test.dart
deleted file mode 100644
index a44f8f2..0000000
--- a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// OtherResources=bytecode_with_ast_in_aot_test_body1.dart
-// OtherResources=bytecode_with_ast_in_aot_test_body2.dart
-
-// Tests that gen_kernel is able to produce dill file with both bytecode
-// and AST in AOT mode, and gen_snapshot is able to consume them.
-// Two test cases are only different in number of entry points, so
-// obfuscation prohibitions metadata has different size, causing
-// different alignment of bytecode metadata.
-
-import 'dart:io' show Platform;
-
-import 'package:path/path.dart' as path;
-import 'snapshot_test_helper.dart';
-
-testAOTOnBytecodeWithAST(String temp, String source) async {
-  final sourcePath = Platform.script.resolve(source).toFilePath();
-  final dillPath = path.join(temp, '${source}.dill');
-  final snapshotPath = path.join(temp, '${source}.so');
-
-  final genKernelResult = await runGenKernel('BUILD DILL FILE', [
-    '--aot',
-    '--gen-bytecode',
-    '--no-drop-ast',
-    '--output=$dillPath',
-    sourcePath,
-  ]);
-  print(genKernelResult);
-  final genSnapshotResult = await runGenSnapshot('GENERATE SNAPSHOT', [
-    '--use-bytecode-compiler',
-    '--snapshot-kind=app-aot-elf',
-    '--elf=$snapshotPath',
-    dillPath,
-  ]);
-  print(genSnapshotResult);
-  final runResult =
-      await runBinary('RUN SNAPSHOT', dartPrecompiledRuntime, [snapshotPath]);
-  expectOutput("OK", runResult);
-}
-
-main() async {
-  await withTempDir((String temp) async {
-    await testAOTOnBytecodeWithAST(
-        temp, 'bytecode_with_ast_in_aot_test_body1.dart');
-    await testAOTOnBytecodeWithAST(
-        temp, 'bytecode_with_ast_in_aot_test_body2.dart');
-  });
-}
diff --git a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body1.dart b/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body1.dart
deleted file mode 100644
index 18ae42b..0000000
--- a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body1.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// Test case for bytecode_with_ast_in_aot_test.dart.
-// Contains 1 entry point.
-
-import 'package:expect/expect.dart';
-
-class A {
-  // Make sure obfuscation prohibitions metadata is generated.
-  @pragma('vm:entry-point')
-  void foofoo1() {}
-}
-
-main() {
-  new A();
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body2.dart b/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body2.dart
deleted file mode 100644
index c3a1e7e..0000000
--- a/runtime/tests/vm/dart/bytecode_with_ast_in_aot_test_body2.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// Test case for bytecode_with_ast_in_aot_test.dart.
-// Contains 2 entry points.
-
-import 'package:expect/expect.dart';
-
-class A {
-  // Make sure obfuscation prohibitions metadata is generated.
-  @pragma('vm:entry-point')
-  void foofoo1() {}
-
-  // One more entry for obfuscation prohibitions metadata,
-  // raises the chances that subsequent bytecode metadata is misaligned.
-  @pragma('vm:entry-point')
-  void foofoo2() {}
-}
-
-main() {
-  new A();
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart/minimal_kernel_bytecode_test.dart b/runtime/tests/vm/dart/minimal_kernel_bytecode_test.dart
deleted file mode 100644
index 417f129..0000000
--- a/runtime/tests/vm/dart/minimal_kernel_bytecode_test.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2020, 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.
-
-// OtherResources=minimal_kernel_script.dart
-
-// Tests that dill file produced with --minimal-kernel --gen-bytecode
-// options works as expected.
-
-import 'minimal_kernel_test.dart' as test;
-
-main() async {
-  await test.compileAndRunMinimalDillTest(['--gen-bytecode']);
-}
diff --git a/runtime/tests/vm/dart/snapshot_test_helper.dart b/runtime/tests/vm/dart/snapshot_test_helper.dart
index 00d1afe..1b578b9 100644
--- a/runtime/tests/vm/dart/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart/snapshot_test_helper.dart
@@ -188,22 +188,3 @@
     expectOutput("OK(Run)", runResult);
   });
 }
-
-Future<void> runAppJitBytecodeTest(Uri testScriptUri) async {
-  await withTempDir((String temp) async {
-    final snapshotPath = p.join(temp, 'app.jit');
-    final testPath = testScriptUri.toFilePath();
-
-    final trainingResult = await runDart('TRAINING RUN', [
-      '--enable_interpreter',
-      '--snapshot=$snapshotPath',
-      '--snapshot-kind=app-jit',
-      testPath,
-      '--train'
-    ]);
-    expectOutput("OK(Trained)", trainingResult);
-    final runResult = await runDart(
-        'RUN FROM SNAPSHOT', ['--enable_interpreter', snapshotPath]);
-    expectOutput("OK(Run)", runResult);
-  });
-}
diff --git a/runtime/tests/vm/dart_2/appjit_bytecode_simple_test.dart b/runtime/tests/vm/dart_2/appjit_bytecode_simple_test.dart
deleted file mode 100644
index d936339..0000000
--- a/runtime/tests/vm/dart_2/appjit_bytecode_simple_test.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2018, 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.
-
-// OtherResources=appjit_bytecode_simple_test_body.dart
-
-// Verify that app-jit snapshot contains dependencies between classes and CHA
-// optimized code.
-
-import 'dart:async';
-import 'dart:io' show Platform;
-
-import 'snapshot_test_helper.dart';
-
-Future<void> main() => runAppJitBytecodeTest(
-    Platform.script.resolve('appjit_bytecode_simple_test_body.dart'));
diff --git a/runtime/tests/vm/dart_2/appjit_bytecode_simple_test_body.dart b/runtime/tests/vm/dart_2/appjit_bytecode_simple_test_body.dart
deleted file mode 100644
index a882e9a..0000000
--- a/runtime/tests/vm/dart_2/appjit_bytecode_simple_test_body.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2018, 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.
-
-void main(List<String> args) {
-  final isTraining = args.contains("--train");
-  print(isTraining ? 'OK(Trained)' : 'OK(Run)');
-}
diff --git a/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test.dart b/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test.dart
deleted file mode 100644
index 72f6b76..0000000
--- a/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// OtherResources=bytecode_and_ast_mix_test_body.dart
-
-// Tests the mix of kernel AST (test) and bytecode dill files (core libraries).
-// Verifies that kernel AST can reference a not yet loaded bytecode class
-// through a constant in metadata.
-
-import 'dart:io' show Platform;
-
-import 'package:path/path.dart' as path;
-import 'snapshot_test_helper.dart';
-
-main() async {
-  final testScriptUri =
-      Platform.script.resolve('bytecode_and_ast_mix_test_body.dart');
-  await withTempDir((String temp) async {
-    final dillPath = path.join(temp, 'ast.dill');
-    final testPath = testScriptUri.toFilePath();
-
-    final buildResult = await runGenKernel('BUILD AST DILL FILE', [
-      '--no-gen-bytecode',
-      '--output=$dillPath',
-      testPath,
-    ]);
-    print(buildResult);
-    final runResult = await runDart('RUN FROM AST DILL FILE', [dillPath]);
-    expectOutput("OK", runResult);
-  });
-}
diff --git a/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test_body.dart b/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test_body.dart
deleted file mode 100644
index dac3c07..0000000
--- a/runtime/tests/vm/dart_2/bytecode_and_ast_mix_test_body.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2019, 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 'dart:mirrors';
-import 'package:expect/expect.dart';
-
-class A {
-  void foo() {}
-}
-
-class B extends A {
-  @override
-  void foo() {}
-}
-
-main() {
-  ClassMirror classB = reflectClass(B);
-  MethodMirror foo = classB.declarations[#foo];
-  final annotation = foo.metadata[0].reflectee;
-  Expect.isTrue(annotation.toString().contains('_Override'));
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test.dart b/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test.dart
deleted file mode 100644
index a44f8f2..0000000
--- a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// OtherResources=bytecode_with_ast_in_aot_test_body1.dart
-// OtherResources=bytecode_with_ast_in_aot_test_body2.dart
-
-// Tests that gen_kernel is able to produce dill file with both bytecode
-// and AST in AOT mode, and gen_snapshot is able to consume them.
-// Two test cases are only different in number of entry points, so
-// obfuscation prohibitions metadata has different size, causing
-// different alignment of bytecode metadata.
-
-import 'dart:io' show Platform;
-
-import 'package:path/path.dart' as path;
-import 'snapshot_test_helper.dart';
-
-testAOTOnBytecodeWithAST(String temp, String source) async {
-  final sourcePath = Platform.script.resolve(source).toFilePath();
-  final dillPath = path.join(temp, '${source}.dill');
-  final snapshotPath = path.join(temp, '${source}.so');
-
-  final genKernelResult = await runGenKernel('BUILD DILL FILE', [
-    '--aot',
-    '--gen-bytecode',
-    '--no-drop-ast',
-    '--output=$dillPath',
-    sourcePath,
-  ]);
-  print(genKernelResult);
-  final genSnapshotResult = await runGenSnapshot('GENERATE SNAPSHOT', [
-    '--use-bytecode-compiler',
-    '--snapshot-kind=app-aot-elf',
-    '--elf=$snapshotPath',
-    dillPath,
-  ]);
-  print(genSnapshotResult);
-  final runResult =
-      await runBinary('RUN SNAPSHOT', dartPrecompiledRuntime, [snapshotPath]);
-  expectOutput("OK", runResult);
-}
-
-main() async {
-  await withTempDir((String temp) async {
-    await testAOTOnBytecodeWithAST(
-        temp, 'bytecode_with_ast_in_aot_test_body1.dart');
-    await testAOTOnBytecodeWithAST(
-        temp, 'bytecode_with_ast_in_aot_test_body2.dart');
-  });
-}
diff --git a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body1.dart b/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body1.dart
deleted file mode 100644
index 18ae42b..0000000
--- a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body1.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// Test case for bytecode_with_ast_in_aot_test.dart.
-// Contains 1 entry point.
-
-import 'package:expect/expect.dart';
-
-class A {
-  // Make sure obfuscation prohibitions metadata is generated.
-  @pragma('vm:entry-point')
-  void foofoo1() {}
-}
-
-main() {
-  new A();
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body2.dart b/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body2.dart
deleted file mode 100644
index c3a1e7e..0000000
--- a/runtime/tests/vm/dart_2/bytecode_with_ast_in_aot_test_body2.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// Test case for bytecode_with_ast_in_aot_test.dart.
-// Contains 2 entry points.
-
-import 'package:expect/expect.dart';
-
-class A {
-  // Make sure obfuscation prohibitions metadata is generated.
-  @pragma('vm:entry-point')
-  void foofoo1() {}
-
-  // One more entry for obfuscation prohibitions metadata,
-  // raises the chances that subsequent bytecode metadata is misaligned.
-  @pragma('vm:entry-point')
-  void foofoo2() {}
-}
-
-main() {
-  new A();
-  print('OK');
-}
diff --git a/runtime/tests/vm/dart_2/minimal_kernel_bytecode_test.dart b/runtime/tests/vm/dart_2/minimal_kernel_bytecode_test.dart
deleted file mode 100644
index 417f129..0000000
--- a/runtime/tests/vm/dart_2/minimal_kernel_bytecode_test.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2020, 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.
-
-// OtherResources=minimal_kernel_script.dart
-
-// Tests that dill file produced with --minimal-kernel --gen-bytecode
-// options works as expected.
-
-import 'minimal_kernel_test.dart' as test;
-
-main() async {
-  await test.compileAndRunMinimalDillTest(['--gen-bytecode']);
-}
diff --git a/runtime/tests/vm/dart_2/snapshot_test_helper.dart b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
index 56472f1..eef877f 100644
--- a/runtime/tests/vm/dart_2/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
@@ -188,22 +188,3 @@
     expectOutput("OK(Run)", runResult);
   });
 }
-
-Future<void> runAppJitBytecodeTest(Uri testScriptUri) async {
-  await withTempDir((String temp) async {
-    final snapshotPath = p.join(temp, 'app.jit');
-    final testPath = testScriptUri.toFilePath();
-
-    final trainingResult = await runDart('TRAINING RUN', [
-      '--enable_interpreter',
-      '--snapshot=$snapshotPath',
-      '--snapshot-kind=app-jit',
-      testPath,
-      '--train'
-    ]);
-    expectOutput("OK(Trained)", trainingResult);
-    final runResult = await runDart(
-        'RUN FROM SNAPSHOT', ['--enable_interpreter', snapshotPath]);
-    expectOutput("OK(Run)", runResult);
-  });
-}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index a80880d..2d7c568 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -14,7 +14,6 @@
 dart/data_uri_import_test/none: SkipByDesign
 dart/emit_aot_size_info_flag_test: Pass, Slow # Spawns several subprocesses
 dart/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
-dart/minimal_kernel_bytecode_test: Pass, Slow # Spawns several subprocesses
 dart/minimal_kernel_test: Pass, Slow # Spawns several subprocesses
 dart/null_safety_autodetection_in_kernel_compiler_test: Pass, Slow # Spawns several subprocesses
 dart/slow_path_shared_stub_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
@@ -24,7 +23,6 @@
 dart_2/data_uri_import_test/none: SkipByDesign
 dart_2/emit_aot_size_info_flag_test: Pass, Slow # Spawns several subprocesses
 dart_2/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
-dart_2/minimal_kernel_bytecode_test: Pass, Slow # Spawns several subprocesses
 dart_2/minimal_kernel_test: Pass, Slow # Spawns several subprocesses
 dart_2/null_safety_autodetection_in_kernel_compiler_test: Pass, Slow # Spawns several subprocesses
 dart_2/slow_path_shared_stub_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
@@ -50,12 +48,10 @@
 cc/*: Skip # Many tests want see unoptimized code running
 dart/appjit*: SkipByDesign # Test needs to a particular opt-counter value
 dart/kernel_determinism_test: SkipSlow
-dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 dart_2/appjit*: SkipByDesign # Test needs to a particular opt-counter value
 dart_2/kernel_determinism_test: SkipSlow
-dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow with optimization_counter_threshold
 
@@ -73,13 +69,25 @@
 dart_2/redirection_type_shuffling_test/none: RuntimeError
 dart_2/snapshot_version_test: RuntimeError
 
-[ $compiler != dartk ]
-dart/b162922506_test: SkipByDesign # Only run in JIT
-dart_2/b162922506_test: SkipByDesign # Only run in JIT
+[ $compiler == dartk ]
+cc/DartAPI_New: Fail # Issue #33041
+cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
+dart/redirection_type_shuffling_test/00: RuntimeError, Pass
+dart/redirection_type_shuffling_test/none: RuntimeError
+dart_2/redirection_type_shuffling_test/00: RuntimeError, Pass
+dart_2/redirection_type_shuffling_test/none: RuntimeError
 
-[ $compiler == dartkb ]
-dart/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
-dart_2/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
+[ $compiler != dartk ]
+cc/IsolateReload_KernelIncrementalCompile: SkipByDesign
+cc/IsolateReload_KernelIncrementalCompileAppAndLib: SkipByDesign
+cc/IsolateReload_KernelIncrementalCompileExpression: SkipByDesign
+cc/IsolateReload_KernelIncrementalCompileGenerics: SkipByDesign
+cc/Mixin_PrivateSuperResolution: Skip
+cc/Mixin_PrivateSuperResolutionCrossLibraryShouldFail: Skip
+dart/b162922506_test: SkipByDesign # Only run in JIT
+dart/entrypoints/jit/*: SkipByDesign # These tests should only run on JIT.
+dart_2/b162922506_test: SkipByDesign # Only run in JIT
+dart_2/entrypoints/jit/*: SkipByDesign # These tests should only run on JIT.
 
 [ $compiler == dartkp ]
 dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test: SkipByDesign # --no-lazy... does nothing on precompiler.
@@ -111,14 +119,12 @@
 cc/VerifyImplicit_Crash: Crash # Negative tests of VerifiedMemory should crash iff in DEBUG mode. TODO(koda): Improve support for negative tests.
 dart/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
 dart/b162922506_test: SkipSlow # Generates very large input file
-dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/spawn_shutdown_test: Pass, Slow # VM Shutdown test, It can take some time for all the isolates to shutdown in a Debug build.
 dart/type_casts_with_null_safety_autodetection_test: Pass, Slow # Very slow in debug mode, uses --optimization-counter-threshold=10
 dart_2/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
 dart_2/b162922506_test: SkipSlow # Generates very large input file
-dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in debug mode
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow in debug mode
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in debug mode
 dart_2/spawn_shutdown_test: Pass, Slow # VM Shutdown test, It can take some time for all the isolates to shutdown in a Debug build.
@@ -155,16 +161,14 @@
 cc/GenKernelKernelLoadKernel: Skip # Issue 34542.
 cc/GenKernelKernelMaxRSS: Skip # Issue 34393.
 cc/GenKernelKernelReadAllBytecode: Skip # Issue 34393.
-dart/appjit_bytecode_simple_test: Skip # Issue 34393.
 dart/disassemble_determinism_test: Slow, Pass # Times out on slower bots.
-dart_2/appjit_bytecode_simple_test: Skip # Issue 34393.
 dart_2/disassemble_determinism_test: Slow, Pass # Times out on slower bots.
 
 [ $arch == ia32 && $mode == debug && $system == windows ]
 dart/transferable_test: Skip # This is performance test and somehow debug win ia32 bot's performance is unpredictable
 dart_2/transferable_test: Skip # This is performance test and somehow debug win ia32 bot's performance is unpredictable
 
-[ $arch != simarm && $arch != simarm64 && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
+[ $arch != simarm && $arch != simarm64 && $compiler == dartk && $hot_reload ]
 dart/data_uri_import_test/base64: Crash
 dart/data_uri_import_test/nocharset: Crash
 dart/data_uri_import_test/nomime: Crash
@@ -190,74 +194,19 @@
 dart_2/optimized_stacktrace_line_test: SkipByDesign # Looks for filenames in stacktrace output
 dart_2/regress_37382_test: SkipByDesign # Matches the type arguments names
 
-[ $compiler == dartk && $mode == product && $runtime == vm ]
-cc/CorelibIsolateStartup: Timeout, Pass
-
-[ $compiler != dartk && $compiler != dartkb ]
-cc/IsolateReload_KernelIncrementalCompile: SkipByDesign
-cc/IsolateReload_KernelIncrementalCompileAppAndLib: SkipByDesign
-cc/IsolateReload_KernelIncrementalCompileExpression: SkipByDesign
-cc/IsolateReload_KernelIncrementalCompileGenerics: SkipByDesign
-cc/Mixin_PrivateSuperResolution: Skip
-cc/Mixin_PrivateSuperResolutionCrossLibraryShouldFail: Skip
-dart/entrypoints/jit/*: SkipByDesign # These tests should only run on JIT.
-dart_2/entrypoints/jit/*: SkipByDesign # These tests should only run on JIT.
-
-[ $compiler != dartk && $compiler != dartkb && $compiler != none ]
-dart/appjit*: SkipByDesign # Test needs to run from source
-dart/bytecode_and_ast_mix_test: SkipByDesign # Test needs to run from source
-dart/kernel_determinism_test: SkipByDesign # Test needs to run from source
-dart/minimal_kernel_bytecode_test: SkipByDesign # Test needs to run from source
-dart/minimal_kernel_test: SkipByDesign # Test needs to run from source
-dart/null_safety_autodetection_in_kernel_compiler_test: SkipByDesign # Test needs to run from source
-dart/snapshot_depfile_test: SkipByDesign # Test needs to run from source
-dart/type_casts_with_null_safety_autodetection_test: SkipByDesign # Test needs to run from source
-dart_2/appjit*: SkipByDesign # Test needs to run from source
-dart_2/bytecode_and_ast_mix_test: SkipByDesign # Test needs to run from source
-dart_2/kernel_determinism_test: SkipByDesign # Test needs to run from source
-dart_2/minimal_kernel_bytecode_test: SkipByDesign # Test needs to run from source
-dart_2/minimal_kernel_test: SkipByDesign # Test needs to run from source
-dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipByDesign # Test needs to run from source
-dart_2/snapshot_depfile_test: SkipByDesign # Test needs to run from source
-
-[ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
-dart/redirection_type_shuffling_test: SkipByDesign # Includes dart:mirrors.
-dart/spawn_shutdown_test: SkipSlow
-dart_2/redirection_type_shuffling_test: SkipByDesign # Includes dart:mirrors.
-dart_2/spawn_shutdown_test: SkipSlow
-
-[ $mode == debug && $system == windows ]
-dart/spawn_shutdown_test: Skip # Flaky crashes unable to start thread; likely low memory on the bot.
-dart_2/spawn_shutdown_test: Skip # Flaky crashes unable to start thread; likely low memory on the bot.
-
 # Enabling of dartk for sim{arm,arm64} revelaed these test failures, which
 # are to be triaged.  Isolate tests are skipped on purpose due to the usage of
 # batch mode.
-[ $mode == debug && ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $mode == debug && ($arch == simarm || $arch == simarm64) ]
 cc/StackTraceMallocHookLengthTest: Fail # Please triage.
 
-[ $mode == product && $runtime == vm ]
-cc/DartAPI_IsolateSetCheckedMode: Fail, OK # Checked mode disabled in product mode.
-
-[ $mode == release && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $mode == product && $runtime == vm ]
 cc/CorelibIsolateStartup: Timeout, Pass
 
-[ $runtime == dart_precompiled && $minified ]
-dart/inline_stack_frame_test: Skip
-dart/optimized_stacktrace_line_test: Skip
-dart_2/inline_stack_frame_test: Skip
-dart_2/optimized_stacktrace_line_test: Skip
+[ $compiler == dartk && $mode == release && $runtime == vm ]
+cc/CorelibIsolateStartup: Timeout, Pass
 
-[ $runtime != dart_precompiled && $runtime != vm ]
-dart/*: SkipByDesign # VM specific tests
-dart/catch_entry_state: SkipByDesign
-dart_2/*: SkipByDesign # VM specific tests
-dart_2/catch_entry_state: SkipByDesign
-
-[ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
-cc/IsolateReload_LibraryLookup: Fail, Crash
-
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm ]
 cc/DartAPI_LoadLibrary: Fail, Crash # Issue 33048.
 cc/DebuggerAPI_BreakpointStubPatching: Fail
 cc/DebuggerAPI_GetClosureInfo: Fail
@@ -273,41 +222,80 @@
 dart/spawn_shutdown_test: SkipSlow
 dart_2/spawn_shutdown_test: SkipSlow
 
-[ $system != fuchsia && ($arch != x64 || $system != linux) ]
-cc/CodeExecutability: SkipByDesign # --dual-map-code not supported on non-Linux/Fuchsia
-
-[ $system == linux && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm && $system == macos ]
 cc/IsolateReload_LibraryLookup: Fail, Crash
 
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $system == linux ]
 cc/IsolateReload_LibraryLookup: Fail, Crash
 
-[ $checked && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $system == windows ]
+cc/IsolateReload_LibraryLookup: Fail, Crash
+
+[ $compiler == dartk && $checked ]
 dart/redirection_type_shuffling_test/00: Pass # Works in --checked mode but not in --strong mode.
 dart_2/redirection_type_shuffling_test/00: Pass # Works in --checked mode but not in --strong mode.
 
-[ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
 dart/appjit*: SkipSlow # DFE too slow
 dart/b162922506_test: SkipSlow # Generates large input file
 dart/data_uri_spawn_test: Skip # Please triage.
-dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/snapshot_version_test: RuntimeError # Please triage.
 dart_2/appjit*: SkipSlow # DFE too slow
 dart_2/b162922506_test: SkipSlow # Generates large input file
 dart_2/data_uri_spawn_test: Skip # Please triage.
-dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart_2/snapshot_version_test: RuntimeError # Please triage.
 
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
 dart/data_uri_spawn_test: Skip # Timeout
 dart/kernel_determinism_test: SkipSlow
 dart_2/data_uri_spawn_test: Skip # Timeout
 dart_2/kernel_determinism_test: SkipSlow
 
+[ $compiler != dartk && $compiler != none ]
+dart/appjit*: SkipByDesign # Test needs to run from source
+dart/kernel_determinism_test: SkipByDesign # Test needs to run from source
+dart/minimal_kernel_test: SkipByDesign # Test needs to run from source
+dart/null_safety_autodetection_in_kernel_compiler_test: SkipByDesign # Test needs to run from source
+dart/snapshot_depfile_test: SkipByDesign # Test needs to run from source
+dart/type_casts_with_null_safety_autodetection_test: SkipByDesign # Test needs to run from source
+dart_2/appjit*: SkipByDesign # Test needs to run from source
+dart_2/kernel_determinism_test: SkipByDesign # Test needs to run from source
+dart_2/minimal_kernel_test: SkipByDesign # Test needs to run from source
+dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipByDesign # Test needs to run from source
+dart_2/snapshot_depfile_test: SkipByDesign # Test needs to run from source
+
+[ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
+dart/redirection_type_shuffling_test: SkipByDesign # Includes dart:mirrors.
+dart/spawn_shutdown_test: SkipSlow
+dart_2/redirection_type_shuffling_test: SkipByDesign # Includes dart:mirrors.
+dart_2/spawn_shutdown_test: SkipSlow
+
+[ $mode == debug && $system == windows ]
+dart/spawn_shutdown_test: Skip # Flaky crashes unable to start thread; likely low memory on the bot.
+dart_2/spawn_shutdown_test: Skip # Flaky crashes unable to start thread; likely low memory on the bot.
+
+[ $mode == product && $runtime == vm ]
+cc/DartAPI_IsolateSetCheckedMode: Fail, OK # Checked mode disabled in product mode.
+
+[ $runtime == dart_precompiled && $minified ]
+dart/inline_stack_frame_test: Skip
+dart/optimized_stacktrace_line_test: Skip
+dart_2/inline_stack_frame_test: Skip
+dart_2/optimized_stacktrace_line_test: Skip
+
+[ $runtime != dart_precompiled && $runtime != vm ]
+dart/*: SkipByDesign # VM specific tests
+dart/catch_entry_state: SkipByDesign
+dart_2/*: SkipByDesign # VM specific tests
+dart_2/catch_entry_state: SkipByDesign
+
+[ $system != fuchsia && ($arch != x64 || $system != linux) ]
+cc/CodeExecutability: SkipByDesign # --dual-map-code not supported on non-Linux/Fuchsia
+
 [ $arch == arm || $arch == arm64 || $builder_tag == crossword || $builder_tag == crossword_ast || $compiler != dartkp || $system == linux && ($arch == simarm || $arch == simarm64) ]
 dart/v8_snapshot_profile_writer_test: SkipByDesign # Only relevant for AOT. Doesn't work in cross-compilation (has to run on the host). On Linux/simarm64 and Linux/simarm this test requires buildtools/clang which is not always available on testing shards.
 dart_2/v8_snapshot_profile_writer_test: SkipByDesign # Only relevant for AOT. Doesn't work in cross-compilation (has to run on the host). On Linux/simarm64 and Linux/simarm this test requires buildtools/clang which is not always available on testing shards.
@@ -373,23 +361,11 @@
 dart/thread_priority_linux_test: SkipByDesign
 dart_2/thread_priority_linux_test: SkipByDesign
 
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd || $builder_tag == bytecode_mixed || $builder_tag == bytecode_mixed_nnbd ]
-cc/StreamingFlowGraphBuilder_ConcatStringLits: SkipByDesign # Optimisation isn't run for bytecode functions.
-cc/StreamingFlowGraphBuilder_ConstFoldStringConcats: SkipByDesign # Optimisation isn't run for bytecode functions.
-cc/StreamingFlowGraphBuilder_DropEmptyStringInterp: SkipByDesign # Optimisation isn't run for bytecode functions.
-cc/StreamingFlowGraphBuilder_FlattenNestedStringInterp: SkipByDesign # Optimisation isn't run for bytecode functions.
-
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd || $hot_reload || $hot_reload_rollback || $compiler != dartk && $compiler != dartkb && $compiler != dartkp ]
-dart/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
-dart_2/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
-
 [ $builder_tag == crossword || $builder_tag == crossword_ast ]
-dart/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
 dart/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
 dart/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
 dart/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
 dart/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
 dart_2/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
 dart_2/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
 dart_2/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
@@ -403,21 +379,11 @@
 dart/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
 dart_2/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
 
-[ $compiler == dartk || $compiler == dartkb ]
-cc/DartAPI_New: Fail # Issue #33041
-cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
-dart/redirection_type_shuffling_test/00: RuntimeError, Pass
-dart/redirection_type_shuffling_test/none: RuntimeError
-dart_2/redirection_type_shuffling_test/00: RuntimeError, Pass
-dart_2/redirection_type_shuffling_test/none: RuntimeError
-
 [ $mode == debug || $runtime != dart_precompiled || $system == android ]
-dart/bytecode_with_ast_in_aot_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart_2/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart_2/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart_2/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
@@ -471,7 +437,6 @@
 dart/disassemble_determinism_test: SkipSlow # Runs expensive fibonacci(32) computation in 2 subprocesses
 dart/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
 dart/issue_31959_31960_test: SkipSlow
-dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart/print_flow_graph_determinism_test: SkipSlow
@@ -486,7 +451,6 @@
 dart_2/disassemble_determinism_test: SkipSlow # Runs expensive fibonacci(32) computation in 2 subprocesses
 dart_2/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
 dart_2/issue_31959_31960_test: SkipSlow
-dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart_2/print_flow_graph_determinism_test: SkipSlow
@@ -496,3 +460,7 @@
 dart_2/splay_test: SkipSlow
 dart_2/stack_overflow_shared_test: SkipSlow # Too slow with --shared-slow-path-triggers-gc flag and not relevant outside precompiled.
 dart_2/type_feedback_test: Pass, Slow
+
+[ $hot_reload || $hot_reload_rollback || $compiler != dartk && $compiler != dartkp ]
+dart/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
+dart_2/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 9444e50..392c905 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -586,16 +586,17 @@
   visibility = [ ":create_common_sdk" ]
   deps = [
     ":copy_libraries",
-    "../third_party/wasmer:wasmer_wrapper",
+    "../third_party/wasmer:wasmer",
   ]
   outputs =
       [ "$root_out_dir/dart-sdk/bin/third_party/wasmer/{{source_file_part}}" ]
   if (is_win) {
-    sources = [ "$root_out_dir/wasmer_wrapper.dll" ]
+    sources = [ "$target_out_dir/../third_party/wasmer/wasmer.dll" ]
   } else if (is_mac) {
-    sources = [ "$root_out_dir/libwasmer_wrapper.dylib" ]
+    sources = [ "$target_out_dir/../third_party/wasmer/libwasmer.dylib" ]
   } else {
-    sources = [ "$root_out_dir/libwasmer_wrapper.so" ]
+    # TODO(dartbug.com/37882): Support Fuchsia.
+    sources = [ "$target_out_dir/../third_party/wasmer/libwasmer.so" ]
   }
 }
 
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index f9dadb3..ee639b0 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -2,10 +2,10 @@
 # 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.
 
-[ $compiler == dartkb ]
-LibTest/isolate/Isolate/kill_A01_t01: Skip # Issue 37699
-LibTest/isolate/Isolate/pause_A01_t01: Skip # Issue 37699
-LibTest/isolate/Isolate/pause_A01_t02: Skip # Issue 37699
+[ $compiler == dartk ]
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
+LibTest/isolate/SendPort/send_A01_t02: Crash
+LibTest/isolate/SendPort/send_A01_t03: Crash
 
 [ $compiler == fasta ]
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
@@ -329,10 +329,10 @@
 LibTest/collection/ListBase/ListBase_class_A01_t01: Skip # Issue 43036
 LibTest/collection/ListMixin/ListMixin_class_A01_t01: Skip # Issue 43036
 
-[ $runtime == vm && $system == linux && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm && $system == linux ]
 LibTest/isolate/Isolate/spawn_A06_t03: Crash
 
-[ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm && $system == macos ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Slow, Pass
 LibTest/collection/ListBase/ListBase_class_A01_t03: Slow, Pass
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Slow, Pass
@@ -340,19 +340,9 @@
 LibTest/core/List/List_class_A01_t02: Slow, Pass
 LibTest/core/List/List_class_A01_t03: Slow, Pass
 
-[ $runtime != vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime != vm ]
 Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: Crash
 
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd ]
-LibTest/collection/ListBase/ListBase_class_A01_t04: Slow, Pass
-LibTest/collection/ListBase/ListBase_class_A01_t05: Slow, Pass
-LibTest/collection/ListBase/ListBase_class_A01_t06: Slow, Pass
-
-[ $compiler == dartk || $compiler == dartkb ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
-LibTest/isolate/SendPort/send_A01_t02: Crash
-LibTest/isolate/SendPort/send_A01_t03: Crash
-
 # It makes no sense to run any test that uses spawnURI under the simulator
 # as that would involve running CFE (the front end) in simulator mode
 # to compile the URI file specified in spawnURI code.
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 1a224c7..3a0f103 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -2,10 +2,10 @@
 # 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.
 
-[ $compiler == dartkb ]
-LibTest/isolate/Isolate/kill_A01_t01: Skip # Issue 37699
-LibTest/isolate/Isolate/pause_A01_t01: Skip # Issue 37699
-LibTest/isolate/Isolate/pause_A01_t02: Skip # Issue 37699
+[ $compiler == dartk ]
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
+LibTest/isolate/SendPort/send_A01_t02: Crash
+LibTest/isolate/SendPort/send_A01_t03: Crash
 
 [ $compiler == fasta ]
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
@@ -173,10 +173,10 @@
 LanguageFeatures/regression/34803_t01: Crash
 LanguageFeatures/regression/34803_t02: Crash
 
-[ $runtime == vm && $system == linux && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm && $system == linux ]
 LibTest/isolate/Isolate/spawn_A06_t03: Crash
 
-[ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime == vm && $system == macos ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Slow, Pass
 LibTest/collection/ListBase/ListBase_class_A01_t03: Slow, Pass
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Slow, Pass
@@ -184,19 +184,9 @@
 LibTest/core/List/List_class_A01_t02: Slow, Pass
 LibTest/core/List/List_class_A01_t03: Slow, Pass
 
-[ $runtime != vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $compiler == dartk && $runtime != vm ]
 Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: Crash
 
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd ]
-LibTest/collection/ListBase/ListBase_class_A01_t04: Slow, Pass
-LibTest/collection/ListBase/ListBase_class_A01_t05: Slow, Pass
-LibTest/collection/ListBase/ListBase_class_A01_t06: Slow, Pass
-
-[ $compiler == dartk || $compiler == dartkb ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
-LibTest/isolate/SendPort/send_A01_t02: Crash
-LibTest/isolate/SendPort/send_A01_t03: Crash
-
 # It makes no sense to run any test that uses spawnURI under the simulator
 # as that would involve running CFE (the front end) in simulator mode
 # to compile the URI file specified in spawnURI code.
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 0e59aaa..d2b5d94 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -45,7 +45,7 @@
 uri_parse_test: Slow, Pass
 uri_test: Slow, Pass
 
-[ $compiler == dartkb || $compiler == dartkp ]
+[ $compiler == dartkp ]
 bigint_parse_radix_test: Slow, Pass # --no_intrinsify
 bigint_test/03: SkipSlow # --no_intrinsify
 bigint_test/15: SkipSlow # --no_intrinsify
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index 5226c43..316928f 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -5,6 +5,11 @@
 [ $compiler == dartdevk ]
 regexp/lookbehind_test/01: Skip # Flaky in uncatchable way.  Issue 36280
 
+[ $compiler == dartkp ]
+bigint_parse_radix_test: Slow, Pass # --no_intrinsify
+bigint_test/03: SkipSlow # --no_intrinsify
+bigint_test/15: SkipSlow # --no_intrinsify
+
 [ $mode == debug ]
 regexp/pcre_test: Slow, Pass # Issue 22008
 
@@ -51,11 +56,6 @@
 uri_parse_test: Slow, Pass
 uri_test: Slow, Pass
 
-[ $compiler == dartkb || $compiler == dartkp ]
-bigint_parse_radix_test: Slow, Pass # --no_intrinsify
-bigint_test/03: SkipSlow # --no_intrinsify
-bigint_test/15: SkipSlow # --no_intrinsify
-
 [ $runtime == dart_precompiled || $runtime == vm ]
 regexp/global_test: Skip # Issue 21709
 regexp/pcre_test: Slow, Pass
diff --git a/tests/language/language.status b/tests/language/language.status
index 277066a..09e7d9e 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -42,7 +42,7 @@
 [ $compiler != dart2js && $compiler != dartdevc && !$checked ]
 function_type/*: Skip # Needs checked mode.
 
-[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
+[ $compiler != dartk && $compiler != dartkp && $mode == debug && $runtime == vm ]
 identifier/built_in_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
 
 [ $hot_reload || $hot_reload_rollback ]
diff --git a/tests/language/language_kernel.status b/tests/language/language_kernel.status
index 9ff89b0..c3aae5e 100644
--- a/tests/language/language_kernel.status
+++ b/tests/language/language_kernel.status
@@ -218,9 +218,44 @@
 vm/no_such_method_error_message_vm_test: SkipByDesign # Looks for unobfuscated name in error message
 vm/regress_28325_test: SkipByDesign # Looks for filename in stack trace
 
+[ $compiler == dartk && $mode == debug && $hot_reload ]
+async_star/async_star2_test/01: Crash
+async_star/async_star2_test/05: Crash
+
 [ $compiler == dartk && $mode == debug && ($hot_reload || $hot_reload_rollback) ]
+enum/duplicate_test/02: Crash # Issue 34606
+enum/duplicate_test/none: Crash # Issue 34606
+enum/private_test/01: Crash # Issue 34606
+enum/test: Crash # Issue 34606
 unsorted/inference_enum_list_test: Skip # Issue 35885
 
+[ $compiler == dartk && $mode == product && $runtime == vm ]
+vm/causal_async_exception_stack2_test: SkipByDesign
+vm/causal_async_exception_stack_test: SkipByDesign
+
+# ===== dartk + vm status lines =====
+[ $compiler == dartk && $runtime == vm ]
+const/const2_test: Crash # Flaky
+main/no_main_test/01: Skip
+mixin/illegal_super_use_test: Skip # Issues 24478 and 23773
+mixin/illegal_superclass_test: Skip # Issues 24478 and 23773
+unsorted/disassemble_test: Slow, Crash # dartbug.com/34971
+vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
+vm/regress_29145_test: Skip # Issue 29145
+web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
+
+[ $compiler == dartk && $hot_reload_rollback ]
+symbol/conflict_test: Slow, Pass
+
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
+async_star/async_star2_test/01: Skip # Timeout
+async_star/async_star2_test/02: Skip # Timeout
+async_star/async_star2_test/03: Skip # Timeout
+async_star/async_star2_test/04: Skip # Timeout
+async_star/async_star2_test/05: Skip # Timeout
+async_star/async_star2_test/none: Skip # Timeout
+type_constants_test/none: Skip # Deferred libraries and hot reload.
+
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
 vm/precompiled_static_initializer_test: Slow, Pass
 
@@ -280,42 +315,5 @@
 [ $compiler == dartkp && $system == windows ]
 unsorted/disassemble_test: Slow, Pass
 
-[ $mode == debug && $runtime == vm && ($compiler == app_jitk || $compiler == dartk || $compiler == dartkb) ]
+[ $mode == debug && $runtime == vm && ($compiler == app_jitk || $compiler == dartk) ]
 optimize/deopt_inlined_function_lazy_test: Skip
-
-[ $mode == debug && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-async_star/async_star2_test/01: Crash
-async_star/async_star2_test/05: Crash
-
-[ $mode == debug && ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-enum/duplicate_test/02: Crash # Issue 34606
-enum/duplicate_test/none: Crash # Issue 34606
-enum/private_test/01: Crash # Issue 34606
-enum/test: Crash # Issue 34606
-
-[ $mode == product && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-vm/causal_async_exception_stack2_test: SkipByDesign
-vm/causal_async_exception_stack_test: SkipByDesign
-
-# ===== dartk + vm status lines =====
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-const/const2_test: Crash # Flaky
-main/no_main_test/01: Skip
-mixin/illegal_super_use_test: Skip # Issues 24478 and 23773
-mixin/illegal_superclass_test: Skip # Issues 24478 and 23773
-unsorted/disassemble_test: Slow, Crash # dartbug.com/34971
-vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
-vm/regress_29145_test: Skip # Issue 29145
-web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
-
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-symbol/conflict_test: Slow, Pass
-
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-async_star/async_star2_test/01: Skip # Timeout
-async_star/async_star2_test/02: Skip # Timeout
-async_star/async_star2_test/03: Skip # Timeout
-async_star/async_star2_test/04: Skip # Timeout
-async_star/async_star2_test/05: Skip # Timeout
-async_star/async_star2_test/none: Skip # Timeout
-type_constants_test/none: Skip # Deferred libraries and hot reload.
diff --git a/tests/language/nnbd/inference/late_variable_type_for_promotion_test.dart b/tests/language/nnbd/inference/late_variable_type_for_promotion_test.dart
new file mode 100644
index 0000000..d6223d5
--- /dev/null
+++ b/tests/language/nnbd/inference/late_variable_type_for_promotion_test.dart
@@ -0,0 +1,120 @@
+// Copyright (c) 2020, 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 '../../static_type_helper.dart';
+
+/// Test that promotion logic properly understands the type of a late variable.
+/// In particular, make sure that CFE late lowering doesn't cause flow analysis
+/// to treat the type as nullable when it's non-nullable.
+
+void nonNullableInitializedWithType() {
+  late num x = 0;
+  x.expectStaticType<Exactly<num>>();
+  // Attempting to promote to `int?` should do nothing, since `int?` is not a
+  // subtype of `num`.
+  if (x is int?) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int` should be ok, though.
+  if (x is int) {
+    x.expectStaticType<Exactly<int>>();
+  }
+}
+
+void nullableInitializedWithType() {
+  late num? x = 0 as num?; // Cast to prevent promotion
+  x.expectStaticType<Exactly<num?>>();
+  // Attempting to promote to `num` should be ok, since `num` is a subtype of
+  // `num?`.
+  if (x is num) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int?` should be ok too.
+  if (x is int?) {
+    x.expectStaticType<Exactly<int?>>();
+  }
+}
+
+void nonNullableInitializedUntyped() {
+  late var x = 0 as num;
+  x.expectStaticType<Exactly<num>>();
+  // Attempting to promote to `int?` should do nothing, since `int?` is not a
+  // subtype of `num`.
+  if (x is int?) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int` should be ok, though.
+  if (x is int) {
+    x.expectStaticType<Exactly<int>>();
+  }
+}
+
+void nullableInitializedUntyped() {
+  late var x = 0 as num?;
+  x.expectStaticType<Exactly<num?>>();
+  // Attempting to promote to `num` should be ok, since `num` is a subtype of
+  // `num?`.
+  if (x is num) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int?` should be ok too.
+  if (x is int?) {
+    x.expectStaticType<Exactly<int?>>();
+  }
+}
+
+void nonNullableUninitializedWithType() {
+  late num x;
+  x = 0;
+  x.expectStaticType<Exactly<num>>();
+  // Attempting to promote to `int?` should do nothing, since `int?` is not a
+  // subtype of `num`.
+  if (x is int?) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int` should be ok, though.
+  if (x is int) {
+    x.expectStaticType<Exactly<int>>();
+  }
+}
+
+void nullableUninitializedWithType() {
+  late num? x;
+  x = 0 as num?; // Cast to prevent promotion
+  x.expectStaticType<Exactly<num?>>();
+  // Attempting to promote to `num` should be ok, since `num` is a subtype of
+  // `num?`.
+  if (x is num) {
+    x.expectStaticType<Exactly<num>>();
+  }
+  // Attempting to promote to `int?` should be ok too.
+  if (x is int?) {
+    x.expectStaticType<Exactly<int?>>();
+  }
+}
+
+void uninitializedUntyped() {
+  late x;
+  x = 0;
+  x.expectStaticType<Exactly<dynamic>>();
+  // Attempting to promote to `int?` should be ok, since `int?` is a subtype of
+  // `dynamic`.
+  if (x is int?) {
+    x.expectStaticType<Exactly<int?>>();
+  }
+  // Attempting to promote to `int` should be ok too.
+  if (x is int) {
+    x.expectStaticType<Exactly<int>>();
+  }
+}
+
+main() {
+  nonNullableInitializedWithType();
+  nullableInitializedWithType();
+  nonNullableInitializedUntyped();
+  nullableInitializedUntyped();
+  nonNullableUninitializedWithType();
+  nullableUninitializedWithType();
+  uninitializedUntyped();
+}
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index c602c82..80846fb 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -41,7 +41,7 @@
 [ $compiler != dart2js && $compiler != dartdevc && !$checked ]
 function_type/*: Skip # Needs checked mode.
 
-[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
+[ $compiler != dartk && $compiler != dartkp && $mode == debug && $runtime == vm ]
 identifier/built_in_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
 
 [ $hot_reload || $hot_reload_rollback ]
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 65d883a..8c0d481 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -108,21 +108,21 @@
 [ $compiler == dartkp && $system == windows ]
 unsorted/disassemble_test: Slow, Pass
 
-[ $mode == debug && $runtime == vm && ($compiler == app_jitk || $compiler == dartk || $compiler == dartkb) ]
+[ $mode == debug && $runtime == vm && ($compiler == app_jitk || $compiler == dartk) ]
 optimize/deopt_inlined_function_lazy_test: Skip
 
-[ $mode == debug && ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
+[ $mode == debug && ($compiler == dartk) && ($hot_reload || $hot_reload_rollback) ]
 enum/duplicate_test/02: Crash # Issue 34606
 enum/duplicate_test/none: Crash # Issue 34606
 enum/private_test/01: Crash # Issue 34606
 enum/test: Crash # Issue 34606
 
-[ $mode == product && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $mode == product && $runtime == vm && ($compiler == dartk) ]
 vm/causal_async_exception_stack2_test: SkipByDesign
 vm/causal_async_exception_stack_test: SkipByDesign
 
 # ===== dartk + vm status lines =====
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $runtime == vm && ($compiler == dartk) ]
 const/const2_test: Crash # Flaky
 main/no_main_test/01: Skip
 mixin/illegal_super_use_test: Skip # Issues 24478 and 23773
@@ -132,8 +132,8 @@
 vm/regress_29145_test: Skip # Issue 29145
 web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
 
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
+[ $hot_reload_rollback && ($compiler == dartk) ]
 symbol/conflict_test: Slow, Pass
 
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
+[ ($compiler == dartk) && ($hot_reload || $hot_reload_rollback) ]
 type_constants_test/none: Skip # Deferred libraries and hot reload.
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 8d88c56..43d6d0e 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -61,7 +61,7 @@
 [ $arch == simarm || $arch == simarmv6 ]
 convert/utf85_test: Skip # Pass, Slow Issue 12644.
 
-[ $arch != x64 || $compiler == dartkb || $runtime != vm ]
+[ $arch != x64 || $runtime != vm ]
 isolate/int32_length_overflow_test: SkipSlow
 
 [ $mode == product || $runtime != vm ]
diff --git a/tests/lib/lib_kernel.status b/tests/lib/lib_kernel.status
index 8151fcf..03ac748 100644
--- a/tests/lib/lib_kernel.status
+++ b/tests/lib/lib_kernel.status
@@ -6,20 +6,17 @@
 
 isolate/ping_pause_test: Skip # Issue https://dartbug.com/37787
 
-[ $compiler == dartkb ]
-isolate/isolate_complex_messages_test: Crash # runtime/vm/object.cc: 17395: error: expected: type_arguments.IsNull() || type_arguments.IsCanonical()
-
 [ $compiler == fasta ]
 html/*: Skip # TODO(ahe): Make dart:html available.
 js/*: Skip # TODO(ahe): Make dart:js available.
 
-[ $arch == x64 && $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $arch == x64 && $compiler == dartk && $mode == debug && $runtime == vm ]
 mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
 
 [ $arch == x64 && ($hot_reload || $hot_reload_rollback) ]
 convert/base64_test/01: Crash # http://dartbug.com/35948
 
-[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
+[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
 mirrors/invocation_fuzz_test/emptyarray: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
 mirrors/invocation_fuzz_test/false: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
 mirrors/invocation_fuzz_test/none: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
@@ -29,6 +26,33 @@
 [ $compiler == app_jitk && ($mode == product || $mode == release) ]
 isolate/spawn_uri_nested_vm_test: Skip # Timeout, Issue 33385
 
+[ $compiler == dartk && $mode == debug && $runtime == vm ]
+mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
+
+[ $compiler == dartk && $mode == debug && $hot_reload_rollback ]
+isolate/message3_test/constList_identical: Skip # Timeout
+
+# ===== dartk + vm status lines =====
+[ $compiler == dartk && $runtime == vm ]
+html/*: SkipByDesign # dart:html not supported on VM.
+isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
+mirrors/invocation_fuzz_test: Crash
+mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
+mirrors/native_class_test: SkipByDesign # Imports dart:html
+
+[ $compiler == dartk && $hot_reload_rollback ]
+isolate/illegal_msg_function_test: Skip # Timeout
+isolate/pause_test: Skip # Timeout
+
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
+isolate/message4_test: Crash # Timeout and sporadic crash (issue 33824)
+mirrors/dynamic_load_test: Skip # Reload has an effect similar to deleting the dynamically loaded library
+mirrors/immutable_collections_test: Pass, Slow
+mirrors/mirrors_reader_test: Pass, Slow
+
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
 isolate/static_function_test: Skip # Flaky (https://github.com/dart-lang/sdk/issues/30063).
 
@@ -40,34 +64,7 @@
 isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
 mirrors/*: SkipByDesign # Mirrors are not supported in AOT mode.
 
-[ $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
-
-[ $mode == debug && $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-isolate/message3_test/constList_identical: Skip # Timeout
-
-# ===== dartk + vm status lines =====
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-html/*: SkipByDesign # dart:html not supported on VM.
-isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
-mirrors/invocation_fuzz_test: Crash
-mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
-mirrors/native_class_test: SkipByDesign # Imports dart:html
-
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-isolate/illegal_msg_function_test: Skip # Timeout
-isolate/pause_test: Skip # Timeout
-
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-isolate/message4_test: Crash # Timeout and sporadic crash (issue 33824)
-mirrors/dynamic_load_test: Skip # Reload has an effect similar to deleting the dynamically loaded library
-mirrors/immutable_collections_test: Pass, Slow
-mirrors/mirrors_reader_test: Pass, Slow
-
-[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
+[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
 html/*: SkipByDesign
 js/*: SkipByDesign
 
diff --git a/tests/lib/lib_vm.status b/tests/lib/lib_vm.status
index edb365c..77a53e5 100644
--- a/tests/lib/lib_vm.status
+++ b/tests/lib/lib_vm.status
@@ -17,7 +17,7 @@
 [ $arch == simarm64 && $runtime == vm ]
 convert/utf85_test: Skip # Pass, Slow Issue 20111.
 
-[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm ]
+[ $compiler != app_jitk && $compiler != dartk && $runtime == vm ]
 async/future_or_only_in_async_test/00: MissingCompileTimeError
 convert/streamed_conversion_json_utf8_decode_test: Pass, Slow # Infrequent timeouts.
 html/*: SkipByDesign # dart:html not supported on VM.
@@ -34,7 +34,7 @@
 mirrors/redirecting_factory_test/01: RuntimeError
 mirrors/redirecting_factory_test/none: RuntimeError
 
-[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm && !$checked ]
+[ $compiler != app_jitk && $compiler != dartk && $runtime == vm && !$checked ]
 mirrors/inference_and_no_such_method_test: RuntimeError
 
 [ $runtime == vm && $system == fuchsia ]
diff --git a/tests/lib/wasm/memory_error_test.dart b/tests/lib/wasm/memory_error_test.dart
index 3a172d8..f02dc6c 100644
--- a/tests/lib/wasm/memory_error_test.dart
+++ b/tests/lib/wasm/memory_error_test.dart
@@ -9,9 +9,14 @@
 import "dart:typed_data";
 
 void main() {
-  Expect.throws(() => WasmMemory(1000000000));
-  var mem = WasmMemory(100);
+  // Empty wasm module.
+  var data = Uint8List.fromList(
+      [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00]);
+  var module = WasmModule(data);
+
+  Expect.throws(() => module.createMemory(1000000000));
+  var mem = module.createMemory(100);
   Expect.throws(() => mem.grow(1000000000));
-  mem = WasmMemory(100, 200);
+  mem = module.createMemory(100, 200);
   Expect.throws(() => mem.grow(300));
 }
diff --git a/tests/lib/wasm/memory_test.dart b/tests/lib/wasm/memory_test.dart
index ecaf433..544c6a1 100644
--- a/tests/lib/wasm/memory_test.dart
+++ b/tests/lib/wasm/memory_test.dart
@@ -9,7 +9,12 @@
 import "dart:typed_data";
 
 void main() {
-  var mem = WasmMemory(100);
+  // Empty wasm module.
+  var data = Uint8List.fromList(
+      [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00]);
+  var module = WasmModule(data);
+
+  var mem = module.createMemory(100);
   Expect.equals(100, mem.lengthInPages);
   Expect.equals(100 * WasmMemory.kPageSizeInBytes, mem.lengthInBytes);
 
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index 843b50a..535b366 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -61,7 +61,7 @@
 [ $arch == simarm || $arch == simarmv6 ]
 convert/utf85_test: Skip # Pass, Slow Issue 12644.
 
-[ $arch != x64 || $compiler == dartkb || $runtime != vm ]
+[ $arch != x64 || $runtime != vm ]
 isolate/int32_length_overflow_test: SkipSlow
 
 [ $mode == product || $runtime != vm ]
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index a1866a5..03ac748 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -6,21 +6,17 @@
 
 isolate/ping_pause_test: Skip # Issue https://dartbug.com/37787
 
-[ $compiler == dartkb ]
-async/stream_state_nonzero_timer_test: Skip # Issues 42331, 42073
-isolate/isolate_complex_messages_test: Crash # runtime/vm/object.cc: 17395: error: expected: type_arguments.IsNull() || type_arguments.IsCanonical()
-
 [ $compiler == fasta ]
 html/*: Skip # TODO(ahe): Make dart:html available.
 js/*: Skip # TODO(ahe): Make dart:js available.
 
-[ $arch == x64 && $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
+[ $arch == x64 && $compiler == dartk && $mode == debug && $runtime == vm ]
 mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
 
 [ $arch == x64 && ($hot_reload || $hot_reload_rollback) ]
 convert/base64_test/01: Crash # http://dartbug.com/35948
 
-[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
+[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
 mirrors/invocation_fuzz_test/emptyarray: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
 mirrors/invocation_fuzz_test/false: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
 mirrors/invocation_fuzz_test/none: Crash # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
@@ -30,6 +26,33 @@
 [ $compiler == app_jitk && ($mode == product || $mode == release) ]
 isolate/spawn_uri_nested_vm_test: Skip # Timeout, Issue 33385
 
+[ $compiler == dartk && $mode == debug && $runtime == vm ]
+mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
+
+[ $compiler == dartk && $mode == debug && $hot_reload_rollback ]
+isolate/message3_test/constList_identical: Skip # Timeout
+
+# ===== dartk + vm status lines =====
+[ $compiler == dartk && $runtime == vm ]
+html/*: SkipByDesign # dart:html not supported on VM.
+isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
+isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
+mirrors/invocation_fuzz_test: Crash
+mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
+mirrors/native_class_test: SkipByDesign # Imports dart:html
+
+[ $compiler == dartk && $hot_reload_rollback ]
+isolate/illegal_msg_function_test: Skip # Timeout
+isolate/pause_test: Skip # Timeout
+
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
+isolate/message4_test: Crash # Timeout and sporadic crash (issue 33824)
+mirrors/dynamic_load_test: Skip # Reload has an effect similar to deleting the dynamically loaded library
+mirrors/immutable_collections_test: Pass, Slow
+mirrors/mirrors_reader_test: Pass, Slow
+
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
 isolate/static_function_test: Skip # Flaky (https://github.com/dart-lang/sdk/issues/30063).
 
@@ -41,34 +64,7 @@
 isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
 mirrors/*: SkipByDesign # Mirrors are not supported in AOT mode.
 
-[ $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
-
-[ $mode == debug && $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-isolate/message3_test/constList_identical: Skip # Timeout
-
-# ===== dartk + vm status lines =====
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-html/*: SkipByDesign # dart:html not supported on VM.
-isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
-mirrors/invocation_fuzz_test: Crash
-mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
-mirrors/native_class_test: SkipByDesign # Imports dart:html
-
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-isolate/illegal_msg_function_test: Skip # Timeout
-isolate/pause_test: Skip # Timeout
-
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-isolate/message4_test: Crash # Timeout and sporadic crash (issue 33824)
-mirrors/dynamic_load_test: Skip # Reload has an effect similar to deleting the dynamically loaded library
-mirrors/immutable_collections_test: Pass, Slow
-mirrors/mirrors_reader_test: Pass, Slow
-
-[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
+[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
 html/*: SkipByDesign
 js/*: SkipByDesign
 
diff --git a/tests/lib_2/lib_2_vm.status b/tests/lib_2/lib_2_vm.status
index 65cb43c..68e3420 100644
--- a/tests/lib_2/lib_2_vm.status
+++ b/tests/lib_2/lib_2_vm.status
@@ -8,7 +8,7 @@
 [ $arch == arm64 && $runtime == vm ]
 mirrors/immutable_collections_test: Pass, Slow # http://dartbug.com/33057
 
-[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm ]
+[ $compiler != app_jitk && $compiler != dartk && $runtime == vm ]
 async/future_or_only_in_async_test/00: MissingCompileTimeError
 convert/streamed_conversion_json_utf8_decode_test: Pass, Slow # Infrequent timeouts.
 html/*: SkipByDesign # dart:html not supported on VM.
@@ -25,7 +25,7 @@
 mirrors/redirecting_factory_test/01: RuntimeError
 mirrors/redirecting_factory_test/none: RuntimeError
 
-[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm && !$checked ]
+[ $compiler != app_jitk && $compiler != dartk && $runtime == vm && !$checked ]
 mirrors/inference_and_no_such_method_test: RuntimeError
 
 [ $runtime == vm && $system == fuchsia ]
diff --git a/tests/lib_2/wasm/basic_test.dart b/tests/lib_2/wasm/basic_test.dart
index 72f4c6c..da2fb9a 100644
--- a/tests/lib_2/wasm/basic_test.dart
+++ b/tests/lib_2/wasm/basic_test.dart
@@ -22,7 +22,7 @@
 
   var inst = WasmModule(data).instantiate(WasmImports());
   var fn = inst.lookupFunction("square");
-  int n = fn.call(1234);
+  int n = fn(1234);
 
   Expect.equals(1234 * 1234, n);
 
diff --git a/tests/lib_2/wasm/memory_error_test.dart b/tests/lib_2/wasm/memory_error_test.dart
index 3a172d8..f02dc6c 100644
--- a/tests/lib_2/wasm/memory_error_test.dart
+++ b/tests/lib_2/wasm/memory_error_test.dart
@@ -9,9 +9,14 @@
 import "dart:typed_data";
 
 void main() {
-  Expect.throws(() => WasmMemory(1000000000));
-  var mem = WasmMemory(100);
+  // Empty wasm module.
+  var data = Uint8List.fromList(
+      [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00]);
+  var module = WasmModule(data);
+
+  Expect.throws(() => module.createMemory(1000000000));
+  var mem = module.createMemory(100);
   Expect.throws(() => mem.grow(1000000000));
-  mem = WasmMemory(100, 200);
+  mem = module.createMemory(100, 200);
   Expect.throws(() => mem.grow(300));
 }
diff --git a/tests/lib_2/wasm/memory_test.dart b/tests/lib_2/wasm/memory_test.dart
index ecaf433..544c6a1 100644
--- a/tests/lib_2/wasm/memory_test.dart
+++ b/tests/lib_2/wasm/memory_test.dart
@@ -9,7 +9,12 @@
 import "dart:typed_data";
 
 void main() {
-  var mem = WasmMemory(100);
+  // Empty wasm module.
+  var data = Uint8List.fromList(
+      [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00]);
+  var module = WasmModule(data);
+
+  var mem = module.createMemory(100);
   Expect.equals(100, mem.lengthInPages);
   Expect.equals(100 * WasmMemory.kPageSizeInBytes, mem.lengthInBytes);
 
diff --git a/tests/standalone/standalone_kernel.status b/tests/standalone/standalone_kernel.status
index 02cfb78..bc9439c 100644
--- a/tests/standalone/standalone_kernel.status
+++ b/tests/standalone/standalone_kernel.status
@@ -8,9 +8,6 @@
 io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
 out_of_memory_unhandled_exception_test: Pass, Slow
 
-[ $compiler == dartkb ]
-no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
-
 [ $system == android ]
 entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
 io/http_ban_http_allowed_cases_test: Skip # Depends on grabbing local hostname which isn't supported.
@@ -21,12 +18,62 @@
 [ $arch == ia32 && $builder_tag == optimization_counter_threshold ]
 io/file_lock_test: SkipSlow # Timeout
 
-[ $arch == simarm64 && ($compiler == dartk || $compiler == dartkb) ]
+[ $arch == simarm64 && $compiler == dartk ]
 io/http_bind_test: Slow, Pass
 
-[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
+[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
 map_insert_remove_oom_test: Skip # Heap limit too low.
 
+[ $compiler == dartk && $mode == debug && $runtime == vm ]
+io/file_lock_test: Slow, Pass
+io/raw_socket_test: Crash
+io/socket_exception_test: Crash
+io/socket_finalizer_test: Crash
+io/socket_info_ipv4_test: Crash
+io/socket_info_ipv6_test: Crash
+io/socket_port_test: Crash
+
+[ $compiler == dartk && $mode == debug && $hot_reload ]
+io/web_socket_ping_test: Crash
+
+[ $compiler == dartk && $runtime == vm ]
+no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
+
+[ $compiler == dartk && $system == windows ]
+io/dart_std_io_pipe_test: Slow, Pass
+io/secure_builtin_roots_test: Skip # Issues 32137 and 32138.
+io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
+map_insert_remove_oom_test: Skip # Heap limit too low.
+
+[ $compiler == dartk && $hot_reload ]
+io/http_no_reason_phrase_test: Crash
+io/http_outgoing_size_test: Crash
+
+[ $compiler == dartk && $hot_reload_rollback ]
+io/directory_chdir_test: Skip # Timeout
+io/echo_server_stream_test: Slow, Pass
+
+# Enabling of dartk for sim{arm,arm64} revealed these test failures, which
+# are to be triaged.  Isolate tests are skipped on purpose due to the usage of
+# batch mode.
+[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
+io/file_blocking_lock_test: Crash # Please triage.
+io/file_lock_test: Slow, Pass
+map_insert_remove_oom_test: Skip # Heap limit too low.
+
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
+io/addlatexhash_test: Skip # Timeout
+io/http_advanced_test: Skip # Timeout
+io/http_auth_digest_test: Crash
+io/http_auth_test: Skip # Timeout
+io/http_proxy_advanced_test: Skip # Timeout
+io/http_read_test: Skip # Timeout
+io/pipe_server_test: Skip # Timeout
+io/socket_close_test: Skip # Timeout
+io/socket_many_connections_test: Skip # Timeout
+io/web_socket_compression_test: Skip # Timeout
+io/web_socket_test: Skip # Timeout
+
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
 io/raw_socket_test: Crash
 io/socket_exception_test: Crash
@@ -61,58 +108,5 @@
 map_insert_remove_oom_test: Skip # Heap limit too low.
 no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
 
-[ $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-io/file_lock_test: Slow, Pass
-io/raw_socket_test: Crash
-io/socket_exception_test: Crash
-io/socket_finalizer_test: Crash
-io/socket_info_ipv4_test: Crash
-io/socket_info_ipv6_test: Crash
-io/socket_port_test: Crash
-
-[ $mode == debug && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-io/web_socket_ping_test: Crash
-
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
-
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
-io/dart_std_io_pipe_test: Slow, Pass
-io/secure_builtin_roots_test: Skip # Issues 32137 and 32138.
-io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
-map_insert_remove_oom_test: Skip # Heap limit too low.
-
-[ $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-io/http_no_reason_phrase_test: Crash
-io/http_outgoing_size_test: Crash
-
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-io/directory_chdir_test: Skip # Timeout
-io/echo_server_stream_test: Slow, Pass
-
-# Enabling of dartk for sim{arm,arm64} revealed these test failures, which
-# are to be triaged.  Isolate tests are skipped on purpose due to the usage of
-# batch mode.
-[ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
-io/file_blocking_lock_test: Crash # Please triage.
-io/file_lock_test: Slow, Pass
-map_insert_remove_oom_test: Skip # Heap limit too low.
-
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-io/addlatexhash_test: Skip # Timeout
-io/http_advanced_test: Skip # Timeout
-io/http_auth_digest_test: Crash
-io/http_auth_test: Skip # Timeout
-io/http_proxy_advanced_test: Skip # Timeout
-io/http_read_test: Skip # Timeout
-io/pipe_server_test: Skip # Timeout
-io/socket_close_test: Skip # Timeout
-io/socket_many_connections_test: Skip # Timeout
-io/web_socket_compression_test: Skip # Timeout
-io/web_socket_test: Skip # Timeout
-
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd ]
-io/http_big_header_test: SkipSlow # Timeout
-
-[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp || $compiler == dartkp && $system == windows ]
+[ $compiler != dartk && $compiler != dartkp || $compiler == dartkp && $system == windows ]
 entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe.
diff --git a/tests/standalone/standalone_vm.status b/tests/standalone/standalone_vm.status
index 93e314f..bc1e1fb 100644
--- a/tests/standalone/standalone_vm.status
+++ b/tests/standalone/standalone_vm.status
@@ -47,9 +47,6 @@
 [ $arch == arm && $mode == release && $runtime == dart_precompiled && $system == android ]
 io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 28426
 
-[ $arch == x64 && $compiler == dartkb && $runtime == vm && $system == linux ]
-io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 35192
-
 [ $arch == x64 && $mode == release && $runtime == vm && $system == linux ]
 io/http_bind_test: Pass, Timeout # Issue 35192
 
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index af8e3ec..cf0367e 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -9,9 +9,6 @@
 io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
 out_of_memory_unhandled_exception_test: Pass, Slow
 
-[ $compiler == dartkb ]
-no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
-
 [ $system == android ]
 entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
 io/http_ban_http_allowed_cases_test: Skip # Depends on grabbing local hostname which isn't supported.
@@ -22,12 +19,62 @@
 [ $arch == ia32 && $builder_tag == optimization_counter_threshold ]
 io/file_lock_test: SkipSlow # Timeout
 
-[ $arch == simarm64 && ($compiler == dartk || $compiler == dartkb) ]
+[ $arch == simarm64 && $compiler == dartk ]
 io/http_bind_test: Slow, Pass
 
-[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
+[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
 map_insert_remove_oom_test: Skip # Heap limit too low.
 
+[ $compiler == dartk && $mode == debug && $runtime == vm ]
+io/file_lock_test: Slow, Pass
+io/raw_socket_test: Crash
+io/socket_exception_test: Crash
+io/socket_finalizer_test: Crash
+io/socket_info_ipv4_test: Crash
+io/socket_info_ipv6_test: Crash
+io/socket_port_test: Crash
+
+[ $compiler == dartk && $mode == debug && $hot_reload ]
+io/web_socket_ping_test: Crash
+
+[ $compiler == dartk && $runtime == vm ]
+no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
+
+[ $compiler == dartk && $system == windows ]
+io/dart_std_io_pipe_test: Slow, Pass
+io/secure_builtin_roots_test: Skip # Issues 32137 and 32138.
+io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
+map_insert_remove_oom_test: Skip # Heap limit too low.
+
+[ $compiler == dartk && $hot_reload ]
+io/http_no_reason_phrase_test: Crash
+io/http_outgoing_size_test: Crash
+
+[ $compiler == dartk && $hot_reload_rollback ]
+io/directory_chdir_test: Skip # Timeout
+io/echo_server_stream_test: Slow, Pass
+
+# Enabling of dartk for sim{arm,arm64} revealed these test failures, which
+# are to be triaged.  Isolate tests are skipped on purpose due to the usage of
+# batch mode.
+[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
+io/file_blocking_lock_test: Crash # Please triage.
+io/file_lock_test: Slow, Pass
+map_insert_remove_oom_test: Skip # Heap limit too low.
+
+[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
+io/addlatexhash_test: Skip # Timeout
+io/http_advanced_test: Skip # Timeout
+io/http_auth_digest_test: Crash
+io/http_auth_test: Skip # Timeout
+io/http_proxy_advanced_test: Skip # Timeout
+io/http_read_test: Skip # Timeout
+io/pipe_server_test: Skip # Timeout
+io/socket_close_test: Skip # Timeout
+io/socket_many_connections_test: Skip # Timeout
+io/web_socket_compression_test: Skip # Timeout
+io/web_socket_test: Skip # Timeout
+
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
 io/raw_socket_test: Crash
 io/socket_exception_test: Crash
@@ -62,58 +109,5 @@
 map_insert_remove_oom_test: Skip # Heap limit too low.
 no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
 
-[ $mode == debug && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-io/file_lock_test: Slow, Pass
-io/raw_socket_test: Crash
-io/socket_exception_test: Crash
-io/socket_finalizer_test: Crash
-io/socket_info_ipv4_test: Crash
-io/socket_info_ipv6_test: Crash
-io/socket_port_test: Crash
-
-[ $mode == debug && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-io/web_socket_ping_test: Crash
-
-[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
-
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
-io/dart_std_io_pipe_test: Slow, Pass
-io/secure_builtin_roots_test: Skip # Issues 32137 and 32138.
-io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
-map_insert_remove_oom_test: Skip # Heap limit too low.
-
-[ $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-io/http_no_reason_phrase_test: Crash
-io/http_outgoing_size_test: Crash
-
-[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-io/directory_chdir_test: Skip # Timeout
-io/echo_server_stream_test: Slow, Pass
-
-# Enabling of dartk for sim{arm,arm64} revealed these test failures, which
-# are to be triaged.  Isolate tests are skipped on purpose due to the usage of
-# batch mode.
-[ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
-io/file_blocking_lock_test: Crash # Please triage.
-io/file_lock_test: Slow, Pass
-map_insert_remove_oom_test: Skip # Heap limit too low.
-
-[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-io/addlatexhash_test: Skip # Timeout
-io/http_advanced_test: Skip # Timeout
-io/http_auth_digest_test: Crash
-io/http_auth_test: Skip # Timeout
-io/http_proxy_advanced_test: Skip # Timeout
-io/http_read_test: Skip # Timeout
-io/pipe_server_test: Skip # Timeout
-io/socket_close_test: Skip # Timeout
-io/socket_many_connections_test: Skip # Timeout
-io/web_socket_compression_test: Skip # Timeout
-io/web_socket_test: Skip # Timeout
-
-[ $builder_tag == bytecode_interpreter || $builder_tag == bytecode_interpreter_nnbd ]
-io/http_big_header_test: SkipSlow # Timeout
-
-[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp || $compiler == dartkp && $system == windows ]
+[ $compiler != dartk && $compiler != dartkp || $compiler == dartkp && $system == windows ]
 entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe.
diff --git a/tests/standalone_2/standalone_2_vm.status b/tests/standalone_2/standalone_2_vm.status
index 2bd998d..478da0f 100644
--- a/tests/standalone_2/standalone_2_vm.status
+++ b/tests/standalone_2/standalone_2_vm.status
@@ -47,9 +47,6 @@
 [ $arch == arm && $mode == release && $runtime == dart_precompiled && $system == android ]
 io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 28426
 
-[ $arch == x64 && $compiler == dartkb && $runtime == vm && $system == linux ]
-io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 35192
-
 [ $arch == x64 && $mode == release && $runtime == vm && $system == linux ]
 io/http_bind_test: Pass, Timeout # Issue 35192
 
diff --git a/third_party/wasmer/BUILD.gn b/third_party/wasmer/BUILD.gn
index afd36a8..f3398f5 100644
--- a/third_party/wasmer/BUILD.gn
+++ b/third_party/wasmer/BUILD.gn
@@ -1,17 +1,6 @@
 import("../../build/rust/rust.gni")
 
-shared_library("wasmer_wrapper") {
-  sources = [
-    "wasmer.hh",
-    "wasmer_wrapper.cc",
-  ]
-  deps = [ ":wasmer_lib" ]
-  if (is_linux) {
-    libs = [ "rt" ]
-  }
-  ldflags = [ "-Wl,--no-as-needed" ]  # Force linking of all wasmer symbols.
-}
-
-rust_library("wasmer_lib") {
+rust_library("wasmer") {
   lib_name = "wasmer"
+  shared = true
 }
diff --git a/third_party/wasmer/Cargo.toml b/third_party/wasmer/Cargo.toml
index bfe6172..bc52ada 100644
--- a/third_party/wasmer/Cargo.toml
+++ b/third_party/wasmer/Cargo.toml
@@ -1,11 +1,13 @@
 [package]
 name = "wasmer"
-version = "0.17.1"
+version = "1.0.0-alpha3"
 
 [lib]
 name = "wasmer"
-crate-type = ["staticlib"]
+crate-type = ["dylib"]
 path = "wasmer.rs"
 
-[dependencies]
-wasmer-runtime-c-api = "0.17.1"
+[dependencies.wasmer-c-api]
+version = "1.0.0-alpha3"
+default-features = false
+features = ["jit", "cranelift", "wasi"]
diff --git a/third_party/wasmer/LICENSE b/third_party/wasmer/LICENSE
deleted file mode 100644
index 62bb543..0000000
--- a/third_party/wasmer/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019-present Wasmer, Inc. and its affiliates.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/third_party/wasmer/README.google b/third_party/wasmer/README.google
deleted file mode 100644
index aec1896..0000000
--- a/third_party/wasmer/README.google
+++ /dev/null
@@ -1,11 +0,0 @@
-Name: Wasmer Runtime C API
-Short Name: wasmer
-URL: https://github.com/wasmerio/wasmer/tree/master/lib/runtime-c-api
-Version: 0.6.0
-Date: August 16, 2019
-License: MIT
-
-Description:
-This directory contains an unmodified copy of wasmer.hh from the Wasmer Runtime
-C API (and README.md and LICENCE). Other files in this directory are added to
-build the corresponding rust library.
diff --git a/third_party/wasmer/README.md b/third_party/wasmer/README.md
deleted file mode 100644
index d1475b7..0000000
--- a/third_party/wasmer/README.md
+++ /dev/null
@@ -1,140 +0,0 @@
-<p align="center">
-  <a href="https://wasmer.io" target="_blank" rel="noopener noreferrer">
-    <img width="300" src="https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/logo.png" alt="Wasmer logo">
-  </a>
-</p>
-
-<p align="center">
-  <a href="https://dev.azure.com/wasmerio/wasmer/_build/latest?definitionId=3&branchName=master">
-    <img src="https://img.shields.io/azure-devops/build/wasmerio/wasmer/3.svg?style=flat-square" alt="Build Status">
-  </a>
-  <a href="https://github.com/wasmerio/wasmer/blob/master/LICENSE">
-    <img src="https://img.shields.io/github/license/wasmerio/wasmer.svg?style=flat-square" alt="License">
-  </a>
-  <a href="https://spectrum.chat/wasmer">
-    <img src="https://withspectrum.github.io/badge/badge.svg" alt="Join the Wasmer Community">
-  </a>
-  <a href="https://crates.io/crates/wasmer-runtime-c-api">
-    <img src="https://img.shields.io/crates/d/wasmer-runtime-c-api.svg?style=flat-square" alt="Number of downloads from crates.io">
-  </a>
-  <a href="https://wasmerio.github.io/wasmer/c/runtime-c-api/">
-    <img src="https://img.shields.io/badge/Docs-Wasmer%20C%20API-blue?style=flat-square" alt="Wasmer C API Documentation">
-  </a>
-</p>
-
-# Wasmer Runtime C API
-
-Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
-compatible with WASI, Emscripten, Rust and Go. [Learn
-more](https://github.com/wasmerio/wasmer).
-
-This crate exposes a C and a C++ API for the Wasmer runtime.
-
-# Usage
-
-The C and C++ header files can be found in the source tree of this
-crate, respectively [`wasmer.h`][wasmer_h] and
-[`wasmer.hh`][wasmer_hh]. They are automatically generated, and always
-up-to-date in this repository.
-The runtime shared library (so, dll, dylib) can also be downloaded in Wasmer [release page](https://github.com/wasmerio/wasmer/releases).
-
-You can find the full C API documentation here:
-https://wasmerio.github.io/wasmer/c/runtime-c-api/
-
-Here is a simple example to use the C API:
-
-```c
-#include <stdio.h>
-#include "../wasmer.h"
-#include <assert.h>
-#include <stdint.h>
-
-int main()
-{
-    // Read the Wasm file bytes.
-    FILE *file = fopen("sum.wasm", "r");
-    fseek(file, 0, SEEK_END);
-    long len = ftell(file);
-    uint8_t *bytes = malloc(len);
-    fseek(file, 0, SEEK_SET);
-    fread(bytes, 1, len, file);
-    fclose(file);
-
-    // Prepare the imports.
-    wasmer_import_t imports[] = {};
-
-    // Instantiate!
-    wasmer_instance_t *instance = NULL;
-    wasmer_result_t instantiation_result = wasmer_instantiate(&instance, bytes, len, imports, 0);
-
-    assert(instantiation_result == WASMER_OK);
-
-    // Let's call a function.
-    // Start by preparing the arguments.
-
-    // Value of argument #1 is `7i32`.
-    wasmer_value_t argument_one;
-    argument_one.tag = WASM_I32;
-    argument_one.value.I32 = 7;
-
-    // Value of argument #2 is `8i32`.
-    wasmer_value_t argument_two;
-    argument_two.tag = WASM_I32;
-    argument_two.value.I32 = 8;
-
-    // Prepare the arguments.
-    wasmer_value_t arguments[] = {argument_one, argument_two};
-
-    // Prepare the return value.
-    wasmer_value_t result_one;
-    wasmer_value_t results[] = {result_one};
-
-    // Call the `sum` function with the prepared arguments and the return value.
-    wasmer_result_t call_result = wasmer_instance_call(instance, "sum", arguments, 2, results, 1);
-
-    // Let's display the result.
-    printf("Call result:  %d\n", call_result);
-    printf("Result: %d\n", results[0].value.I32);
-
-    // `sum(7, 8) == 15`.
-    assert(results[0].value.I32 == 15);
-    assert(call_result == WASMER_OK);
-
-    wasmer_instance_destroy(instance);
-
-    return 0;
-}
-```
-
-# Testing
-
-Tests are run using the release build of the library.  If you make
-changes or compile with non-default features, please ensure you
-rebuild in release mode for the tests to see the changes.
-
-The tests can be run via `cargo test`, such as:
-
-```sh
-$ cargo test --release -- --nocapture
-```
-
-To run tests manually, enter the `lib/runtime-c-api/tests` directory
-and run the following commands:
-
-```sh
-$ cmake .
-$ make
-$ make test
-```
-
-
-# License
-
-Wasmer is primarily distributed under the terms of the [MIT
-license][mit-license] ([LICENSE][license]).
-
-
-[wasmer_h]: ./wasmer.h
-[wasmer_hh]: ./wasmer.hh
-[mit-license]: http://opensource.org/licenses/MIT
-[license]: https://github.com/wasmerio/wasmer/blob/master/LICENSE
diff --git a/third_party/wasmer/wasmer.hh b/third_party/wasmer/wasmer.hh
deleted file mode 100644
index 647e637..0000000
--- a/third_party/wasmer/wasmer.hh
+++ /dev/null
@@ -1,1273 +0,0 @@
-
-#if !defined(WASMER_H_MACROS)
-
-#define WASMER_H_MACROS
-
-// Define the `ARCH_X86_X64` constant.
-#if defined(MSVC) && defined(_M_AMD64)
-#  define ARCH_X86_64
-#elif (defined(GCC) || defined(__GNUC__) || defined(__clang__)) && defined(__x86_64__)
-#  define ARCH_X86_64
-#endif
-
-// Compatibility with non-Clang compilers.
-#if !defined(__has_attribute)
-#  define __has_attribute(x) 0
-#endif
-
-// Compatibility with non-Clang compilers.
-#if !defined(__has_declspec_attribute)
-#  define __has_declspec_attribute(x) 0
-#endif
-
-// Define the `DEPRECATED` macro.
-#if defined(GCC) || defined(__GNUC__) || __has_attribute(deprecated)
-#  define DEPRECATED(message) __attribute__((deprecated(message)))
-#elif defined(MSVC) || __has_declspec_attribute(deprecated)
-#  define DEPRECATED(message) __declspec(deprecated(message))
-#endif
-
-#define WASMER_WASI_ENABLED
-#endif // WASMER_H_MACROS
-
-
-#ifndef WASMER_H
-#define WASMER_H
-
-#include <cstdarg>
-#include <cstdint>
-#include <cstdlib>
-#include <new>
-
-#if defined(WASMER_WASI_ENABLED)
-enum class Version : uint8_t {
-  /// Version cannot be detected or is unknown.
-  Unknown = 0,
-  /// Latest version. See `wasmer_wasi::WasiVersion::Latest` to
-  /// learn more.
-  Latest = 1,
-  /// `wasi_unstable`.
-  Snapshot0 = 2,
-  /// `wasi_snapshot_preview1`.
-  Snapshot1 = 3,
-};
-#endif
-
-/// List of export/import kinds.
-enum class wasmer_import_export_kind : uint32_t {
-  /// The export/import is a function.
-  WASM_FUNCTION = 0,
-  /// The export/import is a global.
-  WASM_GLOBAL = 1,
-  /// The export/import is a memory.
-  WASM_MEMORY = 2,
-  /// The export/import is a table.
-  WASM_TABLE = 3,
-};
-
-/// The `wasmer_result_t` enum is a type that represents either a
-/// success, or a failure.
-enum class wasmer_result_t {
-  /// Represents a success.
-  WASMER_OK = 1,
-  /// Represents a failure.
-  WASMER_ERROR = 2,
-};
-
-/// Represents all possibles WebAssembly value types.
-///
-/// See `wasmer_value_t` to get a complete example.
-enum class wasmer_value_tag : uint32_t {
-  /// Represents the `i32` WebAssembly type.
-  WASM_I32,
-  /// Represents the `i64` WebAssembly type.
-  WASM_I64,
-  /// Represents the `f32` WebAssembly type.
-  WASM_F32,
-  /// Represents the `f64` WebAssembly type.
-  WASM_F64,
-};
-
-struct wasmer_module_t {
-
-};
-
-/// Opaque pointer to a `wasmer_runtime::Instance` value in Rust.
-///
-/// A `wasmer_runtime::Instance` represents a WebAssembly instance. It
-/// is generally generated by the `wasmer_instantiate()` function, or by
-/// the `wasmer_module_instantiate()` function for the most common paths.
-struct wasmer_instance_t {
-
-};
-
-struct wasmer_byte_array {
-  const uint8_t *bytes;
-  uint32_t bytes_len;
-};
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Type used to construct an import_object_t with Emscripten imports.
-struct wasmer_emscripten_globals_t {
-
-};
-#endif
-
-struct wasmer_import_object_t {
-
-};
-
-/// Opaque pointer to `NamedExportDescriptor`.
-struct wasmer_export_descriptor_t {
-
-};
-
-/// Opaque pointer to `NamedExportDescriptors`.
-struct wasmer_export_descriptors_t {
-
-};
-
-/// Opaque pointer to `wasmer_export_t`.
-struct wasmer_export_func_t {
-
-};
-
-/// Represents a WebAssembly value.
-///
-/// This is a [Rust union][rust-union], which is equivalent to the C
-/// union. See `wasmer_value_t` to get a complete example.
-///
-/// [rust-union]: https://doc.rust-lang.org/reference/items/unions.html
-union wasmer_value {
-  int32_t I32;
-  int64_t I64;
-  float F32;
-  double F64;
-};
-
-/// Represents a WebAssembly type and value pair,
-/// i.e. `wasmer_value_tag` and `wasmer_value`. Since the latter is an
-/// union, it's the safe way to read or write a WebAssembly value in
-/// C.
-///
-/// Example:
-///
-/// ```c
-/// // Create a WebAssembly value.
-/// wasmer_value_t wasm_value = {
-///     .tag = WASM_I32,
-///     .value.I32 = 42,
-/// };
-///
-/// // Read a WebAssembly value.
-/// if (wasm_value.tag == WASM_I32) {
-///     int32_t x = wasm_value.value.I32;
-///     // …
-/// }
-/// ```
-struct wasmer_value_t {
-  /// The value type.
-  wasmer_value_tag tag;
-  /// The value.
-  wasmer_value value;
-};
-
-/// Opaque pointer to `NamedExport`.
-struct wasmer_export_t {
-
-};
-
-/// Opaque pointer to a `wasmer_runtime::Memory` value in Rust.
-///
-/// A `wasmer_runtime::Memory` represents a WebAssembly memory. It is
-/// possible to create one with `wasmer_memory_new()` and pass it as
-/// imports of an instance, or to read it from exports of an instance
-/// with `wasmer_export_to_memory()`.
-struct wasmer_memory_t {
-
-};
-
-/// Opaque pointer to the opaque structure `crate::NamedExports`,
-/// which is a wrapper around a vector of the opaque structure
-/// `crate::NamedExport`.
-///
-/// Check the `wasmer_instance_exports()` function to learn more.
-struct wasmer_exports_t {
-
-};
-
-struct wasmer_global_t {
-
-};
-
-struct wasmer_global_descriptor_t {
-  bool mutable_;
-  wasmer_value_tag kind;
-};
-
-struct wasmer_import_descriptor_t {
-
-};
-
-struct wasmer_import_descriptors_t {
-
-};
-
-struct wasmer_import_func_t {
-
-};
-
-struct wasmer_table_t {
-
-};
-
-/// Union of import/export value.
-union wasmer_import_export_value {
-  const wasmer_import_func_t *func;
-  const wasmer_table_t *table;
-  const wasmer_memory_t *memory;
-  const wasmer_global_t *global;
-};
-
-struct wasmer_import_t {
-  wasmer_byte_array module_name;
-  wasmer_byte_array import_name;
-  wasmer_import_export_kind tag;
-  wasmer_import_export_value value;
-};
-
-struct wasmer_import_object_iter_t {
-
-};
-
-/// Opaque pointer to a `wasmer_runtime::Ctx` value in Rust.
-///
-/// An instance context is passed to any host function (aka imported
-/// function) as the first argument. It is necessary to read the
-/// instance data or the memory, respectively with the
-/// `wasmer_instance_context_data_get()` function, and the
-/// `wasmer_instance_context_memory()` function.
-///
-/// It is also possible to get the instance context outside a host
-/// function by using the `wasmer_instance_context_get()`
-/// function. See also `wasmer_instance_context_data_set()` to set the
-/// instance context data.
-///
-/// Example:
-///
-/// ```c
-/// // A host function that prints data from the WebAssembly memory to
-/// // the standard output.
-/// void print(wasmer_instance_context_t *context, int32_t pointer, int32_t length) {
-///     // Use `wasmer_instance_context` to get back the first instance memory.
-///     const wasmer_memory_t *memory = wasmer_instance_context_memory(context, 0);
-///
-///     // Continue…
-/// }
-/// ```
-struct wasmer_instance_context_t {
-
-};
-
-/// The `wasmer_limit_option_t` struct represents an optional limit
-/// for `wasmer_limits_t`.
-struct wasmer_limit_option_t {
-  /// Whether the limit is set.
-  bool has_some;
-  /// The limit value.
-  uint32_t some;
-};
-
-/// The `wasmer_limits_t` struct is a type that describes a memory
-/// options. See the `wasmer_memory_t` struct or the
-/// `wasmer_memory_new()` function to get more information.
-struct wasmer_limits_t {
-  /// The minimum number of allowed pages.
-  uint32_t min;
-  /// The maximum number of allowed pages.
-  wasmer_limit_option_t max;
-};
-
-struct wasmer_serialized_module_t {
-
-};
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-struct wasmer_trampoline_buffer_builder_t {
-
-};
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-struct wasmer_trampoline_callable_t {
-
-};
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-struct wasmer_trampoline_buffer_t {
-
-};
-#endif
-
-#if defined(WASMER_WASI_ENABLED)
-/// Opens a directory that's visible to the WASI module as `alias` but
-/// is backed by the host file at `host_file_path`
-struct wasmer_wasi_map_dir_entry_t {
-  /// What the WASI module will see in its virtual root
-  wasmer_byte_array alias;
-  /// The backing file that the WASI module will interact with via the alias
-  wasmer_byte_array host_file_path;
-};
-#endif
-
-extern "C" {
-
-/// Creates a new Module from the given wasm bytes.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_compile(wasmer_module_t **module,
-                               uint8_t *wasm_bytes,
-                               uint32_t wasm_bytes_len);
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Convenience function for setting up arguments and calling the Emscripten
-/// main function.
-///
-/// WARNING:
-///
-/// Do not call this function on untrusted code when operating without
-/// additional sandboxing in place.
-/// Emscripten has access to many host system calls and therefore may do very
-/// bad things.
-wasmer_result_t wasmer_emscripten_call_main(wasmer_instance_t *instance,
-                                            const wasmer_byte_array *args,
-                                            unsigned int args_len);
-#endif
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Destroy `wasmer_emscrpten_globals_t` created by
-/// `wasmer_emscripten_get_emscripten_globals`.
-void wasmer_emscripten_destroy_globals(wasmer_emscripten_globals_t *globals);
-#endif
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Create a `wasmer_import_object_t` with Emscripten imports, use
-/// `wasmer_emscripten_get_emscripten_globals` to get a
-/// `wasmer_emscripten_globals_t` from a `wasmer_module_t`.
-///
-/// WARNING:
-///
-/// This `import_object_t` contains thin-wrappers around host system calls.
-/// Do not use this to execute untrusted code without additional sandboxing.
-wasmer_import_object_t *wasmer_emscripten_generate_import_object(wasmer_emscripten_globals_t *globals);
-#endif
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Create a `wasmer_emscripten_globals_t` from a Wasm module.
-wasmer_emscripten_globals_t *wasmer_emscripten_get_globals(const wasmer_module_t *module);
-#endif
-
-#if defined(WASMER_EMSCRIPTEN_ENABLED)
-/// Execute global constructors (required if the module is compiled from C++)
-/// and sets up the internal environment.
-///
-/// This function sets the data pointer in the same way that
-/// [`wasmer_instance_context_data_set`] does.
-wasmer_result_t wasmer_emscripten_set_up(wasmer_instance_t *instance,
-                                         wasmer_emscripten_globals_t *globals);
-#endif
-
-/// Gets export descriptor kind
-wasmer_import_export_kind wasmer_export_descriptor_kind(wasmer_export_descriptor_t *export_);
-
-/// Gets name for the export descriptor
-wasmer_byte_array wasmer_export_descriptor_name(wasmer_export_descriptor_t *export_descriptor);
-
-/// Gets export descriptors for the given module
-///
-/// The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
-void wasmer_export_descriptors(const wasmer_module_t *module,
-                               wasmer_export_descriptors_t **export_descriptors);
-
-/// Frees the memory for the given export descriptors
-void wasmer_export_descriptors_destroy(wasmer_export_descriptors_t *export_descriptors);
-
-/// Gets export descriptor by index
-wasmer_export_descriptor_t *wasmer_export_descriptors_get(wasmer_export_descriptors_t *export_descriptors,
-                                                          int idx);
-
-/// Gets the length of the export descriptors
-int wasmer_export_descriptors_len(wasmer_export_descriptors_t *exports);
-
-/// Calls a `func` with the provided parameters.
-/// Results are set using the provided `results` pointer.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_func_call(const wasmer_export_func_t *func,
-                                        const wasmer_value_t *params,
-                                        unsigned int params_len,
-                                        wasmer_value_t *results,
-                                        unsigned int results_len);
-
-/// Sets the params buffer to the parameter types of the given wasmer_export_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_func_params(const wasmer_export_func_t *func,
-                                          wasmer_value_tag *params,
-                                          uint32_t params_len);
-
-/// Sets the result parameter to the arity of the params of the wasmer_export_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_func_params_arity(const wasmer_export_func_t *func, uint32_t *result);
-
-/// Sets the returns buffer to the parameter types of the given wasmer_export_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_func_returns(const wasmer_export_func_t *func,
-                                           wasmer_value_tag *returns,
-                                           uint32_t returns_len);
-
-/// Sets the result parameter to the arity of the returns of the wasmer_export_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_func_returns_arity(const wasmer_export_func_t *func,
-                                                 uint32_t *result);
-
-/// Gets wasmer_export kind
-wasmer_import_export_kind wasmer_export_kind(wasmer_export_t *export_);
-
-/// Gets name from wasmer_export
-wasmer_byte_array wasmer_export_name(wasmer_export_t *export_);
-
-/// Gets export func from export
-const wasmer_export_func_t *wasmer_export_to_func(const wasmer_export_t *export_);
-
-/// Gets a memory pointer from an export pointer.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_export_to_memory(const wasmer_export_t *export_, wasmer_memory_t **memory);
-
-/// Frees the memory for the given exports.
-///
-/// Check the `wasmer_instance_exports()` function to get a complete
-/// example.
-///
-/// If `exports` is a null pointer, this function does nothing.
-///
-/// Example:
-///
-/// ```c
-/// // Get some exports.
-/// wasmer_exports_t *exports = NULL;
-/// wasmer_instance_exports(instance, &exports);
-///
-/// // Destroy the exports.
-/// wasmer_exports_destroy(exports);
-/// ```
-void wasmer_exports_destroy(wasmer_exports_t *exports);
-
-/// Gets wasmer_export by index
-wasmer_export_t *wasmer_exports_get(wasmer_exports_t *exports, int idx);
-
-/// Gets the length of the exports
-int wasmer_exports_len(wasmer_exports_t *exports);
-
-/// Frees memory for the given Global
-void wasmer_global_destroy(wasmer_global_t *global);
-
-/// Gets the value stored by the given Global
-wasmer_value_t wasmer_global_get(wasmer_global_t *global);
-
-/// Returns a descriptor (type, mutability) of the given Global
-wasmer_global_descriptor_t wasmer_global_get_descriptor(wasmer_global_t *global);
-
-/// Creates a new Global and returns a pointer to it.
-/// The caller owns the object and should call `wasmer_global_destroy` to free it.
-wasmer_global_t *wasmer_global_new(wasmer_value_t value, bool mutable_);
-
-/// Sets the value stored by the given Global
-void wasmer_global_set(wasmer_global_t *global, wasmer_value_t value);
-
-/// Gets export descriptor kind
-wasmer_import_export_kind wasmer_import_descriptor_kind(wasmer_import_descriptor_t *export_);
-
-/// Gets module name for the import descriptor
-wasmer_byte_array wasmer_import_descriptor_module_name(wasmer_import_descriptor_t *import_descriptor);
-
-/// Gets name for the import descriptor
-wasmer_byte_array wasmer_import_descriptor_name(wasmer_import_descriptor_t *import_descriptor);
-
-/// Gets import descriptors for the given module
-///
-/// The caller owns the object and should call `wasmer_import_descriptors_destroy` to free it.
-void wasmer_import_descriptors(const wasmer_module_t *module,
-                               wasmer_import_descriptors_t **import_descriptors);
-
-/// Frees the memory for the given import descriptors
-void wasmer_import_descriptors_destroy(wasmer_import_descriptors_t *import_descriptors);
-
-/// Gets import descriptor by index
-wasmer_import_descriptor_t *wasmer_import_descriptors_get(wasmer_import_descriptors_t *import_descriptors,
-                                                          unsigned int idx);
-
-/// Gets the length of the import descriptors
-unsigned int wasmer_import_descriptors_len(wasmer_import_descriptors_t *exports);
-
-/// Frees memory for the given Func
-void wasmer_import_func_destroy(wasmer_import_func_t *func);
-
-/// Creates new host function, aka imported function. `func` is a
-/// function pointer, where the first argument is the famous `vm::Ctx`
-/// (in Rust), or `wasmer_instance_context_t` (in C). All arguments
-/// must be typed with compatible WebAssembly native types:
-///
-/// | WebAssembly type | C/C++ type |
-/// | ---------------- | ---------- |
-/// | `i32`            | `int32_t`  |
-/// | `i64`            | `int64_t`  |
-/// | `f32`            | `float`    |
-/// | `f64`            | `double`   |
-///
-/// The function pointer must have a lifetime greater than the
-/// WebAssembly instance lifetime.
-///
-/// The caller owns the object and should call
-/// `wasmer_import_func_destroy` to free it.
-wasmer_import_func_t *wasmer_import_func_new(void (*func)(void *data),
-                                             const wasmer_value_tag *params,
-                                             unsigned int params_len,
-                                             const wasmer_value_tag *returns,
-                                             unsigned int returns_len);
-
-/// Sets the params buffer to the parameter types of the given wasmer_import_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_import_func_params(const wasmer_import_func_t *func,
-                                          wasmer_value_tag *params,
-                                          unsigned int params_len);
-
-/// Sets the result parameter to the arity of the params of the wasmer_import_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_import_func_params_arity(const wasmer_import_func_t *func, uint32_t *result);
-
-/// Sets the returns buffer to the parameter types of the given wasmer_import_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_import_func_returns(const wasmer_import_func_t *func,
-                                           wasmer_value_tag *returns,
-                                           unsigned int returns_len);
-
-/// Sets the result parameter to the arity of the returns of the wasmer_import_func_t
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_import_func_returns_arity(const wasmer_import_func_t *func,
-                                                 uint32_t *result);
-
-/// Frees memory of the given ImportObject
-void wasmer_import_object_destroy(wasmer_import_object_t *import_object);
-
-/// Extends an existing import object with new imports
-wasmer_result_t wasmer_import_object_extend(wasmer_import_object_t *import_object,
-                                            const wasmer_import_t *imports,
-                                            unsigned int imports_len);
-
-/// Gets an entry from an ImportObject at the name and namespace.
-/// Stores `name`, `namespace`, and `import_export_value` in `import`.
-/// Thus these must remain valid for the lifetime of `import`.
-///
-/// The caller owns all data involved.
-/// `import_export_value` will be written to based on `tag`.
-wasmer_result_t wasmer_import_object_get_import(const wasmer_import_object_t *import_object,
-                                                wasmer_byte_array namespace_,
-                                                wasmer_byte_array name,
-                                                wasmer_import_t *import,
-                                                wasmer_import_export_value *import_export_value,
-                                                uint32_t tag);
-
-/// Frees the memory allocated in `wasmer_import_object_iter_next`
-///
-/// This function does not free the memory in `wasmer_import_object_t`;
-/// it only frees memory allocated while querying a `wasmer_import_object_t`.
-void wasmer_import_object_imports_destroy(wasmer_import_t *imports, uint32_t imports_len);
-
-/// Returns true if further calls to `wasmer_import_object_iter_next` will
-/// not return any new data
-bool wasmer_import_object_iter_at_end(wasmer_import_object_iter_t *import_object_iter);
-
-/// Frees the memory allocated by `wasmer_import_object_iterate_functions`
-void wasmer_import_object_iter_destroy(wasmer_import_object_iter_t *import_object_iter);
-
-/// Writes the next value to `import`.  `WASMER_ERROR` is returned if there
-/// was an error or there's nothing left to return.
-///
-/// To free the memory allocated here, pass the import to `wasmer_import_object_imports_destroy`.
-/// To check if the iterator is done, use `wasmer_import_object_iter_at_end`.
-wasmer_result_t wasmer_import_object_iter_next(wasmer_import_object_iter_t *import_object_iter,
-                                               wasmer_import_t *import);
-
-/// Create an iterator over the functions in the import object.
-/// Get the next import with `wasmer_import_object_iter_next`
-/// Free the iterator with `wasmer_import_object_iter_destroy`
-wasmer_import_object_iter_t *wasmer_import_object_iterate_functions(const wasmer_import_object_t *import_object);
-
-/// Creates a new empty import object.
-/// See also `wasmer_import_object_append`
-wasmer_import_object_t *wasmer_import_object_new();
-
-/// Calls an exported function of a WebAssembly instance by `name`
-/// with the provided parameters. The exported function results are
-/// stored on the provided `results` pointer.
-///
-/// This function returns `wasmer_result_t::WASMER_OK` upon success,
-/// `wasmer_result_t::WASMER_ERROR` otherwise. You can use
-/// `wasmer_last_error_message()` to get the generated error message.
-///
-/// Potential errors are the following:
-///
-///   * `instance` is a null pointer,
-///   * `name` is a null pointer,
-///   * `params` is a null pointer.
-///
-/// Example of calling an exported function that needs two parameters, and returns one value:
-///
-/// ```c
-/// // First argument.
-/// wasmer_value_t argument_one = {
-///     .tag = WASM_I32,
-///     .value.I32 = 3,
-/// };
-///
-/// // Second argument.
-/// wasmer_value_t argument_two = {
-///     .tag = WASM_I32,
-///     .value.I32 = 4,
-/// };
-///
-/// // First result.
-/// wasmer_value_t result_one;
-///
-/// // All arguments and results.
-/// wasmer_value_t arguments[] = {argument_one, argument_two};
-/// wasmer_value_t results[]   = {result_one};
-///
-/// wasmer_result_t call_result = wasmer_instance_call(
-///     instance,  // instance pointer
-///     "sum",     // the exported function name
-///     arguments, // the arguments
-///     2,         // the number of arguments
-///     results,   // the results
-///     1          // the number of results
-/// );
-///
-/// if (call_result == WASMER_OK) {
-///     printf("Result is: %d\n", results[0].value.I32);
-/// }
-/// ```
-wasmer_result_t wasmer_instance_call(wasmer_instance_t *instance,
-                                     const char *name,
-                                     const wasmer_value_t *params,
-                                     uint32_t params_len,
-                                     wasmer_value_t *results,
-                                     uint32_t results_len);
-
-/// Gets the data that can be hold by an instance.
-///
-/// This function is complementary of
-/// `wasmer_instance_context_data_set()`. Please read its
-/// documentation. You can also read the documentation of
-/// `wasmer_instance_context_t` to get other examples.
-///
-/// This function returns nothing if `ctx` is a null pointer.
-void *wasmer_instance_context_data_get(const wasmer_instance_context_t *ctx);
-
-/// Sets the data that can be hold by an instance context.
-///
-/// An instance context (represented by the opaque
-/// `wasmer_instance_context_t` structure) can hold user-defined
-/// data. This function sets the data. This function is complementary
-/// of `wasmer_instance_context_data_get()`.
-///
-/// This function does nothing if `instance` is a null pointer.
-///
-/// Example:
-///
-/// ```c
-/// // Define your own data.
-/// typedef struct {
-///     // …
-/// } my_data;
-///
-/// // Allocate them and set them on the given instance.
-/// my_data *data = malloc(sizeof(my_data));
-/// data->… = …;
-/// wasmer_instance_context_data_set(instance, (void*) data);
-///
-/// // You can read your data.
-/// {
-///     my_data *data = (my_data*) wasmer_instance_context_data_get(wasmer_instance_context_get(instance));
-///     // …
-/// }
-/// ```
-void wasmer_instance_context_data_set(wasmer_instance_t *instance,
-                                      void *data_ptr);
-
-/// Returns the instance context. Learn more by looking at the
-/// `wasmer_instance_context_t` struct.
-///
-/// This function returns `null` if `instance` is a null pointer.
-///
-/// Example:
-///
-/// ```c
-/// const wasmer_instance_context_get *context = wasmer_instance_context_get(instance);
-/// my_data *data = (my_data *) wasmer_instance_context_data_get(context);
-/// // Do something with `my_data`.
-/// ```
-///
-/// It is often useful with `wasmer_instance_context_data_set()`.
-const wasmer_instance_context_t *wasmer_instance_context_get(wasmer_instance_t *instance);
-
-/// Gets the `memory_idx`th memory of the instance.
-///
-/// Note that the index is always `0` until multiple memories are supported.
-///
-/// This function is mostly used inside host functions (aka imported
-/// functions) to read the instance memory.
-///
-/// Example of a _host function_ that reads and prints a string based on a pointer and a length:
-///
-/// ```c
-/// void print_string(const wasmer_instance_context_t *context, int32_t pointer, int32_t length) {
-///     // Get the 0th memory.
-///     const wasmer_memory_t *memory = wasmer_instance_context_memory(context, 0);
-///
-///     // Get the memory data as a pointer.
-///     uint8_t *memory_bytes = wasmer_memory_data(memory);
-///
-///     // Print what we assumed to be a string!
-///     printf("%.*s", length, memory_bytes + pointer);
-/// }
-/// ```
-const wasmer_memory_t *wasmer_instance_context_memory(const wasmer_instance_context_t *ctx,
-                                                      uint32_t _memory_idx);
-
-/// Frees memory for the given `wasmer_instance_t`.
-///
-/// Check the `wasmer_instantiate()` function to get a complete
-/// example.
-///
-/// If `instance` is a null pointer, this function does nothing.
-///
-/// Example:
-///
-/// ```c
-/// // Get an instance.
-/// wasmer_instance_t *instance = NULL;
-/// wasmer_instantiate(&instance, bytes, bytes_length, imports, 0);
-///
-/// // Destroy the instance.
-/// wasmer_instance_destroy(instance);
-/// ```
-void wasmer_instance_destroy(wasmer_instance_t *instance);
-
-/// Gets all the exports of the given WebAssembly instance.
-///
-/// This function stores a Rust vector of exports into `exports` as an
-/// opaque pointer of kind `wasmer_exports_t`.
-///
-/// As is, you can do anything with `exports` except using the
-/// companion functions, like `wasmer_exports_len()`,
-/// `wasmer_exports_get()` or `wasmer_export_kind()`. See the example below.
-///
-/// **Warning**: The caller owns the object and should call
-/// `wasmer_exports_destroy()` to free it.
-///
-/// Example:
-///
-/// ```c
-/// // Get the exports.
-/// wasmer_exports_t *exports = NULL;
-/// wasmer_instance_exports(instance, &exports);
-///
-/// // Get the number of exports.
-/// int exports_length = wasmer_exports_len(exports);
-/// printf("Number of exports: %d\n", exports_length);
-///
-/// // Read the first export.
-/// wasmer_export_t *export = wasmer_exports_get(exports, 0);
-///
-/// // Get the kind of the export.
-/// wasmer_import_export_kind export_kind = wasmer_export_kind(export);
-///
-/// // Assert it is a function (why not).
-/// assert(export_kind == WASM_FUNCTION);
-///
-/// // Read the export name.
-/// wasmer_byte_array name_bytes = wasmer_export_name(export);
-///
-/// assert(name_bytes.bytes_len == sizeof("sum") - 1);
-/// assert(memcmp(name_bytes.bytes, "sum", sizeof("sum") - 1) == 0);
-///
-/// // Destroy the exports.
-/// wasmer_exports_destroy(exports);
-/// ```
-void wasmer_instance_exports(wasmer_instance_t *instance, wasmer_exports_t **exports);
-
-/// Creates a new WebAssembly instance from the given bytes and imports.
-///
-/// The result is stored in the first argument `instance` if
-/// successful, i.e. when the function returns
-/// `wasmer_result_t::WASMER_OK`. Otherwise
-/// `wasmer_result_t::WASMER_ERROR` is returned, and
-/// `wasmer_last_error_length()` with `wasmer_last_error_message()` must
-/// be used to read the error message.
-///
-/// The caller is responsible to free the instance with
-/// `wasmer_instance_destroy()`.
-///
-/// Example:
-///
-/// ```c
-/// // 1. Read a WebAssembly module from a file.
-/// FILE *file = fopen("sum.wasm", "r");
-/// fseek(file, 0, SEEK_END);
-/// long bytes_length = ftell(file);
-/// uint8_t *bytes = malloc(bytes_length);
-/// fseek(file, 0, SEEK_SET);
-/// fread(bytes, 1, bytes_length, file);
-/// fclose(file);
-///
-/// // 2. Declare the imports (here, none).
-/// wasmer_import_t imports[] = {};
-///
-/// // 3. Instantiate the WebAssembly module.
-/// wasmer_instance_t *instance = NULL;
-/// wasmer_result_t result = wasmer_instantiate(&instance, bytes, bytes_length, imports, 0);
-///
-/// // 4. Check for errors.
-/// if (result != WASMER_OK) {
-///     int error_length = wasmer_last_error_length();
-///     char *error = malloc(error_length);
-///     wasmer_last_error_message(error, error_length);
-///     // Do something with `error`…
-/// }
-///
-/// // 5. Free the memory!
-/// wasmer_instance_destroy(instance);
-/// ```
-wasmer_result_t wasmer_instantiate(wasmer_instance_t **instance,
-                                   uint8_t *wasm_bytes,
-                                   uint32_t wasm_bytes_len,
-                                   wasmer_import_t *imports,
-                                   int imports_len);
-
-/// Gets the length in bytes of the last error if any.
-///
-/// This can be used to dynamically allocate a buffer with the correct number of
-/// bytes needed to store a message.
-///
-/// See `wasmer_last_error_message()` to get a full example.
-int wasmer_last_error_length();
-
-/// Gets the last error message if any into the provided buffer
-/// `buffer` up to the given `length`.
-///
-/// The `length` parameter must be large enough to store the last
-/// error message. Ideally, the value should come from
-/// `wasmer_last_error_length()`.
-///
-/// The function returns the length of the string in bytes, `-1` if an
-/// error occurs. Potential errors are:
-///
-///  * The buffer is a null pointer,
-///  * The buffer is too smal to hold the error message.
-///
-/// Note: The error message always has a trailing null character.
-///
-/// Example:
-///
-/// ```c
-/// int error_length = wasmer_last_error_length();
-///
-/// if (error_length > 0) {
-///     char *error_message = malloc(error_length);
-///     wasmer_last_error_message(error_message, error_length);
-///     printf("Error message: `%s`\n", error_message);
-/// } else {
-///     printf("No error message\n");
-/// }
-/// ```
-int wasmer_last_error_message(char *buffer, int length);
-
-/// Gets a pointer to the beginning of the contiguous memory data
-/// bytes.
-///
-/// The function returns `NULL` if `memory` is a null pointer.
-///
-/// Note that when the memory grows, it can be reallocated, and thus
-/// the returned pointer can be invalidated.
-///
-/// Example:
-///
-/// ```c
-/// uint8_t *memory_data = wasmer_memory_data(memory);
-/// char *str = (char*) malloc(sizeof(char) * 7);
-///
-/// for (uint32_t nth = 0; nth < 7; ++nth) {
-///     str[nth] = (char) memory_data[nth];
-/// }
-/// ```
-uint8_t *wasmer_memory_data(const wasmer_memory_t *memory);
-
-/// Gets the size in bytes of the memory data.
-///
-/// This function returns 0 if `memory` is a null pointer.
-///
-/// Example:
-///
-/// ```c
-/// uint32_t memory_data_length = wasmer_memory_data_length(memory);
-/// ```
-uint32_t wasmer_memory_data_length(const wasmer_memory_t *memory);
-
-/// Frees memory for the given `wasmer_memory_t`.
-///
-/// Check the `wasmer_memory_new()` function to get a complete
-/// example.
-///
-/// If `memory` is a null pointer, this function does nothing.
-///
-/// Example:
-///
-/// ```c
-/// // Get a memory.
-/// wasmer_memory_t *memory = NULL;
-/// wasmer_result_t result = wasmer_memory_new(&memory, memory_descriptor);
-///
-/// // Destroy the memory.
-/// wasmer_memory_destroy(memory);
-/// ```
-void wasmer_memory_destroy(wasmer_memory_t *memory);
-
-/// Grows a memory by the given number of pages (of 65Kb each).
-///
-/// The functions return `wasmer_result_t::WASMER_OK` upon success,
-/// `wasmer_result_t::WASMER_ERROR` otherwise. Use
-/// `wasmer_last_error_length()` with `wasmer_last_error_message()` to
-/// read the error message.
-///
-/// Example:
-///
-/// ```c
-/// wasmer_result_t result = wasmer_memory_grow(memory, 10);
-///
-/// if (result != WASMER_OK) {
-///     // …
-/// }
-/// ```
-wasmer_result_t wasmer_memory_grow(wasmer_memory_t *memory, uint32_t delta);
-
-/// Reads the current length (in pages) of the given memory.
-///
-/// The function returns zero if `memory` is a null pointer.
-///
-/// Example:
-///
-/// ```c
-/// uint32_t memory_length = wasmer_memory_length(memory);
-///
-/// printf("Memory pages length: %d\n", memory_length);
-/// ```
-uint32_t wasmer_memory_length(const wasmer_memory_t *memory);
-
-/// Creates a new empty WebAssembly memory for the given descriptor.
-///
-/// The result is stored in the first argument `memory` if successful,
-/// i.e. when the function returns
-/// `wasmer_result_t::WASMER_OK`. Otherwise,
-/// `wasmer_result_t::WASMER_ERROR` is returned, and
-/// `wasmer_last_error_length()` with `wasmer_last_error_message()`
-/// must be used to read the error message.
-///
-/// The caller owns the memory and is responsible to free it with
-/// `wasmer_memory_destroy()`.
-///
-/// Example:
-///
-/// ```c
-/// // 1. The memory object.
-/// wasmer_memory_t *memory = NULL;
-///
-/// // 2. The memory descriptor.
-/// wasmer_limits_t memory_descriptor = {
-///     .min = 10,
-///     .max = {
-///         .has_some = true,
-///         .some = 15,
-///     },
-/// };
-///
-/// // 3. Initialize the memory.
-/// wasmer_result_t result = wasmer_memory_new(&memory, memory_descriptor);
-///
-/// if (result != WASMER_OK) {
-///     int error_length = wasmer_last_error_length();
-///     char *error = malloc(error_length);
-///     wasmer_last_error_message(error, error_length);
-///     // Do something with `error`…
-/// }
-///
-/// // 4. Free the memory!
-/// wasmer_memory_destroy(memory);
-/// ```
-wasmer_result_t wasmer_memory_new(wasmer_memory_t **memory, wasmer_limits_t limits);
-
-/// Deserialize the given serialized module.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_module_deserialize(wasmer_module_t **module,
-                                          const wasmer_serialized_module_t *serialized_module);
-
-/// Frees memory for the given Module
-void wasmer_module_destroy(wasmer_module_t *module);
-
-/// Given:
-/// * A prepared `wasmer` import-object
-/// * A compiled wasmer module
-///
-/// Instantiates a wasmer instance
-wasmer_result_t wasmer_module_import_instantiate(wasmer_instance_t **instance,
-                                                 const wasmer_module_t *module,
-                                                 const wasmer_import_object_t *import_object);
-
-/// Creates a new Instance from the given module and imports.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_module_instantiate(const wasmer_module_t *module,
-                                          wasmer_instance_t **instance,
-                                          wasmer_import_t *imports,
-                                          int imports_len);
-
-/// Serialize the given Module.
-///
-/// The caller owns the object and should call `wasmer_serialized_module_destroy` to free it.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_module_serialize(wasmer_serialized_module_t **serialized_module,
-                                        const wasmer_module_t *module);
-
-/// Get bytes of the serialized module.
-wasmer_byte_array wasmer_serialized_module_bytes(const wasmer_serialized_module_t *serialized_module);
-
-/// Frees memory for the given serialized Module.
-void wasmer_serialized_module_destroy(wasmer_serialized_module_t *serialized_module);
-
-/// Transform a sequence of bytes into a serialized module.
-///
-/// The caller owns the object and should call `wasmer_serialized_module_destroy` to free it.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_serialized_module_from_bytes(wasmer_serialized_module_t **serialized_module,
-                                                    const uint8_t *serialized_module_bytes,
-                                                    uint32_t serialized_module_bytes_length);
-
-/// Frees memory for the given Table
-void wasmer_table_destroy(wasmer_table_t *table);
-
-/// Grows a Table by the given number of elements.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_table_grow(wasmer_table_t *table, uint32_t delta);
-
-/// Returns the current length of the given Table
-uint32_t wasmer_table_length(wasmer_table_t *table);
-
-/// Creates a new Table for the given descriptor and initializes the given
-/// pointer to pointer to a pointer to the new Table.
-///
-/// The caller owns the object and should call `wasmer_table_destroy` to free it.
-///
-/// Returns `wasmer_result_t::WASMER_OK` upon success.
-///
-/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
-/// and `wasmer_last_error_message` to get an error message.
-wasmer_result_t wasmer_table_new(wasmer_table_t **table, wasmer_limits_t limits);
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Adds a callinfo trampoline to the builder.
-///
-/// Deprecated. In a future version `DynamicFunc::new` will be exposed to the C API and should be used instead of this function.
-uintptr_t wasmer_trampoline_buffer_builder_add_callinfo_trampoline(wasmer_trampoline_buffer_builder_t *builder,
-                                                                   const wasmer_trampoline_callable_t *func,
-                                                                   const void *ctx,
-                                                                   uint32_t num_params);
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Adds a context trampoline to the builder.
-uintptr_t wasmer_trampoline_buffer_builder_add_context_trampoline(wasmer_trampoline_buffer_builder_t *builder,
-                                                                  const wasmer_trampoline_callable_t *func,
-                                                                  const void *ctx);
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Finalizes the trampoline builder into an executable buffer.
-wasmer_trampoline_buffer_t *wasmer_trampoline_buffer_builder_build(wasmer_trampoline_buffer_builder_t *builder);
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Creates a new trampoline builder.
-wasmer_trampoline_buffer_builder_t *wasmer_trampoline_buffer_builder_new();
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Destroys the trampoline buffer if not null.
-void wasmer_trampoline_buffer_destroy(wasmer_trampoline_buffer_t *buffer);
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Returns the callable pointer for the trampoline with index `idx`.
-const wasmer_trampoline_callable_t *wasmer_trampoline_buffer_get_trampoline(const wasmer_trampoline_buffer_t *buffer,
-                                                                            uintptr_t idx);
-#endif
-
-#if (!defined(_WIN32) && defined(ARCH_X86_64))
-/// Returns the context added by `add_context_trampoline`, from within the callee function.
-void *wasmer_trampoline_get_context();
-#endif
-
-/// Stop the execution of a host function, aka imported function. The
-/// function must be used _only_ inside a host function.
-///
-/// The pointer to `wasmer_instance_context_t` is received by the host
-/// function as its first argument. Just passing it to `ctx` is fine.
-///
-/// The error message must have a greater lifetime than the host
-/// function itself since the error is read outside the host function
-/// with `wasmer_last_error_message`.
-///
-/// This function returns `wasmer_result_t::WASMER_ERROR` if `ctx` or
-/// `error_message` are null.
-///
-/// This function never returns otherwise.
-wasmer_result_t wasmer_trap(const wasmer_instance_context_t *ctx, const char *error_message);
-
-/// Validates a sequence of bytes hoping it represents a valid WebAssembly module.
-///
-/// The function returns true if the bytes are valid, false otherwise.
-///
-/// Example:
-///
-/// ```c
-/// bool result = wasmer_validate(bytes, bytes_length);
-///
-/// if (false == result) {
-///     // Do something…
-/// }
-/// ```
-bool wasmer_validate(const uint8_t *wasm_bytes, uint32_t wasm_bytes_len);
-
-#if defined(WASMER_WASI_ENABLED)
-/// Convenience function that creates a WASI import object with no arguments,
-/// environment variables, preopened files, or mapped directories.
-///
-/// This function is the same as calling [`wasmer_wasi_generate_import_object`] with all
-/// empty values.
-wasmer_import_object_t *wasmer_wasi_generate_default_import_object();
-#endif
-
-#if defined(WASMER_WASI_ENABLED)
-/// Creates a WASI import object.
-///
-/// This function treats null pointers as empty collections.
-/// For example, passing null for a string in `args`, will lead to a zero
-/// length argument in that position.
-wasmer_import_object_t *wasmer_wasi_generate_import_object(const wasmer_byte_array *args,
-                                                           unsigned int args_len,
-                                                           const wasmer_byte_array *envs,
-                                                           unsigned int envs_len,
-                                                           const wasmer_byte_array *preopened_files,
-                                                           unsigned int preopened_files_len,
-                                                           const wasmer_wasi_map_dir_entry_t *mapped_dirs,
-                                                           unsigned int mapped_dirs_len);
-#endif
-
-#if defined(WASMER_WASI_ENABLED)
-/// Creates a WASI import object for a specific version.
-///
-/// This function is similar to `wasmer_wasi_generate_import_object`
-/// except that the first argument describes the WASI version.
-///
-/// The version is expected to be of kind `Version`.
-wasmer_import_object_t *wasmer_wasi_generate_import_object_for_version(unsigned char version,
-                                                                       const wasmer_byte_array *args,
-                                                                       unsigned int args_len,
-                                                                       const wasmer_byte_array *envs,
-                                                                       unsigned int envs_len,
-                                                                       const wasmer_byte_array *preopened_files,
-                                                                       unsigned int preopened_files_len,
-                                                                       const wasmer_wasi_map_dir_entry_t *mapped_dirs,
-                                                                       unsigned int mapped_dirs_len);
-#endif
-
-#if defined(WASMER_WASI_ENABLED)
-/// Find the version of WASI used by the module.
-///
-/// In case of error, the returned version is `Version::Unknown`.
-Version wasmer_wasi_get_version(const wasmer_module_t *module);
-#endif
-
-} // extern "C"
-
-#endif // WASMER_H
diff --git a/third_party/wasmer/wasmer.rs b/third_party/wasmer/wasmer.rs
index fdcb27a..c4bd6e5 100644
--- a/third_party/wasmer/wasmer.rs
+++ b/third_party/wasmer/wasmer.rs
@@ -1 +1 @@
-pub extern crate wasmer_runtime_c_api;
+pub extern crate wasmer_c_api;
diff --git a/third_party/wasmer/wasmer_wrapper.cc b/third_party/wasmer/wasmer_wrapper.cc
deleted file mode 100644
index cdfaa69..0000000
--- a/third_party/wasmer/wasmer_wrapper.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2020, 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.
-
-// Wraps several functions from wasmer.hh, so that they take and return all
-// structs by pointer, rather than by value. This is necessary because Dart FFI
-// doesn't support passing structs by value yet (once it does, we can delete
-// this wrapper).
-
-#include "wasmer.hh"
-
-extern "C" {
-// Wraps wasmer_export_name.
-void wasmer_export_name_ptr(wasmer_export_t* export_,
-                            wasmer_byte_array* out_name) {
-  *out_name = wasmer_export_name(export_);
-}
-
-// Wraps wasmer_export_descriptor_name.
-void wasmer_export_descriptor_name_ptr(
-    wasmer_export_descriptor_t* export_descriptor,
-    wasmer_byte_array* out_name) {
-  *out_name = wasmer_export_descriptor_name(export_descriptor);
-}
-
-// Wraps wasmer_import_descriptor_module_name.
-void wasmer_import_descriptor_module_name_ptr(
-    wasmer_import_descriptor_t* import_descriptor,
-    wasmer_byte_array* out_name) {
-  *out_name = wasmer_import_descriptor_module_name(import_descriptor);
-}
-
-// Wraps wasmer_import_descriptor_name.
-void wasmer_import_descriptor_name_ptr(
-    wasmer_import_descriptor_t* import_descriptor,
-    wasmer_byte_array* out_name) {
-  *out_name = wasmer_import_descriptor_name(import_descriptor);
-}
-
-// Wraps wasmer_memory_new.
-wasmer_result_t wasmer_memory_new_ptr(wasmer_memory_t** memory,
-                                      wasmer_limits_t* limits) {
-  return wasmer_memory_new(memory, *limits);
-}
-}
diff --git a/tools/VERSION b/tools/VERSION
index fd614ac..ac56f0c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 11
 PATCH 0
-PRERELEASE 208
+PRERELEASE 209
 PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart
index 7c5daf2..28de041 100644
--- a/tools/generate_package_config.dart
+++ b/tools/generate_package_config.dart
@@ -20,6 +20,9 @@
     packageDirectory('runtime/observatory'),
     packageDirectory(
         'runtime/observatory/tests/service/observatory_test_package'),
+    packageDirectory('runtime/observatory_2'),
+    packageDirectory(
+        'runtime/observatory_2/tests/service_2/observatory_test_package_2'),
     packageDirectory('sdk/lib/_internal/sdk_library_metadata'),
     packageDirectory('sdk/lib/_internal/js_runtime'),
     packageDirectory('third_party/pkg/protobuf/protobuf'),
@@ -85,12 +88,6 @@
     var version = pubspecLanguageVersion(packageDir);
     var hasLibDirectory = Directory(p.join(packageDir, 'lib')).existsSync();
 
-    // TODO(rnystrom): Currently, the pre-built SDK does not allow language
-    // version 2.9.0. Until that's fixed, if we see that version, just write
-    // no version at all so that implementations use the current language
-    // version.
-    if (version.toString() == '2.9.0') version = null;
-
     yield {
       'name': p.basename(packageDir),
       'rootUri': p