Version 2.15.0-6.0.dev

Merge commit 'e8e0a39464012a05fbfbde707c36255a7a99c1be' into 'dev'
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 20372bb..987f401 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -4009,7 +4009,7 @@
       Object result = qualifiedLookup(send.token);
       if (send is SendAccessGenerator) {
         result = _helper.finishSend(
-            result, send.typeArguments, send.arguments, fileOffset,
+            result, send.typeArguments, send.arguments, send.fileOffset,
             isTypeArgumentsInForest: send.isTypeArgumentsInForest);
       }
       if (isNullAware) {
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart b/pkg/front_end/testcases/general/unresolved_prefix_access.dart
new file mode 100644
index 0000000..6eb26e9
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart
@@ -0,0 +1,12 @@
+// 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 'unresolved_prefix_access.dart' as prefix;
+
+test() {
+  prefix.unresolved();
+  prefix?.test();
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline.expect b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline.expect
new file mode 100644
index 0000000..5078146
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+import 'unresolved_prefix_access.dart' as prefix;
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4ef7465a
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+import 'unresolved_prefix_access.dart' as prefix;
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.expect b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.expect
new file mode 100644
index 0000000..a7f4e10
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
+//   prefix.unresolved();
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
+// Try replacing '?.' with '.'
+//   prefix?.test();
+//   ^^^^^^
+//
+import self as self;
+
+import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
+
+static method test() → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
+  prefix.unresolved();
+         ^^^^^^^^^^";
+  invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
+Try replacing '?.' with '.'
+  prefix?.test();
+  ^^^^^^" in self::test();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.outline.expect b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.outline.expect
new file mode 100644
index 0000000..6beeea3
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.outline.expect
@@ -0,0 +1,9 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
+
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.transformed.expect b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.transformed.expect
new file mode 100644
index 0000000..a7f4e10
--- /dev/null
+++ b/pkg/front_end/testcases/general/unresolved_prefix_access.dart.weak.transformed.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
+//   prefix.unresolved();
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
+// Try replacing '?.' with '.'
+//   prefix?.test();
+//   ^^^^^^
+//
+import self as self;
+
+import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
+
+static method test() → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
+  prefix.unresolved();
+         ^^^^^^^^^^";
+  invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
+Try replacing '?.' with '.'
+  prefix?.test();
+  ^^^^^^" in self::test();
+}
+static method main() → dynamic {}
diff --git a/runtime/bin/security_context.cc b/runtime/bin/security_context.cc
index 4ea0f10..d2cd927 100644
--- a/runtime/bin/security_context.cc
+++ b/runtime/bin/security_context.cc
@@ -122,7 +122,11 @@
 
 static intptr_t EstimateX509Size(X509* certificate) {
   intptr_t length = i2d_X509(certificate, NULL);
-  return length > 0 ? length : 0;
+  length = length > 0 ? length : 0;
+  // An X509 is a tree of structures, which are either opaque or will be opaque
+  // in the future. Estimate the overhead to 512 bytes by rounding up
+  // sizeof(X509) + sizeof(X509_CINF).
+  return length + 512;
 }
 
 // Returns the handle for a Dart object wrapping the X509 certificate object.
@@ -154,7 +158,7 @@
     return status;
   }
   const intptr_t approximate_size_of_certificate =
-      sizeof(*certificate) + EstimateX509Size(certificate);
+      EstimateX509Size(certificate);
   ASSERT(approximate_size_of_certificate > 0);
   Dart_NewFinalizableHandle(result, reinterpret_cast<void*>(certificate),
                             approximate_size_of_certificate,
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index bdde81c..944673b 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -5290,6 +5290,11 @@
 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   XmmRegister value = locs()->in(0).fpu_reg();
   XmmRegister result = locs()->out(0).fpu_reg();
+  if (value != result) {
+    // Clear full register to avoid false dependency due to
+    // a partial access to XMM register in roundsd instruction.
+    __ xorps(result, result);
+  }
   switch (recognized_kind()) {
     case MethodRecognizer::kDoubleTruncate:
       __ roundsd(result, value, compiler::Assembler::kRoundToZero);
diff --git a/runtime/vm/cpu_x64.h b/runtime/vm/cpu_x64.h
index 6e6cf83..d0d1a14 100644
--- a/runtime/vm/cpu_x64.h
+++ b/runtime/vm/cpu_x64.h
@@ -61,7 +61,9 @@
   static bool sse4_1_supported() { return HostCPUFeatures::sse4_1_supported(); }
   static bool popcnt_supported() { return HostCPUFeatures::popcnt_supported(); }
   static bool abm_supported() { return HostCPUFeatures::abm_supported(); }
-  static bool double_truncate_round_supported() { return false; }
+  static bool double_truncate_round_supported() {
+    return HostCPUFeatures::sse4_1_supported();
+  }
 };
 
 }  // namespace dart
diff --git a/tests/language/covariant/type_parameter_test.dart b/tests/language/covariant/type_parameter_test.dart
index 7bff58b..4bcc97e 100644
--- a/tests/language/covariant/type_parameter_test.dart
+++ b/tests/language/covariant/type_parameter_test.dart
@@ -23,16 +23,18 @@
 main() {
   // Dynamic method calls should always have their type arguments checked.
   dynamic d = new C();
-  Expect.throwsTypeError(() => d.f1<Object>()); //# 01: ok
+  Expect.throwsTypeError(() => d.f1<Object>());
 
-  // Closure calls should have any type arguments marked "genericCovariantImpl"
-  // checked.
+  // Closurization is subject to a caller-side check. The naive static type of
+  // `b.f2` is `void Function<U extends Object>()`, but the run-time type is
+  // `void Function<U extends A>()`, and that is not a subtype of the former.
   B<Object> b = new C();
-  void Function<U extends Object>() f = b.f2;
-  Expect.throwsTypeError(() => f<Object>()); //# 02: ok
+  Expect.throws(() => b.f2);
 
   // Interface calls should have any type arguments marked
   // "genericCovariantImpl" checked provided that the corresponding type
   // argument on the interface target is marked "genericCovariantInterface".
-  Expect.throwsTypeError(() => b.f2<Object>()); //# 03: ok
+  B<A> b2 = new C();
+  Function g = b2.f2;
+  Expect.throwsTypeError(() => g<Object>());
 }
