Version 2.13.4

* Cherry-pick 4c1a153c090e6c99a30fdfa0f2e0dbb34f15df7d to stable
* Cherry-pick refs/changes/93/203293/2 to stable
* Cherry-pick af162817125f04a3a7b0a02b326550f56234b94d to stable
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49083063..1e783fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 2.13.4 - 2021-06-28
+
+This is a patch release that fixes:
+
+* a Dart VM compiler crash (issue [flutter/flutter#84212][]).
+* a DDC compiler crash (issue [flutter/flutter#82838][]).
+
+[flutter/flutter#84212]: https://github.com/flutter/flutter/issues/84212
+[flutter/flutter#82838]: https://github.com/flutter/flutter/issues/82838
+
 ## 2.13.3 - 2021-06-10
 
 This is a patch release that fixes:
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 84bfd17..b003de4 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -2760,6 +2760,21 @@
       return _emitFutureOrType(
           futureOr.withDeclaredNullability(Nullability.nonNullable));
     }
+    // The following is not part of the normalization spec but this is a
+    // convenient place to perform this change of nullability consistently. This
+    // only applies at compile-time and is not needed in the runtime version of
+    // the FutureOr normalization.
+    // FutureOr<T%>% --> FutureOr<T%>
+    //
+    // If the type argument has undetermined nullability the CFE propagates
+    // it to the FutureOr type as well. In this case we can represent the
+    // FutureOr type without any nullability wrappers and rely on the runtime to
+    // handle the nullability of the instantiated type appropriately.
+    if (futureOr.nullability == Nullability.undetermined &&
+        typeArgument.nullability == Nullability.undetermined) {
+      return _emitFutureOrType(
+          futureOr.withDeclaredNullability(Nullability.nonNullable));
+    }
     return _emitFutureOrType(futureOr);
   }
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 097bde3..cdbd6c1 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -3422,7 +3422,11 @@
       DartType superBoundedAttempt,
       DartType superBoundedAttemptInverted}) {
     List<LocatedMessage> context;
-    if (typeParameter != null && typeParameter.fileOffset != -1) {
+    // Skip reporting location for function-type type parameters as it's a
+    // limitation of Kernel.
+    if (typeParameter != null &&
+        typeParameter.fileOffset != -1 &&
+        typeParameter.location != null) {
       // It looks like when parameters come from patch files, they don't
       // have a reportable location.
       (context ??= <LocatedMessage>[]).add(
diff --git a/tools/VERSION b/tools/VERSION
index 5bfdc48..7ccfa87 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -26,6 +26,6 @@
 CHANNEL stable
 MAJOR 2
 MINOR 13
-PATCH 3
+PATCH 4
 PRERELEASE 0
 PRERELEASE_PATCH 0
\ No newline at end of file