Version 2.14.0-127.0.dev

Merge commit '99679b51d894c4c43da7e39b54688e96f65f86e2' into 'dev'
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
index 60ea42b..58aa856 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -574,7 +574,7 @@
       List<Statement> body) {
     Expression value = entry.expression.accept<TreeNode>(this);
 
-    final DartType entryType = new InterfaceType(_mapEntryClass,
+    final InterfaceType entryType = new InterfaceType(_mapEntryClass,
         _currentLibrary.nonNullable, <DartType>[keyType, valueType]);
     final bool typeMatches = entry.entryType != null &&
         _typeEnvironment.isSubtypeOf(
@@ -603,15 +603,15 @@
       VariableDeclaration keyVar = _createVariable(
           _createImplicitAs(
               entry.expression.fileOffset,
-              _createGetKey(
-                  entry.expression.fileOffset, _createVariableGet(variable)),
+              _createGetKey(entry.expression.fileOffset,
+                  _createVariableGet(variable), entryType),
               keyType),
           keyType);
       VariableDeclaration valueVar = _createVariable(
           _createImplicitAs(
               entry.expression.fileOffset,
-              _createGetValue(
-                  entry.expression.fileOffset, _createVariableGet(variable)),
+              _createGetValue(entry.expression.fileOffset,
+                  _createVariableGet(variable), entryType),
               valueType),
           valueType);
       loopBody = _createBlock(<Statement>[
@@ -630,13 +630,13 @@
           entry.expression.fileOffset,
           _createVariableGet(result),
           receiverType,
-          _createGetKey(
-              entry.expression.fileOffset, _createVariableGet(variable)),
-          _createGetValue(
-              entry.expression.fileOffset, _createVariableGet(variable))));
+          _createGetKey(entry.expression.fileOffset,
+              _createVariableGet(variable), entryType),
+          _createGetValue(entry.expression.fileOffset,
+              _createVariableGet(variable), entryType)));
     }
     Statement statement = _createForInStatement(entry.fileOffset, variable,
-        _createGetEntries(entry.fileOffset, value), loopBody);
+        _createGetEntries(entry.fileOffset, value, receiverType), loopBody);
 
     if (entry.isNullAware) {
       statement = _createIf(
@@ -1003,25 +1003,55 @@
     return new IfStatement(condition, then, otherwise)..fileOffset = fileOffset;
   }
 
-  PropertyGet _createGetKey(int fileOffset, Expression receiver) {
+  Expression _createGetKey(
+      int fileOffset, Expression receiver, InterfaceType entryType) {
     assert(fileOffset != null);
     assert(fileOffset != TreeNode.noOffset);
-    return new PropertyGet(receiver, new Name('key'), _mapEntryKey)
-      ..fileOffset = fileOffset;
+    if (useNewMethodInvocationEncoding) {
+      DartType resultType = Substitution.fromInterfaceType(entryType)
+          .substituteType(_mapEntryKey.type);
+      return new InstanceGet(
+          InstanceAccessKind.Instance, receiver, new Name('key'),
+          interfaceTarget: _mapEntryKey, resultType: resultType)
+        ..fileOffset = fileOffset;
+    } else {
+      return new PropertyGet(receiver, new Name('key'), _mapEntryKey)
+        ..fileOffset = fileOffset;
+    }
   }
 
-  PropertyGet _createGetValue(int fileOffset, Expression receiver) {
+  Expression _createGetValue(
+      int fileOffset, Expression receiver, InterfaceType entryType) {
     assert(fileOffset != null);
     assert(fileOffset != TreeNode.noOffset);
-    return new PropertyGet(receiver, new Name('value'), _mapEntryValue)
-      ..fileOffset = fileOffset;
+    if (useNewMethodInvocationEncoding) {
+      DartType resultType = Substitution.fromInterfaceType(entryType)
+          .substituteType(_mapEntryValue.type);
+      return new InstanceGet(
+          InstanceAccessKind.Instance, receiver, new Name('value'),
+          interfaceTarget: _mapEntryValue, resultType: resultType)
+        ..fileOffset = fileOffset;
+    } else {
+      return new PropertyGet(receiver, new Name('value'), _mapEntryValue)
+        ..fileOffset = fileOffset;
+    }
   }
 
-  PropertyGet _createGetEntries(int fileOffset, Expression receiver) {
+  Expression _createGetEntries(
+      int fileOffset, Expression receiver, InterfaceType mapType) {
     assert(fileOffset != null);
     assert(fileOffset != TreeNode.noOffset);
-    return new PropertyGet(receiver, new Name('entries'), _mapEntries)
-      ..fileOffset = fileOffset;
+    if (useNewMethodInvocationEncoding) {
+      DartType resultType = Substitution.fromInterfaceType(mapType)
+          .substituteType(_mapEntries.getterType);
+      return new InstanceGet(
+          InstanceAccessKind.Instance, receiver, new Name('entries'),
+          interfaceTarget: _mapEntries, resultType: resultType)
+        ..fileOffset = fileOffset;
+    } else {
+      return new PropertyGet(receiver, new Name('entries'), _mapEntries)
+        ..fileOffset = fileOffset;
+    }
   }
 
   ForStatement _createForStatement(
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 832ea0f..bb2f32d 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -2,8 +2,9 @@
 # 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.
 
+LanguageFeatures/Constructor-tear-offs: Skip # not implemented
 LibTest/io/RawDatagramSocket/*: Skip # https://github.com/dart-lang/co19/issues/195
 
 [ $compiler == dart2analyzer ]
-co19/LanguageFeatures/nnbd/static/strong/*: SkipByDesign # Strong mode tests should not be run with analyzer
-co19/LanguageFeatures/nnbd/static/weak/*: SkipByDesign # Weak mode tests should not be run with analyzer
+LanguageFeatures/nnbd/static/strong/*: SkipByDesign # Strong mode tests should not be run with analyzer
+LanguageFeatures/nnbd/static/weak/*: SkipByDesign # Weak mode tests should not be run with analyzer
diff --git a/tests/language/library/a.dart b/tests/language/library/a.dart
deleted file mode 100644
index 95f855e..0000000
--- a/tests/language/library/a.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryA.dart;
-
-import "c.dart";
-
-var fooA = fooC;
diff --git a/tests/language/library/b.dart b/tests/language/library/b.dart
deleted file mode 100644
index 2a36a64..0000000
--- a/tests/language/library/b.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryB.dart;
-
-import "c.dart";
-
-var fooB = fooC;
diff --git a/tests/language/library/c.dart b/tests/language/library/c.dart
deleted file mode 100644
index fcf3555..0000000
--- a/tests/language/library/c.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryC.dart;
-
-var fooC = 10;
diff --git a/tests/language/library/d.dart b/tests/language/library/d.dart
deleted file mode 100644
index 054c033..0000000
--- a/tests/language/library/d.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryD.dart;
-
-import "f.dart";
-
-var fooD = fooC;
diff --git a/tests/language/library/e.dart b/tests/language/library/e.dart
deleted file mode 100644
index 0332e42..0000000
--- a/tests/language/library/e.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryE.dart;
-
-import "c.dart";
-import "f.dart";
-
-var fooE = 0;
diff --git a/tests/language/library/f.dart b/tests/language/library/f.dart
deleted file mode 100644
index f73e3cb..0000000
--- a/tests/language/library/f.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library libraryF.dart;
-
-var fooC = 10;
diff --git a/tests/language/library/library3.dart b/tests/language/library/library3.dart
deleted file mode 100644
index 625f568..0000000
--- a/tests/language/library/library3.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library library3.dart;
-
-import "../library2.dart"; // defines "foo" and "foo1".
diff --git a/tests/language/library/library4.dart b/tests/language/library/library4.dart
deleted file mode 100644
index 25af011..0000000
--- a/tests/language/library/library4.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2011, 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.
-//
-
-library library4.dart;
-
-import "../library2.dart"; // defines "foo" and "foo1".
-
-var foo;
-var foo1 = 0;
diff --git a/tests/language/script/source.dart b/tests/language/script/source.dart
deleted file mode 100644
index 44f0d34..0000000
--- a/tests/language/script/source.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2011, 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.
-
-// A perfectly legal dart source file for use with script and library tests.
-
-const int script_source = 1;
diff --git a/tests/language/top_level/file3.dart b/tests/language/top_level/file3.dart
deleted file mode 100644
index a42c558..0000000
--- a/tests/language/top_level/file3.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2011, 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.
-
-main() {
-  Expect.equals(42, prefix.topLevelVar);
-}
diff --git a/tests/language_2/library/a.dart b/tests/language_2/library/a.dart
deleted file mode 100644
index 1b7fc61..0000000
--- a/tests/language_2/library/a.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryA.dart;
-
-import "c.dart";
-
-var fooA = fooC;
diff --git a/tests/language_2/library/b.dart b/tests/language_2/library/b.dart
deleted file mode 100644
index dfc7b36..0000000
--- a/tests/language_2/library/b.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryB.dart;
-
-import "c.dart";
-
-var fooB = fooC;
diff --git a/tests/language_2/library/c.dart b/tests/language_2/library/c.dart
deleted file mode 100644
index cc212ff..0000000
--- a/tests/language_2/library/c.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryC.dart;
-
-var fooC = 10;
diff --git a/tests/language_2/library/d.dart b/tests/language_2/library/d.dart
deleted file mode 100644
index 25ec2a9..0000000
--- a/tests/language_2/library/d.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryD.dart;
-
-import "f.dart";
-
-var fooD = fooC;
diff --git a/tests/language_2/library/e.dart b/tests/language_2/library/e.dart
deleted file mode 100644
index c00631e..0000000
--- a/tests/language_2/library/e.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryE.dart;
-
-import "c.dart";
-import "f.dart";
-
-var fooE = 0;
diff --git a/tests/language_2/library/f.dart b/tests/language_2/library/f.dart
deleted file mode 100644
index 085bea4..0000000
--- a/tests/language_2/library/f.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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
-
-library libraryF.dart;
-
-var fooC = 10;
diff --git a/tests/language_2/library/library3.dart b/tests/language_2/library/library3.dart
deleted file mode 100644
index 96a979f..0000000
--- a/tests/language_2/library/library3.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2011, 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
-
-library library3.dart;
-
-import "../library2.dart"; // defines "foo" and "foo1".
diff --git a/tests/language_2/library/library4.dart b/tests/language_2/library/library4.dart
deleted file mode 100644
index f4d701e..0000000
--- a/tests/language_2/library/library4.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2011, 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
-
-library library4.dart;
-
-import "../library2.dart"; // defines "foo" and "foo1".
-
-var foo;
-var foo1 = 0;
diff --git a/tests/language_2/script/source.dart b/tests/language_2/script/source.dart
deleted file mode 100644
index b9861c7..0000000
--- a/tests/language_2/script/source.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2011, 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
-
-// A perfectly legal dart source file for use with script and library tests.
-
-const int script_source = 1;
diff --git a/tests/language_2/top_level/file3.dart b/tests/language_2/top_level/file3.dart
deleted file mode 100644
index d9ffab6..0000000
--- a/tests/language_2/top_level/file3.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2011, 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
-
-main() {
-  Expect.equals(42, prefix.topLevelVar);
-}
diff --git a/tools/VERSION b/tools/VERSION
index b2d68f0..5ffc31b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 14
 PATCH 0
-PRERELEASE 126
+PRERELEASE 127
 PRERELEASE_PATCH 0
\ No newline at end of file