diff --git a/tests/language/deferred/load_library_wrong_args_test.dart b/tests/language/deferred/load_library_wrong_args_test.dart
index 3903e19..78914d7 100644
--- a/tests/language/deferred/load_library_wrong_args_test.dart
+++ b/tests/language/deferred/load_library_wrong_args_test.dart
@@ -3,7 +3,7 @@
 void main() {
   // Loadlibrary should be called without arguments.
   lib.loadLibrary(10);
-//^
+//    ^
 // [cfe] 'loadLibrary' takes no arguments.
 //                ^^
 // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS
diff --git a/tests/language/null_aware/assignment_test.dart b/tests/language/null_aware/assignment_test.dart
index 02c3506..59397b3 100644
--- a/tests/language/null_aware/assignment_test.dart
+++ b/tests/language/null_aware/assignment_test.dart
@@ -205,13 +205,13 @@
     bname?.v += 2;
 //  ^
 // [cfe] Operand of null-aware operation '?.' has type 'B' which excludes null.
-    //   ^^
-    // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
-    //     ^
-    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
-    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
-    // [cfe] The getter 'v' isn't defined for the class 'B'.
-    // [cfe] The setter 'v' isn't defined for the class 'B'.
+//       ^^
+// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
+// [cfe] The getter 'v' isn't defined for the class 'B'.
+// [cfe] The setter 'v' isn't defined for the class 'B'.
   }
   {
     D d = new D(new E());
@@ -250,6 +250,7 @@
     // [cfe] The class 'D' cannot be null.
     //                        ^^^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    //                          ^
     // [cfe] A value of type 'C?' can't be assigned to a variable of type 'int'.
   }
   {
diff --git a/tests/language/private/access_test.dart b/tests/language/private/access_test.dart
index 6e10558..29c02fd 100644
--- a/tests/language/private/access_test.dart
+++ b/tests/language/private/access_test.dart
@@ -13,19 +13,17 @@
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: '_function'.
   private._function();
-//^
-// [cfe] Method not found: '_function'.
 //        ^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
+// [cfe] Method not found: '_function'.
   new _Class();
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
-//^
-// [cfe] Method not found: '_Class'.
 //        ^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
+// [cfe] Method not found: '_Class'.
   new Class._constructor();
   //        ^^^^^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
diff --git a/tests/language_2/deferred/load_library_wrong_args_test.dart b/tests/language_2/deferred/load_library_wrong_args_test.dart
index d85bde5..0565e59 100644
--- a/tests/language_2/deferred/load_library_wrong_args_test.dart
+++ b/tests/language_2/deferred/load_library_wrong_args_test.dart
@@ -5,7 +5,7 @@
 void main() {
   // Loadlibrary should be called without arguments.
   lib.loadLibrary(10);
-//^
+//    ^
 // [cfe] 'loadLibrary' takes no arguments.
 //                ^^
 // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS
diff --git a/tests/language_2/null_aware/assignment_test.dart b/tests/language_2/null_aware/assignment_test.dart
index ef7693d..ac9dbed 100644
--- a/tests/language_2/null_aware/assignment_test.dart
+++ b/tests/language_2/null_aware/assignment_test.dart
@@ -60,7 +60,6 @@
   { D d = new D(new E()); E e = new G(); F f = (d?.v = e); }
   //                                            ^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
-  //                                            ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); }
   { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); }
@@ -108,9 +107,8 @@
   { B b = new C(1); b?.v += 2; }
   //                   ^
   // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
-  // [cfe] The getter 'v' isn't defined for the class 'B'.
-  //                   ^
   // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
+  // [cfe] The getter 'v' isn't defined for the class 'B'.
   // [cfe] The setter 'v' isn't defined for the class 'B'.
   { D d = new D(new E()); F f = (d?.v += nullC()); }
   //                                     ^^^^^^^
@@ -119,7 +117,6 @@
   { D d = new D(new E()); H h = (d?.v += 1); }
   //                             ^^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
-  //                             ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { D.staticE = new E(); F f = (D?.staticE += nullC()); }
   //                                          ^^^^^^^
@@ -128,6 +125,7 @@
   { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); }
   //                                                  ^^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  //                                                    ^
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'.
   { D.staticE = new E(); H h = (D?.staticE += 1); }
   //                            ^^^^^^^^^^^^^^^
diff --git a/tests/language_2/private/access_test.dart b/tests/language_2/private/access_test.dart
index eae947b..42912ed 100644
--- a/tests/language_2/private/access_test.dart
+++ b/tests/language_2/private/access_test.dart
@@ -15,19 +15,17 @@
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: '_function'.
   private._function();
-//^
-// [cfe] Method not found: '_function'.
 //        ^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
+// [cfe] Method not found: '_function'.
   new _Class();
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
-//^
-// [cfe] Method not found: '_Class'.
 //        ^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
+// [cfe] Method not found: '_Class'.
   new Class._constructor();
   //        ^^^^^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
diff --git a/tools/VERSION b/tools/VERSION
index 0bd35b8..afca479 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 15
 PATCH 0
-PRERELEASE 5
+PRERELEASE 6
 PRERELEASE_PATCH 0
\ No newline at end of file