Version 2.14.0-187.0.dev

Merge commit '6d0f90ea540c2bf13fc29622f0ff9451d15d97e3' into 'dev'
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index 079d7fe..93ba1d7 100644
--- a/.dart_tool/package_config.json
+++ b/.dart_tool/package_config.json
@@ -770,12 +770,6 @@
       "languageVersion": "2.12"
     },
     {
-      "name": "wasm",
-      "rootUri": "../pkg/wasm",
-      "packageUri": "lib/",
-      "languageVersion": "2.12"
-    },
-    {
       "name": "watcher",
       "rootUri": "../third_party/pkg/watcher",
       "packageUri": "lib/",
diff --git a/.packages b/.packages
index 2a1f1af..2bd3c0a 100644
--- a/.packages
+++ b/.packages
@@ -116,7 +116,6 @@
 vm:pkg/vm/lib
 vm_service:pkg/vm_service/lib
 vm_snapshot_analysis:pkg/vm_snapshot_analysis/lib
-wasm:pkg/wasm/lib
 watcher:third_party/pkg/watcher/lib
 webdriver:third_party/pkg/webdriver/lib
 webkit_inspection_protocol:third_party/pkg/webkit_inspection_protocol/lib
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 17d2822..4d0c75a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -83,7 +83,7 @@
 
 Updated the Linter to `1.5.0`, which includes:
 
-- (internal) migrated to `SecurityLintCode` instead of deprecated 
+- (internal) migrated to `SecurityLintCode` instead of deprecated
   `SecurityLintCodeWithUniqueName`.
 - (internal) fixed `avoid_types_as_parameter_names` to skip field formal
   parameters.
@@ -186,6 +186,20 @@
     }
     ```
 
+## 2.13.2 - 2021-06-09
+
+This is a patch release that fixes:
+
+* a Dart compiler crash (issue [flutter/flutter#83094][]).
+* an analysis server deadlock causing it to stop responding to IDE requests
+  (issue [#45996][]).
+* an analyzer crash when analyzing against `package:meta` `v1.4.0` (issue
+  [#46183][]).
+
+[flutter/flutter#83094]: https://github.com/flutter/flutter/issues/83094
+[#45996]: https://github.com/dart-lang/sdk/issues/45996
+[#46183]: https://github.com/dart-lang/sdk/issues/46183
+
 ## 2.13.1 - 2021-05-25
 
 This is a patch release that fixes:
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 66c90d8..88fbe28 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -22,6 +22,7 @@
 import 'package:analysis_server/src/services/completion/dart/local_reference_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/named_constructor_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/override_contributor.dart';
+import 'package:analysis_server/src/services/completion/dart/redirecting_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/relevance_tables.g.dart';
 import 'package:analysis_server/src/services/completion/dart/static_member_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
@@ -139,6 +140,7 @@
       LocalReferenceContributor(),
       NamedConstructorContributor(),
       if (enableOverrideContributor) OverrideContributor(),
+      RedirectingContributor(),
       StaticMemberContributor(),
       TypeMemberContributor(),
       if (enableUriContributor) UriContributor(),
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/redirecting_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/redirecting_contributor.dart
new file mode 100644
index 0000000..743bc27
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/completion/dart/redirecting_contributor.dart
@@ -0,0 +1,81 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
+import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+
+/// A contributor that produces suggestions for constructors that are being
+/// redirected to. More concretely, this class produces suggestions for
+/// expressions of the form `this.^` or `super.^` in a constructor's initializer
+/// list or after an `=` in a factory constructor.
+class RedirectingContributor extends DartCompletionContributor {
+  @override
+  Future<void> computeSuggestions(
+      DartCompletionRequest request, SuggestionBuilder builder) async {
+    var entity = request.target.entity;
+    if (entity is SimpleIdentifier) {
+      var parent = entity.parent;
+      if (parent is PropertyAccess &&
+          parent.parent is ConstructorFieldInitializer) {
+        // C() : this.^
+        var containingConstructor =
+            parent.thisOrAncestorOfType<ConstructorDeclaration>();
+        var constructorElement = containingConstructor?.declaredElement;
+        var containingClass = containingConstructor
+            ?.thisOrAncestorOfType<ClassOrMixinDeclaration>();
+        var classElement = containingClass?.declaredElement;
+        if (classElement != null) {
+          for (var constructor in classElement.constructors) {
+            if (constructor != constructorElement) {
+              builder.suggestConstructor(constructor, hasClassName: true);
+            }
+          }
+        }
+      } else if (parent is SuperConstructorInvocation) {
+        // C() : super.^
+        var containingClass =
+            parent.thisOrAncestorOfType<ClassOrMixinDeclaration>();
+        var superclassElement =
+            containingClass?.declaredElement?.supertype?.element;
+        if (superclassElement != null) {
+          for (var constructor in superclassElement.constructors) {
+            if (constructor.isAccessibleIn(request.libraryElement)) {
+              builder.suggestConstructor(constructor, hasClassName: true);
+            }
+          }
+        }
+      }
+    } else if (entity is ConstructorName) {
+      var parent = entity.parent;
+      if (parent is ConstructorDeclaration &&
+          parent.redirectedConstructor == entity) {
+        // factory C() = ^
+        var containingConstructor =
+            parent.thisOrAncestorOfType<ConstructorDeclaration>();
+        var constructorElement = containingConstructor?.declaredElement;
+        var containingClass =
+            parent.thisOrAncestorOfType<ClassOrMixinDeclaration>();
+        var classElement = containingClass?.declaredElement;
+        var libraryElement = request.libraryElement;
+        if (classElement == null || libraryElement == null) {
+          return;
+        }
+        var typeSystem = libraryElement.typeSystem;
+        for (var unit in libraryElement.units) {
+          for (var type in unit.types) {
+            if (typeSystem.isSubtypeOf(type.thisType, classElement.thisType)) {
+              for (var constructor in type.constructors) {
+                if (constructor != constructorElement &&
+                    constructor.isAccessibleIn(request.libraryElement)) {
+                  builder.suggestConstructor(constructor);
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index af49455..825ff4b 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -297,10 +297,8 @@
     var map = <ProducerGenerator, Set<String>>{};
     for (var entry in FixProcessor.lintProducerMap.entries) {
       var lintName = entry.key;
-      for (var fix in entry.value) {
-        for (var generator in fix.generators) {
-          map.putIfAbsent(generator, () => <String>{}).add(lintName);
-        }
+      for (var generator in entry.value) {
+        map.putIfAbsent(generator, () => <String>{}).add(lintName);
       }
     }
     return map;
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
index 3749ff8..8e46598 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -225,23 +225,13 @@
   ) sync* {
     final errorCode = diagnostic.errorCode;
     if (errorCode is LintCode) {
-      var fixes = FixProcessor.lintProducerMap[errorCode.name] ?? [];
-      for (var fix in fixes) {
-        if (fix.canBeBulkApplied) {
-          final generators = fix.generators;
-          yield* generators.map((g) => g().fixKind).whereNotNull();
-        }
-      }
+      yield* _producableFixesFromGenerators(
+          FixProcessor.lintProducerMap[errorCode.name]);
       return;
     }
 
-    var fixes = FixProcessor.nonLintProducerMap[errorCode] ?? [];
-    for (var fix in fixes) {
-      if (fix.canBeBulkApplied) {
-        final generators = fix.generators;
-        yield* generators.map((g) => g().fixKind).whereNotNull();
-      }
-    }
+    yield* _producableFixesFromGenerators(
+        FixProcessor.nonLintProducerMap[errorCode]);
 
     final multiGenerators = nonLintMultiProducerMap[errorCode];
     if (multiGenerators != null) {
@@ -349,13 +339,12 @@
       }
     }
 
-    Future<void> bulkApply(List<FixInfo> fixes, String codeName) async {
-      for (var fix in fixes) {
-        if (fix.canBeBulkApplied) {
-          final generators = fix.generators;
-          for (var generator in generators) {
-            await generate(generator(), codeName);
-          }
+    Future<void> bulkApply(
+        List<ProducerGenerator> generators, String codeName) async {
+      for (var generator in generators) {
+        var producer = generator();
+        if (producer.canBeAppliedInBulk) {
+          await generate(producer, codeName);
         }
       }
     }
@@ -364,11 +353,11 @@
     try {
       var codeName = errorCode.name;
       if (errorCode is LintCode) {
-        var fixes = FixProcessor.lintProducerMap[errorCode.name] ?? [];
-        await bulkApply(fixes, codeName);
+        var generators = FixProcessor.lintProducerMap[errorCode.name] ?? [];
+        await bulkApply(generators, codeName);
       } else {
-        var fixes = FixProcessor.nonLintProducerMap[errorCode] ?? [];
-        await bulkApply(fixes, codeName);
+        var generators = FixProcessor.nonLintProducerMap[errorCode] ?? [];
+        await bulkApply(generators, codeName);
         var multiGenerators = nonLintMultiProducerMap[errorCode];
         if (multiGenerators != null) {
           for (var multiGenerator in multiGenerators) {
@@ -388,6 +377,22 @@
     }
   }
 
+  Iterable<FixKind> _producableFixesFromGenerators(
+      List<ProducerGenerator>? generators) sync* {
+    if (generators == null) {
+      return;
+    }
+    for (var generator in generators) {
+      var producer = generator();
+      if (producer.canBeAppliedInBulk) {
+        var fixKind = producer.fixKind;
+        if (fixKind != null) {
+          yield fixKind;
+        }
+      }
+    }
+  }
+
   /// Return the override set corresponding to the given [result], or `null` if
   /// there is no corresponding configuration file or the file content isn't a
   /// valid override set.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart b/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
index 73ca312..bc10e17 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
@@ -318,6 +318,27 @@
   /// if this producer doesn't support assists.
   AssistKind? get assistKind => null;
 
+  /// Return `true` if this producer can be used to fix diagnostics across
+  /// multiple files. Cases where this will return `false` include fixes for
+  /// which
+  /// - the modified regions can overlap, and
+  /// - fixes that have not been tested to ensure that they can be used this
+  ///   way.
+  bool get canBeAppliedInBulk => false;
+
+  /// Return `true` if this producer can be used to fix multiple diagnostics in
+  /// the same file. Cases where this will return `false` include fixes for
+  /// which
+  /// - the modified regions can overlap,
+  /// - the fix for one diagnostic would fix all diagnostics with the same code,
+  ///   and,
+  /// - fixes that have not been tested to ensure that they can be used this
+  ///   way.
+  ///
+  /// Producers that return `true` should return non-null values from both
+  /// [multiFixKind] and [multiFixArguments].
+  bool get canBeAppliedToFile => false;
+
   /// Return the length of the error message being fixed, or `null` if there is
   /// no diagnostic.
   int? get errorLength => diagnostic?.problemMessage.length;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
index 6e72eae..b04494a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
@@ -9,6 +9,12 @@
 
 class AddAwait extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_AWAIT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
index cd0bf2a..7b6965e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
@@ -10,6 +10,14 @@
 
 class AddConst extends CorrectionProducer {
   @override
+  bool canBeAppliedInBulk;
+
+  @override
+  bool canBeAppliedToFile;
+
+  AddConst(this.canBeAppliedInBulk, this.canBeAppliedToFile);
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_CONST;
 
   @override
@@ -46,5 +54,11 @@
   }
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static AddConst newInstance() => AddConst();
+  static AddConst toDeclaration() => AddConst(true, true);
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  // TODO(brianwilkerson) This fix can produce changes that are inconsistent
+  //  with the `unnecessary_const` lint. Fix it and then enable it for both
+  //  uses.
+  static AddConst toInvocation() => AddConst(false, false);
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
index 7dd8989..6c5b68c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.ADD_DIAGNOSTIC_PROPERTY_REFERENCE;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_DIAGNOSTIC_PROPERTY_REFERENCE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
index 970dedf..125d12f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
@@ -12,6 +12,12 @@
 
 class AddNeNull extends CorrectionProducerWithDiagnostic {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_NE_NULL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
index 22c6924..cecf11f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
@@ -13,6 +13,12 @@
 
 class AddOverride extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_OVERRIDE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
index 0f61891..b0ff6b9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
@@ -10,6 +10,12 @@
 
 class AddRequired extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_REQUIRED;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
index c4fcbab..394b4df 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
@@ -29,6 +29,12 @@
       : DartAssistKind.CONVERT_TO_SPREAD;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   List<Object> get fixArguments => _args;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
index e6294e5..20c7189 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
@@ -16,6 +16,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_IF_ELEMENT;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_IF_ELEMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
index f82eeca..d1a401e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
@@ -17,6 +17,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_LINE_COMMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
index 4381b83..6810483 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
@@ -19,6 +19,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_IS_NOT;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_IS_NOT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
index c6b8268..3829631 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_FOR_ELEMENT;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_FOR_ELEMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
index 67cfb7d..328ccc8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
@@ -108,6 +108,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_SINGLE_QUOTED_STRING;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
index 0ca4062..b77def6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
@@ -12,6 +12,12 @@
 
 class ConvertToContains extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_CONTAINS;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_for_loop.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_for_loop.dart
index 0481730..4abb1bf 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_for_loop.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_for_loop.dart
@@ -11,6 +11,12 @@
 
 class ConvertForEachToForLoop extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_FOR_EACH_TO_FOR_LOOP;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
index 76b0ad1..16d56cc 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
@@ -18,6 +18,12 @@
       DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_GENERIC_FUNCTION_SYNTAX;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
index 24ba7dd..6d3c100 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
@@ -12,6 +12,12 @@
 
 class ConvertToIfNull extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_IF_NULL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
index 1a9f163..824807c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
@@ -16,6 +16,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_INT_LITERAL;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_INT_LITERAL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
index 45ae0af..8d9d8d4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
@@ -17,6 +17,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_LIST_LITERAL;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_LIST_LITERAL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
index 5919c43..cbc6f18 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_MAP_LITERAL;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_MAP_LITERAL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
index da0f269..f1fe1bf 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_NULL_AWARE;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_NULL_AWARE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
index b9020ea..93e6460 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
@@ -16,6 +16,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_PACKAGE_IMPORT;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_PACKAGE_IMPORT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
index 7b97d09..7acecb5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
@@ -17,6 +17,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_RELATIVE_IMPORT;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_RELATIVE_IMPORT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
index 8796a16..158a890 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_SET_LITERAL;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_SET_LITERAL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
index de20ada..b4b93c4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
@@ -11,6 +11,12 @@
 
 class ConvertToWhereType extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.CONVERT_TO_WHERE_TYPE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
index 2edd32e..2f320ef 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
@@ -19,7 +19,13 @@
 
   String _memberName = '';
 
-  CreateMethod(this._kind);
+  @override
+  bool canBeAppliedInBulk;
+
+  @override
+  bool canBeAppliedToFile;
+
+  CreateMethod(this._kind, this.canBeAppliedInBulk, this.canBeAppliedToFile);
 
   @override
   List<Object> get fixArguments => [_memberName];
@@ -201,11 +207,12 @@
   /// (operator =) or `hashCode` method based on the existing other half of the
   /// pair. Used as a tear-off in `FixProcessor`.
   static CreateMethod equalsOrHashCode() =>
-      CreateMethod(_MethodKind.equalsOrHashCode);
+      CreateMethod(_MethodKind.equalsOrHashCode, true, true);
 
   /// Return an instance of this class that will create a method based on an
   /// invocation of an undefined method. Used as a tear-off in `FixProcessor`.
-  static CreateMethod method() => CreateMethod(_MethodKind.method);
+  static CreateMethod method() =>
+      CreateMethod(_MethodKind.method, false, false);
 }
 
 /// A representation of the kind of element that should be suggested.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart b/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
index c784ce4..8378dad 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
@@ -19,6 +19,12 @@
   AssistKind get assistKind => DartAssistKind.INLINE_INVOCATION;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   List<Object> get fixArguments => ['add'];
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart b/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
index 6272326..6e71c21 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
@@ -15,6 +15,12 @@
   String _name = '';
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   List<Object> get fixArguments => [_name];
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
index aba8e02..5d49d07 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
@@ -12,6 +12,12 @@
 
 class MakeFinal extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.MAKE_FINAL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart b/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
index 0bbe355..caca5ec 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
@@ -11,6 +11,15 @@
 
 class OrganizeImports extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  // The fix is to sort all the directives, which will already fix all of the
+  // diagnostics in the file, so there's no value in providing a separate
+  // fix-all option to the user.
+  bool get canBeAppliedToFile => false;
+
+  @override
   FixKind get fixKind => DartFixKind.ORGANIZE_IMPORTS;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
index 64c4273..3f3c939 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
@@ -12,6 +12,12 @@
 
 class RemoveArgument extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_ARGUMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
index b09bb6e..c2b61a4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
@@ -11,6 +11,12 @@
 
 class RemoveAwait extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_AWAIT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
index 0cede77..93441bb 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
@@ -21,6 +21,12 @@
 
 class RemoveUnnecessaryConst extends _RemoveConst {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_CONST;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
index c3e74d0..9f0b741 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
@@ -12,6 +12,12 @@
 
 class RemoveDuplicateCase extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_DUPLICATE_CASE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
index c2ac9e5..8ff002d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
@@ -11,6 +11,12 @@
 
 class RemoveEmptyCatch extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_CATCH;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
index c0d3aa6..7e3caca 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
@@ -11,6 +11,12 @@
 
 class RemoveEmptyConstructorBody extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_CONSTRUCTOR_BODY;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
index e45ff55..4c04ffb 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
@@ -11,6 +11,12 @@
 
 class RemoveEmptyElse extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_ELSE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
index e45057a..77fdb936 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
@@ -11,6 +11,12 @@
 
 class RemoveEmptyStatement extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_STATEMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
index 5d75e08..3607814 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
@@ -12,6 +12,12 @@
 
 class RemoveIfNullOperator extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_IF_NULL_OPERATOR;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
index ffeab97..a2fb8c5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
@@ -11,6 +11,12 @@
 
 class RemoveInitializer extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_INITIALIZER;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
index c5ed780..5194a85 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
@@ -11,6 +11,12 @@
 
 class RemoveInterpolationBraces extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_INTERPOLATION_BRACES;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
index db3ac40..6436484 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
@@ -11,6 +11,12 @@
 
 class RemoveMethodDeclaration extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_METHOD_DECLARATION;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_non_null_assertion.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_non_null_assertion.dart
index 39814eb..e420e7c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_non_null_assertion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_non_null_assertion.dart
@@ -12,6 +12,12 @@
 
 class RemoveNonNullAssertion extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_NON_NULL_ASSERTION;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
index 1b44daf..5b0c572 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
@@ -11,6 +11,12 @@
 
 class RemoveOperator extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_OPERATOR;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
index 7039b72..945b3b6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
@@ -11,6 +11,12 @@
 
 class RemoveQuestionMark extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_QUESTION_MARK;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_returned_value.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_returned_value.dart
index cf69624..9de0538 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_returned_value.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_returned_value.dart
@@ -11,6 +11,12 @@
 
 class RemoveReturnedValue extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_RETURNED_VALUE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
index c9c41ae..c19ced4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
@@ -11,6 +11,12 @@
 
 class RemoveThisExpression extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_THIS_EXPRESSION;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
index 34b84f4..257390f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
@@ -17,6 +17,12 @@
   AssistKind get assistKind => DartAssistKind.REMOVE_TYPE_ANNOTATION;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_TYPE_ANNOTATION;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
index b326680..4763735 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
@@ -11,6 +11,12 @@
 
 class RemoveUnnecessaryCast extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_CAST;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
index d4a1b0b..9fbb010 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
@@ -11,6 +11,12 @@
 
 class RemoveUnnecessaryNew extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_NEW;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
index 7baa9e0..9575e00 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
@@ -11,6 +11,12 @@
 
 class RemoveUnnecessaryParentheses extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_PARENTHESES;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_string_interpolation.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_string_interpolation.dart
index 6651bf4..02394bf 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_string_interpolation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_string_interpolation.dart
@@ -12,6 +12,12 @@
 
 class RemoveUnnecessaryStringInterpolation extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_STRING_INTERPOLATION;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
index 3fa7457..655a778 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
@@ -11,6 +11,12 @@
 
 class RemoveUnusedImport extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_IMPORT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart b/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
index 752dd51..c42e69b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
@@ -17,6 +17,12 @@
   String _newName = '';
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   List<Object> get fixArguments => [_newName];
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
index c35c13f..bc3a361 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
@@ -11,6 +11,12 @@
 
 class ReplaceBooleanWithBool extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_BOOLEAN_WITH_BOOL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart
index 3a7b269..7760419 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart
@@ -22,6 +22,12 @@
   };
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_CASCADE_WITH_DOT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
index f6adef4..511d045 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
@@ -11,6 +11,12 @@
 
 class ReplaceColonWithEquals extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_COLON_WITH_EQUALS;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
index 76b2a8e..4ba1c22 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
@@ -11,6 +11,12 @@
 
 class ReplaceFinalWithConst extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_FINAL_WITH_CONST;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_var.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_var.dart
index 9371a8d..ae69609 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_var.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_var.dart
@@ -11,6 +11,12 @@
 
 class ReplaceFinalWithVar extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_FINAL_WITH_VAR;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
index fda7453..2828c1c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
@@ -11,6 +11,15 @@
 
 class ReplaceNewWithConst extends CorrectionProducer {
   @override
+  // TODO(brianwilkerson) This fix can produce changes that are inconsistent
+  //  with the `unnecessary_const` lint. Fix it and then enable it for both
+  //  uses.
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => false;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_NEW_WITH_CONST;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
index 9da2766..47c2e81 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
@@ -13,6 +13,12 @@
 
 class ReplaceNullWithClosure extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_NULL_WITH_CLOSURE;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
index eb4fc02..49ff4a0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
@@ -11,6 +11,12 @@
 
 class ReplaceWithBrackets extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_WITH_BRACKETS;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
index acdd6a4..4574077 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
@@ -11,6 +11,12 @@
 
 class ReplaceWithConditionalAssignment extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
index 9b30817..665f8e6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
@@ -11,6 +11,12 @@
 
 class ReplaceWithIdentifier extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_WITH_IDENTIFIER;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
index 96b25d6..4ce36fe 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
@@ -18,6 +18,12 @@
   FixKind multiFixKind = DartFixKind.REPLACE_WITH_IS_EMPTY_MULTI;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   Future<void> compute(ChangeBuilder builder) async {
     var binary = node.thisOrAncestorOfType<BinaryExpression>();
     if (binary == null) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart
index 7998030..2dad480 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart
@@ -15,6 +15,12 @@
   String _newOperator = '';
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   List<Object> get fixArguments => [_newOperator];
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
index 14d77c2..8f0f19b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
@@ -11,6 +11,12 @@
 
 class ReplaceWithTearOff extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_WITH_TEAR_OFF;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
index 1c6da82..b1236c9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
@@ -17,6 +17,12 @@
   AssistKind get assistKind => DartAssistKind.REPLACE_WITH_VAR;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.REPLACE_WITH_VAR;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart b/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
index e2cc444..06ed486 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
@@ -18,6 +18,12 @@
   AssistKind get assistKind => DartAssistKind.SORT_CHILD_PROPERTY_LAST;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.SORT_CHILD_PROPERTY_LAST;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
index b414e48..cdf82a9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
@@ -16,6 +16,12 @@
   AssistKind get assistKind => DartAssistKind.USE_CURLY_BRACES;
 
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.ADD_CURLY_BRACES;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
index 86ad614..ff863ed 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
@@ -11,6 +11,12 @@
 
 class UseEqEqNull extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.USE_EQ_EQ_NULL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
index 8b06bc9..f3dffff 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
@@ -12,6 +12,12 @@
 
 class UseIsNotEmpty extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.USE_IS_NOT_EMPTY;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
index e53bc02..3ae6b45 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
@@ -11,6 +11,12 @@
 
 class UseNotEqNull extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => false;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.USE_NOT_EQ_NULL;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
index 9ebe4dc..63add29 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
@@ -11,6 +11,12 @@
 
 class UseRethrow extends CorrectionProducer {
   @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
   FixKind get fixKind => DartFixKind.USE_RETHROW;
 
   @override
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 0ecd309..f56ee49 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -224,26 +224,28 @@
 
     var fixes = <Fix>[];
     for (var generator in generators) {
-      _FixState fixState = _EmptyFixState(
-        ChangeBuilder(workspace: workspace),
-      );
-      for (var error in errors) {
-        var fixContext = DartFixContextImpl(
-          instrumentationService,
-          workspace,
-          resolveResult,
-          error,
-          (name) => [],
-          extensionCache: context.extensionCache,
+      if (generator().canBeAppliedToFile) {
+        _FixState fixState = _EmptyFixState(
+          ChangeBuilder(workspace: workspace),
         );
-        fixState = await _fixError(fixContext, fixState, generator(), error);
-      }
-      if (fixState is _NotEmptyFixState) {
-        var sourceChange = fixState.builder.sourceChange;
-        if (sourceChange.edits.isNotEmpty && fixState.fixCount > 1) {
-          var fixKind = fixState.fixKind;
-          sourceChange.message = fixKind.message;
-          fixes.add(Fix(fixKind, sourceChange));
+        for (var error in errors) {
+          var fixContext = DartFixContextImpl(
+            instrumentationService,
+            workspace,
+            resolveResult,
+            error,
+            (name) => [],
+            extensionCache: context.extensionCache,
+          );
+          fixState = await _fixError(fixContext, fixState, generator(), error);
+        }
+        if (fixState is _NotEmptyFixState) {
+          var sourceChange = fixState.builder.sourceChange;
+          if (sourceChange.edits.isNotEmpty && fixState.fixCount > 1) {
+            var fixKind = fixState.fixKind;
+            sourceChange.message = fixKind.message;
+            fixes.add(Fix(fixKind, sourceChange));
+          }
         }
       }
     }
@@ -292,758 +294,266 @@
 
   List<ProducerGenerator> _getGenerators(
       ErrorCode errorCode, CorrectionProducerContext context) {
-    var producers = <ProducerGenerator>[];
     if (errorCode is LintCode) {
-      var fixInfos = FixProcessor.lintProducerMap[errorCode.name] ?? [];
-      for (var fixInfo in fixInfos) {
-        if (fixInfo.canBeAppliedToFile) {
-          producers.addAll(fixInfo.generators);
-        }
-      }
+      return FixProcessor.lintProducerMap[errorCode.name] ?? [];
     } else {
-      var fixInfos = FixProcessor.nonLintProducerMap[errorCode] ?? [];
-      for (var fixInfo in fixInfos) {
-        if (fixInfo.canBeAppliedToFile) {
-          producers.addAll(fixInfo.generators);
-        }
-      }
       // todo (pq): consider support for multiGenerators
+      return FixProcessor.nonLintProducerMap[errorCode] ?? [];
     }
-    return producers;
   }
 }
 
-class FixInfo {
-  final bool canBeAppliedToFile;
-
-  final bool canBeBulkApplied;
-
-  final List<ProducerGenerator> generators;
-
-  const FixInfo({
-    required this.canBeAppliedToFile,
-    required this.canBeBulkApplied,
-    required this.generators,
-  });
-
-  const FixInfo.single(this.generators)
-      : canBeAppliedToFile = false,
-        canBeBulkApplied = false;
-}
-
 /// The computer for Dart fixes.
 class FixProcessor extends BaseProcessor {
-  /// A map from the names of lint rules to a list of generators used to create
-  /// the correction producers used to build fixes for those diagnostics. The
-  /// generators used for non-lint diagnostics are in the [nonLintProducerMap].
-  static const Map<String, List<FixInfo>> lintProducerMap = {
+  /// A map from the names of lint rules to a list of the generators that are
+  /// used to create correction producers. The generators are then used to build
+  /// fixes for those diagnostics. The generators used for non-lint diagnostics
+  /// are in the [nonLintProducerMap].
+  static const Map<String, List<ProducerGenerator>> lintProducerMap = {
     LintNames.always_declare_return_types: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          AddReturnType.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      AddReturnType.newInstance,
     ],
     LintNames.always_require_non_null_named_parameters: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          AddRequired.newInstance,
-        ],
-      )
+      AddRequired.newInstance,
     ],
     LintNames.always_specify_types: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          AddTypeAnnotation.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      AddTypeAnnotation.newInstance,
     ],
     LintNames.annotate_overrides: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          AddOverride.newInstance,
-        ],
-      )
+      AddOverride.newInstance,
     ],
     LintNames.avoid_annotating_with_dynamic: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveTypeAnnotation.newInstance,
-        ],
-      )
+      RemoveTypeAnnotation.newInstance,
     ],
     LintNames.avoid_empty_else: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveEmptyElse.newInstance,
-        ],
-      )
+      RemoveEmptyElse.newInstance,
     ],
     LintNames.avoid_function_literals_in_foreach_calls: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertForEachToForLoop.newInstance,
-        ],
-      )
+      ConvertForEachToForLoop.newInstance,
     ],
     LintNames.avoid_init_to_null: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveInitializer.newInstance,
-        ],
-      )
+      RemoveInitializer.newInstance,
     ],
     LintNames.avoid_private_typedef_functions: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          InlineTypedef.newInstance,
-        ],
-      )
+      InlineTypedef.newInstance,
     ],
     LintNames.avoid_redundant_argument_values: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveArgument.newInstance,
-        ],
-      )
+      RemoveArgument.newInstance,
     ],
     LintNames.avoid_relative_lib_imports: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToPackageImport.newInstance,
-        ],
-      )
+      ConvertToPackageImport.newInstance,
     ],
     LintNames.avoid_return_types_on_setters: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveTypeAnnotation.newInstance,
-        ],
-      )
+      RemoveTypeAnnotation.newInstance,
     ],
     LintNames.avoid_returning_null_for_future: [
-      FixInfo(
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          AddAsync.newInstance,
-          WrapInFuture.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      AddAsync.newInstance,
+      WrapInFuture.newInstance,
     ],
     LintNames.avoid_returning_null_for_void: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveReturnedValue.newInstance,
-        ],
-      )
+      RemoveReturnedValue.newInstance,
     ],
     LintNames.avoid_single_cascade_in_expression_statements: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          // TODO(brianwilkerson) This fix should be applied to some non-lint
-          //  diagnostics and should also be available as an assist.
-          ReplaceCascadeWithDot.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) This fix should be applied to some non-lint
+      //  diagnostics and should also be available as an assist.
+      ReplaceCascadeWithDot.newInstance,
     ],
     LintNames.avoid_types_as_parameter_names: [
-      FixInfo(
-        canBeAppliedToFile: false,
-        canBeBulkApplied: false,
-        generators: [
-          ConvertToOnType.newInstance,
-        ],
-      )
+      ConvertToOnType.newInstance,
     ],
     LintNames.avoid_types_on_closure_parameters: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithIdentifier.newInstance,
-          RemoveTypeAnnotation.newInstance,
-        ],
-      )
+      ReplaceWithIdentifier.newInstance,
+      RemoveTypeAnnotation.newInstance,
     ],
     LintNames.avoid_unused_constructor_parameters: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        canBeBulkApplied: false,
-        generators: [
-          RemoveUnusedParameter.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      RemoveUnusedParameter.newInstance,
     ],
     LintNames.await_only_futures: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveAwait.newInstance,
-        ],
-      )
+      RemoveAwait.newInstance,
     ],
     LintNames.curly_braces_in_flow_control_structures: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          UseCurlyBraces.newInstance,
-        ],
-      )
+      UseCurlyBraces.newInstance,
     ],
     LintNames.diagnostic_describe_all_properties: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          AddDiagnosticPropertyReference.newInstance,
-        ],
-      )
+      AddDiagnosticPropertyReference.newInstance,
     ],
     LintNames.directives_ordering: [
-      FixInfo(
-        canBeAppliedToFile: false, // Fix will sort all directives.
-        canBeBulkApplied: true,
-        generators: [
-          OrganizeImports.newInstance,
-        ],
-      )
+      OrganizeImports.newInstance,
     ],
     LintNames.empty_catches: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveEmptyCatch.newInstance,
-        ],
-      )
+      RemoveEmptyCatch.newInstance,
     ],
     LintNames.empty_constructor_bodies: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveEmptyConstructorBody.newInstance,
-        ],
-      )
+      RemoveEmptyConstructorBody.newInstance,
     ],
     LintNames.empty_statements: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveEmptyStatement.newInstance,
-          ReplaceWithBrackets.newInstance,
-        ],
-      )
+      RemoveEmptyStatement.newInstance,
+      ReplaceWithBrackets.newInstance,
     ],
     LintNames.hash_and_equals: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          CreateMethod.equalsOrHashCode,
-        ],
-      )
+      CreateMethod.equalsOrHashCode,
     ],
     LintNames.no_duplicate_case_values: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveDuplicateCase.newInstance,
-        ],
-      )
+      RemoveDuplicateCase.newInstance,
     ],
     LintNames.non_constant_identifier_names: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RenameToCamelCase.newInstance,
-        ],
-      )
+      RenameToCamelCase.newInstance,
     ],
     LintNames.null_closures: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceNullWithClosure.newInstance,
-        ],
-      )
+      ReplaceNullWithClosure.newInstance,
     ],
     LintNames.omit_local_variable_types: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithVar.newInstance,
-        ],
-      )
+      ReplaceWithVar.newInstance,
     ],
     LintNames.prefer_adjacent_string_concatenation: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveOperator.newInstance,
-        ],
-      )
+      RemoveOperator.newInstance,
     ],
     LintNames.prefer_collection_literals: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToListLiteral.newInstance,
-          ConvertToMapLiteral.newInstance,
-          ConvertToSetLiteral.newInstance,
-        ],
-      )
+      ConvertToListLiteral.newInstance,
+      ConvertToMapLiteral.newInstance,
+      ConvertToSetLiteral.newInstance,
     ],
     LintNames.prefer_conditional_assignment: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithConditionalAssignment.newInstance,
-        ],
-      )
+      ReplaceWithConditionalAssignment.newInstance,
     ],
     LintNames.prefer_const_constructors: [
-      FixInfo(
-        canBeAppliedToFile: false,
-        // Can produce results incompatible w/ `unnecessary_const`
-        canBeBulkApplied: false,
-        generators: [
-          AddConst.newInstance,
-          ReplaceNewWithConst.newInstance,
-        ],
-      )
+      AddConst.toInvocation,
+      ReplaceNewWithConst.newInstance,
     ],
     LintNames.prefer_const_constructors_in_immutables: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          AddConst.newInstance,
-        ],
-      )
+      AddConst.toDeclaration,
     ],
     LintNames.prefer_const_declarations: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceFinalWithConst.newInstance,
-        ],
-      )
+      ReplaceFinalWithConst.newInstance,
     ],
     LintNames.prefer_contains: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToContains.newInstance,
-        ],
-      )
+      ConvertToContains.newInstance,
     ],
     LintNames.prefer_equal_for_default_values: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceColonWithEquals.newInstance,
-        ],
-      )
+      ReplaceColonWithEquals.newInstance,
     ],
     LintNames.prefer_expression_function_bodies: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          ConvertToExpressionFunctionBody.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      ConvertToExpressionFunctionBody.newInstance,
     ],
     LintNames.prefer_final_fields: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          MakeFinal.newInstance,
-        ],
-      )
+      MakeFinal.newInstance,
     ],
     LintNames.prefer_final_in_for_each: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          MakeFinal.newInstance,
-        ],
-      )
+      MakeFinal.newInstance,
     ],
     LintNames.prefer_final_locals: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          MakeFinal.newInstance,
-        ],
-      )
+      MakeFinal.newInstance,
     ],
     LintNames.prefer_for_elements_to_map_fromIterable: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertMapFromIterableToForLiteral.newInstance,
-        ],
-      )
+      ConvertMapFromIterableToForLiteral.newInstance,
     ],
     LintNames.prefer_generic_function_type_aliases: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToGenericFunctionSyntax.newInstance,
-        ],
-      )
+      ConvertToGenericFunctionSyntax.newInstance,
     ],
     LintNames.prefer_if_elements_to_conditional_expressions: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertConditionalExpressionToIfElement.newInstance,
-        ],
-      )
+      ConvertConditionalExpressionToIfElement.newInstance,
     ],
     LintNames.prefer_is_empty: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithIsEmpty.newInstance,
-        ],
-      )
+      ReplaceWithIsEmpty.newInstance,
     ],
     LintNames.prefer_is_not_empty: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          UseIsNotEmpty.newInstance,
-        ],
-      )
+      UseIsNotEmpty.newInstance,
     ],
     LintNames.prefer_if_null_operators: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToIfNull.newInstance,
-        ],
-      )
+      ConvertToIfNull.newInstance,
     ],
     LintNames.prefer_inlined_adds: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertAddAllToSpread.newInstance,
-          InlineInvocation.newInstance,
-        ],
-      )
+      ConvertAddAllToSpread.newInstance,
+      InlineInvocation.newInstance,
     ],
     LintNames.prefer_int_literals: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToIntLiteral.newInstance,
-        ],
-      )
+      ConvertToIntLiteral.newInstance,
     ],
     LintNames.prefer_interpolation_to_compose_strings: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          ReplaceWithInterpolation.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      ReplaceWithInterpolation.newInstance,
     ],
     LintNames.prefer_is_not_operator: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertIntoIsNot.newInstance,
-        ],
-      )
+      ConvertIntoIsNot.newInstance,
     ],
     LintNames.prefer_iterable_whereType: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToWhereType.newInstance,
-        ],
-      )
+      ConvertToWhereType.newInstance,
     ],
     LintNames.prefer_null_aware_operators: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToNullAware.newInstance,
-        ],
-      )
+      ConvertToNullAware.newInstance,
     ],
     LintNames.prefer_relative_imports: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToRelativeImport.newInstance,
-        ],
-      )
+      ConvertToRelativeImport.newInstance,
     ],
     LintNames.prefer_single_quotes: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToSingleQuotes.newInstance,
-        ],
-      )
+      ConvertToSingleQuotes.newInstance,
     ],
     LintNames.prefer_spread_collections: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertAddAllToSpread.newInstance,
-        ],
-      )
+      ConvertAddAllToSpread.newInstance,
     ],
     LintNames.slash_for_doc_comments: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertDocumentationIntoLine.newInstance,
-        ],
-      )
+      ConvertDocumentationIntoLine.newInstance,
     ],
     LintNames.sort_child_properties_last: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          SortChildPropertyLast.newInstance,
-        ],
-      )
+      SortChildPropertyLast.newInstance,
     ],
     LintNames.type_annotate_public_apis: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          AddTypeAnnotation.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      AddTypeAnnotation.newInstance,
     ],
     LintNames.type_init_formals: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveTypeAnnotation.newInstance,
-        ],
-      )
+      RemoveTypeAnnotation.newInstance,
     ],
     LintNames.unawaited_futures: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          AddAwait.newInstance,
-        ],
-      )
+      AddAwait.newInstance,
     ],
     LintNames.unnecessary_brace_in_string_interps: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveInterpolationBraces.newInstance,
-        ],
-      )
+      RemoveInterpolationBraces.newInstance,
     ],
     LintNames.unnecessary_const: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveUnnecessaryConst.newInstance,
-        ],
-      )
+      RemoveUnnecessaryConst.newInstance,
     ],
     LintNames.unnecessary_final: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceFinalWithVar.newInstance,
-        ],
-      )
+      ReplaceFinalWithVar.newInstance,
     ],
     LintNames.unnecessary_lambdas: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithTearOff.newInstance,
-        ],
-      )
+      ReplaceWithTearOff.newInstance,
     ],
     LintNames.unnecessary_new: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveUnnecessaryNew.newInstance,
-        ],
-      )
+      RemoveUnnecessaryNew.newInstance,
     ],
     LintNames.unnecessary_null_in_if_null_operators: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveIfNullOperator.newInstance,
-        ],
-      )
+      RemoveIfNullOperator.newInstance,
     ],
     LintNames.unnecessary_nullable_for_final_variable_declarations: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveQuestionMark.newInstance,
-        ],
-      )
+      RemoveQuestionMark.newInstance,
     ],
     LintNames.unnecessary_overrides: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveMethodDeclaration.newInstance,
-        ],
-      )
+      RemoveMethodDeclaration.newInstance,
     ],
     LintNames.unnecessary_parenthesis: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveUnnecessaryParentheses.newInstance,
-        ],
-      )
+      RemoveUnnecessaryParentheses.newInstance,
     ],
     LintNames.unnecessary_string_interpolations: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveUnnecessaryStringInterpolation.newInstance,
-        ],
-      )
+      RemoveUnnecessaryStringInterpolation.newInstance,
     ],
     LintNames.unnecessary_this: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveThisExpression.newInstance,
-        ],
-      )
+      RemoveThisExpression.newInstance,
     ],
     LintNames.use_full_hex_values_for_flutter_colors: [
-      FixInfo(
-        // todo (pq): enable when tested
-        canBeAppliedToFile: false,
-        // not currently supported; TODO(pq): consider adding
-        canBeBulkApplied: false,
-        generators: [
-          ReplaceWithEightDigitHex.newInstance,
-        ],
-      )
+      // TODO(brianwilkerson) Consider applying in bulk.
+      ReplaceWithEightDigitHex.newInstance,
     ],
     LintNames.use_function_type_syntax_for_parameters: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ConvertToGenericFunctionSyntax.newInstance,
-        ],
-      )
+      ConvertToGenericFunctionSyntax.newInstance,
     ],
     LintNames.use_rethrow_when_possible: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          UseRethrow.newInstance,
-        ],
-      )
+      UseRethrow.newInstance,
     ],
   };
 
@@ -1187,471 +697,442 @@
     ],
   };
 
-  /// A map from error codes to a list of generators used to create the
-  /// correction producers used to build fixes for those diagnostics. The
-  /// generators used for lint rules are in the [lintProducerMap].
-  static const Map<ErrorCode, List<FixInfo>> nonLintProducerMap = {
+  /// A map from error codes to a list of the generators that are used to create
+  /// correction producers. The generators are then used to build fixes for
+  /// those diagnostics. The generators used for lint rules are in the
+  /// [lintProducerMap].
+  static const Map<ErrorCode, List<ProducerGenerator>> nonLintProducerMap = {
     CompileTimeErrorCode.ASSIGNMENT_TO_FINAL: [
-      FixInfo.single([MakeFieldNotFinal.newInstance]),
-      FixInfo.single([AddLate.newInstance]),
+      MakeFieldNotFinal.newInstance,
+      AddLate.newInstance,
     ],
     CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL: [
-      FixInfo.single([MakeVariableNotFinal.newInstance]),
+      MakeVariableNotFinal.newInstance,
     ],
     CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE: [
-      FixInfo.single([AddNullCheck.newInstance]),
-      FixInfo.single([WrapInText.newInstance]),
+      AddNullCheck.newInstance,
+      WrapInText.newInstance,
     ],
     CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT: [
-      FixInfo.single([AddAsync.newInstance]),
+      AddAsync.newInstance,
     ],
     CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT: [
-      FixInfo.single([AddAsync.newInstance]),
+      AddAsync.newInstance,
     ],
     CompileTimeErrorCode.BODY_MIGHT_COMPLETE_NORMALLY: [
-      FixInfo.single([AddAsync.missingReturn]),
+      AddAsync.missingReturn,
     ],
     CompileTimeErrorCode.CAST_TO_NON_TYPE: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER: [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE: [
-      FixInfo.single([UseConst.newInstance]),
+      UseConst.newInstance,
     ],
     CompileTimeErrorCode.CONST_INSTANCE_FIELD: [
-      FixInfo.single([AddStatic.newInstance]),
+      AddStatic.newInstance,
     ],
     CompileTimeErrorCode.CONST_WITH_NON_CONST: [
-      FixInfo.single([RemoveConst.newInstance]),
+      RemoveConst.newInstance,
     ],
     CompileTimeErrorCode.DEFAULT_LIST_CONSTRUCTOR: [
-      FixInfo.single([ReplaceWithFilled.newInstance]),
+      ReplaceWithFilled.newInstance,
     ],
     CompileTimeErrorCode.CONST_WITH_NON_TYPE: [
-      FixInfo.single([ChangeTo.classOrMixin]),
+      ChangeTo.classOrMixin,
     ],
     CompileTimeErrorCode.EXTENDS_NON_CLASS: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
     ],
     CompileTimeErrorCode.EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER: [
-      FixInfo.single([ReplaceWithExtensionName.newInstance]),
+      ReplaceWithExtensionName.newInstance,
     ],
     CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS: [
-      FixInfo.single([CreateConstructor.newInstance]),
+      CreateConstructor.newInstance,
     ],
     CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED: [
-      FixInfo.single([CreateConstructor.newInstance]),
-      FixInfo.single([ConvertToNamedArguments.newInstance]),
+      CreateConstructor.newInstance,
+      ConvertToNamedArguments.newInstance,
     ],
     CompileTimeErrorCode.FINAL_NOT_INITIALIZED: [
-      FixInfo.single([AddLate.newInstance]),
-      FixInfo.single([CreateConstructorForFinalFields.newInstance]),
+      AddLate.newInstance,
+      CreateConstructorForFinalFields.newInstance,
     ],
     CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1: [
-      FixInfo.single([AddFieldFormalParameters.newInstance]),
+      AddFieldFormalParameters.newInstance,
     ],
     CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2: [
-      FixInfo.single([AddFieldFormalParameters.newInstance]),
+      AddFieldFormalParameters.newInstance,
     ],
     CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS: [
-      FixInfo.single([AddFieldFormalParameters.newInstance]),
+      AddFieldFormalParameters.newInstance,
     ],
     CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE: [
-      FixInfo.single([ReplaceReturnTypeFuture.newInstance]),
+      ReplaceReturnTypeFuture.newInstance,
     ],
     CompileTimeErrorCode.IMPLEMENTS_NON_CLASS: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
     ],
     CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD: [
-      FixInfo.single([CreateField.newInstance]),
+      CreateField.newInstance,
     ],
     CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER: [
-      FixInfo.single([ChangeToStaticAccess.newInstance]),
+      ChangeToStaticAccess.newInstance,
     ],
     CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE: [
-      FixInfo.single([ChangeToNearestPreciseValue.newInstance]),
+      ChangeToNearestPreciseValue.newInstance,
     ],
     CompileTimeErrorCode.INVALID_ANNOTATION: [
-      FixInfo.single([ChangeTo.annotation]),
-      FixInfo.single([CreateClass.newInstance]),
+      ChangeTo.annotation,
+      CreateClass.newInstance,
     ],
     CompileTimeErrorCode.INVALID_ASSIGNMENT: [
-      FixInfo.single([AddExplicitCast.newInstance]),
-      FixInfo.single([AddNullCheck.newInstance]),
-      FixInfo.single([ChangeTypeAnnotation.newInstance]),
-      FixInfo.single([MakeVariableNullable.newInstance]),
+      AddExplicitCast.newInstance,
+      AddNullCheck.newInstance,
+      ChangeTypeAnnotation.newInstance,
+      MakeVariableNullable.newInstance,
     ],
     CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION: [
-      FixInfo.single([RemoveParenthesesInGetterInvocation.newInstance]),
+      RemoveParenthesesInGetterInvocation.newInstance,
     ],
     CompileTimeErrorCode.MISSING_DEFAULT_VALUE_FOR_PARAMETER: [
-      FixInfo.single([AddRequiredKeyword.newInstance]),
-      FixInfo.single([MakeVariableNullable.newInstance]),
+      AddRequiredKeyword.newInstance,
+      MakeVariableNullable.newInstance,
     ],
     CompileTimeErrorCode.MISSING_REQUIRED_ARGUMENT: [
-      FixInfo.single([AddMissingRequiredArgument.newInstance]),
+      AddMissingRequiredArgument.newInstance,
     ],
     CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE: [
-      FixInfo.single([ExtendClassForMixin.newInstance]),
+      ExtendClassForMixin.newInstance,
     ],
     CompileTimeErrorCode.MIXIN_OF_NON_CLASS: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
     ],
     CompileTimeErrorCode.NEW_WITH_NON_TYPE: [
-      FixInfo.single([ChangeTo.classOrMixin]),
+      ChangeTo.classOrMixin,
     ],
     CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR: [
-      FixInfo.single([CreateConstructor.newInstance]),
+      CreateConstructor.newInstance,
     ],
     CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS:
         [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR: [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE: [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE: [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO: [
-      FixInfo.single([CreateMissingOverrides.newInstance]),
-      FixInfo.single([CreateNoSuchMethod.newInstance]),
-      FixInfo.single([MakeClassAbstract.newInstance]),
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.NON_BOOL_CONDITION: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          AddNeNull.newInstance,
-        ],
-      ),
+      AddNeNull.newInstance,
     ],
     CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT: [
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.NOT_A_TYPE: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD: [
-      FixInfo.single([AddLate.newInstance]),
+      AddLate.newInstance,
     ],
     CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE: [
-      FixInfo.single([RemoveQuestionMark.newInstance]),
+      RemoveQuestionMark.newInstance,
     ],
     CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE: [
-      FixInfo.single([RemoveQuestionMark.newInstance]),
+      RemoveQuestionMark.newInstance,
     ],
     CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE: [
-      FixInfo.single([RemoveQuestionMark.newInstance]),
+      RemoveQuestionMark.newInstance,
     ],
     CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE: [
-      FixInfo.single([RemoveQuestionMark.newInstance]),
+      RemoveQuestionMark.newInstance,
     ],
     CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION: [
-      FixInfo.single([MakeReturnTypeNullable.newInstance]),
+      MakeReturnTypeNullable.newInstance,
     ],
     CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD: [
-      FixInfo.single([MakeReturnTypeNullable.newInstance]),
+      MakeReturnTypeNullable.newInstance,
     ],
     CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_INVOCATION_OF_NULLABLE_VALUE: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD: [
-      FixInfo.single([AddNullCheck.newInstance]),
-      FixInfo.single([ConvertToNullAwareSpread.newInstance]),
+      AddNullCheck.newInstance,
+      ConvertToNullAwareSpread.newInstance,
     ],
     CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH: [
-      FixInfo.single([AddNullCheck.newInstance]),
+      AddNullCheck.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_ANNOTATION: [
-      FixInfo.single([ChangeTo.annotation]),
-      FixInfo.single([CreateClass.newInstance]),
+      ChangeTo.annotation,
+      CreateClass.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_CLASS: [
-      FixInfo.single([ChangeTo.classOrMixin]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          ReplaceBooleanWithBool.newInstance,
-        ],
-      ),
+      ReplaceBooleanWithBool.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_EXTENSION_GETTER: [
-      FixInfo.single([ChangeTo.getterOrSetter]),
-      FixInfo.single([CreateGetter.newInstance]),
+      ChangeTo.getterOrSetter,
+      CreateGetter.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_EXTENSION_METHOD: [
-      FixInfo.single([ChangeTo.method]),
-      FixInfo.single([CreateMethod.method]),
+      ChangeTo.method,
+      CreateMethod.method,
     ],
     CompileTimeErrorCode.UNDEFINED_EXTENSION_SETTER: [
-      FixInfo.single([ChangeTo.getterOrSetter]),
-      FixInfo.single([CreateSetter.newInstance]),
+      ChangeTo.getterOrSetter,
+      CreateSetter.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_FUNCTION: [
-      FixInfo.single([ChangeTo.function]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateFunction.newInstance]),
+      ChangeTo.function,
+      CreateClass.newInstance,
+      CreateFunction.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_GETTER: [
-      FixInfo.single([ChangeTo.getterOrSetter]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateField.newInstance]),
-      FixInfo.single([CreateGetter.newInstance]),
-      FixInfo.single([CreateLocalVariable.newInstance]),
-      FixInfo.single([CreateMethodOrFunction.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
+      ChangeTo.getterOrSetter,
+      CreateClass.newInstance,
+      CreateField.newInstance,
+      CreateGetter.newInstance,
+      CreateLocalVariable.newInstance,
+      CreateMethodOrFunction.newInstance,
+      CreateMixin.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_IDENTIFIER: [
-      FixInfo.single([ChangeTo.getterOrSetter]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateField.newInstance]),
-      FixInfo.single([CreateGetter.newInstance]),
-      FixInfo.single([CreateLocalVariable.newInstance]),
-      FixInfo.single([CreateMethodOrFunction.newInstance]),
-      FixInfo.single([CreateMixin.newInstance]),
-      FixInfo.single([CreateSetter.newInstance]),
+      ChangeTo.getterOrSetter,
+      CreateClass.newInstance,
+      CreateField.newInstance,
+      CreateGetter.newInstance,
+      CreateLocalVariable.newInstance,
+      CreateMethodOrFunction.newInstance,
+      CreateMixin.newInstance,
+      CreateSetter.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT: [
-      FixInfo.single([AddAsync.newInstance]),
+      AddAsync.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_METHOD: [
-      FixInfo.single([ChangeTo.method]),
-      FixInfo.single([CreateClass.newInstance]),
-      FixInfo.single([CreateFunction.newInstance]),
-      FixInfo.single([CreateMethod.method]),
+      ChangeTo.method,
+      CreateClass.newInstance,
+      CreateFunction.newInstance,
+      CreateMethod.method,
     ],
     CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER: [
-      FixInfo.single([AddMissingParameterNamed.newInstance]),
-      FixInfo.single([ConvertFlutterChild.newInstance]),
-      FixInfo.single([ConvertFlutterChildren.newInstance]),
+      AddMissingParameterNamed.newInstance,
+      ConvertFlutterChild.newInstance,
+      ConvertFlutterChildren.newInstance,
     ],
     CompileTimeErrorCode.UNDEFINED_SETTER: [
-      FixInfo.single([ChangeTo.getterOrSetter]),
-      FixInfo.single([CreateField.newInstance]),
-      FixInfo.single([CreateSetter.newInstance]),
+      ChangeTo.getterOrSetter,
+      CreateField.newInstance,
+      CreateSetter.newInstance,
     ],
     CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER: [
       // TODO(brianwilkerson) Consider adding fixes to create a field, getter,
       //  method or setter. The existing _addFix methods would need to be
       //  updated so that only the appropriate subset is generated.
-      FixInfo.single([QualifyReference.newInstance]),
+      QualifyReference.newInstance,
     ],
     CompileTimeErrorCode
         .UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE: [
       // TODO(brianwilkerson) Consider adding fixes to create a field, getter,
       //  method or setter. The existing producers would need to be updated so
       //  that only the appropriate subset is generated.
-      FixInfo.single([QualifyReference.newInstance]),
+      QualifyReference.newInstance,
     ],
     CompileTimeErrorCode.URI_DOES_NOT_EXIST: [
-      FixInfo.single([CreateFile.newInstance]),
+      CreateFile.newInstance,
     ],
     CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR: [
-      FixInfo.single([MoveTypeArgumentsToClass.newInstance]),
-      FixInfo.single([RemoveTypeArguments.newInstance]),
+      MoveTypeArgumentsToClass.newInstance,
+      RemoveTypeArguments.newInstance,
     ],
     CompileTimeErrorCode.YIELD_OF_INVALID_TYPE: [
-      FixInfo.single([MakeReturnTypeNullable.newInstance]),
+      MakeReturnTypeNullable.newInstance,
     ],
 
     HintCode.CAN_BE_NULL_AFTER_NULL_AWARE: [
-      FixInfo.single([ReplaceWithNullAware.newInstance]),
+      ReplaceWithNullAware.newInstance,
     ],
     HintCode.DEAD_CODE: [
-      FixInfo.single([RemoveDeadCode.newInstance]),
+      RemoveDeadCode.newInstance,
     ],
     HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH: [
       // TODO(brianwilkerson) Add a fix to move the unreachable catch clause to
       //  a place where it can be reached (when possible).
-      FixInfo.single([RemoveDeadCode.newInstance]),
+      RemoveDeadCode.newInstance,
     ],
     HintCode.DEAD_CODE_ON_CATCH_SUBTYPE: [
       // TODO(brianwilkerson) Add a fix to move the unreachable catch clause to
       //  a place where it can be reached (when possible).
-      FixInfo.single([RemoveDeadCode.newInstance]),
+      RemoveDeadCode.newInstance,
     ],
     HintCode.DIVISION_OPTIMIZATION: [
-      FixInfo.single([UseEffectiveIntegerDivision.newInstance]),
+      UseEffectiveIntegerDivision.newInstance,
     ],
     HintCode.DUPLICATE_HIDDEN_NAME: [
-      FixInfo.single([RemoveNameFromCombinator.newInstance]),
+      RemoveNameFromCombinator.newInstance,
     ],
     HintCode.DUPLICATE_IMPORT: [
-      FixInfo.single([RemoveUnusedImport.newInstance]),
+      RemoveUnusedImport.newInstance,
     ],
     HintCode.DUPLICATE_SHOWN_NAME: [
-      FixInfo.single([RemoveNameFromCombinator.newInstance]),
+      RemoveNameFromCombinator.newInstance,
     ],
     // TODO(brianwilkerson) Add a fix to convert the path to a package: import.
 //    HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE: [],
     HintCode.INVALID_FACTORY_ANNOTATION: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_IMMUTABLE_ANNOTATION: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_LITERAL_ANNOTATION: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_REQUIRED_NAMED_PARAM: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_REQUIRED_POSITIONAL_PARAM: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.INVALID_SEALED_ANNOTATION: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.MISSING_REQUIRED_PARAM: [
-      FixInfo.single([AddMissingRequiredArgument.newInstance]),
+      AddMissingRequiredArgument.newInstance,
     ],
     HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS: [
-      FixInfo.single([AddMissingRequiredArgument.newInstance]),
+      AddMissingRequiredArgument.newInstance,
     ],
     HintCode.MISSING_RETURN: [
-      FixInfo.single([AddAsync.missingReturn]),
+      AddAsync.missingReturn,
     ],
     HintCode.NULLABLE_TYPE_IN_CATCH_CLAUSE: [
-      FixInfo.single([RemoveQuestionMark.newInstance]),
+      RemoveQuestionMark.newInstance,
     ],
     HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER: [
-      FixInfo.single([RemoveAnnotation.newInstance]),
+      RemoveAnnotation.newInstance,
     ],
     // TODO(brianwilkerson) Add a fix to normalize the path.
 //    HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT: [],
     HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE: [
-      FixInfo.single([UpdateSdkConstraints.version_2_1_0]),
+      UpdateSdkConstraints.version_2_1_0,
     ],
     HintCode.SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.SDK_VERSION_EXTENSION_METHODS: [
-      FixInfo.single([UpdateSdkConstraints.version_2_6_0]),
+      UpdateSdkConstraints.version_2_6_0,
     ],
     HintCode.SDK_VERSION_GT_GT_GT_OPERATOR: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.SDK_VERSION_SET_LITERAL: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_0]),
+      UpdateSdkConstraints.version_2_2_0,
     ],
     HintCode.SDK_VERSION_UI_AS_CODE: [
-      FixInfo.single([UpdateSdkConstraints.version_2_2_2]),
+      UpdateSdkConstraints.version_2_2_2,
     ],
     HintCode.TYPE_CHECK_IS_NOT_NULL: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          UseNotEqNull.newInstance,
-        ],
-      ),
+      UseNotEqNull.newInstance,
     ],
     HintCode.TYPE_CHECK_IS_NULL: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          UseEqEqNull.newInstance,
-        ],
-      ),
+      UseEqEqNull.newInstance,
     ],
     HintCode.UNDEFINED_HIDDEN_NAME: [
-      FixInfo.single([RemoveNameFromCombinator.newInstance]),
+      RemoveNameFromCombinator.newInstance,
     ],
     HintCode.UNDEFINED_SHOWN_NAME: [
-      FixInfo.single([RemoveNameFromCombinator.newInstance]),
+      RemoveNameFromCombinator.newInstance,
     ],
     HintCode.UNNECESSARY_CAST: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          RemoveUnnecessaryCast.newInstance,
-        ],
-      ),
+      RemoveUnnecessaryCast.newInstance,
     ],
 //    HintCode.UNNECESSARY_NO_SUCH_METHOD: [
 // TODO(brianwilkerson) Add a fix to remove the method.
 //    ],
     HintCode.UNNECESSARY_NULL_COMPARISON_FALSE: [
-      FixInfo.single([RemoveComparison.newInstance]),
+      RemoveComparison.newInstance,
     ],
     HintCode.UNNECESSARY_NULL_COMPARISON_TRUE: [
-      FixInfo.single([RemoveComparison.newInstance]),
+      RemoveComparison.newInstance,
     ],
 //    HintCode.UNNECESSARY_TYPE_CHECK_FALSE: [
 // TODO(brianwilkerson) Add a fix to remove the type check.
@@ -1660,79 +1141,55 @@
 // TODO(brianwilkerson) Add a fix to remove the type check.
 //    ],
     HintCode.UNUSED_CATCH_CLAUSE: [
-      FixInfo.single([RemoveUnusedCatchClause.newInstance]),
+      RemoveUnusedCatchClause.newInstance,
     ],
     HintCode.UNUSED_CATCH_STACK: [
-      FixInfo.single([RemoveUnusedCatchStack.newInstance]),
+      RemoveUnusedCatchStack.newInstance,
     ],
     HintCode.UNUSED_ELEMENT: [
-      FixInfo.single([RemoveUnusedElement.newInstance]),
+      RemoveUnusedElement.newInstance,
     ],
     HintCode.UNUSED_FIELD: [
-      FixInfo.single([RemoveUnusedField.newInstance]),
+      RemoveUnusedField.newInstance,
     ],
     HintCode.UNUSED_IMPORT: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: false,
-        generators: [
-          RemoveUnusedImport.newInstance,
-        ],
-      ),
+      RemoveUnusedImport.newInstance,
     ],
     HintCode.UNUSED_LABEL: [
-      FixInfo.single([RemoveUnusedLabel.newInstance]),
+      RemoveUnusedLabel.newInstance,
     ],
     HintCode.UNUSED_LOCAL_VARIABLE: [
-      FixInfo.single([RemoveUnusedLocalVariable.newInstance]),
+      RemoveUnusedLocalVariable.newInstance,
     ],
     HintCode.UNUSED_SHOWN_NAME: [
-      FixInfo.single([RemoveNameFromCombinator.newInstance]),
+      RemoveNameFromCombinator.newInstance,
     ],
     ParserErrorCode.EXPECTED_TOKEN: [
-      FixInfo.single([InsertSemicolon.newInstance]),
+      InsertSemicolon.newInstance,
     ],
     ParserErrorCode.GETTER_WITH_PARAMETERS: [
-      FixInfo.single([RemoveParametersInGetterDeclaration.newInstance]),
+      RemoveParametersInGetterDeclaration.newInstance,
     ],
     ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE: [
-      FixInfo.single([AddTypeAnnotation.newInstance]),
+      AddTypeAnnotation.newInstance,
     ],
     ParserErrorCode.VAR_AS_TYPE_NAME: [
-      FixInfo.single([ReplaceVarWithDynamic.newInstance]),
+      ReplaceVarWithDynamic.newInstance,
     ],
     StaticWarningCode.DEAD_NULL_AWARE_EXPRESSION: [
-      FixInfo.single([RemoveDeadIfNull.newInstance]),
+      RemoveDeadIfNull.newInstance,
     ],
     StaticWarningCode.INVALID_NULL_AWARE_OPERATOR: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithNotNullAware.newInstance,
-        ],
-      ),
+      ReplaceWithNotNullAware.newInstance,
     ],
     StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          ReplaceWithNotNullAware.newInstance,
-        ],
-      ),
+      ReplaceWithNotNullAware.newInstance,
     ],
     StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH: [
-      FixInfo.single([AddMissingEnumCaseClauses.newInstance]),
+      AddMissingEnumCaseClauses.newInstance,
     ],
     StaticWarningCode.UNNECESSARY_NON_NULL_ASSERTION: [
-      FixInfo(
-        canBeAppliedToFile: true,
-        canBeBulkApplied: true,
-        generators: [
-          RemoveNonNullAssertion.newInstance,
-        ],
-      ),
+      RemoveNonNullAssertion.newInstance,
     ],
   };
 
@@ -1803,18 +1260,14 @@
 
     var errorCode = error.errorCode;
     if (errorCode is LintCode) {
-      var fixes = lintProducerMap[errorCode.name] ?? [];
-      for (var fix in fixes) {
-        for (var generator in fix.generators) {
-          await compute(generator());
-        }
+      var generators = lintProducerMap[errorCode.name] ?? [];
+      for (var generator in generators) {
+        await compute(generator());
       }
     } else {
-      var fixes = nonLintProducerMap[errorCode] ?? [];
-      for (var fix in fixes) {
-        for (var generator in fix.generators) {
-          await compute(generator());
-        }
+      var generators = nonLintProducerMap[errorCode] ?? [];
+      for (var generator in generators) {
+        await compute(generator());
       }
       var multiGenerators = nonLintMultiProducerMap[errorCode];
       if (multiGenerators != null) {
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index bc98cb2..2292405 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -391,6 +391,43 @@
     assertHasRegionTarget('BBB p', 'BBB {}');
   }
 
+  @failingTest
+  Future<void> test_enum_constant() async {
+    addTestFile('''
+enum E { a, b }
+void f() {
+  E.a;
+}
+''');
+    await prepareNavigation();
+    assertHasRegion('a;');
+    assertHasTarget('a,');
+  }
+
+  Future<void> test_enum_index() async {
+    addTestFile('''
+enum E { a, b }
+void f() {
+  E.a.index;
+}
+''');
+    await prepareNavigation();
+    assertHasRegion('index');
+    assertHasTarget('E {');
+  }
+
+  Future<void> test_enum_values() async {
+    addTestFile('''
+enum E { a, b }
+void f() {
+  E.values;
+}
+''');
+    await prepareNavigation();
+    assertHasRegion('values');
+    assertHasTarget('E');
+  }
+
   Future<void> test_extension_on() async {
     addTestFile('''
 class C //1
diff --git a/pkg/analysis_server/test/completion_test.dart b/pkg/analysis_server/test/completion_test.dart
index 7d1ba63..baa577fc 100644
--- a/pkg/analysis_server/test/completion_test.dart
+++ b/pkg/analysis_server/test/completion_test.dart
@@ -1482,9 +1482,7 @@
   }
 }''', <String>['1+fa', '1-fb', '1+ma', '1-mb']);
 
-    buildTests(
-        'testCompletion_superConstructorInvocation_noNamePrefix',
-        '''
+    buildTests('testCompletion_superConstructorInvocation_noNamePrefix', '''
 class A {
   A.fooA();
   A.fooB();
@@ -1492,13 +1490,9 @@
 }
 class B extends A {
   B() : super.!1
-}''',
-        <String>['1+fooA', '1+fooB', '1+bar'],
-        failingTests: '1');
+}''', <String>['1+fooA', '1+fooB', '1+bar']);
 
-    buildTests(
-        'testCompletion_superConstructorInvocation_withNamePrefix',
-        '''
+    buildTests('testCompletion_superConstructorInvocation_withNamePrefix', '''
 class A {
   A.fooA();
   A.fooB();
@@ -1506,9 +1500,7 @@
 }
 class B extends A {
   B() : super.f!1
-}''',
-        <String>['1+fooA', '1+fooB', '1-bar'],
-        failingTests: '1');
+}''', <String>['1+fooA', '1+fooB', '1-bar']);
 
     buildTests(
         'testCompletion_this_bad_inConstructorInitializer',
diff --git a/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart b/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
index 03aca89..bce4ad4 100644
--- a/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
+++ b/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
@@ -13,6 +13,9 @@
     defineReflectiveTests(ConstructorCompletionTest);
     defineReflectiveTests(ExtensionCompletionTest);
     defineReflectiveTests(PropertyAccessorCompletionTest);
+    defineReflectiveTests(RedirectedConstructorCompletionTest);
+    defineReflectiveTests(RedirectingConstructorInvocationCompletionTest);
+    defineReflectiveTests(SuperConstructorInvocationCompletionTest);
   });
 }
 
@@ -221,3 +224,210 @@
         elementKind: ElementKind.GETTER, isDeprecated: false);
   }
 }
+
+@reflectiveTest
+class RedirectedConstructorCompletionTest extends CompletionTestCase {
+  @failingTest
+  Future<void> test_keywords() async {
+    addTestFile('''
+class A {
+  factory A() = ^
+}
+class B implements A {
+  B();
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('assert');
+    assertHasNoCompletion('super');
+    assertHasNoCompletion('this');
+  }
+
+  Future<void> test_namedConstructor_private() async {
+    addTestFile('''
+class A {
+  factory A() = ^
+}
+class B implements A {
+  B._();
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('B._');
+  }
+
+  Future<void> test_namedConstructor_public() async {
+    addTestFile('''
+class A {
+  factory A() = ^
+}
+class B implements A {
+  B.b();
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('B.b');
+  }
+
+  Future<void> test_sameConstructor() async {
+    addTestFile('''
+class A {
+  factory A() = ^
+}
+class B implements A {
+  B();
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('A');
+  }
+
+  Future<void> test_unnamedConstructor() async {
+    addTestFile('''
+class A {
+  factory A() = ^
+}
+class B implements A {
+  B();
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('B');
+  }
+
+  @failingTest
+  Future<void> test_unnamedConstructor_inDifferentLibrary() async {
+    newFile('/project/bin/b.dart', content: '''
+class B implements A {
+  B();
+}
+''');
+    addTestFile('''
+import 'b.dart';
+
+class A {
+  factory A() = ^
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('B');
+  }
+}
+
+@reflectiveTest
+class RedirectingConstructorInvocationCompletionTest
+    extends CompletionTestCase {
+  @failingTest
+  Future<void> test_instanceMember() async {
+    addTestFile('''
+class C {
+  C.c() {}
+  C() : this.^
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('toString');
+  }
+
+  Future<void> test_namedConstructor_private() async {
+    addTestFile('''
+class C {
+  C._() {}
+  C() : this.^
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('_');
+  }
+
+  Future<void> test_namedConstructor_public() async {
+    addTestFile('''
+class C {
+  C.c() {}
+  C() : this.^
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('c');
+  }
+
+  Future<void> test_sameConstructor() async {
+    addTestFile('''
+class C {
+  C.c() : this.^
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('c');
+  }
+
+  Future<void> test_unnamedConstructor() async {
+    addTestFile('''
+class C {
+  C() {}
+  C.c() : this.^
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('');
+  }
+}
+
+@reflectiveTest
+class SuperConstructorInvocationCompletionTest extends CompletionTestCase {
+  Future<void> test_namedConstructor_notVisible() async {
+    newFile('/project/bin/a.dart', content: '''
+class A {
+  A._() {}
+}
+''');
+    addTestFile('''
+import 'a.dart';
+
+class B extends A {
+  B() : super.^
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('_');
+  }
+
+  Future<void> test_namedConstructor_private() async {
+    addTestFile('''
+class A {
+  A._() {}
+}
+class B extends A {
+  B() : super.^
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('_');
+  }
+
+  Future<void> test_namedConstructor_public() async {
+    addTestFile('''
+class A {
+  A.a() {}
+}
+class B extends A {
+  B() : super.^
+}
+''');
+    await getSuggestions();
+    assertHasCompletion('a');
+  }
+
+  Future<void> test_unnamedConstructor() async {
+    addTestFile('''
+class A {
+  A() {}
+}
+class B extends A {
+  B() : super.^
+}
+''');
+    await getSuggestions();
+    assertHasNoCompletion('');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
index 38de670..cbe56ed 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
@@ -507,12 +507,16 @@
 
     final dataDrivenCodes = <String>{};
     final bulkFixCodes = FixProcessor.lintProducerMap.entries
-        .where((e) => e.value.where((fix) => fix.canBeBulkApplied).isNotEmpty)
+        .where((e) => e.value
+            .where((generator) => generator().canBeAppliedInBulk)
+            .isNotEmpty)
         .map((e) => e.key);
     final nonDataDrivenCodes = <String>{
       ...bulkFixCodes,
       ...FixProcessor.nonLintProducerMap.entries
-          .where((e) => e.value.where((fix) => fix.canBeBulkApplied).isNotEmpty)
+          .where((e) => e.value
+              .where((generator) => generator().canBeAppliedInBulk)
+              .isNotEmpty)
           .map((e) => e.key.uniqueName),
     };
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_in_file_test.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_in_file_test.dart
index 52438b8..7a9aca3 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/fix_in_file_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_in_file_test.dart
@@ -127,10 +127,11 @@
     group('VerificationTests | fixInFileFixesHaveBulkFixTests |', () {
       for (var fixEntry in FixProcessor.lintProducerMap.entries) {
         var errorCode = fixEntry.key;
-        for (var fixInfo in fixEntry.value) {
-          if (fixInfo.canBeAppliedToFile) {
+        for (var generator in fixEntry.value) {
+          var producer = generator();
+          if (producer.canBeAppliedToFile) {
             test('$errorCode |', () {
-              expect(fixInfo.canBeBulkApplied, isTrue);
+              expect(producer.canBeAppliedInBulk, isTrue);
             });
           }
         }
@@ -142,18 +143,16 @@
     group('VerificationTests | fixInFileFixesHaveUniqueBulkFixes | lint |', () {
       for (var fixEntry in FixProcessor.lintProducerMap.entries) {
         var errorCode = fixEntry.key;
-        for (var fixInfo in fixEntry.value) {
-          if (fixInfo.canBeAppliedToFile) {
+        for (var generator in fixEntry.value) {
+          var producer = generator();
+          if (producer.canBeAppliedToFile) {
             test('$errorCode |', () {
-              for (var generator in fixInfo.generators) {
-                var g = generator();
-                var multiFixKind = g.multiFixKind;
-                var fixKind = g.fixKind;
-                if (multiFixKind != null) {
-                  expect(multiFixKind, isNot(equals(fixKind)));
-                }
+              var multiFixKind = producer.multiFixKind;
+              var fixKind = producer.fixKind;
+              if (multiFixKind != null) {
+                expect(multiFixKind, isNot(equals(fixKind)));
               }
-              expect(fixInfo.canBeBulkApplied, isTrue);
+              expect(producer.canBeAppliedInBulk, isTrue);
             });
           }
         }
@@ -168,18 +167,14 @@
     group('VerificationTests | fixInFileFixKindsHaveMultiFixes | lint |', () {
       for (var fixEntry in FixProcessor.lintProducerMap.entries) {
         var errorCode = fixEntry.key;
-        for (var fixInfo in fixEntry.value) {
+        for (var generator in fixEntry.value) {
+          var producer = generator();
           // At least one generator should have a multiFix.
-          if (fixInfo.canBeAppliedToFile) {
+          if (producer.canBeAppliedToFile) {
             test('$errorCode |', () {
-              var generators = fixInfo.generators;
-              var foundMultiFix = false;
-              for (var i = 0; i < generators.length && !foundMultiFix; ++i) {
-                var generator = generators[i]();
-                foundMultiFix = generator.multiFixKind != null ||
-                    dynamicProducerTypes
-                        .contains(generator.runtimeType.toString());
-              }
+              var foundMultiFix = producer.multiFixKind != null ||
+                  dynamicProducerTypes
+                      .contains(producer.runtimeType.toString());
               expect(foundMultiFix, isTrue);
             });
           }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
index 3f86540..cde9037 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
@@ -22,22 +22,20 @@
     _testMap(FixProcessor.nonLintProducerMap.values);
   }
 
-  void _testInfo(FixInfo info) {
-    for (var generator in info.generators) {
-      var producer = generator();
-      var className = producer.runtimeType.toString();
-      expect(producer.fixKind, isNotNull, reason: '$className.fixKind');
-      if (info.canBeAppliedToFile) {
-        expect(producer.multiFixKind, isNotNull,
-            reason: '$className.multiFixKind');
-      }
+  void _testGenerator(ProducerGenerator generator) {
+    var producer = generator();
+    var className = producer.runtimeType.toString();
+    expect(producer.fixKind, isNotNull, reason: '$className.fixKind');
+    if (producer.canBeAppliedToFile) {
+      expect(producer.multiFixKind, isNotNull,
+          reason: '$className.multiFixKind');
     }
   }
 
-  void _testMap(Iterable<List<FixInfo>> values) {
-    for (var list in values) {
-      for (var info in list) {
-        _testInfo(info);
+  void _testMap(Iterable<List<ProducerGenerator>> values) {
+    for (var generators in values) {
+      for (var generator in generators) {
+        _testGenerator(generator);
       }
     }
   }
diff --git a/pkg/analysis_server/tool/bulk_fix/supported_lints.dart b/pkg/analysis_server/tool/bulk_fix/supported_lints.dart
index a9d4064..13d920e 100644
--- a/pkg/analysis_server/tool/bulk_fix/supported_lints.dart
+++ b/pkg/analysis_server/tool/bulk_fix/supported_lints.dart
@@ -8,7 +8,9 @@
 /// analysis options.
 void main() {
   final bulkFixCodes = FixProcessor.lintProducerMap.entries
-      .where((e) => e.value.where((fix) => fix.canBeBulkApplied).isNotEmpty)
+      .where((e) => e.value
+          .where((generator) => generator().canBeAppliedInBulk)
+          .isNotEmpty)
       .map((e) => e.key);
   print('    # bulk-fixable lints');
   for (var lintName in bulkFixCodes) {
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index bdc7ebf..1fa1831 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -105,6 +105,8 @@
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_EXTENSION,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
+  CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN,
+  CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MIXIN,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
@@ -502,6 +504,7 @@
   HintCode.DEAD_CODE_ON_CATCH_SUBTYPE,
   HintCode.DEPRECATED_EXTENDS_FUNCTION,
   HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION,
+  HintCode.DEPRECATED_IMPLEMENTS_FUNCTION,
   HintCode.DEPRECATED_MEMBER_USE,
   HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE,
   HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE,
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index fc48be7..7f8e2f0 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -43,7 +43,6 @@
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary2/ast_binary_flags.dart';
 import 'package:analyzer/src/util/file_paths.dart' as file_paths;
-import 'package:analyzer/src/workspace/pub.dart';
 import 'package:meta/meta.dart';
 
 /// This class computes [AnalysisResult]s for Dart files.
@@ -82,7 +81,7 @@
 /// TODO(scheglov) Clean up the list of implicitly analyzed files.
 class AnalysisDriver implements AnalysisDriverGeneric {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 143;
+  static const int DATA_VERSION = 144;
 
   /// The number of exception contexts allowed to write. Once this field is
   /// zero, we stop writing any new exception contexts in this process.
@@ -1872,13 +1871,8 @@
     buffer.addUint32List(_analysisOptions.signature);
     _addDeclaredVariablesToSignature(buffer);
 
-    {
-      var workspace = analysisContext?.contextRoot.workspace;
-      // TODO(scheglov) Generalize?
-      if (workspace is PubWorkspace) {
-        buffer.addString(workspace.pubspecContent ?? '');
-      }
-    }
+    var workspace = analysisContext?.contextRoot.workspace;
+    workspace?.contributeToResolutionSalt(buffer);
 
     _saltForResolution = buffer.toUint32List();
   }
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index b514bb3..05e7152 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -322,6 +322,15 @@
       correction: "Try renaming the class.");
 
   /**
+   * According to the specification: If a class or mixin declaration implements
+   * Function, it has no effect.
+   */
+  static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
+      'DEPRECATED_IMPLEMENTS_FUNCTION',
+      "Implementing 'Function' has no effect.",
+      correction: "Try removing 'Function' from the 'implements' clause.");
+
+  /**
    * Parameters:
    * 0: the name of the member
    */
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index f85b97b..2d222bd 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1771,6 +1771,19 @@
   );
 
   /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
+    "'{0}' can't be used to name both a type variable and a member in "
+        "this mixin.",
+    correction: "Try renaming either the type variable or the member.",
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
+  );
+
+  /**
    * It is a compile time error if a generic extension declares a member with
    * the same basename as the name of any of the extension's type parameters.
    */
@@ -1784,6 +1797,19 @@
   );
 
   /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
+    "'{0}' can't be used to name both a type variable and the mixin in "
+        "which the type variable is defined.",
+    correction: "Try renaming either the type variable or the mixin.",
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
+  );
+
+  /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
    */
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 9b72dd2..cf4ecd8 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1584,6 +1584,7 @@
   /// extends/implements/mixes in `Function`.
   void _checkForBadFunctionUse(ClassDeclaration node) {
     var extendsClause = node.extendsClause;
+    var implementsClause = node.implementsClause;
     var withClause = node.withClause;
 
     if (node.name.name == "Function") {
@@ -1599,6 +1600,19 @@
       }
     }
 
+    if (implementsClause != null) {
+      for (var interface in implementsClause.interfaces) {
+        var type = interface.type;
+        if (type != null && type.isDartCoreFunction) {
+          errorReporter.reportErrorForNode(
+            HintCode.DEPRECATED_IMPLEMENTS_FUNCTION,
+            interface,
+          );
+          break;
+        }
+      }
+    }
+
     if (withClause != null) {
       for (TypeName type in withClause.mixinTypes) {
         var mixinElement = type.name.staticElement;
@@ -1754,28 +1768,25 @@
 
   /// Verify all conflicts between type variable and enclosing class.
   /// TODO(scheglov)
-  ///
-  /// See [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS], and
-  /// [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER].
   void _checkForConflictingClassTypeVariableErrorCodes() {
     for (TypeParameterElement typeParameter
         in _enclosingClass!.typeParameters) {
       String name = typeParameter.name;
       // name is same as the name of the enclosing class
       if (_enclosingClass!.name == name) {
-        errorReporter.reportErrorForElement(
-            CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
-            typeParameter,
-            [name]);
+        var code = _enclosingClass!.isMixin
+            ? CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MIXIN
+            : CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS;
+        errorReporter.reportErrorForElement(code, typeParameter, [name]);
       }
       // check members
       if (_enclosingClass!.getMethod(name) != null ||
           _enclosingClass!.getGetter(name) != null ||
           _enclosingClass!.getSetter(name) != null) {
-        errorReporter.reportErrorForElement(
-            CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS,
-            typeParameter,
-            [name]);
+        var code = _enclosingClass!.isMixin
+            ? CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN
+            : CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS;
+        errorReporter.reportErrorForElement(code, typeParameter, [name]);
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index 97889ac..c0f4202 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -81,6 +81,7 @@
 }
 
 class ClassElementLinkedData extends ElementLinkedData<ClassElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
   void Function()? _readMembers;
   void Function()? applyInformativeDataToMembers;
 
@@ -117,6 +118,7 @@
     element.supertype = reader._readOptionalInterfaceType();
     element.mixins = reader._readInterfaceTypeList();
     element.interfaces = reader._readInterfaceTypeList();
+    applyConstantOffsets?.perform();
   }
 }
 
@@ -139,6 +141,8 @@
 
 class ConstructorElementLinkedData
     extends ElementLinkedData<ConstructorElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   ConstructorElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -160,6 +164,7 @@
           reader.readElement() as ConstructorElement?;
       element.constantInitializers = reader._readNodeList();
     }
+    applyConstantOffsets?.perform();
   }
 }
 
@@ -256,6 +261,8 @@
 }
 
 class EnumElementLinkedData extends ElementLinkedData<EnumElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   EnumElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -283,11 +290,15 @@
         unitElement: element.enclosingElement,
       );
     }
+
+    applyConstantOffsets?.perform();
   }
 }
 
 class ExtensionElementLinkedData
     extends ElementLinkedData<ExtensionElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   ExtensionElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -302,10 +313,13 @@
     );
     _readTypeParameters(reader, element.typeParameters);
     element.extendedType = reader.readRequiredType();
+    applyConstantOffsets?.perform();
   }
 }
 
 class FieldElementLinkedData extends ElementLinkedData<FieldElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   FieldElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -327,10 +341,13 @@
         ConstantContextForExpressionImpl(initializer);
       }
     }
+    applyConstantOffsets?.perform();
   }
 }
 
 class FunctionElementLinkedData extends ElementLinkedData<FunctionElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   FunctionElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -346,6 +363,7 @@
     _readTypeParameters(reader, element.typeParameters);
     element.returnType = reader.readRequiredType();
     _readFormalParameters(reader, element.parameters);
+    applyConstantOffsets?.perform();
   }
 }
 
@@ -1219,6 +1237,8 @@
 }
 
 class MethodElementLinkedData extends ElementLinkedData<MethodElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   MethodElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -1235,10 +1255,13 @@
     _readTypeParameters(reader, element.typeParameters);
     _readFormalParameters(reader, element.parameters);
     element.returnType = reader.readRequiredType();
+    applyConstantOffsets?.perform();
   }
 }
 
 class MixinElementLinkedData extends ElementLinkedData<MixinElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   MixinElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -1254,11 +1277,14 @@
     _readTypeParameters(reader, element.typeParameters);
     element.superclassConstraints = reader._readInterfaceTypeList();
     element.interfaces = reader._readInterfaceTypeList();
+    applyConstantOffsets?.perform();
   }
 }
 
 class PropertyAccessorElementLinkedData
     extends ElementLinkedData<PropertyAccessorElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   PropertyAccessorElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -1276,6 +1302,8 @@
 
     element.returnType = reader.readRequiredType();
     _readFormalParameters(reader, element.parameters);
+
+    applyConstantOffsets?.perform();
   }
 }
 
@@ -1706,6 +1734,8 @@
 
 class TopLevelVariableElementLinkedData
     extends ElementLinkedData<TopLevelVariableElementImpl> {
+  ApplyConstantOffsets? applyConstantOffsets;
+
   TopLevelVariableElementLinkedData({
     required Reference reference,
     required LibraryReader libraryReader,
@@ -1726,6 +1756,7 @@
         ConstantContextForExpressionImpl(initializer);
       }
     }
+    applyConstantOffsets?.perform();
   }
 }
 
diff --git a/pkg/analyzer/lib/src/summary2/informative_data.dart b/pkg/analyzer/lib/src/summary2/informative_data.dart
index 3e691ca..ec885ce 100644
--- a/pkg/analyzer/lib/src/summary2/informative_data.dart
+++ b/pkg/analyzer/lib/src/summary2/informative_data.dart
@@ -5,6 +5,8 @@
 import 'dart:typed_data';
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/extensions.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -24,6 +26,33 @@
   return sink.flushAndTake();
 }
 
+/// We want to have actual offsets for tokens of various constants in the
+/// element model, such as metadata and constant initializers. But we read
+/// these additional pieces of resolution data later, on demand. So, these
+/// offsets are different from `nameOffset` for example, which are applied
+/// directly after creating corresponding elements during a library loading.
+class ApplyConstantOffsets {
+  Uint32List? _offsets;
+  void Function(_OffsetsApplier)? _function;
+
+  ApplyConstantOffsets(this._offsets, this._function);
+
+  void perform() {
+    var offsets = _offsets;
+    var function = _function;
+    if (offsets != null && function != null) {
+      var applier = _OffsetsApplier(
+        _SafeListIterator(offsets),
+      );
+      function.call(applier);
+      // Clear the references to possible closure data.
+      // TODO(scheglov) We want to null the whole `linkedData` instead.
+      _offsets = null;
+      _function = null;
+    }
+  }
+}
+
 class InformativeDataApplier {
   final LinkedElementFactory _elementFactory;
   final Map<Uri, Uint8List> _unitsInformativeBytes2;
@@ -127,6 +156,17 @@
           element.parameters_unresolved,
           info.parameters,
         );
+
+        var linkedData = element.linkedData;
+        if (linkedData is PropertyAccessorElementLinkedData) {
+          linkedData.applyConstantOffsets = ApplyConstantOffsets(
+            info.constantOffsets,
+            (applier) {
+              applier.applyToMetadata(element);
+              applier.applyToTypeParameters(element.typeParameters);
+            },
+          );
+        }
       },
     );
   }
@@ -145,6 +185,13 @@
     );
 
     var linkedData = element.linkedData as ClassElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToTypeParameters(element.typeParameters);
+      },
+    );
     linkedData.applyInformativeDataToMembers = () {
       _applyToConstructors(element.constructors, info.constructors);
       _applyToFields(element.fields, info.fields);
@@ -165,6 +212,15 @@
       element.typeParameters_unresolved,
       info.typeParameters,
     );
+
+    var linkedData = element.linkedData as ClassElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToTypeParameters(element.typeParameters);
+      },
+    );
   }
 
   void _applyToCombinators(
@@ -201,6 +257,14 @@
           element.parameters_unresolved,
           info.parameters,
         );
+
+        var linkedData = element.linkedData as ConstructorElementLinkedData;
+        linkedData.applyConstantOffsets = ApplyConstantOffsets(
+          info.constantOffsets,
+          (applier) {
+            applier.applyToMetadata(element);
+          },
+        );
       },
     );
   }
@@ -224,6 +288,15 @@
         element.documentationComment = info.documentationComment;
       },
     );
+
+    var linkedData = element.linkedData as EnumElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToEnumConstants(element.constants);
+      },
+    );
   }
 
   void _applyToExtensionDeclaration(
@@ -241,6 +314,15 @@
     _applyToFields(element.fields, info.fields);
     _applyToAccessors(element.accessors, info.accessors);
     _applyToMethods(element.methods, info.methods);
+
+    var linkedData = element.linkedData as ExtensionElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToTypeParameters(element.typeParameters);
+      },
+    );
   }
 
   void _applyToFields(
@@ -259,6 +341,15 @@
         (element.setter as PropertyAccessorElementImpl?)?.nameOffset =
             info.nameOffset;
         element.documentationComment = info.documentationComment;
+
+        var linkedData = element.linkedData as FieldElementLinkedData;
+        linkedData.applyConstantOffsets = ApplyConstantOffsets(
+          info.constantOffsets,
+          (applier) {
+            applier.applyToMetadata(element);
+            applier.applyToConstantInitializer(element);
+          },
+        );
       },
     );
   }
@@ -296,6 +387,15 @@
       element.parameters_unresolved,
       info.parameters,
     );
+
+    var linkedData = element.linkedData as FunctionElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToTypeParameters(element.typeParameters);
+      },
+    );
   }
 
   void _applyToFunctionTypeAlias(
@@ -381,6 +481,15 @@
           element.parameters_unresolved,
           info.parameters,
         );
+
+        var linkedData = element.linkedData as MethodElementLinkedData;
+        linkedData.applyConstantOffsets = ApplyConstantOffsets(
+          info.constantOffsets,
+          (applier) {
+            applier.applyToMetadata(element);
+            applier.applyToTypeParameters(element.typeParameters);
+          },
+        );
       },
     );
   }
@@ -401,6 +510,15 @@
     _applyToFields(element.fields, info.fields);
     _applyToAccessors(element.accessors, info.accessors);
     _applyToMethods(element.methods, info.methods);
+
+    var linkedData = element.linkedData as MixinElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToTypeParameters(element.typeParameters);
+      },
+    );
   }
 
   void _applyToTopLevelVariable(
@@ -415,6 +533,15 @@
     (element.setter as PropertyAccessorElementImpl?)?.nameOffset =
         info.nameOffset;
     element.documentationComment = info.documentationComment;
+
+    var linkedData = element.linkedData as TopLevelVariableElementLinkedData;
+    linkedData.applyConstantOffsets = ApplyConstantOffsets(
+      info.constantOffsets,
+      (applier) {
+        applier.applyToMetadata(element);
+        applier.applyToConstantInitializer(element);
+      },
+    );
   }
 
   void _applyToTypeParameters(
@@ -443,6 +570,7 @@
   final List<_InfoFieldDeclaration> fields;
   final List<_InfoMethodDeclaration> accessors;
   final List<_InfoMethodDeclaration> methods;
+  final Uint32List constantOffsets;
 
   factory _InfoClassDeclaration(SummaryDataReader reader,
       {int nameOffsetDelta = 0}) {
@@ -466,6 +594,7 @@
       methods: reader.readTypedList(
         () => _InfoMethodDeclaration(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -479,6 +608,7 @@
     required this.fields,
     required this.accessors,
     required this.methods,
+    required this.constantOffsets,
   });
 }
 
@@ -488,6 +618,7 @@
   final int nameOffset;
   final String? documentationComment;
   final List<_InfoTypeParameter> typeParameters;
+  final Uint32List constantOffsets;
 
   factory _InfoClassTypeAlias(SummaryDataReader reader) {
     return _InfoClassTypeAlias._(
@@ -498,6 +629,7 @@
       typeParameters: reader.readTypedList(
         () => _InfoTypeParameter(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -507,6 +639,7 @@
     required this.nameOffset,
     required this.documentationComment,
     required this.typeParameters,
+    required this.constantOffsets,
   });
 }
 
@@ -535,6 +668,7 @@
   final int nameEnd;
   final String? documentationComment;
   final List<_InfoFormalParameter> parameters;
+  final Uint32List constantOffsets;
 
   factory _InfoConstructorDeclaration(SummaryDataReader reader) {
     return _InfoConstructorDeclaration._(
@@ -547,6 +681,7 @@
       parameters: reader.readTypedList(
         () => _InfoFormalParameter(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -558,6 +693,7 @@
     required this.nameEnd,
     required this.documentationComment,
     required this.parameters,
+    required this.constantOffsets,
   });
 }
 
@@ -590,6 +726,7 @@
   final int nameOffset;
   final String? documentationComment;
   final List<_InfoEnumConstantDeclaration> constants;
+  final Uint32List constantOffsets;
 
   factory _InfoEnumDeclaration(SummaryDataReader reader) {
     return _InfoEnumDeclaration._(
@@ -600,6 +737,7 @@
       constants: reader.readTypedList(
         () => _InfoEnumConstantDeclaration(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -609,6 +747,7 @@
     required this.nameOffset,
     required this.documentationComment,
     required this.constants,
+    required this.constantOffsets,
   });
 }
 
@@ -636,6 +775,7 @@
   final int codeLength;
   final int nameOffset;
   final String? documentationComment;
+  final Uint32List constantOffsets;
 
   factory _InfoFieldDeclaration(SummaryDataReader reader) {
     return _InfoFieldDeclaration._(
@@ -643,6 +783,7 @@
       codeLength: reader.readUInt30(),
       nameOffset: reader.readUInt30(),
       documentationComment: reader.readStringUtf8().nullIfEmpty,
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -651,6 +792,7 @@
     required this.codeLength,
     required this.nameOffset,
     required this.documentationComment,
+    required this.constantOffsets,
   });
 }
 
@@ -691,6 +833,7 @@
   final String? documentationComment;
   final List<_InfoTypeParameter> typeParameters;
   final List<_InfoFormalParameter> parameters;
+  final Uint32List constantOffsets;
 
   factory _InfoFunctionDeclaration(SummaryDataReader reader) {
     return _InfoFunctionDeclaration._(
@@ -704,6 +847,7 @@
       parameters: reader.readTypedList(
         () => _InfoFormalParameter(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -714,6 +858,7 @@
     required this.documentationComment,
     required this.typeParameters,
     required this.parameters,
+    required this.constantOffsets,
   });
 }
 
@@ -824,6 +969,7 @@
   final String? documentationComment;
   final List<_InfoTypeParameter> typeParameters;
   final List<_InfoFormalParameter> parameters;
+  final Uint32List constantOffsets;
 
   factory _InfoMethodDeclaration(SummaryDataReader reader) {
     return _InfoMethodDeclaration._(
@@ -837,6 +983,7 @@
       parameters: reader.readTypedList(
         () => _InfoFormalParameter(reader),
       ),
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -847,6 +994,7 @@
     required this.documentationComment,
     required this.typeParameters,
     required this.parameters,
+    required this.constantOffsets,
   });
 }
 
@@ -887,6 +1035,10 @@
       _writeFields(node.members);
       _writeGettersSetters(node.members);
       _writeMethods(node.members);
+      _writeOffsets(
+        metadata: node.metadata,
+        typeParameters: node.typeParameters,
+      );
     });
 
     sink.writeList2<ClassTypeAlias>(unit.declarations, (node) {
@@ -895,6 +1047,10 @@
       sink.writeUInt30(node.name.offset);
       _writeDocumentationComment(node);
       _writeTypeParameters(node.typeParameters);
+      _writeOffsets(
+        metadata: node.metadata,
+        typeParameters: node.typeParameters,
+      );
     });
 
     sink.writeList2<EnumDeclaration>(unit.declarations, (node) {
@@ -908,6 +1064,10 @@
         sink.writeUInt30(node.name.offset);
         _writeDocumentationComment(node);
       });
+      _writeOffsets(
+        metadata: node.metadata,
+        enumConstants: node.constants,
+      );
     });
 
     sink.writeList2<ExtensionDeclaration>(unit.declarations, (node) {
@@ -920,6 +1080,10 @@
       _writeFields(node.members);
       _writeGettersSetters(node.members);
       _writeMethods(node.members);
+      _writeOffsets(
+        metadata: node.metadata,
+        typeParameters: node.typeParameters,
+      );
     });
 
     sink.writeList2<FunctionDeclaration>(
@@ -934,6 +1098,10 @@
         _writeDocumentationComment(node);
         _writeTypeParameters(node.functionExpression.typeParameters);
         _writeFormalParameters(node.functionExpression.parameters);
+        _writeOffsets(
+          metadata: node.metadata,
+          typeParameters: node.functionExpression.typeParameters,
+        );
       },
     );
 
@@ -948,6 +1116,10 @@
       _writeDocumentationComment(node);
       _writeTypeParameters(node.functionExpression.typeParameters);
       _writeFormalParameters(node.functionExpression.parameters);
+      _writeOffsets(
+        metadata: node.metadata,
+        typeParameters: node.functionExpression.typeParameters,
+      );
     });
 
     sink.writeList2<FunctionTypeAlias>(unit.declarations, (node) {
@@ -977,6 +1149,10 @@
       _writeFields(node.members);
       _writeGettersSetters(node.members);
       _writeMethods(node.members);
+      _writeOffsets(
+        metadata: node.metadata,
+        typeParameters: node.typeParameters,
+      );
     });
 
     sink.writeList<VariableDeclaration>(
@@ -984,13 +1160,7 @@
           .whereType<TopLevelVariableDeclaration>()
           .expand((declaration) => declaration.variables.variables)
           .toList(),
-      (node) {
-        var codeOffset = _codeOffsetForVariable(node);
-        sink.writeUInt30(codeOffset);
-        sink.writeUInt30(node.end - codeOffset);
-        sink.writeUInt30(node.name.offset);
-        _writeDocumentationComment(node);
-      },
+      _writeTopLevelVariable,
     );
   }
 
@@ -1020,6 +1190,9 @@
       sink.writeUInt30(nameNode.end);
       _writeDocumentationComment(node);
       _writeFormalParameters(node.parameters);
+      _writeOffsets(
+        metadata: node.metadata,
+      );
     });
   }
 
@@ -1044,6 +1217,14 @@
         sink.writeUInt30(node.end - codeOffset);
         sink.writeUInt30(node.name.offset);
         _writeDocumentationComment(node);
+
+        // TODO(scheglov) Replace with some kind of double-iterating list.
+        var declaration = node.parent!.parent as FieldDeclaration;
+
+        var collector = _OffsetsCollector();
+        declaration.metadata.accept(collector);
+        node.initializer?.accept(collector);
+        sink.writeUint30List(collector.offsets);
       },
     );
   }
@@ -1079,6 +1260,10 @@
         _writeDocumentationComment(node);
         _writeTypeParameters(node.typeParameters);
         _writeFormalParameters(node.parameters);
+        _writeOffsets(
+          metadata: node.metadata,
+          typeParameters: node.typeParameters,
+        );
       },
     );
   }
@@ -1110,10 +1295,46 @@
         _writeDocumentationComment(node);
         _writeTypeParameters(node.typeParameters);
         _writeFormalParameters(node.parameters);
+        _writeOffsets(
+          metadata: node.metadata,
+          typeParameters: node.typeParameters,
+        );
       },
     );
   }
 
+  void _writeOffsets({
+    NodeList<Annotation>? metadata,
+    TypeParameterList? typeParameters,
+    List<EnumConstantDeclaration>? enumConstants,
+  }) {
+    var collector = _OffsetsCollector();
+    metadata?.accept(collector);
+    typeParameters?.typeParameters.accept(collector);
+    if (enumConstants != null) {
+      for (var enumConstant in enumConstants) {
+        enumConstant.metadata.accept(collector);
+      }
+    }
+    sink.writeUint30List(collector.offsets);
+  }
+
+  void _writeTopLevelVariable(VariableDeclaration node) {
+    var codeOffset = _codeOffsetForVariable(node);
+    sink.writeUInt30(codeOffset);
+    sink.writeUInt30(node.end - codeOffset);
+    sink.writeUInt30(node.name.offset);
+    _writeDocumentationComment(node);
+
+    // TODO(scheglov) Replace with some kind of double-iterating list.
+    var declaration = node.parent!.parent as TopLevelVariableDeclaration;
+
+    var collector = _OffsetsCollector();
+    declaration.metadata.accept(collector);
+    node.initializer?.accept(collector);
+    sink.writeUint30List(collector.offsets);
+  }
+
   void _writeTypeParameters(TypeParameterList? parameterList) {
     var parameters = parameterList?.typeParameters ?? <TypeParameter>[];
     sink.writeList<TypeParameter>(parameters, (node) {
@@ -1129,6 +1350,7 @@
   final int codeLength;
   final int nameOffset;
   final String? documentationComment;
+  final Uint32List constantOffsets;
 
   factory _InfoTopLevelVariable(SummaryDataReader reader) {
     return _InfoTopLevelVariable._(
@@ -1136,6 +1358,7 @@
       codeLength: reader.readUInt30(),
       nameOffset: reader.readUInt30(),
       documentationComment: reader.readStringUtf8().nullIfEmpty,
+      constantOffsets: reader.readUInt30List(),
     );
   }
 
@@ -1144,6 +1367,7 @@
     required this.codeLength,
     required this.nameOffset,
     required this.documentationComment,
+    required this.constantOffsets,
   });
 }
 
@@ -1253,6 +1477,218 @@
   });
 }
 
+class _OffsetsApplier extends RecursiveAstVisitor<void> {
+  final _SafeListIterator<int> _iterator;
+
+  _OffsetsApplier(this._iterator);
+
+  void applyToConstantInitializer(Element element) {
+    if (element is ConstVariableElement) {
+      var initializer = element.constantInitializer;
+      if (initializer != null) {
+        initializer.accept(this);
+      }
+    }
+  }
+
+  void applyToEnumConstants(List<FieldElement> constants) {
+    for (var constant in constants) {
+      applyToMetadata(constant);
+    }
+  }
+
+  void applyToMetadata(Element element) {
+    for (var annotation in element.metadata) {
+      var node = (annotation as ElementAnnotationImpl).annotationAst;
+      node.accept(this);
+    }
+  }
+
+  void applyToTypeParameters(List<TypeParameterElement> typeParameters) {
+    for (var typeParameter in typeParameters) {
+      applyToMetadata(typeParameter);
+    }
+  }
+
+  @override
+  void visitAnnotation(Annotation node) {
+    _applyToToken(node.atSign);
+    super.visitAnnotation(node);
+  }
+
+  @override
+  void visitArgumentList(ArgumentList node) {
+    _applyToToken(node.leftParenthesis);
+    _applyToToken(node.rightParenthesis);
+    super.visitArgumentList(node);
+  }
+
+  @override
+  void visitBooleanLiteral(BooleanLiteral node) {
+    _applyToToken(node.literal);
+  }
+
+  @override
+  void visitDoubleLiteral(DoubleLiteral node) {
+    _applyToToken(node.literal);
+  }
+
+  @override
+  void visitIndexExpression(IndexExpression node) {
+    _applyToToken(node.leftBracket);
+    _applyToToken(node.rightBracket);
+    super.visitIndexExpression(node);
+  }
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    _applyToToken(node.keyword);
+    super.visitInstanceCreationExpression(node);
+  }
+
+  @override
+  void visitIntegerLiteral(IntegerLiteral node) {
+    _applyToToken(node.literal);
+  }
+
+  @override
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
+    _applyToToken(node.leftParenthesis);
+    _applyToToken(node.rightParenthesis);
+    super.visitParenthesizedExpression(node);
+  }
+
+  @override
+  void visitPrefixExpression(PrefixExpression node) {
+    _applyToToken(node.operator);
+    super.visitPrefixExpression(node);
+  }
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    _applyToToken(node.token);
+  }
+
+  @override
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
+    _applyToToken(node.literal);
+  }
+
+  @override
+  void visitThrowExpression(ThrowExpression node) {
+    _applyToToken(node.throwKeyword);
+    super.visitThrowExpression(node);
+  }
+
+  void _applyToToken(Token? token) {
+    if (token != null) {
+      var offset = _iterator.take();
+      if (offset != null) {
+        token.offset = offset;
+      }
+    }
+  }
+}
+
+class _OffsetsCollector extends RecursiveAstVisitor<void> {
+  final List<int> offsets = [];
+
+  @override
+  void visitAnnotation(Annotation node) {
+    _addToken(node.atSign);
+    super.visitAnnotation(node);
+  }
+
+  @override
+  void visitArgumentList(ArgumentList node) {
+    _addToken(node.leftParenthesis);
+    _addToken(node.rightParenthesis);
+    super.visitArgumentList(node);
+  }
+
+  @override
+  void visitBooleanLiteral(BooleanLiteral node) {
+    _addToken(node.literal);
+  }
+
+  @override
+  void visitDoubleLiteral(DoubleLiteral node) {
+    _addToken(node.literal);
+  }
+
+  @override
+  void visitIndexExpression(IndexExpression node) {
+    _addToken(node.leftBracket);
+    _addToken(node.rightBracket);
+    super.visitIndexExpression(node);
+  }
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    _addToken(node.keyword);
+    super.visitInstanceCreationExpression(node);
+  }
+
+  @override
+  void visitIntegerLiteral(IntegerLiteral node) {
+    _addToken(node.literal);
+  }
+
+  @override
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
+    _addToken(node.leftParenthesis);
+    _addToken(node.rightParenthesis);
+    super.visitParenthesizedExpression(node);
+  }
+
+  @override
+  void visitPrefixExpression(PrefixExpression node) {
+    _addToken(node.operator);
+    super.visitPrefixExpression(node);
+  }
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    _addToken(node.token);
+  }
+
+  @override
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
+    _addToken(node.literal);
+  }
+
+  @override
+  void visitThrowExpression(ThrowExpression node) {
+    _addToken(node.throwKeyword);
+    super.visitThrowExpression(node);
+  }
+
+  void _addToken(Token? token) {
+    if (token != null) {
+      offsets.add(token.offset);
+    }
+  }
+}
+
+class _SafeListIterator<T> {
+  final List<T> _elements;
+  int _index = 0;
+
+  _SafeListIterator(this._elements);
+
+  bool get hasNext {
+    return _index < _elements.length;
+  }
+
+  T? take() {
+    if (hasNext) {
+      return _elements[_index++];
+    } else {
+      return null;
+    }
+  }
+}
+
 extension on String {
   String? get nullIfEmpty {
     return isNotEmpty ? this : null;
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index fc64f2a..6a9890f 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -11,10 +11,12 @@
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/lint/pub.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/util/uri.dart';
 import 'package:analyzer/src/workspace/pub.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
+import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 import 'package:yaml/yaml.dart';
 
@@ -190,8 +192,8 @@
   UriResolver get packageUriResolver => PackageBuildPackageUriResolver(
       this, PackageMapUriResolver(provider, packageMap));
 
-  @override
-  String? get pubspecContent {
+  /// Return the content of the pubspec file, `null` if cannot be read.
+  String? get _pubspecContent {
     try {
       return _pubspecFile.readAsStringSync();
     } catch (_) {}
@@ -225,6 +227,12 @@
     return context.join('lib', filePath);
   }
 
+  @internal
+  @override
+  void contributeToResolutionSalt(ApiSignature buffer) {
+    buffer.addString(_pubspecContent ?? '');
+  }
+
   @override
   SourceFactory createSourceFactory(
     DartSdk? sdk,
@@ -334,11 +342,9 @@
     implements PubWorkspacePackage {
   @override
   late final Pubspec? pubspec = () {
-    try {
-      final content = workspace._pubspecFile.readAsStringSync();
+    final content = workspace._pubspecContent;
+    if (content != null) {
       return Pubspec.parse(content);
-    } catch (_) {
-      // Pubspec will be null.
     }
   }();
 
diff --git a/pkg/analyzer/lib/src/workspace/pub.dart b/pkg/analyzer/lib/src/workspace/pub.dart
index 76b85c1..a477bec 100644
--- a/pkg/analyzer/lib/src/workspace/pub.dart
+++ b/pkg/analyzer/lib/src/workspace/pub.dart
@@ -6,8 +6,10 @@
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/lint/pub.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
 import 'package:analyzer/src/workspace/simple.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
+import 'package:meta/meta.dart';
 
 /// Information about a Pub workspace.
 class PubWorkspace extends SimpleWorkspace {
@@ -32,12 +34,18 @@
   }
 
   /// Return the content of the pubspec file, `null` if cannot be read.
-  String? get pubspecContent {
+  String? get _pubspecContent {
     try {
       return _pubspecFile.readAsStringSync();
     } catch (_) {}
   }
 
+  @internal
+  @override
+  void contributeToResolutionSalt(ApiSignature buffer) {
+    buffer.addString(_pubspecContent ?? '');
+  }
+
   @override
   WorkspacePackage? findPackageFor(String filePath) {
     final Folder folder = provider.getFolder(filePath);
@@ -89,11 +97,9 @@
   Pubspec? get pubspec {
     if (!_parsedPubspec) {
       _parsedPubspec = true;
-      try {
-        final content = workspace._pubspecFile.readAsStringSync();
+      final content = workspace._pubspecContent;
+      if (content != null) {
         _pubspec = Pubspec.parse(content);
-      } catch (_) {
-        // Pubspec will be null.
       }
     }
     return _pubspec;
diff --git a/pkg/analyzer/lib/src/workspace/workspace.dart b/pkg/analyzer/lib/src/workspace/workspace.dart
index 4b86e1d..c4cb125 100644
--- a/pkg/analyzer/lib/src/workspace/workspace.dart
+++ b/pkg/analyzer/lib/src/workspace/workspace.dart
@@ -5,8 +5,10 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/workspace/bazel.dart';
+import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 
 /// Abstract superclass of classes that provide information about the workspace
@@ -21,6 +23,14 @@
   /// The absolute workspace root path.
   String get root;
 
+  /// If this workspace has any configuration that affects resolution
+  /// (for example diagnostics), then this configuration should be included
+  /// into the result key.
+  ///
+  /// The resolution salt is later added to the key of every file.
+  @internal
+  void contributeToResolutionSalt(ApiSignature buffer) {}
+
   /// Create the source factory that should be used to resolve Uris to
   /// [Source]s. The [sdk] may be `null`. The [summaryData] can also be `null`.
   SourceFactory createSourceFactory(
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 702e0c2..3b69c9b8 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1374,65 +1374,6 @@
 ''');
   }
 
-  test_functionWithoutCall() async {
-    await assertNoErrorsInCode(r'''
-abstract class A implements Function {
-}
-class B implements A {
-  void call() {}
-}
-class C extends A {
-  void call() {}
-}
-class D extends C {
-}
-''');
-  }
-
-  test_functionWithoutCall_doesNotImplementFunction() async {
-    await assertNoErrorsInCode("class A {}");
-  }
-
-  test_functionWithoutCall_staticCallMethod() async {
-    await assertNoErrorsInCode(r'''
-class A { }
-class B extends A {
-  static call() { }
-}
-''');
-  }
-
-  test_functionWithoutCall_withNoSuchMethod() async {
-    // 16078
-    await assertNoErrorsInCode(r'''
-class A implements Function {
-  noSuchMethod(inv) {
-    return 42;
-  }
-}
-''');
-  }
-
-  test_functionWithoutCall_withNoSuchMethod_mixin() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  noSuchMethod(inv) {}
-}
-class B extends Object with A implements Function {
-}
-''');
-  }
-
-  test_functionWithoutCall_withNoSuchMethod_superclass() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  noSuchMethod(inv) {}
-}
-class B extends A implements Function {
-}
-''');
-  }
-
   test_genericTypeAlias_castsAndTypeChecks_hasTypeParameters() async {
     await assertNoErrorsInCode('''
 typedef Foo<S> = S Function<T>(T x);
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 80f31e7..b5f84ce 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -18,60 +18,6 @@
   // TODO(brianwilkerson) Figure out what to do with the rest of these tests.
   //  The names do not correspond to diagnostic codes, so it isn't clear what
   //  they're testing.
-  test_functionWithoutCall_direct() async {
-    await assertNoErrorsInCode('''
-class A implements Function {
-}''');
-  }
-
-  test_functionWithoutCall_direct_typeAlias() async {
-    await assertNoErrorsInCode('''
-class M {}
-class A = Object with M implements Function;''');
-  }
-
-  test_functionWithoutCall_indirect_extends() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {
-}
-class B extends A {
-}''');
-  }
-
-  test_functionWithoutCall_indirect_extends_typeAlias() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {}
-class M {}
-class B = A with M;''');
-  }
-
-  test_functionWithoutCall_indirect_implements() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {
-}
-class B implements A {
-}''');
-  }
-
-  test_functionWithoutCall_indirect_implements_typeAlias() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {}
-class M {}
-class B = Object with M implements A;''');
-  }
-
-  test_functionWithoutCall_mixin_implements() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {}
-class B extends Object with A {}''');
-  }
-
-  test_functionWithoutCall_mixin_implements_typeAlias() async {
-    await assertNoErrorsInCode('''
-abstract class A implements Function {}
-class B = Object with A;''');
-  }
-
   test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation() async {
     // 15028
     await assertErrorsInCode('''
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index f58dbf4..96b3160 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -141,24 +141,6 @@
     assertType(a.supertype, 'Object');
   }
 
-  test_element_typeFunction_implements() async {
-    await assertNoErrorsInCode(r'''
-class A {}
-class B {}
-class C implements A, Function, B {}
-''');
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
-    assertElementTypes(
-      c.interfaces,
-      [
-        interfaceTypeNone(a),
-        interfaceTypeNone(b),
-      ],
-    );
-  }
-
   test_element_typeFunction_with() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index 71db9f6..ee9aabd 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -235,7 +235,7 @@
     await assertErrorsInCode(r'''
 mixin M<M> {}
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, 8, 1),
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MIXIN, 8, 1),
     ]);
   }
 
@@ -245,7 +245,7 @@
   var T;
 }
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS, 8,
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
           1),
     ]);
   }
@@ -256,7 +256,7 @@
   get T => null;
 }
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS, 8,
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
           1),
     ]);
   }
@@ -267,7 +267,7 @@
   T() {}
 }
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS, 8,
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
           1),
     ]);
   }
@@ -278,7 +278,7 @@
   static T() {}
 }
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS, 8,
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
           1),
     ]);
   }
@@ -289,7 +289,7 @@
   void set T(_) {}
 }
 ''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS, 8,
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
           1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
index 634dfff..ecf579a 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
@@ -11,6 +11,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(ConflictingTypeVariableAndClassTest);
     defineReflectiveTests(ConflictingTypeVariableAndExtensionTest);
+    defineReflectiveTests(ConflictingTypeVariableAndMixinTest);
   });
 }
 
@@ -23,14 +24,6 @@
       error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, 8, 1),
     ]);
   }
-
-  test_conflict_on_mixin() async {
-    await assertErrorsInCode(r'''
-mixin T<T> {}
-''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, 8, 1),
-    ]);
-  }
 }
 
 @reflectiveTest
@@ -44,3 +37,14 @@
     ]);
   }
 }
+
+@reflectiveTest
+class ConflictingTypeVariableAndMixinTest extends PubPackageResolutionTest {
+  test_conflict_on_mixin() async {
+    await assertErrorsInCode(r'''
+mixin T<T> {}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MIXIN, 8, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
index 7805bea..ff439eb 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
@@ -9,50 +9,15 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(ConflictingTypeVariableAndMemberClassTest);
     defineReflectiveTests(ConflictingTypeVariableAndMemberExtensionTest);
-    defineReflectiveTests(ConflictingTypeVariableAndMemberTest);
+    defineReflectiveTests(ConflictingTypeVariableAndMemberMixinTest);
   });
 }
 
 @reflectiveTest
-class ConflictingTypeVariableAndMemberExtensionTest
+class ConflictingTypeVariableAndMemberClassTest
     extends PubPackageResolutionTest {
-  test_getter() async {
-    await assertErrorsInCode(r'''
-extension A<T> on String {
-  get T => null;
-}
-''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
-          12, 1),
-    ]);
-  }
-
-  test_method() async {
-    await assertErrorsInCode(r'''
-extension A<T> on String {
-  T() {}
-}
-''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
-          12, 1),
-    ]);
-  }
-
-  test_setter() async {
-    await assertErrorsInCode(r'''
-extension A<T> on String {
-  set T(x) {}
-}
-''', [
-      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
-          12, 1),
-    ]);
-  }
-}
-
-@reflectiveTest
-class ConflictingTypeVariableAndMemberTest extends PubPackageResolutionTest {
   test_field() async {
     await assertErrorsInCode(r'''
 class A<T> {
@@ -108,3 +73,99 @@
     ]);
   }
 }
+
+@reflectiveTest
+class ConflictingTypeVariableAndMemberExtensionTest
+    extends PubPackageResolutionTest {
+  test_getter() async {
+    await assertErrorsInCode(r'''
+extension A<T> on String {
+  get T => null;
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
+          12, 1),
+    ]);
+  }
+
+  test_method() async {
+    await assertErrorsInCode(r'''
+extension A<T> on String {
+  T() {}
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
+          12, 1),
+    ]);
+  }
+
+  test_setter() async {
+    await assertErrorsInCode(r'''
+extension A<T> on String {
+  set T(x) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
+          12, 1),
+    ]);
+  }
+}
+
+@reflectiveTest
+class ConflictingTypeVariableAndMemberMixinTest
+    extends PubPackageResolutionTest {
+  test_field() async {
+    await assertErrorsInCode(r'''
+mixin M<T> {
+  var T;
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
+          1),
+    ]);
+  }
+
+  test_getter() async {
+    await assertErrorsInCode(r'''
+mixin M<T> {
+  get T => null;
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
+          1),
+    ]);
+  }
+
+  test_method() async {
+    await assertErrorsInCode(r'''
+mixin M<T> {
+  T() {}
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
+          1),
+    ]);
+  }
+
+  test_method_static() async {
+    await assertErrorsInCode(r'''
+mixin M<T> {
+  static T() {}
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
+          1),
+    ]);
+  }
+
+  test_setter() async {
+    await assertErrorsInCode(r'''
+mixin M<T> {
+  set T(x) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN, 8,
+          1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart
new file mode 100644
index 0000000..99e127e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DeprecatedImplementsFunctionTest);
+  });
+}
+
+@reflectiveTest
+class DeprecatedImplementsFunctionTest extends PubPackageResolutionTest {
+  test_core() async {
+    await assertErrorsInCode('''
+class A implements Function {}
+''', [
+      error(HintCode.DEPRECATED_IMPLEMENTS_FUNCTION, 19, 8),
+    ]);
+  }
+
+  test_core2() async {
+    await assertErrorsInCode('''
+class A implements Function, Function {}
+''', [
+      error(HintCode.DEPRECATED_IMPLEMENTS_FUNCTION, 19, 8),
+      error(CompileTimeErrorCode.IMPLEMENTS_REPEATED, 29, 8),
+    ]);
+  }
+
+  test_local() async {
+    await assertErrorsInCode('''
+class Function {}
+class A implements Function {}
+''', [
+      error(HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, 6, 8),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 0625bd7..ef8d0f6 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -124,6 +124,8 @@
 import 'deprecated_extends_function_test.dart' as deprecated_extends_function;
 import 'deprecated_function_class_declaration_test.dart'
     as deprecated_function_class_declaration;
+import 'deprecated_implements_function_test.dart'
+    as deprecated_implements_function;
 import 'deprecated_member_use_test.dart' as deprecated_member_use;
 import 'deprecated_mixin_function_test.dart' as deprecated_mixin_function;
 import 'division_optimization_test.dart' as division_optimization;
@@ -783,6 +785,7 @@
     definitely_unassigned_late_local_variable.main();
     deprecated_extends_function.main();
     deprecated_function_class_declaration.main();
+    deprecated_implements_function.main();
     deprecated_member_use.main();
     deprecated_mixin_function.main();
     division_optimization.main();
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index af2043f..108b829 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -52,8 +52,9 @@
   bool withCodeRanges = false,
   bool withConstElements = true,
   bool withExportScope = false,
-  bool withFullyResolvedAst = false,
   bool withOffsets = false,
+  bool withResolvedAst = false,
+  bool withResolvedAstOffsets = false,
   bool withSyntheticAccessors = false,
   bool withSyntheticFields = false,
   bool withTypes = false,
@@ -65,8 +66,9 @@
     withCodeRanges: withCodeRanges,
     withConstElements: withConstElements,
     withExportScope: withExportScope,
-    withFullyResolvedAst: withFullyResolvedAst,
     withOffsets: withOffsets,
+    withResolvedAst: withResolvedAst,
+    withResolvedAstOffsets: withResolvedAstOffsets,
     withSyntheticAccessors: withSyntheticAccessors,
     withSyntheticFields: withSyntheticFields,
     withTypes: withTypes,
@@ -135,8 +137,9 @@
   final bool withAliasElementArguments;
   final bool withCodeRanges;
   final bool withExportScope;
-  final bool withFullyResolvedAst;
   final bool withOffsets;
+  final bool withResolvedAst;
+  final bool withResolvedAstOffsets;
   final bool withConstElements;
   final bool withSyntheticAccessors;
   final bool withSyntheticFields;
@@ -152,8 +155,9 @@
     this.withCodeRanges = false,
     this.withConstElements = true,
     this.withExportScope = false,
-    this.withFullyResolvedAst = false,
     this.withOffsets = false,
+    this.withResolvedAst = false,
+    this.withResolvedAstOffsets = false,
     this.withSyntheticAccessors = false,
     this.withSyntheticFields = false,
     this.withTypes = false,
@@ -249,7 +253,7 @@
 
     buffer.writeln('}');
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       _withIndent(() {
         _writeResolvedMetadata(e.metadata);
         _writeResolvedTypeParameters(e.typeParameters);
@@ -315,9 +319,10 @@
     }
 
     var initializers = (e as ConstructorElementImpl).constantInitializers;
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       buffer.writeln(';');
       _withIndent(() {
+        _writeResolvedMetadata(e.metadata);
         if (initializers.isNotEmpty) {
           _writelnWithIndent('constantInitializers');
           _withIndent(() {
@@ -395,7 +400,7 @@
 
     buffer.writeln('}');
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       _withIndent(() {
         _writeResolvedMetadata(e.metadata);
         _writeResolvedTypeParameters(e.typeParameters);
@@ -421,8 +426,10 @@
 
     buffer.writeln(' {}');
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       _withIndent(() {
+        _writeResolvedTypeParameters(e.typeParameters);
+        _writeResolvedMetadata(e.metadata);
         _writeParameterElementDefaultValues(e.parameters);
       });
     }
@@ -455,7 +462,7 @@
 
       buffer.writeln(';');
 
-      if (withFullyResolvedAst) {
+      if (withResolvedAst) {
         _withIndent(() {
           _writeResolvedMetadata(e.metadata);
         });
@@ -508,7 +515,7 @@
   }
 
   void writeMetadata(Element e, String prefix, String separator) {
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       return;
     }
 
@@ -546,7 +553,7 @@
       buffer.writeln(' {}');
     }
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       _withIndent(() {
         _writeResolvedTypeParameters(e.typeParameters);
         _writeResolvedMetadata(e.metadata);
@@ -849,7 +856,7 @@
     writeName(e);
     writeCodeRange(e);
 
-    if (!withFullyResolvedAst) {
+    if (!withResolvedAst) {
       if (e.typeParameters.isNotEmpty) {
         buffer.write('/*');
         writeTypeParameterElements(e.typeParameters, withDefault: false);
@@ -963,6 +970,13 @@
     } else {
       buffer.writeln(' {}');
     }
+
+    if (withResolvedAst) {
+      _withIndent(() {
+        _writeResolvedMetadata(e.metadata);
+        _writeParameterElementDefaultValues(e.parameters);
+      });
+    }
   }
 
   void writePropertyInducingElement(PropertyInducingElement e) {
@@ -1011,7 +1025,7 @@
 
     writeTypeInferenceError(e);
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       buffer.writeln(';');
       _withIndent(() {
         _writeResolvedMetadata(e.metadata);
@@ -1087,7 +1101,7 @@
 
     buffer.writeln(';');
 
-    if (withFullyResolvedAst) {
+    if (withResolvedAst) {
       _withIndent(() {
         _writeResolvedMetadata(e.metadata);
         _writeResolvedTypeParameters(e.typeParameters);
@@ -1155,7 +1169,7 @@
     List<TypeParameterElement> elements, {
     required bool withDefault,
   }) {
-    if (!withFullyResolvedAst) {
+    if (!withResolvedAst) {
       writeList<TypeParameterElement>('<', '>', elements, ', ', (e) {
         writeTypeParameterElement(e, withDefault: withDefault);
       });
@@ -1332,6 +1346,7 @@
         sink: buffer,
         indent: indent,
         withNullability: true,
+        withOffsets: withResolvedAstOffsets,
       ),
     );
   }
diff --git a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
index 1ed2d25..2c44b7f 100644
--- a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
+++ b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
@@ -36,6 +36,9 @@
   /// If `true`, types should be printed with nullability suffixes.
   final bool _withNullability;
 
+  /// If `true`, selected tokens and nodes should be printed with offsets.
+  final bool _withOffsets;
+
   String _indent = '';
 
   ResolvedAstPrinter({
@@ -44,10 +47,12 @@
     required String indent,
     CodeLinesProvider? codeLinesProvider,
     bool withNullability = false,
+    bool withOffsets = false,
   })  : _selfUriStr = selfUriStr,
         _sink = sink,
         _codeLinesProvider = codeLinesProvider,
         _withNullability = withNullability,
+        _withOffsets = withOffsets,
         _indent = indent;
 
   @override
@@ -68,6 +73,7 @@
     _writeln('Annotation');
     _withIndent(() {
       _writeNode('arguments', node.arguments);
+      _writeOffset('atSign.offset', node.atSign.offset);
       _writeNode('constructorName', node.constructorName);
       _writeElement('element', node.element);
       _writeNode('name', node.name);
@@ -1173,6 +1179,7 @@
     _writeNextCodeLine(node);
     _writeln('SimpleIdentifier');
     _withIndent(() {
+      _writeOffset('offset', node.offset);
       _writeElement('staticElement', node.staticElement);
       _writeType('staticType', node.staticType);
       _writeToken('token', node.token);
@@ -1788,6 +1795,12 @@
     }
   }
 
+  void _writeOffset(String name, int offset) {
+    if (_withOffsets) {
+      _writelnWithIndent('$name: $offset');
+    }
+  }
+
   void _writeParameterElements(List<ParameterElement> parameters) {
     _writelnWithIndent('parameters');
     _withIndent(() {
@@ -1833,8 +1846,10 @@
 
   void _writeToken(String name, Token? token) {
     if (token != null) {
-      _sink.write(_indent);
-      _sink.writeln('$name: $token');
+      _writelnWithIndent('$name: $token');
+      _withIndent(() {
+        _writeOffset('offset', token.offset);
+      });
     }
   }
 
@@ -1848,8 +1863,7 @@
       _writelnWithIndent(name);
       _withIndent(() {
         for (var type in types) {
-          _sink.write(_indent);
-          _sink.writeln('$type');
+          _writelnWithIndent('$type');
         }
       });
     }
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 75b4bd01..7260d56 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -337,7 +337,7 @@
         staticElement: package:test/a.dart::@class::Base::@constructor::named
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_class_alias_with_forwarding_constructors() async {
@@ -1053,7 +1053,7 @@
   const B();
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_class_field_static() async {
@@ -1255,6 +1255,22 @@
 ''');
   }
 
+  test_class_interfaces_Function() async {
+    var library = await checkLibrary('''
+class A {}
+class B {}
+class C implements A, Function, B {}
+''');
+    checkElementText(library, r'''
+class A {
+}
+class B {
+}
+class C implements A, B {
+}
+''');
+  }
+
   test_class_interfaces_unresolved() async {
     var library = await checkLibrary(
         'class C implements X, Y, Z {} class X {} class Z {}',
@@ -2983,7 +2999,7 @@
         writeType: dynamic
       staticType: int
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -3019,7 +3035,7 @@
         literal: 0
         staticType: int
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -3133,7 +3149,7 @@
         staticType: List<int>
         token: a
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -3921,8 +3937,12 @@
               token: int
             type: int
 T f(T a) {}
+  typeParameters
+    T
+      bound: null
+      defaultType: null
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4025,7 +4045,7 @@
       writeElement: self::@getter::a
       writeType: dynamic
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4053,7 +4073,7 @@
       staticElement: <null>
       staticType: int
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4081,7 +4101,7 @@
       staticElement: dart:core::@class::int::@method::unary-
       staticType: int
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4112,7 +4132,7 @@
       staticElement: package:test/a.dart::@extension::E::@method::unary-
       staticType: int
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4144,7 +4164,7 @@
       writeElement: self::@getter::a
       writeType: dynamic
 ''',
-      withFullyResolvedAst: true,
+      withResolvedAst: true,
     );
   }
 
@@ -4742,7 +4762,7 @@
             token: a
       staticType: List<int?>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_const_topLevel_parenthesis() async {
@@ -5129,7 +5149,7 @@
         staticType: int
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_constructor_initializers_field_withParameter() async {
@@ -5199,7 +5219,7 @@
         staticElement: self::@class::A::@constructor::•
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_constructor_initializers_superInvocation_named() async {
@@ -5305,7 +5325,7 @@
         staticElement: self::@class::A::@constructor::•
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_constructor_initializers_thisInvocation_named() async {
@@ -6026,7 +6046,7 @@
             token: int
           type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_defaultValue_methodMember_legacy() async {
@@ -6056,7 +6076,7 @@
         substitution: {}
       staticType: int* Function(Comparable<dynamic>*, Comparable<dynamic>*)*
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_defaultValue_refersToExtension_method_inside() async {
@@ -7231,7 +7251,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_field_inferred_type_static_implicit_initialized() async {
@@ -7404,7 +7424,7 @@
   C2();
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_function_async() async {
@@ -7525,7 +7545,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_function_parameter_fieldFormal_functionTyped() async {
@@ -8030,7 +8050,7 @@
               type: int
             type: int Function(String)
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_asTypeArgument_ofAnnotation_topLevelVariable() async {
@@ -8097,7 +8117,7 @@
               type: int
             type: int Function(String)
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_asTypeArgument_parameters_optionalNamed() async {
@@ -8174,7 +8194,7 @@
                 type: String Function({int? a})
       staticType: A<String Function({int? a})>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_asTypeArgument_parameters_optionalPositional() async {
@@ -8251,7 +8271,7 @@
                 type: String Function([int?])
       staticType: A<String Function([int?])>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_asTypeArgument_parameters_requiredNamed() async {
@@ -8329,7 +8349,7 @@
                 type: String Function({required int a})
       staticType: A<String Function({required int a})>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_asTypeArgument_parameters_requiredPositional() async {
@@ -8399,7 +8419,7 @@
                 type: String Function(int)
       staticType: A<String Function(int)>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_genericFunction_boundOf_typeParameter_ofMixin() async {
@@ -9844,7 +9864,7 @@
         staticElement: package:test/a.dart::@class::A
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_invalid_annotation_unprefixed_constructor() async {
@@ -9881,7 +9901,7 @@
         staticElement: package:test/a.dart::@class::A::@constructor::named
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_invalid_importPrefix_asTypeArgument() async {
@@ -10328,7 +10348,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_class_scope() async {
@@ -10384,7 +10404,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_classDeclaration() async {
@@ -10461,7 +10481,7 @@
         staticElement: self::@class::A::@constructor::named
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_generic_inference() async {
@@ -10513,7 +10533,7 @@
           substitution: {T: int}
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_generic_typeArguments() async {
@@ -10563,7 +10583,7 @@
               token: int
             type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_generic_typeArguments_disabledGenericMetadata() async {
@@ -10612,7 +10632,7 @@
               token: int
             type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_prefixed() async {
@@ -10658,7 +10678,7 @@
         staticElement: package:test/foo.dart::@class::A
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_prefixed_generic_inference() async {
@@ -10709,7 +10729,7 @@
         staticElement: package:test/foo.dart::@class::A
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_prefixed_generic_typeArguments() async {
@@ -10764,7 +10784,7 @@
               token: int
             type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_named_synthetic_ofClassAlias_generic() async {
@@ -10828,7 +10848,7 @@
 mixin B on Object {
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed() async {
@@ -10861,7 +10881,7 @@
         staticType: null
         token: A
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_generic_inference() async {
@@ -10901,7 +10921,7 @@
         staticType: null
         token: A
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_generic_typeArguments() async {
@@ -10945,7 +10965,7 @@
               token: int
             type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_prefixed() async {
@@ -10980,7 +11000,7 @@
         staticElement: package:test/foo.dart::@class::A
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_prefixed_generic_inference() async {
@@ -11025,7 +11045,7 @@
         staticElement: package:test/foo.dart::@class::A
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_prefixed_generic_typeArguments() async {
@@ -11074,7 +11094,7 @@
               token: int
             type: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_unnamed_synthetic_ofClassAlias_generic() async {
@@ -11122,7 +11142,7 @@
 mixin B on Object {
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_constructor_call_with_args() async {
@@ -11188,7 +11208,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_enumConstantDeclaration_instanceCreation() async {
@@ -11244,7 +11264,7 @@
   const A(final dynamic this.value);
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_enumDeclaration() async {
@@ -11271,7 +11291,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_exportDirective() async {
@@ -11338,7 +11358,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_extensionDeclaration() async {
@@ -11507,7 +11527,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_importDirective_hasShow() async {
@@ -11534,7 +11554,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_inAliasedElement_formalParameter() async {
@@ -11562,7 +11582,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_inAliasedElement_formalParameter2() async {
@@ -11592,7 +11612,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_inAliasedElement_typeParameter() async {
@@ -11624,7 +11644,7 @@
       literal: 42
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_invalid_classDeclaration() async {
@@ -11778,7 +11798,7 @@
       literal: 0
       staticType: int
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_mixinDeclaration() async {
@@ -11800,6 +11820,648 @@
 ''');
   }
 
+  test_metadata_offsets_onClass() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+class A<@foo T> {}
+''');
+    checkElementText(
+        library,
+        r'''
+class A {
+}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+  typeParameters
+    T
+      bound: null
+      defaultType: dynamic
+      metadata
+        Annotation
+          atSign.offset: 29
+          element: self::@getter::foo
+          name: SimpleIdentifier
+            offset: 30
+            staticElement: self::@getter::foo
+            staticType: null
+            token: foo
+              offset: 30
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onClassConstructor() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {
+  @foo
+  A(@foo int a);
+}
+''');
+    // TODO(scheglov) Enhance to show metadata on formal parameters?
+    checkElementText(
+        library,
+        r'''
+class A {
+  A(int a);
+    metadata
+      Annotation
+        atSign.offset: 28
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 29
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 29
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onClassGetter() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {
+  @foo
+  int get getter => 0;
+}
+''');
+    checkElementText(
+        library,
+        r'''
+class A {
+  int get getter {}
+    metadata
+      Annotation
+        atSign.offset: 28
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 29
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 29
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onClassMethod() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {
+  @foo
+  void method<@foo T>(@foo int a) {}
+}
+''');
+    // TODO(scheglov) Enhance to show metadata on formal parameters?
+    checkElementText(
+        library,
+        r'''
+class A {
+  void method(int a) {}
+    typeParameters
+      T
+        bound: null
+        defaultType: null
+        metadata
+          Annotation
+            atSign.offset: 47
+            element: self::@getter::foo
+            name: SimpleIdentifier
+              offset: 48
+              staticElement: self::@getter::foo
+              staticType: null
+              token: foo
+                offset: 48
+    metadata
+      Annotation
+        atSign.offset: 28
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 29
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 29
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onClassSetter() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {
+  @foo
+  set setter(@foo int a) {}
+}
+''');
+    // TODO(scheglov) Enhance to show metadata on formal parameters?
+    checkElementText(
+        library,
+        r'''
+class A {
+  void set setter(int a) {}
+    metadata
+      Annotation
+        atSign.offset: 28
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 29
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 29
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onClassTypeAlias() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {}
+mixin M {}
+
+@foo
+class B<@foo T> = A with M;
+''');
+    checkElementText(
+        library,
+        r'''
+class A {
+}
+class alias B extends A with M {
+  synthetic B();
+    constantInitializers
+      SuperConstructorInvocation
+        argumentList: ArgumentList
+        staticElement: self::@class::A::@constructor::•
+}
+  metadata
+    Annotation
+      atSign.offset: 39
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 40
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 40
+  typeParameters
+    T
+      bound: null
+      defaultType: dynamic
+      metadata
+        Annotation
+          atSign.offset: 52
+          element: self::@getter::foo
+          name: SimpleIdentifier
+            offset: 53
+            staticElement: self::@getter::foo
+            staticType: null
+            token: foo
+              offset: 53
+mixin M on Object {
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onEnum() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+enum E {
+  @foo e1,
+  e2,
+  @foo e3,
+}
+''');
+    checkElementText(
+        library,
+        r'''
+enum E {
+  synthetic final int index;
+  synthetic static const List<E> values;
+  static const E e1;
+    metadata
+      Annotation
+        atSign.offset: 32
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 33
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 33
+  static const E e2;
+  static const E e3;
+    metadata
+      Annotation
+        atSign.offset: 49
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 50
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 50
+  String toString() {}
+}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onExtension() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+extension E<@foo T> on List<T> {}
+''');
+    checkElementText(
+        library,
+        r'''
+extension E on List<T> {
+}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+  typeParameters
+    T
+      bound: null
+      defaultType: null
+      metadata
+        Annotation
+          atSign.offset: 33
+          element: self::@getter::foo
+          name: SimpleIdentifier
+            offset: 34
+            staticElement: self::@getter::foo
+            staticType: null
+            token: foo
+              offset: 34
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onFieldDeclaration() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+class A {
+  @foo
+  static isNotConst = 1;
+
+  @foo
+  static const isConst = 2;
+}
+''');
+    checkElementText(
+        library,
+        r'''
+class A {
+  static int isNotConst;
+    metadata
+      Annotation
+        atSign.offset: 28
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 29
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 29
+  static const int isConst;
+    metadata
+      Annotation
+        atSign.offset: 61
+        element: self::@getter::foo
+        name: SimpleIdentifier
+          offset: 62
+          staticElement: self::@getter::foo
+          staticType: null
+          token: foo
+            offset: 62
+    constantInitializer
+      IntegerLiteral
+        literal: 2
+          offset: 91
+        staticType: int
+}
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onMixin() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+mixin A<@foo T> {}
+''');
+    checkElementText(
+        library,
+        r'''
+mixin A on Object {
+}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+  typeParameters
+    T
+      bound: null
+      defaultType: dynamic
+      metadata
+        Annotation
+          atSign.offset: 29
+          element: self::@getter::foo
+          name: SimpleIdentifier
+            offset: 30
+            staticElement: self::@getter::foo
+            staticType: null
+            token: foo
+              offset: 30
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onUnitFunction() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+void f<@foo T>(@foo int a) {}
+''');
+    // TODO(scheglov) Enhance to show metadata on formal parameters?
+    checkElementText(
+        library,
+        r'''
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+void f(int a) {}
+  typeParameters
+    T
+      bound: null
+      defaultType: null
+      metadata
+        Annotation
+          atSign.offset: 28
+          element: self::@getter::foo
+          name: SimpleIdentifier
+            offset: 29
+            staticElement: self::@getter::foo
+            staticType: null
+            token: foo
+              offset: 29
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onUnitGetter() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+int get getter => 0;
+''');
+    checkElementText(
+        library,
+        r'''
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+int get getter {}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onUnitSetter() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+set setter(@foo int a) {}
+''');
+    // TODO(scheglov) Enhance to show metadata on formal parameters?
+    checkElementText(
+        library,
+        r'''
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+void set setter(int a) {}
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
+  test_metadata_offsets_onUnitVariable() async {
+    var library = await checkLibrary(r'''
+const foo = 0;
+
+@foo
+var isNotConst = 1;
+
+@foo
+const isConst = 2;
+''');
+    checkElementText(
+        library,
+        r'''
+const int foo;
+  constantInitializer
+    IntegerLiteral
+      literal: 0
+        offset: 12
+      staticType: int
+int isNotConst;
+  metadata
+    Annotation
+      atSign.offset: 16
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 17
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 17
+const int isConst;
+  metadata
+    Annotation
+      atSign.offset: 42
+      element: self::@getter::foo
+      name: SimpleIdentifier
+        offset: 43
+        staticElement: self::@getter::foo
+        staticType: null
+        token: foo
+          offset: 43
+  constantInitializer
+    IntegerLiteral
+      literal: 2
+        offset: 63
+      staticType: int
+''',
+        withResolvedAst: true,
+        withResolvedAstOffsets: true);
+  }
+
   test_metadata_partDirective() async {
     addSource('/foo.dart', 'part of L;');
     var library = await checkLibrary('''
@@ -11986,7 +12648,7 @@
         staticType: null
         token: a
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_value_class_staticField() async {
@@ -12026,7 +12688,7 @@
         staticElement: self::@class::A::@getter::x
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_value_enum_constant() async {
@@ -12065,7 +12727,7 @@
         staticElement: self::@enum::E::@getter::b
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_value_extension_staticField() async {
@@ -12105,7 +12767,7 @@
         staticType: int
 }
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_metadata_value_prefix_extension_staticField() async {
@@ -12146,7 +12808,7 @@
         staticElement: package:test/foo.dart::@extension::E
         staticType: null
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_method_documented() async {
@@ -15473,7 +16135,7 @@
         staticType: null
         token: foo
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_unresolved_annotation_simpleIdentifier_multiplyDefined() async {
@@ -15501,7 +16163,7 @@
         staticType: null
         token: v
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_unresolved_annotation_unnamedConstructorCall_noClass() async {
@@ -15918,7 +16580,7 @@
           type: A<int>
       staticType: A<int>
 ''',
-        withFullyResolvedAst: true);
+        withResolvedAst: true);
   }
 
   test_variables() async {
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index e59913a9..a25a5ac 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2796,6 +2796,7 @@
   f();
 }
 ''', [
+      error(HintCode.DEPRECATED_IMPLEMENTS_FUNCTION, 197, 8),
       error(CompileTimeErrorCode.UNDEFINED_METHOD, 332, 1),
       error(CompileTimeErrorCode.UNDEFINED_GETTER, 341, 1),
       error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 346, 1),
diff --git a/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart b/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
index 897f2d7..e96926c 100644
--- a/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
@@ -52,6 +52,12 @@
       this.collector, this.requestedOffset, this.requestedLength);
 
   void _addRegion(int offset, int length, Element? element) {
+    if (element != null && element.isSynthetic) {
+      var parent = element.enclosingElement;
+      if (parent is EnumElementImpl) {
+        element = parent;
+      }
+    }
     if (element is FieldFormalParameterElement) {
       element = element.field;
     }
diff --git a/pkg/dev_compiler/lib/src/kernel/module_symbols.dart b/pkg/dev_compiler/lib/src/kernel/module_symbols.dart
new file mode 100644
index 0000000..73f14cf
--- /dev/null
+++ b/pkg/dev_compiler/lib/src/kernel/module_symbols.dart
@@ -0,0 +1,695 @@
+// Copyright (c) 2021, 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.
+
+// @dart = 2.9
+
+// Dart debug symbol information stored by DDC.
+//
+// The data format below stores descriptions of dart code objects and their
+// mapping to JS that is generated by DDC. Every field, except ids, describes
+// dart.
+// Note that 'localId' and 'scopeId' combine into a unique id that is used for
+// object lookup and mapping between JS and dart concepts. As a result, it
+// needs to be either stored or easily computed for each corresponding JS object
+// created by DDC, so the debugger is able to look up dart symbol from JS ones.
+//
+// For example, to detect all dart variables in current scope and display
+// their values, the debugger can do the following:
+//
+// - map current JS location to dart location using source maps
+// - find all nested dart scopes that include the current dart location
+// - collect all dart variables in scope
+// - look up corresponding variables and their values in JS scope by their
+//   JS ids
+// - display their values (non-expanded)
+//
+// To display a JS value of variable 'v' (non-expanded)
+//
+// - v: <dart type name> (jsvalue.toString())
+//
+// Where <dart type name> is the dart type of the dart variable 'v'
+// at runtime.
+//
+// TODO: describe displaying specific non-expanded JS instances in dart
+// way, for example, lists, maps, types - is JS toString() enough?
+//
+// To display a value (expanded)
+//
+// - look up the JS runtime type of the value
+// - find the dart value's runtime type by JS id value's runtime type id
+// - collect all dart fields of that type, including the inherited fields
+// - map dart fields to JS field ids and look up their values using object
+//   ids referenced by the original displayed value.
+// - display their values (non-expanded)
+class SemanticVersion {
+  final int major;
+  final int minor;
+  final int patch;
+  const SemanticVersion(
+    this.major,
+    this.minor,
+    this.patch,
+  );
+  static SemanticVersion parse(String version) {
+    var parts = version.split('.');
+    if (parts.length != 3) {
+      throw FormatException('Version: $version '
+          'does not follow simple semantic versioning format');
+    }
+    var major = int.parse(parts[0]);
+    var minor = int.parse(parts[1]);
+    var patch = int.parse(parts[2]);
+    return SemanticVersion(major, minor, patch);
+  }
+
+  /// Text version.
+  String get version => '$major.$minor.$patch';
+
+  /// True if this version is compatible with [version].
+  ///
+  /// The minor and patch version changes never remove any fields that current
+  /// version supports, so the reader can create current metadata version from
+  /// any file created with a later reader, as long as the major version does
+  /// not change.
+  bool isCompatibleWith(String version) {
+    var other = parse(version);
+    return other.major == major && other.minor >= minor && other.patch >= patch;
+  }
+}
+
+abstract class SymbolTableElement {
+  Map<String, dynamic> toJson();
+}
+
+class ModuleSymbols implements SymbolTableElement {
+  /// Current symbol information version.
+  ///
+  /// Version follows simple semantic versioning format 'major.minor.patch'
+  /// See https://semver.org
+  static const SemanticVersion current = SemanticVersion(0, 0, 1);
+
+  /// Semantic version of the format.
+  String version;
+
+  /// Module name as used in the module metadata
+  String moduleName;
+
+  /// All dart libraries included in the module.
+  ///
+  /// Note here and below that imported elements are not included in
+  /// the current module but can be referenced by their ids.
+  List<LibrarySymbol> libraries;
+
+  /// All dart scripts included in the module.
+  List<Script> scripts;
+
+  /// All dart classes included in the module.
+  List<ClassSymbol> classes;
+
+  /// All dart function types included in the module.
+  List<FunctionTypeSymbol> functionTypes;
+
+  /// All dart function types included in the module.
+  List<FunctionSymbol> functions;
+
+  /// All dart scopes included in the module.
+  ///
+  /// Does not include scopes listed in other fields,
+  /// such as libraries, classes, and functions.
+  List<ScopeSymbol> scopes;
+
+  /// All dart variables included in the module.
+  List<VariableSymbol> variables;
+  ModuleSymbols({
+    this.version,
+    this.moduleName,
+    this.libraries,
+    this.scripts,
+    this.classes,
+    this.functionTypes,
+    this.functions,
+    this.scopes,
+    this.variables,
+  });
+  ModuleSymbols.fromJson(Map<String, dynamic> json) {
+    version = _createValue(json['version'], ifNull: current.version);
+    if (!current.isCompatibleWith(version)) {
+      throw Exception('Unsupported version $version. '
+          'Current version: ${current.version}');
+    }
+    moduleName = _createValue(json['moduleName']);
+    libraries = _createObjectList(
+        json['libraries'], (json) => LibrarySymbol.fromJson(json));
+    scripts =
+        _createObjectList(json['scripts'], (json) => Script.fromJson(json));
+    classes = _createObjectList(
+        json['classes'], (json) => ClassSymbol.fromJson(json));
+    functionTypes = _createObjectList(
+        json['functionTypes'], (json) => FunctionTypeSymbol.fromJson(json));
+    functions = _createObjectList(
+        json['functions'], (json) => FunctionSymbol.fromJson(json));
+    scopes =
+        _createObjectList(json['scopes'], (json) => ScopeSymbol.fromJson(json));
+    variables = _createObjectList(
+        json['variables'], (json) => VariableSymbol.fromJson(json));
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = <String, dynamic>{};
+    _setValueIfNotNull(json, 'version', version);
+    _setValueIfNotNull(json, 'moduleName', moduleName);
+    _setObjectListIfNotNull(json, 'libraries', libraries);
+    _setObjectListIfNotNull(json, 'scripts', scripts);
+    _setObjectListIfNotNull(json, 'classes', classes);
+    _setObjectListIfNotNull(json, 'functionTypes', functionTypes);
+    _setObjectListIfNotNull(json, 'functions', functions);
+    _setObjectListIfNotNull(json, 'scopes', scopes);
+    _setObjectListIfNotNull(json, 'variables', variables);
+    return json;
+  }
+}
+
+class Symbol implements SymbolTableElement {
+  /// Local id (such as JS name) for the symbol.
+  ///
+  /// Used to map from dart objects to JS objects inside a scope.
+  String localId;
+
+  /// Enclosing scope of the symbol.
+  String scopeId;
+
+  /// Unique Id, shared with JS representation (if any).
+  ///
+  /// '<scope id>|<js name>'
+  ///
+  /// Where scope refers to a Library, Class, Function, or Scope.
+  String get id => scopeId == null ? localId : '$scopeId|$localId';
+
+  /// Source location of the symbol.
+  SourceLocation location;
+  Symbol({this.localId, this.scopeId, this.location});
+  Symbol.fromJson(Map<String, dynamic> json) {
+    localId = _createValue(json['localId']);
+    scopeId = _createValue(json['scopeId']);
+    location = _createObject(
+        json['location'], (json) => SourceLocation.fromJson(json));
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = <String, dynamic>{};
+    _setValueIfNotNull(json, 'localId', localId);
+    _setValueIfNotNull(json, 'scopeId', scopeId);
+    _setObjectIfNotNull(json, 'location', location);
+    return json;
+  }
+}
+
+abstract class TypeSymbol {
+  String get id;
+}
+
+enum VariableSymbolKind { global, local, property, field, formal, none }
+VariableSymbolKind parseVariableSymbolKind(String value) {
+  return VariableSymbolKind.values.singleWhere((e) => value == '$e',
+      orElse: () {
+    throw ArgumentError('$value is not VariableSymbolKind');
+  });
+}
+
+class VariableSymbol extends Symbol {
+  /// Variable name
+  String name;
+
+  /// Symbol kind.
+  VariableSymbolKind kind;
+
+  /// The declared type of this symbol.
+  String typeId;
+
+  /// Is this variable const?
+  bool isConst;
+
+  /// Is this variable final?
+  bool isFinal;
+
+  /// Is this variable static?
+  bool isStatic;
+
+  /// Property getter, if any.
+  String getterId;
+
+  /// Property setter, if any.
+  String setterId;
+  VariableSymbol({
+    this.name,
+    this.kind,
+    this.isConst,
+    this.isFinal,
+    this.isStatic,
+    this.typeId,
+    String localId,
+    String scopeId,
+    SourceLocation location,
+  }) : super(localId: localId, scopeId: scopeId, location: location);
+  VariableSymbol.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
+    name = _createValue(json['name']);
+    kind = _createValue(json['kind'],
+        parse: parseVariableSymbolKind, ifNull: VariableSymbolKind.none);
+    isConst = _createValue(json['isConst']);
+    isFinal = _createValue(json['isFinal']);
+    isStatic = _createValue(json['isStatic']);
+    typeId = _createValue(json['typeId']);
+    setterId = _createValue(json['setterId']);
+    getterId = _createValue(json['getterId']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'name', name);
+    _setValueIfNotNull(json, 'kind', kind.toString());
+    _setValueIfNotNull(json, 'isConst', isConst);
+    _setValueIfNotNull(json, 'isFinal', isFinal);
+    _setValueIfNotNull(json, 'isStatic', isStatic);
+    _setValueIfNotNull(json, 'typeId', typeId);
+    _setValueIfNotNull(json, 'setterId', setterId);
+    _setValueIfNotNull(json, 'getterId', getterId);
+    return json;
+  }
+}
+
+class ClassSymbol extends ScopeSymbol implements TypeSymbol {
+  /// The name of this class.
+  String name;
+
+  /// Is this an abstract class?
+  bool isAbstract;
+
+  /// Is this a const class?
+  bool isConst;
+
+  /// The superclass of this class, if any.
+  String superClassId;
+
+  /// A list of interface types for this class.
+  List<String> interfaceIds;
+
+  /// Mapping of type parameter dart names to JS names.
+  Map<String, String> typeParameters;
+
+  /// Library that contains this class.
+  String get libraryId => scopeId;
+
+  /// Fields in this class.
+  ///
+  /// Including static fields, methods, and properties.
+  List<String> get fieldIds => variableIds;
+
+  /// A list of functions in this class.
+  ///
+  /// Includes all static functions, methods, getters,
+  /// and setters in the current class.
+  ///
+  /// Does not include functions from superclasses.
+  List<String> get functionIds => scopeIds;
+  ClassSymbol({
+    this.name,
+    this.isAbstract,
+    this.isConst,
+    this.superClassId,
+    this.interfaceIds,
+    this.typeParameters,
+    String localId,
+    String scopeId,
+    SourceLocation location,
+    List<String> variableIds,
+    List<String> scopeIds,
+  }) : super(
+            localId: localId,
+            scopeId: scopeId,
+            variableIds: variableIds,
+            scopeIds: scopeIds,
+            location: location);
+  ClassSymbol.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
+    name = _createValue(json['name']);
+    isAbstract = _createValue(json['isAbstract']);
+    isConst = _createValue(json['isConst']);
+    superClassId = _createValue(json['superClassId']);
+    interfaceIds = _createValueList(json['interfaceIds']);
+    typeParameters = _createValueMap(json['typeParameters']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'name', name);
+    _setValueIfNotNull(json, 'isAbstract', isAbstract);
+    _setValueIfNotNull(json, 'isConst', isConst);
+    _setValueIfNotNull(json, 'superClassId', superClassId);
+    _setValueIfNotNull(json, 'interfaceIds', interfaceIds);
+    _setValueIfNotNull(json, 'typeParameters', typeParameters);
+    return json;
+  }
+}
+
+class FunctionTypeSymbol extends Symbol implements TypeSymbol {
+  /// Mapping of dart type parameter names to JS names.
+  Map<String, String> typeParameters;
+
+  /// Types for positional parameters for this function.
+  List<String> parameterTypeIds;
+
+  /// Types for optional positional parameters for this function.
+  List<String> optionalParameterTypeIds;
+
+  /// Names and types for named parameters for this function.
+  Map<String, String> namedParameterTypeIds;
+
+  /// A return type for this function.
+  String returnTypeId;
+  FunctionTypeSymbol({
+    this.typeParameters,
+    this.parameterTypeIds,
+    this.optionalParameterTypeIds,
+    this.namedParameterTypeIds,
+    this.returnTypeId,
+    String localId,
+    String scopeId,
+    SourceLocation location,
+  }) : super(localId: localId, scopeId: scopeId, location: location);
+  FunctionTypeSymbol.fromJson(Map<String, dynamic> json)
+      : super.fromJson(json) {
+    parameterTypeIds = _createValueList(json['parameterTypeIds']);
+    optionalParameterTypeIds =
+        _createValueList(json['optionalParameterTypeIds']);
+    typeParameters = _createValueMap(json['typeParameters']);
+    namedParameterTypeIds = _createValueMap(json['namedParameterTypeIds']);
+    returnTypeId = _createValue(json['returnTypeId']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'typeParameters', typeParameters);
+    _setValueIfNotNull(json, 'parameterTypeIds', parameterTypeIds);
+    _setValueIfNotNull(
+        json, 'optionalParameterTypeIds', optionalParameterTypeIds);
+    _setValueIfNotNull(json, 'namedParameterTypeIds', namedParameterTypeIds);
+    _setValueIfNotNull(json, 'returnTypeId', returnTypeId);
+    return json;
+  }
+}
+
+class FunctionSymbol extends ScopeSymbol {
+  /// The name of this function.
+  String name;
+
+  /// Unique Id, shared with JS representation (if any).
+  ///
+  /// Format:
+  ///   '<scope id>|<js name>'
+  ///
+  /// Where scope refers to a Library, Class, Function, or Scope.
+  /// String id;
+  /// Declared type of this function.
+  String typeId;
+
+  /// Is this function static?
+  bool isStatic;
+
+  /// Is this function const?
+  bool isConst;
+  FunctionSymbol({
+    this.name,
+    this.typeId,
+    this.isStatic,
+    this.isConst,
+    String localId,
+    String scopeId,
+    List<String> variableIds,
+    List<String> scopeIds,
+    SourceLocation location,
+  }) : super(
+          localId: localId,
+          scopeId: scopeId,
+          variableIds: variableIds,
+          scopeIds: scopeIds,
+          location: location,
+        );
+  FunctionSymbol.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
+    name = _createValue(json['name']);
+    typeId = _createValue(json['typeId']);
+    isStatic = _createValue(json['isStatic']);
+    isConst = _createValue(json['isConst']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'name', name);
+    _setValueIfNotNull(json, 'typeId', typeId);
+    _setValueIfNotNull(json, 'isStatic', isStatic);
+    _setValueIfNotNull(json, 'isConst', isConst);
+    return json;
+  }
+}
+
+class LibrarySymbol extends ScopeSymbol {
+  /// The name of this library.
+  String name;
+
+  /// Unique Id.
+  ///
+  /// Currently the debugger can find the library uri from JS location
+  /// using source maps and module metadata.
+  ///
+  /// Can be same as library uri.
+  /// String id;
+  /// The uri of this library.
+  String uri;
+
+  /// A list of the imports for this library.
+  List<LibrarySymbolDependency> dependencies;
+
+  /// A list of the scripts which constitute this library.
+  List<String> scriptIds;
+  LibrarySymbol({
+    this.name,
+    this.uri,
+    this.dependencies,
+    this.scriptIds,
+    List<String> variableIds,
+    List<String> scopeIds,
+  }) : super(
+          localId: uri,
+          variableIds: variableIds,
+          scopeIds: scopeIds,
+        );
+
+  LibrarySymbol.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
+    name = _createValue(json['name'], ifNull: '');
+    uri = _createValue(json['uri']);
+    scriptIds = _createValueList(json['scriptIds']);
+    dependencies = _createObjectList(
+        json['dependencies'], (json) => LibrarySymbolDependency.fromJson(json));
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'name', name);
+    _setValueIfNotNull(json, 'uri', uri);
+    _setValueIfNotNull(json, 'scriptIds', scriptIds);
+    _setObjectListIfNotNull(json, 'dependencies', dependencies);
+    return json;
+  }
+}
+
+class LibrarySymbolDependency implements SymbolTableElement {
+  /// Is this dependency an import (rather than an export)?
+  bool isImport;
+
+  /// Is this dependency deferred?
+  bool isDeferred;
+
+  /// The prefix of an 'as' import, or null.
+  String prefix;
+
+  /// The library being imported or exported.
+  String targetId;
+  LibrarySymbolDependency({
+    this.isImport,
+    this.isDeferred,
+    this.prefix,
+    this.targetId,
+  });
+  LibrarySymbolDependency.fromJson(Map<String, dynamic> json) {
+    isImport = _createValue(json['isImport']);
+    isDeferred = _createValue(json['isDeferred']);
+    prefix = _createValue(json['prefix']);
+    targetId = _createValue(json['targetId']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = <String, dynamic>{};
+    _setValueIfNotNull(json, 'isImport', isImport);
+    _setValueIfNotNull(json, 'isDeferred', isDeferred);
+    _setValueIfNotNull(json, 'prefix', prefix);
+    _setValueIfNotNull(json, 'targetId', targetId);
+    return json;
+  }
+}
+
+class Script implements SymbolTableElement {
+  /// The uri from which this script was loaded.
+  String uri;
+
+  /// Unique Id.
+  ///
+  /// This can be just an integer. The mapping from JS to dart script
+  /// happens using the source map. The id is only used for references
+  /// in other elements.
+  String localId;
+
+  String libraryId;
+
+  String get id => '$libraryId|$localId';
+
+  Script({
+    this.uri,
+    this.localId,
+    this.libraryId,
+  });
+  Script.fromJson(Map<String, dynamic> json) {
+    uri = _createValue(json['uri']);
+    localId = _createValue(json['localId']);
+    libraryId = _createValue(json['libraryId']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = <String, dynamic>{};
+    _setValueIfNotNull(json, 'uri', uri);
+    _setValueIfNotNull(json, 'localId', localId);
+    _setValueIfNotNull(json, 'libraryId', libraryId);
+
+    return json;
+  }
+}
+
+class ScopeSymbol extends Symbol {
+  /// A list of the top-level variables in this scope.
+  List<String> variableIds;
+
+  /// Enclosed scopes.
+  ///
+  /// Includes all top classes, functions, inner scopes.
+  List<String> scopeIds;
+  ScopeSymbol({
+    this.variableIds,
+    this.scopeIds,
+    String localId,
+    String scopeId,
+    SourceLocation location,
+  }) : super(
+          localId: localId,
+          scopeId: scopeId,
+          location: location,
+        );
+  ScopeSymbol.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
+    variableIds = _createValueList(json['variableIds']);
+    scopeIds = _createValueList(json['scopeIds']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = super.toJson();
+    _setValueIfNotNull(json, 'variableIds', variableIds);
+    _setValueIfNotNull(json, 'scopeIds', scopeIds);
+    return json;
+  }
+}
+
+class SourceLocation implements SymbolTableElement {
+  /// The script containing the source location.
+  String scriptId;
+
+  /// The first token of the location.
+  int tokenPos;
+
+  /// The last token of the location if this is a range.
+  int endTokenPos;
+  SourceLocation({
+    this.scriptId,
+    this.tokenPos,
+    this.endTokenPos,
+  });
+  SourceLocation.fromJson(Map<String, dynamic> json) {
+    scriptId = _createValue(json['scriptId']);
+    tokenPos = _createValue(json['tokenPos']);
+    endTokenPos = _createValue(json['endTokenPos']);
+  }
+  @override
+  Map<String, dynamic> toJson() {
+    final json = <String, dynamic>{};
+    _setValueIfNotNull(json, 'scriptId', scriptId);
+    _setValueIfNotNull(json, 'tokenPos', tokenPos);
+    _setValueIfNotNull(json, 'endTokenPos', endTokenPos);
+    return json;
+  }
+}
+
+List<T> _createObjectList<T>(
+    dynamic json, T Function(Map<String, dynamic>) creator) {
+  if (json == null) return null;
+  if (json is List) {
+    return json.map((e) => _createObject(e, creator)).toList();
+  }
+  throw ArgumentError('Not a list: $json');
+}
+
+T _createObject<T>(dynamic json, T Function(Map<String, dynamic>) creator) {
+  if (json == null) return null;
+  if (json is Map<String, dynamic>) {
+    return creator(json);
+  }
+  throw ArgumentError('Not a map: $json');
+}
+
+List<T> _createValueList<T>(dynamic json,
+    {T ifNull, T Function(String) parse}) {
+  if (json == null) return null;
+  if (json is List) {
+    return json
+        .map((e) => _createValue<T>(e, ifNull: ifNull, parse: parse))
+        .toList();
+  }
+  throw ArgumentError('Not a list: $json');
+}
+
+Map<String, T> _createValueMap<T>(dynamic json) {
+  if (json == null) return null;
+  return Map<String, T>.from(json as Map<String, dynamic>);
+}
+
+T _createValue<T>(dynamic json, {T ifNull, T Function(String) parse}) {
+  if (json == null) return ifNull;
+  if (json is T) {
+    return json;
+  }
+  if (json is String && parse != null) {
+    return parse(json);
+  }
+  throw ArgumentError('Cannot parse $json as $T');
+}
+
+void _setObjectListIfNotNull<T extends SymbolTableElement>(
+    Map<String, dynamic> json, String key, List<T> values) {
+  if (values == null) return;
+  json[key] = values.map((e) => e?.toJson()).toList();
+}
+
+void _setObjectIfNotNull<T extends SymbolTableElement>(
+    Map<String, dynamic> json, String key, T value) {
+  if (value == null) return;
+  json[key] = value?.toJson();
+}
+
+void _setValueIfNotNull<T>(Map<String, dynamic> json, String key, T value) {
+  if (value == null) return;
+  json[key] = value;
+}
diff --git a/pkg/dev_compiler/test/module_symbols_test.dart b/pkg/dev_compiler/test/module_symbols_test.dart
new file mode 100644
index 0000000..b62c1c1
--- /dev/null
+++ b/pkg/dev_compiler/test/module_symbols_test.dart
@@ -0,0 +1,359 @@
+// Copyright (c) 2021, 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.
+
+// @dart = 2.9
+
+import 'dart:core';
+import 'package:dev_compiler/src/kernel/module_symbols.dart';
+import 'package:test/test.dart';
+
+const source = '''
+import 'dart:core';                  // pos:1
+import 'package:lib2/lib2.dart;      // pos:2
+MyClass g;                           // pos:10
+class MyClass<T>                     // pos:20
+  implements MyInterface
+  extends Object {
+
+  static final int f;                // pos:30
+  int foo(int x, [int m], {int n}) { // pos:40
+    int y = 0;                       // pos:50
+    {                                // pos:60
+      int z = 0;                     // pos:70
+    }                                // pos:80
+  }                                  // pos:90
+}                                    // pos:100
+''';
+
+void main() {
+  var intType = ClassSymbol(name: 'int', localId: 'int', scopeId: 'dart:core');
+
+  var libraryId = 'lib1';
+  var main = Script(
+      uri: 'package:example/hello_world.dart',
+      localId: '1',
+      libraryId: libraryId);
+  var myClassId = 'MyClass<T>';
+  var fooId = 'foo';
+  var scopeId = '1';
+
+  var g = VariableSymbol(
+    name: 'g',
+    kind: VariableSymbolKind.global,
+    localId: '_g',
+    scopeId: libraryId,
+    typeId: myClassId,
+    location: SourceLocation(scriptId: main.id, tokenPos: 10, endTokenPos: 15),
+  );
+
+  var x = VariableSymbol(
+    name: 'x',
+    kind: VariableSymbolKind.formal,
+    localId: '_x',
+    scopeId: fooId,
+    typeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 40, endTokenPos: 42),
+  );
+
+  var n = VariableSymbol(
+    name: 'n',
+    kind: VariableSymbolKind.formal,
+    localId: '_n',
+    scopeId: fooId,
+    typeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 43, endTokenPos: 45),
+  );
+
+  var m = VariableSymbol(
+    name: 'm',
+    kind: VariableSymbolKind.formal,
+    localId: '_m',
+    scopeId: fooId,
+    typeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 45, endTokenPos: 47),
+  );
+
+  var y = VariableSymbol(
+    name: 'y',
+    kind: VariableSymbolKind.local,
+    localId: '_y',
+    scopeId: fooId,
+    typeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 50, endTokenPos: 55),
+  );
+
+  var z = VariableSymbol(
+    name: 'z',
+    kind: VariableSymbolKind.local,
+    localId: '_z',
+    scopeId: scopeId,
+    typeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 70, endTokenPos: 75),
+  );
+
+  var f = VariableSymbol(
+    name: 'f',
+    kind: VariableSymbolKind.field,
+    localId: '_f',
+    scopeId: fooId,
+    typeId: intType.id,
+    isStatic: true,
+    isFinal: true,
+    isConst: true,
+    location: SourceLocation(scriptId: main.id, tokenPos: 30, endTokenPos: 35),
+  );
+
+  var scope = ScopeSymbol(
+    localId: scopeId,
+    scopeId: fooId,
+    variableIds: [z.id],
+    scopeIds: [],
+    location: SourceLocation(scriptId: main.id, tokenPos: 60, endTokenPos: 80),
+  );
+
+  var funType = FunctionTypeSymbol(
+    localId: '($myClassId, int) => int',
+    scopeId: libraryId,
+    typeParameters: {'T': 'A'},
+    parameterTypeIds: [intType.id],
+    optionalParameterTypeIds: [m.id],
+    namedParameterTypeIds: {n.name: n.id},
+    returnTypeId: intType.id,
+    location: SourceLocation(scriptId: main.id, tokenPos: 40, endTokenPos: 45),
+  );
+
+  var foo = FunctionSymbol(
+    name: 'foo',
+    localId: fooId,
+    scopeId: myClassId,
+    typeId: funType.id,
+    isStatic: false,
+    isConst: false,
+    variableIds: [x.id, n.id, y.id],
+    scopeIds: [scope.id],
+    location: SourceLocation(scriptId: main.id, tokenPos: 40, endTokenPos: 90),
+  );
+
+  var myClass = ClassSymbol(
+    name: 'MyClass',
+    localId: myClassId,
+    scopeId: libraryId,
+    isAbstract: false,
+    isConst: false,
+    superClassId: 'dart:core|Object',
+    interfaceIds: ['lib2|MyInterface'],
+    variableIds: [f.id],
+    scopeIds: [foo.id],
+    typeParameters: {'T': 'B'},
+    location: SourceLocation(scriptId: main.id, tokenPos: 20, endTokenPos: 100),
+  );
+
+  var library = LibrarySymbol(
+    name: 'package:example/hello_world.dart',
+    uri: 'package:example/hello_world.dart',
+    dependencies: [
+      LibrarySymbolDependency(isImport: true, targetId: 'dart:core'),
+      LibrarySymbolDependency(isImport: true, targetId: 'lib2'),
+    ],
+    scriptIds: [main.id],
+    variableIds: [g.id], // global variables
+    scopeIds: [myClass.id], // global functions and classes
+  );
+
+  var info = ModuleSymbols(
+    version: ModuleSymbols.current.version,
+    moduleName: 'package:example/hello_world.dart',
+    libraries: [library],
+    scripts: [main],
+    classes: [myClass],
+    functionTypes: [funType],
+    functions: [foo],
+    scopes: [scope],
+    variables: [x, y, z, n, g, f],
+  );
+
+  test('Read and write symbols', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+    var write = read.toJson();
+
+    expect(json, equals(write));
+  });
+
+  test('Write and read libraries', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.libraries.length, 1);
+    expect(read.libraries[0], matchesLibrary(library));
+  });
+
+  test('Write and read classes', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.classes.length, 1);
+    expect(read.classes[0], matchesClass(myClass));
+  });
+
+  test('Write and read function types', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.functionTypes.length, 1);
+    expect(read.functionTypes[0], matchesFunctionType(funType));
+  });
+
+  test('Write and read functions', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.functions.length, 1);
+    expect(read.functions[0], matchesFunction(foo));
+  });
+
+  test('Write and read scripts', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.scripts.length, 1);
+    expect(read.scripts[0], matchesScript(main));
+  });
+
+  test('Write and read scopes', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.scopes.length, 1);
+    expect(read.scopes[0], matchesScope(scope));
+  });
+
+  test('Write and read variables', () {
+    var json = info.toJson();
+    var read = ModuleSymbols.fromJson(json);
+
+    expect(read.variables.length, 6);
+    expect(read.variables[0], matchesVariable(x));
+    expect(read.variables[1], matchesVariable(y));
+    expect(read.variables[2], matchesVariable(z));
+    expect(read.variables[3], matchesVariable(n));
+    expect(read.variables[4], matchesVariable(g));
+    expect(read.variables[5], matchesVariable(f));
+  });
+
+  test('Read supported version', () {
+    var version = SemanticVersion(0, 2, 3).version;
+    var json = ModuleSymbols(version: version).toJson();
+
+    expect(ModuleSymbols.fromJson(json).version, equals(version));
+  });
+
+  test('Read unsupported version', () {
+    var version = SemanticVersion(1, 2, 3).version;
+    var json = ModuleSymbols(version: version).toJson();
+
+    expect(() => ModuleSymbols.fromJson(json), throwsException);
+  });
+}
+
+TypeMatcher<SourceLocation> matchesLocation(SourceLocation other) =>
+    isA<SourceLocation>()
+        .having((loc) => loc.scriptId, 'scriptId', other.scriptId)
+        .having((loc) => loc.tokenPos, 'tokenPos', other.tokenPos)
+        .having((loc) => loc.endTokenPos, 'endTokenPos', other.endTokenPos);
+
+TypeMatcher<LibrarySymbolDependency> matchesDependency(
+        LibrarySymbolDependency other) =>
+    isA<LibrarySymbolDependency>()
+        .having((dep) => dep.isDeferred, 'isDeferred', other.isDeferred)
+        .having((dep) => dep.isImport, 'isImport', other.isImport)
+        .having((dep) => dep.prefix, 'prefix', other.prefix)
+        .having((dep) => dep.targetId, 'targetId', other.targetId);
+
+Iterable<Matcher> matchDependencies(List<LibrarySymbolDependency> list) =>
+    [for (var e in list) matchesDependency(e)];
+
+TypeMatcher<LibrarySymbol> matchesLibrary(LibrarySymbol other) =>
+    isA<LibrarySymbol>()
+        .having((lib) => lib.name, 'name', other.name)
+        .having((lib) => lib.uri, 'uri', other.uri)
+        .having((lib) => lib.id, 'id', other.id)
+        .having((lib) => lib.scriptIds, 'scriptIds', other.scriptIds)
+        .having((lib) => lib.scopeIds, 'scopeIds', other.scopeIds)
+        .having((lib) => lib.scopeIds, 'scopeIds', other.scopeIds)
+        .having((lib) => lib.variableIds, 'variableIds', other.variableIds)
+        .having((lib) => lib.location, 'location', isNull)
+        .having((lib) => lib.dependencies, 'dependencies',
+            matchDependencies(other.dependencies));
+
+TypeMatcher<ClassSymbol> matchesClass(ClassSymbol other) => isA<ClassSymbol>()
+    .having((cls) => cls.name, 'name', other.name)
+    .having((cls) => cls.id, 'id', other.id)
+    .having((fun) => fun.localId, 'localId', other.localId)
+    .having((fun) => fun.scopeId, 'scopeId', other.scopeId)
+    .having((cls) => cls.superClassId, 'superClassId', other.superClassId)
+    .having((cls) => cls.typeParameters, 'typeParameters', other.typeParameters)
+    .having((cls) => cls.functionIds, 'functionIds', other.functionIds)
+    .having((cls) => cls.interfaceIds, 'interfaceIds', other.interfaceIds)
+    .having((cls) => cls.isAbstract, 'isAbstract', other.isAbstract)
+    .having((cls) => cls.isConst, 'isConst', other.isConst)
+    .having((cls) => cls.libraryId, 'libraryId', other.libraryId)
+    .having((cls) => cls.scopeIds, 'scopeIds', other.scopeIds)
+    .having((cls) => cls.variableIds, 'variableIds', other.variableIds)
+    .having((cls) => cls.location, 'location', matchesLocation(other.location));
+
+TypeMatcher<FunctionTypeSymbol> matchesFunctionType(FunctionTypeSymbol other) =>
+    isA<FunctionTypeSymbol>()
+        .having((fun) => fun.id, 'id', other.id)
+        .having((fun) => fun.localId, 'localId', other.localId)
+        .having((fun) => fun.scopeId, 'scopeId', other.scopeId)
+        .having(
+            (fun) => fun.typeParameters, 'typeParameters', other.typeParameters)
+        .having((fun) => fun.parameterTypeIds, 'parameterTypeIds',
+            other.parameterTypeIds)
+        .having((fun) => fun.optionalParameterTypeIds,
+            'optionalParameterTypeIds', other.optionalParameterTypeIds)
+        .having((fun) => fun.namedParameterTypeIds, 'namedParameterTypeIds',
+            other.namedParameterTypeIds)
+        .having(
+            (fun) => fun.location, 'location', matchesLocation(other.location));
+
+TypeMatcher<FunctionSymbol> matchesFunction(FunctionSymbol other) =>
+    isA<FunctionSymbol>()
+        .having((fun) => fun.name, 'name', other.name)
+        .having((fun) => fun.localId, 'localId', other.localId)
+        .having((fun) => fun.scopeId, 'scopeId', other.scopeId)
+        .having((fun) => fun.id, 'id', other.id)
+        .having((fun) => fun.isConst, 'isConst', other.isConst)
+        .having((fun) => fun.isStatic, 'isStatic', other.isStatic)
+        .having((fun) => fun.typeId, 'typeId', other.typeId)
+        .having((fun) => fun.scopeIds, 'scopeIds', other.scopeIds)
+        .having((fun) => fun.variableIds, 'variableIds', other.variableIds)
+        .having(
+            (fun) => fun.location, 'location', matchesLocation(other.location));
+
+TypeMatcher<ScopeSymbol> matchesScope(ScopeSymbol other) => isA<ScopeSymbol>()
+    .having((scope) => scope.localId, 'localId', other.localId)
+    .having((scope) => scope.scopeId, 'scopeId', other.scopeId)
+    .having((scope) => scope.id, 'id', other.id)
+    .having((scope) => scope.scopeIds, 'scopeIds', other.scopeIds)
+    .having((scope) => scope.variableIds, 'variableIds', other.variableIds)
+    .having(
+        (scope) => scope.location, 'location', matchesLocation(other.location));
+
+TypeMatcher<VariableSymbol> matchesVariable(VariableSymbol other) =>
+    isA<VariableSymbol>()
+        .having((variable) => variable.name, 'name', other.name)
+        .having((variable) => variable.localId, 'localId', other.localId)
+        .having((variable) => variable.scopeId, 'scopeId', other.scopeId)
+        .having((variable) => variable.id, 'id', other.id)
+        .having((variable) => variable.isConst, 'isConst', other.isConst)
+        .having((variable) => variable.isStatic, 'isStatic', other.isStatic)
+        .having((variable) => variable.isFinal, 'isFinal', other.isFinal)
+        .having((variable) => variable.location, 'location',
+            matchesLocation(other.location));
+
+TypeMatcher<Script> matchesScript(Script other) => isA<Script>()
+    .having((script) => script.uri, 'uri', other.uri)
+    .having((script) => script.id, 'id', other.id);
diff --git a/pkg/wasm/.gitignore b/pkg/wasm/.gitignore
deleted file mode 100644
index 49ce72d..0000000
--- a/pkg/wasm/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.dart_tool/
-.packages
-pubspec.lock
diff --git a/pkg/wasm/AUTHORS b/pkg/wasm/AUTHORS
deleted file mode 100644
index 846e4a1..0000000
--- a/pkg/wasm/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-# Below is a list of people and organizations that have contributed
-# to the Dart project. Names should be added to the list like so:
-#
-#   Name/Organization <email address>
-
-Google LLC
diff --git a/pkg/wasm/LICENSE b/pkg/wasm/LICENSE
deleted file mode 100644
index 467a982..0000000
--- a/pkg/wasm/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright 2020, the Dart project authors.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of Google LLC nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/wasm/README.md b/pkg/wasm/README.md
deleted file mode 100644
index 4558a3c..0000000
--- a/pkg/wasm/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-Provides utilities for loading and running WASM modules
-
-Built on top of the [Wasmer](https://github.com/wasmerio/wasmer) runtime.
-
-## Setup
-
-Run `dart run wasm:setup` to build the Wasmer runtime.
-
-## Basic Usage
-
-As a simple example, we'll try to call the following C function from Dart using
-`package:wasm`. For a more detailed example that uses WASI, check out the
-example directory.
-
-```c++
-extern "C" int square(int n) { return n * n; }
-```
-
-We can compile this C++ code to WASM using a recent version of clang:
-
-```bash
-clang --target=wasm32 -nostdlib -Wl,--export-all -Wl,--no-entry -o square.wasm square.cc
-```
-
-Then we can load and run it like this:
-
-```dart
-import 'dart:io';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  final data = File('square.wasm').readAsBytesSync();
-  final mod = WasmModule(data);
-  print(mod.describe());
-  final inst = mod.instantiate().build();
-  final square = inst.lookupFunction('square');
-  print(square(12));
-}
-```
-
-This should print:
-
-```
-export memory: memory
-export function: int32 square(int32)
-
-144
-```
diff --git a/pkg/wasm/analysis_options.yaml b/pkg/wasm/analysis_options.yaml
deleted file mode 100644
index 74fd4c8..0000000
--- a/pkg/wasm/analysis_options.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-include: package:lints/recommended.yaml
-
-analyzer:
-  strong-mode:
-    implicit-casts: false
-
-linter:
-  rules:
-  - avoid_catching_errors
-  #- avoid_dynamic_calls
-  - avoid_function_literals_in_foreach_calls
-  - avoid_private_typedef_functions
-  - avoid_redundant_argument_values
-  - avoid_renaming_method_parameters
-  - avoid_returning_null_for_void
-  - avoid_unused_constructor_parameters
-  - await_only_futures
-  - cancel_subscriptions
-  - camel_case_types
-  - cascade_invocations
-  - constant_identifier_names
-  - directives_ordering
-  - empty_statements
-  - file_names
-  - implementation_imports
-  - iterable_contains_unrelated_type
-  - join_return_with_assignment
-  - lines_longer_than_80_chars
-  - list_remove_unrelated_type
-  - missing_whitespace_between_adjacent_strings
-  - no_runtimeType_toString
-  - non_constant_identifier_names
-  - only_throw_errors
-  - overridden_fields
-  - package_names
-  - package_prefixed_library_names
-  - prefer_asserts_in_initializer_lists
-  - prefer_const_constructors
-  - prefer_const_declarations
-  - prefer_expression_function_bodies
-  - prefer_function_declarations_over_variables
-  - prefer_if_null_operators
-  - prefer_initializing_formals
-  - prefer_inlined_adds
-  - prefer_interpolation_to_compose_strings
-  - prefer_is_not_operator
-  - prefer_null_aware_operators
-  - prefer_single_quotes
-  - prefer_relative_imports
-  - prefer_typing_uninitialized_variables
-  - prefer_void_to_null
-  - provide_deprecation_message
-  - require_trailing_commas
-  - sort_pub_dependencies
-  - test_types_in_equals
-  - throw_in_finally
-  - type_annotate_public_apis
-  - unawaited_futures
-  - unnecessary_brace_in_string_interps
-  - unnecessary_lambdas
-  - unnecessary_null_aware_assignments
-  - unnecessary_overrides
-  - unnecessary_parenthesis
-  - unnecessary_statements
-  - unnecessary_string_interpolations
-  - use_is_even_rather_than_modulo
-  - use_string_buffers
-  - void_checks
diff --git a/pkg/wasm/bin/.gitignore b/pkg/wasm/bin/.gitignore
deleted file mode 100644
index 8b44e90..0000000
--- a/pkg/wasm/bin/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Cargo.lock
-/out
diff --git a/pkg/wasm/bin/Cargo.toml b/pkg/wasm/bin/Cargo.toml
deleted file mode 100644
index a476549..0000000
--- a/pkg/wasm/bin/Cargo.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[package]
-name = "wasmer"
-version = "1.0.0-alpha5"
-
-[lib]
-name = "wasmer"
-crate-type = ["staticlib"]
-path = "wasmer.rs"
-
-[dependencies.wasmer-c-api]
-version = "1.0.0-alpha5"
-default-features = false
-features = ["jit", "cranelift", "wasi"]
diff --git a/pkg/wasm/bin/finalizers.cc b/pkg/wasm/bin/finalizers.cc
deleted file mode 100644
index 192277e..0000000
--- a/pkg/wasm/bin/finalizers.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2021, 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.
-
-#include "include/dart_api.h"
-#include "include/dart_api_dl.h"
-
-#define FINALIZER(type)                                                        \
-  extern "C" void wasm_##type##_delete(void*);                                 \
-  extern "C" void wasm_##type##_finalizer(void*, void* native_object) {        \
-    wasm_##type##_delete(native_object);                                       \
-  }                                                                            \
-  DART_EXPORT void set_finalizer_for_##type(Dart_Handle dart_object,           \
-                                            void* native_object) {             \
-    Dart_NewFinalizableHandle_DL(dart_object, native_object, 0,                \
-                                 wasm_##type##_finalizer);                     \
-  }
-
-FINALIZER(engine);
-FINALIZER(store);
-FINALIZER(module);
-FINALIZER(instance);
-FINALIZER(trap);
-FINALIZER(memorytype);
-FINALIZER(memory);
-FINALIZER(func);
diff --git a/pkg/wasm/bin/setup.dart b/pkg/wasm/bin/setup.dart
deleted file mode 100644
index 2497ecd..0000000
--- a/pkg/wasm/bin/setup.dart
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (c) 2021, 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.
-
-// Builds the wasmer runtime library, to by used by package:wasm. Requires
-// rustc, cargo, clang, and clang++. If a target triple is not specified, it
-// will default to the host target.
-// Usage: dart run wasm:setup [target-triple]
-
-import 'dart:convert';
-import 'dart:io' hide exit;
-
-import 'package:wasm/src/shared.dart';
-
-Future<void> main(List<String> args) async {
-  if (args.length > 1) {
-    print('Usage: $invocationString [target-triple]');
-    exitCode = 64; // bad usage
-    return;
-  }
-
-  final target = args.isNotEmpty ? args[0] : await _getTargetTriple();
-
-  try {
-    await _main(target);
-  } on ProcessException catch (e) {
-    final invocation = [e.executable, ...e.arguments].join(' ');
-    print('FAILED with exit code ${e.errorCode} `$invocation`');
-    exitCode = 70; // software error
-    return;
-  }
-}
-
-Uri _getSdkDir() {
-  // The common case, and how cli_util.dart computes the Dart SDK directory,
-  // path.dirname called twice on Platform.resolvedExecutable.
-  final exe = Uri.file(Platform.resolvedExecutable);
-  final commonSdkDir = exe.resolve('../../dart-sdk/');
-  if (FileSystemEntity.isDirectorySync(commonSdkDir.path)) {
-    return commonSdkDir;
-  }
-
-  // This is the less common case where the user is in the checked out Dart
-  // SDK, and is executing dart via:
-  // ./out/ReleaseX64/dart ...
-  final checkedOutSdkDir = exe.resolve('../dart-sdk/');
-  if (FileSystemEntity.isDirectorySync(checkedOutSdkDir.path)) {
-    return checkedOutSdkDir;
-  }
-
-  final homebrewOutSdkDir = exe.resolve('..');
-  final homebrewIncludeDir = homebrewOutSdkDir.resolve('include');
-  if (FileSystemEntity.isDirectorySync(homebrewIncludeDir.path)) {
-    return homebrewOutSdkDir;
-  }
-
-  // If neither returned above, we return the common case:
-  return commonSdkDir;
-}
-
-Uri _getOutDir(Uri root) {
-  final pkgRoot = packageRootUri(root);
-  if (pkgRoot == null) {
-    throw Exception('$pkgConfigFile not found');
-  }
-  return pkgRoot.resolve(wasmToolDir);
-}
-
-String _getOutLib(String target) {
-  final os = RegExp(r'^.*-.*-(.*)').firstMatch(target)?.group(1) ?? '';
-  if (os == 'darwin' || os == 'ios') {
-    return appleLib;
-  } else if (os == 'windows') {
-    return 'wasmer.dll';
-  }
-  return linuxLib;
-}
-
-Future<String> _getTargetTriple() async {
-  final _regexp = RegExp(r'^([^=]+)="(.*)"$');
-  final process = await Process.start('rustc', ['--print', 'cfg']);
-  final sub = process.stderr
-      .transform(utf8.decoder)
-      .transform(const LineSplitter())
-      .listen((line) => stderr.writeln(line));
-  final cfg = <String, String?>{};
-  await process.stdout
-      .transform(utf8.decoder)
-      .transform(const LineSplitter())
-      .forEach((line) {
-    final match = _regexp.firstMatch(line);
-    if (match != null) cfg[match.group(1)!] = match.group(2);
-  });
-  await sub.cancel();
-  var arch = cfg['target_arch'] ?? 'unknown';
-  var vendor = cfg['target_vendor'] ?? 'unknown';
-  var os = cfg['target_os'] ?? 'unknown';
-  if (os == 'macos') os = 'darwin';
-  var env = cfg['target_env'];
-  return [arch, vendor, os, env]
-      .where((element) => element != null && element.isNotEmpty)
-      .join('-');
-}
-
-Future<void> _run(String exe, List<String> args) async {
-  print('\n$exe ${args.join(' ')}\n');
-  final process =
-      await Process.start(exe, args, mode: ProcessStartMode.inheritStdio);
-  final result = await process.exitCode;
-  if (result != 0) {
-    throw ProcessException(exe, args, '', result);
-  }
-}
-
-Future<void> _main(String target) async {
-  final sdkDir = _getSdkDir();
-  final binDir = Platform.script;
-  final outDir = _getOutDir(Directory.current.uri);
-  final outLib = outDir.resolve(_getOutLib(target)).path;
-
-  print('Dart SDK directory: ${sdkDir.path}');
-  print('Script directory: ${binDir.path}');
-  print('Output directory: ${outDir.path}');
-  print('Target: $target');
-  print('Output library: $outLib');
-
-  // Build wasmer crate.
-  await _run('cargo', [
-    'build',
-    '--target',
-    target,
-    '--target-dir',
-    outDir.path,
-    '--manifest-path',
-    binDir.resolve('Cargo.toml').path,
-    '--release'
-  ]);
-
-  const dartApiDlImplPath = 'include/internal/dart_api_dl_impl.h';
-
-  final dartApiDlImplFile = File.fromUri(sdkDir.resolve(dartApiDlImplPath));
-  // Hack around a bug with dart_api_dl_impl.h include path in dart_api_dl.c.
-  if (!dartApiDlImplFile.existsSync()) {
-    Directory(outDir.resolve('include/internal/').path)
-        .createSync(recursive: true);
-    await dartApiDlImplFile.copy(outDir.resolve(dartApiDlImplPath).path);
-  }
-
-  // Build dart_api_dl.o.
-  await _run('clang', [
-    '-DDART_SHARED_LIB',
-    '-DNDEBUG',
-    '-fno-exceptions',
-    '-fPIC',
-    '-O3',
-    '-target',
-    target,
-    '-I',
-    sdkDir.resolve('include/').path,
-    '-I',
-    outDir.resolve('include/').path,
-    '-c',
-    sdkDir.resolve('include/dart_api_dl.c').path,
-    '-o',
-    outDir.resolve('dart_api_dl.o').path
-  ]);
-
-  // Build finalizers.o.
-  await _run('clang++', [
-    '-DDART_SHARED_LIB',
-    '-DNDEBUG',
-    '-fno-exceptions',
-    '-fno-rtti',
-    '-fPIC',
-    '-O3',
-    '-std=c++11',
-    '-target',
-    target,
-    '-I',
-    sdkDir.path,
-    '-I',
-    outDir.resolve('include/').path,
-    '-c',
-    binDir.resolve('finalizers.cc').path,
-    '-o',
-    outDir.resolve('finalizers.o').path
-  ]);
-
-  // Link wasmer, dart_api_dl, and finalizers to create the output library.
-  await _run('clang++', [
-    '-shared',
-    '-fPIC',
-    '-target',
-    target,
-    outDir.resolve('dart_api_dl.o').path,
-    outDir.resolve('finalizers.o').path,
-    outDir.resolve('$target/release/libwasmer.a').path,
-    '-o',
-    outLib
-  ]);
-}
diff --git a/pkg/wasm/bin/wasmer.rs b/pkg/wasm/bin/wasmer.rs
deleted file mode 100644
index c4bd6e5..0000000
--- a/pkg/wasm/bin/wasmer.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub extern crate wasmer_c_api;
diff --git a/pkg/wasm/example/README.md b/pkg/wasm/example/README.md
deleted file mode 100644
index e6ff491..0000000
--- a/pkg/wasm/example/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# Example usage of `package:wasm`
-
-This example demonstrates how to use package:wasm to run a wasm build of the
-[Brotli compression library](https://github.com/google/brotli).
-
-### Running the example
-
-`dart brotli.dart lipsum.txt`
-
-This will compress lipsum.txt, report the compression ratio, then decompress it
-and verify that the result matches the input.
-
-### Generating wasm code
-
-`libbrotli.wasm` was built by cloning the
-[Brotli repo](https://github.com/google/brotli), and compiling it using
-[wasienv](https://github.com/wasienv/wasienv).
-
-There are several ways of building wasm code. The most important difference
-between the tool sets is how the wasm code they generate interacts with the OS.
-For very simple code this difference doesn't matter. But if the library does any
-sort of OS interaction, such as file IO, or even using malloc, it will need to
-use either Emscripten or WASI for that interaction. package:wasm only supports
-WASI at the moment.
-
-To target WASI, one option is to use
-[wasi-libc](https://github.com/WebAssembly/wasi-libc) and a recent version of
-clang. Set the target to `--target=wasm32-unknown-wasi` and the `--sysroot` to
-wasi-libc.
-
-Another option is to build using [wasienv](https://github.com/wasienv/wasienv),
-which is a set of tools that are essentially just an ergonomic wrapper around
-the clang + wasi-libc approach. This is how libbrotli.wasm was built:
-
-1. Install [wasienv](https://github.com/wasienv/wasienv) and clone the
-   [Brotli repo](https://github.com/google/brotli).
-2. Compile every .c file in brotli/c/common/, dec/, and enc/, using wasicc:
-   `wasicc -c foo.c -o out/foo.o -I c/include`
-3. Link all the .o files together using wasild:
-   `wasild --no-entry --export=bar out/foo.o $wasienv_sysroot/lib/wasm32-wasi/libc.a`
-   The `--no-entry` flag tells the linker to ignore the fact that there's no
-   `main()` function, which is important for libraries. `--export=bar` will
-   export the `bar()` function from the library, so that it can be found by
-   package:wasm. For libbrotli.wasm, every function in c/include/brotli/encode.h
-   and decode.h was exported. Brotli used functions from libc, so the wasm
-   version of libc that comes with wasienv was also linked in. If there are
-   still undefined symbols after linking in the wasi libraries, the
-   `--allow-undefined` flag tells the linker to treat undefined symbols as
-   function imports. These functions can then be supplied from Dart code.
diff --git a/pkg/wasm/example/brotli.dart b/pkg/wasm/example/brotli.dart
deleted file mode 100644
index f91e434..0000000
--- a/pkg/wasm/example/brotli.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2021, 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.
-
-// Example of using package:wasm to run a wasm build of the Brotli compression
-// library. Usage:
-// dart brotli.dart input.txt
-
-import 'dart:io';
-import 'dart:typed_data';
-
-import 'package:wasm/wasm.dart';
-
-// Brotli compression parameters.
-const int kDefaultQuality = 11;
-const int kDefaultWindow = 22;
-const int kDefaultMode = 0;
-
-void main(List<String> args) {
-  var brotliPath = Platform.script.resolve('libbrotli.wasm');
-  var moduleData = File(brotliPath.path).readAsBytesSync();
-  var module = WasmModule(moduleData);
-  print(module.describe());
-
-  var instance = module.instantiate().enableWasi().build();
-  var memory = instance.memory;
-  var compress = instance.lookupFunction('BrotliEncoderCompress');
-  var decompress = instance.lookupFunction('BrotliDecoderDecompress');
-
-  print('Loading ${args[0]}');
-  var inputData = File(args[0]).readAsBytesSync();
-  print('Input size: ${inputData.length} bytes');
-
-  // Grow the module's memory to get unused space to put our data.
-  // [initial memory][input data][output data][size][decoded data][size]
-  var inputPtr = memory.lengthInBytes;
-  memory.grow((3 * inputData.length / WasmMemory.kPageSizeInBytes).ceil());
-  var memoryView = memory.view;
-  var outputPtr = inputPtr + inputData.length;
-  var outSizePtr = outputPtr + inputData.length;
-  var decodedPtr = outSizePtr + 4;
-  var decSizePtr = decodedPtr + inputData.length;
-
-  memoryView.setRange(inputPtr, inputPtr + inputData.length, inputData);
-
-  var sizeBytes = ByteData(4)..setUint32(0, inputData.length, Endian.host);
-  memoryView.setRange(
-    outSizePtr,
-    outSizePtr + 4,
-    sizeBytes.buffer.asUint8List(),
-  );
-
-  print('\nCompressing...');
-  var status = compress(
-    kDefaultQuality,
-    kDefaultWindow,
-    kDefaultMode,
-    inputData.length,
-    inputPtr,
-    outSizePtr,
-    outputPtr,
-  );
-  print('Compression status: $status');
-
-  var compressedSize =
-      ByteData.sublistView(memoryView, outSizePtr, outSizePtr + 4)
-          .getUint32(0, Endian.host);
-  print('Compressed size: $compressedSize bytes');
-  var spaceSaving = 100 * (1 - compressedSize / inputData.length);
-  print('Space saving: ${spaceSaving.toStringAsFixed(2)}%');
-
-  var decSizeBytes = ByteData(4)..setUint32(0, inputData.length, Endian.host);
-  memoryView.setRange(
-    decSizePtr,
-    decSizePtr + 4,
-    decSizeBytes.buffer.asUint8List(),
-  );
-
-  print('\nDecompressing...');
-  status = decompress(compressedSize, outputPtr, decSizePtr, decodedPtr);
-  print('Decompression status: $status');
-
-  var decompressedSize =
-      ByteData.sublistView(memoryView, decSizePtr, decSizePtr + 4)
-          .getUint32(0, Endian.host);
-  print('Decompressed size: $decompressedSize bytes');
-
-  print('\nVerifying decompression...');
-  assert(inputData.length == decompressedSize);
-  for (var i = 0; i < inputData.length; ++i) {
-    assert(inputData[i] == memoryView[decodedPtr + i]);
-  }
-  print('Decompression succeeded :)');
-}
diff --git a/pkg/wasm/example/libbrotli.wasm b/pkg/wasm/example/libbrotli.wasm
deleted file mode 100755
index 0f8ddb3..0000000
--- a/pkg/wasm/example/libbrotli.wasm
+++ /dev/null
Binary files differ
diff --git a/pkg/wasm/example/lipsum.txt b/pkg/wasm/example/lipsum.txt
deleted file mode 100644
index f3b5ee0..0000000
--- a/pkg/wasm/example/lipsum.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam feugiat efficitur est a sodales. Ut et odio at nunc fermentum ullamcorper nec in libero. Mauris et interdum elit. Integer in diam nec felis venenatis consectetur. Curabitur elementum egestas augue ac sollicitudin. Cras vulputate efficitur nulla. In blandit sapien ultrices maximus posuere.
-
-Suspendisse in mi at arcu scelerisque tincidunt. Nullam venenatis ex nunc, ut efficitur nulla vehicula eget. Fusce sagittis facilisis ligula nec semper. Nullam et semper ligula. Curabitur sollicitudin ultrices elit et sodales. In iaculis erat scelerisque ipsum scelerisque rutrum. Quisque sollicitudin dolor eu venenatis venenatis. Donec non varius lacus. Phasellus fermentum id mauris nec consequat. Curabitur ultrices, mauris ut scelerisque aliquam, neque augue elementum mi, at accumsan est massa vitae metus. Donec sit amet accumsan dolor, sed vehicula augue. Nunc augue ligula, faucibus tincidunt lorem sed, efficitur ullamcorper erat. Curabitur pellentesque auctor nisi. Cras placerat, massa quis scelerisque commodo, augue leo aliquam elit, sed tempor turpis neque sed nulla. Proin vulputate malesuada augue, quis finibus felis rutrum nec.
-
-Phasellus molestie, tellus eget hendrerit accumsan, diam nunc scelerisque nisi, quis aliquet augue lacus non diam. Nulla facilisi. Nulla est urna, egestas vel luctus nec, sagittis in risus. Mauris aliquam viverra massa vitae efficitur. Integer fringilla sollicitudin ex, et maximus sem gravida ultrices. Vestibulum nec sodales nulla. Cras dapibus maximus venenatis. Vivamus condimentum porttitor mollis. Aliquam congue eleifend condimentum. Donec sagittis bibendum gravida. Nulla condimentum viverra sapien, quis congue libero aliquet nec. Fusce et interdum nisi. Suspendisse at commodo eros. Mauris malesuada nisi in tortor accumsan iaculis. Nam hendrerit interdum magna, eu aliquam est varius eu. Nullam auctor ornare erat, sit amet maximus orci fringilla eu.
-
-Vivamus ullamcorper enim eget tellus lobortis mattis. Vivamus nec tincidunt ipsum. Quisque pharetra non neque non sagittis. Morbi ultrices massa nulla, ac eleifend nulla bibendum mollis. Donec in sodales massa, id luctus dolor. Pellentesque vel auctor tortor, eu imperdiet felis. Pellentesque eleifend eros ipsum, sagittis feugiat enim placerat at. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aliquam lacinia pharetra est.
-
-Duis elit arcu, faucibus ac libero ut, auctor volutpat elit. Duis blandit quis felis at ultricies. Duis ac eros id velit pretium sagittis. Praesent eget orci porttitor, posuere purus ac, interdum eros. Nam augue velit, euismod nec lobortis vitae, rutrum ut libero. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean porttitor sem ante. Integer elit purus, sollicitudin sit amet est in, accumsan suscipit libero. Donec finibus metus scelerisque, mattis dui quis, suscipit turpis. Aliquam rhoncus leo ipsum, vel hendrerit ante porta sit amet. Donec dui nisi, bibendum non rutrum vel, ornare nec diam. Proin tristique ipsum eu pulvinar finibus. Duis pellentesque massa a condimentum elementum. Maecenas efficitur ac est in eleifend. Mauris sit amet lacus blandit, pulvinar ex in, commodo eros.
-
diff --git a/pkg/wasm/lib/src/function.dart b/pkg/wasm/lib/src/function.dart
deleted file mode 100644
index 9beb559..0000000
--- a/pkg/wasm/lib/src/function.dart
+++ /dev/null
@@ -1,94 +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.
-
-import 'dart:ffi';
-
-import 'package:ffi/ffi.dart';
-
-import 'runtime.dart';
-import 'wasmer_api.dart';
-
-/// WasmFunction is a callable function from a WasmInstance.
-class WasmFunction {
-  final String _name;
-  final Pointer<WasmerFunc> _func;
-  final List<int> _argTypes;
-  final int _returnType;
-  final Pointer<WasmerValVec> _args = calloc<WasmerValVec>();
-  final Pointer<WasmerValVec> _results = calloc<WasmerValVec>();
-
-  WasmFunction(this._name, this._func, this._argTypes, this._returnType) {
-    _args.ref.length = _argTypes.length;
-    _args.ref.data =
-        _argTypes.isEmpty ? nullptr : calloc<WasmerVal>(_argTypes.length);
-    _results.ref.length = _returnType == WasmerValKindVoid ? 0 : 1;
-    _results.ref.data =
-        _returnType == WasmerValKindVoid ? nullptr : calloc<WasmerVal>();
-    for (var i = 0; i < _argTypes.length; ++i) {
-      _args.ref.data[i].kind = _argTypes[i];
-    }
-  }
-
-  @override
-  String toString() =>
-      WasmRuntime.getSignatureString(_name, _argTypes, _returnType);
-
-  bool _fillArg(dynamic arg, int i) {
-    switch (_argTypes[i]) {
-      case WasmerValKindI32:
-        if (arg is! int) return false;
-        _args.ref.data[i].i32 = arg;
-        return true;
-      case WasmerValKindI64:
-        if (arg is! int) return false;
-        _args.ref.data[i].i64 = arg;
-        return true;
-      case WasmerValKindF32:
-        if (arg is! num) return false;
-        _args.ref.data[i].f32 = arg;
-        return true;
-      case WasmerValKindF64:
-        if (arg is! num) return false;
-        _args.ref.data[i].f64 = arg;
-        return true;
-    }
-    return false;
-  }
-
-  dynamic apply(List<dynamic> args) {
-    if (args.length != _argTypes.length) {
-      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: $this');
-      }
-    }
-    WasmRuntime().call(_func, _args, _results, toString());
-
-    if (_returnType == WasmerValKindVoid) {
-      return null;
-    }
-    var result = _results.ref.data[0];
-    assert(_returnType == result.kind);
-    switch (_returnType) {
-      case WasmerValKindI32:
-        return result.i32;
-      case WasmerValKindI64:
-        return result.i64;
-      case WasmerValKindF32:
-        return result.f32;
-      case WasmerValKindF64:
-        return result.f64;
-    }
-  }
-
-  @override
-  dynamic noSuchMethod(Invocation invocation) {
-    if (invocation.memberName == #call) {
-      return apply(invocation.positionalArguments);
-    }
-    return super.noSuchMethod(invocation);
-  }
-}
diff --git a/pkg/wasm/lib/src/module.dart b/pkg/wasm/lib/src/module.dart
deleted file mode 100644
index ab0b960..0000000
--- a/pkg/wasm/lib/src/module.dart
+++ /dev/null
@@ -1,343 +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.
-
-import 'dart:ffi';
-import 'dart:typed_data';
-
-import 'package:ffi/ffi.dart';
-
-import 'function.dart';
-import 'runtime.dart';
-import 'wasmer_api.dart';
-
-/// WasmModule is a compiled module that can be instantiated.
-class WasmModule {
-  late Pointer<WasmerStore> _store;
-  late Pointer<WasmerModule> _module;
-
-  /// Compile a module.
-  WasmModule(Uint8List data) {
-    var runtime = WasmRuntime();
-    _store = runtime.newStore(this);
-    _module = runtime.compile(this, _store, data);
-  }
-
-  /// Returns a WasmInstanceBuilder that is used to add all the imports that the
-  /// module needs, and then instantiate it.
-  WasmInstanceBuilder instantiate() => WasmInstanceBuilder(this);
-
-  /// Create a new memory with the given number of initial pages, and optional
-  /// maximum number of pages.
-  WasmMemory createMemory(int pages, [int? maxPages]) =>
-      WasmMemory._create(_store, pages, maxPages);
-
-  /// Returns a description of all of the module's imports and exports, for
-  /// debugging.
-  String describe() {
-    var description = StringBuffer();
-    var runtime = WasmRuntime();
-    var imports = runtime.importDescriptors(_module);
-    for (var imp in imports) {
-      description.write('import $imp\n');
-    }
-    var exports = runtime.exportDescriptors(_module);
-    for (var exp in exports) {
-      description.write('export $exp\n');
-    }
-    return description.toString();
-  }
-}
-
-Pointer<WasmerTrap> _wasmFnImportTrampoline(
-  Pointer<_WasmFnImport> imp,
-  Pointer<WasmerValVec> args,
-  Pointer<WasmerValVec> results,
-) {
-  try {
-    _WasmFnImport._call(imp, args, results);
-  } catch (exception) {
-    return WasmRuntime().newTrap(imp.ref.store, exception);
-  }
-  return nullptr;
-}
-
-void _wasmFnImportFinalizer(Pointer<_WasmFnImport> imp) {
-  _wasmFnImportToFn.remove(imp.address);
-  calloc.free(imp);
-}
-
-final _wasmFnImportTrampolineNative = Pointer.fromFunction<
-    Pointer<WasmerTrap> Function(
-  Pointer<_WasmFnImport>,
-  Pointer<WasmerValVec>,
-  Pointer<WasmerValVec>,
-)>(_wasmFnImportTrampoline);
-final _wasmFnImportToFn = <int, Function>{};
-final _wasmFnImportFinalizerNative =
-    Pointer.fromFunction<Void Function(Pointer<_WasmFnImport>)>(
-  _wasmFnImportFinalizer,
-);
-
-class _WasmFnImport extends Struct {
-  @Int32()
-  external int returnType;
-
-  external Pointer<WasmerStore> store;
-
-  static void _call(
-    Pointer<_WasmFnImport> imp,
-    Pointer<WasmerValVec> rawArgs,
-    Pointer<WasmerValVec> rawResult,
-  ) {
-    var fn = _wasmFnImportToFn[imp.address] as Function;
-    var args = [];
-    for (var i = 0; i < rawArgs.ref.length; ++i) {
-      args.add(rawArgs.ref.data[i].toDynamic);
-    }
-    assert(
-      rawResult.ref.length == 1 || imp.ref.returnType == WasmerValKindVoid,
-    );
-    var result = Function.apply(fn, args);
-    if (imp.ref.returnType != WasmerValKindVoid) {
-      rawResult.ref.data[0].kind = imp.ref.returnType;
-      switch (imp.ref.returnType) {
-        case WasmerValKindI32:
-          rawResult.ref.data[0].i32 = result as int;
-          break;
-        case WasmerValKindI64:
-          rawResult.ref.data[0].i64 = result as int;
-          break;
-        case WasmerValKindF32:
-          rawResult.ref.data[0].f32 = result as int;
-          break;
-        case WasmerValKindF64:
-          rawResult.ref.data[0].f64 = result as int;
-          break;
-      }
-    }
-  }
-}
-
-class _WasmImportOwner {}
-
-/// WasmInstanceBuilder is used collect all the imports that a WasmModule
-/// requires before it is instantiated.
-class WasmInstanceBuilder {
-  final WasmModule _module;
-  late List<WasmImportDescriptor> _importDescs;
-  final Map<String, int> _importIndex;
-  final Pointer<WasmerExternVec> _imports = calloc<WasmerExternVec>();
-  Pointer<WasmerWasiEnv> _wasiEnv = nullptr;
-  final _WasmImportOwner _importOwner = _WasmImportOwner();
-
-  WasmInstanceBuilder(this._module) : _importIndex = {} {
-    _importDescs = WasmRuntime().importDescriptors(_module._module);
-    _imports.ref.length = _importDescs.length;
-    _imports.ref.data = calloc<Pointer<WasmerExtern>>(_importDescs.length);
-    for (var i = 0; i < _importDescs.length; ++i) {
-      var imp = _importDescs[i];
-      _importIndex['${imp.moduleName}::${imp.name}'] = i;
-      _imports.ref.data[i] = nullptr;
-    }
-  }
-
-  int _getIndex(String moduleName, String name) {
-    var index = _importIndex['$moduleName::$name'];
-    if (index == null) {
-      throw Exception('Import not found: $moduleName::$name');
-    } else if (_imports.ref.data[index] != nullptr) {
-      throw Exception('Import already filled: $moduleName::$name');
-    } else {
-      return index;
-    }
-  }
-
-  /// Add a WasmMemory to the imports.
-  WasmInstanceBuilder addMemory(
-    String moduleName,
-    String name,
-    WasmMemory memory,
-  ) {
-    var index = _getIndex(moduleName, name);
-    var imp = _importDescs[index];
-    if (imp.kind != WasmerExternKindMemory) {
-      throw Exception('Import is not a memory: $imp');
-    }
-    _imports.ref.data[index] = WasmRuntime().memoryToExtern(memory._mem);
-    return this;
-  }
-
-  /// Add a function to the imports.
-  WasmInstanceBuilder addFunction(String moduleName, String name, Function fn) {
-    var index = _getIndex(moduleName, name);
-    var imp = _importDescs[index];
-    var runtime = WasmRuntime();
-
-    if (imp.kind != WasmerExternKindFunction) {
-      throw Exception('Import is not a function: $imp');
-    }
-
-    var returnType = runtime.getReturnType(imp.funcType);
-    var wasmFnImport = calloc<_WasmFnImport>();
-    wasmFnImport.ref.returnType = returnType;
-    wasmFnImport.ref.store = _module._store;
-    _wasmFnImportToFn[wasmFnImport.address] = fn;
-    var fnImp = runtime.newFunc(
-      _importOwner,
-      _module._store,
-      imp.funcType,
-      _wasmFnImportTrampolineNative,
-      wasmFnImport,
-      _wasmFnImportFinalizerNative,
-    );
-    _imports.ref.data[index] = runtime.functionToExtern(fnImp);
-    return this;
-  }
-
-  /// Enable WASI and add the default WASI imports.
-  WasmInstanceBuilder enableWasi({
-    bool captureStdout = false,
-    bool captureStderr = false,
-  }) {
-    if (_wasiEnv != nullptr) {
-      throw Exception('WASI is already enabled.');
-    }
-    var runtime = WasmRuntime();
-    var config = runtime.newWasiConfig();
-    if (captureStdout) runtime.captureWasiStdout(config);
-    if (captureStderr) runtime.captureWasiStderr(config);
-    _wasiEnv = runtime.newWasiEnv(config);
-    runtime.getWasiImports(_module._store, _module._module, _wasiEnv, _imports);
-    return this;
-  }
-
-  /// Build the module instance.
-  WasmInstance build() {
-    for (var i = 0; i < _importDescs.length; ++i) {
-      if (_imports.ref.data[i] == nullptr) {
-        throw Exception('Missing import: ${_importDescs[i]}');
-      }
-    }
-    return WasmInstance(_module, _imports, _wasiEnv);
-  }
-}
-
-/// WasmInstance is an instantiated WasmModule.
-class WasmInstance {
-  final WasmModule _module;
-  late Pointer<WasmerInstance> _instance;
-  Pointer<WasmerMemory>? _exportedMemory;
-  final Pointer<WasmerWasiEnv> _wasiEnv;
-  Stream<List<int>>? _stdout;
-  Stream<List<int>>? _stderr;
-  final Map<String, WasmFunction> _functions = {};
-
-  WasmInstance(
-    this._module,
-    Pointer<WasmerExternVec> imports,
-    this._wasiEnv,
-  ) {
-    var runtime = WasmRuntime();
-    _instance =
-        runtime.instantiate(this, _module._store, _module._module, imports);
-    var exports = runtime.exports(_instance);
-    var exportDescs = runtime.exportDescriptors(_module._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]);
-      var name = exportDescs[i].name;
-      if (kind == WasmerExternKindFunction) {
-        var f = runtime.externToFunction(e);
-        var ft = exportDescs[i].funcType;
-        _functions[name] = WasmFunction(
-          name,
-          f,
-          runtime.getArgTypes(ft),
-          runtime.getReturnType(ft),
-        );
-      } else if (kind == WasmerExternKindMemory) {
-        // WASM currently allows only one memory per module.
-        var mem = runtime.externToMemory(e);
-        _exportedMemory = mem;
-        if (_wasiEnv != nullptr) {
-          runtime.wasiEnvSetMemory(_wasiEnv, mem);
-        }
-      }
-    }
-  }
-
-  /// Searches the instantiated module for the given function. Returns null if
-  /// it is not found.
-  dynamic lookupFunction(String name) => _functions[name];
-
-  /// Returns the memory exported from this instance.
-  WasmMemory get memory {
-    if (_exportedMemory == null) {
-      throw Exception('Wasm module did not export its memory.');
-    }
-    return WasmMemory._fromExport(_exportedMemory as Pointer<WasmerMemory>);
-  }
-
-  /// Returns a stream that reads from stdout. To use this, you must enable WASI
-  /// when instantiating the module, and set captureStdout to true.
-  Stream<List<int>> get stdout {
-    if (_wasiEnv == nullptr) {
-      throw Exception("Can't capture stdout without WASI enabled.");
-    }
-    return _stdout ??= WasmRuntime().getWasiStdoutStream(_wasiEnv);
-  }
-
-  /// Returns a stream that reads from stderr. To use this, you must enable WASI
-  /// when instantiating the module, and set captureStderr to true.
-  Stream<List<int>> get stderr {
-    if (_wasiEnv == nullptr) {
-      throw Exception("Can't capture stderr without WASI enabled.");
-    }
-    return _stderr ??= WasmRuntime().getWasiStderrStream(_wasiEnv);
-  }
-}
-
-/// WasmMemory contains the memory of a WasmInstance.
-class WasmMemory {
-  late Pointer<WasmerMemory> _mem;
-  late Uint8List _view;
-
-  WasmMemory._fromExport(this._mem) {
-    _view = WasmRuntime().memoryView(_mem);
-  }
-
-  /// Create a new memory with the given number of initial pages, and optional
-  /// maximum number of pages.
-  WasmMemory._create(Pointer<WasmerStore> store, int pages, int? maxPages) {
-    _mem = WasmRuntime().newMemory(this, store, pages, maxPages);
-    _view = WasmRuntime().memoryView(_mem);
-  }
-
-  /// The WASM spec defines the page size as 64KiB.
-  static const int kPageSizeInBytes = 64 * 1024;
-
-  /// Returns the length of the memory in pages.
-  int get lengthInPages => WasmRuntime().memoryLength(_mem);
-
-  /// Returns the length of the memory in bytes.
-  int get lengthInBytes => _view.lengthInBytes;
-
-  /// Returns the byte at the given index.
-  int operator [](int index) => _view[index];
-
-  /// Sets the byte at the given index to value.
-  void operator []=(int index, int value) {
-    _view[index] = value;
-  }
-
-  /// Returns a Uint8List view into the memory.
-  Uint8List get view => _view;
-
-  /// Grow the memory by deltaPages.
-  void grow(int deltaPages) {
-    var runtime = WasmRuntime()..growMemory(_mem, deltaPages);
-    _view = runtime.memoryView(_mem);
-  }
-}
diff --git a/pkg/wasm/lib/src/runtime.dart b/pkg/wasm/lib/src/runtime.dart
deleted file mode 100644
index 3f9bcf0..0000000
--- a/pkg/wasm/lib/src/runtime.dart
+++ /dev/null
@@ -1,121 +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.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:ffi';
-import 'dart:io';
-import 'dart:typed_data';
-
-import 'package:ffi/ffi.dart';
-
-import 'shared.dart';
-import 'wasmer_api.dart';
-
-part 'runtime.g.dart';
-
-class WasmImportDescriptor {
-  int kind;
-  String moduleName;
-  String name;
-  Pointer<WasmerFunctype> funcType;
-
-  WasmImportDescriptor(this.kind, this.moduleName, this.name, this.funcType);
-
-  @override
-  String toString() {
-    var kindName = wasmerExternKindName(kind);
-    if (kind == WasmerExternKindFunction) {
-      var runtime = WasmRuntime();
-      var sig = WasmRuntime.getSignatureString(
-        '$moduleName::$name',
-        runtime.getArgTypes(funcType),
-        runtime.getReturnType(funcType),
-      );
-      return '$kindName: $sig';
-    } else {
-      return '$kindName: $moduleName::$name';
-    }
-  }
-}
-
-class WasmExportDescriptor {
-  int kind;
-  String name;
-  Pointer<WasmerFunctype> funcType;
-
-  WasmExportDescriptor(this.kind, this.name, this.funcType);
-
-  @override
-  String toString() {
-    var kindName = wasmerExternKindName(kind);
-    if (kind == WasmerExternKindFunction) {
-      var runtime = WasmRuntime();
-      var sig = WasmRuntime.getSignatureString(
-        name,
-        runtime.getArgTypes(funcType),
-        runtime.getReturnType(funcType),
-      );
-      return '$kindName: $sig';
-    } else {
-      return '$kindName: $name';
-    }
-  }
-}
-
-class _WasmTrapsEntry {
-  Object exception;
-
-  _WasmTrapsEntry(this.exception);
-}
-
-class _WasiStreamIterator implements Iterator<List<int>> {
-  static const int _bufferLength = 1024;
-  final Pointer<WasmerWasiEnv> _env;
-  final Function _reader;
-  final Pointer<Uint8> _buf = calloc<Uint8>(_bufferLength);
-  int _length = 0;
-
-  _WasiStreamIterator(this._env, this._reader);
-
-  @override
-  bool moveNext() {
-    _length = _reader(_env, _buf, _bufferLength) as int;
-    return true;
-  }
-
-  @override
-  List<int> get current => _buf.asTypedList(_length);
-}
-
-class _WasiStreamIterable extends Iterable<List<int>> {
-  final Pointer<WasmerWasiEnv> _env;
-  final Function _reader;
-
-  _WasiStreamIterable(this._env, this._reader);
-
-  @override
-  Iterator<List<int>> get iterator => _WasiStreamIterator(_env, _reader);
-}
-
-String _getLibName() {
-  if (Platform.isMacOS) return appleLib;
-  if (Platform.isLinux) return linuxLib;
-  // TODO(dartbug.com/37882): Support more platforms.
-  throw Exception('Wasm not currently supported on this platform');
-}
-
-String? _getLibPathFrom(Uri root) {
-  final pkgRoot = packageRootUri(root);
-
-  return pkgRoot?.resolve('$wasmToolDir${_getLibName()}').path;
-}
-
-String _getLibPath() {
-  var path = _getLibPathFrom(Platform.script.resolve('./'));
-  if (path != null) return path;
-  path = _getLibPathFrom(Directory.current.uri);
-  if (path != null) return path;
-  throw Exception('Wasm library not found. Did you `$invocationString`?');
-}
diff --git a/pkg/wasm/lib/src/runtime.g.dart b/pkg/wasm/lib/src/runtime.g.dart
deleted file mode 100644
index eb72930..0000000
--- a/pkg/wasm/lib/src/runtime.g.dart
+++ /dev/null
@@ -1,773 +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.
-
-// This file has been automatically generated. Please do not edit it manually.
-// To regenerate the file, use the following command
-// "generate_ffi_boilerplate.py".
-
-// ignore_for_file: cascade_invocations
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: unused_field
-
-part of 'runtime.dart';
-
-class WasmRuntime {
-  static WasmRuntime? _inst;
-
-  DynamicLibrary _lib;
-  late Pointer<WasmerEngine> _engine;
-  Map<int, _WasmTrapsEntry> traps = {};
-
-  late WasmerDartInitializeApiDLFn _Dart_InitializeApiDL;
-  late WasmerSetFinalizerForEngineFn _set_finalizer_for_engine;
-  late WasmerSetFinalizerForFuncFn _set_finalizer_for_func;
-  late WasmerSetFinalizerForInstanceFn _set_finalizer_for_instance;
-  late WasmerSetFinalizerForMemoryFn _set_finalizer_for_memory;
-  late WasmerSetFinalizerForMemorytypeFn _set_finalizer_for_memorytype;
-  late WasmerSetFinalizerForModuleFn _set_finalizer_for_module;
-  late WasmerSetFinalizerForStoreFn _set_finalizer_for_store;
-  late WasmerSetFinalizerForTrapFn _set_finalizer_for_trap;
-  late WasmerWasiConfigInheritStderrFn _wasi_config_inherit_stderr;
-  late WasmerWasiConfigInheritStdoutFn _wasi_config_inherit_stdout;
-  late WasmerWasiConfigNewFn _wasi_config_new;
-  late WasmerWasiEnvDeleteFn _wasi_env_delete;
-  late WasmerWasiEnvNewFn _wasi_env_new;
-  late WasmerWasiEnvReadStderrFn _wasi_env_read_stderr;
-  late WasmerWasiEnvReadStdoutFn _wasi_env_read_stdout;
-  late WasmerWasiEnvSetMemoryFn _wasi_env_set_memory;
-  late WasmerWasiGetImportsFn _wasi_get_imports;
-  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 WasmerFuncAsExternFn _func_as_extern;
-  late WasmerFuncCallFn _func_call;
-  late WasmerFuncDeleteFn _func_delete;
-  late WasmerFuncNewWithEnvFn _func_new_with_env;
-  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 WasmerInstanceNewFn _instance_new;
-  late WasmerMemoryAsExternFn _memory_as_extern;
-  late WasmerMemoryDataFn _memory_data;
-  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 WasmerTrapMessageFn _trap_message;
-  late WasmerTrapNewFn _trap_new;
-  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;
-  late WasmerWasmerLastErrorLengthFn _wasmer_last_error_length;
-  late WasmerWasmerLastErrorMessageFn _wasmer_last_error_message;
-
-  factory WasmRuntime() => _inst ??= WasmRuntime._init();
-
-  WasmRuntime._init() : _lib = DynamicLibrary.open(_getLibPath()) {
-    _Dart_InitializeApiDL = _lib.lookupFunction<
-        NativeWasmerDartInitializeApiDLFn, WasmerDartInitializeApiDLFn>(
-      'Dart_InitializeApiDL',
-    );
-    _set_finalizer_for_engine = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForEngineFn, WasmerSetFinalizerForEngineFn>(
-      'set_finalizer_for_engine',
-    );
-    _set_finalizer_for_func = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForFuncFn, WasmerSetFinalizerForFuncFn>(
-      'set_finalizer_for_func',
-    );
-    _set_finalizer_for_instance = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForInstanceFn, WasmerSetFinalizerForInstanceFn>(
-      'set_finalizer_for_instance',
-    );
-    _set_finalizer_for_memory = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForMemoryFn, WasmerSetFinalizerForMemoryFn>(
-      'set_finalizer_for_memory',
-    );
-    _set_finalizer_for_memorytype = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForMemorytypeFn,
-        WasmerSetFinalizerForMemorytypeFn>(
-      'set_finalizer_for_memorytype',
-    );
-    _set_finalizer_for_module = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForModuleFn, WasmerSetFinalizerForModuleFn>(
-      'set_finalizer_for_module',
-    );
-    _set_finalizer_for_store = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForStoreFn, WasmerSetFinalizerForStoreFn>(
-      'set_finalizer_for_store',
-    );
-    _set_finalizer_for_trap = _lib.lookupFunction<
-        NativeWasmerSetFinalizerForTrapFn, WasmerSetFinalizerForTrapFn>(
-      'set_finalizer_for_trap',
-    );
-    _wasi_config_inherit_stderr = _lib.lookupFunction<
-        NativeWasmerWasiConfigInheritStderrFn, WasmerWasiConfigInheritStderrFn>(
-      'wasi_config_inherit_stderr',
-    );
-    _wasi_config_inherit_stdout = _lib.lookupFunction<
-        NativeWasmerWasiConfigInheritStdoutFn, WasmerWasiConfigInheritStdoutFn>(
-      'wasi_config_inherit_stdout',
-    );
-    _wasi_config_new =
-        _lib.lookupFunction<NativeWasmerWasiConfigNewFn, WasmerWasiConfigNewFn>(
-      'wasi_config_new',
-    );
-    _wasi_env_delete =
-        _lib.lookupFunction<NativeWasmerWasiEnvDeleteFn, WasmerWasiEnvDeleteFn>(
-      'wasi_env_delete',
-    );
-    _wasi_env_new =
-        _lib.lookupFunction<NativeWasmerWasiEnvNewFn, WasmerWasiEnvNewFn>(
-      'wasi_env_new',
-    );
-    _wasi_env_read_stderr = _lib.lookupFunction<NativeWasmerWasiEnvReadStderrFn,
-        WasmerWasiEnvReadStderrFn>(
-      'wasi_env_read_stderr',
-    );
-    _wasi_env_read_stdout = _lib.lookupFunction<NativeWasmerWasiEnvReadStdoutFn,
-        WasmerWasiEnvReadStdoutFn>(
-      'wasi_env_read_stdout',
-    );
-    _wasi_env_set_memory = _lib.lookupFunction<NativeWasmerWasiEnvSetMemoryFn,
-        WasmerWasiEnvSetMemoryFn>(
-      'wasi_env_set_memory',
-    );
-    _wasi_get_imports = _lib
-        .lookupFunction<NativeWasmerWasiGetImportsFn, WasmerWasiGetImportsFn>(
-      'wasi_get_imports',
-    );
-    _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_as_extern =
-        _lib.lookupFunction<NativeWasmerFuncAsExternFn, WasmerFuncAsExternFn>(
-      'wasm_func_as_extern',
-    );
-    _func_call = _lib.lookupFunction<NativeWasmerFuncCallFn, WasmerFuncCallFn>(
-      'wasm_func_call',
-    );
-    _func_delete =
-        _lib.lookupFunction<NativeWasmerFuncDeleteFn, WasmerFuncDeleteFn>(
-      'wasm_func_delete',
-    );
-    _func_new_with_env = _lib
-        .lookupFunction<NativeWasmerFuncNewWithEnvFn, WasmerFuncNewWithEnvFn>(
-      'wasm_func_new_with_env',
-    );
-    _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>(
-      'wasm_instance_exports',
-    );
-    _instance_new =
-        _lib.lookupFunction<NativeWasmerInstanceNewFn, WasmerInstanceNewFn>(
-      'wasm_instance_new',
-    );
-    _memory_as_extern = _lib
-        .lookupFunction<NativeWasmerMemoryAsExternFn, WasmerMemoryAsExternFn>(
-      'wasm_memory_as_extern',
-    );
-    _memory_data =
-        _lib.lookupFunction<NativeWasmerMemoryDataFn, WasmerMemoryDataFn>(
-      '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',
-    );
-    _trap_message =
-        _lib.lookupFunction<NativeWasmerTrapMessageFn, WasmerTrapMessageFn>(
-      'wasm_trap_message',
-    );
-    _trap_new = _lib.lookupFunction<NativeWasmerTrapNewFn, WasmerTrapNewFn>(
-      'wasm_trap_new',
-    );
-    _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',
-    );
-    _wasmer_last_error_length = _lib.lookupFunction<
-        NativeWasmerWasmerLastErrorLengthFn, WasmerWasmerLastErrorLengthFn>(
-      'wasmer_last_error_length',
-    );
-    _wasmer_last_error_message = _lib.lookupFunction<
-        NativeWasmerWasmerLastErrorMessageFn, WasmerWasmerLastErrorMessageFn>(
-      'wasmer_last_error_message',
-    );
-
-    if (_Dart_InitializeApiDL(NativeApi.initializeApiDLData) != 0) {
-      throw Exception('Failed to initialize Dart API');
-    }
-    _engine = _engine_new();
-    _checkNotEqual(_engine, nullptr, 'Failed to initialize Wasm engine.');
-    _set_finalizer_for_engine(this, _engine);
-  }
-
-  Pointer<WasmerStore> newStore(Object owner) {
-    var store = _checkNotEqual(
-      _store_new(_engine),
-      nullptr,
-      'Failed to create Wasm store.',
-    );
-    _set_finalizer_for_store(owner, store);
-    return store;
-  }
-
-  Pointer<WasmerModule> compile(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Uint8List data,
-  ) {
-    var dataPtr = calloc<Uint8>(data.length);
-    for (var i = 0; i < data.length; ++i) {
-      dataPtr[i] = data[i];
-    }
-    var dataVec = calloc<WasmerByteVec>();
-    dataVec.ref.data = dataPtr;
-    dataVec.ref.length = data.length;
-
-    var modulePtr = _module_new(store, dataVec);
-
-    calloc.free(dataPtr);
-    calloc.free(dataVec);
-
-    _checkNotEqual(modulePtr, nullptr, 'Wasm module compile failed.');
-    _set_finalizer_for_module(owner, modulePtr);
-    return modulePtr;
-  }
-
-  List<WasmExportDescriptor> exportDescriptors(Pointer<WasmerModule> module) {
-    var exportsVec = calloc<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,
-        ),
-      );
-    }
-    calloc.free(exportsVec);
-    return exps;
-  }
-
-  List<WasmImportDescriptor> importDescriptors(Pointer<WasmerModule> module) {
-    var importsVec = calloc<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,
-        ),
-      );
-    }
-    calloc.free(importsVec);
-    return imps;
-  }
-
-  void maybeThrowTrap(Pointer<WasmerTrap> trap, String source) {
-    if (trap != nullptr) {
-      // There are 2 kinds of trap, and their memory is managed differently.
-      // Traps created in the newTrap method below are stored in the traps map
-      // with a corresponding exception, and their memory is managed using a
-      // finalizer on the _WasmTrapsEntry. Traps can also be created by WASM
-      // code, and in that case we delete them in this function.
-      var entry = traps[trap.address];
-      if (entry != null) {
-        traps.remove(entry);
-        // ignore: only_throw_errors
-        throw entry.exception;
-      } else {
-        var trapMessage = calloc<WasmerByteVec>();
-        _trap_message(trap, trapMessage);
-        var message = 'Wasm trap when calling $source: ${trapMessage.ref}';
-        _byte_vec_delete(trapMessage);
-        calloc.free(trapMessage);
-        _trap_delete(trap);
-        throw Exception(message);
-      }
-    }
-  }
-
-  Pointer<WasmerInstance> instantiate(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Pointer<WasmerModule> module,
-    Pointer<WasmerExternVec> imports,
-  ) {
-    var trap = calloc<Pointer<WasmerTrap>>();
-    trap.value = nullptr;
-    var inst = _instance_new(store, module, imports, trap);
-    maybeThrowTrap(trap.value, 'module initialization function');
-    calloc.free(trap);
-    _checkNotEqual(inst, nullptr, 'Wasm module instantiation failed.');
-    _set_finalizer_for_instance(owner, inst);
-    return inst;
-  }
-
-  // Clean up the exports after use, with deleteExports.
-  Pointer<WasmerExternVec> exports(Pointer<WasmerInstance> instancePtr) {
-    var exports = calloc<WasmerExternVec>();
-    _instance_exports(instancePtr, exports);
-    return exports;
-  }
-
-  void deleteExports(Pointer<WasmerExternVec> exports) {
-    _extern_vec_delete(exports);
-    calloc.free(exports);
-  }
-
-  int externKind(Pointer<WasmerExtern> extern) => _extern_kind(extern);
-
-  Pointer<WasmerFunc> externToFunction(Pointer<WasmerExtern> extern) =>
-      _extern_as_func(extern);
-
-  Pointer<WasmerExtern> functionToExtern(Pointer<WasmerFunc> func) =>
-      _func_as_extern(func);
-
-  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<WasmerValVec> args,
-    Pointer<WasmerValVec> results,
-    String source,
-  ) {
-    maybeThrowTrap(_func_call(func, args, results), source);
-  }
-
-  Pointer<WasmerMemory> externToMemory(Pointer<WasmerExtern> extern) =>
-      _extern_as_memory(extern);
-
-  Pointer<WasmerExtern> memoryToExtern(Pointer<WasmerMemory> memory) =>
-      _memory_as_extern(memory);
-
-  Pointer<WasmerMemory> newMemory(
-    Object owner,
-    Pointer<WasmerStore> store,
-    int pages,
-    int? maxPages,
-  ) {
-    var limPtr = calloc<WasmerLimits>();
-    limPtr.ref.min = pages;
-    limPtr.ref.max = maxPages ?? wasm_limits_max_default;
-    var memType = _memorytype_new(limPtr);
-    calloc.free(limPtr);
-    _checkNotEqual(memType, nullptr, 'Failed to create memory type.');
-    _set_finalizer_for_memorytype(owner, memType);
-    var memory = _checkNotEqual(
-      _memory_new(store, memType),
-      nullptr,
-      'Failed to create memory.',
-    );
-    _set_finalizer_for_memory(owner, memory);
-    return memory;
-  }
-
-  void growMemory(Pointer<WasmerMemory> memory, int deltaPages) {
-    _checkNotEqual(
-      _memory_grow(memory, deltaPages),
-      0,
-      'Failed to grow memory.',
-    );
-  }
-
-  int memoryLength(Pointer<WasmerMemory> memory) => _memory_size(memory);
-
-  Uint8List memoryView(Pointer<WasmerMemory> memory) =>
-      _memory_data(memory).asTypedList(_memory_data_size(memory));
-
-  Pointer<WasmerFunc> newFunc(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Pointer<WasmerFunctype> funcType,
-    Pointer func,
-    Pointer env,
-    Pointer finalizer,
-  ) {
-    var f = _func_new_with_env(
-      store,
-      funcType,
-      func.cast(),
-      env.cast(),
-      finalizer.cast(),
-    );
-    _checkNotEqual(f, nullptr, 'Failed to create function.');
-    _set_finalizer_for_func(owner, f);
-    return f;
-  }
-
-  Pointer<WasmerTrap> newTrap(Pointer<WasmerStore> store, Object exception) {
-    var msg = calloc<WasmerByteVec>();
-    msg.ref.data = calloc<Uint8>();
-    msg.ref.data[0] = 0;
-    msg.ref.length = 0;
-    var trap = _trap_new(store, msg);
-    calloc.free(msg.ref.data);
-    calloc.free(msg);
-    _checkNotEqual(trap, nullptr, 'Failed to create trap.');
-    var entry = _WasmTrapsEntry(exception);
-    _set_finalizer_for_trap(entry, trap);
-    traps[trap.address] = entry;
-    return trap;
-  }
-
-  Pointer<WasmerWasiConfig> newWasiConfig() {
-    var name = calloc<Uint8>();
-    name[0] = 0;
-    var config = _wasi_config_new(name);
-    calloc.free(name);
-    return _checkNotEqual(config, nullptr, 'Failed to create WASI config.');
-  }
-
-  void captureWasiStdout(Pointer<WasmerWasiConfig> config) {
-    _wasi_config_inherit_stdout(config);
-  }
-
-  void captureWasiStderr(Pointer<WasmerWasiConfig> config) {
-    _wasi_config_inherit_stderr(config);
-  }
-
-  Pointer<WasmerWasiEnv> newWasiEnv(Pointer<WasmerWasiConfig> config) =>
-      _checkNotEqual(
-        _wasi_env_new(config),
-        nullptr,
-        'Failed to create WASI environment.',
-      );
-
-  void wasiEnvSetMemory(
-    Pointer<WasmerWasiEnv> env,
-    Pointer<WasmerMemory> memory,
-  ) {
-    _wasi_env_set_memory(env, memory);
-  }
-
-  void getWasiImports(
-    Pointer<WasmerStore> store,
-    Pointer<WasmerModule> mod,
-    Pointer<WasmerWasiEnv> env,
-    Pointer<WasmerExternVec> imports,
-  ) {
-    _checkNotEqual(
-      _wasi_get_imports(store, mod, env, imports),
-      0,
-      'Failed to fill WASI imports.',
-    );
-  }
-
-  Stream<List<int>> getWasiStdoutStream(Pointer<WasmerWasiEnv> env) =>
-      Stream.fromIterable(_WasiStreamIterable(env, _wasi_env_read_stdout));
-
-  Stream<List<int>> getWasiStderrStream(Pointer<WasmerWasiEnv> env) =>
-      Stream.fromIterable(_WasiStreamIterable(env, _wasi_env_read_stderr));
-
-  String _getLastError() {
-    var length = _wasmer_last_error_length();
-    var buf = calloc<Uint8>(length);
-    _wasmer_last_error_message(buf, length);
-    var message = utf8.decode(buf.asTypedList(length));
-    calloc.free(buf);
-    return message;
-  }
-
-  T _checkNotEqual<T>(T x, T y, String errorMessage) {
-    if (x == y) {
-      throw Exception('$errorMessage\n${_getLastError()}');
-    }
-    return x;
-  }
-
-  static String getSignatureString(
-    String name,
-    List<int> argTypes,
-    int returnType,
-  ) =>
-      '${wasmerValKindName(returnType)} '
-      "$name(${argTypes.map(wasmerValKindName).join(", ")})";
-}
diff --git a/pkg/wasm/lib/src/shared.dart b/pkg/wasm/lib/src/shared.dart
deleted file mode 100644
index 0f666b7..0000000
--- a/pkg/wasm/lib/src/shared.dart
+++ /dev/null
@@ -1,22 +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.
-
-import 'dart:io';
-
-const invocationString = 'dart run wasm:setup';
-
-const pkgConfigFile = '.dart_tool/package_config.json';
-const wasmToolDir = '.dart_tool/wasm/';
-
-const appleLib = 'libwasmer.dylib';
-const linuxLib = 'libwasmer.so';
-
-Uri? packageRootUri(Uri root) {
-  do {
-    if (FileSystemEntity.isFileSync(root.resolve(pkgConfigFile).path)) {
-      return root;
-    }
-  } while (root != (root = root.resolve('..')));
-  return null;
-}
diff --git a/pkg/wasm/lib/src/wasmer_api.dart b/pkg/wasm/lib/src/wasmer_api.dart
deleted file mode 100644
index 28fa92d..0000000
--- a/pkg/wasm/lib/src/wasmer_api.dart
+++ /dev/null
@@ -1,132 +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.
-
-// This file has been automatically generated. Please do not edit it manually.
-// To regenerate the file, use the following command
-// "generate_ffi_boilerplate.py".
-
-// ignore_for_file: constant_identifier_names
-
-import 'dart:convert';
-import 'dart:ffi';
-import 'dart:typed_data';
-
-part 'wasmer_api.g.dart';
-
-// 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;
-
-  dynamic get toDynamic {
-    switch (kind) {
-      case WasmerValKindI32:
-        return i32;
-      case WasmerValKindI64:
-        return i64;
-      case WasmerValKindF32:
-        return f32;
-      case WasmerValKindF64:
-        return f64;
-    }
-  }
-}
-
-// 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;
diff --git a/pkg/wasm/lib/src/wasmer_api.g.dart b/pkg/wasm/lib/src/wasmer_api.g.dart
deleted file mode 100644
index 4211e7f..0000000
--- a/pkg/wasm/lib/src/wasmer_api.g.dart
+++ /dev/null
@@ -1,577 +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.
-
-// This file has been automatically generated. Please do not edit it manually.
-// To regenerate the file, use the following command
-// "generate_ffi_boilerplate.py".
-
-// ignore_for_file: require_trailing_commas
-
-part of 'wasmer_api.dart';
-
-// wasm_engine_t
-class WasmerEngine extends Opaque {}
-
-// wasm_exporttype_t
-class WasmerExporttype extends Opaque {}
-
-// wasm_extern_t
-class WasmerExtern extends Opaque {}
-
-// wasm_externtype_t
-class WasmerExterntype extends Opaque {}
-
-// wasm_func_t
-class WasmerFunc extends Opaque {}
-
-// wasm_functype_t
-class WasmerFunctype extends Opaque {}
-
-// wasm_importtype_t
-class WasmerImporttype extends Opaque {}
-
-// wasm_instance_t
-class WasmerInstance extends Opaque {}
-
-// wasm_memory_t
-class WasmerMemory extends Opaque {}
-
-// wasm_memorytype_t
-class WasmerMemorytype extends Opaque {}
-
-// wasm_module_t
-class WasmerModule extends Opaque {}
-
-// wasm_store_t
-class WasmerStore extends Opaque {}
-
-// wasm_trap_t
-class WasmerTrap extends Opaque {}
-
-// wasm_valtype_t
-class WasmerValtype extends Opaque {}
-
-// wasi_config_t
-class WasmerWasiConfig extends Opaque {}
-
-// wasi_env_t
-class WasmerWasiEnv extends Opaque {}
-
-// wasm_byte_vec_t
-class WasmerByteVec extends Struct {
-  @Uint64()
-  external int length;
-
-  external Pointer<Uint8> data;
-
-  Uint8List get list => data.asTypedList(length);
-  @override
-  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;
-}
-
-// Dart_InitializeApiDL
-typedef NativeWasmerDartInitializeApiDLFn = Int64 Function(Pointer<Void>);
-typedef WasmerDartInitializeApiDLFn = int Function(Pointer<Void>);
-
-// set_finalizer_for_engine
-typedef NativeWasmerSetFinalizerForEngineFn = Void Function(
-    Handle, Pointer<WasmerEngine>);
-typedef WasmerSetFinalizerForEngineFn = void Function(
-    Object, Pointer<WasmerEngine>);
-
-// set_finalizer_for_func
-typedef NativeWasmerSetFinalizerForFuncFn = Void Function(
-    Handle, Pointer<WasmerFunc>);
-typedef WasmerSetFinalizerForFuncFn = void Function(
-    Object, Pointer<WasmerFunc>);
-
-// set_finalizer_for_instance
-typedef NativeWasmerSetFinalizerForInstanceFn = Void Function(
-    Handle, Pointer<WasmerInstance>);
-typedef WasmerSetFinalizerForInstanceFn = void Function(
-    Object, Pointer<WasmerInstance>);
-
-// set_finalizer_for_memory
-typedef NativeWasmerSetFinalizerForMemoryFn = Void Function(
-    Handle, Pointer<WasmerMemory>);
-typedef WasmerSetFinalizerForMemoryFn = void Function(
-    Object, Pointer<WasmerMemory>);
-
-// set_finalizer_for_memorytype
-typedef NativeWasmerSetFinalizerForMemorytypeFn = Void Function(
-    Handle, Pointer<WasmerMemorytype>);
-typedef WasmerSetFinalizerForMemorytypeFn = void Function(
-    Object, Pointer<WasmerMemorytype>);
-
-// set_finalizer_for_module
-typedef NativeWasmerSetFinalizerForModuleFn = Void Function(
-    Handle, Pointer<WasmerModule>);
-typedef WasmerSetFinalizerForModuleFn = void Function(
-    Object, Pointer<WasmerModule>);
-
-// set_finalizer_for_store
-typedef NativeWasmerSetFinalizerForStoreFn = Void Function(
-    Handle, Pointer<WasmerStore>);
-typedef WasmerSetFinalizerForStoreFn = void Function(
-    Object, Pointer<WasmerStore>);
-
-// set_finalizer_for_trap
-typedef NativeWasmerSetFinalizerForTrapFn = Void Function(
-    Handle, Pointer<WasmerTrap>);
-typedef WasmerSetFinalizerForTrapFn = void Function(
-    Object, Pointer<WasmerTrap>);
-
-// wasi_config_inherit_stderr
-typedef NativeWasmerWasiConfigInheritStderrFn = Void Function(
-    Pointer<WasmerWasiConfig>);
-typedef WasmerWasiConfigInheritStderrFn = void Function(
-    Pointer<WasmerWasiConfig>);
-
-// wasi_config_inherit_stdout
-typedef NativeWasmerWasiConfigInheritStdoutFn = Void Function(
-    Pointer<WasmerWasiConfig>);
-typedef WasmerWasiConfigInheritStdoutFn = void Function(
-    Pointer<WasmerWasiConfig>);
-
-// wasi_config_new
-typedef NativeWasmerWasiConfigNewFn = Pointer<WasmerWasiConfig> Function(
-    Pointer<Uint8>);
-typedef WasmerWasiConfigNewFn = Pointer<WasmerWasiConfig> Function(
-    Pointer<Uint8>);
-
-// wasi_env_delete
-typedef NativeWasmerWasiEnvDeleteFn = Void Function(Pointer<WasmerWasiEnv>);
-typedef WasmerWasiEnvDeleteFn = void Function(Pointer<WasmerWasiEnv>);
-
-// wasi_env_new
-typedef NativeWasmerWasiEnvNewFn = Pointer<WasmerWasiEnv> Function(
-    Pointer<WasmerWasiConfig>);
-typedef WasmerWasiEnvNewFn = Pointer<WasmerWasiEnv> Function(
-    Pointer<WasmerWasiConfig>);
-
-// wasi_env_read_stderr
-typedef NativeWasmerWasiEnvReadStderrFn = Int64 Function(
-    Pointer<WasmerWasiEnv>, Pointer<Uint8>, Uint64);
-typedef WasmerWasiEnvReadStderrFn = int Function(
-    Pointer<WasmerWasiEnv>, Pointer<Uint8>, int);
-
-// wasi_env_read_stdout
-typedef NativeWasmerWasiEnvReadStdoutFn = Int64 Function(
-    Pointer<WasmerWasiEnv>, Pointer<Uint8>, Uint64);
-typedef WasmerWasiEnvReadStdoutFn = int Function(
-    Pointer<WasmerWasiEnv>, Pointer<Uint8>, int);
-
-// wasi_env_set_memory
-typedef NativeWasmerWasiEnvSetMemoryFn = Void Function(
-    Pointer<WasmerWasiEnv>, Pointer<WasmerMemory>);
-typedef WasmerWasiEnvSetMemoryFn = void Function(
-    Pointer<WasmerWasiEnv>, Pointer<WasmerMemory>);
-
-// wasi_get_imports
-typedef NativeWasmerWasiGetImportsFn = Uint8 Function(Pointer<WasmerStore>,
-    Pointer<WasmerModule>, Pointer<WasmerWasiEnv>, Pointer<WasmerExternVec>);
-typedef WasmerWasiGetImportsFn = int Function(Pointer<WasmerStore>,
-    Pointer<WasmerModule>, Pointer<WasmerWasiEnv>, Pointer<WasmerExternVec>);
-
-// 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_as_extern
-typedef NativeWasmerFuncAsExternFn = Pointer<WasmerExtern> Function(
-    Pointer<WasmerFunc>);
-typedef WasmerFuncAsExternFn = Pointer<WasmerExtern> Function(
-    Pointer<WasmerFunc>);
-
-// wasm_func_call
-typedef NativeWasmerFuncCallFn = Pointer<WasmerTrap> Function(
-    Pointer<WasmerFunc>, Pointer<WasmerValVec>, Pointer<WasmerValVec>);
-typedef WasmerFuncCallFn = Pointer<WasmerTrap> Function(
-    Pointer<WasmerFunc>, Pointer<WasmerValVec>, Pointer<WasmerValVec>);
-
-// wasm_func_delete
-typedef NativeWasmerFuncDeleteFn = Void Function(Pointer<WasmerFunc>);
-typedef WasmerFuncDeleteFn = void Function(Pointer<WasmerFunc>);
-
-// wasm_func_new_with_env
-typedef NativeWasmerFuncNewWithEnvFn = Pointer<WasmerFunc> Function(
-    Pointer<WasmerStore>,
-    Pointer<WasmerFunctype>,
-    Pointer<Void>,
-    Pointer<Void>,
-    Pointer<Void>);
-typedef WasmerFuncNewWithEnvFn = Pointer<WasmerFunc> Function(
-    Pointer<WasmerStore>,
-    Pointer<WasmerFunctype>,
-    Pointer<Void>,
-    Pointer<Void>,
-    Pointer<Void>);
-
-// 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<WasmerExternVec>);
-typedef WasmerInstanceExportsFn = void Function(
-    Pointer<WasmerInstance>, Pointer<WasmerExternVec>);
-
-// wasm_instance_new
-typedef NativeWasmerInstanceNewFn = Pointer<WasmerInstance> Function(
-    Pointer<WasmerStore>,
-    Pointer<WasmerModule>,
-    Pointer<WasmerExternVec>,
-    Pointer<Pointer<WasmerTrap>>);
-typedef WasmerInstanceNewFn = Pointer<WasmerInstance> Function(
-    Pointer<WasmerStore>,
-    Pointer<WasmerModule>,
-    Pointer<WasmerExternVec>,
-    Pointer<Pointer<WasmerTrap>>);
-
-// wasm_memory_as_extern
-typedef NativeWasmerMemoryAsExternFn = Pointer<WasmerExtern> Function(
-    Pointer<WasmerMemory>);
-typedef WasmerMemoryAsExternFn = Pointer<WasmerExtern> Function(
-    Pointer<WasmerMemory>);
-
-// wasm_memory_data
-typedef NativeWasmerMemoryDataFn = Pointer<Uint8> Function(
-    Pointer<WasmerMemory>);
-typedef WasmerMemoryDataFn = Pointer<Uint8> 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_trap_message
-typedef NativeWasmerTrapMessageFn = Void Function(
-    Pointer<WasmerTrap>, Pointer<WasmerByteVec>);
-typedef WasmerTrapMessageFn = void Function(
-    Pointer<WasmerTrap>, Pointer<WasmerByteVec>);
-
-// wasm_trap_new
-typedef NativeWasmerTrapNewFn = Pointer<WasmerTrap> Function(
-    Pointer<WasmerStore>, Pointer<WasmerByteVec>);
-typedef WasmerTrapNewFn = Pointer<WasmerTrap> Function(
-    Pointer<WasmerStore>, Pointer<WasmerByteVec>);
-
-// 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);
-
-// wasmer_last_error_length
-typedef NativeWasmerWasmerLastErrorLengthFn = Int64 Function();
-typedef WasmerWasmerLastErrorLengthFn = int Function();
-
-// wasmer_last_error_message
-typedef NativeWasmerWasmerLastErrorMessageFn = Int64 Function(
-    Pointer<Uint8>, Int64);
-typedef WasmerWasmerLastErrorMessageFn = int Function(Pointer<Uint8>, int);
diff --git a/pkg/wasm/lib/wasm.dart b/pkg/wasm/lib/wasm.dart
deleted file mode 100644
index 877ff90..0000000
--- a/pkg/wasm/lib/wasm.dart
+++ /dev/null
@@ -1,6 +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.
-
-export 'src/function.dart';
-export 'src/module.dart';
diff --git a/pkg/wasm/pubspec.yaml b/pkg/wasm/pubspec.yaml
deleted file mode 100644
index a91c321..0000000
--- a/pkg/wasm/pubspec.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: wasm
-version: 0.1.0
-description: Utilities for loading and running WASM modules from Dart code
-homepage: https://github.com/dart-lang/sdk/tree/master/pkg/wasm
-
-environment:
-  sdk: '>=2.12.0 <3.0.0'
-
-dependencies:
-  ffi: ^1.0.0
-
-dev_dependencies:
-  lints: ^1.0.0
-  test: ^1.16.0
diff --git a/pkg/wasm/test/basic_test.dart b/pkg/wasm/test/basic_test.dart
deleted file mode 100644
index d222bbe..0000000
--- a/pkg/wasm/test/basic_test.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2021, 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 that we can load a wasm module, find a function, and call it.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('basics', () {
-    // int64_t square(int64_t n) { return n * n; }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, //
-      0x01, 0x7e, 0x01, 0x7e, 0x03, 0x02, 0x01, 0x00, 0x04, 0x05, 0x01, 0x70,
-      0x01, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00, 0x02, 0x06, 0x08, 0x01, 0x7f,
-      0x01, 0x41, 0x80, 0x88, 0x04, 0x0b, 0x07, 0x13, 0x02, 0x06, 0x6d, 0x65,
-      0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x06, 0x73, 0x71, 0x75, 0x61, 0x72,
-      0x65, 0x00, 0x00, 0x0a, 0x09, 0x01, 0x07, 0x00, 0x20, 0x00, 0x20, 0x00,
-      0x7e, 0x0b,
-    ]);
-
-    var inst = WasmModule(data).instantiate().build();
-    var fn = inst.lookupFunction('square');
-    var n = fn(1234) as int;
-
-    expect(n, 1234 * 1234);
-
-    expect(inst.lookupFunction('not_a_function'), isNull);
-  });
-}
diff --git a/pkg/wasm/test/corrupted_error_test.dart b/pkg/wasm/test/corrupted_error_test.dart
deleted file mode 100644
index f051dd4..0000000
--- a/pkg/wasm/test/corrupted_error_test.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2021, 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 error thrown when the wasm module is corrupted.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('corrupted module', () {
-    var data = Uint8List.fromList([
-      0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, 0x7e, 0x01, 0x7e, //
-      0x07, 0x13, 0x02, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00,
-      0x06, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00,
-      0x7e, 0x0b,
-    ]);
-
-    expect(() => WasmModule(data), throwsA(isException));
-  });
-}
diff --git a/pkg/wasm/test/fn_call_error_test.dart b/pkg/wasm/test/fn_call_error_test.dart
deleted file mode 100644
index 6415ba3..0000000
--- a/pkg/wasm/test/fn_call_error_test.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2021, 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:typed_data';
-
-// Test error thrown when a function is called with the wrong args.
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('function with wrong arguments', () {
-    // int64_t square(int64_t n) { return n * n; }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, //
-      0x01, 0x7e, 0x01, 0x7e, 0x03, 0x02, 0x01, 0x00, 0x04, 0x05, 0x01, 0x70,
-      0x01, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00, 0x02, 0x06, 0x08, 0x01, 0x7f,
-      0x01, 0x41, 0x80, 0x88, 0x04, 0x0b, 0x07, 0x13, 0x02, 0x06, 0x6d, 0x65,
-      0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x06, 0x73, 0x71, 0x75, 0x61, 0x72,
-      0x65, 0x00, 0x00, 0x0a, 0x09, 0x01, 0x07, 0x00, 0x20, 0x00, 0x20, 0x00,
-      0x7e, 0x0b,
-    ]);
-
-    var inst = WasmModule(data).instantiate().build();
-    var fn = inst.lookupFunction('square');
-
-    expect(() => fn(), throwsA(isArgumentError));
-    expect(() => fn(1, 2, 3), throwsA(isArgumentError));
-    expect(() => fn(1.23), throwsA(isArgumentError));
-  });
-}
diff --git a/pkg/wasm/test/fn_import_error_test.dart b/pkg/wasm/test/fn_import_error_test.dart
deleted file mode 100644
index 75c69f3..0000000
--- a/pkg/wasm/test/fn_import_error_test.dart
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2021, 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:typed_data';
-
-// Test errors thrown by function imports.
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-import 'test_shared.dart';
-
-void main() {
-  test('bad function imports', () {
-    // This module expects a function import like:
-    // int64_t someFn(int32_t a, int64_t b, float c, double d);
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0c, 0x02, 0x60, //
-      0x04, 0x7f, 0x7e, 0x7d, 0x7c, 0x01, 0x7e, 0x60, 0x00, 0x00, 0x02, 0x0e,
-      0x01, 0x03, 0x65, 0x6e, 0x76, 0x06, 0x73, 0x6f, 0x6d, 0x65, 0x46, 0x6e,
-      0x00, 0x00, 0x03, 0x02, 0x01, 0x01, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01,
-      0x01, 0x05, 0x03, 0x01, 0x00, 0x02, 0x06, 0x08, 0x01, 0x7f, 0x01, 0x41,
-      0x80, 0x88, 0x04, 0x0b, 0x07, 0x11, 0x02, 0x06, 0x6d, 0x65, 0x6d, 0x6f,
-      0x72, 0x79, 0x02, 0x00, 0x04, 0x62, 0x6c, 0x61, 0x68, 0x00, 0x01, 0x0a,
-      0x1d, 0x01, 0x1b, 0x00, 0x41, 0x01, 0x42, 0x02, 0x43, 0x00, 0x00, 0x40,
-      0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x10, 0x80,
-      0x80, 0x80, 0x80, 0x00, 0x1a, 0x0b,
-    ]);
-
-    var mod = WasmModule(data);
-
-    // Valid instantiation.
-    mod
-        .instantiate()
-        .addFunction('env', 'someFn', (int a, int b, num c, double d) => 123)
-        .build();
-
-    // Missing imports.
-    expect(
-      () => mod.instantiate().build(),
-      throwsExceptionWithToString(contains('Missing import')),
-    );
-
-    // Wrong kind of import.
-    expect(
-      () => mod.instantiate().addMemory('env', 'someFn', mod.createMemory(10)),
-      throwsExceptionWithToString(
-        contains('Import is not a memory'),
-      ),
-    );
-
-    // Wrong namespace.
-    expect(
-      () => mod
-          .instantiate()
-          .addFunction(
-            'foo',
-            'someFn',
-            (int a, int b, num c, double d) => 123,
-          )
-          .build(),
-      throwsExceptionWithToString(contains('Import not found')),
-    );
-
-    // Wrong name.
-    expect(
-      () => mod
-          .instantiate()
-          .addFunction(
-            'env',
-            'otherFn',
-            (int a, int b, num c, double d) => 123,
-          )
-          .build(),
-      throwsExceptionWithToString(contains('Import not found')),
-    );
-
-    // Already filled.
-    expect(
-      () => mod
-          .instantiate()
-          .addFunction(
-            'env',
-            'someFn',
-            (int a, int b, num c, double d) => 123,
-          )
-          .addFunction(
-            'env',
-            'someFn',
-            (int a, int b, num c, double d) => 456,
-          )
-          .build(),
-      throwsExceptionWithToString(contains('Import already filled')),
-    );
-  });
-}
diff --git a/pkg/wasm/test/fn_import_exception_test.dart b/pkg/wasm/test/fn_import_exception_test.dart
deleted file mode 100644
index 48d84f2..0000000
--- a/pkg/wasm/test/fn_import_exception_test.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2021, 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 throwing exceptions from an imported function.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('exception thrown from imported function', () {
-    // void fn() {
-    //   a();
-    //   b();
-    // }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60, //
-      0x00, 0x00, 0x02, 0x11, 0x02, 0x03, 0x65, 0x6e, 0x76, 0x01, 0x61, 0x00,
-      0x00, 0x03, 0x65, 0x6e, 0x76, 0x01, 0x62, 0x00, 0x00, 0x03, 0x02, 0x01,
-      0x00, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00,
-      0x02, 0x06, 0x08, 0x01, 0x7f, 0x01, 0x41, 0x80, 0x88, 0x04, 0x0b, 0x07,
-      0x0f, 0x02, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x02,
-      0x66, 0x6e, 0x00, 0x02, 0x0a, 0x10, 0x01, 0x0e, 0x00, 0x10, 0x80, 0x80,
-      0x80, 0x80, 0x00, 0x10, 0x81, 0x80, 0x80, 0x80, 0x00, 0x0b,
-    ]);
-
-    var calledB = false;
-    var thrownException = Exception('Hello exception!');
-    var inst = WasmModule(data).instantiate().addFunction('env', 'a', () {
-      throw thrownException;
-    }).addFunction('env', 'b', () {
-      calledB = true;
-    }).build();
-    var fn = inst.lookupFunction('fn');
-    expect(() => fn(), throwsA(thrownException));
-    expect(calledB, isFalse);
-
-    var calledA = false;
-    inst = WasmModule(data).instantiate().addFunction('env', 'a', () {
-      calledA = true;
-    }).addFunction('env', 'b', () {
-      calledB = true;
-    }).build();
-    fn = inst.lookupFunction('fn');
-    fn();
-    expect(calledA, isTrue);
-    expect(calledB, isTrue);
-  });
-}
diff --git a/pkg/wasm/test/fn_import_test.dart b/pkg/wasm/test/fn_import_test.dart
deleted file mode 100644
index 7131468..0000000
--- a/pkg/wasm/test/fn_import_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2021, 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 that we can load a wasm module, find a function, and call it.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('function import', () {
-    // void reportStuff() { report(123, 456); }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x09, 0x02, 0x60, //
-      0x02, 0x7e, 0x7e, 0x00, 0x60, 0x00, 0x00, 0x02, 0x0e, 0x01, 0x03, 0x65,
-      0x6e, 0x76, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x00, 0x00, 0x03,
-      0x02, 0x01, 0x01, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01, 0x01, 0x05, 0x03,
-      0x01, 0x00, 0x02, 0x06, 0x08, 0x01, 0x7f, 0x01, 0x41, 0x80, 0x88, 0x04,
-      0x0b, 0x07, 0x18, 0x02, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02,
-      0x00, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x75, 0x66,
-      0x66, 0x00, 0x01, 0x0a, 0x10, 0x01, 0x0e, 0x00, 0x42, 0xfb, 0x00, 0x42,
-      0xc8, 0x03, 0x10, 0x80, 0x80, 0x80, 0x80, 0x00, 0x0b,
-    ]);
-
-    var reportX = -1;
-    var reportY = -1;
-
-    var inst = WasmModule(data).instantiate().addFunction('env', 'report',
-        (int x, int y) {
-      reportX = x;
-      reportY = y;
-    }).build();
-    var fn = inst.lookupFunction('reportStuff');
-    fn();
-    expect(123, reportX);
-    expect(456, reportY);
-  });
-}
diff --git a/pkg/wasm/test/hello_wasi_test.dart b/pkg/wasm/test/hello_wasi_test.dart
deleted file mode 100644
index 8317abb..0000000
--- a/pkg/wasm/test/hello_wasi_test.dart
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (c) 2021, 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.
-
-// Variant of hello_world_test that uses the default WASI imports.
-import 'dart:convert';
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('hello wasi', () async {
-    // Hello world module generated by emscripten+WASI. Exports a function like
-    // `void _start()`, and prints using `int fd_write(int, int, int, int)`.
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x33, 0x09, 0x60, //
-      0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x60, 0x04, 0x7f, 0x7f, 0x7f, 0x7f,
-      0x01, 0x7f, 0x60, 0x00, 0x00, 0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x60,
-      0x01, 0x7f, 0x01, 0x7f, 0x60, 0x03, 0x7f, 0x7e, 0x7f, 0x01, 0x7e, 0x60,
-      0x00, 0x01, 0x7f, 0x60, 0x01, 0x7f, 0x00, 0x60, 0x03, 0x7f, 0x7f, 0x7f,
-      0x00, 0x02, 0x1a, 0x01, 0x0d, 0x77, 0x61, 0x73, 0x69, 0x5f, 0x75, 0x6e,
-      0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x08, 0x66, 0x64, 0x5f, 0x77, 0x72,
-      0x69, 0x74, 0x65, 0x00, 0x01, 0x03, 0x0f, 0x0e, 0x03, 0x04, 0x00, 0x03,
-      0x02, 0x07, 0x05, 0x04, 0x03, 0x06, 0x02, 0x02, 0x08, 0x00, 0x04, 0x05,
-      0x01, 0x70, 0x01, 0x04, 0x04, 0x05, 0x06, 0x01, 0x01, 0x80, 0x02, 0x80,
-      0x02, 0x06, 0x09, 0x01, 0x7f, 0x01, 0x41, 0xc0, 0x95, 0xc0, 0x02, 0x0b,
-      0x07, 0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00,
-      0x11, 0x5f, 0x5f, 0x77, 0x61, 0x73, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
-      0x5f, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x00, 0x05, 0x04, 0x6d, 0x61, 0x69,
-      0x6e, 0x00, 0x04, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x0b,
-      0x09, 0x09, 0x01, 0x00, 0x41, 0x01, 0x0b, 0x03, 0x08, 0x0e, 0x07, 0x0a,
-      0xae, 0x0c, 0x0e, 0xbf, 0x01, 0x01, 0x05, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x04, 0x02, 0x40, 0x20, 0x01, 0x28, 0x02, 0x10, 0x22, 0x02, 0x04, 0x7f,
-      0x20, 0x02, 0x05, 0x20, 0x01, 0x10, 0x02, 0x0d, 0x01, 0x20, 0x01, 0x28,
-      0x02, 0x10, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x14, 0x22, 0x05, 0x6b, 0x20,
-      0x00, 0x49, 0x04, 0x40, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20, 0x00, 0x20,
-      0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x0f, 0x0b, 0x02, 0x40, 0x20,
-      0x01, 0x2c, 0x00, 0x4b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x20, 0x00, 0x21,
-      0x03, 0x03, 0x40, 0x20, 0x03, 0x22, 0x02, 0x45, 0x0d, 0x01, 0x20, 0x02,
-      0x41, 0x7f, 0x6a, 0x22, 0x03, 0x41, 0x80, 0x08, 0x6a, 0x2d, 0x00, 0x00,
-      0x41, 0x0a, 0x47, 0x0d, 0x00, 0x0b, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20,
-      0x02, 0x20, 0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x22, 0x03, 0x20,
-      0x02, 0x49, 0x0d, 0x01, 0x20, 0x00, 0x20, 0x02, 0x6b, 0x21, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0x08, 0x6a, 0x21, 0x04, 0x20, 0x01, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x02, 0x21, 0x06, 0x0b, 0x20, 0x05, 0x20, 0x04, 0x20,
-      0x00, 0x10, 0x03, 0x1a, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x14, 0x20,
-      0x00, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x06, 0x6a, 0x21, 0x03,
-      0x0b, 0x20, 0x03, 0x0b, 0x59, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x20, 0x00,
-      0x2d, 0x00, 0x4a, 0x22, 0x01, 0x41, 0x7f, 0x6a, 0x20, 0x01, 0x72, 0x3a,
-      0x00, 0x4a, 0x20, 0x00, 0x28, 0x02, 0x00, 0x22, 0x01, 0x41, 0x08, 0x71,
-      0x04, 0x40, 0x20, 0x00, 0x20, 0x01, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x7f, 0x0f, 0x0b, 0x20, 0x00, 0x42, 0x00, 0x37, 0x02, 0x04, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02, 0x1c, 0x20,
-      0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01, 0x20, 0x00,
-      0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x41, 0x00, 0x0b, 0x82, 0x04,
-      0x01, 0x03, 0x7f, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x4f, 0x04, 0x40,
-      0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x10, 0x0d, 0x20, 0x00, 0x0f, 0x0b,
-      0x20, 0x00, 0x20, 0x02, 0x6a, 0x21, 0x03, 0x02, 0x40, 0x20, 0x00, 0x20,
-      0x01, 0x73, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x02, 0x40, 0x20, 0x02,
-      0x41, 0x01, 0x48, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b,
-      0x20, 0x00, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02, 0x03, 0x40, 0x20, 0x02, 0x20,
-      0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a,
-      0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02, 0x20, 0x03, 0x4f,
-      0x0d, 0x01, 0x20, 0x02, 0x41, 0x03, 0x71, 0x0d, 0x00, 0x0b, 0x0b, 0x02,
-      0x40, 0x20, 0x03, 0x41, 0x7c, 0x71, 0x22, 0x04, 0x41, 0xc0, 0x00, 0x49,
-      0x0d, 0x00, 0x20, 0x02, 0x20, 0x04, 0x41, 0x40, 0x6a, 0x22, 0x05, 0x4b,
-      0x0d, 0x00, 0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36,
-      0x02, 0x00, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x04, 0x36, 0x02, 0x04,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x08, 0x36, 0x02, 0x08, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x0c, 0x36, 0x02, 0x0c, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x10, 0x36, 0x02, 0x10, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x14, 0x36, 0x02, 0x14, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x18, 0x36,
-      0x02, 0x18, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x1c, 0x36, 0x02, 0x1c,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x20, 0x36, 0x02, 0x20, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x24, 0x36, 0x02, 0x24, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x28, 0x36, 0x02, 0x28, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x2c, 0x36, 0x02, 0x2c, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x30, 0x36,
-      0x02, 0x30, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x34, 0x36, 0x02, 0x34,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x38, 0x36, 0x02, 0x38, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x3c, 0x36, 0x02, 0x3c, 0x20, 0x01, 0x41, 0x40,
-      0x6b, 0x21, 0x01, 0x20, 0x02, 0x41, 0x40, 0x6b, 0x22, 0x02, 0x20, 0x05,
-      0x4d, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x04, 0x4f, 0x0d, 0x01,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36, 0x02, 0x00,
-      0x20, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x04, 0x6a,
-      0x22, 0x02, 0x20, 0x04, 0x49, 0x0d, 0x00, 0x0b, 0x0c, 0x01, 0x0b, 0x20,
-      0x03, 0x41, 0x04, 0x49, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01,
-      0x0b, 0x20, 0x03, 0x41, 0x7c, 0x6a, 0x22, 0x04, 0x20, 0x00, 0x49, 0x04,
-      0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x3a, 0x00, 0x01, 0x20, 0x02,
-      0x20, 0x01, 0x2d, 0x00, 0x02, 0x3a, 0x00, 0x02, 0x20, 0x02, 0x20, 0x01,
-      0x2d, 0x00, 0x03, 0x3a, 0x00, 0x03, 0x20, 0x01, 0x41, 0x04, 0x6a, 0x21,
-      0x01, 0x20, 0x02, 0x41, 0x04, 0x6a, 0x22, 0x02, 0x20, 0x04, 0x4d, 0x0d,
-      0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x03, 0x49, 0x04, 0x40, 0x03, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01,
-      0x41, 0x01, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02,
-      0x20, 0x03, 0x47, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x00, 0x0b, 0x06, 0x00,
-      0x10, 0x0c, 0x41, 0x00, 0x0b, 0x03, 0x00, 0x01, 0x0b, 0x7e, 0x01, 0x03,
-      0x7f, 0x23, 0x00, 0x41, 0x10, 0x6b, 0x22, 0x01, 0x24, 0x00, 0x20, 0x01,
-      0x41, 0x0a, 0x3a, 0x00, 0x0f, 0x02, 0x40, 0x20, 0x00, 0x28, 0x02, 0x10,
-      0x22, 0x02, 0x45, 0x04, 0x40, 0x20, 0x00, 0x10, 0x02, 0x0d, 0x01, 0x20,
-      0x00, 0x28, 0x02, 0x10, 0x21, 0x02, 0x0b, 0x02, 0x40, 0x20, 0x00, 0x28,
-      0x02, 0x14, 0x22, 0x03, 0x20, 0x02, 0x4f, 0x0d, 0x00, 0x20, 0x00, 0x2c,
-      0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00, 0x20, 0x03, 0x41,
-      0x01, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x03, 0x41, 0x0a, 0x3a, 0x00, 0x00,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x20, 0x01, 0x41, 0x0f, 0x6a, 0x41, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x41, 0x01, 0x47, 0x0d,
-      0x00, 0x20, 0x01, 0x2d, 0x00, 0x0f, 0x1a, 0x0b, 0x20, 0x01, 0x41, 0x10,
-      0x6a, 0x24, 0x00, 0x0b, 0x04, 0x00, 0x42, 0x00, 0x0b, 0x04, 0x00, 0x41,
-      0x00, 0x0b, 0x31, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x21, 0x02, 0x20, 0x02,
-      0x02, 0x7f, 0x20, 0x01, 0x28, 0x02, 0x4c, 0x41, 0x7f, 0x4c, 0x04, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x10, 0x01, 0x0c, 0x01, 0x0b, 0x20, 0x02, 0x20,
-      0x01, 0x10, 0x01, 0x0b, 0x22, 0x01, 0x46, 0x04, 0x40, 0x20, 0x00, 0x0f,
-      0x0b, 0x20, 0x01, 0x0b, 0x62, 0x01, 0x03, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x00, 0x03, 0x40, 0x20, 0x00, 0x22, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x00,
-      0x20, 0x01, 0x28, 0x02, 0x00, 0x22, 0x02, 0x41, 0x7f, 0x73, 0x20, 0x02,
-      0x41, 0xff, 0xfd, 0xfb, 0x77, 0x6a, 0x71, 0x41, 0x80, 0x81, 0x82, 0x84,
-      0x78, 0x71, 0x45, 0x0d, 0x00, 0x0b, 0x02, 0x40, 0x20, 0x02, 0x41, 0xff,
-      0x01, 0x71, 0x45, 0x04, 0x40, 0x20, 0x01, 0x21, 0x00, 0x0c, 0x01, 0x0b,
-      0x03, 0x40, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x21, 0x02, 0x20, 0x01, 0x41,
-      0x01, 0x6a, 0x22, 0x00, 0x21, 0x01, 0x20, 0x02, 0x0d, 0x00, 0x0b, 0x0b,
-      0x20, 0x00, 0x41, 0x80, 0x08, 0x6b, 0x0b, 0x0c, 0x00, 0x02, 0x7f, 0x41,
-      0x00, 0x41, 0x00, 0x10, 0x04, 0x0b, 0x1a, 0x0b, 0x66, 0x01, 0x02, 0x7f,
-      0x41, 0x90, 0x08, 0x28, 0x02, 0x00, 0x22, 0x00, 0x28, 0x02, 0x4c, 0x41,
-      0x00, 0x4e, 0x04, 0x7f, 0x41, 0x01, 0x05, 0x20, 0x01, 0x0b, 0x1a, 0x02,
-      0x40, 0x41, 0x7f, 0x41, 0x00, 0x10, 0x0a, 0x22, 0x01, 0x20, 0x01, 0x20,
-      0x00, 0x10, 0x09, 0x47, 0x1b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x02, 0x40,
-      0x20, 0x00, 0x2d, 0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00,
-      0x28, 0x02, 0x14, 0x22, 0x01, 0x20, 0x00, 0x28, 0x02, 0x10, 0x4f, 0x0d,
-      0x00, 0x20, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a, 0x36, 0x02, 0x14, 0x20,
-      0x01, 0x41, 0x0a, 0x3a, 0x00, 0x00, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x10,
-      0x06, 0x0b, 0x0b, 0x3d, 0x01, 0x01, 0x7f, 0x20, 0x02, 0x04, 0x40, 0x03,
-      0x40, 0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0xc0, 0x00, 0x49, 0x1b, 0x22, 0x03, 0x10, 0x03, 0x21,
-      0x00, 0x20, 0x01, 0x41, 0x80, 0x40, 0x6b, 0x21, 0x01, 0x20, 0x00, 0x41,
-      0x80, 0x40, 0x6b, 0x21, 0x00, 0x20, 0x02, 0x20, 0x03, 0x6b, 0x22, 0x02,
-      0x0d, 0x00, 0x0b, 0x0b, 0x0b, 0xb1, 0x02, 0x01, 0x06, 0x7f, 0x23, 0x00,
-      0x41, 0x20, 0x6b, 0x22, 0x03, 0x24, 0x00, 0x20, 0x03, 0x20, 0x00, 0x28,
-      0x02, 0x1c, 0x22, 0x04, 0x36, 0x02, 0x10, 0x20, 0x00, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x03, 0x20, 0x02, 0x36, 0x02, 0x1c, 0x20, 0x03, 0x20,
-      0x01, 0x36, 0x02, 0x18, 0x20, 0x03, 0x20, 0x05, 0x20, 0x04, 0x6b, 0x22,
-      0x01, 0x36, 0x02, 0x14, 0x20, 0x01, 0x20, 0x02, 0x6a, 0x21, 0x06, 0x41,
-      0x02, 0x21, 0x05, 0x20, 0x03, 0x41, 0x10, 0x6a, 0x21, 0x01, 0x03, 0x40,
-      0x02, 0x40, 0x02, 0x7f, 0x20, 0x06, 0x02, 0x7f, 0x20, 0x00, 0x28, 0x02,
-      0x3c, 0x20, 0x01, 0x20, 0x05, 0x20, 0x03, 0x41, 0x0c, 0x6a, 0x10, 0x00,
-      0x04, 0x40, 0x20, 0x03, 0x41, 0x7f, 0x36, 0x02, 0x0c, 0x41, 0x7f, 0x0c,
-      0x01, 0x0b, 0x20, 0x03, 0x28, 0x02, 0x0c, 0x0b, 0x22, 0x04, 0x46, 0x04,
-      0x40, 0x20, 0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02,
-      0x1c, 0x20, 0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x20, 0x02, 0x0c,
-      0x01, 0x0b, 0x20, 0x04, 0x41, 0x7f, 0x4a, 0x0d, 0x01, 0x20, 0x00, 0x41,
-      0x00, 0x36, 0x02, 0x1c, 0x20, 0x00, 0x42, 0x00, 0x37, 0x03, 0x10, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x00, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x00, 0x20, 0x05, 0x41, 0x02, 0x46, 0x0d, 0x00, 0x1a, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x04, 0x6b, 0x0b, 0x21, 0x04, 0x20, 0x03, 0x41,
-      0x20, 0x6a, 0x24, 0x00, 0x20, 0x04, 0x0f, 0x0b, 0x20, 0x01, 0x41, 0x08,
-      0x6a, 0x20, 0x01, 0x20, 0x04, 0x20, 0x01, 0x28, 0x02, 0x04, 0x22, 0x07,
-      0x4b, 0x22, 0x08, 0x1b, 0x22, 0x01, 0x20, 0x04, 0x20, 0x07, 0x41, 0x00,
-      0x20, 0x08, 0x1b, 0x6b, 0x22, 0x07, 0x20, 0x01, 0x28, 0x02, 0x00, 0x6a,
-      0x36, 0x02, 0x00, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x04, 0x20, 0x07,
-      0x6b, 0x36, 0x02, 0x04, 0x20, 0x06, 0x20, 0x04, 0x6b, 0x21, 0x06, 0x20,
-      0x05, 0x20, 0x08, 0x6b, 0x21, 0x05, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x0b,
-      0x0b, 0x4d, 0x06, 0x00, 0x41, 0x80, 0x08, 0x0b, 0x12, 0x68, 0x65, 0x6c,
-      0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, 0x00, 0x00,
-      0x00, 0x18, 0x04, 0x00, 0x41, 0x98, 0x08, 0x0b, 0x01, 0x05, 0x00, 0x41,
-      0xa4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xbc, 0x08, 0x0b, 0x0e, 0x02,
-      0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xb8, 0x04, 0x00, 0x00, 0x00,
-      0x04, 0x00, 0x41, 0xd4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xe3, 0x08,
-      0x0b, 0x05, 0x0a, 0xff, 0xff, 0xff, 0xff,
-    ]);
-
-    var inst =
-        WasmModule(data).instantiate().enableWasi(captureStdout: true).build();
-
-    var fn = inst.lookupFunction('_start');
-    fn();
-    // TODO: failing on mac https://github.com/dart-lang/sdk/issues/46222
-    var out = utf8.decode(await inst.stdout.first);
-    expect(out, 'hello, world!\n');
-  });
-}
diff --git a/pkg/wasm/test/hello_world_test.dart b/pkg/wasm/test/hello_world_test.dart
deleted file mode 100644
index 2ea981f..0000000
--- a/pkg/wasm/test/hello_world_test.dart
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright (c) 2021, 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.
-
-// @dart = 2.12
-// Test for hello world built using emscripten with WASI.
-
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('hello world', () {
-    // Hello world module generated by emscripten+WASI. Exports a function like
-    // `void _start()`, and prints using `int fd_write(int, int, int, int)`.
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x33, 0x09, 0x60, //
-      0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x60, 0x04, 0x7f, 0x7f, 0x7f, 0x7f,
-      0x01, 0x7f, 0x60, 0x00, 0x00, 0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x60,
-      0x01, 0x7f, 0x01, 0x7f, 0x60, 0x03, 0x7f, 0x7e, 0x7f, 0x01, 0x7e, 0x60,
-      0x00, 0x01, 0x7f, 0x60, 0x01, 0x7f, 0x00, 0x60, 0x03, 0x7f, 0x7f, 0x7f,
-      0x00, 0x02, 0x1a, 0x01, 0x0d, 0x77, 0x61, 0x73, 0x69, 0x5f, 0x75, 0x6e,
-      0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x08, 0x66, 0x64, 0x5f, 0x77, 0x72,
-      0x69, 0x74, 0x65, 0x00, 0x01, 0x03, 0x0f, 0x0e, 0x03, 0x04, 0x00, 0x03,
-      0x02, 0x07, 0x05, 0x04, 0x03, 0x06, 0x02, 0x02, 0x08, 0x00, 0x04, 0x05,
-      0x01, 0x70, 0x01, 0x04, 0x04, 0x05, 0x06, 0x01, 0x01, 0x80, 0x02, 0x80,
-      0x02, 0x06, 0x09, 0x01, 0x7f, 0x01, 0x41, 0xc0, 0x95, 0xc0, 0x02, 0x0b,
-      0x07, 0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00,
-      0x11, 0x5f, 0x5f, 0x77, 0x61, 0x73, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
-      0x5f, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x00, 0x05, 0x04, 0x6d, 0x61, 0x69,
-      0x6e, 0x00, 0x04, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x0b,
-      0x09, 0x09, 0x01, 0x00, 0x41, 0x01, 0x0b, 0x03, 0x08, 0x0e, 0x07, 0x0a,
-      0xae, 0x0c, 0x0e, 0xbf, 0x01, 0x01, 0x05, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x04, 0x02, 0x40, 0x20, 0x01, 0x28, 0x02, 0x10, 0x22, 0x02, 0x04, 0x7f,
-      0x20, 0x02, 0x05, 0x20, 0x01, 0x10, 0x02, 0x0d, 0x01, 0x20, 0x01, 0x28,
-      0x02, 0x10, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x14, 0x22, 0x05, 0x6b, 0x20,
-      0x00, 0x49, 0x04, 0x40, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20, 0x00, 0x20,
-      0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x0f, 0x0b, 0x02, 0x40, 0x20,
-      0x01, 0x2c, 0x00, 0x4b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x20, 0x00, 0x21,
-      0x03, 0x03, 0x40, 0x20, 0x03, 0x22, 0x02, 0x45, 0x0d, 0x01, 0x20, 0x02,
-      0x41, 0x7f, 0x6a, 0x22, 0x03, 0x41, 0x80, 0x08, 0x6a, 0x2d, 0x00, 0x00,
-      0x41, 0x0a, 0x47, 0x0d, 0x00, 0x0b, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20,
-      0x02, 0x20, 0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x22, 0x03, 0x20,
-      0x02, 0x49, 0x0d, 0x01, 0x20, 0x00, 0x20, 0x02, 0x6b, 0x21, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0x08, 0x6a, 0x21, 0x04, 0x20, 0x01, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x02, 0x21, 0x06, 0x0b, 0x20, 0x05, 0x20, 0x04, 0x20,
-      0x00, 0x10, 0x03, 0x1a, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x14, 0x20,
-      0x00, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x06, 0x6a, 0x21, 0x03,
-      0x0b, 0x20, 0x03, 0x0b, 0x59, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x20, 0x00,
-      0x2d, 0x00, 0x4a, 0x22, 0x01, 0x41, 0x7f, 0x6a, 0x20, 0x01, 0x72, 0x3a,
-      0x00, 0x4a, 0x20, 0x00, 0x28, 0x02, 0x00, 0x22, 0x01, 0x41, 0x08, 0x71,
-      0x04, 0x40, 0x20, 0x00, 0x20, 0x01, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x7f, 0x0f, 0x0b, 0x20, 0x00, 0x42, 0x00, 0x37, 0x02, 0x04, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02, 0x1c, 0x20,
-      0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01, 0x20, 0x00,
-      0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x41, 0x00, 0x0b, 0x82, 0x04,
-      0x01, 0x03, 0x7f, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x4f, 0x04, 0x40,
-      0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x10, 0x0d, 0x20, 0x00, 0x0f, 0x0b,
-      0x20, 0x00, 0x20, 0x02, 0x6a, 0x21, 0x03, 0x02, 0x40, 0x20, 0x00, 0x20,
-      0x01, 0x73, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x02, 0x40, 0x20, 0x02,
-      0x41, 0x01, 0x48, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b,
-      0x20, 0x00, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02, 0x03, 0x40, 0x20, 0x02, 0x20,
-      0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a,
-      0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02, 0x20, 0x03, 0x4f,
-      0x0d, 0x01, 0x20, 0x02, 0x41, 0x03, 0x71, 0x0d, 0x00, 0x0b, 0x0b, 0x02,
-      0x40, 0x20, 0x03, 0x41, 0x7c, 0x71, 0x22, 0x04, 0x41, 0xc0, 0x00, 0x49,
-      0x0d, 0x00, 0x20, 0x02, 0x20, 0x04, 0x41, 0x40, 0x6a, 0x22, 0x05, 0x4b,
-      0x0d, 0x00, 0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36,
-      0x02, 0x00, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x04, 0x36, 0x02, 0x04,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x08, 0x36, 0x02, 0x08, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x0c, 0x36, 0x02, 0x0c, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x10, 0x36, 0x02, 0x10, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x14, 0x36, 0x02, 0x14, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x18, 0x36,
-      0x02, 0x18, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x1c, 0x36, 0x02, 0x1c,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x20, 0x36, 0x02, 0x20, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x24, 0x36, 0x02, 0x24, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x28, 0x36, 0x02, 0x28, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x2c, 0x36, 0x02, 0x2c, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x30, 0x36,
-      0x02, 0x30, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x34, 0x36, 0x02, 0x34,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x38, 0x36, 0x02, 0x38, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x3c, 0x36, 0x02, 0x3c, 0x20, 0x01, 0x41, 0x40,
-      0x6b, 0x21, 0x01, 0x20, 0x02, 0x41, 0x40, 0x6b, 0x22, 0x02, 0x20, 0x05,
-      0x4d, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x04, 0x4f, 0x0d, 0x01,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36, 0x02, 0x00,
-      0x20, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x04, 0x6a,
-      0x22, 0x02, 0x20, 0x04, 0x49, 0x0d, 0x00, 0x0b, 0x0c, 0x01, 0x0b, 0x20,
-      0x03, 0x41, 0x04, 0x49, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01,
-      0x0b, 0x20, 0x03, 0x41, 0x7c, 0x6a, 0x22, 0x04, 0x20, 0x00, 0x49, 0x04,
-      0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x3a, 0x00, 0x01, 0x20, 0x02,
-      0x20, 0x01, 0x2d, 0x00, 0x02, 0x3a, 0x00, 0x02, 0x20, 0x02, 0x20, 0x01,
-      0x2d, 0x00, 0x03, 0x3a, 0x00, 0x03, 0x20, 0x01, 0x41, 0x04, 0x6a, 0x21,
-      0x01, 0x20, 0x02, 0x41, 0x04, 0x6a, 0x22, 0x02, 0x20, 0x04, 0x4d, 0x0d,
-      0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x03, 0x49, 0x04, 0x40, 0x03, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01,
-      0x41, 0x01, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02,
-      0x20, 0x03, 0x47, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x00, 0x0b, 0x06, 0x00,
-      0x10, 0x0c, 0x41, 0x00, 0x0b, 0x03, 0x00, 0x01, 0x0b, 0x7e, 0x01, 0x03,
-      0x7f, 0x23, 0x00, 0x41, 0x10, 0x6b, 0x22, 0x01, 0x24, 0x00, 0x20, 0x01,
-      0x41, 0x0a, 0x3a, 0x00, 0x0f, 0x02, 0x40, 0x20, 0x00, 0x28, 0x02, 0x10,
-      0x22, 0x02, 0x45, 0x04, 0x40, 0x20, 0x00, 0x10, 0x02, 0x0d, 0x01, 0x20,
-      0x00, 0x28, 0x02, 0x10, 0x21, 0x02, 0x0b, 0x02, 0x40, 0x20, 0x00, 0x28,
-      0x02, 0x14, 0x22, 0x03, 0x20, 0x02, 0x4f, 0x0d, 0x00, 0x20, 0x00, 0x2c,
-      0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00, 0x20, 0x03, 0x41,
-      0x01, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x03, 0x41, 0x0a, 0x3a, 0x00, 0x00,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x20, 0x01, 0x41, 0x0f, 0x6a, 0x41, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x41, 0x01, 0x47, 0x0d,
-      0x00, 0x20, 0x01, 0x2d, 0x00, 0x0f, 0x1a, 0x0b, 0x20, 0x01, 0x41, 0x10,
-      0x6a, 0x24, 0x00, 0x0b, 0x04, 0x00, 0x42, 0x00, 0x0b, 0x04, 0x00, 0x41,
-      0x00, 0x0b, 0x31, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x21, 0x02, 0x20, 0x02,
-      0x02, 0x7f, 0x20, 0x01, 0x28, 0x02, 0x4c, 0x41, 0x7f, 0x4c, 0x04, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x10, 0x01, 0x0c, 0x01, 0x0b, 0x20, 0x02, 0x20,
-      0x01, 0x10, 0x01, 0x0b, 0x22, 0x01, 0x46, 0x04, 0x40, 0x20, 0x00, 0x0f,
-      0x0b, 0x20, 0x01, 0x0b, 0x62, 0x01, 0x03, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x00, 0x03, 0x40, 0x20, 0x00, 0x22, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x00,
-      0x20, 0x01, 0x28, 0x02, 0x00, 0x22, 0x02, 0x41, 0x7f, 0x73, 0x20, 0x02,
-      0x41, 0xff, 0xfd, 0xfb, 0x77, 0x6a, 0x71, 0x41, 0x80, 0x81, 0x82, 0x84,
-      0x78, 0x71, 0x45, 0x0d, 0x00, 0x0b, 0x02, 0x40, 0x20, 0x02, 0x41, 0xff,
-      0x01, 0x71, 0x45, 0x04, 0x40, 0x20, 0x01, 0x21, 0x00, 0x0c, 0x01, 0x0b,
-      0x03, 0x40, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x21, 0x02, 0x20, 0x01, 0x41,
-      0x01, 0x6a, 0x22, 0x00, 0x21, 0x01, 0x20, 0x02, 0x0d, 0x00, 0x0b, 0x0b,
-      0x20, 0x00, 0x41, 0x80, 0x08, 0x6b, 0x0b, 0x0c, 0x00, 0x02, 0x7f, 0x41,
-      0x00, 0x41, 0x00, 0x10, 0x04, 0x0b, 0x1a, 0x0b, 0x66, 0x01, 0x02, 0x7f,
-      0x41, 0x90, 0x08, 0x28, 0x02, 0x00, 0x22, 0x00, 0x28, 0x02, 0x4c, 0x41,
-      0x00, 0x4e, 0x04, 0x7f, 0x41, 0x01, 0x05, 0x20, 0x01, 0x0b, 0x1a, 0x02,
-      0x40, 0x41, 0x7f, 0x41, 0x00, 0x10, 0x0a, 0x22, 0x01, 0x20, 0x01, 0x20,
-      0x00, 0x10, 0x09, 0x47, 0x1b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x02, 0x40,
-      0x20, 0x00, 0x2d, 0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00,
-      0x28, 0x02, 0x14, 0x22, 0x01, 0x20, 0x00, 0x28, 0x02, 0x10, 0x4f, 0x0d,
-      0x00, 0x20, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a, 0x36, 0x02, 0x14, 0x20,
-      0x01, 0x41, 0x0a, 0x3a, 0x00, 0x00, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x10,
-      0x06, 0x0b, 0x0b, 0x3d, 0x01, 0x01, 0x7f, 0x20, 0x02, 0x04, 0x40, 0x03,
-      0x40, 0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0xc0, 0x00, 0x49, 0x1b, 0x22, 0x03, 0x10, 0x03, 0x21,
-      0x00, 0x20, 0x01, 0x41, 0x80, 0x40, 0x6b, 0x21, 0x01, 0x20, 0x00, 0x41,
-      0x80, 0x40, 0x6b, 0x21, 0x00, 0x20, 0x02, 0x20, 0x03, 0x6b, 0x22, 0x02,
-      0x0d, 0x00, 0x0b, 0x0b, 0x0b, 0xb1, 0x02, 0x01, 0x06, 0x7f, 0x23, 0x00,
-      0x41, 0x20, 0x6b, 0x22, 0x03, 0x24, 0x00, 0x20, 0x03, 0x20, 0x00, 0x28,
-      0x02, 0x1c, 0x22, 0x04, 0x36, 0x02, 0x10, 0x20, 0x00, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x03, 0x20, 0x02, 0x36, 0x02, 0x1c, 0x20, 0x03, 0x20,
-      0x01, 0x36, 0x02, 0x18, 0x20, 0x03, 0x20, 0x05, 0x20, 0x04, 0x6b, 0x22,
-      0x01, 0x36, 0x02, 0x14, 0x20, 0x01, 0x20, 0x02, 0x6a, 0x21, 0x06, 0x41,
-      0x02, 0x21, 0x05, 0x20, 0x03, 0x41, 0x10, 0x6a, 0x21, 0x01, 0x03, 0x40,
-      0x02, 0x40, 0x02, 0x7f, 0x20, 0x06, 0x02, 0x7f, 0x20, 0x00, 0x28, 0x02,
-      0x3c, 0x20, 0x01, 0x20, 0x05, 0x20, 0x03, 0x41, 0x0c, 0x6a, 0x10, 0x00,
-      0x04, 0x40, 0x20, 0x03, 0x41, 0x7f, 0x36, 0x02, 0x0c, 0x41, 0x7f, 0x0c,
-      0x01, 0x0b, 0x20, 0x03, 0x28, 0x02, 0x0c, 0x0b, 0x22, 0x04, 0x46, 0x04,
-      0x40, 0x20, 0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02,
-      0x1c, 0x20, 0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x20, 0x02, 0x0c,
-      0x01, 0x0b, 0x20, 0x04, 0x41, 0x7f, 0x4a, 0x0d, 0x01, 0x20, 0x00, 0x41,
-      0x00, 0x36, 0x02, 0x1c, 0x20, 0x00, 0x42, 0x00, 0x37, 0x03, 0x10, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x00, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x00, 0x20, 0x05, 0x41, 0x02, 0x46, 0x0d, 0x00, 0x1a, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x04, 0x6b, 0x0b, 0x21, 0x04, 0x20, 0x03, 0x41,
-      0x20, 0x6a, 0x24, 0x00, 0x20, 0x04, 0x0f, 0x0b, 0x20, 0x01, 0x41, 0x08,
-      0x6a, 0x20, 0x01, 0x20, 0x04, 0x20, 0x01, 0x28, 0x02, 0x04, 0x22, 0x07,
-      0x4b, 0x22, 0x08, 0x1b, 0x22, 0x01, 0x20, 0x04, 0x20, 0x07, 0x41, 0x00,
-      0x20, 0x08, 0x1b, 0x6b, 0x22, 0x07, 0x20, 0x01, 0x28, 0x02, 0x00, 0x6a,
-      0x36, 0x02, 0x00, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x04, 0x20, 0x07,
-      0x6b, 0x36, 0x02, 0x04, 0x20, 0x06, 0x20, 0x04, 0x6b, 0x21, 0x06, 0x20,
-      0x05, 0x20, 0x08, 0x6b, 0x21, 0x05, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x0b,
-      0x0b, 0x4d, 0x06, 0x00, 0x41, 0x80, 0x08, 0x0b, 0x12, 0x68, 0x65, 0x6c,
-      0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, 0x00, 0x00,
-      0x00, 0x18, 0x04, 0x00, 0x41, 0x98, 0x08, 0x0b, 0x01, 0x05, 0x00, 0x41,
-      0xa4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xbc, 0x08, 0x0b, 0x0e, 0x02,
-      0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xb8, 0x04, 0x00, 0x00, 0x00,
-      0x04, 0x00, 0x41, 0xd4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xe3, 0x08,
-      0x0b, 0x05, 0x0a, 0xff, 0xff, 0xff, 0xff,
-    ]);
-
-    late WasmMemory mem;
-    var out = StringBuffer();
-    int getI32(int p) {
-      // Read a little-endian I32.
-      var n = 0;
-      for (var i = p + 3; i >= p; --i) {
-        n *= 256;
-        n += mem[i];
-      }
-      return n;
-    }
-
-    var inst = WasmModule(data)
-        .instantiate()
-        .addFunction('wasi_unstable', 'fd_write',
-            (int fd, int iovs, int iovsLen, int unused) {
-      // iovs points to an array of length iovs_len. Each element is two I32s,
-      // a char* and a length.
-      var o = StringBuffer();
-      for (var i = 0; i < iovsLen; ++i) {
-        var str = getI32(iovs + 8 * i);
-        var len = getI32(iovs + 4 + 8 * i);
-        for (var j = 0; j < len; ++j) {
-          o.write(String.fromCharCode(mem[str + j]));
-        }
-      }
-      out.write(o.toString());
-      return o.length;
-    }).build();
-    mem = inst.memory;
-
-    var fn = inst.lookupFunction('_start');
-    fn();
-    expect(out.toString(), 'hello, world!\n');
-  });
-}
diff --git a/pkg/wasm/test/memory_error_test.dart b/pkg/wasm/test/memory_error_test.dart
deleted file mode 100644
index 0c8dbd1..0000000
--- a/pkg/wasm/test/memory_error_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2021, 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 errors thrown by WasmMemory.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('memory errors', () {
-    // Empty wasm module.
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00, //
-    ]);
-    var module = WasmModule(data);
-
-    expect(() => module.createMemory(1000000000), throwsA(isException));
-    var mem = module.createMemory(100);
-    expect(() => mem.grow(1000000000), throwsA(isException));
-    mem = module.createMemory(100, 200);
-    expect(() => mem.grow(300), throwsA(isException));
-  });
-}
diff --git a/pkg/wasm/test/memory_test.dart b/pkg/wasm/test/memory_test.dart
deleted file mode 100644
index 483c225..0000000
--- a/pkg/wasm/test/memory_test.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2021, 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 that we can create a WasmMemory, edit it, and grow it.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('memory', () {
-    // 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(mem.lengthInPages, 100);
-    expect(mem.lengthInBytes, 100 * WasmMemory.kPageSizeInBytes);
-
-    mem[123] = 45;
-    expect(mem[123], 45);
-
-    mem.grow(10);
-    expect(mem.lengthInPages, 110);
-    expect(mem.lengthInBytes, 110 * WasmMemory.kPageSizeInBytes);
-    expect(mem[123], 45);
-  });
-}
diff --git a/pkg/wasm/test/numerics_test.dart b/pkg/wasm/test/numerics_test.dart
deleted file mode 100644
index 9ecd3d5..0000000
--- a/pkg/wasm/test/numerics_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2021, 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 numeric types.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('numerics', () {
-    // int64_t addI64(int64_t x, int64_t y) { return x + y; }
-    // int32_t addI32(int32_t x, int32_t y) { return x + y; }
-    // double addF64(double x, double y) { return x + y; }
-    // float addF32(float x, float y) { return x + y; }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x19, 0x04, 0x60, //
-      0x02, 0x7e, 0x7e, 0x01, 0x7e, 0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x60,
-      0x02, 0x7c, 0x7c, 0x01, 0x7c, 0x60, 0x02, 0x7d, 0x7d, 0x01, 0x7d, 0x03,
-      0x05, 0x04, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01,
-      0x01, 0x05, 0x03, 0x01, 0x00, 0x02, 0x06, 0x08, 0x01, 0x7f, 0x01, 0x41,
-      0x80, 0x88, 0x04, 0x0b, 0x07, 0x2e, 0x05, 0x06, 0x6d, 0x65, 0x6d, 0x6f,
-      0x72, 0x79, 0x02, 0x00, 0x06, 0x61, 0x64, 0x64, 0x49, 0x36, 0x34, 0x00,
-      0x00, 0x06, 0x61, 0x64, 0x64, 0x49, 0x33, 0x32, 0x00, 0x01, 0x06, 0x61,
-      0x64, 0x64, 0x46, 0x36, 0x34, 0x00, 0x02, 0x06, 0x61, 0x64, 0x64, 0x46,
-      0x33, 0x32, 0x00, 0x03, 0x0a, 0x21, 0x04, 0x07, 0x00, 0x20, 0x01, 0x20,
-      0x00, 0x7c, 0x0b, 0x07, 0x00, 0x20, 0x01, 0x20, 0x00, 0x6a, 0x0b, 0x07,
-      0x00, 0x20, 0x00, 0x20, 0x01, 0xa0, 0x0b, 0x07, 0x00, 0x20, 0x00, 0x20,
-      0x01, 0x92, 0x0b,
-    ]);
-
-    var inst = WasmModule(data).instantiate().build();
-    var addI64 = inst.lookupFunction('addI64');
-    var addI32 = inst.lookupFunction('addI32');
-    var addF64 = inst.lookupFunction('addF64');
-    var addF32 = inst.lookupFunction('addF32');
-
-    var i64 = addI64(0x123456789ABCDEF, 0xFEDCBA987654321) as int;
-    expect(i64, 0x1111111111111110);
-
-    var i32 = addI32(0xABCDEF, 0xFEDCBA) as int;
-    expect(i32, 0x1aaaaa9);
-
-    var f64 = addF64(1234.5678, 8765.4321) as double;
-    expect(f64, closeTo(9999.9999, 1e-6));
-
-    var f32 = addF32(1234.5678, 8765.4321) as double;
-    expect(f32, closeTo(9999.9999, 1e-3));
-  });
-}
diff --git a/pkg/wasm/test/test_shared.dart b/pkg/wasm/test/test_shared.dart
deleted file mode 100644
index af4a3ae..0000000
--- a/pkg/wasm/test/test_shared.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test/test.dart';
-
-Matcher throwsExceptionWithToString(Object matcher) => throwsA(
-      isA<Exception>().having((p0) => p0.toString(), 'toString', matcher),
-    );
diff --git a/pkg/wasm/test/void_test.dart b/pkg/wasm/test/void_test.dart
deleted file mode 100644
index 0048515..0000000
--- a/pkg/wasm/test/void_test.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2021, 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 functions with void return type, and functions that take no args.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-void main() {
-  test('void return type', () {
-    // int64_t x = 0;
-    // void set(int64_t a, int64_t b) { x = a + b; }
-    // int64_t get() { return x; }
-    var data = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0a, 0x02, 0x60, //
-      0x02, 0x7e, 0x7e, 0x00, 0x60, 0x00, 0x01, 0x7e, 0x03, 0x03, 0x02, 0x00,
-      0x01, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00,
-      0x02, 0x06, 0x08, 0x01, 0x7f, 0x01, 0x41, 0x90, 0x88, 0x04, 0x0b, 0x07,
-      0x16, 0x03, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x03,
-      0x73, 0x65, 0x74, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00, 0x01, 0x0a,
-      0x1e, 0x02, 0x10, 0x00, 0x41, 0x00, 0x20, 0x01, 0x20, 0x00, 0x7c, 0x37,
-      0x03, 0x80, 0x88, 0x80, 0x80, 0x00, 0x0b, 0x0b, 0x00, 0x41, 0x00, 0x29,
-      0x03, 0x80, 0x88, 0x80, 0x80, 0x00, 0x0b, 0x0b, 0x0f, 0x01, 0x00, 0x41,
-      0x80, 0x08, 0x0b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    ]);
-
-    var inst = WasmModule(data).instantiate().build();
-    var setFn = inst.lookupFunction('set');
-    var getFn = inst.lookupFunction('get');
-    expect(setFn(123, 456), isNull);
-    var n = getFn() as int;
-    expect(n, 123 + 456);
-  });
-}
diff --git a/pkg/wasm/test/wasi_error_test.dart b/pkg/wasm/test/wasi_error_test.dart
deleted file mode 100644
index 47b0fb5..0000000
--- a/pkg/wasm/test/wasi_error_test.dart
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright (c) 2021, 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 the errors that can be thrown by WASI.
-import 'dart:typed_data';
-
-import 'package:test/test.dart';
-import 'package:wasm/wasm.dart';
-
-import 'test_shared.dart';
-
-void main() {
-  test('wasi error', () {
-    // Empty wasm module.
-    var emptyModuleData = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00, 0x00, //
-    ]);
-
-    // Failed to fill WASI imports (the empty module was not built with WASI).
-    expect(
-      () => WasmModule(emptyModuleData).instantiate().enableWasi(),
-      throwsExceptionWithToString(
-        contains('Failed to fill WASI imports'),
-      ),
-    );
-
-    // Hello world module generated by emscripten+WASI. Exports a function like
-    // `void _start()`, and prints using `int fd_write(int, int, int, int)`.
-    var helloWorldData = Uint8List.fromList([
-      0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x33, 0x09, 0x60, //
-      0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x60, 0x04, 0x7f, 0x7f, 0x7f, 0x7f,
-      0x01, 0x7f, 0x60, 0x00, 0x00, 0x60, 0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x60,
-      0x01, 0x7f, 0x01, 0x7f, 0x60, 0x03, 0x7f, 0x7e, 0x7f, 0x01, 0x7e, 0x60,
-      0x00, 0x01, 0x7f, 0x60, 0x01, 0x7f, 0x00, 0x60, 0x03, 0x7f, 0x7f, 0x7f,
-      0x00, 0x02, 0x1a, 0x01, 0x0d, 0x77, 0x61, 0x73, 0x69, 0x5f, 0x75, 0x6e,
-      0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x08, 0x66, 0x64, 0x5f, 0x77, 0x72,
-      0x69, 0x74, 0x65, 0x00, 0x01, 0x03, 0x0f, 0x0e, 0x03, 0x04, 0x00, 0x03,
-      0x02, 0x07, 0x05, 0x04, 0x03, 0x06, 0x02, 0x02, 0x08, 0x00, 0x04, 0x05,
-      0x01, 0x70, 0x01, 0x04, 0x04, 0x05, 0x06, 0x01, 0x01, 0x80, 0x02, 0x80,
-      0x02, 0x06, 0x09, 0x01, 0x7f, 0x01, 0x41, 0xc0, 0x95, 0xc0, 0x02, 0x0b,
-      0x07, 0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00,
-      0x11, 0x5f, 0x5f, 0x77, 0x61, 0x73, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
-      0x5f, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x00, 0x05, 0x04, 0x6d, 0x61, 0x69,
-      0x6e, 0x00, 0x04, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x0b,
-      0x09, 0x09, 0x01, 0x00, 0x41, 0x01, 0x0b, 0x03, 0x08, 0x0e, 0x07, 0x0a,
-      0xae, 0x0c, 0x0e, 0xbf, 0x01, 0x01, 0x05, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x04, 0x02, 0x40, 0x20, 0x01, 0x28, 0x02, 0x10, 0x22, 0x02, 0x04, 0x7f,
-      0x20, 0x02, 0x05, 0x20, 0x01, 0x10, 0x02, 0x0d, 0x01, 0x20, 0x01, 0x28,
-      0x02, 0x10, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x14, 0x22, 0x05, 0x6b, 0x20,
-      0x00, 0x49, 0x04, 0x40, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20, 0x00, 0x20,
-      0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x0f, 0x0b, 0x02, 0x40, 0x20,
-      0x01, 0x2c, 0x00, 0x4b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x20, 0x00, 0x21,
-      0x03, 0x03, 0x40, 0x20, 0x03, 0x22, 0x02, 0x45, 0x0d, 0x01, 0x20, 0x02,
-      0x41, 0x7f, 0x6a, 0x22, 0x03, 0x41, 0x80, 0x08, 0x6a, 0x2d, 0x00, 0x00,
-      0x41, 0x0a, 0x47, 0x0d, 0x00, 0x0b, 0x20, 0x01, 0x41, 0x80, 0x08, 0x20,
-      0x02, 0x20, 0x01, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x22, 0x03, 0x20,
-      0x02, 0x49, 0x0d, 0x01, 0x20, 0x00, 0x20, 0x02, 0x6b, 0x21, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0x08, 0x6a, 0x21, 0x04, 0x20, 0x01, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x02, 0x21, 0x06, 0x0b, 0x20, 0x05, 0x20, 0x04, 0x20,
-      0x00, 0x10, 0x03, 0x1a, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x14, 0x20,
-      0x00, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x06, 0x6a, 0x21, 0x03,
-      0x0b, 0x20, 0x03, 0x0b, 0x59, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x20, 0x00,
-      0x2d, 0x00, 0x4a, 0x22, 0x01, 0x41, 0x7f, 0x6a, 0x20, 0x01, 0x72, 0x3a,
-      0x00, 0x4a, 0x20, 0x00, 0x28, 0x02, 0x00, 0x22, 0x01, 0x41, 0x08, 0x71,
-      0x04, 0x40, 0x20, 0x00, 0x20, 0x01, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x7f, 0x0f, 0x0b, 0x20, 0x00, 0x42, 0x00, 0x37, 0x02, 0x04, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02, 0x1c, 0x20,
-      0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01, 0x20, 0x00,
-      0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x41, 0x00, 0x0b, 0x82, 0x04,
-      0x01, 0x03, 0x7f, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x4f, 0x04, 0x40,
-      0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x10, 0x0d, 0x20, 0x00, 0x0f, 0x0b,
-      0x20, 0x00, 0x20, 0x02, 0x6a, 0x21, 0x03, 0x02, 0x40, 0x20, 0x00, 0x20,
-      0x01, 0x73, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x02, 0x40, 0x20, 0x02,
-      0x41, 0x01, 0x48, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b,
-      0x20, 0x00, 0x41, 0x03, 0x71, 0x45, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02, 0x03, 0x40, 0x20, 0x02, 0x20,
-      0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a,
-      0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02, 0x20, 0x03, 0x4f,
-      0x0d, 0x01, 0x20, 0x02, 0x41, 0x03, 0x71, 0x0d, 0x00, 0x0b, 0x0b, 0x02,
-      0x40, 0x20, 0x03, 0x41, 0x7c, 0x71, 0x22, 0x04, 0x41, 0xc0, 0x00, 0x49,
-      0x0d, 0x00, 0x20, 0x02, 0x20, 0x04, 0x41, 0x40, 0x6a, 0x22, 0x05, 0x4b,
-      0x0d, 0x00, 0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36,
-      0x02, 0x00, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x04, 0x36, 0x02, 0x04,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x08, 0x36, 0x02, 0x08, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x0c, 0x36, 0x02, 0x0c, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x10, 0x36, 0x02, 0x10, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x14, 0x36, 0x02, 0x14, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x18, 0x36,
-      0x02, 0x18, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x1c, 0x36, 0x02, 0x1c,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x20, 0x36, 0x02, 0x20, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x24, 0x36, 0x02, 0x24, 0x20, 0x02, 0x20, 0x01,
-      0x28, 0x02, 0x28, 0x36, 0x02, 0x28, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02,
-      0x2c, 0x36, 0x02, 0x2c, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x30, 0x36,
-      0x02, 0x30, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x34, 0x36, 0x02, 0x34,
-      0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x38, 0x36, 0x02, 0x38, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x3c, 0x36, 0x02, 0x3c, 0x20, 0x01, 0x41, 0x40,
-      0x6b, 0x21, 0x01, 0x20, 0x02, 0x41, 0x40, 0x6b, 0x22, 0x02, 0x20, 0x05,
-      0x4d, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x04, 0x4f, 0x0d, 0x01,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x28, 0x02, 0x00, 0x36, 0x02, 0x00,
-      0x20, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x04, 0x6a,
-      0x22, 0x02, 0x20, 0x04, 0x49, 0x0d, 0x00, 0x0b, 0x0c, 0x01, 0x0b, 0x20,
-      0x03, 0x41, 0x04, 0x49, 0x04, 0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01,
-      0x0b, 0x20, 0x03, 0x41, 0x7c, 0x6a, 0x22, 0x04, 0x20, 0x00, 0x49, 0x04,
-      0x40, 0x20, 0x00, 0x21, 0x02, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x21, 0x02,
-      0x03, 0x40, 0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x3a, 0x00, 0x01, 0x20, 0x02,
-      0x20, 0x01, 0x2d, 0x00, 0x02, 0x3a, 0x00, 0x02, 0x20, 0x02, 0x20, 0x01,
-      0x2d, 0x00, 0x03, 0x3a, 0x00, 0x03, 0x20, 0x01, 0x41, 0x04, 0x6a, 0x21,
-      0x01, 0x20, 0x02, 0x41, 0x04, 0x6a, 0x22, 0x02, 0x20, 0x04, 0x4d, 0x0d,
-      0x00, 0x0b, 0x0b, 0x20, 0x02, 0x20, 0x03, 0x49, 0x04, 0x40, 0x03, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x2d, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x01,
-      0x41, 0x01, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x01, 0x6a, 0x22, 0x02,
-      0x20, 0x03, 0x47, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x00, 0x0b, 0x06, 0x00,
-      0x10, 0x0c, 0x41, 0x00, 0x0b, 0x03, 0x00, 0x01, 0x0b, 0x7e, 0x01, 0x03,
-      0x7f, 0x23, 0x00, 0x41, 0x10, 0x6b, 0x22, 0x01, 0x24, 0x00, 0x20, 0x01,
-      0x41, 0x0a, 0x3a, 0x00, 0x0f, 0x02, 0x40, 0x20, 0x00, 0x28, 0x02, 0x10,
-      0x22, 0x02, 0x45, 0x04, 0x40, 0x20, 0x00, 0x10, 0x02, 0x0d, 0x01, 0x20,
-      0x00, 0x28, 0x02, 0x10, 0x21, 0x02, 0x0b, 0x02, 0x40, 0x20, 0x00, 0x28,
-      0x02, 0x14, 0x22, 0x03, 0x20, 0x02, 0x4f, 0x0d, 0x00, 0x20, 0x00, 0x2c,
-      0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00, 0x20, 0x03, 0x41,
-      0x01, 0x6a, 0x36, 0x02, 0x14, 0x20, 0x03, 0x41, 0x0a, 0x3a, 0x00, 0x00,
-      0x0c, 0x01, 0x0b, 0x20, 0x00, 0x20, 0x01, 0x41, 0x0f, 0x6a, 0x41, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x24, 0x11, 0x00, 0x00, 0x41, 0x01, 0x47, 0x0d,
-      0x00, 0x20, 0x01, 0x2d, 0x00, 0x0f, 0x1a, 0x0b, 0x20, 0x01, 0x41, 0x10,
-      0x6a, 0x24, 0x00, 0x0b, 0x04, 0x00, 0x42, 0x00, 0x0b, 0x04, 0x00, 0x41,
-      0x00, 0x0b, 0x31, 0x01, 0x01, 0x7f, 0x20, 0x00, 0x21, 0x02, 0x20, 0x02,
-      0x02, 0x7f, 0x20, 0x01, 0x28, 0x02, 0x4c, 0x41, 0x7f, 0x4c, 0x04, 0x40,
-      0x20, 0x02, 0x20, 0x01, 0x10, 0x01, 0x0c, 0x01, 0x0b, 0x20, 0x02, 0x20,
-      0x01, 0x10, 0x01, 0x0b, 0x22, 0x01, 0x46, 0x04, 0x40, 0x20, 0x00, 0x0f,
-      0x0b, 0x20, 0x01, 0x0b, 0x62, 0x01, 0x03, 0x7f, 0x41, 0x80, 0x08, 0x21,
-      0x00, 0x03, 0x40, 0x20, 0x00, 0x22, 0x01, 0x41, 0x04, 0x6a, 0x21, 0x00,
-      0x20, 0x01, 0x28, 0x02, 0x00, 0x22, 0x02, 0x41, 0x7f, 0x73, 0x20, 0x02,
-      0x41, 0xff, 0xfd, 0xfb, 0x77, 0x6a, 0x71, 0x41, 0x80, 0x81, 0x82, 0x84,
-      0x78, 0x71, 0x45, 0x0d, 0x00, 0x0b, 0x02, 0x40, 0x20, 0x02, 0x41, 0xff,
-      0x01, 0x71, 0x45, 0x04, 0x40, 0x20, 0x01, 0x21, 0x00, 0x0c, 0x01, 0x0b,
-      0x03, 0x40, 0x20, 0x01, 0x2d, 0x00, 0x01, 0x21, 0x02, 0x20, 0x01, 0x41,
-      0x01, 0x6a, 0x22, 0x00, 0x21, 0x01, 0x20, 0x02, 0x0d, 0x00, 0x0b, 0x0b,
-      0x20, 0x00, 0x41, 0x80, 0x08, 0x6b, 0x0b, 0x0c, 0x00, 0x02, 0x7f, 0x41,
-      0x00, 0x41, 0x00, 0x10, 0x04, 0x0b, 0x1a, 0x0b, 0x66, 0x01, 0x02, 0x7f,
-      0x41, 0x90, 0x08, 0x28, 0x02, 0x00, 0x22, 0x00, 0x28, 0x02, 0x4c, 0x41,
-      0x00, 0x4e, 0x04, 0x7f, 0x41, 0x01, 0x05, 0x20, 0x01, 0x0b, 0x1a, 0x02,
-      0x40, 0x41, 0x7f, 0x41, 0x00, 0x10, 0x0a, 0x22, 0x01, 0x20, 0x01, 0x20,
-      0x00, 0x10, 0x09, 0x47, 0x1b, 0x41, 0x00, 0x48, 0x0d, 0x00, 0x02, 0x40,
-      0x20, 0x00, 0x2d, 0x00, 0x4b, 0x41, 0x0a, 0x46, 0x0d, 0x00, 0x20, 0x00,
-      0x28, 0x02, 0x14, 0x22, 0x01, 0x20, 0x00, 0x28, 0x02, 0x10, 0x4f, 0x0d,
-      0x00, 0x20, 0x00, 0x20, 0x01, 0x41, 0x01, 0x6a, 0x36, 0x02, 0x14, 0x20,
-      0x01, 0x41, 0x0a, 0x3a, 0x00, 0x00, 0x0c, 0x01, 0x0b, 0x20, 0x00, 0x10,
-      0x06, 0x0b, 0x0b, 0x3d, 0x01, 0x01, 0x7f, 0x20, 0x02, 0x04, 0x40, 0x03,
-      0x40, 0x20, 0x00, 0x20, 0x01, 0x20, 0x02, 0x41, 0x80, 0xc0, 0x00, 0x20,
-      0x02, 0x41, 0x80, 0xc0, 0x00, 0x49, 0x1b, 0x22, 0x03, 0x10, 0x03, 0x21,
-      0x00, 0x20, 0x01, 0x41, 0x80, 0x40, 0x6b, 0x21, 0x01, 0x20, 0x00, 0x41,
-      0x80, 0x40, 0x6b, 0x21, 0x00, 0x20, 0x02, 0x20, 0x03, 0x6b, 0x22, 0x02,
-      0x0d, 0x00, 0x0b, 0x0b, 0x0b, 0xb1, 0x02, 0x01, 0x06, 0x7f, 0x23, 0x00,
-      0x41, 0x20, 0x6b, 0x22, 0x03, 0x24, 0x00, 0x20, 0x03, 0x20, 0x00, 0x28,
-      0x02, 0x1c, 0x22, 0x04, 0x36, 0x02, 0x10, 0x20, 0x00, 0x28, 0x02, 0x14,
-      0x21, 0x05, 0x20, 0x03, 0x20, 0x02, 0x36, 0x02, 0x1c, 0x20, 0x03, 0x20,
-      0x01, 0x36, 0x02, 0x18, 0x20, 0x03, 0x20, 0x05, 0x20, 0x04, 0x6b, 0x22,
-      0x01, 0x36, 0x02, 0x14, 0x20, 0x01, 0x20, 0x02, 0x6a, 0x21, 0x06, 0x41,
-      0x02, 0x21, 0x05, 0x20, 0x03, 0x41, 0x10, 0x6a, 0x21, 0x01, 0x03, 0x40,
-      0x02, 0x40, 0x02, 0x7f, 0x20, 0x06, 0x02, 0x7f, 0x20, 0x00, 0x28, 0x02,
-      0x3c, 0x20, 0x01, 0x20, 0x05, 0x20, 0x03, 0x41, 0x0c, 0x6a, 0x10, 0x00,
-      0x04, 0x40, 0x20, 0x03, 0x41, 0x7f, 0x36, 0x02, 0x0c, 0x41, 0x7f, 0x0c,
-      0x01, 0x0b, 0x20, 0x03, 0x28, 0x02, 0x0c, 0x0b, 0x22, 0x04, 0x46, 0x04,
-      0x40, 0x20, 0x00, 0x20, 0x00, 0x28, 0x02, 0x2c, 0x22, 0x01, 0x36, 0x02,
-      0x1c, 0x20, 0x00, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x00, 0x20, 0x01,
-      0x20, 0x00, 0x28, 0x02, 0x30, 0x6a, 0x36, 0x02, 0x10, 0x20, 0x02, 0x0c,
-      0x01, 0x0b, 0x20, 0x04, 0x41, 0x7f, 0x4a, 0x0d, 0x01, 0x20, 0x00, 0x41,
-      0x00, 0x36, 0x02, 0x1c, 0x20, 0x00, 0x42, 0x00, 0x37, 0x03, 0x10, 0x20,
-      0x00, 0x20, 0x00, 0x28, 0x02, 0x00, 0x41, 0x20, 0x72, 0x36, 0x02, 0x00,
-      0x41, 0x00, 0x20, 0x05, 0x41, 0x02, 0x46, 0x0d, 0x00, 0x1a, 0x20, 0x02,
-      0x20, 0x01, 0x28, 0x02, 0x04, 0x6b, 0x0b, 0x21, 0x04, 0x20, 0x03, 0x41,
-      0x20, 0x6a, 0x24, 0x00, 0x20, 0x04, 0x0f, 0x0b, 0x20, 0x01, 0x41, 0x08,
-      0x6a, 0x20, 0x01, 0x20, 0x04, 0x20, 0x01, 0x28, 0x02, 0x04, 0x22, 0x07,
-      0x4b, 0x22, 0x08, 0x1b, 0x22, 0x01, 0x20, 0x04, 0x20, 0x07, 0x41, 0x00,
-      0x20, 0x08, 0x1b, 0x6b, 0x22, 0x07, 0x20, 0x01, 0x28, 0x02, 0x00, 0x6a,
-      0x36, 0x02, 0x00, 0x20, 0x01, 0x20, 0x01, 0x28, 0x02, 0x04, 0x20, 0x07,
-      0x6b, 0x36, 0x02, 0x04, 0x20, 0x06, 0x20, 0x04, 0x6b, 0x21, 0x06, 0x20,
-      0x05, 0x20, 0x08, 0x6b, 0x21, 0x05, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x0b,
-      0x0b, 0x4d, 0x06, 0x00, 0x41, 0x80, 0x08, 0x0b, 0x12, 0x68, 0x65, 0x6c,
-      0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, 0x00, 0x00,
-      0x00, 0x18, 0x04, 0x00, 0x41, 0x98, 0x08, 0x0b, 0x01, 0x05, 0x00, 0x41,
-      0xa4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xbc, 0x08, 0x0b, 0x0e, 0x02,
-      0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xb8, 0x04, 0x00, 0x00, 0x00,
-      0x04, 0x00, 0x41, 0xd4, 0x08, 0x0b, 0x01, 0x01, 0x00, 0x41, 0xe3, 0x08,
-      0x0b, 0x05, 0x0a, 0xff, 0xff, 0xff, 0xff,
-    ]);
-
-    // Trying to import WASI twice.
-    expect(
-      () => WasmModule(helloWorldData).instantiate().enableWasi().enableWasi(),
-      throwsExceptionWithToString(contains('WASI is already enabled')),
-    );
-
-    // Missing imports due to not enabling WASI.
-    expect(
-      () => WasmModule(helloWorldData).instantiate().build(),
-      throwsExceptionWithToString(contains('Missing import')),
-    );
-
-    // Trying to get stdout/stderr without WASI enabled (WASI function import has
-    // been manually filled).
-    var inst = WasmModule(helloWorldData)
-        .instantiate()
-        .addFunction(
-          'wasi_unstable',
-          'fd_write',
-          (int fd, int iovs, int iovsLen, int unused) => 0,
-        )
-        .build();
-    expect(
-      () => inst.stdout,
-      throwsExceptionWithToString(
-        contains("Can't capture stdout without WASI enabled"),
-      ),
-    );
-    expect(
-      () => inst.stderr,
-      throwsExceptionWithToString(
-        contains("Can't capture stderr without WASI enabled"),
-      ),
-    );
-  });
-}
diff --git a/pkg/wasm/tool/generate_ffi_boilerplate.py b/pkg/wasm/tool/generate_ffi_boilerplate.py
deleted file mode 100755
index 05966a0..0000000
--- a/pkg/wasm/tool/generate_ffi_boilerplate.py
+++ /dev/null
@@ -1,389 +0,0 @@
-#!/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 && dart format -owrite ../lib/
-
-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 removePrefix(t):
-    assert (t.startswith('wasm_') or t.startswith('wasi_') or
-            t.startswith('wasmer_') or t.startswith('Dart_') or
-            t.startswith('set_finalizer_'))
-    return t[(5 if t.startswith('wasm_') else 0):]
-
-
-def addPrefix(t):
-    if t.startswith('wasi_') or t.startswith('wasmer_') or t.startswith(
-            'Dart_') or t.startswith('set_finalizer_'):
-        return t
-    return 'wasm_' + t
-
-
-def getDartType(t, i):
-    if t in predefTypes:
-        return predefTypes[t][i]
-    assert (t.endswith('_t'))
-    return 'Wasmer' + camel(removePrefix(t[:-2]))
-
-
-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):
-    return camel(removePrefix(n))
-
-
-def dartFnMembName(n):
-    return '_' + removePrefix(n)
-
-
-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 = '''// %s_t
-class Wasmer%s extends Opaque {}'''
-
-vecTypeTemplate = '''// %s_vec_t
-class Wasmer%sVec extends Struct {
-  @Uint64()
-  external int length;
-
-  external Pointer<%s> data;
-
-  %s
-}'''
-
-byteVecToStringTemplate = '''
-  Uint8List get list => data.asTypedList(length);
-  @override
-  String toString() => utf8.decode(list);
-'''
-
-fnApiTemplate = '''
-// %s
-typedef NativeWasmer%sFn = %s;
-typedef Wasmer%sFn = %s;'''
-
-
-def getWasmerApi():
-    return ('\n\n'.join([
-        opaqueTypeTemplate % (addPrefix(t), camel(t))
-        for t in sorted(opaqueTypes)
-    ]) + '\n\n' + '\n\n'.join([
-        vecTypeTemplate % (addPrefix(t), camel(t),
-                           ('Pointer<%s>' if ptr else '%s') %
-                           nativeTypeToFfi('%s_t' % addPrefix(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_message_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 removePrefix(
-                t[:-2]) not in opaqueTypes and removePrefix(
-                    t[:-6]) not in vecTypes:
-            print('Missing type: ' + t)
-    fns.append((name, retType, args))
-
-
-def declareOwn(name):
-    opaqueTypes.add(name)
-    n = addPrefix(name)
-    addFn('void %s_delete(%s_t*)' % (n, n))
-
-
-def declareVec(name, storePtr):
-    vecTypes[name] = storePtr
-    n = addPrefix(name)
-    addFn('void %s_vec_new_empty(%s_vec_t* out)' % (n, n))
-    addFn('void %s_vec_new_uninitialized(%s_vec_t* out, size_t)' % (n, n))
-    addFn('void %s_vec_new(%s_vec_t* out, size_t, %s_t %s[])' %
-          (n, n, n, '*' if storePtr else ''))
-    addFn('void %s_vec_copy(%s_vec_t* out, const %s_vec_t*)' % (n, n, n))
-    addFn('void %s_vec_delete(%s_vec_t*)' % (n, n))
-
-
-def declareType(name, withCopy=True):
-    declareOwn(name)
-    declareVec(name, True)
-    if withCopy:
-        n = addPrefix(name)
-        addFn('%s_t* %s_copy(%s_t*)' % (n, n, n))
-
-
-predefinedType('void', 'Void', 'void')
-predefinedType('bool', 'Uint8', 'int')
-predefinedType('int', 'Int64', '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('uintptr_t', 'Uint64', 'int')
-predefinedType('intptr_t', 'Int64', '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')
-predefinedType('Dart_Handle', 'Handle', 'Object')
-
-declareOwn('engine')
-declareOwn('store')
-declareOwn('wasi_config')
-declareOwn('wasi_env')
-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_vec_t* 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_extern_t* wasm_func_as_extern(wasm_func_t*);
-WASM_API_EXTERN wasm_memory_t* wasm_extern_as_memory(wasm_extern_t*);
-WASM_API_EXTERN wasm_extern_t* wasm_memory_as_extern(wasm_memory_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_func_t* wasm_func_new_with_env( wasm_store_t*, const wasm_functype_t* type, void* fn, void* env, void *finalizer);
-WASM_API_EXTERN own wasm_trap_t* wasm_func_call(const wasm_func_t*, const wasm_val_vec_t* args, wasm_val_vec_t* results);
-WASM_API_EXTERN own wasm_trap_t* wasm_trap_new(wasm_store_t* store, const wasm_message_t*);
-WASM_API_EXTERN void wasm_trap_message(const wasm_trap_t*, own wasm_message_t* out);
-WASM_API_EXTERN wasm_valkind_t wasm_valtype_kind(const wasm_valtype_t*);
-
-wasi_config_t* wasi_config_new(const uint8_t* program_name);
-wasi_env_t* wasi_env_new(wasi_config_t* config);
-bool wasi_get_imports(const wasm_store_t* store, const wasm_module_t* module, const wasi_env_t* wasi_env, wasm_extern_vec_t* imports);
-int wasmer_last_error_message(uint8_t* buffer, int length);
-int wasmer_last_error_length();
-void wasi_env_set_memory(wasi_env_t* env, const wasm_memory_t* memory);
-void wasi_config_inherit_stdout(wasi_config_t* config);
-void wasi_config_inherit_stderr(wasi_config_t* config);
-intptr_t wasi_env_read_stderr(wasi_env_t* env, uint8_t* buffer, uintptr_t buffer_len);
-intptr_t wasi_env_read_stdout(wasi_env_t* env, uint8_t* buffer, uintptr_t buffer_len);
-
-intptr_t Dart_InitializeApiDL(void* data);
-void set_finalizer_for_engine(Dart_Handle, wasm_engine_t*);
-void set_finalizer_for_store(Dart_Handle, wasm_store_t*);
-void set_finalizer_for_module(Dart_Handle, wasm_module_t*);
-void set_finalizer_for_instance(Dart_Handle, wasm_instance_t*);
-void set_finalizer_for_trap(Dart_Handle, wasm_trap_t*);
-void set_finalizer_for_memorytype(Dart_Handle, wasm_memorytype_t*);
-void set_finalizer_for_memory(Dart_Handle, wasm_memory_t*);
-void set_finalizer_for_func(Dart_Handle, wasm_func_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',
-    'wasi_config_delete',
-}
-
-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, '../lib/src', filename)),
-              'w') as f:
-        f.write(content)
-
-
-wasmerApiText = readFile('wasmer_api_template.dart.t')
-wasmerApiText = wasmerApiText.replace('/* <WASMER_API> */', getWasmerApi())
-wasmerApiText = wasmerApiText.replace('/* <GEN_DOC> */', genDoc)
-writeFile('wasmer_api.g.dart', wasmerApiText)
-
-runtimeText = readFile('runtime_template.dart.t')
-runtimeText = runtimeText.replace('/* <RUNTIME_MEMB> */', getRuntimeMemb())
-runtimeText = runtimeText.replace('/* <RUNTIME_LOAD> */', getRuntimeLoad())
-runtimeText = runtimeText.replace('/* <GEN_DOC> */', genDoc)
-writeFile('runtime.g.dart', runtimeText)
diff --git a/pkg/wasm/tool/runtime_template.dart.t b/pkg/wasm/tool/runtime_template.dart.t
deleted file mode 100644
index 6b628fb..0000000
--- a/pkg/wasm/tool/runtime_template.dart.t
+++ /dev/null
@@ -1,351 +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.
-
-/* <GEN_DOC> */
-
-// ignore_for_file: cascade_invocations
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: unused_field
-
-part of 'runtime.dart';
-
-class WasmRuntime {
-  static WasmRuntime? _inst;
-
-  DynamicLibrary _lib;
-  late Pointer<WasmerEngine> _engine;
-  Map<int, _WasmTrapsEntry> traps = {};
-
-/* <RUNTIME_MEMB> */
-
-  factory WasmRuntime() => _inst ??= WasmRuntime._init();
-
-  WasmRuntime._init() : _lib = DynamicLibrary.open(_getLibPath()) {
-/* <RUNTIME_LOAD> */
-
-    if (_Dart_InitializeApiDL(NativeApi.initializeApiDLData) != 0) {
-      throw Exception('Failed to initialize Dart API');
-    }
-    _engine = _engine_new();
-    _checkNotEqual(_engine, nullptr, 'Failed to initialize Wasm engine.');
-    _set_finalizer_for_engine(this, _engine);
-  }
-
-  Pointer<WasmerStore> newStore(Object owner) {
-    var store = _checkNotEqual(
-      _store_new(_engine),
-      nullptr,
-      'Failed to create Wasm store.',
-    );
-    _set_finalizer_for_store(owner, store);
-    return store;
-  }
-
-  Pointer<WasmerModule> compile(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Uint8List data,
-  ) {
-    var dataPtr = calloc<Uint8>(data.length);
-    for (var i = 0; i < data.length; ++i) {
-      dataPtr[i] = data[i];
-    }
-    var dataVec = calloc<WasmerByteVec>();
-    dataVec.ref.data = dataPtr;
-    dataVec.ref.length = data.length;
-
-    var modulePtr = _module_new(store, dataVec);
-
-    calloc.free(dataPtr);
-    calloc.free(dataVec);
-
-    _checkNotEqual(modulePtr, nullptr, 'Wasm module compile failed.');
-    _set_finalizer_for_module(owner, modulePtr);
-    return modulePtr;
-  }
-
-  List<WasmExportDescriptor> exportDescriptors(Pointer<WasmerModule> module) {
-    var exportsVec = calloc<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,
-        ),
-      );
-    }
-    calloc.free(exportsVec);
-    return exps;
-  }
-
-  List<WasmImportDescriptor> importDescriptors(Pointer<WasmerModule> module) {
-    var importsVec = calloc<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,
-        ),
-      );
-    }
-    calloc.free(importsVec);
-    return imps;
-  }
-
-  void maybeThrowTrap(Pointer<WasmerTrap> trap, String source) {
-    if (trap != nullptr) {
-      // There are 2 kinds of trap, and their memory is managed differently.
-      // Traps created in the newTrap method below are stored in the traps map
-      // with a corresponding exception, and their memory is managed using a
-      // finalizer on the _WasmTrapsEntry. Traps can also be created by WASM
-      // code, and in that case we delete them in this function.
-      var entry = traps[trap.address];
-      if (entry != null) {
-        traps.remove(entry);
-        // ignore: only_throw_errors
-        throw entry.exception;
-      } else {
-        var trapMessage = calloc<WasmerByteVec>();
-        _trap_message(trap, trapMessage);
-        var message = 'Wasm trap when calling $source: ${trapMessage.ref}';
-        _byte_vec_delete(trapMessage);
-        calloc.free(trapMessage);
-        _trap_delete(trap);
-        throw Exception(message);
-      }
-    }
-  }
-
-  Pointer<WasmerInstance> instantiate(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Pointer<WasmerModule> module,
-    Pointer<WasmerExternVec> imports,
-  ) {
-    var trap = calloc<Pointer<WasmerTrap>>();
-    trap.value = nullptr;
-    var inst = _instance_new(store, module, imports, trap);
-    maybeThrowTrap(trap.value, 'module initialization function');
-    calloc.free(trap);
-    _checkNotEqual(inst, nullptr, 'Wasm module instantiation failed.');
-    _set_finalizer_for_instance(owner, inst);
-    return inst;
-  }
-
-  // Clean up the exports after use, with deleteExports.
-  Pointer<WasmerExternVec> exports(Pointer<WasmerInstance> instancePtr) {
-    var exports = calloc<WasmerExternVec>();
-    _instance_exports(instancePtr, exports);
-    return exports;
-  }
-
-  void deleteExports(Pointer<WasmerExternVec> exports) {
-    _extern_vec_delete(exports);
-    calloc.free(exports);
-  }
-
-  int externKind(Pointer<WasmerExtern> extern) => _extern_kind(extern);
-
-  Pointer<WasmerFunc> externToFunction(Pointer<WasmerExtern> extern) =>
-      _extern_as_func(extern);
-
-  Pointer<WasmerExtern> functionToExtern(Pointer<WasmerFunc> func) =>
-      _func_as_extern(func);
-
-  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<WasmerValVec> args,
-    Pointer<WasmerValVec> results,
-    String source,
-  ) {
-    maybeThrowTrap(_func_call(func, args, results), source);
-  }
-
-  Pointer<WasmerMemory> externToMemory(Pointer<WasmerExtern> extern) =>
-      _extern_as_memory(extern);
-
-  Pointer<WasmerExtern> memoryToExtern(Pointer<WasmerMemory> memory) =>
-      _memory_as_extern(memory);
-
-  Pointer<WasmerMemory> newMemory(
-    Object owner,
-    Pointer<WasmerStore> store,
-    int pages,
-    int? maxPages,
-  ) {
-    var limPtr = calloc<WasmerLimits>();
-    limPtr.ref.min = pages;
-    limPtr.ref.max = maxPages ?? wasm_limits_max_default;
-    var memType = _memorytype_new(limPtr);
-    calloc.free(limPtr);
-    _checkNotEqual(memType, nullptr, 'Failed to create memory type.');
-    _set_finalizer_for_memorytype(owner, memType);
-    var memory = _checkNotEqual(
-      _memory_new(store, memType),
-      nullptr,
-      'Failed to create memory.',
-    );
-    _set_finalizer_for_memory(owner, memory);
-    return memory;
-  }
-
-  void growMemory(Pointer<WasmerMemory> memory, int deltaPages) {
-    _checkNotEqual(
-      _memory_grow(memory, deltaPages),
-      0,
-      'Failed to grow memory.',
-    );
-  }
-
-  int memoryLength(Pointer<WasmerMemory> memory) => _memory_size(memory);
-
-  Uint8List memoryView(Pointer<WasmerMemory> memory) =>
-      _memory_data(memory).asTypedList(_memory_data_size(memory));
-
-  Pointer<WasmerFunc> newFunc(
-    Object owner,
-    Pointer<WasmerStore> store,
-    Pointer<WasmerFunctype> funcType,
-    Pointer func,
-    Pointer env,
-    Pointer finalizer,
-  ) {
-    var f = _func_new_with_env(
-      store,
-      funcType,
-      func.cast(),
-      env.cast(),
-      finalizer.cast(),
-    );
-    _checkNotEqual(f, nullptr, 'Failed to create function.');
-    _set_finalizer_for_func(owner, f);
-    return f;
-  }
-
-  Pointer<WasmerTrap> newTrap(Pointer<WasmerStore> store, Object exception) {
-    var msg = calloc<WasmerByteVec>();
-    msg.ref.data = calloc<Uint8>();
-    msg.ref.data[0] = 0;
-    msg.ref.length = 0;
-    var trap = _trap_new(store, msg);
-    calloc.free(msg.ref.data);
-    calloc.free(msg);
-    _checkNotEqual(trap, nullptr, 'Failed to create trap.');
-    var entry = _WasmTrapsEntry(exception);
-    _set_finalizer_for_trap(entry, trap);
-    traps[trap.address] = entry;
-    return trap;
-  }
-
-  Pointer<WasmerWasiConfig> newWasiConfig() {
-    var name = calloc<Uint8>();
-    name[0] = 0;
-    var config = _wasi_config_new(name);
-    calloc.free(name);
-    return _checkNotEqual(config, nullptr, 'Failed to create WASI config.');
-  }
-
-  void captureWasiStdout(Pointer<WasmerWasiConfig> config) {
-    _wasi_config_inherit_stdout(config);
-  }
-
-  void captureWasiStderr(Pointer<WasmerWasiConfig> config) {
-    _wasi_config_inherit_stderr(config);
-  }
-
-  Pointer<WasmerWasiEnv> newWasiEnv(Pointer<WasmerWasiConfig> config) =>
-      _checkNotEqual(
-        _wasi_env_new(config),
-        nullptr,
-        'Failed to create WASI environment.',
-      );
-
-  void wasiEnvSetMemory(
-    Pointer<WasmerWasiEnv> env,
-    Pointer<WasmerMemory> memory,
-  ) {
-    _wasi_env_set_memory(env, memory);
-  }
-
-  void getWasiImports(
-    Pointer<WasmerStore> store,
-    Pointer<WasmerModule> mod,
-    Pointer<WasmerWasiEnv> env,
-    Pointer<WasmerExternVec> imports,
-  ) {
-    _checkNotEqual(
-      _wasi_get_imports(store, mod, env, imports),
-      0,
-      'Failed to fill WASI imports.',
-    );
-  }
-
-  Stream<List<int>> getWasiStdoutStream(Pointer<WasmerWasiEnv> env) =>
-      Stream.fromIterable(_WasiStreamIterable(env, _wasi_env_read_stdout));
-
-  Stream<List<int>> getWasiStderrStream(Pointer<WasmerWasiEnv> env) =>
-      Stream.fromIterable(_WasiStreamIterable(env, _wasi_env_read_stderr));
-
-  String _getLastError() {
-    var length = _wasmer_last_error_length();
-    var buf = calloc<Uint8>(length);
-    _wasmer_last_error_message(buf, length);
-    var message = utf8.decode(buf.asTypedList(length));
-    calloc.free(buf);
-    return message;
-  }
-
-  T _checkNotEqual<T>(T x, T y, String errorMessage) {
-    if (x == y) {
-      throw Exception('$errorMessage\n${_getLastError()}');
-    }
-    return x;
-  }
-
-  static String getSignatureString(
-    String name,
-    List<int> argTypes,
-    int returnType,
-  ) =>
-      '${wasmerValKindName(returnType)} '
-      "$name(${argTypes.map(wasmerValKindName).join(", ")})";
-}
diff --git a/pkg/wasm/tool/wasmer_api_template.dart.t b/pkg/wasm/tool/wasmer_api_template.dart.t
deleted file mode 100644
index bae678e..0000000
--- a/pkg/wasm/tool/wasmer_api_template.dart.t
+++ /dev/null
@@ -1,11 +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.
-
-/* <GEN_DOC> */
-
-// ignore_for_file: require_trailing_commas
-
-part of 'wasmer_api.dart';
-
-/* <WASMER_API> */
diff --git a/runtime/bin/file_system_watcher_android.cc b/runtime/bin/file_system_watcher_android.cc
index 67edb4a..0ff4c42 100644
--- a/runtime/bin/file_system_watcher_android.cc
+++ b/runtime/bin/file_system_watcher_android.cc
@@ -108,7 +108,13 @@
   uint8_t buffer[kBufferSize];
   intptr_t bytes = TEMP_FAILURE_RETRY(read(id, buffer, kBufferSize));
   if (bytes < 0) {
-    return DartUtils::NewDartOSError();
+    ASSERT(EAGAIN == EWOULDBLOCK);
+    if ((bytes == -1) && (errno == EWOULDBLOCK)) {
+      // see also SocketBase::Read
+      bytes = 0;
+    } else {
+      return DartUtils::NewDartOSError();
+    }
   }
   const intptr_t kMaxCount = bytes / kEventSize;
   Dart_Handle events = Dart_NewList(kMaxCount);
diff --git a/runtime/vm/compiler/asm_intrinsifier_test.cc b/runtime/vm/compiler/asm_intrinsifier_test.cc
index 6fbc49d..e5678ee 100644
--- a/runtime/vm/compiler/asm_intrinsifier_test.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_test.cc
@@ -57,8 +57,14 @@
             DartEntry::InvokeFunction(function, args, args_descriptor_array));
   EXPECT_EQ(smi42.ptr(), Smi::New(GetHash(I, obj.ptr())));
 
+  // We test setting the maximum value our core libraries would use when
+  // installing an identity hash code (see
+  // sdk/lib/_internal/vm/lib/object_patch.dart:Object._objectHashCode)
+  //
+  // This value is representable as a positive Smi on all architectures (even
+  // compressed pointers).
+  const auto& smiMax = Smi::Handle(Smi::New(0x40000000 - 1));
   const auto& obj2 = Object::Handle(Instance::New(object_class));
-  const auto& smiMax = Smi::Handle(Smi::New(0xffffffff));
 
   // Initialized to 0
   EXPECT_EQ(smi0.ptr(), Smi::New(GetHash(I, obj2.ptr())));
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index a880734..56e8f0e 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -527,7 +527,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
-static constexpr dart::compiler::target::word Script_InstanceSize = 56;
+static constexpr dart::compiler::target::word Script_InstanceSize = 48;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     16;
@@ -1072,7 +1072,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word Script_InstanceSize = 96;
+static constexpr dart::compiler::target::word Script_InstanceSize = 80;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     32;
@@ -1607,7 +1607,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
-static constexpr dart::compiler::target::word Script_InstanceSize = 56;
+static constexpr dart::compiler::target::word Script_InstanceSize = 48;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     16;
@@ -2153,7 +2153,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word Script_InstanceSize = 96;
+static constexpr dart::compiler::target::word Script_InstanceSize = 80;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     32;
@@ -2697,7 +2697,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 80;
-static constexpr dart::compiler::target::word Script_InstanceSize = 64;
+static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     32;
@@ -3242,7 +3242,7 @@
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 80;
-static constexpr dart::compiler::target::word Script_InstanceSize = 64;
+static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
     32;
@@ -7062,7 +7062,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 20;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 48;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 40;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 16;
@@ -7669,7 +7669,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 32;
@@ -8280,7 +8280,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 32;
@@ -10093,7 +10093,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 48;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 40;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 16;
@@ -10693,7 +10693,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 32;
@@ -11297,7 +11297,7 @@
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
-static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
+static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
 static constexpr dart::compiler::target::word
     AOT_SingleTargetCache_InstanceSize = 32;
diff --git a/runtime/vm/native_entry.h b/runtime/vm/native_entry.h
index 2be609e..460d382 100644
--- a/runtime/vm/native_entry.h
+++ b/runtime/vm/native_entry.h
@@ -37,13 +37,11 @@
                                              Zone* zone,
                                              NativeArguments* arguments);
 
-#define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name
-
 #define DEFINE_NATIVE_ENTRY(name, type_argument_count, argument_count)         \
   static ObjectPtr DN_Helper##name(Isolate* isolate, Thread* thread,           \
                                    Zone* zone, NativeArguments* arguments);    \
-  ObjectPtr NATIVE_ENTRY_FUNCTION(name)(Thread * thread, Zone * zone,          \
-                                        NativeArguments * arguments) {         \
+  ObjectPtr BootstrapNatives::DN_##name(Thread* thread, Zone* zone,            \
+                                        NativeArguments* arguments) {          \
     TRACE_NATIVE_CALL("%s", "" #name);                                         \
     ASSERT(arguments->NativeArgCount() == argument_count);                     \
     /* Note: a longer type arguments vector may be passed */                   \
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 571b390..cf4a20d 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -11603,10 +11603,6 @@
 }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-void Script::set_compile_time_constants(const Array& value) const {
-  untag()->set_compile_time_constants(value.ptr());
-}
-
 void Script::set_kernel_program_info(const KernelProgramInfo& info) const {
   untag()->set_kernel_program_info(info.ptr());
 }
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 065e42d..fe21539 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -4464,11 +4464,6 @@
   // The load time in milliseconds since epoch.
   int64_t load_timestamp() const { return untag()->load_timestamp_; }
 
-  ArrayPtr compile_time_constants() const {
-    return untag()->compile_time_constants();
-  }
-  void set_compile_time_constants(const Array& value) const;
-
   KernelProgramInfoPtr kernel_program_info() const {
     return untag()->kernel_program_info();
   }
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index da4c33a..9dafa28 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -1567,7 +1567,6 @@
   COMPRESSED_POINTER_FIELD(StringPtr, url)
   VISIT_FROM(url)
   COMPRESSED_POINTER_FIELD(StringPtr, resolved_url)
-  COMPRESSED_POINTER_FIELD(ArrayPtr, compile_time_constants)
   COMPRESSED_POINTER_FIELD(TypedDataPtr, line_starts)
 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
   COMPRESSED_POINTER_FIELD(ExternalTypedDataPtr, constant_coverage)
@@ -1597,6 +1596,14 @@
     return NULL;
   }
 
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
+  int64_t load_timestamp_;
+  int32_t kernel_script_index_;
+#else
+  int32_t kernel_script_index_;
+  int64_t load_timestamp_;
+#endif
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
   int32_t flags_and_max_position_;
 
@@ -1614,14 +1621,6 @@
 
  private:
 #endif
-
-#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
-  int64_t load_timestamp_;
-  int32_t kernel_script_index_;
-#else
-  int32_t kernel_script_index_;
-  int64_t load_timestamp_;
-#endif
 };
 
 class UntaggedLibrary : public UntaggedObject {
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 629d62b..1b09c40 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -43,7 +43,6 @@
   F(Field, host_offset_or_field_id_)                                           \
   F(Script, url_)                                                              \
   F(Script, resolved_url_)                                                     \
-  F(Script, compile_time_constants_)                                           \
   F(Script, line_starts_)                                                      \
   F(Script, debug_positions_)                                                  \
   F(Script, kernel_program_info_)                                              \
diff --git a/sdk/lib/_internal/vm/bin/file_patch.dart b/sdk/lib/_internal/vm/bin/file_patch.dart
index 43fb061..ec4337c 100644
--- a/sdk/lib/_internal/vm/bin/file_patch.dart
+++ b/sdk/lib/_internal/vm/bin/file_patch.dart
@@ -112,7 +112,7 @@
   @patch
   static Stream<FileSystemEvent> _watch(
       String path, int events, bool recursive) {
-    if (Platform.isLinux) {
+    if (Platform.isLinux || Platform.isAndroid) {
       return new _InotifyFileSystemWatcher(path, events, recursive)._stream;
     }
     if (Platform.isWindows) {
diff --git a/tests/web/deferred/empty_holders/empty_holders_test.dart b/tests/web/deferred/empty_holders/empty_holders_test.dart
new file mode 100644
index 0000000..b8efe4de
--- /dev/null
+++ b/tests/web/deferred/empty_holders/empty_holders_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2021, 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 "lib1.dart" deferred as lib1;
+import "lib2.dart" deferred as lib2;
+import "package:expect/expect.dart";
+
+// Compiling lib_shared will result in a single part file which only uses
+// the static state holder.
+void main() {
+  lib1.loadLibrary().then((_) {
+    lib1.update();
+    Expect.equals(lib1.value(), 'lib1');
+  });
+  lib2.loadLibrary().then((_) {
+    lib2.update();
+    Expect.equals(lib2.value(), 'lib2');
+  });
+}
diff --git a/tests/web/deferred/empty_holders/lib1.dart b/tests/web/deferred/empty_holders/lib1.dart
new file mode 100644
index 0000000..ff8c078
--- /dev/null
+++ b/tests/web/deferred/empty_holders/lib1.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2021, 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 'lib_shared.dart';
+
+void update() {
+  staticString = 'lib1';
+}
+
+String? value() => staticString;
diff --git a/tests/web/deferred/empty_holders/lib2.dart b/tests/web/deferred/empty_holders/lib2.dart
new file mode 100644
index 0000000..8a3c8c1
--- /dev/null
+++ b/tests/web/deferred/empty_holders/lib2.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2021, 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 'lib_shared.dart';
+
+void update() {
+  staticString = 'lib2';
+}
+
+String? value() => staticString;
diff --git a/tests/web/deferred/empty_holders/lib_shared.dart b/tests/web/deferred/empty_holders/lib_shared.dart
new file mode 100644
index 0000000..057837f
--- /dev/null
+++ b/tests/web/deferred/empty_holders/lib_shared.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2021, 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.
+
+String? staticString;
diff --git a/tools/VERSION b/tools/VERSION
index 6c40680..8748a0a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 14
 PATCH 0
-PRERELEASE 186
+PRERELEASE 187
 PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 0744088..1d078c0 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -3357,14 +3357,6 @@
           ]
         },
         {
-          "name": "analyze pkg/wasm",
-          "script": "out/ReleaseX64/dart-sdk/bin/dart",
-          "arguments": [
-            "analyze",
-            "pkg/wasm"
-          ]
-        },
-        {
           "name": "analyze pkg/dds",
           "script": "out/ReleaseX64/dart-sdk/bin/dart",
           "arguments": [