Version 2.10.0-46.0.dev

Merge commit 'd26469f715c2b0c1a7c6d8254d1f51401db1083f' into 'dev'
diff --git a/DEPS b/DEPS
index 1c1ebdf..39db623 100644
--- a/DEPS
+++ b/DEPS
@@ -97,7 +97,7 @@
   "dart_style_tag": "1.3.6",  # Please see the note above before updating.
 
   "chromedriver_tag": "83.0.4103.39",
-  "dartdoc_rev" : "4410c7739eb6be3f4ae12571145d1a3633b54724",
+  "dartdoc_rev" : "291ebc50072746bc59ccab59115a298915218428",
   "ffi_rev": "454ab0f9ea6bd06942a983238d8a6818b1357edb",
   "fixnum_rev": "300c3f025e94a72b7b6770e15f76a4de15f77668",
   "glob_rev": "e9f4e6b7ae8abe5071461cf8f47191bb19cf7ef6",
@@ -153,7 +153,7 @@
   "test_process_tag": "1.0.3",
   "term_glyph_rev": "6a0f9b6fb645ba75e7a00a4e20072678327a0347",
   "test_reflective_loader_tag": "0.1.9",
-  "test_rev": "c6b3fe63eda87da1687580071cad1eefd575f851",
+  "test_rev": "e37a93bbeae23b215972d1659ac865d71287ff6a",
   "tflite_native_rev": "3c777c40608a2a9f1427bfe0028ab48e7116b4c1",
   "typed_data_tag": "f94fc57b8e8c0e4fe4ff6cfd8290b94af52d3719",
   "usage_tag": "3.4.0",
diff --git a/benchmarks/Utf8Encode/dart/Utf8Encode.dart b/benchmarks/Utf8Encode/dart/Utf8Encode.dart
new file mode 100644
index 0000000..3ce8554
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/Utf8Encode.dart
@@ -0,0 +1,103 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Benchmark for UTF-8 encoding
+
+import 'dart:convert';
+
+import 'package:benchmark_harness/benchmark_harness.dart';
+
+import 'datext_latin1_10k.dart';
+import 'entext_ascii_10k.dart';
+import 'netext_3_10k.dart';
+import 'rutext_2_10k.dart';
+import 'sktext_10k.dart';
+import 'zhtext_10k.dart';
+
+class Utf8Encode extends BenchmarkBase {
+  final String language;
+  final String originalText;
+  // Size is measured in number of runes rather than number of bytes.
+  // This differs from the Utf8Decode benchmark, but runes are the input
+  // to the encode function which makes them more natural than bytes here.
+  final int size;
+  List<String> benchmarkTextChunks = List.empty(growable: true);
+
+  static String _makeName(String language, int size) {
+    String name = 'Utf8Encode.$language.';
+    name += size >= 1000000
+        ? '${size ~/ 1000000}M'
+        : size >= 1000 ? '${size ~/ 1000}k' : '$size';
+    return name;
+  }
+
+  Utf8Encode(this.language, this.originalText, this.size)
+      : super(_makeName(language, size));
+
+  @override
+  void setup() {
+    final int nRunes = originalText.runes.toList().length;
+    final String repeatedText = originalText * (size / nRunes).ceil();
+    final List<int> runes = repeatedText.runes.toList();
+    final int nChunks = (size < nRunes) ? (nRunes / size).floor() : 1;
+    for (int i = 0; i < nChunks; i++) {
+      final offset = i * size;
+      benchmarkTextChunks.add(String.fromCharCodes(runes.sublist(offset, offset+size)));
+    }
+  }
+
+  @override
+  void run() {
+    for (int i = 0; i < benchmarkTextChunks.length; i++) {
+      final encoded = utf8.encode(benchmarkTextChunks[i]);
+      if (encoded.length < benchmarkTextChunks[i].length)  {
+        throw 'There should be at least as many encoded bytes as runes';
+      }
+    }
+  }
+
+  @override
+  void exercise() {
+    // Only a single run per measurement.
+    run();
+  }
+
+  @override
+  void warmup() {
+    BenchmarkBase.measureFor(run, 1000);
+  }
+
+  @override
+  double measure() {
+    // Report time per input rune.
+    return super.measure() / size / benchmarkTextChunks.length;
+  }
+
+  @override
+  void report() {
+    // Report time in nanoseconds.
+    final double score = measure() * 1000.0;
+    print('$name(RunTime): $score ns.');
+  }
+}
+
+void main(List<String> args) {
+  const texts = {
+    'en': en,
+    'da': da,
+    'sk': sk,
+    'ru': ru,
+    'ne': ne,
+    'zh': zh,
+  };
+  final benchmarks = [
+    for (int size in [10, 10000, 10000000])
+      for (String language in texts.keys)
+        () => Utf8Encode(language, texts[language]!, size)
+  ];
+
+  for (var bm in benchmarks) {
+    bm().report();
+  }
+}
diff --git a/benchmarks/Utf8Encode/dart/datext_latin1_10k.dart b/benchmarks/Utf8Encode/dart/datext_latin1_10k.dart
new file mode 100644
index 0000000..bce6c80
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/datext_latin1_10k.dart
@@ -0,0 +1,62 @@
+// This text is an extract from the Danish Wikipedia article about Donald Duck
+// (Anders And): https://da.wikipedia.org/wiki/Anders_And
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String da = '''
+Anders And
+
+Anders Fauntleroy And er en berømt figur i Disneys tegnefilm og tegneserier. Selv om han ikke er særligt populær i USA, optræder han i mange ugeblade i Europa: I Norge, Tyskland, Sverige, Danmark, Holland, Italien med flere. Hans første optræden var i tegnefilmen "The Wise Little Hen" (Den kloge lille høne) fra 9. juni 1934. Hans karakteristiske stemme blev indtalt af radiokomikeren Clarence Nash, der siden fast lagde stemme til.
+Efter Nash' død i 1985 overtog tegnefilmsdubberen Tony Anselmo. Det var i øvrigt Nash selv, der trænede Anselmo til at lyde som Anders And. I Danmark har tre lagt stemme til Anders And: Bjarne H. Hansen, Dick Kaysø og Peter Zhelder. Dick Kaysø og Peter Zhelder lægger stadigvæk stemme til ham.
+
+Anders And var en bifigur til filmen Den lille kloge Høne, han havde et langt spidst næb og en utrolig kort lunte; der skulle ikke meget til for at udløse et raserianfald hos ham. Klassikerne er fra 1930'erne, hvor Mickey, Fedtmule og Anders er et trekløver, der er film som "Mickeys Campingvogn," "Tårnuret" og "Ensomme Spøgelser." Fred Spencer og Dick Lundy var animatorer. Efterhånden opnåede anden større popularitet, hvad der ikke rigtig huede Disney, der ikke brød sig om den krakilske and. Men Anders blev forfremmet til hovedfigur i en serie film, der begyndte med "Anders And og Strudsen" i 1938. Med den var det "ande-teamet" hos Disney født: instruktøren Jack King og assistenterne Carl Barks (den senere serieskaber), Chuck Couch, Harry Reeves og Jack Hannah. Han var stadigvæk en hidsigprop, men han blev gjort mere nuanceret, og nye figurer blev tilføjet som nevøerne Rip, Rap og Rup, kæresten Andersine And og i en enkelt film Fætter Guf.
+
+Under 2. verdenskrig blev der lavet film om anden i militærtjeneste, som han selvfølgelig gør meget klodset. Mest kendt er "Der Fuehrers Face" fra 1943, hvor anden drømmer, at han er i diktaturstaten Nutziland. Den film blev arkiveret af Disney efter krigen, men er senere vist meget uofficielt. Desuden medvirkede han i to mindre kendte spillefilm "Saludos Amigos" 1943 og "The Three Caballeros" 1945, der gav et lystigt billede af livet i Latinamerika.
+
+Efter krigen blev omgivelserne mere hjemlige, men næppe mere fredfyldte. I 1947 overtog Jack Hannah pladsen som instruktør. Filmene handlede ofte om klammeri med andre, det kunne være en bi, Chip og Chap eller bare ting han ikke kunne få til at makke ret. Anders var her ofte plageånden, hvis egne drillerier kom tilbage som en boomerang.
+
+Fjernsynets fremmarch i 1950'erne satte snart stopper for de korte tegnefilm, og Jack Hannah blev sat til at redigere Disneys tv-shows og kæde de korte tegnefilm sammen i et længere forløb. Her blev Anders gjort mere sympatisk, men det var eksperten i alt, Raptus von And, der gjorde mest for tv-showet. I et andet tv-show Disney Sjov medvirkede Anders i tv-serierne Rip, Rap og Rup på eventyr, Bonkers, og Rap Sjak. I Rip, Rap og Rup på eventyr, var han sjældent med, men fik et nyt tøj. I Rap Sjak var hans matrostøj skiftet ud med en hawaii-skjorte med røde og hvide blomster. I Bonkers var han også med kort tid.
+
+Anders And gik til tegneserien allerede tidligt efter sin debut i 1934, hvor han i avisstriber optrådte med sin makker fra "The Wise Little Hen," Peter Gris. Fra den 10. februar 1935 blev han en del af Mickeys avisstribe som musens kujonagtige og drillesyge ven, men fra 1936 kaprede han hovedrollen i Silly Symphony-striben. Forfatteren Ted Osborne og tegneren Al Taliaferro, der stod bag serieudgaven af The Wise Little Hen, pressede på, og da det blev en succes kunne forfatteren Bob Karp i samarbejde med Taliaferro lave andens egen avisstribe.
+
+Det blev en populær serie. I de allertidligste serier var Anders en hidsig, ondskabsfuld og pueril and med langt spidst næb og hænder, der knap kunne skelnes fra vinger. Senere blev han mere voksen, da han fik ansvaret for sine tre nevøer Rip, Rap og Rup, og kæresten Andersine kom til sammen med Bedstemor And.
+
+Tegneseriefiguren Anders And blev senere udviklet yderligere af Carl Barks. I de tidlige tegnefilm var han for det meste doven og hidsig; men for at gøre hans figur brugbar til en tegneserie besluttede Barks at udvide hans personlighed. Anders' mest gennemgående karaktertræk er hans notoriske uheld, som desuden har den narrative funktion at give adgang til spændende eventyr, uden at serien udvikler sig for meget. På denne måde kan Anders eksempelvis blive involveret i alverdens skattejagter, og da han altid ender med at miste den fundne gevinst, kan alle historierne starte fra samme udgangspunkt. 
+
+For at give Anders en verden at bo i, skabte Barks byen Andeby i den amerikanske stat Calisota (som er en blanding af de to amerikanske stater Californien og Minnesota) med indbyggere som den rige onkel Joakim von And, den heldige Fætter Højben og den dygtige opfinder Georg Gearløs. 
+
+Anders lægger med sit engelske navn Donald Duck i øvrigt navn til donaldismen, fankulturen omkring Disney-tegneserier og -tegnefilm, som den norske forfatter Jon Gisle udviklede med sin bog af samme navn. 
+
+Anders bor i Andeby på Paradisæblevej 111 med sine tre nevøer Rip, Rap og Rup. De er stort set identiske, men de kan i nogle historier identificeres på, hvilken farve kasket de har på. 
+
+Ifølge Disneytegneserieforfatteren Don Rosa var Anders født et eller andet sted omkring 1920  men dette er "ikke" officielt. Ifølge Carl Barks' stamtræ (senere udviklet og genbygget af Don Rosa for den danske udgiver Egmont Serieforlaget) er Anders' forældre Hortensia von And og Rapmus And. Anders har en søster ved navn Della And, men hverken hun eller Anders' forældre optræder i tegnefilmene eller tegneserierne bortset fra særlige steder som eksempelvis i Her er dit liv, Joakim. Ifølge Don Rosa er Anders og Della tvillinger. 
+
+Fra tegnefilmen "Mr. Duck Steps Out" har Anders' kæreste været Andersine And, men han går i stadig fare for at miste hende til den heldige Fætter Højben. I nogle italienske historier er Anders også superhelt under dæknavnet "Stålanden".
+
+Anders' onkel, Joakim von And, er den rigeste and i verden.
+
+Sammen med onkelen og nevøerne Rip, Rap og Rup har Anders And rejst jorden rundt til mange forskellige lande og steder. Blandt disse er landet Langtbortistan, hvis navn blev opfundet af den danske oversætter Sonja Rindom og senere er gledet ind i almindeligt, dansk sprogbrug.
+
+I de tidlige historier af Carl Barks havde Anders en hale, der stak langt bagud. Han havde langt næb og lang hals, og hans matrostrøje havde fire knapper. Hans lange hals passede godt til egenskaben nysgerrighed og det lange næb til hans hidsighed, hvilket var to egenskaber, der prægede ham mest. Disse tidlige historier var også præget af en grov komik i stil med tegnefilmene.
+
+Siden fik han et mere strømlinet udseende og kortere næb (dog ikke så kort som visse tegnere i 1960'erne gjorde det!) og kun to knapper på trøjen, et udseende de øvrige andetegnere også tager til sig. Her blev hans natur også mere sammensat, og han ligner mest af alt en tragisk helt. Komikken kommer mere og mere til at ligge i replikkerne.
+
+Anders And optræder særligt i jumbobøgerne med en hemmelig identitet i form af superhelten Stålanden. Figuren er inspireret af Batman og er skabt af den italienske forfatter Guido Martina i samarbejde med kunstneren Giovan Battista Carpi i 1969 i hans italienske navn Paperinik. Ofte tegnet af Romano Scarpa.
+
+I lighed med inspirationskilden er han maskeret og har et hav af tekniske opfindelser, som han bruger i kamp mod forbryderne og  overvejende!  i kamp for at redde sit andet jeg, Anders And, ud af kniben. Den eneste, som kender hans hemmelige identitet, er opfinderen Georg Gearløs, som har udstyret gamle 313 med moderne udstyr og finurligheder. Det er ikke så tit at Stålanden optræder; næsten kun i Jumbobøger, men har dog også optrådt i Anders And-bladene med en gæstehistorie, hvor Stålanden kæmper mod en tidligere fjende, som nu havde kaldt sig Lord Hvalros.
+
+Efter at Stålanden i starten af 1990'erne ikke var benyttet så meget af historieskriverne, forsvandt han næsten ud af Disney-universet indtil 1996, hvor en ny serie, "Stålanden på nye eventyr", startede med Stålanden i hovedrollen (umiddelbart inspireret af Marvel universet). Denne relancering af Stålanden gav karakteren det ekstra, der skulle til for at få et godt comeback.
+
+I modsætning til størstedelen af Anders And-tegneserier har denne serie en sammenhængende forløb. I serien optræder kun sjældent de andre figurer fra de normale Anders And tegneserier; oftest er det kun en kort birolle eller en reference, men til gengæld er en mængde nye figurer kommet til. 
+
+Serien starter med, at Anders And er ansat som vicevært i Ducklair Tower, et højhus bygget af mangemilliardæren Everett Ducklair, en fremragende videnskabsmand og opfinder, som forlod Andeby og drog til et tibetansk kloster, Dhasam-Bul. Anders finder Globus, en kunstig intelligens skabt af Ducklair, samt Ducklair's arsenal af våben og opfindelser. Dette bliver starten på Anders' liv som Stålanden.
+En mængde temaer var ofte i centrum for historierne, bl.a. tidsrejser og Tidspolitiets kamp med tidspiraterne fra Organisationen, invasion fra rummet af de magtsyge evronianere, Stålandens samarbejde med FBI og meget mere.
+
+Serien fik en fornyelse i 2001, hvilket ændrede markant på historierne. Everett Ducklair vender tilbage, slukker Globus, smider Stålanden ud af Ducklair Tower og genopretter sit gamle imperium. Undervejs bliver Ducklair's to døtre afsløret. De hader begge Everett af grunde, der ikke bliver afsløret til fulde, selvom det bliver antydet, at Everett skilte sig af med deres mor på en eller anden måde.
+Denne fornyelse holdt 18 numre, før serien blev afsluttet, dog uden at historierne fik en slutning.
+
+Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i ''';
diff --git a/benchmarks/Utf8Encode/dart/entext_ascii_10k.dart b/benchmarks/Utf8Encode/dart/entext_ascii_10k.dart
new file mode 100644
index 0000000..82cb721
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/entext_ascii_10k.dart
@@ -0,0 +1,35 @@
+// This text is an extract from the English Wikipedia article about Anarchism:
+// https://en.wikipedia.org/wiki/Anarchism
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String en = '''
+Anarchism
+
+Anarchism is a radical political movement that is highly skeptical towards authority and rejects all forms of unjust hierarchy. It calls for the abolition of the state which it holds to be undesirable, unnecessary, and harmful. Anarchism advocates for the replacement of the state with stateless societies or other forms of free associations.
+
+Anarchism's timeline stretches back to prehistory when people lived in anarchistic societies long before the establishment of formal states, kingdoms or empires. With the rise of organised hierarchical bodies, skepticism towards authority also rose, but it was not until the 19th century a self-conscious political movement was formed. During the latest half of 19th and the first decades of 20th century, the anarchist movement flourished to most parts of the world, and had a significant role in worker's struggles for emancipation. Various branches of anarchism were espoused during those times. Anarchists took part in several revolutions, most notably in the Spanish Civil War, where they were crushed by the fascists forces in 1939, marking the end of the classical era of anarchism. In the latest decades of the 20th century, the anarchist movement nonetheless became relevant and vivid once more. 
+
+Anarchism employ various tactics in order to meet their ideal ends; these can be broadly separated in revolutionary and evolutionary tactics. There is significant overlap between the two legs which are merely descriptive. Revolutionary tactics aim to bring down authority and state, and have taken a violent turn in the past. Evolutionary tactics aim to prefigure what an anarchist society would be like. Anarchism's thought, criticism and praxis has played a part in diverse fields of human society.
+
+The etymological origin of the word "anarchism" is from the ancient Greek word "anarkhia", meaning "without a ruler", composed of the prefix "an-" (i.e. "without") and the word "arkhos" (i.e. "leader" or "ruler"). The suffix -ism denotes the ideological current that favours anarchy. The word "anarchism" appears in English from 1642 as "anarchisme" and the word "anarchy" from 1539. Various factions within the French Revolution labelled their opponents as "anarchists", although few such accused shared many views with later anarchists. Many revolutionaries of the 19th century such as William Godwin (17561836) and Wilhelm Weitling (18081871) would contribute to the anarchist doctrines of the next generation, but they did not use the word "anarchist" or "anarchism" in describing themselves or their beliefs.
+
+The first political philosopher to call himself an "anarchist" () was Pierre-Joseph Proudhon (18091865), marking the formal birth of anarchism in the mid-19th century. Since the 1890s and beginning in France, the term "libertarianism" has often been used as a synonym for anarchism and its use as a synonym is still common outside the United States. On the other hand, some use "libertarianism" to refer to individualistic free-market philosophy only, referring to free-market anarchism as libertarian anarchism.
+
+While opposition to the state is central to anarchist thought, defining anarchism is not an easy task as there is a lot of talk among scholars and anarchists on the matter and various currents perceive anarchism slightly differently. Hence, it might be true to say that anarchism is a cluster of political philosophies opposing authority and hierarchical organization (including the state, capitalism, nationalism and all associated institutions) in the conduct of all human relations in favour of a society based on voluntary association, on freedom and on decentralisation, but this definition has the same shortcomings as the definition based on etymology (which is simply a negation of a ruler), or based on anti-statism (anarchism is much more than that) or even the anti-authoritarian (which is an "a posteriori" conclusion). Nonetheless, major elements of the definition of anarchism include the following:
+
+During the prehistoric era of mankind, an established authority did not exist. It was after the creation of towns and cities that institutions of authority were established and anarchistic ideas espoused as a reaction. Most notable precursors to anarchism in the ancient world were in China and Greece. In China, philosophical anarchism (i.e the discussion on the legitimacy of the state) was delineated by Taoist philosophers Zhuangzi and Lao Tzu. Likewise, anarchic attitudes were articulated by tragedians and philosophers in Greece. Aeschylus and Sophocles used the myth of Antigone to illustrate the conflict between rules set by the state and personal autonomy. Socrates questioned Athenian authorities constantly and insisted to the right of individual freedom of consciousness. Cynics dismissed human law ("nomos") and associated authorities while trying to live according to nature ("physis"). Stoics were supportive of a society based on unofficial and friendly relations among its citizens without the presence of a state.
+
+During the Middle Ages, there was no anarchistic activity except some ascetic religious movements in the Islamic world or in Christian Europe. This kind of tradition later gave birth to religious anarchism. In Persia, Mazdak called for an egalitarian society and the abolition of monarchy, only to be soon executed by the king. In Basra, religious sects preached against the state. In Europe, various sects developed anti-state and libertarian tendencies. Libertarian ideas further emerged during the Renaissance with the spread of reasoning and humanism through Europe. Novelists fictionalised ideal societies that were based not on coercion but voluntarism. The Enlightenment further pushed towards anarchism with the optimism for social progress.
+
+During the French Revolution, the partisan groups of Enrags and saw a turning point in the fermentation of anti-state and federalist sentiments. The first anarchist currents developed throughout the 18th centuryWilliam Godwin espoused philosophical anarchism in England, morally delegitimizing the state, Max Stirner's thinking paved the way to individualism, and Pierre-Joseph Proudhon's theory of mutualism found fertile soil in France. This era of classical anarchism lasted until the end of the Spanish Civil War of 1936 and is considered the golden age of anarchism.
+Drawing from mutualism, Mikhail Bakunin founded collectivist anarchism and entered the International Workingmen's Association, a class worker union later known as the First International that formed in 1864 to unite diverse revolutionary currents. The International became a significant political force, and Karl Marx a leading figure and a member of its General Council. Bakunin's faction, the Jura Federation and Proudhon's followers, the mutualists, opposed Marxist state socialism, advocating political abstentionism and small property holdings. After bitter disputes the Bakuninists were expelled from the International by the Marxists at the 1872 Hague Congress. Bakunin famously predicted that if revolutionaries gained power by Marxist's terms, they would end up the new tyrants of workers. After being expelled, anarchists formed the St. Imier International. Under the influence of Peter Kropotkin, a Russian philosopher and scientist, anarcho-communism overlapped with collectivism. Anarcho-communists, who drew inspiration from the 1871 Paris Commune, advocated for free federation and distribution of goods according to one's needs.
+
+At the turning of the century, anarchism had spread all over the world. In China, small groups of students imported the humanistic pro-science version of anarcho-communism. Tokyo was a hotspot for rebellious youth from countries of the far east, pouring into the Japanese capital to study. In Latin America, So Paulo was a stronghold for anarcho-syndicalism where it became the most prominent left-wing ideology. During this time, a minority of anarchists adopted tactics of revolutionary political violence. This strategy became known as propaganda of the deed. The dismemberment of the French socialist movement into many groups and the execution and exile of many Communards to penal colonies following the suppression of the Paris Commune favoured individualist political expression and acts. Even though many anarchists distanced themselves from these terrorist acts, infamy came upon the movement. Illegalism was another strategy which some anarchists adopted these same years.
+Anarchists enthusiastically participated in the Russian Revolutiondespite concernsin opposition to the Whites. However, they met harsh suppression after the Bolshevik government was stabilized. Several anarchists from Petrograd and Moscow fled to Ukraine, notably leading to the Kronstadt rebellion and Nestor Makhno's struggle in the Free Territory. With the anarchists being crushed in Russia, two new antithetical currents emerged, namely platformism and synthesis anarchism. The former sought to create a coherent group that would push for the revolution while the latter were against anything that would resemble a political party. Seeing the victories of the Bolsheviks in the October Revolution and the resulting Russian Civil War, many workers and activists turned to communist parties which grew at the expense of anarchism and other socialist movements. In France and the United States, members of major syndicalist movements, the General Confederation of Labour and Industrial Workers of the World, left their organisations and joined the Communist International.
+
+In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised ''';
diff --git a/benchmarks/Utf8Encode/dart/netext_3_10k.dart b/benchmarks/Utf8Encode/dart/netext_3_10k.dart
new file mode 100644
index 0000000..8fce550
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/netext_3_10k.dart
@@ -0,0 +1,24 @@
+// This text is an extract from the Nepali Wikipedia article about Nepal
+// (नेपाल): https://ne.wikipedia.org/wiki/नेपाल
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String ne = '''
+नेपाल
+
+नेपाल (आधिकारिक नाम: सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल) दक्षिण एसियाली भूपरिवेष्ठित हिमाली राष्ट्र हो । यसको भौगोलिक अक्षांश २६ डिग्री २२ मिनेटदेखि ३० डिग्री २७ मिनेट उत्तर र ८० डिग्री ४ मिनेटदेखि ८८ डिग्री १२ मिनेट पूर्वी देशान्तरसम्म फैलिएको छ । यसको कूल क्षेत्रफल १,४७,१८१ वर्ग कि.मि छ । यो क्षेत्रफल पृथ्वीको कूल क्षेत्रफलको ०.०३% र एसिया महादेशको ०.३% पर्दछ । लण्डन स्थित "ग्रीनवीच मिनटाइम" भन्दा पूर्वतर्फ रहेकोले गौरीशङ्कर हिमालको नजिक भएर जाने ८६ डिग्री १५ मिनेट पूर्वी देशान्तरलाई आधार मानी नेपालको प्रमाणिक समय ५ घण्टा ४५ मिनेट आगाडि मानिएको छ ।
+
+नेपालको पूर्वी सीमाना मेची नदीदेखि पश्चिमी सीमाना महाकाली नदीसम्मको औसत लम्वाई ८८५ कि.मि. छ । उत्तरदेखि दक्षिणको चौडाई भने एकनासको छैन । पूर्वी भागभन्दा पश्चिमी भाग केही चौडा छ । त्यस्तै मध्य भाग भने केही खुम्चिएको छ । यसमा अधिकतम चौडाई २४१ कि.मि. र न्यूनतम चौडाई १४५ कि.मि. रहेको छ । यसर्थ नेपालको औसत चौडाई १९३ कि.मि. रहेको छ । नेपालको उत्तरमा चीनको स्वशासित क्षेत्र तिब्बत पर्दछ भने दक्षिण, पूर्व र पश्चिममा भारत पर्दछ । नेपालका ८०% भन्दा बढी नागरिक हिन्दू धर्म मान्दछन् जुन विश्वकै सबैभन्दा बढी प्रतिशत हिन्दू धर्मावलम्बी हुने राष्ट्र पनि हो । यसबाहेक बौद्ध, इस्लाम, किराॅत आदि धर्म मान्ने मानिसहरू पनि यहाँ बसोबास गर्दछन् । एउटा सानो क्षेत्रको लागि नेपालको भौगोलिक विविधता निकै उल्लेखनीय छ । यहाँ तराईका उष्ण फाँटदेखि चिसा हिमालयका शृंखला अवस्थित छन् । संसारका सबैभन्दा उच्च १४ हिमश्रृंखलाहरु मध्ये ८ वटा नेपालमा पर्दछन्, जसमध्ये संसारको सर्वोच्च शिखर सगरमाथा (नेपाल र चीनको सीमानामा पर्ने) पनि एक हो । नेपालको प्रमुख सहर एवं राजधानी काठमाडौं हो । काठमाडौं, ललितपुर र भक्तपुर सहरहरूलाई काठमाडौं उपत्यका भनेर चिनिन्छ । अन्य प्रमुख सहरहरूमा भरतपुर, बिराटनगर, भैरहवा, वीरगञ्ज, जनकपुर, पोखरा, नेपालगञ्ज, धनगढी र महेन्द्रनगर पर्दछन् । 
+
+नेपाल शब्दको उत्त्पत्ति बारेमा ठोस प्रमाण त उपलब्ध छैन, तर एक प्रसिद्ध विश्वास अनुसार मरिची ॠषि पुत्र 'ने' मुनिले पालन गरेको ठाउँको रूपमा यहाँको नाम नेपाल रहन गएको हो । निरन्तर रूपमा राजा-रजौटाहरूको अधीनमा रहेर फुट्ने र जुट्ने लामो तथा सम्पन्न इतिहास बोकेको, अहिले नेपाल भनेर चिनिने यो खण्डले वि. सं. २०४६ सालको आन्दोलन पश्चात् संवैधानिक राजतन्त्रको नीति अवलम्बन गर्‍यो । तर यस पश्चात् पनि राजसंस्था एक महत्त्वपूर्ण तथा अस्पष्ट परिधि तथा शक्ति भएको संस्थाको रूपमा रहिरह्यो । यो व्यवस्थामा पहिले संसदीय अनिश्चितता तथा सन् १९९६ देखि ने.क.पा.(माओवादी)को जनयुद्धको कारणले राष्ट्रिय अनिश्चितता देखियो । 
+
+माओवादीहरूले राजनीतिको मूलाधारबाट अल्लगिएर भूमिगत रूपमा राजतन्त्र तथा मूलाधारका राजनीतिक दलहरूको विरुद्धमा गुरिल्ला युद्ध सञ्चालन गरे, जसको कारण १३,००० भन्दा बढी मानिसहरूको ज्यान जान पुग्यो । यही विद्रोहलाई दमन गर्ने पृष्ठभूमिमा राजाले सन् २००२ मा संसदको विघटन गरी निर्वाचित प्रधानमन्त्रीलाई अपदस्त गरेर प्रधानमन्त्री मनोनित गर्दै शासन चलाउन थाले । सन् २००५ मा उनले एकनासै संकटकालको घोषणा गरेर सबै कार्यकारी शक्ति ग्रहण गरे। सन् २००६को लोकतान्त्रिक आन्दोलन (जनाअन्दोलन-२) पश्चात् राजाले देशको सार्वभौमसत्ता जनतालाई हस्तान्तरण गरे तथा अप्रिल २४, २००६ मा भंग गरिएको संसद पूनर्स्थापित भयो । मे १८, २००६ मा आफूले पाएको सार्वभौमसत्ताको उपयोग गर्दै नयाँ प्रतिनिधि सभाले राजाको अधिकारमा कटौती गर्‍यो तथा नेपाललाई एक धर्मनिरपेक्ष राष्ट्र घोषणा गर्‍यो । अन्तरिम व्यवस्थापिका संसदले पहिले नै घोषणा गरिसकेको "सङ्घीय लोकतान्त्रिक गणराज्य, संविधानसभा" को पहिलो बैठकबाट मे २८, २००८ मा आधिकारिक रूपमा कार्यान्वयन भयो । नेपालको भूगोल सानो भए पनी नेपालीहरु को मन ठुलो छ ।
+
+हिमालय क्षेत्रमा मानिसहरू बस्न थालेको कम्तिमा पनि ९,००० वर्ष भएको कुरा काठमाडौं उपत्यकामा पाइएका प्राचीन औजारहरूबाट पुष्टि हुन्छ। सम्भवत: भोट-बर्मेली मूलका मानिसहरू नेपालमा २,५०० वर्ष अगाडि बसोबास गर्दथे। 
+
+ईशापूर्व १५०० तिर इन्डो-आर्यन जातिहरू उपत्यका प्रवेश गरे। ईशापूर्वको १००० तिर स-साना राज्यहरू र राज्यसङ्गठनहरू बने। सिद्धार्थ गौतम (ईशापूर्व ५६३–४८३) त्यस्तै एक वंश, शाक्यवंशका राजकुमार थिए, जसले आफ्नो राजकाज त्यागी तपस्वीको जीवन अँगाले र उनी बुद्ध भनेर विश्व प्रसिद्ध भए। 
+ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर''';
diff --git a/benchmarks/Utf8Encode/dart/rutext_2_10k.dart b/benchmarks/Utf8Encode/dart/rutext_2_10k.dart
new file mode 100644
index 0000000..c61a665
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/rutext_2_10k.dart
@@ -0,0 +1,44 @@
+// This text is an extract from the Russian Wikipedia article about Lithuania
+// (Литва): https://ru.wikipedia.org/wiki/Литва
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String ru = '''
+Литва
+
+Литва́ (), официальное название  Лито́вская Респу́блика ()  государство, расположенное в северной части Европы. Столица страны  Вильнюс.
+
+Площадь  км². Протяжённость с севера на юг  280 км, а с запада на восток  370 км. Население составляет человек (сентябрь, 2019). Занимает 140-е место место в мире по численности населения и 121-е по территории. Имеет выход к Балтийскому морю, расположена на его восточном побережье. Береговая линия составляет всего 99 км (наименьший показатель среди государств Балтии). На севере граничит с Латвией, на юго-востоке  с Белоруссией, на юго-западе  с Польшей и Калининградской областью России.
+
+Член ООН с 1991 года, ЕС и НАТО  с 2004 года, ОЭСР  с мая 2018 года. Входит в Шенгенскую зону и Еврозону.
+
+Независимость страны провозглашена 11 марта 1990 года, а юридически оформлена 6 сентября 1991 года. .
+
+Этимология слова «Литва» точно не известна, при этом существует множество версий, ни одна из которых не получила всеобщего признания. Корень «лит» и его варианты «лет»/«лют» допускают различные толкования как в балтских и славянских, так и в других индоевропейских языках. Так, например, существуют созвучные топонимы на территории Словакии «"Lytva"» и Румынии «"Litua"», известные с XIXII веков. По мнению Е. Поспелова, топоним образован от древнего названия реки Летава (Lietavà от «лить», русское «Летаука»). Феодальное княжество, по землям которого протекала эта река, со временем заняло ведущее положение и название было распространено на всё государство. В «Повести временных лет» (XII век) упоминается этноним «литва», полностью совпадающий с названием местности «Литва» и по смыслу (территория, где живёт литва), и по форме.
+
+Поверхность  равнинная со следами древнего оледенения. Поля и луга занимают 57 % территории, леса и кустарники  30 %, болота  6 %, внутренние воды  1 %.
+
+Высшая точка  293,84 м над уровнем моря  холм Аукштояс (или Аукштасис калнас) в юго-восточной части страны, в 23,5 км от Вильнюса.
+
+Крупнейшие реки  Неман и Вилия.
+Более 3 тыс. озёр (1,5 % территории): крупнейшее из них  Друкшяй на границе Латвии, Литвы и Белоруссии (площадь 44,8 км²), самое глубокое  Таурагнас, 61 м), самое длинное  Асвея длинной в 30 км у местечка Дубингяй.
+
+Климат переходный от морского к континентальному. Средняя температура зимой 5 °C, летом +17 °C. Выпадает 748 мм осадков в год.
+
+Полезные ископаемые: торф, минеральные материалы, строительные материалы.
+
+Территория современной Литвы была заселена людьми с конца XIX тысячелетия до н. э. Жители занимались охотой и рыболовством, использовали лук и стрелы с кремнёвыми наконечниками, скребки для обработки кожи, удочки и сети. В конце неолита (IIIII тысячелетия до н. э.) на территорию современной Литвы проникли индоевропейские племена. Они занимались земледелием и скотоводством, при этом охота и рыболовство оставались основными занятиями местных жителей вплоть до широкого распространения железных орудий труда. Индоевропейцы, заселившие земли между устьями Вислы и Западной Двины, выделились в отдельную группу, названную учёными балтами.
+
+Традиционно считается, что этническая основа Литвы сформирована носителями археологической культуры восточнолитовских курганов, сложившейся в V веке н. э. на территории современных Восточной Литвы и Северо-Западной Белоруссии. Около VII века литовский язык отделился от латышского.
+
+Становление государственности на территории современной Литвы относят к XIII веку, при этом само название «Литва» впервые упомянуто в Кведлинбургских анналах под 1009 годом в сообщении об убийстве язычниками миссионера Бруно на границе Руси и Литвы. По наиболее распространённой версии, топоним возник от названия небольшой реки Летаука, притока Няриса. Согласно более современной гипотезе, название страны могло произойти от этнонима «леты» или «лейти», которым жители окрестных земель называли дружинников литовских князей.
+
+В начале XIII века в земли балтов-язычников с запада началось вторжение немецких рыцарей-крестоносцев. Они покорили Пруссию и Ливонию. В это же время с юга началась экспансия Галицко-Волынского княжества. К середине XIII века многие литовские земли были объединены под властью князя Миндовга, принявшего в 1251 году католическое крещение и коронованного в 1253 году. Через несколько лет Миндовг отрёкся от христианства и до начала XIV века литовские земли оставались языческими. Несмотря на то, что уже в 1263 году Миндовг был свергнут, его правление положило начало более чем пятисотлетнему существованию Великого княжества Литовского.
+
+В XIV  начале XV веках территория Великого княжества Литовского стремительно росла, в основном за счёт присоединения земель Западной Руси. Включение в состав государства славянских земель, многократно превышающих по площади и количеству населения собственно литовские земли, привело к перениманию литовскими князьями, получившими во владение русские земли, православной культуры и западнорусского языка. Со временем западнорусский язык стал официальным языком канцелярии великих князей. Собственно литовский язык до XVI века оставался бесписьменным, хотя и продолжал использоваться на этнически литовских землях.
+
+В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.''';
diff --git a/benchmarks/Utf8Encode/dart/sktext_10k.dart b/benchmarks/Utf8Encode/dart/sktext_10k.dart
new file mode 100644
index 0000000..7dc2d13
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/sktext_10k.dart
@@ -0,0 +1,46 @@
+// This text is an extract from the Slovak Wikipedia article about Esperanto:
+// https://sk.wikipedia.org/wiki/Esperanto
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String sk = '''
+Esperanto (pôvodne Lingvo Internacia – „medzinárodný jazyk“) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.
+
+Hoci žiaden štát neprijal esperanto ako úradný jazyk, používa ho komunita s odhadovaným počtom hovoriacich 100 000 až 2 000 000, z čoho približne 2 000 tvoria rodení hovoriaci. V Poľsku je na zozname nemateriálneho kultúrneho dedičstva. Získalo aj isté medzinárodné uznania, napríklad dve rezolúcie UNESCO či podporu známych osobností verejného života. V súčasnosti sa esperanto využíva pri cestovaní, korešpondencii, medzinárodných stretnutiach a kultúrnych výmenách, kongresoch, vedeckých diskusiách, v pôvodnej aj prekladovej literatúre, divadle a kine, hudbe, tlačenom aj internetovom spravodajstve, rozhlasovom a televíznom vysielaní.
+
+Slovná zásoba esperanta pochádza predovšetkým zo západoeurópskych jazykov, zatiaľ čo jeho skladba a tvaroslovie ukazujú na silný slovanský vplyv. Morfémy sú nemenné a je možné ich kombinovať takmer bez obmedzení do rozmanitých slov; esperanto má teda mnoho spoločného s analytickými jazykmi, ako je čínština, zatiaľ čo vnútorná stavba jeho slov pripomína jazyky aglutinačné, ako je japončina, swahilčina alebo turečtina.
+
+Pri zrode esperanta stál Ludwik Lejzer Zamenhof. Vyrastal v mnohojazyčnom, vtedy ruskom, teraz poľskom meste Białystok, kde bol svedkom častých sporov medzi jednotlivými národnosťami (Rusi, Poliaci, Nemci, Židia). Pretože za jednu z hlavných príčin týchto sporov považoval neexistenciu spoločného jazyka, začal už ako školák pracovať na projekte reči, ktorá by túto funkciu mohla plniť. Mala byť, na rozdiel od národných jazykov, neutrálna a ľahko naučiteľná, teda prijateľná ako druhý jazyk pre všetkých, jazyk vyučovaný spoločne s národnými jazykmi a používaný v situáciách vyžadujúcich dorozumenie medzi národmi.
+
+Zamenhof najskôr uvažoval o oživení latinčiny, ktorú sa učil v škole, ale usúdil, že je pre bežné dorozumievanie zbytočne zložitá. Keď študoval angličtinu, všimol si, že časovanie slovies podľa osoby a čísla nie je nutné; že gramatický systém jazyka môže byť oveľa jednoduchší, než sa dovtedy nazdával. Stále však zostávala prekážka v memorovaní sa veľkého množstva slov. Raz Zamenhofa zaujali dva ruské nápisy: "швейцарская" [švejcarskaja] (vrátnica, odvodené od "швейцар" [švejcar] – vrátnik) a "кондитерская" [konditerskaja] (cukráreň, odvodené od "кондитер" [konditér] – cukrár). Tieto slová rovnakého zakončenia mu vnukli myšlienku, že používanie pravidelných predpôn a prípon by mohlo významne znížiť množstvo slovných koreňov nutných na dorozumenie sa. Aby boli korene čo najmedzinárodnejšie, rozhodol sa prevziať slovnú zásobu predovšetkým z románskych a germánskych jazykov, teda tých, ktoré boli vtedy v školách po celom svete vyučované najčastejšie.
+Prvý Zamenhofov projekt, nazvaný "Lingwe uniwersala," bol viac-menej hotový už v roku 1878, ale autorov otec, učiteľ jazykov, považoval túto prácu za márnu a utopistickú, a zrejme preto rukopis, ktorý mu bol zverený, zničil. V rokoch 1879 – 1885 Zamenhof študoval medicínu v Moskve a vo Varšave. V tej dobe začal znova pracovať na medzinárodnom jazyku. Prvú obnovenú verziu vyučoval v roku 1879 pre svojich priateľov. Po niekoľkých rokoch už prekladal poéziu, aby jazyk čo najviac zdokonalil. V roku 1885 autor napísal: 
+
+Zamenhofovi prichádzalo veľa nadšených listov, ktoré často prinášali najrôznejšie návrhy úprav jazyka. Všetky podnety zaznamenával a neskoršie ich začal uverejňovať v časopise "Esperantisto", vychádzajúcom v Norimbergu. V tom istom časopise aj dal o úpravách dvakrát hlasovať, väčšina čitateľov však so zmenami nesúhlasila. Po týchto hlasovaniach na určitý čas utíchli hlasy volajúce po reforme a jazyk sa začal rozširovať. Najviac odberateľov mal časopis vo vtedajšom Rusku. Veľkou ranou preň bolo, keď ruská cenzúra jeho šírenie zakázala kvôli článku Leva Nikolajeviča Tolstého. Časopis kvôli tomu musel byť zrušený, krátko na to bol však vystriedaný novým, nazvaným "Lingvo Internacia." Najskôr ho redigovali vo švédskej Uppsale, neskôr v Maďarsku a nakoniec v Paríži, kde jeho vydávanie zastavila až prvá svetová vojna.
+
+Nový medzinárodný jazyk začali jeho používatelia skoro používať aj na organizáciu odbornej a záujmovej činnosti na medzinárodnej úrovni. V prvých desaťročiach prebiehala komunikácia v esperante takmer výhradne písomnou formou. Ale po nečakane úspešnom prvom Svetovom kongrese esperanta, usporiadanom v roku 1905 vo francúzskom meste Boulogne-sur-Mer, na ktorom sa overili možnosti používania tejto reči v hovorenej forme, začali naberať na intenzite aj osobné kontakty.
+
+Esperanto začali pre svoju činnosť používať aj rôzne organizácie a hnutia. Už na svetovom kongrese v Barcelone roku 1909 sa uskutočnilo niekoľko stretnutí prítomných katolíkov, ktorí sa nakoniec rozhodli usporiadať v nadchádzajúcom roku, 1910, samostatný kongres katolíckych esperantistov. Počas neho bolo založené Medzinárodné združenie katolíckych esperantistov (IKUE – Internacia Katolika Unuiĝo Esperantista). Časopis "Espero Katolika" ("Katolícka nádej") vychádzal už od roku 1903 a s viac ako 100 rokmi svojej existencie je dnes najdlhšie vychádzajúcim esperantským periodikom.
+
+V roku 1912 sa Zamenhof pri slávnostnom prejave ôsmeho Svetového kongresu esperanta v Krakove vzdal svojej oficiálnej úlohy v hnutí. Desiaty kongres sa mal konať v roku 1914 v Paríži, prihlásilo sa naň takmer 4 000 ľudí, ale nakoniec ho zrušili pre začínajúcu vojnu, Zamenhof sa vtedy musel vrátiť domov cez škandinávske štáty.
+
+Po vojne túžba po harmónii a mieri vzbudila nové nádeje, vďaka čomu sa esperanto veľmi rýchlo šírilo. Prvý povojnový kongres sa konal v roku 1920 v Haagu, 13. svetový kongres v 1921 v Prahe. V roku 1927 bolo vo viedenskom Hofburgu otvorené Medzinárodné esperantské múzeum, v roku 1929 bolo pripojené k Rakúskej národnej knižnici a dnes sídli v samostatnej budove.
+
+Snahy o presadenie esperanta ako univerzálneho jazyka sa stretávali s pozitívnou odozvou: Petíciu v jeho prospech adresovanú Organizácii Spojených národov podpísalo vyše 80 miliónov ľudí, v Česko-Slovensku napríklad prof. Jaroslav Heyrovský, nositeľ Nobelovej ceny.
+
+Valné zhromaždenie UNESCO prijalo podobné rezolúcie v Montevideu 10. decembra 1954 a v Sofii 8. novembra 1985. Vzalo v nich na vedomie "výsledky dosiahnuté esperantom na poli medzinárodnej duchovnej výmeny aj zblíženia národov sveta" a vyzvalo členské štáty, "aby sa chopili iniciatívy pri zavádzaní študijných programov o jazykovom probléme a esperante na svojich školách a inštitúciách vyššieho vzdelávania".
+
+K esperantu sa hlásila aj rada predsedov Poľskej akadémie vied. Jubilejného 72. Svetového kongresu esperanta roku 1987 (100. výročie uverejnenia prvej učebnice jazyka) sa vo Varšave zúčastnilo takmer 6 000 ľudí zo 60 národov.
+
+Pokroky dosiahli aj katolícki esperantisti – roku 1990 bol vydaný dokument "Norme per la celebrazione della Messa in esperanto", ktorým Svätá stolica povoľuje vysluhovať sväté omše v tomto jazyku bez zvláštneho povolenia. Esperanto sa tak stalo jediným schváleným umelým liturgickým jazykom katolíckej cirkvi.
+
+Skutočnosť, že mnohé z cieľov esperantského hnutia sa doteraz nepodarilo naplniť, je často prisudzovaná okrem iného technologickej a kultúrnej dominancii Spojeného kráľovstva a Spojených štátov amerických, predovšetkým v období po druhej svetovej vojne, vďaka čomu je v súčasnosti dorozumievacím jazykom väčšiny medzinárodných činností angličtina.
+
+Už na začiatku 20. storočia bolo na území dnešného Slovenska (vtedy severná časť Uhorska) činné esperantské hnutie. Esperantistov a kluby zastrešovala „Uhorská esperantská spoločnosť” a „Verda Standardo”. V Prahe boli činné spolky "Bohema Unio Esperantista", ktorý prijímal len organizácie a kluby, a "Bohema Asocio Esperantista", ktorý prijímal jednotlivcov. Oba spolky vydávali svoje časopisy. V roku 1907, 20 rokov po zverejnení jazyka Zamenhofom, vydal tolstojovec Albert Škarvan spolu s Rusom N. P. Evstifejevom prvú učebnicu esperanta v slovenčine, „Základy medzinárodnej reči ESPERANTO“.
+
+Po prvej svetovej vojne sa oba pražské spolky zlúčili do "Československej Esperantskej Asociácie". Tá bola v roku 1936 premenovaná na "Esperantskú Asociáciu v Československej republike". V tomto období bolo hnutie veľmi aktívne, fungovalo mnoho klubov, konalo sa veľa prednášok a kurzov. Esperanto bolo vyučované na školách rôznych stupňov, rádio Bratislava od 1930 vysielalo kurzy a od 1932 aj kultúrny program v esperante. Bola vydaná "Československá antológia" predstavujúca diela 20 slovenských autorov. V rámci protifašistickej aktivity vychádzali aj preklady protifašistických článkov z esperantských časopisov z obdobia Španielskej občianskej vojny.
+
+Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.''';
diff --git a/benchmarks/Utf8Encode/dart/zhtext_10k.dart b/benchmarks/Utf8Encode/dart/zhtext_10k.dart
new file mode 100644
index 0000000..b5e2a54
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart/zhtext_10k.dart
@@ -0,0 +1,73 @@
+// This text is an extract from the Chinese Wikipedia article about Kanji
+// (汉字): https://zh.wikipedia.org/wiki/汉字
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String zh = '''
+最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
+
+中文汉字中,笔画最多的汉字可能是“”,是一种面食的名称,此字至今习用,其不同写法的笔画数在54至71画之间不等。被传统辞典收录的笔画最多的汉字为《字汇补》、《汉语大字典》中由四个“-{龍}-”字组成的「」字,共64画;同樣屬於64劃的字由四個“-{興}-”字組成的“𠔻”字,收入自《中文大辭典》;之後的是由四個「雷」字組成的“䨻”字,有52劃,收錄於《說文解字》。
+
+另外,日本汉字「」收录于日本的TRON计划中,但此字无法提供有效证据表明其确有使用,因此状况存疑。该字由3個「-{龍}-」字和3個「-{雲}-」個組合而成,共有84劃。该字曾提交到当时的统一码扩展C区,编号为JMK66147,后因扩展C区的时间原因被安排到了扩展D区,之后因找不到合适证据被撤销。最后提交到扩展G区并被接受。
+
+現在,純漢字僅僅被用於記錄漢語。而漢字和假名一起被用於記錄日語。
+
+其他一些民族在早期會將漢字單純作為表音文字來記錄他們的語言。如蒙古語最早的文獻蒙古秘史即用純漢字當做表音文字進行記錄。日語最早的文獻也是把漢字當做表音文字來記錄日語,後來演變出萬葉假名。
+
+契丹文、女真文、西夏文的創製受到了漢字的影響,它們跟漢字一樣都是方塊型文字,筆畫形狀也極其類似,也採用類似六書的造字法。但這些文字除個別字與漢字外形相同外,絕大部分字形都跟漢字不同,因此在Unicode中它們都是獨立區塊編碼的。
+
+古壯字(方塊壯字)、古白字(方塊白字)、古布依字(方塊布依字)、字喃等文字可以說是漢字在其他語言中的擴充,因為它們很大一部分本身就是漢字(賦予新義),另一些則是用已有漢字偏旁組合構成新字,因此,這些文字的外觀上與漢字很相似,在Unicode中與漢字一道編入漢字區。
+
+女書是用於記錄漢語的另一種文字,它們的造字法與六書有部分相似之處,但字的外觀與漢字差異較大,Unicode中作為獨立區塊編碼。
+
+以上文字都因各種原因而消亡,如今除專家學者外無幾人能識。
+
+日語的假名()是由漢字的草體、簡筆演變而成的。諺文和日語假名一樣可以和漢字一同混寫。
+
+此外如蒙古文、滿文、錫伯文等也是在漢字書寫方式和書寫工具的影響下,將從右向左書寫的源自察合台文的書寫方式改為從上到下書寫,文字的結構也隨之有所變化。
+
+漢字是承載文化的重要工具,目前留有大量用漢字書寫的典籍。不同的方言、甚至語言都使用漢字作為共同書寫體系。在古代日本、朝鮮半島、越南、琉球群島,以及位於婆羅洲的蘭芳共和國,漢字都曾是該國正式文書的唯一系統,因而漢字在歷史上對文明的傳播分享有著重要作用。
+
+由於漢字和發聲的聯繫不是非常密切,比較容易被其他民族所借用,如日本、朝鮮半島和越南都曾經有過不會說漢語,單純用漢字書寫的歷史階段。漢字的這個特點對於維繫一個文化圈—一個充滿各種互相不能交流的方言群體的民族——發揮了主要的作用。
+
+漢字對周邊國家的文化產生過巨大的影響,形成了一個共同使用漢字的漢字文化圈,在日本、越南和朝鮮半島、琉球群島,漢字被融合成它們語言的文字「」、「」、「」。直到現在,日語中仍然把漢字認為是書寫體系的一部分。在北韓和越南,已經完全不再使用漢字;在韓國,漢字的使用在近幾十年來越來越少;但是由於朝鮮語/韓語中使用了大量的漢字詞彙,並且重音現象嚴重,所以在需要嚴謹表達的場合時仍然會使用漢字。雖然在通常情況下人名、公司機構名稱等均使用韓文書寫,不過大多數的人名、公司機構均有其對應的漢字名稱。
+
+漢字於公元3世紀經朝鮮半島輾轉傳入日本。二戰後日本開始限制漢字的數量和使用,頒布了《當用漢字表》及《人名用字表》等,其中簡化了部分漢字(日本新字體),不過文學創作使用的漢字,並不在限制之列。日本除從中文中傳入的漢字外,還創造和簡化了一些漢字,如「-{辻}-」(十字路口)、「-{栃}-」、「-{峠}-」(山道)和「-{広}-」(廣)、「-{転}-」(轉)、「-{働}-」(勞動)等。
+
+公元3世紀左右,漢字傳入了朝鮮半島,朝鮮語/韓語曾經完全使用漢字來書寫。相傳薛聰在當時發明了吏讀,把朝鮮語用同音或同義的漢字來表示。例如:「乙」字被用來表示韓語中的後綴「-l()」。由於有不少發音都沒有對應的漢字,所以朝鮮半島的人民又運用組字法,把兩個或多個漢字合組成為一個新的吏讀字。相傳後來的契丹文就是受到吏讀字的影響。此外尚有鄉札、口訣等以漢字表記朝鮮語的方法。
+
+1443年,朝鮮世宗大王頒布《訓民正音》,發明了諺文與漢字一起使用,但當中有不少部件仍然有昔日吏讀字的痕跡。現在的大韓民國雖禁止在正式場合下使用漢字,並停止了在中小學中教授漢字(但是從2011年開始,大韓民國的李明博政府已經決定將漢字重新納入中小學的課程裡),不過漢字在民間仍在繼續使用,且可以按照個人習慣書寫,但是現在能寫一筆漂亮漢字的韓國人越來越少。朝鮮民主主義人民共和國於1948年廢除了漢字,僅保留了十幾個漢字(參見廢除漢字)。
+
+公元1世紀漢字便傳入了越南,越南語也曾完全使用漢字做為書寫用文字,並在漢字的基礎上創造了喃字,但是由於書寫不便,漢字仍是主要的書寫方式。
+
+1945年越南民主共和國成立後廢除漢字,使用了稱為「國語字」的拼音文字。現在的越南文已經看不出漢字的痕跡了。
+
+中國許多民俗都與漢字有關,例如:
+
+漢字獨特優美的結構,書寫的主要工具——毛筆有多樣的表現力,因而產生了中文獨特的造型藝術——書法。而篆刻是和書法相關的藝術,用刀在石材上雕刻出篆字作為印章,尚有勒石、山壁題字等。
+同一个汉字,可以有不同的字体。當前漢字字體主要有篆書、隷書、草書、行書、楷書等。
+
+漢字歷史上是不斷在組新字的,目前的各種漢字並非同时定型于某一年代,而是應時代需要逐渐發展而来的。例如:“人”字在商朝就已出现,“凹”字和“凸”字則是在唐朝才出現的。
+
+此外不同的行業也会因用字需求而造字。例如:中国的傳統音乐在記譜上會使用減字譜、工尺譜。
+
+自十九世紀中葉後,亞洲和西方都發佈了很多漢字拉丁化方案,如:
+
+現在,漢語拼音方案是使用最廣且被聯合國接受的汉字拉丁化方案。而威妥瑪拼音歷史悠久,至今仍用於臺灣的人名、地名拼寫。
+汉字中存在许多异体字,它们的意义和读音完全相同,只是写法不同。异体字的产生部分是由于历史原因,有的则是人为造字,如「和、咊、-{龢}-」、「秋、-{秌}-、龝」等。
+
+臺灣也有使用所謂的異體字,例如“-{臺}-”與“-{台}-”、“-{體}-”與“-{体}-”以及“-{學}-”與“-{学}-”等等。
+
+中国大陆於1956年公布整理异体字表,废除了大量异体字,但後來因為各種原因恢復了部分異體字。如“-{於}-”曾被當作“-{于}-”的異體字廢除掉,但在1988年發表的《現代漢語通用字表》中又恢復成為規範字,因爲姓氏中「-{于}-」和「-{於}-」同時存在,不宜合併。另外,不同地區對異體字的取捨有所不同,例如:韓國就以漢字各種異體字中最早出現的樣式為標準寫法。所以,在韓語漢字的標準中,取“甛”而不取“甜”、取“-{幇}-”而不取“-{幫}-”、取“-{畵}-”而不取“-{畫}-”。
+
+由于英文文字是由26个字母排列组合而成的文字,因此可以简化输入步骤;相比较之下汉字则不能如此,从字形上汉字虽然可以拆解成不同的部分,但是被分成的部首或偏旁数量过多,这样不但不能达到简化输入的目的,反而显得更为繁琐。于是从汉字字音上去考虑,汉字输入被分成少量的语音元素组合排列,反而可以达到简化输入的步骤。因为是语音输入对汉字的读音必须清楚,某些生僻字或不知道汉字发音的则会很困难,这在一定程度上限制了汉字的输入。
+
+由于打字機鍵盤是為歐美文字設計的,在設計時本身沒有考慮汉字輸入的問題,輸入漢字往往比輸入拼音文字困難。汉字没有经过中文打字機的普及,直接进入了電腦中文信息处理阶段。在電腦發明初期曾引起漢字能否適應電腦時代的問題,支持漢字拉丁化的學者甚至以此為理據。
+
+随着各种中文输入法的出现,汉字的计算机输入、存储、输出技术得到了基本解决,大大提高了中文写作、出版、信息检索等的效率。目前中文输入法有上千种之多,主要包括表音输入和表形输入两类,也有两者兼之的。汉字的语音输入、手写识别和光学字符识别(OCR)技术也已得到广泛应用。
+
+如收录数千字的GB 2312(中國大陸)、B''';
diff --git a/benchmarks/Utf8Encode/dart2/Utf8Encode.dart b/benchmarks/Utf8Encode/dart2/Utf8Encode.dart
new file mode 100644
index 0000000..71ca4c9
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/Utf8Encode.dart
@@ -0,0 +1,104 @@
+// 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.
+//
+// Benchmark for UTF-8 encoding
+
+import 'dart:convert';
+
+import 'package:benchmark_harness/benchmark_harness.dart';
+
+import 'datext_latin1_10k.dart';
+import 'entext_ascii_10k.dart';
+import 'netext_3_10k.dart';
+import 'rutext_2_10k.dart';
+import 'sktext_10k.dart';
+import 'zhtext_10k.dart';
+
+class Utf8Encode extends BenchmarkBase {
+  final String language;
+  final String originalText;
+  // Size is measured in number of runes rather than number of bytes.
+  // This differs from the Utf8Decode benchmark, but runes are the input
+  // to the encode function which makes them more natural than bytes here.
+  final int size;
+  List<String> benchmarkTextChunks;
+
+  static String _makeName(String language, int size) {
+    String name = 'Utf8Encode.$language.';
+    name += size >= 1000000
+        ? '${size ~/ 1000000}M'
+        : size >= 1000 ? '${size ~/ 1000}k' : '$size';
+    return name;
+  }
+
+  Utf8Encode(this.language, this.originalText, this.size)
+      : super(_makeName(language, size));
+
+  @override
+  void setup() {
+    final int nRunes = originalText.runes.toList().length;
+    final String repeatedText = originalText * (size / nRunes).ceil();
+    final List<int> runes = repeatedText.runes.toList();
+    final int nChunks = (size < nRunes) ? (nRunes / size).floor() : 1;
+    benchmarkTextChunks = List<String>(nChunks);
+    for (int i = 0; i < nChunks; i++) {
+      final offset = i * size;
+      benchmarkTextChunks[i] = String.fromCharCodes(runes.sublist(offset, offset+size));
+    }
+  }
+
+  @override
+  void run() {
+    for (int i = 0; i < benchmarkTextChunks.length; i++) {
+      final encoded = utf8.encode(benchmarkTextChunks[i]);
+      if (encoded.length < benchmarkTextChunks[i].length)  {
+        throw 'There should be at least as many encoded bytes as runes';
+      }
+    }
+  }
+
+  @override
+  void exercise() {
+    // Only a single run per measurement.
+    run();
+  }
+
+  @override
+  void warmup() {
+    BenchmarkBase.measureFor(run, 1000);
+  }
+
+  @override
+  double measure() {
+    // Report time per input rune.
+    return super.measure() / size / benchmarkTextChunks.length;
+  }
+
+  @override
+  void report() {
+    // Report time in nanoseconds.
+    final double score = measure() * 1000.0;
+    print('$name(RunTime): $score ns.');
+  }
+}
+
+void main(List<String> args) {
+  const texts = {
+    'en': en,
+    'da': da,
+    'sk': sk,
+    'ru': ru,
+    'ne': ne,
+    'zh': zh,
+  };
+  final benchmarks = [
+    for (int size in [10, 10000, 10000000])
+      for (String language in texts.keys)
+        () => Utf8Encode(language, texts[language], size)
+  ];
+
+  for (var bm in benchmarks) {
+    bm().report();
+  }
+}
diff --git a/benchmarks/Utf8Encode/dart2/datext_latin1_10k.dart b/benchmarks/Utf8Encode/dart2/datext_latin1_10k.dart
new file mode 100644
index 0000000..bce6c80
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/datext_latin1_10k.dart
@@ -0,0 +1,62 @@
+// This text is an extract from the Danish Wikipedia article about Donald Duck
+// (Anders And): https://da.wikipedia.org/wiki/Anders_And
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String da = '''
+Anders And
+
+Anders Fauntleroy And er en berømt figur i Disneys tegnefilm og tegneserier. Selv om han ikke er særligt populær i USA, optræder han i mange ugeblade i Europa: I Norge, Tyskland, Sverige, Danmark, Holland, Italien med flere. Hans første optræden var i tegnefilmen "The Wise Little Hen" (Den kloge lille høne) fra 9. juni 1934. Hans karakteristiske stemme blev indtalt af radiokomikeren Clarence Nash, der siden fast lagde stemme til.
+Efter Nash' død i 1985 overtog tegnefilmsdubberen Tony Anselmo. Det var i øvrigt Nash selv, der trænede Anselmo til at lyde som Anders And. I Danmark har tre lagt stemme til Anders And: Bjarne H. Hansen, Dick Kaysø og Peter Zhelder. Dick Kaysø og Peter Zhelder lægger stadigvæk stemme til ham.
+
+Anders And var en bifigur til filmen Den lille kloge Høne, han havde et langt spidst næb og en utrolig kort lunte; der skulle ikke meget til for at udløse et raserianfald hos ham. Klassikerne er fra 1930'erne, hvor Mickey, Fedtmule og Anders er et trekløver, der er film som "Mickeys Campingvogn," "Tårnuret" og "Ensomme Spøgelser." Fred Spencer og Dick Lundy var animatorer. Efterhånden opnåede anden større popularitet, hvad der ikke rigtig huede Disney, der ikke brød sig om den krakilske and. Men Anders blev forfremmet til hovedfigur i en serie film, der begyndte med "Anders And og Strudsen" i 1938. Med den var det "ande-teamet" hos Disney født: instruktøren Jack King og assistenterne Carl Barks (den senere serieskaber), Chuck Couch, Harry Reeves og Jack Hannah. Han var stadigvæk en hidsigprop, men han blev gjort mere nuanceret, og nye figurer blev tilføjet som nevøerne Rip, Rap og Rup, kæresten Andersine And og i en enkelt film Fætter Guf.
+
+Under 2. verdenskrig blev der lavet film om anden i militærtjeneste, som han selvfølgelig gør meget klodset. Mest kendt er "Der Fuehrers Face" fra 1943, hvor anden drømmer, at han er i diktaturstaten Nutziland. Den film blev arkiveret af Disney efter krigen, men er senere vist meget uofficielt. Desuden medvirkede han i to mindre kendte spillefilm "Saludos Amigos" 1943 og "The Three Caballeros" 1945, der gav et lystigt billede af livet i Latinamerika.
+
+Efter krigen blev omgivelserne mere hjemlige, men næppe mere fredfyldte. I 1947 overtog Jack Hannah pladsen som instruktør. Filmene handlede ofte om klammeri med andre, det kunne være en bi, Chip og Chap eller bare ting han ikke kunne få til at makke ret. Anders var her ofte plageånden, hvis egne drillerier kom tilbage som en boomerang.
+
+Fjernsynets fremmarch i 1950'erne satte snart stopper for de korte tegnefilm, og Jack Hannah blev sat til at redigere Disneys tv-shows og kæde de korte tegnefilm sammen i et længere forløb. Her blev Anders gjort mere sympatisk, men det var eksperten i alt, Raptus von And, der gjorde mest for tv-showet. I et andet tv-show Disney Sjov medvirkede Anders i tv-serierne Rip, Rap og Rup på eventyr, Bonkers, og Rap Sjak. I Rip, Rap og Rup på eventyr, var han sjældent med, men fik et nyt tøj. I Rap Sjak var hans matrostøj skiftet ud med en hawaii-skjorte med røde og hvide blomster. I Bonkers var han også med kort tid.
+
+Anders And gik til tegneserien allerede tidligt efter sin debut i 1934, hvor han i avisstriber optrådte med sin makker fra "The Wise Little Hen," Peter Gris. Fra den 10. februar 1935 blev han en del af Mickeys avisstribe som musens kujonagtige og drillesyge ven, men fra 1936 kaprede han hovedrollen i Silly Symphony-striben. Forfatteren Ted Osborne og tegneren Al Taliaferro, der stod bag serieudgaven af The Wise Little Hen, pressede på, og da det blev en succes kunne forfatteren Bob Karp i samarbejde med Taliaferro lave andens egen avisstribe.
+
+Det blev en populær serie. I de allertidligste serier var Anders en hidsig, ondskabsfuld og pueril and med langt spidst næb og hænder, der knap kunne skelnes fra vinger. Senere blev han mere voksen, da han fik ansvaret for sine tre nevøer Rip, Rap og Rup, og kæresten Andersine kom til sammen med Bedstemor And.
+
+Tegneseriefiguren Anders And blev senere udviklet yderligere af Carl Barks. I de tidlige tegnefilm var han for det meste doven og hidsig; men for at gøre hans figur brugbar til en tegneserie besluttede Barks at udvide hans personlighed. Anders' mest gennemgående karaktertræk er hans notoriske uheld, som desuden har den narrative funktion at give adgang til spændende eventyr, uden at serien udvikler sig for meget. På denne måde kan Anders eksempelvis blive involveret i alverdens skattejagter, og da han altid ender med at miste den fundne gevinst, kan alle historierne starte fra samme udgangspunkt. 
+
+For at give Anders en verden at bo i, skabte Barks byen Andeby i den amerikanske stat Calisota (som er en blanding af de to amerikanske stater Californien og Minnesota) med indbyggere som den rige onkel Joakim von And, den heldige Fætter Højben og den dygtige opfinder Georg Gearløs. 
+
+Anders lægger med sit engelske navn Donald Duck i øvrigt navn til donaldismen, fankulturen omkring Disney-tegneserier og -tegnefilm, som den norske forfatter Jon Gisle udviklede med sin bog af samme navn. 
+
+Anders bor i Andeby på Paradisæblevej 111 med sine tre nevøer Rip, Rap og Rup. De er stort set identiske, men de kan i nogle historier identificeres på, hvilken farve kasket de har på. 
+
+Ifølge Disneytegneserieforfatteren Don Rosa var Anders født et eller andet sted omkring 1920  men dette er "ikke" officielt. Ifølge Carl Barks' stamtræ (senere udviklet og genbygget af Don Rosa for den danske udgiver Egmont Serieforlaget) er Anders' forældre Hortensia von And og Rapmus And. Anders har en søster ved navn Della And, men hverken hun eller Anders' forældre optræder i tegnefilmene eller tegneserierne bortset fra særlige steder som eksempelvis i Her er dit liv, Joakim. Ifølge Don Rosa er Anders og Della tvillinger. 
+
+Fra tegnefilmen "Mr. Duck Steps Out" har Anders' kæreste været Andersine And, men han går i stadig fare for at miste hende til den heldige Fætter Højben. I nogle italienske historier er Anders også superhelt under dæknavnet "Stålanden".
+
+Anders' onkel, Joakim von And, er den rigeste and i verden.
+
+Sammen med onkelen og nevøerne Rip, Rap og Rup har Anders And rejst jorden rundt til mange forskellige lande og steder. Blandt disse er landet Langtbortistan, hvis navn blev opfundet af den danske oversætter Sonja Rindom og senere er gledet ind i almindeligt, dansk sprogbrug.
+
+I de tidlige historier af Carl Barks havde Anders en hale, der stak langt bagud. Han havde langt næb og lang hals, og hans matrostrøje havde fire knapper. Hans lange hals passede godt til egenskaben nysgerrighed og det lange næb til hans hidsighed, hvilket var to egenskaber, der prægede ham mest. Disse tidlige historier var også præget af en grov komik i stil med tegnefilmene.
+
+Siden fik han et mere strømlinet udseende og kortere næb (dog ikke så kort som visse tegnere i 1960'erne gjorde det!) og kun to knapper på trøjen, et udseende de øvrige andetegnere også tager til sig. Her blev hans natur også mere sammensat, og han ligner mest af alt en tragisk helt. Komikken kommer mere og mere til at ligge i replikkerne.
+
+Anders And optræder særligt i jumbobøgerne med en hemmelig identitet i form af superhelten Stålanden. Figuren er inspireret af Batman og er skabt af den italienske forfatter Guido Martina i samarbejde med kunstneren Giovan Battista Carpi i 1969 i hans italienske navn Paperinik. Ofte tegnet af Romano Scarpa.
+
+I lighed med inspirationskilden er han maskeret og har et hav af tekniske opfindelser, som han bruger i kamp mod forbryderne og  overvejende!  i kamp for at redde sit andet jeg, Anders And, ud af kniben. Den eneste, som kender hans hemmelige identitet, er opfinderen Georg Gearløs, som har udstyret gamle 313 med moderne udstyr og finurligheder. Det er ikke så tit at Stålanden optræder; næsten kun i Jumbobøger, men har dog også optrådt i Anders And-bladene med en gæstehistorie, hvor Stålanden kæmper mod en tidligere fjende, som nu havde kaldt sig Lord Hvalros.
+
+Efter at Stålanden i starten af 1990'erne ikke var benyttet så meget af historieskriverne, forsvandt han næsten ud af Disney-universet indtil 1996, hvor en ny serie, "Stålanden på nye eventyr", startede med Stålanden i hovedrollen (umiddelbart inspireret af Marvel universet). Denne relancering af Stålanden gav karakteren det ekstra, der skulle til for at få et godt comeback.
+
+I modsætning til størstedelen af Anders And-tegneserier har denne serie en sammenhængende forløb. I serien optræder kun sjældent de andre figurer fra de normale Anders And tegneserier; oftest er det kun en kort birolle eller en reference, men til gengæld er en mængde nye figurer kommet til. 
+
+Serien starter med, at Anders And er ansat som vicevært i Ducklair Tower, et højhus bygget af mangemilliardæren Everett Ducklair, en fremragende videnskabsmand og opfinder, som forlod Andeby og drog til et tibetansk kloster, Dhasam-Bul. Anders finder Globus, en kunstig intelligens skabt af Ducklair, samt Ducklair's arsenal af våben og opfindelser. Dette bliver starten på Anders' liv som Stålanden.
+En mængde temaer var ofte i centrum for historierne, bl.a. tidsrejser og Tidspolitiets kamp med tidspiraterne fra Organisationen, invasion fra rummet af de magtsyge evronianere, Stålandens samarbejde med FBI og meget mere.
+
+Serien fik en fornyelse i 2001, hvilket ændrede markant på historierne. Everett Ducklair vender tilbage, slukker Globus, smider Stålanden ud af Ducklair Tower og genopretter sit gamle imperium. Undervejs bliver Ducklair's to døtre afsløret. De hader begge Everett af grunde, der ikke bliver afsløret til fulde, selvom det bliver antydet, at Everett skilte sig af med deres mor på en eller anden måde.
+Denne fornyelse holdt 18 numre, før serien blev afsluttet, dog uden at historierne fik en slutning.
+
+Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i ''';
diff --git a/benchmarks/Utf8Encode/dart2/entext_ascii_10k.dart b/benchmarks/Utf8Encode/dart2/entext_ascii_10k.dart
new file mode 100644
index 0000000..82cb721
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/entext_ascii_10k.dart
@@ -0,0 +1,35 @@
+// This text is an extract from the English Wikipedia article about Anarchism:
+// https://en.wikipedia.org/wiki/Anarchism
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String en = '''
+Anarchism
+
+Anarchism is a radical political movement that is highly skeptical towards authority and rejects all forms of unjust hierarchy. It calls for the abolition of the state which it holds to be undesirable, unnecessary, and harmful. Anarchism advocates for the replacement of the state with stateless societies or other forms of free associations.
+
+Anarchism's timeline stretches back to prehistory when people lived in anarchistic societies long before the establishment of formal states, kingdoms or empires. With the rise of organised hierarchical bodies, skepticism towards authority also rose, but it was not until the 19th century a self-conscious political movement was formed. During the latest half of 19th and the first decades of 20th century, the anarchist movement flourished to most parts of the world, and had a significant role in worker's struggles for emancipation. Various branches of anarchism were espoused during those times. Anarchists took part in several revolutions, most notably in the Spanish Civil War, where they were crushed by the fascists forces in 1939, marking the end of the classical era of anarchism. In the latest decades of the 20th century, the anarchist movement nonetheless became relevant and vivid once more. 
+
+Anarchism employ various tactics in order to meet their ideal ends; these can be broadly separated in revolutionary and evolutionary tactics. There is significant overlap between the two legs which are merely descriptive. Revolutionary tactics aim to bring down authority and state, and have taken a violent turn in the past. Evolutionary tactics aim to prefigure what an anarchist society would be like. Anarchism's thought, criticism and praxis has played a part in diverse fields of human society.
+
+The etymological origin of the word "anarchism" is from the ancient Greek word "anarkhia", meaning "without a ruler", composed of the prefix "an-" (i.e. "without") and the word "arkhos" (i.e. "leader" or "ruler"). The suffix -ism denotes the ideological current that favours anarchy. The word "anarchism" appears in English from 1642 as "anarchisme" and the word "anarchy" from 1539. Various factions within the French Revolution labelled their opponents as "anarchists", although few such accused shared many views with later anarchists. Many revolutionaries of the 19th century such as William Godwin (17561836) and Wilhelm Weitling (18081871) would contribute to the anarchist doctrines of the next generation, but they did not use the word "anarchist" or "anarchism" in describing themselves or their beliefs.
+
+The first political philosopher to call himself an "anarchist" () was Pierre-Joseph Proudhon (18091865), marking the formal birth of anarchism in the mid-19th century. Since the 1890s and beginning in France, the term "libertarianism" has often been used as a synonym for anarchism and its use as a synonym is still common outside the United States. On the other hand, some use "libertarianism" to refer to individualistic free-market philosophy only, referring to free-market anarchism as libertarian anarchism.
+
+While opposition to the state is central to anarchist thought, defining anarchism is not an easy task as there is a lot of talk among scholars and anarchists on the matter and various currents perceive anarchism slightly differently. Hence, it might be true to say that anarchism is a cluster of political philosophies opposing authority and hierarchical organization (including the state, capitalism, nationalism and all associated institutions) in the conduct of all human relations in favour of a society based on voluntary association, on freedom and on decentralisation, but this definition has the same shortcomings as the definition based on etymology (which is simply a negation of a ruler), or based on anti-statism (anarchism is much more than that) or even the anti-authoritarian (which is an "a posteriori" conclusion). Nonetheless, major elements of the definition of anarchism include the following:
+
+During the prehistoric era of mankind, an established authority did not exist. It was after the creation of towns and cities that institutions of authority were established and anarchistic ideas espoused as a reaction. Most notable precursors to anarchism in the ancient world were in China and Greece. In China, philosophical anarchism (i.e the discussion on the legitimacy of the state) was delineated by Taoist philosophers Zhuangzi and Lao Tzu. Likewise, anarchic attitudes were articulated by tragedians and philosophers in Greece. Aeschylus and Sophocles used the myth of Antigone to illustrate the conflict between rules set by the state and personal autonomy. Socrates questioned Athenian authorities constantly and insisted to the right of individual freedom of consciousness. Cynics dismissed human law ("nomos") and associated authorities while trying to live according to nature ("physis"). Stoics were supportive of a society based on unofficial and friendly relations among its citizens without the presence of a state.
+
+During the Middle Ages, there was no anarchistic activity except some ascetic religious movements in the Islamic world or in Christian Europe. This kind of tradition later gave birth to religious anarchism. In Persia, Mazdak called for an egalitarian society and the abolition of monarchy, only to be soon executed by the king. In Basra, religious sects preached against the state. In Europe, various sects developed anti-state and libertarian tendencies. Libertarian ideas further emerged during the Renaissance with the spread of reasoning and humanism through Europe. Novelists fictionalised ideal societies that were based not on coercion but voluntarism. The Enlightenment further pushed towards anarchism with the optimism for social progress.
+
+During the French Revolution, the partisan groups of Enrags and saw a turning point in the fermentation of anti-state and federalist sentiments. The first anarchist currents developed throughout the 18th centuryWilliam Godwin espoused philosophical anarchism in England, morally delegitimizing the state, Max Stirner's thinking paved the way to individualism, and Pierre-Joseph Proudhon's theory of mutualism found fertile soil in France. This era of classical anarchism lasted until the end of the Spanish Civil War of 1936 and is considered the golden age of anarchism.
+Drawing from mutualism, Mikhail Bakunin founded collectivist anarchism and entered the International Workingmen's Association, a class worker union later known as the First International that formed in 1864 to unite diverse revolutionary currents. The International became a significant political force, and Karl Marx a leading figure and a member of its General Council. Bakunin's faction, the Jura Federation and Proudhon's followers, the mutualists, opposed Marxist state socialism, advocating political abstentionism and small property holdings. After bitter disputes the Bakuninists were expelled from the International by the Marxists at the 1872 Hague Congress. Bakunin famously predicted that if revolutionaries gained power by Marxist's terms, they would end up the new tyrants of workers. After being expelled, anarchists formed the St. Imier International. Under the influence of Peter Kropotkin, a Russian philosopher and scientist, anarcho-communism overlapped with collectivism. Anarcho-communists, who drew inspiration from the 1871 Paris Commune, advocated for free federation and distribution of goods according to one's needs.
+
+At the turning of the century, anarchism had spread all over the world. In China, small groups of students imported the humanistic pro-science version of anarcho-communism. Tokyo was a hotspot for rebellious youth from countries of the far east, pouring into the Japanese capital to study. In Latin America, So Paulo was a stronghold for anarcho-syndicalism where it became the most prominent left-wing ideology. During this time, a minority of anarchists adopted tactics of revolutionary political violence. This strategy became known as propaganda of the deed. The dismemberment of the French socialist movement into many groups and the execution and exile of many Communards to penal colonies following the suppression of the Paris Commune favoured individualist political expression and acts. Even though many anarchists distanced themselves from these terrorist acts, infamy came upon the movement. Illegalism was another strategy which some anarchists adopted these same years.
+Anarchists enthusiastically participated in the Russian Revolutiondespite concernsin opposition to the Whites. However, they met harsh suppression after the Bolshevik government was stabilized. Several anarchists from Petrograd and Moscow fled to Ukraine, notably leading to the Kronstadt rebellion and Nestor Makhno's struggle in the Free Territory. With the anarchists being crushed in Russia, two new antithetical currents emerged, namely platformism and synthesis anarchism. The former sought to create a coherent group that would push for the revolution while the latter were against anything that would resemble a political party. Seeing the victories of the Bolsheviks in the October Revolution and the resulting Russian Civil War, many workers and activists turned to communist parties which grew at the expense of anarchism and other socialist movements. In France and the United States, members of major syndicalist movements, the General Confederation of Labour and Industrial Workers of the World, left their organisations and joined the Communist International.
+
+In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised ''';
diff --git a/benchmarks/Utf8Encode/dart2/netext_3_10k.dart b/benchmarks/Utf8Encode/dart2/netext_3_10k.dart
new file mode 100644
index 0000000..8fce550
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/netext_3_10k.dart
@@ -0,0 +1,24 @@
+// This text is an extract from the Nepali Wikipedia article about Nepal
+// (नेपाल): https://ne.wikipedia.org/wiki/नेपाल
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String ne = '''
+नेपाल
+
+नेपाल (आधिकारिक नाम: सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल) दक्षिण एसियाली भूपरिवेष्ठित हिमाली राष्ट्र हो । यसको भौगोलिक अक्षांश २६ डिग्री २२ मिनेटदेखि ३० डिग्री २७ मिनेट उत्तर र ८० डिग्री ४ मिनेटदेखि ८८ डिग्री १२ मिनेट पूर्वी देशान्तरसम्म फैलिएको छ । यसको कूल क्षेत्रफल १,४७,१८१ वर्ग कि.मि छ । यो क्षेत्रफल पृथ्वीको कूल क्षेत्रफलको ०.०३% र एसिया महादेशको ०.३% पर्दछ । लण्डन स्थित "ग्रीनवीच मिनटाइम" भन्दा पूर्वतर्फ रहेकोले गौरीशङ्कर हिमालको नजिक भएर जाने ८६ डिग्री १५ मिनेट पूर्वी देशान्तरलाई आधार मानी नेपालको प्रमाणिक समय ५ घण्टा ४५ मिनेट आगाडि मानिएको छ ।
+
+नेपालको पूर्वी सीमाना मेची नदीदेखि पश्चिमी सीमाना महाकाली नदीसम्मको औसत लम्वाई ८८५ कि.मि. छ । उत्तरदेखि दक्षिणको चौडाई भने एकनासको छैन । पूर्वी भागभन्दा पश्चिमी भाग केही चौडा छ । त्यस्तै मध्य भाग भने केही खुम्चिएको छ । यसमा अधिकतम चौडाई २४१ कि.मि. र न्यूनतम चौडाई १४५ कि.मि. रहेको छ । यसर्थ नेपालको औसत चौडाई १९३ कि.मि. रहेको छ । नेपालको उत्तरमा चीनको स्वशासित क्षेत्र तिब्बत पर्दछ भने दक्षिण, पूर्व र पश्चिममा भारत पर्दछ । नेपालका ८०% भन्दा बढी नागरिक हिन्दू धर्म मान्दछन् जुन विश्वकै सबैभन्दा बढी प्रतिशत हिन्दू धर्मावलम्बी हुने राष्ट्र पनि हो । यसबाहेक बौद्ध, इस्लाम, किराॅत आदि धर्म मान्ने मानिसहरू पनि यहाँ बसोबास गर्दछन् । एउटा सानो क्षेत्रको लागि नेपालको भौगोलिक विविधता निकै उल्लेखनीय छ । यहाँ तराईका उष्ण फाँटदेखि चिसा हिमालयका शृंखला अवस्थित छन् । संसारका सबैभन्दा उच्च १४ हिमश्रृंखलाहरु मध्ये ८ वटा नेपालमा पर्दछन्, जसमध्ये संसारको सर्वोच्च शिखर सगरमाथा (नेपाल र चीनको सीमानामा पर्ने) पनि एक हो । नेपालको प्रमुख सहर एवं राजधानी काठमाडौं हो । काठमाडौं, ललितपुर र भक्तपुर सहरहरूलाई काठमाडौं उपत्यका भनेर चिनिन्छ । अन्य प्रमुख सहरहरूमा भरतपुर, बिराटनगर, भैरहवा, वीरगञ्ज, जनकपुर, पोखरा, नेपालगञ्ज, धनगढी र महेन्द्रनगर पर्दछन् । 
+
+नेपाल शब्दको उत्त्पत्ति बारेमा ठोस प्रमाण त उपलब्ध छैन, तर एक प्रसिद्ध विश्वास अनुसार मरिची ॠषि पुत्र 'ने' मुनिले पालन गरेको ठाउँको रूपमा यहाँको नाम नेपाल रहन गएको हो । निरन्तर रूपमा राजा-रजौटाहरूको अधीनमा रहेर फुट्ने र जुट्ने लामो तथा सम्पन्न इतिहास बोकेको, अहिले नेपाल भनेर चिनिने यो खण्डले वि. सं. २०४६ सालको आन्दोलन पश्चात् संवैधानिक राजतन्त्रको नीति अवलम्बन गर्‍यो । तर यस पश्चात् पनि राजसंस्था एक महत्त्वपूर्ण तथा अस्पष्ट परिधि तथा शक्ति भएको संस्थाको रूपमा रहिरह्यो । यो व्यवस्थामा पहिले संसदीय अनिश्चितता तथा सन् १९९६ देखि ने.क.पा.(माओवादी)को जनयुद्धको कारणले राष्ट्रिय अनिश्चितता देखियो । 
+
+माओवादीहरूले राजनीतिको मूलाधारबाट अल्लगिएर भूमिगत रूपमा राजतन्त्र तथा मूलाधारका राजनीतिक दलहरूको विरुद्धमा गुरिल्ला युद्ध सञ्चालन गरे, जसको कारण १३,००० भन्दा बढी मानिसहरूको ज्यान जान पुग्यो । यही विद्रोहलाई दमन गर्ने पृष्ठभूमिमा राजाले सन् २००२ मा संसदको विघटन गरी निर्वाचित प्रधानमन्त्रीलाई अपदस्त गरेर प्रधानमन्त्री मनोनित गर्दै शासन चलाउन थाले । सन् २००५ मा उनले एकनासै संकटकालको घोषणा गरेर सबै कार्यकारी शक्ति ग्रहण गरे। सन् २००६को लोकतान्त्रिक आन्दोलन (जनाअन्दोलन-२) पश्चात् राजाले देशको सार्वभौमसत्ता जनतालाई हस्तान्तरण गरे तथा अप्रिल २४, २००६ मा भंग गरिएको संसद पूनर्स्थापित भयो । मे १८, २००६ मा आफूले पाएको सार्वभौमसत्ताको उपयोग गर्दै नयाँ प्रतिनिधि सभाले राजाको अधिकारमा कटौती गर्‍यो तथा नेपाललाई एक धर्मनिरपेक्ष राष्ट्र घोषणा गर्‍यो । अन्तरिम व्यवस्थापिका संसदले पहिले नै घोषणा गरिसकेको "सङ्घीय लोकतान्त्रिक गणराज्य, संविधानसभा" को पहिलो बैठकबाट मे २८, २००८ मा आधिकारिक रूपमा कार्यान्वयन भयो । नेपालको भूगोल सानो भए पनी नेपालीहरु को मन ठुलो छ ।
+
+हिमालय क्षेत्रमा मानिसहरू बस्न थालेको कम्तिमा पनि ९,००० वर्ष भएको कुरा काठमाडौं उपत्यकामा पाइएका प्राचीन औजारहरूबाट पुष्टि हुन्छ। सम्भवत: भोट-बर्मेली मूलका मानिसहरू नेपालमा २,५०० वर्ष अगाडि बसोबास गर्दथे। 
+
+ईशापूर्व १५०० तिर इन्डो-आर्यन जातिहरू उपत्यका प्रवेश गरे। ईशापूर्वको १००० तिर स-साना राज्यहरू र राज्यसङ्गठनहरू बने। सिद्धार्थ गौतम (ईशापूर्व ५६३–४८३) त्यस्तै एक वंश, शाक्यवंशका राजकुमार थिए, जसले आफ्नो राजकाज त्यागी तपस्वीको जीवन अँगाले र उनी बुद्ध भनेर विश्व प्रसिद्ध भए। 
+ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर''';
diff --git a/benchmarks/Utf8Encode/dart2/rutext_2_10k.dart b/benchmarks/Utf8Encode/dart2/rutext_2_10k.dart
new file mode 100644
index 0000000..c61a665
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/rutext_2_10k.dart
@@ -0,0 +1,44 @@
+// This text is an extract from the Russian Wikipedia article about Lithuania
+// (Литва): https://ru.wikipedia.org/wiki/Литва
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String ru = '''
+Литва
+
+Литва́ (), официальное название  Лито́вская Респу́блика ()  государство, расположенное в северной части Европы. Столица страны  Вильнюс.
+
+Площадь  км². Протяжённость с севера на юг  280 км, а с запада на восток  370 км. Население составляет человек (сентябрь, 2019). Занимает 140-е место место в мире по численности населения и 121-е по территории. Имеет выход к Балтийскому морю, расположена на его восточном побережье. Береговая линия составляет всего 99 км (наименьший показатель среди государств Балтии). На севере граничит с Латвией, на юго-востоке  с Белоруссией, на юго-западе  с Польшей и Калининградской областью России.
+
+Член ООН с 1991 года, ЕС и НАТО  с 2004 года, ОЭСР  с мая 2018 года. Входит в Шенгенскую зону и Еврозону.
+
+Независимость страны провозглашена 11 марта 1990 года, а юридически оформлена 6 сентября 1991 года. .
+
+Этимология слова «Литва» точно не известна, при этом существует множество версий, ни одна из которых не получила всеобщего признания. Корень «лит» и его варианты «лет»/«лют» допускают различные толкования как в балтских и славянских, так и в других индоевропейских языках. Так, например, существуют созвучные топонимы на территории Словакии «"Lytva"» и Румынии «"Litua"», известные с XIXII веков. По мнению Е. Поспелова, топоним образован от древнего названия реки Летава (Lietavà от «лить», русское «Летаука»). Феодальное княжество, по землям которого протекала эта река, со временем заняло ведущее положение и название было распространено на всё государство. В «Повести временных лет» (XII век) упоминается этноним «литва», полностью совпадающий с названием местности «Литва» и по смыслу (территория, где живёт литва), и по форме.
+
+Поверхность  равнинная со следами древнего оледенения. Поля и луга занимают 57 % территории, леса и кустарники  30 %, болота  6 %, внутренние воды  1 %.
+
+Высшая точка  293,84 м над уровнем моря  холм Аукштояс (или Аукштасис калнас) в юго-восточной части страны, в 23,5 км от Вильнюса.
+
+Крупнейшие реки  Неман и Вилия.
+Более 3 тыс. озёр (1,5 % территории): крупнейшее из них  Друкшяй на границе Латвии, Литвы и Белоруссии (площадь 44,8 км²), самое глубокое  Таурагнас, 61 м), самое длинное  Асвея длинной в 30 км у местечка Дубингяй.
+
+Климат переходный от морского к континентальному. Средняя температура зимой 5 °C, летом +17 °C. Выпадает 748 мм осадков в год.
+
+Полезные ископаемые: торф, минеральные материалы, строительные материалы.
+
+Территория современной Литвы была заселена людьми с конца XIX тысячелетия до н. э. Жители занимались охотой и рыболовством, использовали лук и стрелы с кремнёвыми наконечниками, скребки для обработки кожи, удочки и сети. В конце неолита (IIIII тысячелетия до н. э.) на территорию современной Литвы проникли индоевропейские племена. Они занимались земледелием и скотоводством, при этом охота и рыболовство оставались основными занятиями местных жителей вплоть до широкого распространения железных орудий труда. Индоевропейцы, заселившие земли между устьями Вислы и Западной Двины, выделились в отдельную группу, названную учёными балтами.
+
+Традиционно считается, что этническая основа Литвы сформирована носителями археологической культуры восточнолитовских курганов, сложившейся в V веке н. э. на территории современных Восточной Литвы и Северо-Западной Белоруссии. Около VII века литовский язык отделился от латышского.
+
+Становление государственности на территории современной Литвы относят к XIII веку, при этом само название «Литва» впервые упомянуто в Кведлинбургских анналах под 1009 годом в сообщении об убийстве язычниками миссионера Бруно на границе Руси и Литвы. По наиболее распространённой версии, топоним возник от названия небольшой реки Летаука, притока Няриса. Согласно более современной гипотезе, название страны могло произойти от этнонима «леты» или «лейти», которым жители окрестных земель называли дружинников литовских князей.
+
+В начале XIII века в земли балтов-язычников с запада началось вторжение немецких рыцарей-крестоносцев. Они покорили Пруссию и Ливонию. В это же время с юга началась экспансия Галицко-Волынского княжества. К середине XIII века многие литовские земли были объединены под властью князя Миндовга, принявшего в 1251 году католическое крещение и коронованного в 1253 году. Через несколько лет Миндовг отрёкся от христианства и до начала XIV века литовские земли оставались языческими. Несмотря на то, что уже в 1263 году Миндовг был свергнут, его правление положило начало более чем пятисотлетнему существованию Великого княжества Литовского.
+
+В XIV  начале XV веках территория Великого княжества Литовского стремительно росла, в основном за счёт присоединения земель Западной Руси. Включение в состав государства славянских земель, многократно превышающих по площади и количеству населения собственно литовские земли, привело к перениманию литовскими князьями, получившими во владение русские земли, православной культуры и западнорусского языка. Со временем западнорусский язык стал официальным языком канцелярии великих князей. Собственно литовский язык до XVI века оставался бесписьменным, хотя и продолжал использоваться на этнически литовских землях.
+
+В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.''';
diff --git a/benchmarks/Utf8Encode/dart2/sktext_10k.dart b/benchmarks/Utf8Encode/dart2/sktext_10k.dart
new file mode 100644
index 0000000..7dc2d13
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/sktext_10k.dart
@@ -0,0 +1,46 @@
+// This text is an extract from the Slovak Wikipedia article about Esperanto:
+// https://sk.wikipedia.org/wiki/Esperanto
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String sk = '''
+Esperanto (pôvodne Lingvo Internacia – „medzinárodný jazyk“) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.
+
+Hoci žiaden štát neprijal esperanto ako úradný jazyk, používa ho komunita s odhadovaným počtom hovoriacich 100 000 až 2 000 000, z čoho približne 2 000 tvoria rodení hovoriaci. V Poľsku je na zozname nemateriálneho kultúrneho dedičstva. Získalo aj isté medzinárodné uznania, napríklad dve rezolúcie UNESCO či podporu známych osobností verejného života. V súčasnosti sa esperanto využíva pri cestovaní, korešpondencii, medzinárodných stretnutiach a kultúrnych výmenách, kongresoch, vedeckých diskusiách, v pôvodnej aj prekladovej literatúre, divadle a kine, hudbe, tlačenom aj internetovom spravodajstve, rozhlasovom a televíznom vysielaní.
+
+Slovná zásoba esperanta pochádza predovšetkým zo západoeurópskych jazykov, zatiaľ čo jeho skladba a tvaroslovie ukazujú na silný slovanský vplyv. Morfémy sú nemenné a je možné ich kombinovať takmer bez obmedzení do rozmanitých slov; esperanto má teda mnoho spoločného s analytickými jazykmi, ako je čínština, zatiaľ čo vnútorná stavba jeho slov pripomína jazyky aglutinačné, ako je japončina, swahilčina alebo turečtina.
+
+Pri zrode esperanta stál Ludwik Lejzer Zamenhof. Vyrastal v mnohojazyčnom, vtedy ruskom, teraz poľskom meste Białystok, kde bol svedkom častých sporov medzi jednotlivými národnosťami (Rusi, Poliaci, Nemci, Židia). Pretože za jednu z hlavných príčin týchto sporov považoval neexistenciu spoločného jazyka, začal už ako školák pracovať na projekte reči, ktorá by túto funkciu mohla plniť. Mala byť, na rozdiel od národných jazykov, neutrálna a ľahko naučiteľná, teda prijateľná ako druhý jazyk pre všetkých, jazyk vyučovaný spoločne s národnými jazykmi a používaný v situáciách vyžadujúcich dorozumenie medzi národmi.
+
+Zamenhof najskôr uvažoval o oživení latinčiny, ktorú sa učil v škole, ale usúdil, že je pre bežné dorozumievanie zbytočne zložitá. Keď študoval angličtinu, všimol si, že časovanie slovies podľa osoby a čísla nie je nutné; že gramatický systém jazyka môže byť oveľa jednoduchší, než sa dovtedy nazdával. Stále však zostávala prekážka v memorovaní sa veľkého množstva slov. Raz Zamenhofa zaujali dva ruské nápisy: "швейцарская" [švejcarskaja] (vrátnica, odvodené od "швейцар" [švejcar] – vrátnik) a "кондитерская" [konditerskaja] (cukráreň, odvodené od "кондитер" [konditér] – cukrár). Tieto slová rovnakého zakončenia mu vnukli myšlienku, že používanie pravidelných predpôn a prípon by mohlo významne znížiť množstvo slovných koreňov nutných na dorozumenie sa. Aby boli korene čo najmedzinárodnejšie, rozhodol sa prevziať slovnú zásobu predovšetkým z románskych a germánskych jazykov, teda tých, ktoré boli vtedy v školách po celom svete vyučované najčastejšie.
+Prvý Zamenhofov projekt, nazvaný "Lingwe uniwersala," bol viac-menej hotový už v roku 1878, ale autorov otec, učiteľ jazykov, považoval túto prácu za márnu a utopistickú, a zrejme preto rukopis, ktorý mu bol zverený, zničil. V rokoch 1879 – 1885 Zamenhof študoval medicínu v Moskve a vo Varšave. V tej dobe začal znova pracovať na medzinárodnom jazyku. Prvú obnovenú verziu vyučoval v roku 1879 pre svojich priateľov. Po niekoľkých rokoch už prekladal poéziu, aby jazyk čo najviac zdokonalil. V roku 1885 autor napísal: 
+
+Zamenhofovi prichádzalo veľa nadšených listov, ktoré často prinášali najrôznejšie návrhy úprav jazyka. Všetky podnety zaznamenával a neskoršie ich začal uverejňovať v časopise "Esperantisto", vychádzajúcom v Norimbergu. V tom istom časopise aj dal o úpravách dvakrát hlasovať, väčšina čitateľov však so zmenami nesúhlasila. Po týchto hlasovaniach na určitý čas utíchli hlasy volajúce po reforme a jazyk sa začal rozširovať. Najviac odberateľov mal časopis vo vtedajšom Rusku. Veľkou ranou preň bolo, keď ruská cenzúra jeho šírenie zakázala kvôli článku Leva Nikolajeviča Tolstého. Časopis kvôli tomu musel byť zrušený, krátko na to bol však vystriedaný novým, nazvaným "Lingvo Internacia." Najskôr ho redigovali vo švédskej Uppsale, neskôr v Maďarsku a nakoniec v Paríži, kde jeho vydávanie zastavila až prvá svetová vojna.
+
+Nový medzinárodný jazyk začali jeho používatelia skoro používať aj na organizáciu odbornej a záujmovej činnosti na medzinárodnej úrovni. V prvých desaťročiach prebiehala komunikácia v esperante takmer výhradne písomnou formou. Ale po nečakane úspešnom prvom Svetovom kongrese esperanta, usporiadanom v roku 1905 vo francúzskom meste Boulogne-sur-Mer, na ktorom sa overili možnosti používania tejto reči v hovorenej forme, začali naberať na intenzite aj osobné kontakty.
+
+Esperanto začali pre svoju činnosť používať aj rôzne organizácie a hnutia. Už na svetovom kongrese v Barcelone roku 1909 sa uskutočnilo niekoľko stretnutí prítomných katolíkov, ktorí sa nakoniec rozhodli usporiadať v nadchádzajúcom roku, 1910, samostatný kongres katolíckych esperantistov. Počas neho bolo založené Medzinárodné združenie katolíckych esperantistov (IKUE – Internacia Katolika Unuiĝo Esperantista). Časopis "Espero Katolika" ("Katolícka nádej") vychádzal už od roku 1903 a s viac ako 100 rokmi svojej existencie je dnes najdlhšie vychádzajúcim esperantským periodikom.
+
+V roku 1912 sa Zamenhof pri slávnostnom prejave ôsmeho Svetového kongresu esperanta v Krakove vzdal svojej oficiálnej úlohy v hnutí. Desiaty kongres sa mal konať v roku 1914 v Paríži, prihlásilo sa naň takmer 4 000 ľudí, ale nakoniec ho zrušili pre začínajúcu vojnu, Zamenhof sa vtedy musel vrátiť domov cez škandinávske štáty.
+
+Po vojne túžba po harmónii a mieri vzbudila nové nádeje, vďaka čomu sa esperanto veľmi rýchlo šírilo. Prvý povojnový kongres sa konal v roku 1920 v Haagu, 13. svetový kongres v 1921 v Prahe. V roku 1927 bolo vo viedenskom Hofburgu otvorené Medzinárodné esperantské múzeum, v roku 1929 bolo pripojené k Rakúskej národnej knižnici a dnes sídli v samostatnej budove.
+
+Snahy o presadenie esperanta ako univerzálneho jazyka sa stretávali s pozitívnou odozvou: Petíciu v jeho prospech adresovanú Organizácii Spojených národov podpísalo vyše 80 miliónov ľudí, v Česko-Slovensku napríklad prof. Jaroslav Heyrovský, nositeľ Nobelovej ceny.
+
+Valné zhromaždenie UNESCO prijalo podobné rezolúcie v Montevideu 10. decembra 1954 a v Sofii 8. novembra 1985. Vzalo v nich na vedomie "výsledky dosiahnuté esperantom na poli medzinárodnej duchovnej výmeny aj zblíženia národov sveta" a vyzvalo členské štáty, "aby sa chopili iniciatívy pri zavádzaní študijných programov o jazykovom probléme a esperante na svojich školách a inštitúciách vyššieho vzdelávania".
+
+K esperantu sa hlásila aj rada predsedov Poľskej akadémie vied. Jubilejného 72. Svetového kongresu esperanta roku 1987 (100. výročie uverejnenia prvej učebnice jazyka) sa vo Varšave zúčastnilo takmer 6 000 ľudí zo 60 národov.
+
+Pokroky dosiahli aj katolícki esperantisti – roku 1990 bol vydaný dokument "Norme per la celebrazione della Messa in esperanto", ktorým Svätá stolica povoľuje vysluhovať sväté omše v tomto jazyku bez zvláštneho povolenia. Esperanto sa tak stalo jediným schváleným umelým liturgickým jazykom katolíckej cirkvi.
+
+Skutočnosť, že mnohé z cieľov esperantského hnutia sa doteraz nepodarilo naplniť, je často prisudzovaná okrem iného technologickej a kultúrnej dominancii Spojeného kráľovstva a Spojených štátov amerických, predovšetkým v období po druhej svetovej vojne, vďaka čomu je v súčasnosti dorozumievacím jazykom väčšiny medzinárodných činností angličtina.
+
+Už na začiatku 20. storočia bolo na území dnešného Slovenska (vtedy severná časť Uhorska) činné esperantské hnutie. Esperantistov a kluby zastrešovala „Uhorská esperantská spoločnosť” a „Verda Standardo”. V Prahe boli činné spolky "Bohema Unio Esperantista", ktorý prijímal len organizácie a kluby, a "Bohema Asocio Esperantista", ktorý prijímal jednotlivcov. Oba spolky vydávali svoje časopisy. V roku 1907, 20 rokov po zverejnení jazyka Zamenhofom, vydal tolstojovec Albert Škarvan spolu s Rusom N. P. Evstifejevom prvú učebnicu esperanta v slovenčine, „Základy medzinárodnej reči ESPERANTO“.
+
+Po prvej svetovej vojne sa oba pražské spolky zlúčili do "Československej Esperantskej Asociácie". Tá bola v roku 1936 premenovaná na "Esperantskú Asociáciu v Československej republike". V tomto období bolo hnutie veľmi aktívne, fungovalo mnoho klubov, konalo sa veľa prednášok a kurzov. Esperanto bolo vyučované na školách rôznych stupňov, rádio Bratislava od 1930 vysielalo kurzy a od 1932 aj kultúrny program v esperante. Bola vydaná "Československá antológia" predstavujúca diela 20 slovenských autorov. V rámci protifašistickej aktivity vychádzali aj preklady protifašistických článkov z esperantských časopisov z obdobia Španielskej občianskej vojny.
+
+Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.''';
diff --git a/benchmarks/Utf8Encode/dart2/zhtext_10k.dart b/benchmarks/Utf8Encode/dart2/zhtext_10k.dart
new file mode 100644
index 0000000..b5e2a54
--- /dev/null
+++ b/benchmarks/Utf8Encode/dart2/zhtext_10k.dart
@@ -0,0 +1,73 @@
+// This text is an extract from the Chinese Wikipedia article about Kanji
+// (汉字): https://zh.wikipedia.org/wiki/汉字
+//
+// The extract is based on the Wikipedia database dump. All markup has been
+// removed using WikiExtractor: https://github.com/attardi/wikiextractor
+//
+// The material is licensed under the Creative Commons Attribution-Share-Alike
+// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
+
+const String zh = '''
+最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
+
+中文汉字中,笔画最多的汉字可能是“”,是一种面食的名称,此字至今习用,其不同写法的笔画数在54至71画之间不等。被传统辞典收录的笔画最多的汉字为《字汇补》、《汉语大字典》中由四个“-{龍}-”字组成的「」字,共64画;同樣屬於64劃的字由四個“-{興}-”字組成的“𠔻”字,收入自《中文大辭典》;之後的是由四個「雷」字組成的“䨻”字,有52劃,收錄於《說文解字》。
+
+另外,日本汉字「」收录于日本的TRON计划中,但此字无法提供有效证据表明其确有使用,因此状况存疑。该字由3個「-{龍}-」字和3個「-{雲}-」個組合而成,共有84劃。该字曾提交到当时的统一码扩展C区,编号为JMK66147,后因扩展C区的时间原因被安排到了扩展D区,之后因找不到合适证据被撤销。最后提交到扩展G区并被接受。
+
+現在,純漢字僅僅被用於記錄漢語。而漢字和假名一起被用於記錄日語。
+
+其他一些民族在早期會將漢字單純作為表音文字來記錄他們的語言。如蒙古語最早的文獻蒙古秘史即用純漢字當做表音文字進行記錄。日語最早的文獻也是把漢字當做表音文字來記錄日語,後來演變出萬葉假名。
+
+契丹文、女真文、西夏文的創製受到了漢字的影響,它們跟漢字一樣都是方塊型文字,筆畫形狀也極其類似,也採用類似六書的造字法。但這些文字除個別字與漢字外形相同外,絕大部分字形都跟漢字不同,因此在Unicode中它們都是獨立區塊編碼的。
+
+古壯字(方塊壯字)、古白字(方塊白字)、古布依字(方塊布依字)、字喃等文字可以說是漢字在其他語言中的擴充,因為它們很大一部分本身就是漢字(賦予新義),另一些則是用已有漢字偏旁組合構成新字,因此,這些文字的外觀上與漢字很相似,在Unicode中與漢字一道編入漢字區。
+
+女書是用於記錄漢語的另一種文字,它們的造字法與六書有部分相似之處,但字的外觀與漢字差異較大,Unicode中作為獨立區塊編碼。
+
+以上文字都因各種原因而消亡,如今除專家學者外無幾人能識。
+
+日語的假名()是由漢字的草體、簡筆演變而成的。諺文和日語假名一樣可以和漢字一同混寫。
+
+此外如蒙古文、滿文、錫伯文等也是在漢字書寫方式和書寫工具的影響下,將從右向左書寫的源自察合台文的書寫方式改為從上到下書寫,文字的結構也隨之有所變化。
+
+漢字是承載文化的重要工具,目前留有大量用漢字書寫的典籍。不同的方言、甚至語言都使用漢字作為共同書寫體系。在古代日本、朝鮮半島、越南、琉球群島,以及位於婆羅洲的蘭芳共和國,漢字都曾是該國正式文書的唯一系統,因而漢字在歷史上對文明的傳播分享有著重要作用。
+
+由於漢字和發聲的聯繫不是非常密切,比較容易被其他民族所借用,如日本、朝鮮半島和越南都曾經有過不會說漢語,單純用漢字書寫的歷史階段。漢字的這個特點對於維繫一個文化圈—一個充滿各種互相不能交流的方言群體的民族——發揮了主要的作用。
+
+漢字對周邊國家的文化產生過巨大的影響,形成了一個共同使用漢字的漢字文化圈,在日本、越南和朝鮮半島、琉球群島,漢字被融合成它們語言的文字「」、「」、「」。直到現在,日語中仍然把漢字認為是書寫體系的一部分。在北韓和越南,已經完全不再使用漢字;在韓國,漢字的使用在近幾十年來越來越少;但是由於朝鮮語/韓語中使用了大量的漢字詞彙,並且重音現象嚴重,所以在需要嚴謹表達的場合時仍然會使用漢字。雖然在通常情況下人名、公司機構名稱等均使用韓文書寫,不過大多數的人名、公司機構均有其對應的漢字名稱。
+
+漢字於公元3世紀經朝鮮半島輾轉傳入日本。二戰後日本開始限制漢字的數量和使用,頒布了《當用漢字表》及《人名用字表》等,其中簡化了部分漢字(日本新字體),不過文學創作使用的漢字,並不在限制之列。日本除從中文中傳入的漢字外,還創造和簡化了一些漢字,如「-{辻}-」(十字路口)、「-{栃}-」、「-{峠}-」(山道)和「-{広}-」(廣)、「-{転}-」(轉)、「-{働}-」(勞動)等。
+
+公元3世紀左右,漢字傳入了朝鮮半島,朝鮮語/韓語曾經完全使用漢字來書寫。相傳薛聰在當時發明了吏讀,把朝鮮語用同音或同義的漢字來表示。例如:「乙」字被用來表示韓語中的後綴「-l()」。由於有不少發音都沒有對應的漢字,所以朝鮮半島的人民又運用組字法,把兩個或多個漢字合組成為一個新的吏讀字。相傳後來的契丹文就是受到吏讀字的影響。此外尚有鄉札、口訣等以漢字表記朝鮮語的方法。
+
+1443年,朝鮮世宗大王頒布《訓民正音》,發明了諺文與漢字一起使用,但當中有不少部件仍然有昔日吏讀字的痕跡。現在的大韓民國雖禁止在正式場合下使用漢字,並停止了在中小學中教授漢字(但是從2011年開始,大韓民國的李明博政府已經決定將漢字重新納入中小學的課程裡),不過漢字在民間仍在繼續使用,且可以按照個人習慣書寫,但是現在能寫一筆漂亮漢字的韓國人越來越少。朝鮮民主主義人民共和國於1948年廢除了漢字,僅保留了十幾個漢字(參見廢除漢字)。
+
+公元1世紀漢字便傳入了越南,越南語也曾完全使用漢字做為書寫用文字,並在漢字的基礎上創造了喃字,但是由於書寫不便,漢字仍是主要的書寫方式。
+
+1945年越南民主共和國成立後廢除漢字,使用了稱為「國語字」的拼音文字。現在的越南文已經看不出漢字的痕跡了。
+
+中國許多民俗都與漢字有關,例如:
+
+漢字獨特優美的結構,書寫的主要工具——毛筆有多樣的表現力,因而產生了中文獨特的造型藝術——書法。而篆刻是和書法相關的藝術,用刀在石材上雕刻出篆字作為印章,尚有勒石、山壁題字等。
+同一个汉字,可以有不同的字体。當前漢字字體主要有篆書、隷書、草書、行書、楷書等。
+
+漢字歷史上是不斷在組新字的,目前的各種漢字並非同时定型于某一年代,而是應時代需要逐渐發展而来的。例如:“人”字在商朝就已出现,“凹”字和“凸”字則是在唐朝才出現的。
+
+此外不同的行業也会因用字需求而造字。例如:中国的傳統音乐在記譜上會使用減字譜、工尺譜。
+
+自十九世紀中葉後,亞洲和西方都發佈了很多漢字拉丁化方案,如:
+
+現在,漢語拼音方案是使用最廣且被聯合國接受的汉字拉丁化方案。而威妥瑪拼音歷史悠久,至今仍用於臺灣的人名、地名拼寫。
+汉字中存在许多异体字,它们的意义和读音完全相同,只是写法不同。异体字的产生部分是由于历史原因,有的则是人为造字,如「和、咊、-{龢}-」、「秋、-{秌}-、龝」等。
+
+臺灣也有使用所謂的異體字,例如“-{臺}-”與“-{台}-”、“-{體}-”與“-{体}-”以及“-{學}-”與“-{学}-”等等。
+
+中国大陆於1956年公布整理异体字表,废除了大量异体字,但後來因為各種原因恢復了部分異體字。如“-{於}-”曾被當作“-{于}-”的異體字廢除掉,但在1988年發表的《現代漢語通用字表》中又恢復成為規範字,因爲姓氏中「-{于}-」和「-{於}-」同時存在,不宜合併。另外,不同地區對異體字的取捨有所不同,例如:韓國就以漢字各種異體字中最早出現的樣式為標準寫法。所以,在韓語漢字的標準中,取“甛”而不取“甜”、取“-{幇}-”而不取“-{幫}-”、取“-{畵}-”而不取“-{畫}-”。
+
+由于英文文字是由26个字母排列组合而成的文字,因此可以简化输入步骤;相比较之下汉字则不能如此,从字形上汉字虽然可以拆解成不同的部分,但是被分成的部首或偏旁数量过多,这样不但不能达到简化输入的目的,反而显得更为繁琐。于是从汉字字音上去考虑,汉字输入被分成少量的语音元素组合排列,反而可以达到简化输入的步骤。因为是语音输入对汉字的读音必须清楚,某些生僻字或不知道汉字发音的则会很困难,这在一定程度上限制了汉字的输入。
+
+由于打字機鍵盤是為歐美文字設計的,在設計時本身沒有考慮汉字輸入的問題,輸入漢字往往比輸入拼音文字困難。汉字没有经过中文打字機的普及,直接进入了電腦中文信息处理阶段。在電腦發明初期曾引起漢字能否適應電腦時代的問題,支持漢字拉丁化的學者甚至以此為理據。
+
+随着各种中文输入法的出现,汉字的计算机输入、存储、输出技术得到了基本解决,大大提高了中文写作、出版、信息检索等的效率。目前中文输入法有上千种之多,主要包括表音输入和表形输入两类,也有两者兼之的。汉字的语音输入、手写识别和光学字符识别(OCR)技术也已得到广泛应用。
+
+如收录数千字的GB 2312(中國大陸)、B''';
diff --git a/build/fuchsia/dart.cmx b/build/fuchsia/dart.cmx
index f8f5750..d57d9ac 100644
--- a/build/fuchsia/dart.cmx
+++ b/build/fuchsia/dart.cmx
@@ -18,7 +18,6 @@
       "fuchsia.intl.PropertyProvider",
       "fuchsia.logger.LogSink",
       "fuchsia.net.NameLookup",
-      "fuchsia.netstack.Netstack",
       "fuchsia.posix.socket.Provider",
       "fuchsia.sysmem.Allocator",
       "fuchsia.timezone.Timezone",
diff --git a/pkg/_js_interop_checks/pubspec.yaml b/pkg/_js_interop_checks/pubspec.yaml
index 336d433..89f71c4 100644
--- a/pkg/_js_interop_checks/pubspec.yaml
+++ b/pkg/_js_interop_checks/pubspec.yaml
@@ -4,3 +4,7 @@
 
 environment:
   sdk: '>=2.7.0 <3.0.0'
+
+dependencies:
+  _fe_analyzer_shared: ../_fe_analyzer_shared
+  kernel: ../kernel
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index 06cc63c..11d3066 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -35,6 +35,8 @@
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
+import 'package:analyzer/src/dart/analysis/experiments.dart'
+    as analyzer_features;
 import 'package:analyzer/src/dart/analysis/file_byte_store.dart'
     show EvictingFileByteStore;
 import 'package:analyzer/src/dart/analysis/file_state.dart' as nd;
@@ -157,8 +159,10 @@
     var pluginWatcher = PluginWatcher(resourceProvider, pluginManager);
 
     defaultContextOptions.contextFeatures =
-        analyzer_features.FeatureSet.fromEnableFlags(
-            options.enabledExperiments);
+        analyzer_features.FeatureSet.fromEnableFlags2(
+      sdkLanguageVersion: analyzer_features.ExperimentStatus.currentVersion,
+      flags: options.enabledExperiments,
+    );
     defaultContextOptions.useFastaParser = options.useFastaParser;
 
     {
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 1e64f55..0f1267b 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
@@ -37,6 +37,7 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/exception/exception.dart';
@@ -405,6 +406,14 @@
   @override
   String get targetPrefix {
     var entity = target.entity;
+
+    if (entity is Token) {
+      var prev = entity.previous;
+      if (prev?.end == offset && prev.isKeywordOrIdentifier) {
+        return prev.lexeme;
+      }
+    }
+
     while (entity is AstNode) {
       if (entity is SimpleIdentifier) {
         var identifier = entity.name;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
index 23594f4..d12f07d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
@@ -58,6 +58,13 @@
       } else if (parent is ExtensionOverride) {
         return parent.extensionName.name;
       }
+    } else if (node is ArgumentList) {
+      var parent = node.parent;
+      if (parent is MethodInvocation) {
+        return parent.methodName.name;
+      } else if (parent is ExtensionOverride) {
+        return parent.extensionName.name;
+      }
     }
     return null;
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter_change.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter.dart
similarity index 98%
rename from pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter_change.dart
rename to pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter.dart
index c195e50..e40be74 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter_change.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/add_type_parameter.dart
@@ -11,7 +11,7 @@
 
 /// The data related to a type parameter that was added to either a function or
 /// a type.
-class AddTypeParameterChange extends Change<_Data> {
+class AddTypeParameter extends Change<_Data> {
   /// The index of the type parameter that was added.
   final int index;
 
@@ -28,7 +28,7 @@
   /// Initialize a newly created change to describe adding a type parameter to a
   /// type or a function.
   // TODO(brianwilkerson) Support adding multiple type parameters.
-  AddTypeParameterChange(
+  AddTypeParameter(
       {@required this.index,
       @required this.name,
       @required this.value,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
index c105418..9423b2e 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
@@ -60,31 +60,6 @@
 
   @override
   void apply(DartFileEditBuilder builder, DataDrivenFix fix, _Data data) {
-    if (data is _InvocationSiteData) {
-      _applyToInvocationSite(builder, fix, data);
-    } else if (data is _OverrideData) {
-      _applyToOverride(builder, fix, data);
-    } else {
-      throw StateError('Unsupported class of data: ${data.runtimeType}');
-    }
-  }
-
-  @override
-  _Data validate(DataDrivenFix fix) {
-    var node = fix.node;
-    var parent = node.parent;
-    if (parent is InvocationExpression) {
-      var argumentList = parent.argumentList;
-      return _InvocationSiteData(argumentList);
-    }
-    // TODO(brianwilkerson) Recognize cases where a method that used to be an
-    //  override of a removed method needs to be migrated and return an
-    //  [_OverrideData] to represent that case.
-    return null;
-  }
-
-  void _applyToInvocationSite(DartFileEditBuilder builder, DataDrivenFix fix,
-      _InvocationSiteData data) {
     var argumentList = data.argumentList;
     var arguments = argumentList.arguments;
     var argumentCount = arguments.length;
@@ -248,10 +223,15 @@
     }
   }
 
-  void _applyToOverride(
-      DartFileEditBuilder builder, DataDrivenFix fix, _OverrideData data) {
-    // TODO(brianwilkerson) Implement this.
-    throw UnsupportedError('Updating override sites is not yet supported.');
+  @override
+  _Data validate(DataDrivenFix fix) {
+    var node = fix.node;
+    var parent = node.parent;
+    if (parent is InvocationExpression) {
+      var argumentList = parent.argumentList;
+      return _Data(argumentList);
+    }
+    return null;
   }
 
   /// Return the range from the list of [ranges] that contains the given
@@ -285,8 +265,15 @@
   RemoveParameter(this.parameter) : assert(parameter != null);
 }
 
-/// The data returned when modifying a parameter list.
-class _Data {}
+/// The data returned when updating an invocation site.
+class _Data {
+  /// The argument list to be updated.
+  final ArgumentList argumentList;
+
+  /// Initialize a newly created data object with the data needed to update an
+  /// invocation site.
+  _Data(this.argumentList);
+}
 
 /// A range of indexes within a list.
 class _IndexRange {
@@ -307,26 +294,6 @@
   String toString() => '[$lower..$upper]';
 }
 
-/// The data returned when updating an invocation site.
-class _InvocationSiteData extends _Data {
-  /// The argument list to be updated.
-  final ArgumentList argumentList;
-
-  /// Initialize a newly created data object with the data needed to update an
-  /// invocation site.
-  _InvocationSiteData(this.argumentList);
-}
-
-/// The data returned when updating an override of the modified method.
-class _OverrideData extends _Data {
-  /// The parameter list to be updated.
-  final FormalParameterList parameter;
-
-  /// Initialize a newly created data object with the data needed to update an
-  /// override of the modified method.
-  _OverrideData(this.parameter);
-}
-
 extension on List<int> {
   Iterable<_IndexRange> get contiguousSubRanges sync* {
     if (isEmpty) {
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
similarity index 92%
rename from pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.dart
rename to pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
index 9f761fd..46135f0 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
@@ -10,13 +10,13 @@
 import 'package:meta/meta.dart';
 
 /// The data related to an element that has been renamed.
-class RenameChange extends Change<SimpleIdentifier> {
+class Rename extends Change<SimpleIdentifier> {
   /// The new name of the element.
   final String newName;
 
   /// Initialize a newly created transform to describe a renaming of an element
   /// to the [newName].
-  RenameChange({@required this.newName});
+  Rename({@required this.newName});
 
   @override
   void apply(DartFileEditBuilder builder, DataDrivenFix fix,
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 7489132..3284b6f 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -540,6 +540,9 @@
     CompileTimeErrorCode.NOT_A_TYPE: [
       ImportLibrary.forType,
     ],
+    CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS: [
+      DataDriven.newInstance,
+    ],
     CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
       ImportLibrary.forType,
     ],
@@ -569,6 +572,7 @@
       ImportLibrary.forType,
     ],
     CompileTimeErrorCode.UNDEFINED_METHOD: [
+      DataDriven.newInstance,
       ImportLibrary.forFunction,
       ImportLibrary.forType,
     ],
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 75a526b..27d1b2b 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -718,7 +718,7 @@
     }
     // maybe ends with "return" statement
     if (_selectionStatements != null) {
-      TypeSystem typeSystem = await resolveResult.typeSystem;
+      var typeSystem = resolveResult.typeSystem;
       var returnTypeComputer = _ReturnTypeComputer(typeSystem);
       _selectionStatements.forEach((statement) {
         statement.accept(returnTypeComputer);
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 0835f08..842ac85 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -31,7 +31,6 @@
 
 dev_dependencies:
   analysis_tool: any
-  html: any
   http: any
   logging: any
   matcher: any
diff --git a/pkg/analysis_server/test/src/cider/completion_test.dart b/pkg/analysis_server/test/src/cider/completion_test.dart
index cef8019..e6224a3 100644
--- a/pkg/analysis_server/test/src/cider/completion_test.dart
+++ b/pkg/analysis_server/test/src/cider/completion_test.dart
@@ -71,7 +71,29 @@
     ]);
   }
 
-  Future<void> test_compute_prefixStart_hasPrefix() async {
+  Future<void> test_compute_prefixStart_beforeToken_identifier() async {
+    await _compute('''
+const foo = 0;
+
+class A {
+  @fo^
+}
+''');
+    expect(_completionResult.prefixStart.line, 3);
+    expect(_completionResult.prefixStart.column, 3);
+  }
+
+  Future<void> test_compute_prefixStart_beforeToken_keyword() async {
+    await _compute('''
+import 'dart:async' h^;
+''');
+    _assertHasKeyword(text: 'hide');
+    _assertNoKeyword(text: 'show');
+    expect(_completionResult.prefixStart.line, 0);
+    expect(_completionResult.prefixStart.column, 20);
+  }
+
+  Future<void> test_compute_prefixStart_identifier() async {
     await _compute('''
 class A {
   String foobar;
@@ -552,6 +574,12 @@
     return matching.single;
   }
 
+  CompletionSuggestion _assertHasKeyword({@required String text}) {
+    var matching = _matchingKeywordCompletions(text: text);
+    expect(matching, hasLength(1), reason: 'Expected exactly one completion');
+    return matching.single;
+  }
+
   CompletionSuggestion _assertHasLocalVariable({@required String text}) {
     var matching = _matchingCompletions(
       text: text,
@@ -628,6 +656,11 @@
     expect(matching, isEmpty, reason: 'Expected zero completions');
   }
 
+  void _assertNoKeyword({@required String text}) {
+    var matching = _matchingKeywordCompletions(text: text);
+    expect(matching, isEmpty, reason: 'Expected zero completions');
+  }
+
   void _assertNoNamedArgument({@required String name}) {
     var matching = _matchingNamedArgumentSuggestions(name: name);
     expect(matching, isEmpty, reason: 'Expected zero completions');
@@ -694,6 +727,17 @@
     }).toList();
   }
 
+  List<CompletionSuggestion> _matchingKeywordCompletions({
+    @required String text,
+  }) {
+    return _suggestions.where((e) {
+      if (e.completion != text) {
+        return false;
+      }
+      return e.kind == CompletionSuggestionKind.KEYWORD;
+    }).toList();
+  }
+
   List<CompletionSuggestion> _matchingNamedArgumentSuggestions({
     @required String name,
   }) {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_change_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
similarity index 89%
rename from pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_change_test.dart
rename to pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
index 9b13ab0..07cd493 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_change_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analysis_server/src/services/correction/fix/data_driven/add_type_parameter_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/add_type_parameter.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/value_extractor.dart';
@@ -12,16 +12,14 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(AddTypeParameterChange_DeprecatedMemberUseTest);
-    defineReflectiveTests(AddTypeParameterChange_InvalidOverrideTest);
-    defineReflectiveTests(
-        AddTypeParameterChange_WrongNumberOfTypeArgumentsTest);
+    defineReflectiveTests(AddTypeParameter_DeprecatedMemberUseTest);
+    defineReflectiveTests(AddTypeParameter_InvalidOverrideTest);
+    defineReflectiveTests(AddTypeParameter_WrongNumberOfTypeArgumentsTest);
   });
 }
 
 @reflectiveTest
-class AddTypeParameterChange_DeprecatedMemberUseTest
-    extends _AddTypeParameterChange {
+class AddTypeParameter_DeprecatedMemberUseTest extends _AddTypeParameterChange {
   Future<void> test_method_first() async {
     setPackageContent('''
 class C {
@@ -120,8 +118,7 @@
 }
 
 @reflectiveTest
-class AddTypeParameterChange_InvalidOverrideTest
-    extends _AddTypeParameterChange {
+class AddTypeParameter_InvalidOverrideTest extends _AddTypeParameterChange {
   Future<void> test_method_bound() async {
     setPackageContent('''
 class C {
@@ -174,7 +171,7 @@
 }
 
 @reflectiveTest
-class AddTypeParameterChange_WrongNumberOfTypeArgumentsTest
+class AddTypeParameter_WrongNumberOfTypeArgumentsTest
     extends _AddTypeParameterChange {
   Future<void> test_class() async {
     setPackageContent('''
@@ -271,7 +268,7 @@
           element: ElementDescriptor(
               libraryUris: [importUri], components: components ?? ['C', 'm']),
           changes: [
-            AddTypeParameterChange(
+            AddTypeParameter(
                 extendedType: extendedType,
                 index: index,
                 name: 'T',
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
index 9ad4435..685e14d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/modify_parameters.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/parameter_reference.dart';
-import 'package:analysis_server/src/services/correction/fix/data_driven/rename_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/rename.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/value_extractor.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -15,6 +15,8 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ModifyParameters_DeprecatedMemberUseTest);
+    defineReflectiveTests(ModifyParameters_NotEnoughPositionalArgumentsTest);
+    defineReflectiveTests(ModifyParameters_UndefinedMethodTest);
   });
 }
 
@@ -28,7 +30,7 @@
 /// applied to top-level functions, but are not intended to be exhaustive.
 @reflectiveTest
 class ModifyParameters_DeprecatedMemberUseTest extends _ModifyParameters {
-  Future<void> test_add_function_first_optionalNamed() async {
+  Future<void> test_add_function_first_requiredNamed() async {
     setPackageContent('''
 @deprecated
 void f(int b) {}
@@ -64,7 +66,7 @@
 }
 ''');
     setPackageData(_modify(
-        ['C', 'm'], [AddParameter(1, 'a', false, false, null, null)],
+        ['C', 'm'], [AddParameter(0, 'a', false, false, null, null)],
         newName: 'm2'));
     await resolveTestUnit('''
 import '$importUri';
@@ -835,6 +837,65 @@
   }
 }
 
+@reflectiveTest
+class ModifyParameters_NotEnoughPositionalArgumentsTest
+    extends _ModifyParameters {
+  Future<void> test_method_sameName() async {
+    setPackageContent('''
+class C {
+  void m(int a, int b) {}
+}
+''');
+    setPackageData(_modify(['C', 'm'],
+        [AddParameter(0, 'a', true, true, null, LiteralExtractor('0'))]));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m(1);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m(0, 1);
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ModifyParameters_UndefinedMethodTest extends _ModifyParameters {
+  Future<void> test_method_renamed() async {
+    setPackageContent('''
+class C {
+  void m2(int a, int b) {}
+}
+''');
+    setPackageData(_modify([
+      'C',
+      'm'
+    ], [
+      AddParameter(0, 'a', true, true, null, LiteralExtractor('0'))
+    ], newName: 'm2'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m(1);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2(0, 1);
+}
+''');
+  }
+}
+
 abstract class _ModifyParameters extends DataDrivenFixProcessorTest {
   Transform _modify(List<String> originalComponents,
           List<ParameterModification> modifications, {String newName}) =>
@@ -844,6 +905,6 @@
               libraryUris: [importUri], components: originalComponents),
           changes: [
             ModifyParameters(modifications: modifications),
-            if (newName != null) RenameChange(newName: newName),
+            if (newName != null) Rename(newName: newName),
           ]);
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
similarity index 94%
rename from pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart
rename to pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
index 8d628e2..8cd7bdb 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
-import 'package:analysis_server/src/services/correction/fix/data_driven/rename_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/rename.dart';
 import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -11,12 +11,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(RenameChange_DeprecatedMemberUseTest);
+    defineReflectiveTests(Rename_DeprecatedMemberUseTest);
   });
 }
 
 @reflectiveTest
-class RenameChange_DeprecatedMemberUseTest extends DataDrivenFixProcessorTest {
+class Rename_DeprecatedMemberUseTest extends DataDrivenFixProcessorTest {
   Future<void> test_class() async {
     addMetaPackage();
     setPackageContent('''
@@ -240,6 +240,6 @@
           element: ElementDescriptor(
               libraryUris: [importUri], components: components),
           changes: [
-            RenameChange(newName: newName),
+            Rename(newName: newName),
           ]);
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart
index 8773441..1a39ea9 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart
@@ -4,9 +4,9 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'add_type_parameter_change_test.dart' as add_type_parameter_change;
+import 'add_type_parameter_test.dart' as add_type_parameter_change;
 import 'modify_parameters_test.dart' as modify_parameters;
-import 'rename_change_test.dart' as rename_change;
+import 'rename_test.dart' as rename_change;
 
 void main() {
   defineReflectiveSuite(() {
diff --git a/pkg/analyzer/lib/dart/analysis/features.dart b/pkg/analyzer/lib/dart/analysis/features.dart
index 7aa01d2..e086608 100644
--- a/pkg/analyzer/lib/dart/analysis/features.dart
+++ b/pkg/analyzer/lib/dart/analysis/features.dart
@@ -64,9 +64,26 @@
 
   /// Computes the set of features implied by the given set of experimental
   /// enable flags.
+  @Deprecated("Use 'fromEnableFlags2' instead")
   factory FeatureSet.fromEnableFlags(List<String> flags) =
       ExperimentStatus.fromStrings;
 
+  /// Computes the set of features implied by the given set of experimental
+  /// enable flags.
+  factory FeatureSet.fromEnableFlags2({
+    @required Version sdkLanguageVersion,
+    @required List<String> flags,
+  }) = ExperimentStatus.fromStrings2;
+
+  /// Computes the set of features for the latest language version known
+  /// to the analyzer, without any experiments.  Use it only if you really
+  /// don't care which language version you want to use, and sure that the
+  /// code that you process is valid for the latest language version.
+  ///
+  /// Otherwise, it is recommended to use [FeatureSet.fromEnableFlags2].
+  factory FeatureSet.latestLanguageVersion() =
+      ExperimentStatus.latestLanguageVersion;
+
   /// Queries whether the given [feature] is contained in this feature set.
   bool isEnabled(Feature feature);
 
diff --git a/pkg/analyzer/lib/dart/analysis/utilities.dart b/pkg/analyzer/lib/dart/analysis/utilities.dart
index 585da88..2082d97 100644
--- a/pkg/analyzer/lib/dart/analysis/utilities.dart
+++ b/pkg/analyzer/lib/dart/analysis/utilities.dart
@@ -78,7 +78,7 @@
     FeatureSet featureSet,
     String path,
     bool throwIfDiagnostics = true}) {
-  featureSet ??= FeatureSet.fromEnableFlags([]);
+  featureSet ??= FeatureSet.latestLanguageVersion();
   var source = StringSource(content, path);
   var reader = CharSequenceReader(content);
   var errorCollector = RecordingErrorListener();
diff --git a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
index 6b85a28..7e5e273 100644
--- a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
+++ b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
@@ -158,7 +158,10 @@
       if (pathSegments.isNotEmpty) {
         var libraryName = pathSegments.first;
         var experiments = allowedExperiments.forSdkLibrary(libraryName);
-        return FeatureSet.fromEnableFlags(experiments);
+        return FeatureSet.fromEnableFlags2(
+          sdkLanguageVersion: languageVersion,
+          flags: experiments,
+        );
       }
     }
     throw StateError('Expected a valid dart: URI: $uri');
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 7f246e9..3030d6d 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -354,6 +354,7 @@
   CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION,
   CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER,
   CompileTimeErrorCode.PRIVATE_SETTER,
+  CompileTimeErrorCode.READ_POTENTIALLY_UNASSIGNED_FINAL,
   CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
   CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
   CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index de3f46f..839db04 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -83,6 +83,9 @@
   /// interface.
   PerformanceLog performanceLog;
 
+  /// If `true`, additional analysis data useful for testing is stored.
+  bool retainDataForTesting = false;
+
   /// The byte store used by any analysis drivers created through this interface.
   ByteStore byteStore;
 
@@ -114,17 +117,19 @@
     final sf = createSourceFactory(path, options, summaryData: summaryData);
 
     AnalysisDriver driver = AnalysisDriver(
-        analysisDriverScheduler,
-        performanceLog,
-        resourceProvider,
-        byteStore,
-        fileContentOverlay,
-        contextRoot,
-        sf,
-        options,
-        packages: createPackageMap(path),
-        enableIndex: enableIndex,
-        externalSummaries: summaryData);
+      analysisDriverScheduler,
+      performanceLog,
+      resourceProvider,
+      byteStore,
+      fileContentOverlay,
+      contextRoot,
+      sf,
+      options,
+      packages: createPackageMap(path),
+      enableIndex: enableIndex,
+      externalSummaries: summaryData,
+      retainDataForTesting: retainDataForTesting,
+    );
 
     // Set API AnalysisContext for the driver.
     var apiContextRoots = api.ContextLocator(
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index c971b074..2b9961a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -30,6 +30,7 @@
     @required List<String> includedPaths,
     List<String> excludedPaths,
     ResourceProvider resourceProvider,
+    bool retainDataForTesting = false,
     String sdkPath,
   }) : resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE {
@@ -56,6 +57,7 @@
         contextRoot: root,
         declaredVariables: DeclaredVariables.fromMap(declaredVariables ?? {}),
         enableIndex: enableIndex,
+        retainDataForTesting: retainDataForTesting,
         sdkPath: sdkPath,
       );
       contexts.add(context);
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index f6634b6..c10d5a4 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -45,6 +45,7 @@
       bool enableIndex = false,
       List<String> librarySummaryPaths,
       @deprecated PerformanceLog performanceLog,
+        bool retainDataForTesting = false,
       @deprecated AnalysisDriverScheduler scheduler,
       String sdkPath,
       String sdkSummaryPath}) {
@@ -85,6 +86,7 @@
     builder.fileContentOverlay = fileContentOverlay;
     builder.enableIndex = enableIndex;
     builder.performanceLog = performanceLog;
+    builder.retainDataForTesting = retainDataForTesting;
 
     old.ContextRoot oldContextRoot = old.ContextRoot(
         contextRoot.root.path, contextRoot.excludedPaths.toList(),
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 37a656d..a369c9c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -85,7 +85,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 = 109;
+  static const int DATA_VERSION = 110;
 
   /// The length of the list returned by [_computeDeclaredVariablesSignature].
   static const int _declaredVariablesSignatureLength = 4;
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index 00f7f52..bf11fc9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -20,11 +20,17 @@
 
 part 'experiments.g.dart';
 
-/// Gets access to the private list of boolean flags in an [Experiments] object.
-/// For testing use only.
+/// Gets access to the private list of boolean flags in an [ExperimentStatus]
+/// object. For testing use only.
 @visibleForTesting
 List<bool> getExperimentalFlags_forTesting(ExperimentStatus status) =>
-    status._enableFlags;
+    status._flags;
+
+/// Gets access to the private SDK language version in an [ExperimentStatus]
+/// object. For testing use only.
+@visibleForTesting
+Version getSdkLanguageVersion_forTesting(ExperimentStatus status) =>
+    status._sdkLanguageVersion;
 
 /// A representation of the set of experiments that are active and whether they
 /// are enabled.
@@ -32,14 +38,28 @@
   /// The current language version.
   static final Version currentVersion = Version.parse(_currentVersion);
 
+  /// The language version to use in tests.
+  static final Version testingSdkLanguageVersion = Version.parse('2.10.0');
+
+  /// The latest known language version.
+  static final Version latestSdkLanguageVersion = Version.parse('2.10.0');
+
+  static final FeatureSet latestWithNullSafety = ExperimentStatus.fromStrings2(
+    sdkLanguageVersion: latestSdkLanguageVersion,
+    flags: [EnableString.non_nullable],
+  );
+
   /// A map containing information about all known experimental flags.
   static final Map<String, ExperimentalFeature> knownFeatures = _knownFeatures;
 
-  final List<bool> _enableFlags;
+  final Version _sdkLanguageVersion;
+  final List<bool> _explicitEnabledFlags;
+  final List<bool> _explicitDisabledFlags;
+  final List<bool> _flags;
 
-  /// Initializes a newly created set of experiments based on optional
-  /// arguments.
-  ExperimentStatus() : _enableFlags = _buildExperimentalFlagsArray();
+  factory ExperimentStatus() {
+    return ExperimentStatus.latestLanguageVersion();
+  }
 
   /// Computes a set of features for use in a unit test.  Computes the set of
   /// features enabled in [sdkVersion], plus any specified [additionalFeatures].
@@ -47,10 +67,41 @@
   /// If [sdkVersion] is not supplied (or is `null`), then the current set of
   /// enabled features is used as the starting point.
   @visibleForTesting
-  ExperimentStatus.forTesting(
-      {String sdkVersion, List<Feature> additionalFeatures = const []})
-      : this._(enableFlagsForTesting(
-            sdkVersion: sdkVersion, additionalFeatures: additionalFeatures));
+  factory ExperimentStatus.forTesting(
+      // ignore:avoid_unused_constructor_parameters
+      {String sdkVersion,
+      List<Feature> additionalFeatures = const []}) {
+    var explicitFlags = decodeExplicitFlags([]);
+    for (ExperimentalFeature feature in additionalFeatures) {
+      explicitFlags.enabled[feature.index] = true;
+    }
+
+    var sdkLanguageVersion = latestSdkLanguageVersion;
+    var flags = restrictEnableFlagsToVersion(
+      sdkLanguageVersion: sdkLanguageVersion,
+      explicitEnabledFlags: explicitFlags.enabled,
+      explicitDisabledFlags: explicitFlags.disabled,
+      version: sdkLanguageVersion,
+    );
+
+    return ExperimentStatus._(
+      sdkLanguageVersion,
+      explicitFlags.enabled,
+      explicitFlags.disabled,
+      flags,
+    );
+  }
+
+  factory ExperimentStatus.fromStorage(List<int> encoded) {
+    var allFlags = encoded.skip(2).map((e) => e != 0).toList();
+    var featureCount = allFlags.length ~/ 3;
+    return ExperimentStatus._(
+      Version(encoded[0], encoded[1], 0),
+      allFlags.sublist(0, featureCount),
+      allFlags.sublist(featureCount, featureCount * 2),
+      allFlags.sublist(featureCount * 2, featureCount * 3),
+    );
+  }
 
   /// Decodes the strings given in [flags] into a representation of the set of
   /// experiments that should be enabled.
@@ -58,14 +109,59 @@
   /// Always succeeds, even if the input flags are invalid.  Expired and
   /// unrecognized flags are ignored, conflicting flags are resolved in favor of
   /// the flag appearing last.
-  ExperimentStatus.fromStrings(List<String> flags) : this._(decodeFlags(flags));
+  factory ExperimentStatus.fromStrings(List<String> flags) {
+    return ExperimentStatus.fromStrings2(
+      sdkLanguageVersion: latestSdkLanguageVersion,
+      flags: flags,
+    );
+  }
 
-  ExperimentStatus._(this._enableFlags);
+  /// Decodes the strings given in [flags] into a representation of the set of
+  /// experiments that should be enabled.
+  ///
+  /// Always succeeds, even if the input flags are invalid.  Expired and
+  /// unrecognized flags are ignored, conflicting flags are resolved in favor of
+  /// the flag appearing last.
+  factory ExperimentStatus.fromStrings2({
+    @required Version sdkLanguageVersion,
+    @required List<String> flags,
+    // TODO(scheglov) use restrictEnableFlagsToVersion
+  }) {
+    var explicitFlags = decodeExplicitFlags(flags);
+
+    var decodedFlags = restrictEnableFlagsToVersion(
+      sdkLanguageVersion: sdkLanguageVersion,
+      explicitEnabledFlags: explicitFlags.enabled,
+      explicitDisabledFlags: explicitFlags.disabled,
+      version: sdkLanguageVersion,
+    );
+
+    return ExperimentStatus._(
+      sdkLanguageVersion,
+      explicitFlags.enabled,
+      explicitFlags.disabled,
+      decodedFlags,
+    );
+  }
+
+  factory ExperimentStatus.latestLanguageVersion() {
+    return ExperimentStatus.fromStrings2(
+      sdkLanguageVersion: latestSdkLanguageVersion,
+      flags: [],
+    );
+  }
+
+  ExperimentStatus._(
+    this._sdkLanguageVersion,
+    this._explicitEnabledFlags,
+    this._explicitDisabledFlags,
+    this._flags,
+  );
 
   @override
   int get hashCode {
     int hash = 0;
-    for (var flag in _enableFlags) {
+    for (var flag in _flags) {
       hash = JenkinsSmiHash.combine(hash, flag.hashCode);
     }
     return JenkinsSmiHash.finish(hash);
@@ -74,9 +170,19 @@
   @override
   bool operator ==(Object other) {
     if (other is ExperimentStatus) {
-      if (_enableFlags.length != other._enableFlags.length) return false;
-      for (int i = 0; i < _enableFlags.length; i++) {
-        if (_enableFlags[i] != other._enableFlags[i]) return false;
+      if (_sdkLanguageVersion != other._sdkLanguageVersion) {
+        return false;
+      }
+      if (!_equalListOfBool(
+          _explicitEnabledFlags, other._explicitEnabledFlags)) {
+        return false;
+      }
+      if (!_equalListOfBool(
+          _explicitDisabledFlags, other._explicitDisabledFlags)) {
+        return false;
+      }
+      if (!_equalListOfBool(_flags, other._flags)) {
+        return false;
       }
       return true;
     }
@@ -86,16 +192,42 @@
   /// Queries whether the given [feature] is enabled or disabled.
   @override
   bool isEnabled(covariant ExperimentalFeature feature) =>
-      _enableFlags[feature.index];
+      _flags[feature.index];
 
   @override
-  FeatureSet restrictToVersion(Version version) =>
-      ExperimentStatus._(restrictEnableFlagsToVersion(_enableFlags, version));
+  FeatureSet restrictToVersion(Version version) {
+    return ExperimentStatus._(
+      _sdkLanguageVersion,
+      _explicitEnabledFlags,
+      _explicitDisabledFlags,
+      restrictEnableFlagsToVersion(
+        sdkLanguageVersion: _sdkLanguageVersion,
+        explicitEnabledFlags: _explicitEnabledFlags,
+        explicitDisabledFlags: _explicitDisabledFlags,
+        version: version,
+      ),
+    );
+  }
+
+  /// Encode into the format suitable for [ExperimentStatus.fromStorage].
+  List<int> toStorage() {
+    return [
+      _sdkLanguageVersion.major,
+      _sdkLanguageVersion.minor,
+      ..._explicitEnabledFlags.map((e) => e ? 1 : 0),
+      ..._explicitDisabledFlags.map((e) => e ? 1 : 0),
+      ..._flags.map((e) => e ? 1 : 0),
+    ];
+  }
 
   @override
-  String toString() => experimentStatusToString(_enableFlags);
+  String toString() => experimentStatusToString(_flags);
 
-  /// Returns a list of strings suitable for passing to
-  /// [ExperimentStatus.fromStrings].
-  List<String> toStringList() => experimentStatusToStringList(this);
+  static bool _equalListOfBool(List<bool> first, List<bool> second) {
+    if (first.length != second.length) return false;
+    for (var i = 0; i < first.length; i++) {
+      if (first[i] != second[i]) return false;
+    }
+    return true;
+  }
 }
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
index 17dec4d..fd36922 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
@@ -26,19 +26,6 @@
   EnableString.variance: ExperimentalFeatures.variance,
 };
 
-List<bool> _buildExperimentalFlagsArray() => <bool>[
-      true, // constant-update-2018
-      true, // control-flow-collections
-      true, // extension-methods
-      IsEnabledByDefault.non_nullable,
-      IsEnabledByDefault.nonfunction_type_aliases,
-      true, // set-literals
-      true, // spread-collections
-      IsEnabledByDefault.triple_shift,
-      IsEnabledByDefault.value_class,
-      IsEnabledByDefault.variance,
-    ];
-
 /// Constant strings for enabling each of the currently known experimental
 /// flags.
 class EnableString {
@@ -110,7 +97,7 @@
     isEnabledByDefault: IsEnabledByDefault.non_nullable,
     isExpired: IsExpired.non_nullable,
     documentation: 'Non Nullable by default',
-    experimentalReleaseVersion: null,
+    experimentalReleaseVersion: Version.parse('2.10.0'),
     releaseVersion: null,
   );
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
index d3b9853..f739746 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
@@ -21,32 +21,17 @@
 /// Always succeeds, even if the input flags are invalid.  Expired and
 /// unrecognized flags are ignored, conflicting flags are resolved in favor of
 /// the flag appearing last.
-List<bool> decodeFlags(List<String> flags) {
-  var decodedFlags = List<bool>.filled(_knownFeatures.length, false);
-  for (var feature in _knownFeatures.values) {
-    decodedFlags[feature.index] = feature.isEnabledByDefault;
-  }
+EnabledDisabledFlags decodeExplicitFlags(List<String> flags) {
+  var enabledFlags = List<bool>.filled(_knownFeatures.length, false);
+  var disabledFlags = List<bool>.filled(_knownFeatures.length, false);
   for (var entry in _flagStringsToMap(flags).entries) {
-    decodedFlags[entry.key] = entry.value;
+    if (entry.value) {
+      enabledFlags[entry.key] = true;
+    } else {
+      disabledFlags[entry.key] = true;
+    }
   }
-  return decodedFlags;
-}
-
-/// Computes a set of features for use in a unit test.  Computes the set of
-/// features enabled in [sdkVersion], plus any specified [additionalFeatures].
-///
-/// If [sdkVersion] is not supplied (or is `null`), then the current set of
-/// enabled features is used as the starting point.
-List<bool> enableFlagsForTesting(
-    {String sdkVersion, List<Feature> additionalFeatures = const []}) {
-  var flags = decodeFlags([]);
-  if (sdkVersion != null) {
-    flags = restrictEnableFlagsToVersion(flags, Version.parse(sdkVersion));
-  }
-  for (ExperimentalFeature feature in additionalFeatures) {
-    flags[feature.index] = true;
-  }
-  return flags;
+  return EnabledDisabledFlags(enabledFlags, disabledFlags);
 }
 
 /// Pretty-prints the given set of enable flags as a set of feature names.
@@ -118,21 +103,51 @@
   }
 }
 
-/// Computes a new set of enable flags based on [flags], but with any features
-/// that are not present in the language [version] set to `false`.
-List<bool> restrictEnableFlagsToVersion(List<bool> flags, Version version) {
-  if (version == ExperimentStatus.currentVersion) {
-    return flags;
-  }
-
-  flags = List.from(flags);
+/// Computes a new set of enable flags based on [version].
+///
+/// Features in [explicitEnabledFlags] are enabled in the [sdkLanguageVersion].
+///
+/// Features in [explicitDisabledFlags] are always disabled.
+List<bool> restrictEnableFlagsToVersion({
+  @required Version sdkLanguageVersion,
+  @required List<bool> explicitEnabledFlags,
+  @required List<bool> explicitDisabledFlags,
+  @required Version version,
+}) {
+  var decodedFlags = List.filled(_knownFeatures.length, false);
   for (var feature in _knownFeatures.values) {
+    if (explicitDisabledFlags[feature.index]) {
+      decodedFlags[feature.index] = false;
+      continue;
+    }
+
     var releaseVersion = feature.releaseVersion;
-    if (releaseVersion == null || releaseVersion > version) {
-      flags[feature.index] = false;
+    if (releaseVersion != null && version >= releaseVersion) {
+      decodedFlags[feature.index] = true;
+    }
+
+    if (explicitEnabledFlags[feature.index]) {
+      var experimentalReleaseVersion = feature.experimentalReleaseVersion;
+      if (experimentalReleaseVersion == null) {
+        // Specifically, the current sdk version (whatever it is) is always
+        // used as the language version which opts code into the experiment
+        // when the experiment flag is passed.
+        if (version == sdkLanguageVersion) {
+          decodedFlags[feature.index] = true;
+        }
+      } else {
+        // An experiment flag may at any point be assigned an experimental
+        // release version.  From that point forward, all tools will no
+        // longer use the current sdk version to opt code in, but rather
+        // will use the experimental release version as the opt in version.
+        if (version >= experimentalReleaseVersion) {
+          decodedFlags[feature.index] = true;
+        }
+      }
     }
   }
-  return flags;
+
+  return decodedFlags;
 }
 
 /// Validates whether there are any disagreements between the strings given in
@@ -274,6 +289,13 @@
   }
 }
 
+class EnabledDisabledFlags {
+  final List<bool> enabled;
+  final List<bool> disabled;
+
+  EnabledDisabledFlags(this.enabled, this.disabled);
+}
+
 /// Information about a single experimental flag that the user might use to
 /// request that a feature be enabled (or disabled).
 class ExperimentalFeature implements Feature {
diff --git a/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart b/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
index 5fe2dd4..d8c7d05 100644
--- a/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
@@ -18,6 +18,7 @@
   /// so that the only SDK is the Null Safe SDK.
   static const isNullSafetySdk = true;
 
+  final Version _sdkLanguageVersion;
   final AllowedExperiments _allowedExperiments;
   final ResourceProvider _resourceProvider;
   final Packages _packages;
@@ -25,17 +26,30 @@
   final FeatureSet _nonPackageDefaultFeatureSet;
 
   FeatureSetProvider._({
+    @required Version sdkLanguageVersion,
     @required AllowedExperiments allowedExperiments,
     @required ResourceProvider resourceProvider,
     @required Packages packages,
     @required FeatureSet packageDefaultFeatureSet,
     @required FeatureSet nonPackageDefaultFeatureSet,
-  })  : _allowedExperiments = allowedExperiments,
+  })  : _sdkLanguageVersion = sdkLanguageVersion,
+        _allowedExperiments = allowedExperiments,
         _resourceProvider = resourceProvider,
         _packages = packages,
         _packageDefaultFeatureSet = packageDefaultFeatureSet,
         _nonPackageDefaultFeatureSet = nonPackageDefaultFeatureSet;
 
+  FeatureSet featureSetForExperiments(List<String> experiments) {
+    if (experiments == null) {
+      return null;
+    }
+
+    return FeatureSet.fromEnableFlags2(
+      sdkLanguageVersion: _sdkLanguageVersion,
+      flags: experiments,
+    );
+  }
+
   /// Return the [FeatureSet] for the package that contains the file.
   FeatureSet getFeatureSet(String path, Uri uri) {
     if (uri.isScheme('dart')) {
@@ -43,9 +57,9 @@
       if (pathSegments.isNotEmpty) {
         var libraryName = pathSegments.first;
         var experiments = _allowedExperiments.forSdkLibrary(libraryName);
-        return FeatureSet.fromEnableFlags(experiments);
+        return featureSetForExperiments(experiments);
       } else {
-        return FeatureSet.fromEnableFlags([]);
+        return featureSetForExperiments([]);
       }
     }
 
@@ -53,7 +67,7 @@
     if (package != null) {
       var experiments = _allowedExperiments.forPackage(package.name);
       if (experiments != null) {
-        return FeatureSet.fromEnableFlags(experiments);
+        return featureSetForExperiments(experiments);
       }
 
       return _packageDefaultFeatureSet;
@@ -110,8 +124,10 @@
     @required FeatureSet packageDefaultFeatureSet,
     @required FeatureSet nonPackageDefaultFeatureSet,
   }) {
-    var allowedExperiments = _experimentsForSdk(sourceFactory.dartSdk);
+    var sdk = sourceFactory.dartSdk;
+    var allowedExperiments = _experimentsForSdk(sdk);
     return FeatureSetProvider._(
+      sdkLanguageVersion: sdk.languageVersion,
       allowedExperiments: allowedExperiments,
       resourceProvider: resourceProvider,
       packages: packages,
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 5b3bac5..db34b39 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -824,7 +824,7 @@
   /// Return the [FileState] instance that correspond to an unresolved URI.
   FileState get unresolvedFile {
     if (_unresolvedFile == null) {
-      var featureSet = FeatureSet.fromEnableFlags([]);
+      var featureSet = FeatureSet.latestLanguageVersion();
       _unresolvedFile = FileState._(this, null, null, null, null, featureSet,
           ExperimentStatus.currentVersion);
       _unresolvedFile.refresh();
@@ -832,6 +832,21 @@
     return _unresolvedFile;
   }
 
+  FeatureSet contextFeatureSet(
+    String path,
+    Uri uri,
+    WorkspacePackage workspacePackage,
+  ) {
+    var workspacePackageExperiments = workspacePackage?.enabledExperiments;
+    if (workspacePackageExperiments != null) {
+      return featureSetProvider.featureSetForExperiments(
+        workspacePackageExperiments,
+      );
+    }
+
+    return featureSetProvider.getFeatureSet(path, uri);
+  }
+
   /// Return the canonical [FileState] for the given absolute [path]. The
   /// returned file has the last known state since if was last refreshed.
   ///
@@ -853,9 +868,7 @@
       // Create a new file.
       FileSource uriSource = FileSource(resource, uri);
       WorkspacePackage workspacePackage = _workspace?.findPackageFor(path);
-      FeatureSet workspacePackageFeatureSet = workspacePackage?.featureSet;
-      FeatureSet featureSet = workspacePackageFeatureSet ??
-          featureSetProvider.getFeatureSet(path, uri);
+      FeatureSet featureSet = contextFeatureSet(path, uri, workspacePackage);
       Version packageLanguageVersion =
           featureSetProvider.getLanguageVersion(path, uri);
       file = FileState._(this, path, uri, uriSource, workspacePackage,
@@ -899,9 +912,7 @@
       File resource = _resourceProvider.getFile(path);
       FileSource source = FileSource(resource, uri);
       WorkspacePackage workspacePackage = _workspace?.findPackageFor(path);
-      FeatureSet workspacePackageFeatureSet = workspacePackage?.featureSet;
-      FeatureSet featureSet = workspacePackageFeatureSet ??
-          featureSetProvider.getFeatureSet(path, uri);
+      FeatureSet featureSet = contextFeatureSet(path, uri, workspacePackage);
       Version packageLanguageVersion =
           featureSetProvider.getLanguageVersion(path, uri);
       file = FileState._(this, path, uri, source, workspacePackage, featureSet,
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 0fb6861..ba7af75 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -8078,7 +8078,8 @@
   }
 
   @override
-  bool _extendsNullShorting(Expression child) => identical(child, operand);
+  bool _extendsNullShorting(Expression child) =>
+      operator.type != TokenType.BANG && identical(child, operand);
 }
 
 /// An identifier that is prefixed or an access to an object property where the
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index 2ccbf70..007b4dc 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -5,7 +5,6 @@
 import 'dart:async';
 import 'dart:typed_data';
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
@@ -117,8 +116,6 @@
     );
   }
 
-  FeatureSet get defaultFeatureSet => FeatureSet.fromEnableFlags([]);
-
   /// Update the resolver to reflect the fact that the file with the given
   /// [path] was changed. We need to make sure that when this file, of any file
   /// that directly or indirectly referenced it, is resolved, we used the new
diff --git a/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
index 4490f2a..f0a2b71 100644
--- a/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
@@ -228,7 +228,7 @@
       return;
     }
 
-    _assignmentShared.checkLateFinalAlreadyAssigned(leftHandSide);
+    _assignmentShared.checkFinalAlreadyAssigned(leftHandSide);
 
     // For any compound assignments to a void or nullable variable, report it.
     // Example: `y += voidFn()`, not allowed.
@@ -404,18 +404,31 @@
 
   ErrorReporter get _errorReporter => _resolver.errorReporter;
 
-  void checkLateFinalAlreadyAssigned(Expression left) {
+  void checkFinalAlreadyAssigned(Expression left) {
     var flow = _flowAnalysis?.flow;
     if (flow != null && left is SimpleIdentifier) {
       var element = left.staticElement;
-      if (element is LocalVariableElement &&
-          element.isLate &&
-          element.isFinal) {
-        if (flow.isAssigned(element)) {
-          _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.LATE_FINAL_LOCAL_ALREADY_ASSIGNED,
-            left,
-          );
+      if (element is VariableElement) {
+        var assigned = _flowAnalysis.isDefinitelyAssigned(left, element);
+        var unassigned = _flowAnalysis.isDefinitelyUnassigned(left, element);
+
+        if (element.isFinal) {
+          if (element.isLate) {
+            if (assigned) {
+              _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.LATE_FINAL_LOCAL_ALREADY_ASSIGNED,
+                left,
+              );
+            }
+          } else {
+            if (!unassigned) {
+              _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL,
+                left,
+                [element.name],
+              );
+            }
+          }
         }
       }
     }
diff --git a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
index 96dff00..c486755 100644
--- a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
@@ -24,12 +24,18 @@
   /// there is a `return` statement at the end of the function body block.
   final List<FunctionBody> functionBodiesThatDontComplete = [];
 
-  /// The list of [Expression]s representing variable accesses that occur before
-  /// the corresponding variable has been definitely assigned.
-  final List<AstNode> potentiallyUnassignedNodes = [];
+  /// The list of [SimpleIdentifier]s that were checked if they are definitely
+  /// assigned, but were not.
+  final List<AstNode> notDefinitelyAssignedNodes = [];
 
-  /// The list of [SimpleIdentifier]s representing variable accesses that occur
-  /// when the corresponding variable has been definitely unassigned.
+  /// The list of [SimpleIdentifier]s representing variable references (reads,
+  /// writes, or both) that occur when the corresponding variable has been
+  /// definitely assigned.
+  final List<AstNode> definitelyAssignedNodes = [];
+
+  /// The list of [SimpleIdentifier]s representing variable references (reads,
+  /// writes, or both) that occur when the corresponding variable has been
+  /// definitely unassigned.
   final List<AstNode> definitelyUnassignedNodes = [];
 
   /// For each top level or class level declaration, the assigned variables
@@ -144,6 +150,36 @@
     flow.for_conditionBegin(node);
   }
 
+  bool isDefinitelyAssigned(
+    SimpleIdentifier node,
+    PromotableElement element,
+  ) {
+    var isAssigned = flow.isAssigned(element);
+
+    if (dataForTesting != null) {
+      if (isAssigned) {
+        dataForTesting.definitelyAssignedNodes.add(node);
+      } else {
+        dataForTesting.notDefinitelyAssignedNodes.add(node);
+      }
+    }
+
+    return isAssigned;
+  }
+
+  bool isDefinitelyUnassigned(
+    SimpleIdentifier node,
+    PromotableElement element,
+  ) {
+    var isUnassigned = flow.isUnassigned(element);
+
+    if (dataForTesting != null && isUnassigned) {
+      dataForTesting.definitelyUnassignedNodes.add(node);
+    }
+
+    return isUnassigned;
+  }
+
   void isExpression(IsExpression node) {
     if (flow == null) return;
 
@@ -158,52 +194,6 @@
     );
   }
 
-  bool isPotentiallyNonNullableLocalReadBeforeWrite(SimpleIdentifier node) {
-    if (flow == null) return false;
-
-    if (node.inDeclarationContext()) return false;
-    if (!node.inGetterContext()) return false;
-
-    var element = node.staticElement;
-    if (element is LocalVariableElement) {
-      var typeSystem = _typeOperations.typeSystem;
-      var isUnassigned = !flow.isAssigned(element);
-      if (isUnassigned) {
-        dataForTesting?.potentiallyUnassignedNodes?.add(node);
-      }
-      if (typeSystem.isPotentiallyNonNullable(element.type)) {
-        // Note: in principle we could make this slightly more performant by
-        // checking element.isLate earlier, but we would lose the ability to
-        // test the flow analysis mechanism using late variables.  And it seems
-        // unlikely that the `late` modifier will be used often enough for it to
-        // make a significant difference.
-        if (element.isLate) return false;
-        return isUnassigned;
-      }
-    }
-
-    return false;
-  }
-
-  bool isReadOfDefinitelyUnassignedLateLocal(SimpleIdentifier node) {
-    if (flow == null) return false;
-
-    if (node.inDeclarationContext()) return false;
-    if (!node.inGetterContext()) return false;
-
-    var element = node.staticElement;
-    if (element is LocalVariableElement) {
-      if (flow.isUnassigned(element)) {
-        dataForTesting?.definitelyUnassignedNodes?.add(node);
-        if (element.isLate) {
-          return true;
-        }
-      }
-    }
-
-    return false;
-  }
-
   void labeledStatement_enter(LabeledStatement node) {
     flow.labeledStatement_begin(node);
   }
diff --git a/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
index 63a9cfb..454eeef 100644
--- a/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/resolver/assignment_expression_resolver.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:meta/meta.dart';
@@ -83,7 +84,12 @@
       loopVariable = forEachParts.loopVariable;
     } else if (forEachParts is ForEachPartsWithIdentifier) {
       identifier = forEachParts.identifier;
+      // TODO(scheglov) replace with lexical lookup
       identifier?.accept(_resolver);
+      AssignmentExpressionShared(
+        resolver: _resolver,
+        flowAnalysis: _flowAnalysis,
+      ).checkFinalAlreadyAssigned(identifier);
     }
 
     DartType valueType;
diff --git a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
index 65fc8ab..993020d 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -483,6 +483,8 @@
 
   void _resolveReceiverNull(
       MethodInvocation node, SimpleIdentifier nameNode, String name) {
+    _resolver.checkReadOfNotAssignedLocalVariable(nameNode);
+
     var element = nameScope.lookup2(name).getter;
     if (element != null) {
       element = _resolver.toLegacyElement(element);
diff --git a/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
index e3f3cc0..545a141 100644
--- a/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
@@ -58,7 +58,7 @@
       node.operand,
     );
 
-    _assignmentShared.checkLateFinalAlreadyAssigned(node.operand);
+    _assignmentShared.checkFinalAlreadyAssigned(node.operand);
 
     _resolve1(node, receiverType);
     _resolve2(node, receiverType);
diff --git a/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
index 8a27334..fda77df 100644
--- a/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
@@ -58,7 +58,9 @@
 
     node.operand.accept(_resolver);
 
-    _assignmentShared.checkLateFinalAlreadyAssigned(node.operand);
+    if (operator.isIncrementOperator) {
+      _assignmentShared.checkFinalAlreadyAssigned(node.operand);
+    }
 
     _resolve1(node);
     _resolve2(node);
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 28a8cd2..a5db15b 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -591,7 +591,7 @@
   LibraryMap readFromSource(Source source, String libraryFileContents) {
     // TODO(paulberry): initialize the feature set appropriately based on the
     // version of the SDK we are reading, and enable flags.
-    var featureSet = FeatureSet.fromEnableFlags([]);
+    var featureSet = FeatureSet.latestLanguageVersion();
 
     var parseResult = parseString(
       content: libraryFileContents,
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 9d8d3b9..047d328 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -5122,7 +5122,7 @@
   static const CompileTimeErrorCode LATE_FINAL_LOCAL_ALREADY_ASSIGNED =
       CompileTimeErrorCode('LATE_FINAL_LOCAL_ALREADY_ASSIGNED',
           "The late final local variable is already definitely assigned.",
-          correction: "Try removing the 'late' modifier, or don't reassign "
+          correction: "Try removing the 'final' modifier, or don't reassign "
               "the value.");
 
   /**
@@ -7590,6 +7590,14 @@
           "library that declares it.",
       correction: "Try making it public.");
 
+  static const CompileTimeErrorCode READ_POTENTIALLY_UNASSIGNED_FINAL =
+      CompileTimeErrorCode(
+    'READ_POTENTIALLY_UNASSIGNED_FINAL',
+    "The final variable '{0}' can't be read because it is potentially "
+        "unassigned at this point.",
+    correction: "Ensure that it is assigned on necessary execution paths.",
+  );
+
   /**
    * 12.1 Constants: It is a compile-time error if the value of a compile-time
    * constant expression depends on itself.
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 512d356..58cb764 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1669,10 +1669,14 @@
           }
           return;
         }
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL,
-            highlightedNode,
-            [element.name]);
+        if (_isNonNullableByDefault && element is PromotableElement) {
+          // Handled during resolution, with flow analysis.
+        } else {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL,
+              highlightedNode,
+              [element.name]);
+        }
       }
     } else if (element is FunctionElement) {
       _errorReporter.reportErrorForNode(
@@ -2607,6 +2611,14 @@
     if (_isInNativeClass || list.isSynthetic) {
       return;
     }
+
+    // Handled during resolution, with flow analysis.
+    if (_isNonNullableByDefault &&
+        list.isFinal &&
+        list.parent is VariableDeclarationStatement) {
+      return;
+    }
+
     bool isConst = list.isConst;
     if (!(isConst || list.isFinal)) {
       return;
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 84704c3..208d851 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -202,7 +202,7 @@
   /// and to report any errors that are found to the given [_errorListener].
   factory Parser(Source source, AnalysisErrorListener errorListener,
       {bool useFasta, @required FeatureSet featureSet}) {
-    featureSet ??= FeatureSet.fromEnableFlags([]);
+    featureSet ??= FeatureSet.latestLanguageVersion();
     if (useFasta ?? Parser.useFasta) {
       return _Parser2(source, errorListener, featureSet,
           allowNativeClause: true);
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index df9f795..eb1672e 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -427,21 +427,49 @@
   }
 
   void checkReadOfNotAssignedLocalVariable(SimpleIdentifier node) {
-    if (_flowAnalysis != null) {
-      if (_flowAnalysis.isPotentiallyNonNullableLocalReadBeforeWrite(node)) {
-        errorReporter.reportErrorForNode(
-          CompileTimeErrorCode
-              .NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
-          node,
-          [node.name],
-        );
+    if (_flowAnalysis?.flow == null) {
+      return;
+    }
+
+    if (!node.inGetterContext()) {
+      return;
+    }
+
+    var element = node.staticElement;
+    if (element is VariableElement) {
+      var assigned = _flowAnalysis.isDefinitelyAssigned(node, element);
+      var unassigned = _flowAnalysis.isDefinitelyUnassigned(node, element);
+
+      if (element.isLate) {
+        if (unassigned) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE,
+            node,
+            [node.name],
+          );
+        }
+        return;
       }
-      if (_flowAnalysis.isReadOfDefinitelyUnassignedLateLocal(node)) {
-        errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE,
-          node,
-          [node.name],
-        );
+
+      if (!assigned) {
+        if (element.isFinal) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.READ_POTENTIALLY_UNASSIGNED_FINAL,
+            node,
+            [node.name],
+          );
+          return;
+        }
+
+        if (typeSystem.isPotentiallyNonNullable(element.type)) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode
+                .NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
+            node,
+            [node.name],
+          );
+          return;
+        }
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index ec6ff4a..0a37c30 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -446,8 +446,9 @@
       libraryName,
       0,
       libraryName.length,
-      FeatureSet.fromEnableFlags(
-        isNonNullableByDefault ? [EnableString.non_nullable] : [],
+      FeatureSet.fromEnableFlags2(
+        sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
+        flags: isNonNullableByDefault ? [EnableString.non_nullable] : [],
       ),
     );
     library.definingCompilationUnit = unit;
diff --git a/pkg/analyzer/lib/src/lint/util.dart b/pkg/analyzer/lib/src/lint/util.dart
index 0644fb7..c8af831 100644
--- a/pkg/analyzer/lib/src/lint/util.dart
+++ b/pkg/analyzer/lib/src/lint/util.dart
@@ -88,7 +88,7 @@
 
   Spelunker(this.path, {IOSink sink, FeatureSet featureSet})
       : sink = sink ?? stdout,
-        featureSet = featureSet ?? FeatureSet.fromEnableFlags([]);
+        featureSet = featureSet ?? FeatureSet.latestLanguageVersion();
 
   void spelunk() {
     var contents = File(path).readAsStringSync();
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index ce3f18b..8898a83 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -4462,6 +4462,7 @@
   List<String> _variantField_33;
   idl.LinkedNodeCommentType _variantField_29;
   List<LinkedNodeBuilder> _variantField_3;
+  List<int> _variantField_41;
   LinkedLibraryLanguageVersionBuilder _variantField_40;
   LinkedNodeBuilder _variantField_10;
   idl.LinkedNodeFormalParameterKind _variantField_26;
@@ -7028,22 +7029,11 @@
     return _variantField_33 ??= <String>[];
   }
 
-  @override
-  List<String> get compilationUnit_featureSetStrings {
-    assert(kind == idl.LinkedNodeKind.compilationUnit);
-    return _variantField_33 ??= <String>[];
-  }
-
   set comment_tokens(List<String> value) {
     assert(kind == idl.LinkedNodeKind.comment);
     _variantField_33 = value;
   }
 
-  set compilationUnit_featureSetStrings(List<String> value) {
-    assert(kind == idl.LinkedNodeKind.compilationUnit);
-    _variantField_33 = value;
-  }
-
   @override
   idl.LinkedNodeCommentType get comment_type {
     assert(kind == idl.LinkedNodeKind.comment);
@@ -7115,6 +7105,18 @@
   }
 
   @override
+  List<int> get compilationUnit_featureSet {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_41 ??= <int>[];
+  }
+
+  set compilationUnit_featureSet(List<int> value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    assert(value == null || value.every((e) => e >= 0));
+    _variantField_41 = value;
+  }
+
+  @override
   LinkedLibraryLanguageVersionBuilder get compilationUnit_languageVersion {
     assert(kind == idl.LinkedNodeKind.compilationUnit);
     return _variantField_40;
@@ -7760,15 +7762,15 @@
   LinkedNodeBuilder.compilationUnit({
     List<LinkedNodeBuilder> compilationUnit_declarations,
     LinkedNodeBuilder compilationUnit_scriptTag,
-    List<String> compilationUnit_featureSetStrings,
     List<LinkedNodeBuilder> compilationUnit_directives,
+    List<int> compilationUnit_featureSet,
     LinkedLibraryLanguageVersionBuilder compilationUnit_languageVersion,
     int informativeId,
   })  : _kind = idl.LinkedNodeKind.compilationUnit,
         _variantField_2 = compilationUnit_declarations,
         _variantField_6 = compilationUnit_scriptTag,
-        _variantField_33 = compilationUnit_featureSetStrings,
         _variantField_3 = compilationUnit_directives,
+        _variantField_41 = compilationUnit_featureSet,
         _variantField_40 = compilationUnit_languageVersion,
         _variantField_36 = informativeId;
 
@@ -9391,17 +9393,17 @@
       signature.addBool(this.compilationUnit_scriptTag != null);
       this.compilationUnit_scriptTag?.collectApiSignature(signature);
       signature.addInt(this.flags ?? 0);
-      if (this.compilationUnit_featureSetStrings == null) {
-        signature.addInt(0);
-      } else {
-        signature.addInt(this.compilationUnit_featureSetStrings.length);
-        for (var x in this.compilationUnit_featureSetStrings) {
-          signature.addString(x);
-        }
-      }
       signature.addString(this.name ?? '');
       signature.addBool(this.compilationUnit_languageVersion != null);
       this.compilationUnit_languageVersion?.collectApiSignature(signature);
+      if (this.compilationUnit_featureSet == null) {
+        signature.addInt(0);
+      } else {
+        signature.addInt(this.compilationUnit_featureSet.length);
+        for (var x in this.compilationUnit_featureSet) {
+          signature.addInt(x);
+        }
+      }
     } else if (kind == idl.LinkedNodeKind.conditionalExpression) {
       signature.addInt(this.kind == null ? 0 : this.kind.index);
       signature.addBool(this.conditionalExpression_condition != null);
@@ -10777,6 +10779,7 @@
     fb.Offset offset_variantField_13;
     fb.Offset offset_variantField_33;
     fb.Offset offset_variantField_3;
+    fb.Offset offset_variantField_41;
     fb.Offset offset_variantField_40;
     fb.Offset offset_variantField_10;
     fb.Offset offset_variantField_25;
@@ -10835,6 +10838,9 @@
       offset_variantField_3 = fbBuilder
           .writeList(_variantField_3.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (!(_variantField_41 == null || _variantField_41.isEmpty)) {
+      offset_variantField_41 = fbBuilder.writeListUint32(_variantField_41);
+    }
     if (_variantField_40 != null) {
       offset_variantField_40 = _variantField_40.finish(fbBuilder);
     }
@@ -10936,6 +10942,9 @@
     if (offset_variantField_3 != null) {
       fbBuilder.addOffset(3, offset_variantField_3);
     }
+    if (offset_variantField_41 != null) {
+      fbBuilder.addOffset(41, offset_variantField_41);
+    }
     if (offset_variantField_40 != null) {
       fbBuilder.addOffset(40, offset_variantField_40);
     }
@@ -11046,6 +11055,7 @@
   List<String> _variantField_33;
   idl.LinkedNodeCommentType _variantField_29;
   List<idl.LinkedNode> _variantField_3;
+  List<int> _variantField_41;
   idl.LinkedLibraryLanguageVersion _variantField_40;
   idl.LinkedNode _variantField_10;
   idl.LinkedNodeFormalParameterKind _variantField_26;
@@ -12887,14 +12897,6 @@
   }
 
   @override
-  List<String> get compilationUnit_featureSetStrings {
-    assert(kind == idl.LinkedNodeKind.compilationUnit);
-    _variantField_33 ??= const fb.ListReader<String>(fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 33, const <String>[]);
-    return _variantField_33;
-  }
-
-  @override
   idl.LinkedNodeCommentType get comment_type {
     assert(kind == idl.LinkedNodeKind.comment);
     _variantField_29 ??= const _LinkedNodeCommentTypeReader()
@@ -12945,6 +12947,14 @@
   }
 
   @override
+  List<int> get compilationUnit_featureSet {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_41 ??= const fb.Uint32ListReader()
+        .vTableGet(_bc, _bcOffset, 41, const <int>[]);
+    return _variantField_41;
+  }
+
+  @override
   idl.LinkedLibraryLanguageVersion get compilationUnit_languageVersion {
     assert(kind == idl.LinkedNodeKind.compilationUnit);
     _variantField_40 ??= const _LinkedLibraryLanguageVersionReader()
@@ -13540,15 +13550,14 @@
         _result["compilationUnit_scriptTag"] =
             compilationUnit_scriptTag.toJson();
       }
-      if (compilationUnit_featureSetStrings.isNotEmpty) {
-        _result["compilationUnit_featureSetStrings"] =
-            compilationUnit_featureSetStrings;
-      }
       if (compilationUnit_directives.isNotEmpty) {
         _result["compilationUnit_directives"] = compilationUnit_directives
             .map((_value) => _value.toJson())
             .toList();
       }
+      if (compilationUnit_featureSet.isNotEmpty) {
+        _result["compilationUnit_featureSet"] = compilationUnit_featureSet;
+      }
       if (compilationUnit_languageVersion != null) {
         _result["compilationUnit_languageVersion"] =
             compilationUnit_languageVersion.toJson();
@@ -15083,8 +15092,8 @@
       return {
         "compilationUnit_declarations": compilationUnit_declarations,
         "compilationUnit_scriptTag": compilationUnit_scriptTag,
-        "compilationUnit_featureSetStrings": compilationUnit_featureSetStrings,
         "compilationUnit_directives": compilationUnit_directives,
+        "compilationUnit_featureSet": compilationUnit_featureSet,
         "compilationUnit_languageVersion": compilationUnit_languageVersion,
         "flags": flags,
         "informativeId": informativeId,
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 5190610..e9c6fe6 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1114,6 +1114,8 @@
 
   variantField_3:[LinkedNode] (id: 3);
 
+  variantField_41:[uint] (id: 41);
+
   /// The language version information.
   variantField_40:LinkedLibraryLanguageVersion (id: 40);
 
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index bd5eac0..c89630c 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -864,8 +864,8 @@
   @VariantId(3, variant: LinkedNodeKind.compilationUnit)
   List<LinkedNode> get compilationUnit_directives;
 
-  @VariantId(33, variant: LinkedNodeKind.compilationUnit)
-  List<String> get compilationUnit_featureSetStrings;
+  @VariantId(41, variant: LinkedNodeKind.compilationUnit)
+  List<int> get compilationUnit_featureSet;
 
   /// The language version information.
   @VariantId(40, variant: LinkedNodeKind.compilationUnit)
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index 0a1f078..65a5737 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -364,8 +364,8 @@
       directives: _readNodeList(data.compilationUnit_directives),
       declarations: _readNodeList(data.compilationUnit_declarations),
       endToken: null,
-      featureSet: ExperimentStatus.fromStrings(
-        data.compilationUnit_featureSetStrings,
+      featureSet: ExperimentStatus.fromStorage(
+        data.compilationUnit_featureSet,
       ),
     );
     LazyCompilationUnit(node, data);
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
index 8ec9dd4..e3a4384 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -287,8 +287,8 @@
     var builder = LinkedNodeBuilder.compilationUnit(
       compilationUnit_declarations: _writeNodeList(node.declarations),
       compilationUnit_directives: _writeNodeList(node.directives),
-      compilationUnit_featureSetStrings:
-          (node.featureSet as ExperimentStatus).toStringList(),
+      compilationUnit_featureSet:
+          (node.featureSet as ExperimentStatus).toStorage(),
       compilationUnit_languageVersion: LinkedLibraryLanguageVersionBuilder(
         package: LinkedLanguageVersionBuilder(
           major: nodeImpl.languageVersion.package.major,
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 96d633fb..bbef02e 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -604,8 +604,9 @@
             enabledExperiments.add(experimentName);
           }
         }
-        options.contextFeatures = FeatureSet.fromEnableFlags(
-          enabledExperiments,
+        options.contextFeatures = FeatureSet.fromEnableFlags2(
+          sdkLanguageVersion: ExperimentStatus.currentVersion,
+          flags: enabledExperiments,
         );
       }
 
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk_elements.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk_elements.dart
index f97de63..39b7903 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk_elements.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk_elements.dart
@@ -2,7 +2,6 @@
 // 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/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
@@ -825,7 +824,7 @@
       'dart.async',
       0,
       0,
-      FeatureSet.fromEnableFlags([EnableString.non_nullable]),
+      ExperimentStatus.latestWithNullSafety,
     );
 
     var asyncUnit = CompilationUnitElementImpl();
@@ -918,7 +917,7 @@
       'dart.core',
       0,
       0,
-      FeatureSet.fromEnableFlags([EnableString.non_nullable]),
+      ExperimentStatus.latestWithNullSafety,
     );
     coreLibrary.definingCompilationUnit = coreUnit;
 
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index 47f1790..9e60a4f 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -5,7 +5,6 @@
 import 'dart:collection';
 import 'dart:core';
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
@@ -485,20 +484,20 @@
   @override
   final BazelWorkspace workspace;
 
-  bool _featureSetReady = false;
-  FeatureSet _featureSet;
+  bool _enabledExperimentsReady = false;
+  List<String> _enabledExperiments;
 
   BazelWorkspacePackage(String packageName, this.root, this.workspace)
       : _uriPrefix = 'package:$packageName/';
 
   @override
-  FeatureSet get featureSet {
-    if (_featureSetReady) {
-      return _featureSet;
+  List<String> get enabledExperiments {
+    if (_enabledExperimentsReady) {
+      return _enabledExperiments;
     }
 
     try {
-      _featureSetReady = true;
+      _enabledExperimentsReady = true;
       var buildContent = workspace.provider
           .getFolder(root)
           .getChildAssumingFile('BUILD')
@@ -511,15 +510,13 @@
           .join()
           .contains('dart_package(null_safety=True');
       if (hasNonNullableFlag) {
-        _featureSet = FeatureSet.fromEnableFlags(
-          [EnableString.non_nullable],
-        );
+        _enabledExperiments = [EnableString.non_nullable];
       }
     } on FileSystemException {
       // ignored
     }
 
-    return _featureSet;
+    return _enabledExperiments;
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/workspace/workspace.dart b/pkg/analyzer/lib/src/workspace/workspace.dart
index f5f037f..e37fd1a 100644
--- a/pkg/analyzer/lib/src/workspace/workspace.dart
+++ b/pkg/analyzer/lib/src/workspace/workspace.dart
@@ -2,7 +2,6 @@
 // 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/dart/analysis/features.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
@@ -39,10 +38,10 @@
 /// understand whether arbitrary file paths represent libraries declared within
 /// a given package in a Workspace.
 abstract class WorkspacePackage {
-  /// Return the [FeatureSet] for all files in the package.
+  /// Return the experiments enabled for all files in the package.
   ///
-  /// Return `null` if this package does not have a feature set override.
-  FeatureSet get featureSet => null;
+  /// Return `null` if this package does not have enabled experiments.
+  List<String> get enabledExperiments => null;
 
   String get root;
 
diff --git a/pkg/analyzer/test/dart/analysis/utilities_test.dart b/pkg/analyzer/test/dart/analysis/utilities_test.dart
index 137eac3..745f0fe 100644
--- a/pkg/analyzer/test/dart/analysis/utilities_test.dart
+++ b/pkg/analyzer/test/dart/analysis/utilities_test.dart
@@ -211,7 +211,7 @@
     var result = parseString(
       content: content,
       throwIfDiagnostics: false,
-      featureSet: FeatureSet.fromEnableFlags([]),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
 
     var languageVersion = result.unit.languageVersionToken;
@@ -226,7 +226,7 @@
     var result = parseString(
       content: content,
       throwIfDiagnostics: false,
-      featureSet: FeatureSet.fromEnableFlags([]),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
 
     expect(result.unit.languageVersionToken, isNull);
diff --git a/pkg/analyzer/test/generated/elements_types_mixin.dart b/pkg/analyzer/test/generated/elements_types_mixin.dart
index 9740869..b78f503 100644
--- a/pkg/analyzer/test/generated/elements_types_mixin.dart
+++ b/pkg/analyzer/test/generated/elements_types_mixin.dart
@@ -408,8 +408,11 @@
       uriStr,
       -1,
       0,
-      FeatureSet.fromEnableFlags(
-        typeSystem.isNonNullableByDefault ? [EnableString.non_nullable] : [],
+      FeatureSet.fromEnableFlags2(
+        sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
+        flags: typeSystem.isNonNullableByDefault
+            ? [EnableString.non_nullable]
+            : [],
       ),
     );
     library.typeSystem = typeSystem;
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 134f210..fa9fb23 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -1386,7 +1386,10 @@
 @reflectiveTest
 class ExpressionParserTest_Fasta extends FastaParserTestCase
     with ExpressionParserTestMixin {
-  final beforeUiAsCode = FeatureSet.forTesting(sdkVersion: '2.2.0');
+  final beforeUiAsCode = FeatureSet.fromEnableFlags2(
+    sdkLanguageVersion: Version.parse('2.2.0'),
+    flags: [],
+  );
 
   void test_binaryExpression_allOperators() {
     // https://github.com/dart-lang/sdk/issues/36255
@@ -1979,12 +1982,17 @@
   }
 
   void test_simple_not_enabled() {
-    parseCompilationUnit('extension E on C { }',
-        errors: [
-          expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 0, 9),
-          expectedError(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, 15, 1)
-        ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.3.0'));
+    parseCompilationUnit(
+      'extension E on C { }',
+      errors: [
+        expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 0, 9),
+        expectedError(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, 15, 1)
+      ],
+      featureSet: FeatureSet.fromEnableFlags2(
+        sdkLanguageVersion: Version.parse('2.3.0'),
+        flags: [],
+      ),
+    );
   }
 
   void test_simple_with() {
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index 33b96b4..63b003e 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -2,42 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/dart/element/type_provider.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/packages.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/generated/testing/element_factory.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer/src/test_utilities/mock_sdk.dart';
-import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 
 import '../src/dart/resolution/context_collection_resolution.dart';
-import 'test_analysis_context.dart';
-import 'test_support.dart';
-
-const String _defaultSourceName = "/test.dart";
 
 /// An AST visitor used to verify that all of the nodes in an AST structure that
 /// should have been resolved were resolved.
@@ -298,340 +271,6 @@
   }
 }
 
-class ResolverTestCase with ResourceProviderMixin {
-  /// Specifies if [assertErrors] should check for [HintCode.UNUSED_ELEMENT] and
-  /// [HintCode.UNUSED_FIELD].
-  bool enableUnusedElement = false;
-
-  /// Specifies if [assertErrors] should check for
-  /// [HintCode.UNUSED_LOCAL_VARIABLE].
-  bool enableUnusedLocalVariable = false;
-
-  final Map<Source, TestAnalysisResult> analysisResults = {};
-
-  final StringBuffer _logBuffer = StringBuffer();
-  FileContentOverlay fileContentOverlay = FileContentOverlay();
-  AnalysisDriver driver;
-
-  AnalysisOptions get analysisOptions => driver?.analysisOptions;
-
-  /// The default [AnalysisOptions] that should be used by [reset].
-  AnalysisOptions get defaultAnalysisOptions => AnalysisOptionsImpl();
-
-  /// Return the list of experiments that are to be enabled for tests in this
-  /// class.
-  List<String> get enabledExperiments => null;
-
-  /// Return a type provider that can be used to test the results of resolution.
-  ///
-  /// Throws an [AnalysisException] if `dart:core` cannot be resolved.
-  TypeProvider get typeProvider {
-    if (analysisResults.isEmpty) {
-      fail('typeProvider called before computing an analysis result.');
-    }
-    return analysisResults.values.first.typeProvider;
-  }
-
-  /// Return a type system that can be used to test the results of resolution.
-  TypeSystemImpl get typeSystem {
-    if (analysisResults.isEmpty) {
-      fail('typeSystem called before computing an analysis result.');
-    }
-    return analysisResults.values.first.typeSystem;
-  }
-
-  /// Add a source file with the given [filePath] in the root of the file
-  /// system. The file path should be absolute. The file will have the given
-  /// [contents] set in the content provider. Return the source representing the
-  /// added file.
-  Source addNamedSource(String filePath, String contents) {
-    filePath = convertPath(filePath);
-    File file = newFile(filePath, content: contents);
-    Source source = file.createSource();
-    driver.addFile(filePath);
-    return source;
-  }
-
-  /// Add a source file named 'test.dart' in the root of the file system. The
-  /// file will have the given [contents] set in the content provider. Return
-  /// the source representing the added file.
-  Source addSource(String contents) =>
-      addNamedSource(_defaultSourceName, contents);
-
-  /// Assert that the number of errors reported against the given
-  /// [source] matches the number of errors that are given and that they have
-  /// the expected error codes. The order in which the errors were gathered is
-  /// ignored.
-  void assertErrors(Source source,
-      [List<ErrorCode> expectedErrorCodes = const <ErrorCode>[]]) {
-    TestAnalysisResult result = analysisResults[source];
-    expect(result, isNotNull);
-
-    GatheringErrorListener errorListener = GatheringErrorListener();
-    for (AnalysisError error in result.errors) {
-      expect(error.source, source);
-      ErrorCode errorCode = error.errorCode;
-      if (!enableUnusedElement &&
-          (errorCode == HintCode.UNUSED_ELEMENT ||
-              errorCode == HintCode.UNUSED_FIELD)) {
-        continue;
-      }
-      if (!enableUnusedLocalVariable &&
-          (errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
-              errorCode == HintCode.UNUSED_CATCH_STACK ||
-              errorCode == HintCode.UNUSED_LOCAL_VARIABLE)) {
-        continue;
-      }
-      errorListener.onError(error);
-    }
-    errorListener.assertErrorsWithCodes(expectedErrorCodes);
-  }
-
-  /// Asserts that [code] verifies, but has errors with the given error codes.
-  ///
-  /// Like [assertErrors], but takes a string of source code.
-  // TODO(rnystrom): Use this in more tests that have the same structure.
-  Future<void> assertErrorsInCode(String code, List<ErrorCode> errors,
-      {bool verify = true, String sourceName = _defaultSourceName}) async {
-    Source source = addNamedSource(sourceName, code);
-    await computeAnalysisResult(source);
-    assertErrors(source, errors);
-    if (verify) {
-      this.verify([source]);
-    }
-  }
-
-  /// Asserts that [code] has errors with the given error codes.
-  ///
-  /// Like [assertErrors], but takes a string of source code.
-  Future<void> assertErrorsInUnverifiedCode(
-      String code, List<ErrorCode> errors) async {
-    Source source = addSource(code);
-    await computeAnalysisResult(source);
-    assertErrors(source, errors);
-  }
-
-  /// Assert that no errors have been reported against the given source.
-  ///
-  /// @param source the source against which no errors should have been reported
-  /// @throws AnalysisException if the reported errors could not be computed
-  /// @throws AssertionFailedError if any errors have been reported
-  void assertNoErrors(Source source) {
-    assertErrors(source);
-  }
-
-  /// Asserts that [code] has no errors or warnings.
-  // TODO(rnystrom): Use this in more tests that have the same structure.
-  Future<void> assertNoErrorsInCode(String code) async {
-    Source source = addSource(code);
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
-    TestAnalysisResult analysisResult;
-    ResolvedUnitResult result = await driver.getResult(source.fullName);
-    analysisResult = TestAnalysisResult(source, result.unit, result.errors);
-    analysisResults[source] = analysisResult;
-    return analysisResult;
-  }
-
-  /// Compute the analysis result to the given [code] in '/test.dart'.
-  Future<TestAnalysisResult> computeTestAnalysisResult(String code) async {
-    Source source = addSource(code);
-    return await computeAnalysisResult(source);
-  }
-
-  /// Create a library element that represents a library named `"test"`
-  /// containing a single empty compilation unit.
-  ///
-  /// @return the library element that was created
-  LibraryElementImpl createDefaultTestLibrary() =>
-      createTestLibrary(TestAnalysisContext(), "test");
-
-  /// Return a source object representing a file with the given [fileName].
-  Source createNamedSource(String fileName) {
-    return getFile(fileName).createSource();
-  }
-
-  /// Create a library element that represents a library with the given name
-  /// containing a single empty compilation unit.
-  ///
-  /// @param libraryName the name of the library to be created
-  /// @return the library element that was created
-  LibraryElementImpl createTestLibrary(
-      AnalysisContext context, String libraryName,
-      [List<String> typeNames]) {
-    String fileName = convertPath("/test/$libraryName.dart");
-    Source definingCompilationUnitSource = createNamedSource(fileName);
-    List<CompilationUnitElement> sourcedCompilationUnits;
-    if (typeNames == null) {
-      sourcedCompilationUnits = const <CompilationUnitElement>[];
-    } else {
-      int count = typeNames.length;
-      sourcedCompilationUnits = List<CompilationUnitElement>(count);
-      for (int i = 0; i < count; i++) {
-        String typeName = typeNames[i];
-        ClassElementImpl type = ClassElementImpl(typeName, -1);
-        String fileName = "$typeName.dart";
-        CompilationUnitElementImpl compilationUnit =
-            CompilationUnitElementImpl();
-        compilationUnit.source = createNamedSource(fileName);
-        compilationUnit.librarySource = definingCompilationUnitSource;
-        compilationUnit.types = <ClassElement>[type];
-        sourcedCompilationUnits[i] = compilationUnit;
-      }
-    }
-    CompilationUnitElementImpl compilationUnit = CompilationUnitElementImpl();
-    compilationUnit.librarySource =
-        compilationUnit.source = definingCompilationUnitSource;
-    var featureSet = context.analysisOptions.contextFeatures;
-    LibraryElementImpl library = LibraryElementImpl(
-        context, driver?.currentSession, libraryName, -1, 0, featureSet);
-    library.definingCompilationUnit = compilationUnit;
-    library.parts = sourcedCompilationUnits;
-    return library;
-  }
-
-  Expression findTopLevelConstantExpression(
-          CompilationUnit compilationUnit, String name) =>
-      findTopLevelDeclaration(compilationUnit, name).initializer;
-
-  VariableDeclaration findTopLevelDeclaration(
-      CompilationUnit compilationUnit, String name) {
-    for (CompilationUnitMember member in compilationUnit.declarations) {
-      if (member is TopLevelVariableDeclaration) {
-        for (VariableDeclaration variable in member.variables.variables) {
-          if (variable.name.name == name) {
-            return variable;
-          }
-        }
-      }
-    }
-    return null;
-    // Not found
-  }
-
-  /// Re-create the analysis context being used by the test case.
-  void reset() {
-    resetWith();
-  }
-
-  /// Re-create the analysis context being used by the test with the either
-  /// given [options] or [packages].
-  void resetWith({AnalysisOptions options, List<List<String>> packages}) {
-    if (options != null && packages != null) {
-      fail('Only packages or options can be specified.');
-    }
-    options ??= defaultAnalysisOptions;
-    List<String> experiments = enabledExperiments;
-    if (experiments != null) {
-      (options as AnalysisOptionsImpl).contextFeatures =
-          FeatureSet.fromEnableFlags(experiments);
-    }
-    DartSdk sdk = MockSdk(
-      resourceProvider: resourceProvider,
-      analysisOptions: options,
-    );
-
-    List<UriResolver> resolvers = <UriResolver>[
-      DartUriResolver(sdk),
-      ResourceUriResolver(resourceProvider)
-    ];
-    if (packages != null) {
-      var packageMap = <String, List<Folder>>{};
-      packages.forEach((args) {
-        String name = args[0];
-        String content = args[1];
-        File file = newFile('/packages/$name/$name.dart', content: content);
-        packageMap[name] = <Folder>[file.parent];
-      });
-      resolvers.add(PackageMapUriResolver(resourceProvider, packageMap));
-    }
-    SourceFactory sourceFactory = SourceFactory(resolvers);
-
-    PerformanceLog log = PerformanceLog(_logBuffer);
-    AnalysisDriverScheduler scheduler = AnalysisDriverScheduler(log);
-    driver = AnalysisDriver(scheduler, log, resourceProvider, MemoryByteStore(),
-        fileContentOverlay, null, sourceFactory, options,
-        packages: Packages.empty);
-    scheduler.start();
-  }
-
-  Future<CompilationUnit> resolveSource(String sourceText) =>
-      resolveSource2('/test.dart', sourceText);
-
-  Future<CompilationUnit> resolveSource2(
-      String fileName, String sourceText) async {
-    Source source = addNamedSource(fileName, sourceText);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    return analysisResult.unit;
-  }
-
-  Future<Source> resolveSources(List<String> sourceTexts) async {
-    for (int i = 0; i < sourceTexts.length; i++) {
-      Source source = addNamedSource('/lib${i + 1}.dart', sourceTexts[i]);
-      await computeAnalysisResult(source);
-      // reference the source if this is the last source
-      if (i + 1 == sourceTexts.length) {
-        return source;
-      }
-    }
-    return null;
-  }
-
-  Future<void> resolveWithAndWithoutExperimental(
-      List<String> strSources,
-      List<ErrorCode> codesWithoutExperimental,
-      List<ErrorCode> codesWithExperimental) async {
-    // Setup analysis context as non-experimental
-    AnalysisOptionsImpl options = AnalysisOptionsImpl();
-//    options.enableDeferredLoading = false;
-    resetWith(options: options);
-    // Analysis and assertions
-    Source source = await resolveSources(strSources);
-    await computeAnalysisResult(source);
-    assertErrors(source, codesWithoutExperimental);
-    verify([source]);
-    // Setup analysis context as experimental
-    reset();
-    // Analysis and assertions
-    source = await resolveSources(strSources);
-    await computeAnalysisResult(source);
-    assertErrors(source, codesWithExperimental);
-    verify([source]);
-  }
-
-  Future<void> resolveWithErrors(
-      List<String> strSources, List<ErrorCode> codes) async {
-    Source source = await resolveSources(strSources);
-    assertErrors(source, codes);
-    verify([source]);
-  }
-
-  void setUp() {
-    ElementFactory.flushStaticState();
-    reset();
-  }
-
-  void tearDown() {
-    AnalysisEngine.instance.clearCaches();
-  }
-
-  /// Verify that all of the identifiers in the compilation units associated
-  /// with the given [sources] have been resolved.
-  void verify(List<Source> sources) {
-    ResolutionVerifier verifier = ResolutionVerifier();
-    for (Source source in sources) {
-      TestAnalysisResult result = analysisResults[source];
-      expect(result, isNotNull);
-      result.unit.accept(verifier);
-    }
-    verifier.assertResolved();
-  }
-}
-
 /// Shared infrastructure for [StaticTypeAnalyzer2Test].
 class StaticTypeAnalyzer2TestShared extends PubPackageResolutionTest {
   /// Find the expression that starts at the offset of [search] and validate its
@@ -729,17 +368,3 @@
     }
   }
 }
-
-class TestAnalysisResult {
-  final Source source;
-  final CompilationUnit unit;
-  final List<AnalysisError> errors;
-
-  TestAnalysisResult(this.source, this.unit, this.errors);
-
-  LibraryElement get libraryElement => unit.declaredElement.library;
-
-  TypeProvider get typeProvider => libraryElement.typeProvider;
-
-  TypeSystemImpl get typeSystem => libraryElement.typeSystem;
-}
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 824959c..639ce65 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -202,7 +202,7 @@
     var scanner = _createScanner(r'''
 // @dart = 2.0
 ''');
-    var defaultFeatureSet = FeatureSet.fromEnableFlags([]);
+    var defaultFeatureSet = FeatureSet.latestLanguageVersion();
     expect(defaultFeatureSet.isEnabled(Feature.extension_methods), isTrue);
 
     scanner.configureFeatures(
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 4d01e88..8e58c95 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -4,15 +4,12 @@
 
 import 'dart:async';
 
-import 'package:_fe_analyzer_shared/src/base/errors.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -31,7 +28,7 @@
 
 /// Strong mode static analyzer local type inference tests
 @reflectiveTest
-class StrongModeLocalInferenceTest extends ResolverTestCase {
+class StrongModeLocalInferenceTest extends PubPackageResolutionTest {
   TypeAssertions _assertions;
 
   Asserter<DartType> _isDynamic;
@@ -58,23 +55,12 @@
 
   AsserterBuilder<Element, DartType> _hasElement;
 
-  void assertInvokeType(InvocationExpression expression, String expected) {
-    DartType actual = expression.staticInvokeType;
-    assertType(actual, expected);
-  }
-
-  void assertType(DartType type, String expected) {
-    if (expected == null) {
-      expect(type, isNull);
-    } else {
-      var typeStr = type.getDisplayString(withNullability: false);
-      expect(typeStr, expected);
-    }
-  }
+  CompilationUnit get unit => result.unit;
 
   @override
-  Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
-    TestAnalysisResult result = await super.computeAnalysisResult(source);
+  Future<void> resolveTestFile() async {
+    var result = await super.resolveTestFile();
+
     if (_assertions == null) {
       _assertions = TypeAssertions(typeProvider);
       _isType = _assertions.isType;
@@ -97,14 +83,8 @@
       _isFutureOfNull = _isFutureOf([_isNull]);
       _isFutureOrOfInt = _isFutureOrOf([_isInt]);
     }
-    return result;
-  }
 
-  @override
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = AnalysisOptionsImpl();
-    resetWith(options: options);
+    return result;
   }
 
   test_async_method_propagation() async {
@@ -128,7 +108,7 @@
         Future<int> g5() async { return await new Future.value(3); }
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await resolveTestCode(code);
 
     void check(String name, Asserter<InterfaceType> typeTest) {
       MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
@@ -184,7 +164,7 @@
       Future<int> g4() async { return new Future.value(3); }
       Future<int> g5() async { return await new Future.value(3); }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await resolveTestCode(code);
 
     void check(String name, Asserter<InterfaceType> typeTest) {
       FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
@@ -230,7 +210,7 @@
         A<int> a = new A()..map(0, (x) => [x]);
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await resolveTestCode(code);
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     CascadeExpression fetch(int i) {
@@ -259,11 +239,10 @@
     T f<S, T extends S>(S x) => null;
     void test() { var x = f(3); }
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 60, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
     VariableDeclarationStatement stmt = statements[0];
@@ -280,11 +259,10 @@
     T f<T extends S, S>(S x) => null;
     void test() { var x = f(3); }
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 60, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
     VariableDeclarationStatement stmt = statements[0];
@@ -294,14 +272,14 @@
   }
 
   test_constrainedByBounds3() async {
-    Source source = addSource(r'''
+    var code = r'''
       T f<T extends S, S extends int>(S x) => null;
       void test() { var x = f(3); }
-   ''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+   ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 76, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
     VariableDeclarationStatement stmt = statements[0];
@@ -320,11 +298,10 @@
     T f<S, T extends Func1<S, S>>(S x) => null;
     void test() { var x = f(3)(4); }
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 110, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
     VariableDeclarationStatement stmt = statements[0];
@@ -344,11 +321,11 @@
     T f<T extends Func1<S, S>, S>(S x) => null;
     void test() { var x = f(3)(null); }
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.COULD_NOT_INFER]);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 110, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 114, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
     VariableDeclarationStatement stmt = statements[0];
@@ -364,7 +341,7 @@
         A() : this.x = [];
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertNoErrorsInCode(code);
     ConstructorDeclaration constructor =
         AstFinder.getConstructorInClass(unit, "A", null);
     ConstructorFieldInitializer assignment = constructor.initializers[0];
@@ -379,7 +356,10 @@
       }
       class B<S> extends A<S> {}
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS, 92, 4),
+    ]);
 
     ConstructorDeclaration constructor =
         AstFinder.getConstructorInClass(unit, "A", null);
@@ -401,7 +381,7 @@
         List<String> f0 = ["hello"];
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertNoErrorsInCode(code);
 
     VariableDeclaration field = AstFinder.getFieldInClass(unit, "A", "f0");
 
@@ -421,7 +401,9 @@
         return (x) => x;
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_ELEMENT, 144, 5),
+    ]);
 
     Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
 
@@ -459,7 +441,17 @@
         Function2<int, String> l4 = (int x) {return 3;};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 91, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 144, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 200, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 205, 21),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 259, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 275, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 309, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 330, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -488,7 +480,16 @@
         Function2<int, String> l4 = (x) {return 3;};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 91, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 140, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 192, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 244, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 256, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 290, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 307, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -516,7 +517,16 @@
         Function2<int, List<String>> l3 = (int x) {return [3];};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 97, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 161, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 166, 23),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 228, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 245, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 286, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 308, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     Expression functionReturnValue(int i) {
@@ -553,7 +563,12 @@
         (new Mapper<int, String>().map)((int x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 262, 21),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 337, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 397, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -584,7 +599,11 @@
         (new Mapper<int, String>().map)((x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 318, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 374, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -613,7 +632,12 @@
         map((int x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 153, 21),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 200, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 232, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -642,7 +666,11 @@
         map((x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 181, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 209, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -673,7 +701,12 @@
         new Mapper<int, String>().map((int x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 256, 21),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 329, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 387, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -704,7 +737,11 @@
         new Mapper<int, String>().map((x) {return 3;});
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 310, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 364, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -733,7 +770,16 @@
         Function2<String, String> l4 = (x) => x.toLowerCase();
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 88, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 131, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 179, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 191, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 225, 2),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 239, 11),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 288, 2),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     Expression functionReturnValue(int i) {
@@ -912,7 +958,9 @@
     // Test that FutureOr does not have the constituent type methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<int> x) => x.abs();
-    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
+    ''', expectedErrors: [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 61, 3),
+    ]);
     _isDynamic(invoke.staticType);
   }
 
@@ -920,7 +968,9 @@
     // Test that FutureOr does not have the Future type methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<int> x) => x.then((x) => x);
-    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
+    ''', expectedErrors: [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 61, 4),
+    ]);
     _isDynamic(invoke.staticType);
   }
 
@@ -928,7 +978,9 @@
     // Test that FutureOr<dynamic> does not have all methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<dynamic> x) => x.abs();
-    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
+    ''', expectedErrors: [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 65, 3),
+    ]);
     _isDynamic(invoke.staticType);
   }
 
@@ -981,7 +1033,9 @@
     MethodInvocation invoke = await _testFutureOr(r'''
     Future<T> mk<T extends Future<Object>>(FutureOr<T> x) => null;
     dynamic test() => mk(new Future<int>.value(42));
-    ''', errors: [CompileTimeErrorCode.COULD_NOT_INFER]);
+    ''', expectedErrors: [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 111, 2),
+    ]);
     _isFutureOfInt(invoke.staticType);
   }
 
@@ -1045,7 +1099,14 @@
     var a4 = new A.fromB(new B(3));
 }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 205, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 241, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 284, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 318, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 347, 2),
+    ]);
+
     Element elementA = AstFinder.getClass(unit, "A").declaredElement;
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "test");
@@ -1062,7 +1123,7 @@
   }
 
   test_inferConstructor_unknownTypeLowerBound() async {
-    Source source = addSource(r'''
+    var code = r'''
         class C<T> {
           C(void callback(List<T> a));
         }
@@ -1071,10 +1132,11 @@
           // becomes inferred as List<Null>.
           var c = new C((items) {});
         }
-        ''');
-    CompilationUnit unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-    verify([source]);
+        ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 225, 1),
+    ]);
+
     DartType cType = findLocalVariable(unit, 'c').type;
     Element elementC = AstFinder.getClass(unit, "C").declaredElement;
 
@@ -1082,7 +1144,7 @@
   }
 
   test_inference_error_arguments() async {
-    Source source = addSource(r'''
+    var code = r'''
 typedef R F<T, R>(T t);
 
 F<T, T> g<T>(F<T, T> f) => (x) => f(f(x));
@@ -1090,12 +1152,13 @@
 test() {
   var h = g((int x) => 42.0);
 }
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      CompileTimeErrorCode.COULD_NOT_INFER,
-      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 84, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 88, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 90, 15),
+    ]);
+    _expectInferenceError(r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'double' for 'T' which doesn't work:
@@ -1108,7 +1171,7 @@
   }
 
   test_inference_error_arguments2() async {
-    Source source = addSource(r'''
+    var code = r'''
 typedef R F<T, R>(T t);
 
 F<T, T> g<T>(F<T, T> a, F<T, T> b) => (x) => a(b(x));
@@ -1116,13 +1179,14 @@
 test() {
   var h = g((int x) => 42.0, (double x) => 42);
 }
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      CompileTimeErrorCode.COULD_NOT_INFER,
-      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 95, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 99, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 101, 15),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 118, 16),
+    ]);
+    _expectInferenceError(r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'num' for 'T' which doesn't work:
@@ -1138,19 +1202,19 @@
 
   test_inference_error_extendsFromReturn() async {
     // This is not an inference error because we successfully infer Null.
-    Source source = addSource(r'''
+    var code = r'''
 T max<T extends num>(T x, T y) => x;
 
 test() {
   String hello = max(1, 2);
 }
- ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.INVALID_CAST_LITERAL,
-      CompileTimeErrorCode.INVALID_CAST_LITERAL
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 56, 5),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL, 68, 1),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL, 71, 1),
     ]);
-    var unit = analysisResult.unit;
+
     var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
             as VariableDeclarationStatement)
         .variables
@@ -1160,18 +1224,20 @@
   }
 
   test_inference_error_extendsFromReturn2() async {
-    Source source = addSource(r'''
+    var code = r'''
 typedef R F<T, R>(T t);
 F<T, T> g<T extends num>() => (y) => y;
 
 test() {
   F<String, String> hello = g();
 }
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      CompileTimeErrorCode.COULD_NOT_INFER,
-    ], r'''
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 94, 5),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 102, 1),
+    ]);
+
+    _expectInferenceError(r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'String' for 'T' which doesn't work:
@@ -1186,7 +1252,7 @@
   }
 
   test_inference_error_genericFunction() async {
-    Source source = addSource(r'''
+    var code = r'''
 T max<T extends num>(T x, T y) => x < y ? y : x;
 abstract class Iterable<T> {
   T get first;
@@ -1195,12 +1261,13 @@
 test(Iterable values) {
   num n = values.fold(values.first as num, max);
 }
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      CompileTimeErrorCode.COULD_NOT_INFER,
-      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 158, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 195, 3),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 195, 3),
+    ]);
+    _expectInferenceError(r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'dynamic' for 'T' which doesn't work:
@@ -1213,7 +1280,7 @@
   }
 
   test_inference_error_returnContext() async {
-    Source source = addSource(r'''
+    var code = r'''
 typedef R F<T, R>(T t);
 
 F<T, T> g<T>(T t) => (x) => t;
@@ -1221,9 +1288,12 @@
 test() {
   F<num, int> h = g(42);
 }
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [CompileTimeErrorCode.COULD_NOT_INFER], r'''
+ ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 80, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 84, 1),
+    ]);
+    _expectInferenceError(r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'num' for 'T' which doesn't work:
@@ -1236,33 +1306,34 @@
   }
 
   test_inference_hints() async {
-    Source source = addSource(r'''
+    var code = r'''
       void main () {
         var x = 3;
         List<int> l0 = [];
      }
-   ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+   ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 33, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 58, 2),
+    ]);
   }
 
   test_inference_simplePolymorphicRecursion_function() async {
     // Regression test for https://github.com/dart-lang/sdk/issues/30980
     // Check that inference works properly when inferring the type argument
     // for a self-recursive call with a function type
-    var source = addSource(r'''
+    var code = r'''
 void _mergeSort<T>(T Function(T) list, int compare(T a, T b), T Function(T) target) {
   _mergeSort(list, compare, target);
   _mergeSort(list, compare, list);
   _mergeSort(target, compare, target);
   _mergeSort(target, compare, list);
 }
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
+    ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_ELEMENT, 5, 10),
+    ]);
+
     var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
         .body as BlockFunctionBody;
@@ -1278,18 +1349,18 @@
     // Regression test for https://github.com/dart-lang/sdk/issues/30980
     // Check that inference works properly when inferring the type argument
     // for a self-recursive call with an interface type
-    var source = addSource(r'''
+    var code = r'''
 void _mergeSort<T>(List<T> list, int compare(T a, T b), List<T> target) {
   _mergeSort(list, compare, target);
   _mergeSort(list, compare, list);
   _mergeSort(target, compare, target);
   _mergeSort(target, compare, list);
 }
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
+    ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_ELEMENT, 5, 10),
+    ]);
+
     var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
         .body as BlockFunctionBody;
@@ -1305,18 +1376,18 @@
     // Regression test for https://github.com/dart-lang/sdk/issues/30980
     // Check that inference works properly when inferring the type argument
     // for a self-recursive call with a simple type parameter
-    var source = addSource(r'''
+    var code = r'''
 void _mergeSort<T>(T list, int compare(T a, T b), T target) {
   _mergeSort(list, compare, target);
   _mergeSort(list, compare, list);
   _mergeSort(target, compare, target);
   _mergeSort(target, compare, list);
 }
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
+    ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_ELEMENT, 5, 10),
+    ]);
+
     var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
         .body as BlockFunctionBody;
@@ -1329,17 +1400,17 @@
 
   test_inferGenericInstantiation() async {
     // Verify that we don't infer '?` when we instantiate a generic function.
-    var source = addSource(r'''
+    var code = r'''
 T f<T>(T x(T t)) => x(null);
 S g<S>(S s) => s;
 test() {
  var h = f(g);
 }
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
+    ''';
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 61, 1),
+    ]);
+
     var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
             as VariableDeclarationStatement)
         .variables
@@ -1354,21 +1425,19 @@
   test_inferGenericInstantiation2() async {
     // Verify the behavior when we cannot infer an instantiation due to invalid
     // constraints from an outer generic method.
-    var source = addSource(r'''
+    var code = r'''
 T max<T extends num>(T x, T y) => x < y ? y : x;
 abstract class Iterable<T> {
   T get first;
   S fold<S>(S s, S f(S s, T t));
 }
 num test(Iterable values) => values.fold(values.first as num, max);
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.COULD_NOT_INFER,
-      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ''';
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 190, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 190, 3),
     ]);
-    verify([source]);
-    var unit = analysisResult.unit;
+
     var fold = (AstFinder.getTopLevelFunction(unit, 'test')
             .functionExpression
             .body as ExpressionFunctionBody)
@@ -1392,7 +1461,7 @@
         get map => { 43: [] };
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertNoErrorsInCode(code);
 
     Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
     Asserter<InterfaceType> assertMapOfIntToListOfInt =
@@ -1509,7 +1578,72 @@
         A<int, String> a4 = new F.named(3, "hello", "hello", 3);
         A<int, String> a5 = new F.named(3, "hello", "hello");
       }''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 769, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 816, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 869, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 929, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 995, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 1000, 31),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1056, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 1061, 41),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1157, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1168, 7),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1177, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1204, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1221, 7),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1230, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1286, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1333, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1386, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1446, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1512, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 1517, 34),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1576, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 1581, 41),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1676, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1687, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1690, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1723, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1740, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 1743, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1802, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1837, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1878, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1918, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 1964, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 1969, 17),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2008, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 2013, 23),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2087, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 2098, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2128, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 2145, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2208, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2252, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2302, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2359, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2425, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 2430, 28),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2483, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 2488, 38),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2580, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 2591, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2618, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 2635, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2694, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2805, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2874, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 2901, 7),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 2914, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 2942, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 3007, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 3060, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 3089, 7),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 3098, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 3125, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 3154, 7),
+    ]);
 
     Expression rhs(VariableDeclarationStatement stmt) {
       VariableDeclaration decl = stmt.variables.variables[0];
@@ -1644,7 +1778,14 @@
         List<List<int>> l3 = [["hello", 3], []];
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 45, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 84, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 124, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 165, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 172, 7),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     ListLiteral literal(int i) {
@@ -1677,7 +1818,15 @@
         List<int> l3 = ["hello", 3];
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 39, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 66, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 94, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 100, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 128, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 134, 7),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1704,7 +1853,15 @@
         const List<int> c3 = const ["hello", 3];
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 45, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 84, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 124, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 136, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 170, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 182, 7),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1731,7 +1888,17 @@
         List<int> l3 = <dynamic>["hello", 3];
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 39, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 44, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 71, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 76, 8),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 104, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 109, 17),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 146, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 151, 21),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1756,7 +1923,15 @@
         Iterable<int> l3 = ["hello", 3];
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 43, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 74, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 106, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 112, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 144, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 150, 7),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1784,7 +1959,18 @@
         Map<int, List<String>> l4 = {3:["hello"], "hello": [3]};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 52, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 92, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 144, 2),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 150, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 202, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 212, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 248, 2),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 267, 7),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 277, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     SetOrMapLiteral literal(int i) {
@@ -1824,7 +2010,18 @@
         Map<int, String> l4 = {3:"hello", "hello": 3};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 46, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 80, 2),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 124, 2),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 130, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 174, 2),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 183, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 212, 2),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 229, 7),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 238, 1),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1852,7 +2049,18 @@
         Map<int, String> l3 = <int, dynamic>{3: 3};
      }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 46, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 51, 16),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 94, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 99, 26),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 152, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 157, 32),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 172, 7),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 216, 2),
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 221, 20),
+    ]);
+
     List<Statement> statements =
         AstFinder.getStatementsInTopLevelFunction(unit, "main");
     DartType literal(int i) {
@@ -1878,7 +2086,10 @@
         List<String> m1(int x) {return [3];}
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 101, 1),
+    ]);
+
     Expression methodReturnValue(String methodName) {
       MethodDeclaration method =
           AstFinder.getMethodInClass(unit, "A", methodName);
@@ -1905,11 +2116,8 @@
     S f<S, T>(Func1<S, T> g) => null;
     String test() => f((l) => l.length);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     _isString(body.expression.staticType);
@@ -1932,11 +2140,10 @@
     class B<S> extends A<S, S> { B(S s); }
     A<int, String> test() => new B(3);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_CAST_LITERAL]);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL, 126, 1),
+    ]);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     DartType type = body.expression.staticType;
@@ -1957,11 +2164,8 @@
     class B<S> extends A<S, S> { B(S s); }
     A<num, num> test() => new B(3);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     DartType type = body.expression.staticType;
@@ -1983,13 +2187,10 @@
     class B<S> extends A<S, S> { B(S s); }
     A<int, double> test() => new B(3);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.INVALID_CAST_LITERAL,
+    await assertErrorsInCode(code, [
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL, 126, 1),
     ]);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     DartType type = body.expression.staticType;
@@ -2011,11 +2212,8 @@
     class B<S> extends A<S, S> {}
     A<int, num> test() => new B();
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     DartType type = body.expression.staticType;
@@ -2039,11 +2237,8 @@
     Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
     Contra1<A<int, String>> test() => mkA();
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2067,11 +2262,8 @@
     Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
     Contra1<A<num, num>> test() => mkA();
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2096,11 +2288,8 @@
     Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
     Contra1<A<int, double>> test() => mkA();
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2125,11 +2314,8 @@
     Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
     Contra1<A<int, num>> test() => mkA();
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2141,7 +2327,7 @@
   }
 
   test_redirectedConstructor_named() async {
-    Source source = addSource(r'''
+    var code = r'''
 class A<T, U> implements B<T, U> {
   A.named();
 }
@@ -2149,11 +2335,10 @@
 class B<T2, U2> {
   factory B() = A.named;
 }
-   ''');
-    TestAnalysisResult result = await computeAnalysisResult(source);
-    assertNoErrors(source);
+   ''';
+    await assertNoErrorsInCode(code);
 
-    ClassDeclaration b = result.unit.declarations[1];
+    ClassDeclaration b = unit.declarations[1];
     ConstructorDeclaration bConstructor = b.members[0];
     ConstructorName redirected = bConstructor.redirectedConstructor;
 
@@ -2170,18 +2355,16 @@
   }
 
   test_redirectedConstructor_self() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T> {
   A();
   factory A.redirected() = A;
 }
-   ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+''');
   }
 
   test_redirectedConstructor_unnamed() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T, U> implements B<T, U> {
   A();
 }
@@ -2189,9 +2372,7 @@
 class B<T2, U2> {
   factory B() = A;
 }
-   ''');
-    TestAnalysisResult result = await computeAnalysisResult(source);
-    assertNoErrors(source);
+''');
 
     ClassDeclaration b = result.unit.declarations[1];
     ConstructorDeclaration bConstructor = b.members[0];
@@ -2215,7 +2396,7 @@
         A.named(List<String> x);
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertNoErrorsInCode(code);
 
     ConstructorDeclaration constructor =
         AstFinder.getConstructorInClass(unit, "A", null);
@@ -2232,11 +2413,8 @@
     Func1<T, String> f<T>(T x) => null;
     Func1<num, String> test() => f(42);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     MethodInvocation invoke = body.expression;
@@ -2252,11 +2430,8 @@
     Func1<String, T> f<T>(T x) => null;
     Func1<String, num> test() => f(42);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     MethodInvocation invoke = body.expression;
@@ -2273,11 +2448,8 @@
     Func1<T, String> f<T>(T x, g(T x)) => null;
     dynamic test() => f(42, (num x) => x);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2294,11 +2466,8 @@
     Func1<String, T> f<T>(T x, g(T x)) => null;
     dynamic test() => f(42, (num x) => x);
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     FunctionType functionType = body.expression.staticType;
@@ -2315,11 +2484,8 @@
     T g<T, S>(Func1<T, S> f) => null;
     num test() => g(f(3));
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     MethodInvocation call = body.expression;
@@ -2337,11 +2503,8 @@
     T g<T, S>(Func1<S, T> f) => null;
     num test() => g(f(3));
    ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
+    await assertNoErrorsInCode(code);
+
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     MethodInvocation call = body.expression;
@@ -2359,7 +2522,7 @@
         A() : super([]);
       }
    ''';
-    CompilationUnit unit = await resolveSource(code);
+    await assertNoErrorsInCode(code);
 
     ConstructorDeclaration constructor =
         AstFinder.getConstructorInClass(unit, "A", null);
@@ -2368,13 +2531,10 @@
     _isListOf(_isString)(exp.staticType);
   }
 
-  /// Verifies the source has the expected [errorCodes] as well as the
-  /// expected [errorMessage].
-  void _expectInferenceError(
-      Source source, List<ErrorCode> errorCodes, String errorMessage) {
-    assertErrors(source, errorCodes);
-    var errors = analysisResults[source]
-        .errors
+  /// Verifies the result has [CompileTimeErrorCode.COULD_NOT_INFER] with
+  /// the expected [errorMessage].
+  void _expectInferenceError(String errorMessage) {
+    var errors = result.errors
         .where((e) => e.errorCode == CompileTimeErrorCode.COULD_NOT_INFER)
         .map((e) => e.message)
         .toList();
@@ -2391,20 +2551,15 @@
   /// "test", whose body is an expression that invokes a method. Returns that
   /// invocation.
   Future<MethodInvocation> _testFutureOr(String code,
-      {List<ErrorCode> errors}) async {
-    Source source = addSource("""
-    import "dart:async";
-    $code""");
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+      {List<ExpectedError> expectedErrors = const []}) async {
+    var fullCode = """
+import "dart:async";
 
-    if (errors == null) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, errors);
-    }
-    verify([source]);
-    FunctionDeclaration test =
-        AstFinder.getTopLevelFunction(analysisResult.unit, "test");
+$code
+""";
+    await assertErrorsInCode(fullCode, expectedErrors);
+
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
     ExpressionFunctionBody body = test.functionExpression.body;
     return body.expression;
   }
diff --git a/pkg/analyzer/test/id_tests/definite_assignment_test.dart b/pkg/analyzer/test/id_tests/definite_assignment_test.dart
index 0581c64..4d75189 100644
--- a/pkg/analyzer/test/id_tests/definite_assignment_test.dart
+++ b/pkg/analyzer/test/id_tests/definite_assignment_test.dart
@@ -73,7 +73,7 @@
     if (node is SimpleIdentifier && node.inGetterContext()) {
       var element = node.staticElement;
       if (element is LocalVariableElement || element is ParameterElement) {
-        if (_flowResult.potentiallyUnassignedNodes.contains(node)) {
+        if (_flowResult.notDefinitelyAssignedNodes.contains(node)) {
           return 'unassigned';
         }
       }
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index 5f2f5b7..738a807 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/status.dart';
@@ -104,7 +105,10 @@
 
   AnalysisOptionsImpl createAnalysisOptions() => AnalysisOptionsImpl()
     ..useFastaParser = analyzer.Parser.useFasta
-    ..contextFeatures = FeatureSet.fromEnableFlags(enabledExperiments);
+    ..contextFeatures = FeatureSet.fromEnableFlags2(
+      sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
+      flags: enabledExperiments,
+    );
 
   int findOffset(String search) {
     int offset = testCode.indexOf(search);
diff --git a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
index f705281..d477df0 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
@@ -43,6 +43,7 @@
   }
 
   test_createContext_declaredVariables() {
+    MockSdk(resourceProvider: resourceProvider);
     DeclaredVariables declaredVariables =
         DeclaredVariables.fromMap({'foo': 'true'});
     DriverBasedAnalysisContext context = contextBuilder.createContext(
@@ -71,6 +72,7 @@
   }
 
   test_createContext_defaults() {
+    MockSdk(resourceProvider: resourceProvider);
     AnalysisContext context = contextBuilder.createContext(
       contextRoot: contextRoot,
       sdkPath: resourceProvider.convertPath(sdkRoot),
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index 2652a8d..33c55da 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -8610,8 +8610,9 @@
 class DriverResolutionWithExperimentsTest extends BaseAnalysisDriverTest {
   @override
   AnalysisOptionsImpl createAnalysisOptions() => super.createAnalysisOptions()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.triple_shift],
+    ..contextFeatures = FeatureSet.fromEnableFlags2(
+      sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
+      flags: [EnableString.triple_shift],
     );
 
   test_binaryExpression_gtGtGt() async {
diff --git a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
index f78177e..33ea1c2 100644
--- a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/experiments_impl.dart';
+import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -18,15 +19,43 @@
 class ExperimentsTest {
   var knownFeatures = <String, ExperimentalFeature>{};
 
+  void assertLatestSdkLanguageVersion(ExperimentStatus status) {
+    expect(
+      getSdkLanguageVersion(status),
+      ExperimentStatus.latestSdkLanguageVersion,
+    );
+  }
+
+  void assertSdkLanguageVersion(ExperimentStatus status, String expectedStr) {
+    var actual = getSdkLanguageVersion(status);
+    expect('${actual.major}.${actual.minor}', expectedStr);
+  }
+
   ExperimentStatus fromStrings(List<String> flags) {
     return overrideKnownFeatures(
         knownFeatures, () => ExperimentStatus.fromStrings(flags));
   }
 
+  ExperimentStatus fromStrings2({
+    @required Version sdkLanguageVersion,
+    @required List<String> flags,
+  }) {
+    return overrideKnownFeatures(knownFeatures, () {
+      return ExperimentStatus.fromStrings2(
+        sdkLanguageVersion: sdkLanguageVersion,
+        flags: flags,
+      );
+    });
+  }
+
   List<bool> getFlags(ExperimentStatus status) {
     return getExperimentalFlags_forTesting(status);
   }
 
+  Version getSdkLanguageVersion(ExperimentStatus status) {
+    return getSdkLanguageVersion_forTesting(status);
+  }
+
   List<ConflictingFlagLists> getValidateCombinationResult(
       List<String> flags1, List<String> flags2) {
     return overrideKnownFeatures(
@@ -47,6 +76,400 @@
     expect(currentVersion.build, isEmpty);
   }
 
+  test_fromStrings2_experimentalReleased_shouldBe_requested() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.2.0'),
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      experimentalReleaseVersion: Version.parse('1.4.0'),
+      releaseVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      experimentalReleaseVersion: Version.parse('1.4.0'),
+      releaseVersion: null,
+    );
+    overrideKnownFeatures(knownFeatures, () {
+      // Only experiments that are explicitly requested can be enabled.
+      var status = fromStrings2(
+        sdkLanguageVersion: Version.parse('1.5.0'),
+        flags: ['b'],
+      );
+      assertSdkLanguageVersion(status, '1.5');
+      expect(getFlags(status), [true, true, false]);
+    });
+  }
+
+  test_fromStrings2_flags_conflicting_disable_then_enable() {
+    // Enable takes precedence because it's last
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['no-a', 'a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
+  }
+
+  test_fromStrings2_flags_conflicting_enable_then_disable() {
+    // Disable takes precedence because it's last
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a', 'no-a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
+  }
+
+  test_fromStrings2_flags_disable_disabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['no-a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
+  }
+
+  test_fromStrings2_flags_disable_enabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.0.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['no-a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
+  }
+
+  test_fromStrings2_flags_empty() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'b',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.0.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: [],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false, true]);
+  }
+
+  test_fromStrings2_flags_enable_disabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
+  }
+
+  test_fromStrings2_flags_enable_enabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.0.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
+  }
+
+  test_fromStrings2_flags_illegal_use_of_expired_disable() {
+    // Expired flags are ignored even if they would fail validation.
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.0.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['no-a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
+  }
+
+  test_fromStrings2_flags_illegal_use_of_expired_enable() {
+    // Expired flags are ignored even if they would fail validation.
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
+  }
+
+  test_fromStrings2_flags_unnecessary_use_of_expired_disable() {
+    // Expired flags are ignored.
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['no-a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
+  }
+
+  test_fromStrings2_flags_unnecessary_use_of_expired_enable() {
+    // Expired flags are ignored.
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.0.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
+  }
+
+  test_fromStrings2_flags_unrecognized() {
+    // Unrecognized flags are ignored.
+    var status = fromStrings2(
+      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      flags: ['a'],
+    );
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), <Object>[]);
+  }
+
+  test_fromStrings2_sdkLanguage_allows_experimental() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.2.0'),
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      experimentalReleaseVersion: null,
+      releaseVersion: null,
+    );
+    overrideKnownFeatures(knownFeatures, () {
+      var status = fromStrings2(
+        sdkLanguageVersion: Version.parse('1.5.0'),
+        flags: ['b', 'c'],
+      );
+      assertSdkLanguageVersion(status, '1.5');
+      expect(getFlags(status), [true, true, true]);
+
+      // Restricting to the SDK version does not change anything.
+      var status2 = status.restrictToVersion(Version.parse('1.5.0'));
+      assertSdkLanguageVersion(status2, '1.5');
+      expect(getFlags(status2), [true, true, true]);
+
+      // Restricting to the previous version disables the experiments.
+      var status3 = status.restrictToVersion(Version.parse('1.4.0'));
+      assertSdkLanguageVersion(status3, '1.5');
+      expect(getFlags(status3), [true, false, false]);
+    });
+  }
+
+  test_fromStrings2_sdkLanguage_restricts_explicit_experimentalReleased() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.2.0'),
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      experimentalReleaseVersion: Version.parse('1.4.0'),
+      releaseVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      experimentalReleaseVersion: Version.parse('1.5.0'),
+      releaseVersion: null,
+    );
+    knownFeatures['d'] = ExperimentalFeature(
+      index: 3,
+      enableString: 'd',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'd',
+      experimentalReleaseVersion: Version.parse('1.6.0'),
+      releaseVersion: null,
+    );
+    overrideKnownFeatures(knownFeatures, () {
+      var status = fromStrings2(
+        sdkLanguageVersion: Version.parse('1.5.0'),
+        flags: ['b', 'c', 'd'],
+      );
+      assertSdkLanguageVersion(status, '1.5');
+      expect(getFlags(status), [true, true, true, false]);
+
+      // Restricting to the SDK version does not change anything.
+      var status2 = status.restrictToVersion(Version.parse('1.5.0'));
+      assertSdkLanguageVersion(status2, '1.5');
+      expect(getFlags(status2), [true, true, true, false]);
+
+      // Restricting to a version disables some experiments.
+      var status3 = status.restrictToVersion(Version.parse('1.4.0'));
+      assertSdkLanguageVersion(status3, '1.5');
+      expect(getFlags(status3), [true, true, false, false]);
+    });
+  }
+
+  test_fromStrings2_sdkLanguage_restricts_released() {
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.6.0'),
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'b',
+      experimentalReleaseVersion: null,
+      releaseVersion: Version.parse('1.1.0'),
+    );
+    var status = fromStrings2(
+      sdkLanguageVersion: Version.parse('1.5.0'),
+      flags: [],
+    );
+    assertSdkLanguageVersion(status, '1.5');
+    expect(getFlags(status), [false, true]);
+  }
+
   test_fromStrings_conflicting_flags_disable_then_enable() {
     // Enable takes precedence because it's last
     knownFeatures['a'] = ExperimentalFeature(
@@ -58,7 +481,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['no-a', 'a'])), [true]);
+    var status = fromStrings(['no-a', 'a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
   }
 
   test_fromStrings_conflicting_flags_enable_then_disable() {
@@ -72,7 +497,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['a', 'no-a'])), [false]);
+    var status = fromStrings(['a', 'no-a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
   }
 
   test_fromStrings_default_values() {
@@ -94,7 +521,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: Version.parse('1.0.0'),
     );
-    expect(getFlags(fromStrings([])), [false, true]);
+    var status = fromStrings([]);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false, true]);
   }
 
   test_fromStrings_disable_disabled_feature() {
@@ -107,7 +536,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['no-a'])), [false]);
+    var status = fromStrings(['no-a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
   }
 
   test_fromStrings_disable_enabled_feature() {
@@ -120,7 +551,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: Version.parse('1.0.0'),
     );
-    expect(getFlags(fromStrings(['no-a'])), [false]);
+    var status = fromStrings(['no-a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
   }
 
   test_fromStrings_enable_disabled_feature() {
@@ -133,7 +566,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['a'])), [true]);
+    var status = fromStrings(['a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
   }
 
   test_fromStrings_enable_enabled_feature() {
@@ -146,7 +581,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: Version.parse('1.0.0'),
     );
-    expect(getFlags(fromStrings(['a'])), [true]);
+    var status = fromStrings(['a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
   }
 
   test_fromStrings_illegal_use_of_expired_flag_disable() {
@@ -160,7 +597,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: Version.parse('1.0.0'),
     );
-    expect(getFlags(fromStrings(['no-a'])), [true]);
+    var status = fromStrings(['no-a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
   }
 
   test_fromStrings_illegal_use_of_expired_flag_enable() {
@@ -174,7 +613,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['a'])), [false]);
+    var status = fromStrings(['a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
   }
 
   test_fromStrings_unnecessary_use_of_expired_flag_disable() {
@@ -188,7 +629,9 @@
       experimentalReleaseVersion: null,
       releaseVersion: null,
     );
-    expect(getFlags(fromStrings(['no-a'])), [false]);
+    var status = fromStrings(['no-a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [false]);
   }
 
   test_fromStrings_unnecessary_use_of_expired_flag_enable() {
@@ -202,12 +645,16 @@
       experimentalReleaseVersion: null,
       releaseVersion: Version.parse('1.0.0'),
     );
-    expect(getFlags(fromStrings(['a'])), [true]);
+    var status = fromStrings(['a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), [true]);
   }
 
   test_fromStrings_unrecognized_flag() {
     // Unrecognized flags are ignored.
-    expect(getFlags(fromStrings(['a'])), <Object>[]);
+    var status = fromStrings(['a']);
+    assertLatestSdkLanguageVersion(status);
+    expect(getFlags(status), <Object>[]);
   }
 
   test_validateFlagCombination_disable_then_enable() {
diff --git a/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart b/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
index 8e88069..edcdbb7 100644
--- a/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
@@ -82,8 +82,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: packages,
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     _assertNonNullableForPath('/packages/aaa/lib/a.dart', true);
@@ -129,8 +129,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: packages,
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     _assertNonNullableForPath('/packages/aaa/a.dart', false);
@@ -176,8 +176,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: packages,
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     void check({
@@ -244,8 +244,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: packages,
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags(['non-nullable']),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: ExperimentStatus.latestWithNullSafety,
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     _assertNonNullableForPath('/packages/aaa/a.dart', true);
@@ -274,8 +274,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     var featureSet = _getSdkFeatureSet('dart:math');
@@ -306,8 +306,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     var core_featureSet = _getSdkFeatureSet('dart:core');
@@ -322,8 +322,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
 
     var featureSet = _getSdkFeatureSet('dart:math');
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index b9af9b1..0432c93 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -75,8 +75,8 @@
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
       packages: Packages.empty,
-      packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
-      nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
+      packageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
+      nonPackageDefaultFeatureSet: FeatureSet.latestLanguageVersion(),
     );
     fileSystemState = FileSystemState(
       logger,
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index c5c2345..8ab94b5 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -2,15 +2,13 @@
 // 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 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/parser_test.dart';
-import '../../../generated/resolver_test_case.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -26,7 +24,7 @@
   String testSource;
   CompilationUnitImpl testUnit;
 
-  void parse(String source) {
+  parse(String source) {
     testSource = source;
     testUnit = parseCompilationUnit(source);
   }
@@ -82,7 +80,7 @@
   String testSource;
   CompilationUnitImpl testUnit;
 
-  void assertInContext(String snippet, bool isInContext) {
+  assertInContext(String snippet, bool isInContext) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
     NodeLocator visitor = NodeLocator(index);
@@ -92,7 +90,7 @@
         isInContext ? isTrue : isFalse);
   }
 
-  void parse(String source) {
+  parse(String source) {
     testSource = source;
     testUnit = parseCompilationUnit(source);
   }
@@ -522,29 +520,14 @@
 }
 
 @reflectiveTest
-class InstanceCreationExpressionImplTest extends ResolverTestCase {
-  String testSource;
-  CompilationUnitImpl testUnit;
-
-  void assertIsConst(String snippet, bool expectedResult) {
-    int index = testSource.indexOf(snippet);
-    expect(index >= 0, isTrue);
-    NodeLocator visitor = NodeLocator(index);
-    AstNodeImpl node = visitor.searchWithin(testUnit);
-    node = node.thisOrAncestorOfType<InstanceCreationExpressionImpl>();
-    expect(node, isNotNull);
-    expect((node as InstanceCreationExpressionImpl).isConst,
-        expectedResult ? isTrue : isFalse);
+class InstanceCreationExpressionImplTest extends PubPackageResolutionTest {
+  assertIsConst(String search, bool expectedResult) {
+    var node = findNode.instanceCreation(search);
+    expect((node as InstanceCreationExpressionImpl).isConst, expectedResult);
   }
 
-  Future<void> resolve(String source) async {
-    testSource = source;
-    testUnit = await resolveSource2('/test.dart', source);
-  }
-
-  void
-      test_isConst_notInContext_constructor_const_constParam_identifier() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_constParam_identifier() async {
+    await resolveTestCode('''
 var v = C(C.a);
 class C {
   static const C a = C.c();
@@ -555,8 +538,8 @@
     assertIsConst("C(C", false);
   }
 
-  void test_isConst_notInContext_constructor_const_constParam_named() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_constParam_named() async {
+    await resolveTestCode('''
 var v = C(c: C());
 class C {
   const C({c});
@@ -565,9 +548,8 @@
     assertIsConst("C(c", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_constParam_named_parens() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_constParam_named_parens() async {
+    await resolveTestCode('''
 var v = C(c: (C()));
 class C {
   const C({c});
@@ -576,8 +558,8 @@
     assertIsConst("C(c", false);
   }
 
-  void test_isConst_notInContext_constructor_const_constParam_parens() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_constParam_parens() async {
+    await resolveTestCode('''
 var v = C( (C.c()) );
 class C {
   const C(c);
@@ -587,8 +569,8 @@
     assertIsConst("C( (", false);
   }
 
-  void test_isConst_notInContext_constructor_const_generic_named() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_generic_named() async {
+    await resolveTestCode('''
 f() => <Object>[C<int>.n()];
 class C<E> {
   const C.n();
@@ -597,22 +579,21 @@
     assertIsConst("C<int>.n", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_generic_named_prefixed() async {
-    addNamedSource('/c.dart', '''
+  test_isConst_notInContext_constructor_const_generic_named_prefixed() async {
+    newFile('$testPackageLibPath/c.dart', content: '''
 class C<E> {
   const C.n();
 }
 ''');
-    await resolve('''
+    await resolveTestCode('''
 import 'c.dart' as p;
 f() => <Object>[p.C<int>.n()];
 ''');
     assertIsConst("C<int>", false);
   }
 
-  void test_isConst_notInContext_constructor_const_generic_unnamed() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_generic_unnamed() async {
+    await resolveTestCode('''
 f() => <Object>[C<int>()];
 class C<E> {
   const C();
@@ -621,23 +602,21 @@
     assertIsConst("C<int>", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_generic_unnamed_prefixed() async {
-    addNamedSource('/c.dart', '''
+  test_isConst_notInContext_constructor_const_generic_unnamed_prefixed() async {
+    newFile('$testPackageLibPath/c.dart', content: '''
 class C<E> {
   const C();
 }
 ''');
-    await resolve('''
+    await resolveTestCode('''
 import 'c.dart' as p;
 f() => <Object>[p.C<int>()];
 ''');
     assertIsConst("C<int>", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_nonConstParam_constructor() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_nonConstParam_constructor() async {
+    await resolveTestCode('''
 f() {
   return A(B());
 }
@@ -653,9 +632,8 @@
     assertIsConst("B())", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_nonConstParam_variable() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_nonConstParam_variable() async {
+    await resolveTestCode('''
 f(int i) => <Object>[C(i)];
 class C {
   final int f;
@@ -665,62 +643,60 @@
     assertIsConst("C(i)", false);
   }
 
-  void test_isConst_notInContext_constructor_const_nonGeneric_named() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_nonGeneric_named() async {
+    await resolveTestCode('''
 f() => <Object>[C.n()];
 class C<E> {
   const C.n();
 }
 ''');
-    assertIsConst("C.n()", false);
+    assertIsConst("C.n()]", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_nonGeneric_named_prefixed() async {
-    addNamedSource('/c.dart', '''
+  test_isConst_notInContext_constructor_const_nonGeneric_named_prefixed() async {
+    newFile('$testPackageLibPath/c.dart', content: '''
 class C {
   const C.n();
 }
 ''');
-    await resolve('''
+    await resolveTestCode('''
 import 'c.dart' as p;
 f() => <Object>[p.C.n()];
 ''');
     assertIsConst("C.n()", false);
   }
 
-  void test_isConst_notInContext_constructor_const_nonGeneric_unnamed() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_const_nonGeneric_unnamed() async {
+    await resolveTestCode('''
 f() => <Object>[C()];
 class C {
   const C();
 }
 ''');
-    assertIsConst("C()", false);
+    assertIsConst("C()]", false);
   }
 
-  void
-      test_isConst_notInContext_constructor_const_nonGeneric_unnamed_prefixed() async {
-    addNamedSource('/c.dart', '''
+  test_isConst_notInContext_constructor_const_nonGeneric_unnamed_prefixed() async {
+    newFile('$testPackageLibPath/c.dart', content: '''
 class C {
   const C();
 }
 ''');
-    await resolve('''
+    await resolveTestCode('''
 import 'c.dart' as p;
 f() => <Object>[p.C()];
 ''');
     assertIsConst("C()", false);
   }
 
-  void test_isConst_notInContext_constructor_nonConst() async {
-    await resolve('''
+  test_isConst_notInContext_constructor_nonConst() async {
+    await resolveTestCode('''
 f() => <Object>[C()];
 class C {
   C();
 }
 ''');
-    assertIsConst("C()", false);
+    assertIsConst("C()]", false);
   }
 }
 
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 476dcf7..47a4b20 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -708,7 +708,7 @@
   void test_visitPartDirective() {
     PartDirective fromNode = AstTestFactory.partDirective2("part.dart");
     LibraryElement element = LibraryElementImpl(
-        null, null, 'lib', -1, 0, FeatureSet.fromEnableFlags([]));
+        null, null, 'lib', -1, 0, FeatureSet.latestLanguageVersion());
     fromNode.element = element;
     PartDirective toNode = AstTestFactory.partDirective2("part.dart");
     ResolutionCopier.copyResolutionData(fromNode, toNode);
@@ -719,7 +719,7 @@
     PartOfDirective fromNode = AstTestFactory.partOfDirective(
         AstTestFactory.libraryIdentifier2(["lib"]));
     LibraryElement element = LibraryElementImpl(
-        null, null, 'lib', -1, 0, FeatureSet.fromEnableFlags([]));
+        null, null, 'lib', -1, 0, FeatureSet.latestLanguageVersion());
     fromNode.element = element;
     PartOfDirective toNode = AstTestFactory.partOfDirective(
         AstTestFactory.libraryIdentifier2(["lib"]));
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index b4fda30..5518018 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -2096,7 +2096,7 @@
   void test_setImports() {
     AnalysisContext context = TestAnalysisContext();
     LibraryElementImpl library = LibraryElementImpl(
-        context, null, 'l1', -1, 0, FeatureSet.fromEnableFlags([]));
+        context, null, 'l1', -1, 0, FeatureSet.latestLanguageVersion());
     List<ImportElementImpl> expectedImports = [
       ElementFactory.importFor(ElementFactory.library(context, "l2"), null),
       ElementFactory.importFor(ElementFactory.library(context, "l3"), null)
diff --git a/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
index e97c021..c1d5dd2 100644
--- a/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
@@ -146,6 +146,8 @@
     _declaredVariables = map;
   }
 
+  bool get retainDataForTesting => false;
+
   void assertBasicWorkspaceFor(String path) {
     var workspace = contextFor(path).workspace;
     expect(workspace, TypeMatcher<BasicWorkspace>());
@@ -232,6 +234,7 @@
       enableIndex: true,
       includedPaths: collectionIncludedPaths.map(convertPath).toList(),
       resourceProvider: resourceProvider,
+      retainDataForTesting: retainDataForTesting,
       sdkPath: convertPath('/sdk'),
     );
 
diff --git a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
index 8925735..7793c22 100644
--- a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -18,7 +18,10 @@
 }
 
 @reflectiveTest
-class MethodInvocationResolutionTest extends PubPackageResolutionTest {
+class MethodInvocationResolutionTest extends PubPackageResolutionTest
+    with MethodInvocationResolutionTestCases {}
+
+mixin MethodInvocationResolutionTestCases on PubPackageResolutionTest {
   test_error_ambiguousImport_topFunction() async {
     newFile('$testPackageLibPath/a.dart', content: r'''
 void foo(int _) {}
@@ -91,14 +94,14 @@
   test_error_invocationOfNonFunction_interface_hasCall_field() async {
     await assertErrorsInCode(r'''
 class C {
-  void Function() call;
+  void Function() call = throw Error();
 }
 
 main(C c) {
   c();
 }
 ''', [
-      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 51, 1),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 67, 1),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('c();');
@@ -111,44 +114,6 @@
     assertType(cRef, 'C');
   }
 
-  test_error_invocationOfNonFunction_localVariable() async {
-    await assertErrorsInCode(r'''
-main() {
-  Object foo;
-  foo();
-}
-''', [
-      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 25, 3),
-    ]);
-
-    var invocation = findNode.functionExpressionInvocation('foo();');
-    assertElementNull(invocation);
-    assertInvokeTypeDynamic(invocation);
-    assertTypeDynamic(invocation);
-
-    var foo = invocation.function as SimpleIdentifier;
-    assertElement(foo, findElement.localVar('foo'));
-    assertType(foo, 'Object');
-  }
-
-  test_error_invocationOfNonFunction_OK_dynamic_localVariable() async {
-    await assertNoErrorsInCode(r'''
-main() {
-  var foo;
-  foo();
-}
-''');
-
-    var invocation = findNode.functionExpressionInvocation('foo();');
-    assertElementNull(invocation);
-    assertInvokeTypeDynamic(invocation);
-    assertTypeDynamic(invocation);
-
-    var foo = invocation.function as SimpleIdentifier;
-    assertElement(foo, findElement.localVar('foo'));
-    assertTypeDynamic(foo);
-  }
-
   test_error_invocationOfNonFunction_OK_dynamicGetter_instance() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -237,6 +202,7 @@
 
 class C<T extends MyFunction> {
   T foo;
+  C(this.foo);
   
   main() {
     foo(0);
@@ -254,17 +220,53 @@
     assertType(foo, 'double Function(int)');
   }
 
+  test_error_invocationOfNonFunction_parameter() async {
+    await assertErrorsInCode(r'''
+main(Object foo) {
+  foo();
+}
+''', [
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 21, 3),
+    ]);
+
+    var invocation = findNode.functionExpressionInvocation('foo();');
+    assertElementNull(invocation);
+    assertInvokeTypeDynamic(invocation);
+    assertTypeDynamic(invocation);
+
+    var foo = invocation.function as SimpleIdentifier;
+    assertElement(foo, findElement.parameter('foo'));
+    assertType(foo, 'Object');
+  }
+
+  test_error_invocationOfNonFunction_parameter_dynamic() async {
+    await assertNoErrorsInCode(r'''
+main(var foo) {
+  foo();
+}
+''');
+
+    var invocation = findNode.functionExpressionInvocation('foo();');
+    assertElementNull(invocation);
+    assertInvokeTypeDynamic(invocation);
+    assertTypeDynamic(invocation);
+
+    var foo = invocation.function as SimpleIdentifier;
+    assertElement(foo, findElement.parameter('foo'));
+    assertTypeDynamic(foo);
+  }
+
   test_error_invocationOfNonFunction_static_hasTarget() async {
     await assertErrorsInCode(r'''
 class C {
-  static int foo;
+  static int foo = 0;
 }
 
 main() {
   C.foo();
 }
 ''', [
-      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 42, 5),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 46, 5),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -281,14 +283,14 @@
   test_error_invocationOfNonFunction_static_noTarget() async {
     await assertErrorsInCode(r'''
 class C {
-  static int foo;
+  static int foo = 0;
   
   main() {
     foo();
   }
 }
 ''', [
-      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 46, 3),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 50, 3),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -356,6 +358,7 @@
   }
 
   test_error_prefixIdentifierNotFollowedByDot_deferred() async {
+    var question = typeToStringWithNullability ? '?' : '';
     await assertErrorsInCode(r'''
 import 'dart:math' deferred as math;
 
@@ -373,6 +376,7 @@
       invocation,
       import.importedLibrary.loadLibraryFunction,
       'Future<dynamic> Function()',
+      expectedType: 'Future<dynamic>$question',
     );
     assertImportPrefix(invocation.target, import.prefix);
   }
@@ -445,12 +449,12 @@
     await assertErrorsInCode(r'''
 class C {}
 
-int x;
+int x = 0;
 main() {
   C.foo(x);
 }
 ''', [
-      error(CompileTimeErrorCode.UNDEFINED_METHOD, 32, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 36, 3),
     ]);
 
     _assertUnresolvedMethodInvocation('foo(x);');
@@ -545,6 +549,8 @@
   null.foo();
 }
 ''', [
+      if (typeToStringWithNullability)
+        error(CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE, 11, 4),
       error(CompileTimeErrorCode.UNDEFINED_METHOD, 16, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo();');
@@ -688,16 +694,19 @@
   }
 
   test_error_useOfVoidResult_name_getter() async {
-    await assertErrorsInCode(r'''
+    await assertErrorsInCode('''
 class C<T>{
   T foo;
+  C(this.foo);
 }
 
 main(C<void> c) {
   c.foo();
 }
 ''', [
-      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 44, 5),
+      if (typeToStringWithNullability)
+        error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 59, 5),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 59, 5),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -718,6 +727,8 @@
   foo();
 }
 ''', [
+      if (typeToStringWithNullability)
+        error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 3),
       error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
     ]);
 
@@ -739,6 +750,8 @@
   foo()();
 }
 ''', [
+      if (typeToStringWithNullability)
+        error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 5),
       error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 3),
     ]);
     assertMethodInvocation(
@@ -756,6 +769,8 @@
   foo();
 }
 ''', [
+      if (typeToStringWithNullability)
+        error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 3),
       error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 22, 3),
     ]);
 
@@ -804,6 +819,7 @@
   }
 
   test_error_useOfVoidResult_receiver_withNull() async {
+    var question = typeToStringWithNullability ? '?' : '';
     await assertErrorsInCode(r'''
 main() {
   void foo;
@@ -817,6 +833,7 @@
       findNode.methodInvocation('toString()'),
       null,
       'String Function()',
+      expectedType: 'String$question',
     );
   }
 
@@ -840,13 +857,13 @@
 
   test_error_wrongNumberOfTypeArgumentsMethod_21() async {
     await assertErrorsInCode(r'''
-Map<T, U> foo<T extends num, U>() => null;
+Map<T, U> foo<T extends num, U>() => throw Error();
 
 main() {
   foo<int>();
 }
 ''', [
-      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 58, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 67, 5),
     ]);
     assertMethodInvocation(
       findNode.methodInvocation('foo<int>()'),
@@ -860,7 +877,7 @@
   test_hasReceiver_class_staticGetter() async {
     await assertNoErrorsInCode(r'''
 class C {
-  static double Function(int) get foo => null;
+  static double Function(int) get foo => throw Error();
 }
 
 main() {
@@ -1040,8 +1057,8 @@
 
   test_hasReceiver_instance_Function_call_localVariable() async {
     await assertNoErrorsInCode(r'''
-void main() {
-  Function foo;
+void main(Function getFunction()) {
+  Function foo = getFunction();
 
   foo.call(0);
 }
@@ -1051,7 +1068,7 @@
 
   test_hasReceiver_instance_Function_call_topVariable() async {
     await assertNoErrorsInCode(r'''
-Function foo;
+Function foo = throw Error();
 
 void main() {
   foo.call(0);
@@ -1063,7 +1080,7 @@
   test_hasReceiver_instance_getter() async {
     await assertNoErrorsInCode(r'''
 class C {
-  double Function(int) get foo => null;
+  double Function(int) get foo => throw Error();
 }
 
 main(C c) {
@@ -1164,6 +1181,7 @@
 
 class C<T extends A> {
   T a;
+  C(this.a);
   
   main() {
     a.foo(0);
@@ -1243,7 +1261,7 @@
   test_hasReceiver_super_getter() async {
     await assertNoErrorsInCode(r'''
 class A {
-  double Function(int) get foo => null;
+  double Function(int) get foo => throw Error();
 }
 
 class B extends A {
@@ -1289,8 +1307,9 @@
   }
 
   test_namedArgument() async {
-    await assertNoErrorsInCode(r'''
-void foo({int a, bool b}) {}
+    var question = typeToStringWithNullability ? '?' : '';
+    await assertNoErrorsInCode('''
+void foo({int$question a, bool$question b}) {}
 
 main() {
   foo(b: false, a: 0);
@@ -1301,7 +1320,7 @@
     assertMethodInvocation(
       invocation,
       findElement.topFunction('foo'),
-      'void Function({int a, bool b})',
+      'void Function({int$question a, bool$question b})',
     );
     assertNamedParameterRef('b: false', 'b');
     assertNamedParameterRef('a: 0', 'a');
@@ -1310,7 +1329,7 @@
   test_noReceiver_getter_superClass() async {
     await assertNoErrorsInCode(r'''
 class A {
-  double Function(int) get foo => null;
+  double Function(int) get foo => throw Error();
 }
 
 class B extends A {
@@ -1333,7 +1352,7 @@
   test_noReceiver_getter_thisClass() async {
     await assertNoErrorsInCode(r'''
 class C {
-  double Function(int) get foo => null;
+  double Function(int) get foo => throw Error();
 
   void bar() {
     foo(0);
@@ -1381,25 +1400,6 @@
     );
   }
 
-  test_noReceiver_localVariable() async {
-    await assertNoErrorsInCode(r'''
-main() {
-  void Function(int) foo;
-
-  foo(0);
-}
-''');
-
-    var invocation = findNode.functionExpressionInvocation('foo(0);');
-    assertElementNull(invocation);
-    assertInvokeType(invocation, 'void Function(int)');
-    assertType(invocation, 'void');
-
-    var foo = invocation.function as SimpleIdentifier;
-    assertElement(foo, findElement.localVar('foo'));
-    assertType(foo, 'void Function(int)');
-  }
-
   test_noReceiver_localVariable_call() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -1481,9 +1481,27 @@
     );
   }
 
-  test_noReceiver_parameter_call_nullAware() async {
+  test_noReceiver_parameter() async {
     await assertNoErrorsInCode(r'''
-double Function(int) foo;
+main(void Function(int) foo) {
+  foo(0);
+}
+''');
+
+    var invocation = findNode.functionExpressionInvocation('foo(0);');
+    assertElementNull(invocation);
+    assertInvokeType(invocation, 'void Function(int)');
+    assertType(invocation, 'void');
+
+    var foo = invocation.function as SimpleIdentifier;
+    assertElement(foo, findElement.parameter('foo'));
+    assertType(foo, 'void Function(int)');
+  }
+
+  test_noReceiver_parameter_call_nullAware() async {
+    var question = typeToStringWithNullability ? '?' : '';
+    await assertNoErrorsInCode('''
+double Function(int)$question foo;
 
 main() {
   foo?.call(1);
@@ -1491,7 +1509,11 @@
     ''');
 
     var invocation = findNode.methodInvocation('call(1)');
-    assertTypeLegacy(invocation.target);
+    if (typeToStringWithNullability) {
+      assertType(invocation.target, 'double Function(int)?');
+    } else {
+      assertTypeLegacy(invocation.target);
+    }
   }
 
   test_noReceiver_topFunction() async {
@@ -1514,7 +1536,7 @@
 
   test_noReceiver_topGetter() async {
     await assertNoErrorsInCode(r'''
-double Function(int) get foo => null;
+double Function(int) get foo => throw Error();
 
 main() {
   foo(0);
@@ -1533,7 +1555,7 @@
 
   test_noReceiver_topVariable() async {
     await assertNoErrorsInCode(r'''
-void Function(int) foo;
+void Function(int) foo = throw Error();
 
 main() {
   foo(0);
@@ -1604,13 +1626,13 @@
 
   test_typeArgumentTypes_generic_inferred() async {
     await assertErrorsInCode(r'''
-U foo<T, U>(T a) => null;
+U foo<T, U>(T a) => throw Error();
 
 main() {
   bool v = foo(0);
 }
 ''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 43, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 52, 1),
     ]);
 
     var invocation = findNode.methodInvocation('foo(0)');
@@ -1717,7 +1739,8 @@
 
 @reflectiveTest
 class MethodInvocationResolutionWithNullSafetyTest
-    extends PubPackageResolutionTest with WithNullSafetyMixin {
+    extends PubPackageResolutionTest
+    with WithNullSafetyMixin, MethodInvocationResolutionTestCases {
   test_hasReceiver_deferredImportPrefix_loadLibrary_optIn_fromOptOut() async {
     newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
index 699e6bf..c6f1e03 100644
--- a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
@@ -135,6 +135,16 @@
 ''');
   }
 
+  test_field_ofClass() async {
+    await assertErrorsInCode('''
+abstract class A {
+  final int x;
+}
+''', [
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 31, 1),
+    ]);
+  }
+
   test_field_unnamedConstructor_constructorInitializer() async {
     await assertNoErrorsInCode('''
 class C {
diff --git a/pkg/analyzer/test/src/diagnostics/null_safety_read_write_test.dart b/pkg/analyzer/test/src/diagnostics/null_safety_read_write_test.dart
new file mode 100644
index 0000000..3ab33ad
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_safety_read_write_test.dart
@@ -0,0 +1,452 @@
+// 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 'package:analyzer/src/error/codes.dart';
+import 'package:meta/meta.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReadWriteWithNullSafetyTest);
+  });
+}
+
+@reflectiveTest
+class ReadWriteWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  @override
+  bool get retainDataForTesting => true;
+
+  test_final_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  final x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_final_definitelyAssigned_read_prefixNegate() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  // ignore:unused_local_variable
+  final x;
+  x = 0;
+  -x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_final_definitelyAssigned_write_assignment_simple() async {
+    await assertErrorsInCode(r'''
+void f() {
+  // ignore:unused_local_variable
+  final x;
+  x = 0;
+  x = 1;
+}
+''', [
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 67, 1),
+    ]);
+    _assertAssigned('x = 0', assigned: false, unassigned: true);
+    _assertAssigned('x = 1', assigned: true, unassigned: false);
+  }
+
+  test_final_definitelyAssigned_write_forEachLoop_identifier() async {
+    await assertErrorsInCode(r'''
+void f() {
+  final x = 0;
+  for (x in [0, 1, 2]) {
+    x;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 33, 1),
+    ]);
+    _assertAssigned('x in', assigned: true, unassigned: false);
+  }
+
+  test_final_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f() {
+  final x;
+  x; // 0
+  x();
+}
+''', [
+      error(CompileTimeErrorCode.READ_POTENTIALLY_UNASSIGNED_FINAL, 24, 1),
+      error(CompileTimeErrorCode.READ_POTENTIALLY_UNASSIGNED_FINAL, 34, 1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+    _assertAssigned('x()', assigned: false, unassigned: true);
+  }
+
+  test_final_neither_read() async {
+    await assertErrorsInCode(r'''
+void f(bool b) {
+  final x;
+  if (b) x = 0;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.READ_POTENTIALLY_UNASSIGNED_FINAL, 46, 1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_lateFinal_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  late final x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_lateFinal_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f() {
+  late final x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 29,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_lateFinal_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  late var x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_lateFinalNullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  late final int? x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_lateFinalNullable_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f() {
+  late final int? x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 34,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_lateFinalNullable_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  late final int? x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_lateFinalPotentiallyNonNullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f<T>(T t) {
+  late final T x;
+  x = t;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_lateFinalPotentiallyNonNullable_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f<T>() {
+  late final T x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 34,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_lateFinalPotentiallyNonNullable_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f<T>(bool b, T t) {
+  late final T x;
+  if (b) x = t;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_lateNullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  late int? x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_lateNullable_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f() {
+  late int? x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 28,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_lateNullable_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  late int? x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_latePotentiallyNonNullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f<T>(T t) {
+  late T x;
+  x = t;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_latePotentiallyNonNullable_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f<T>() {
+  late T x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 28,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_latePotentiallyNonNullable_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f<T>(bool b, T t) {
+  late T x;
+  if (b) x = t;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_lateVar_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  late var x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_lateVar_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f() {
+  late var x;
+  x; // 0
+}
+''', [
+      error(CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE, 27,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_lateVar_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  late var x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_notNullable_write_forEachLoop_identifier() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  int x;
+  for (x in [0, 1, 2]) {
+    x; // 0
+  }
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_nullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f(int? x) {
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_nullable_definitelyUnassigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  int? x;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_nullable_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  int? x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_potentiallyNonNullable_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f<T>(T x) {
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_potentiallyNonNullable_definitelyUnassigned_read() async {
+    await assertErrorsInCode(r'''
+void f<T>() {
+  T x;
+  x; // 0
+}
+''', [
+      error(
+          CompileTimeErrorCode
+              .NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
+          23,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_potentiallyNonNullable_neither_read() async {
+    await assertErrorsInCode(r'''
+void f<T>(bool b, T t) {
+  T x;
+  if (b) x = t;
+  x; // 0
+}
+''', [
+      error(
+          CompileTimeErrorCode
+              .NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
+          50,
+          1),
+    ]);
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  test_var_definitelyAssigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  var x;
+  x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: true, unassigned: false);
+  }
+
+  test_var_definitelyUnassigned_read() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  var x;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: true);
+  }
+
+  test_var_neither_read() async {
+    await assertNoErrorsInCode(r'''
+void f(bool b) {
+  var x;
+  if (b) x = 0;
+  x; // 0
+}
+''');
+    _assertAssigned('x; // 0', assigned: false, unassigned: false);
+  }
+
+  void _assertAssigned(
+    String search, {
+    @required bool assigned,
+    @required bool unassigned,
+  }) {
+    var node = findNode.simple(search);
+
+    var testingData = driverFor(testFilePath).testingData;
+    var unitData = testingData.uriToFlowAnalysisData[result.uri];
+
+    if (assigned) {
+      expect(unitData.definitelyAssignedNodes, contains(node));
+    } else {
+      expect(unitData.definitelyAssignedNodes, isNot(contains(node)));
+    }
+
+    if (unassigned) {
+      expect(unitData.definitelyUnassignedNodes, contains(node));
+    } else {
+      expect(unitData.definitelyUnassignedNodes, isNot(contains(node)));
+    }
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 29ebd3b..9d1aa5b 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -450,6 +450,7 @@
 import 'null_aware_in_condition_test.dart' as null_aware_in_condition;
 import 'null_aware_in_logical_operator_test.dart'
     as null_aware_in_logical_operator;
+import 'null_safety_read_write_test.dart' as null_safety_read_write;
 import 'nullable_type_in_catch_clause_test.dart'
     as nullable_type_in_catch_clause;
 import 'nullable_type_in_extends_clause_test.dart'
@@ -936,6 +937,7 @@
     null_aware_before_operator.main();
     null_aware_in_condition.main();
     null_aware_in_logical_operator.main();
+    null_safety_read_write.main();
     nullable_type_in_catch_clause.main();
     nullable_type_in_extends_clause.main();
     nullable_type_in_implements_clause.main();
diff --git a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
index 345e3f2..c8a02f7 100644
--- a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:pub_semver/pub_semver.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'recovery_test_support.dart';
@@ -57,7 +58,10 @@
 /// Test how well the parser recovers when tokens are missing in a map literal.
 @reflectiveTest
 class MapLiteralTest extends AbstractRecoveryTest {
-  final beforeUiAsCode = FeatureSet.forTesting(sdkVersion: '2.2.0');
+  final beforeUiAsCode = FeatureSet.fromEnableFlags2(
+    sdkLanguageVersion: Version.parse('2.2.0'),
+    flags: [],
+  );
 
   void test_extraComma() {
     testRecovery('''
diff --git a/pkg/analyzer/test/util/id_testing_helper.dart b/pkg/analyzer/test/util/id_testing_helper.dart
index c393ad8..76658f3 100644
--- a/pkg/analyzer/test/util/id_testing_helper.dart
+++ b/pkg/analyzer/test/util/id_testing_helper.dart
@@ -347,5 +347,5 @@
   final FeatureSet featureSet;
 
   TestConfig(this.marker, this.name, {FeatureSet featureSet})
-      : featureSet = featureSet ?? FeatureSet.fromEnableFlags([]);
+      : featureSet = featureSet ?? FeatureSet.latestLanguageVersion();
 }
diff --git a/pkg/analyzer/tool/experiments/generate.dart b/pkg/analyzer/tool/experiments/generate.dart
index 0183ed7..6ef4373 100644
--- a/pkg/analyzer/tool/experiments/generate.dart
+++ b/pkg/analyzer/tool/experiments/generate.dart
@@ -83,7 +83,6 @@
     keysSorted = features.keys.toList()..sort();
     generateSection_CurrentVersion();
     generateSection_KnownFeatures();
-    generateSection_BuildExperimentalFlagsArray();
     generateSection_EnableString();
     generateSection_ExperimentalFeature();
     generateSection_IsEnabledByDefault();
@@ -91,27 +90,6 @@
     generateSection_CurrentState();
   }
 
-  void generateSection_BuildExperimentalFlagsArray() {
-    out.write('''
-
-List<bool> _buildExperimentalFlagsArray() => <bool>[
-''');
-    for (var key in keysSorted) {
-      var id = keyToIdentifier(key);
-      var entry = features[key] as YamlMap;
-      bool shipped = entry['enabledIn'] != null;
-      bool expired = entry['expired'];
-      if (shipped || expired == true) {
-        out.writeln('true, // $key');
-      } else {
-        out.writeln('IsEnabledByDefault.$id,');
-      }
-    }
-    out.write('''
-    ];
-''');
-  }
-
   void generateSection_CurrentState() {
     out.write('''
 
@@ -166,6 +144,8 @@
     for (var key in keysSorted) {
       var id = keyToIdentifier(key);
       var help = (features[key] as YamlMap)['help'] ?? '';
+      var experimentalReleaseVersion =
+          (features[key] as YamlMap)['experimentalReleaseVersion'];
       var enabledIn = (features[key] as YamlMap)['enabledIn'];
       out.write('''
 
@@ -176,7 +156,16 @@
         isExpired: IsExpired.$id,
         documentation: '$help',
     ''');
-      out.write("experimentalReleaseVersion: null,");
+
+      if (experimentalReleaseVersion != null) {
+        experimentalReleaseVersion =
+            _versionNumberAsString(experimentalReleaseVersion);
+        out.write("experimentalReleaseVersion: ");
+        out.write("Version.parse('$experimentalReleaseVersion'),");
+      } else {
+        out.write("experimentalReleaseVersion: null,");
+      }
+
       if (enabledIn != null) {
         enabledIn = _versionNumberAsString(enabledIn);
         out.write("releaseVersion: Version.parse('$enabledIn'),");
diff --git a/pkg/analyzer_cli/lib/src/context_cache.dart b/pkg/analyzer_cli/lib/src/context_cache.dart
index 82e7f1e..bdbe19a 100644
--- a/pkg/analyzer_cli/lib/src/context_cache.dart
+++ b/pkg/analyzer_cli/lib/src/context_cache.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer_cli/src/options.dart';
 import 'package:path/path.dart' as path;
@@ -85,17 +86,19 @@
   String get analysisRoot => _analysisRoot ??= _getAnalysisRoot();
 
   void _buildContextFeatureSet(AnalysisOptionsImpl analysisOptions) {
-    var featureSet = FeatureSet.fromEnableFlags(
-      clOptions.enabledExperiments,
+    var sdkLanguageVersion = ExperimentStatus.currentVersion;
+    if (clOptions.defaultLanguageVersion != null) {
+      sdkLanguageVersion = Version.parse(
+        clOptions.defaultLanguageVersion + '.0',
+      );
+    }
+
+    var featureSet = FeatureSet.fromEnableFlags2(
+      sdkLanguageVersion: sdkLanguageVersion,
+      flags: clOptions.enabledExperiments,
     );
 
     analysisOptions.contextFeatures = featureSet;
-
-    if (clOptions.defaultLanguageVersion != null) {
-      analysisOptions.nonPackageFeatureSet = featureSet.restrictToVersion(
-        Version.parse(clOptions.defaultLanguageVersion + '.0'),
-      );
-    }
   }
 
   /// The actual calculation to get the [AnalysisOptionsImpl], with no caching.
diff --git a/pkg/analyzer_cli/tool/perf.dart b/pkg/analyzer_cli/tool/perf.dart
index 45131c1..b23105d 100644
--- a/pkg/analyzer_cli/tool/perf.dart
+++ b/pkg/analyzer_cli/tool/perf.dart
@@ -86,7 +86,7 @@
   var parser = Parser(
     source,
     AnalysisErrorListener.NULL_LISTENER,
-    featureSet: FeatureSet.fromEnableFlags([]),
+    featureSet: FeatureSet.latestLanguageVersion(),
   );
   return parser.parseDirectives(token);
 }
@@ -120,7 +120,7 @@
   var parser = Parser(
     source,
     AnalysisErrorListener.NULL_LISTENER,
-    featureSet: FeatureSet.fromEnableFlags([]),
+    featureSet: FeatureSet.latestLanguageVersion(),
   );
   return parser.parseCompilationUnit(token);
 }
@@ -215,7 +215,7 @@
   var contents = source.contents.data;
   scanTotalChars += contents.length;
   // TODO(paulberry): figure out the appropriate featureSet to use here
-  var featureSet = FeatureSet.fromEnableFlags([]);
+  var featureSet = FeatureSet.latestLanguageVersion();
   // TODO(sigmund): is there a way to scan from a random-access-file without
   // first converting to String?
   var scanner = Scanner(
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
index d1c08d5..679b748 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
@@ -509,7 +510,9 @@
 
   @override
   void writeParameter(String name,
-      {ExecutableElement methodBeingCopied,
+      {bool isCovariant = false,
+      bool isRequiredNamed = false,
+      ExecutableElement methodBeingCopied,
       String nameGroupName,
       DartType type,
       String typeGroupName}) {
@@ -535,6 +538,24 @@
       }
     }
 
+    if (isCovariant) {
+      write('covariant ');
+    }
+    if (isRequiredNamed) {
+      var library = dartFileEditBuilder.resolvedUnit.libraryElement;
+      if (library.featureSet.isEnabled(Feature.non_nullable)) {
+        write('required ');
+      } else {
+        var result = dartFileEditBuilder
+            .importLibraryElement(Uri.parse('package:meta/meta.dart'));
+        var prefix = result.prefix;
+        if (prefix != null) {
+          write('@$prefix.required ');
+        } else {
+          write('@required ');
+        }
+      }
+    }
     if (type != null) {
       var hasType = writeType();
       if (name.isNotEmpty) {
@@ -612,6 +633,8 @@
       var groupPrefix =
           methodBeingCopied != null ? '${methodBeingCopied.name}:' : '';
       writeParameter(name,
+          isCovariant: parameter.isCovariant,
+          isRequiredNamed: parameter.isRequiredNamed,
           methodBeingCopied: methodBeingCopied,
           nameGroupName: parameter.isNamed ? null : '${groupPrefix}PARAM$i',
           type: parameter.type,
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index 1da71f5..1b29916 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -207,8 +207,16 @@
   ///
   /// If a [type] and [typeGroupName] are both provided, then the type of the
   /// parameter will be included in a linked edit.
+  ///
+  /// If [isCovariant] is `true` then the keyword `covariant` will be included
+  /// in the parameter declaration.
+  ///
+  /// If [isRequiredNamed] is `true` then either the keyword `required` or the
+  /// annotation `@required` will be included in the parameter declaration.
   void writeParameter(String name,
-      {ExecutableElement methodBeingCopied,
+      {bool isCovariant,
+      bool isRequiredNamed,
+      ExecutableElement methodBeingCopied,
       String nameGroupName,
       DartType type,
       String typeGroupName});
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
index 3c84ed8..2af81b8 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
@@ -830,6 +830,94 @@
     expect(edit.replacement, equalsIgnoringWhitespace('a'));
   }
 
+  Future<void> test_writeParameter_covariant() async {
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = 'class A {}';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isCovariant: true);
+      });
+    });
+    var edit = getEdit(builder);
+    expect(edit.replacement, equalsIgnoringWhitespace('covariant a'));
+  }
+
+  Future<void> test_writeParameter_covariantAndRequired() async {
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = 'class A {}';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isCovariant: true, isRequiredNamed: true);
+      });
+    });
+    var edits = getEdits(builder);
+    expect(edits, hasLength(2));
+    expect(edits[0].replacement,
+        equalsIgnoringWhitespace('covariant @required a'));
+    expect(edits[1].replacement,
+        equalsIgnoringWhitespace("import 'package:meta/meta.dart';"));
+  }
+
+  Future<void> test_writeParameter_required_addImport() async {
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = 'class A {}';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isRequiredNamed: true);
+      });
+    });
+    var edits = getEdits(builder);
+    expect(edits, hasLength(2));
+    expect(edits[0].replacement, equalsIgnoringWhitespace('@required a'));
+    expect(edits[1].replacement,
+        equalsIgnoringWhitespace("import 'package:meta/meta.dart';"));
+  }
+
+  Future<void> test_writeParameter_required_existingImport() async {
+    addMetaPackage();
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = '''
+import 'package:meta/meta.dart';
+
+class A {}
+''';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isRequiredNamed: true);
+      });
+    });
+    var edit = getEdit(builder);
+    expect(edit.replacement, equalsIgnoringWhitespace('@required a'));
+  }
+
+  Future<void> test_writeParameter_required_keyword() async {
+    createAnalysisOptionsFile(experiments: ['non-nullable']);
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = 'class A {}';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isRequiredNamed: true);
+      });
+    });
+    var edit = getEdit(builder);
+    expect(edit.replacement, equalsIgnoringWhitespace('required a'));
+  }
+
   Future<void> test_writeParameter_type() async {
     var path = convertPath('/home/test/lib/test.dart');
     var content = 'class A {}';
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index 41ddad7..4ec53ba 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
@@ -83,7 +83,9 @@
 // Older IEs use `Object.create` and copy over the properties.
 function inherit(cls, sup) {
   // Note that RTI needs cls.name, but we don't need to set it anymore.
-  cls.prototype.constructor = cls;
+  if (#legacyJavaScript) {
+    cls.prototype.constructor = cls;
+  }
   cls.prototype[#operatorIsPrefix + cls.name] = cls;
 
   // The superclass is only null for the Dart Object.
@@ -730,6 +732,7 @@
       'call0selector': js.quoteName(call0Name),
       'call1selector': js.quoteName(call1Name),
       'call2selector': js.quoteName(call2Name),
+      'legacyJavaScript': _options.legacyJavaScript
     });
     if (program.hasSoftDeferredClasses) {
       mainCode = js.Block([
@@ -1129,9 +1132,12 @@
     List<js.Property> properties = [];
 
     if (cls.superclass == null) {
-      // TODO(sra): What is this doing? Document or remove.
-      properties
-          .add(js.Property(js.string("constructor"), classReference(cls)));
+      // ie11 might require us to set 'constructor' but we aren't 100% sure.
+      if (_options.legacyJavaScript) {
+        properties
+            .add(js.Property(js.string("constructor"), classReference(cls)));
+      }
+
       properties.add(js.Property(_namer.operatorIs(cls.element), js.number(1)));
     }
 
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index 80667e6..58607bb 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -17,16 +17,36 @@
   kernel: any
 
   # Unpublished packages that can be used via path dependency
+  _fe_analyzer_shared:
+    path: ../_fe_analyzer_shared
+  _js_interop_checks:
+    path: ../_js_interop_checks
   js_ast:
     path: ../js_ast
   js_runtime:
     path: ../../sdk/lib/_internal/js_runtime
-  sdk_library_metadata:
-    path: ../../sdk/lib/_internal/sdk_library_metadata
 
 dev_dependencies:
   # Published packages - repo version ensured via dependency_overrides
   args: any
+  http: any
+  js: any
+  package_config: any
+  path: any
+  source_maps: any
+  # Unpublished packages that can be used via path dependency
+  async_helper:
+    path: ../async_helper
+  dart2js_tools:
+    path: ../dart2js_tools
+  expect:
+    path: ../expect
+  modular_test:
+    path: ../modular_test
+  sourcemap_testing:
+    path: ../sourcemap_testing
+  testing:
+    path: ../testing
 
 dependency_overrides:
   # Packages with source in the SDK
diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml
index d007dbe..0d28868 100644
--- a/pkg/dart2js_tools/pubspec.yaml
+++ b/pkg/dart2js_tools/pubspec.yaml
@@ -5,7 +5,9 @@
   Collection of tools used with dart2js including analyzing compilation
   information, deobfuscation of stack-traces and minified names.
 dependencies:
+  path: any
   source_maps: ^0.10.7
+  source_span: any
   stack_trace: ^1.9.3
 environment:
   sdk: '>=2.3.0 <3.0.0'
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index 3a8364c..e1d0d3d 100644
--- a/pkg/dds/pubspec.yaml
+++ b/pkg/dds/pubspec.yaml
@@ -17,13 +17,13 @@
   pedantic: ^1.7.0
   shelf: ^0.7.5
   shelf_proxy: ^0.1.0+7
-  shelf_static: ^0.2.8
   shelf_web_socket: ^0.2.3
   sse: ^3.5.0
   stream_channel: ^2.0.0
   web_socket_channel: ^1.1.0
 
 dev_dependencies:
+  shelf_static: ^0.2.8
   test: ^1.0.0
   vm_service: ^4.0.0
   webdriver: ^2.1.2
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index 1b7b01e..2761eb0 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -61,13 +61,6 @@
   /// runtime can enable synchronous stack trace deobsfuscation.
   final bool inlineSourceMap;
 
-  /// Whether to emit the debug metadata
-  ///
-  /// Debugger uses this information about to construct mapping between
-  /// modules and libraries that otherwise requires expensive communication with
-  /// the browser.
-  final bool emitDebugMetadata;
-
   /// Whether to emit a summary file containing API signatures.
   ///
   /// This is required for a modular build process.
@@ -82,10 +75,30 @@
   /// This should only set `true` by our REPL compiler.
   bool replCompile;
 
+  /// Whether to emit the debug metadata
+  ///
+  /// Debugger uses this information about to construct mapping between
+  /// modules and libraries that otherwise requires expensive communication with
+  /// the browser.
+  final bool emitDebugMetadata;
+
   final Map<String, String> summaryModules;
 
   final List<ModuleFormat> moduleFormats;
 
+  /// The name of the module.
+  ///
+  /// This is used to support file concatenation. The JS module will contain its
+  /// module name inside itself, allowing it to declare the module name
+  /// independently of the file.
+  final String moduleName;
+
+  /// Custom scheme to indicate a multi-root uri.
+  final String multiRootScheme;
+
+  /// Path to set multi-root files relative to when generating source-maps.
+  final String multiRootOutputPath;
+
   /// Experimental language features that are enabled/disabled, see
   /// [the spec](https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md)
   /// for more details.
@@ -93,13 +106,6 @@
 
   final bool soundNullSafety;
 
-  /// The name of the module.
-  ///
-  /// This used when to support file concatenation. The JS module will contain
-  /// its module name inside itself, allowing it to declare the module name
-  /// independently of the file.
-  String moduleName;
-
   SharedCompilerOptions(
       {this.sourceMap = true,
       this.inlineSourceMap = false,
@@ -109,39 +115,52 @@
       this.emitDebugMetadata = false,
       this.summaryModules = const {},
       this.moduleFormats = const [],
-      this.experiments = const {},
       this.moduleName,
+      this.multiRootScheme,
+      this.multiRootOutputPath,
+      this.experiments = const {},
       this.soundNullSafety = false});
 
-  SharedCompilerOptions.fromArguments(ArgResults args,
-      [String moduleRoot, String summaryExtension])
+  SharedCompilerOptions.fromArguments(ArgResults args)
       : this(
             sourceMap: args['source-map'] as bool,
             inlineSourceMap: args['inline-source-map'] as bool,
             summarizeApi: args['summarize'] as bool,
             enableAsserts: args['enable-asserts'] as bool,
+            replCompile: args['repl-compile'] as bool,
+            emitDebugMetadata: args['experimental-emit-debug-metadata'] as bool,
+            summaryModules:
+                _parseCustomSummaryModules(args['summary'] as List<String>),
+            moduleFormats: parseModuleFormatOption(args),
+            moduleName: _getModuleName(args),
+            multiRootScheme: args['multi-root-scheme'] as String,
+            multiRootOutputPath: args['multi-root-output-path'] as String,
             experiments: parseExperimentalArguments(
                 args['enable-experiment'] as List<String>),
-            summaryModules: _parseCustomSummaryModules(
-                args['summary'] as List<String>, moduleRoot, summaryExtension),
+            soundNullSafety: args['sound-null-safety'] as bool);
+
+  SharedCompilerOptions.fromSdkRequiredArguments(ArgResults args)
+      : this(
+            summarizeApi: false,
             moduleFormats: parseModuleFormatOption(args),
-            moduleName: _getModuleName(args, moduleRoot),
-            replCompile: args['repl-compile'] as bool,
-            soundNullSafety: args['sound-null-safety'] as bool,
-            emitDebugMetadata:
-                args['experimental-emit-debug-metadata'] as bool);
+            // When compiling the SDK use dart_sdk as the default. This is the
+            // assumed name in various places around the build systems.
+            moduleName:
+                args['module-name'] != null ? _getModuleName(args) : 'dart_sdk',
+            multiRootScheme: args['multi-root-scheme'] as String,
+            multiRootOutputPath: args['multi-root-output-path'] as String,
+            experiments: parseExperimentalArguments(
+                args['enable-experiment'] as List<String>),
+            soundNullSafety: args['sound-null-safety'] as bool);
 
   static void addArguments(ArgParser parser, {bool hide = true}) {
-    addModuleFormatOptions(parser, hide: hide);
+    addSdkRequiredArguments(parser, hide: hide);
 
     parser
-      ..addMultiOption('out', abbr: 'o', help: 'Output file (required).')
       ..addMultiOption('summary',
           abbr: 's',
           help: 'API summary file(s) of imported libraries, optionally\n'
               'with module import path: -s path.dill=js/import/path')
-      ..addMultiOption('enable-experiment',
-          help: 'Enable/disable experimental language features.', hide: hide)
       ..addFlag('summarize',
           help: 'Emit an API summary file.', defaultsTo: true, hide: hide)
       ..addFlag('source-map',
@@ -150,26 +169,12 @@
           help: 'Emit source mapping inline.', defaultsTo: false, hide: hide)
       ..addFlag('enable-asserts',
           help: 'Enable assertions.', defaultsTo: true, hide: hide)
-      ..addOption('module-name',
-          help: 'The output module name, used in some JS module formats.\n'
-              'Defaults to the output file name (without .js).')
       ..addFlag('repl-compile',
           help: 'Compile in a more permissive REPL mode, allowing access'
               ' to private members across library boundaries. This should'
               ' only be used by debugging tools.',
           defaultsTo: false,
           hide: hide)
-      ..addFlag('sound-null-safety',
-          help: 'Compile for sound null safety at runtime.',
-          negatable: true,
-          defaultsTo: false)
-      ..addOption('multi-root-scheme',
-          help: 'The custom scheme to indicate a multi-root uri.',
-          defaultsTo: 'org-dartlang-app')
-      ..addOption('multi-root-output-path',
-          help: 'Path to set multi-root files relative to when generating'
-              ' source-maps.',
-          hide: true)
       // TODO(41852) Define a process for breaking changes before graduating from
       // experimental.
       ..addFlag('experimental-emit-debug-metadata',
@@ -179,7 +184,34 @@
           hide: true);
   }
 
-  static String _getModuleName(ArgResults args, String moduleRoot) {
+  /// Adds only the arguments used to compile the SDK from a full dill file.
+  ///
+  /// NOTE: The 'module-name' option will have a special default value of
+  /// 'dart_sdk' when compiling the SDK.
+  /// See [SharedCompilerOptions.fromSdkRequiredArguments].
+  static void addSdkRequiredArguments(ArgParser parser, {bool hide = true}) {
+    addModuleFormatOptions(parser, hide: hide);
+    parser
+      ..addMultiOption('out', abbr: 'o', help: 'Output file (required).')
+      ..addOption('module-name',
+          help: 'The output module name, used in some JS module formats.\n'
+              'Defaults to the output file name (without .js).')
+      ..addOption('multi-root-scheme',
+          help: 'The custom scheme to indicate a multi-root uri.',
+          defaultsTo: 'org-dartlang-app')
+      ..addOption('multi-root-output-path',
+          help: 'Path to set multi-root files relative to when generating'
+              ' source-maps.',
+          hide: true)
+      ..addMultiOption('enable-experiment',
+          help: 'Enable/disable experimental language features.', hide: hide)
+      ..addFlag('sound-null-safety',
+          help: 'Compile for sound null safety at runtime.',
+          negatable: true,
+          defaultsTo: false);
+  }
+
+  static String _getModuleName(ArgResults args) {
     var moduleName = args['module-name'] as String;
     if (moduleName == null) {
       var outPaths = args['out'];
@@ -191,13 +223,8 @@
       // TODO(jmesserly): fix the debugger console so it's not passing invalid
       // options.
       if (outPath == null) return null;
-      if (moduleRoot != null) {
-        // TODO(jmesserly): remove this legacy support after a deprecation
-        // period. (Mainly this is to give time for migrating build rules.)
-        moduleName = p.withoutExtension(p.relative(outPath, from: moduleRoot));
-      } else {
-        moduleName = p.basenameWithoutExtension(outPath);
-      }
+
+      moduleName = p.basenameWithoutExtension(outPath);
     }
     // TODO(jmesserly): this should probably use sourcePathToUri.
     //
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index c764b0f..ba80022 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -146,16 +146,17 @@
     return CompilerResult(0);
   }
 
+  var options = SharedCompilerOptions.fromArguments(argResults);
+
   // To make the output .dill agnostic of the current working directory,
   // we use a custom-uri scheme for all app URIs (these are files outside the
   // lib folder). The following [FileSystem] will resolve those references to
   // the correct location and keeps the real file location hidden from the
   // front end.
-  var multiRootScheme = argResults['multi-root-scheme'] as String;
   var multiRootPaths = (argResults['multi-root'] as Iterable<String>)
       .map(Uri.base.resolve)
       .toList();
-  var multiRootOutputPath = argResults['multi-root-output-path'] as String;
+  var multiRootOutputPath = options.multiRootOutputPath;
   if (multiRootOutputPath == null) {
     if (outPaths.length > 1) {
       print(
@@ -168,11 +169,11 @@
   }
 
   var fileSystem = MultiRootFileSystem(
-      multiRootScheme, multiRootPaths, fe.StandardFileSystem.instance);
+      options.multiRootScheme, multiRootPaths, fe.StandardFileSystem.instance);
 
   Uri toCustomUri(Uri uri) {
     if (uri.scheme == '') {
-      return Uri(scheme: multiRootScheme, path: '/' + uri.path);
+      return Uri(scheme: options.multiRootScheme, path: '/' + uri.path);
     }
     return uri;
   }
@@ -185,7 +186,6 @@
     return toCustomUri(sourcePathToRelativeUri(source));
   }
 
-  var options = SharedCompilerOptions.fromArguments(argResults);
   var summaryPaths = options.summaryModules.keys.toList();
   var summaryModules = Map.fromIterables(
       summaryPaths.map(sourcePathToUri), options.summaryModules.values);
@@ -420,7 +420,7 @@
         emitDebugMetadata: options.emitDebugMetadata,
         jsUrl: p.toUri(output).toString(),
         mapUrl: mapUrl,
-        customScheme: multiRootScheme,
+        customScheme: options.multiRootScheme,
         multiRootOutputPath: multiRootOutputPath,
         component: compiledLibraries);
 
@@ -469,7 +469,7 @@
 // TODO(sigmund): refactor the underlying pieces to reduce the code duplication.
 Future<CompilerResult> compileSdkFromDill(List<String> args) async {
   var argParser = ArgParser(allowTrailingOptions: true);
-  SharedCompilerOptions.addArguments(argParser);
+  SharedCompilerOptions.addSdkRequiredArguments(argParser);
 
   ArgResults argResults;
   try {
@@ -519,9 +519,7 @@
   }
   var coreTypes = CoreTypes(component);
   var hierarchy = ClassHierarchy(component, coreTypes);
-  var multiRootScheme = argResults['multi-root-scheme'] as String;
-  var multiRootOutputPath = argResults['multi-root-output-path'] as String;
-  var options = SharedCompilerOptions.fromArguments(argResults);
+  var options = SharedCompilerOptions.fromSdkRequiredArguments(argResults);
 
   var compiler = ProgramCompiler(
       component, hierarchy, options, const {}, const {},
@@ -542,8 +540,8 @@
         inlineSourceMap: options.inlineSourceMap,
         jsUrl: p.toUri(output).toString(),
         mapUrl: p.toUri(output + '.map').toString(),
-        customScheme: multiRootScheme,
-        multiRootOutputPath: multiRootOutputPath,
+        customScheme: options.multiRootScheme,
+        multiRootOutputPath: options.multiRootOutputPath,
         component: component);
 
     outFiles.add(file.writeAsString(jsCode.code));
@@ -552,6 +550,7 @@
           File(output + '.map').writeAsString(json.encode(jsCode.sourceMap)));
     }
   }
+  await Future.wait(outFiles);
   return CompilerResult(0);
 }
 
diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml
index a4e9b89..f77f40f 100644
--- a/pkg/dev_compiler/pubspec.yaml
+++ b/pkg/dev_compiler/pubspec.yaml
@@ -6,17 +6,36 @@
   sdk: '>=2.3.0 <3.0.0'
 
 dependencies:
-  analyzer: any
+  _fe_analyzer_shared:
+    path: ../_fe_analyzer_shared
+  _js_interop_checks:
+    path: ../_js_interop_checks
+  args: any
   bazel_worker: any
   build_integration:
     path: ../build_integration
   cli_util: any
+  front_end:
+    path: ../front_end
+  kernel:
+    path: ../kernel
+  meta: any
+  path: any
   source_maps: any
+  source_span: any
 
 dev_dependencies:
+  analyzer: any
+  expect:
+    path: ../expect
+  js: any
+  modular_test:
+    path: ../modular_test
+  package_config: any
+  pedantic: ^1.8.0
   sourcemap_testing:
     path: ../sourcemap_testing
-  pedantic: ^1.8.0
+  stack_trace: any
   test: any
   testing:
     path: ../testing
diff --git a/pkg/dev_compiler/tool/patch_sdk.dart b/pkg/dev_compiler/tool/patch_sdk.dart
index 74b3ec5..143935f 100755
--- a/pkg/dev_compiler/tool/patch_sdk.dart
+++ b/pkg/dev_compiler/tool/patch_sdk.dart
@@ -18,6 +18,7 @@
 import 'package:args/args.dart';
 import 'package:front_end/src/base/libraries_specification.dart';
 import 'package:front_end/src/fasta/resolve_input_uri.dart';
+import 'package:pub_semver/pub_semver.dart';
 
 void main(List<String> argv) {
   var args = _parser.parse(argv);
@@ -473,7 +474,10 @@
 }
 
 ParseStringResult _parseString(String source, {bool useNnbd}) {
-  var features = FeatureSet.fromEnableFlags([if (useNnbd) 'non-nullable']);
+  var features = FeatureSet.fromEnableFlags2(
+    sdkLanguageVersion: Version.parse('2.10.0'),
+    flags: [if (useNnbd) 'non-nullable'],
+  );
   return parseString(content: source, featureSet: features);
 }
 
diff --git a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
index 95ca894..66f4a23 100644
--- a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
+++ b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
@@ -25,6 +25,8 @@
 
 import '../api_prototype/front_end.dart' show CompilerResult;
 
+import '../base/nnbd_mode.dart' show NnbdMode;
+
 import '../base/processed_options.dart' show ProcessedOptions;
 
 import '../kernel_generator_impl.dart' show generateKernel;
@@ -50,6 +52,8 @@
 export '../api_prototype/terminal_color_support.dart'
     show printDiagnosticMessage;
 
+export '../base/nnbd_mode.dart' show NnbdMode;
+
 export '../fasta/kernel/utils.dart' show serializeComponent;
 
 export 'compiler_state.dart' show InitializedCompilerState;
@@ -72,7 +76,8 @@
     bool outlineOnly,
     Map<String, String> environmentDefines,
     {bool trackNeededDillLibraries: false,
-    bool verbose: false}) async {
+    bool verbose: false,
+    NnbdMode nnbdMode: NnbdMode.Weak}) async {
   List<Component> outputLoadedAdditionalDills =
       new List<Component>(additionalDills.length);
   Map<ExperimentalFlag, bool> experimentalFlags = parseExperimentalFlags(
@@ -94,7 +99,8 @@
       omitPlatform: true,
       trackNeededDillLibraries: trackNeededDillLibraries,
       environmentDefines: environmentDefines,
-      verbose: verbose);
+      verbose: verbose,
+      nnbdMode: nnbdMode);
 }
 
 Future<InitializedCompilerState> initializeCompiler(
@@ -108,6 +114,7 @@
   Iterable<String> experiments,
   Map<String, String> environmentDefines, {
   bool verbose: false,
+  NnbdMode nnbdMode: NnbdMode.Weak,
 }) async {
   // TODO(sigmund): use incremental compiler when it supports our use case.
   // Note: it is common for the summary worker to invoke the compiler with the
@@ -125,7 +132,8 @@
     ..experimentalFlags = parseExperimentalFlags(
         parseExperimentalArguments(experiments),
         onError: (e) => throw e)
-    ..verbose = verbose;
+    ..verbose = verbose
+    ..nnbdMode = nnbdMode;
 
   ProcessedOptions processedOpts = new ProcessedOptions(options: options);
 
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
index 6a06914..5720eab 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
@@ -4,9 +4,9 @@
 
 library fasta.dill_typedef_builder;
 
-import 'package:kernel/ast.dart' show DartType, Typedef, InterfaceType;
+import 'package:kernel/ast.dart'
+    show DartType, InterfaceType, InvalidType, Typedef;
 
-import '../builder/function_type_builder.dart';
 import '../builder/library_builder.dart';
 import '../builder/metadata_builder.dart';
 import '../builder/type_alias_builder.dart';
@@ -15,9 +15,13 @@
 
 import '../problems.dart' show unimplemented;
 
+import 'dill_class_builder.dart' show computeTypeVariableBuilders;
 import 'dill_library_builder.dart' show DillLibraryBuilder;
 
 class DillTypeAliasBuilder extends TypeAliasBuilder {
+  List<TypeVariableBuilder> _typeVariables;
+  TypeBuilder _type;
+
   DillTypeAliasBuilder(Typedef typedef, DillLibraryBuilder parent)
       : super(null, typedef.name, null, null, parent, typedef.fileOffset,
             typedef: typedef);
@@ -27,7 +31,11 @@
   }
 
   List<TypeVariableBuilder> get typeVariables {
-    return unimplemented("typeVariables", -1, null);
+    if (_typeVariables == null && typedef.typeParameters.isNotEmpty) {
+      _typeVariables =
+          computeTypeVariableBuilders(library, typedef.typeParameters);
+    }
+    return _typeVariables;
   }
 
   int varianceAt(int index) {
@@ -40,8 +48,11 @@
   int get typeVariablesCount => typedef.typeParameters.length;
 
   @override
-  FunctionTypeBuilder get type {
-    return unimplemented("type", -1, null);
+  TypeBuilder get type {
+    if (_type == null && typedef.type is! InvalidType) {
+      _type = library.loader.computeTypeBuilder(typedef.type);
+    }
+    return _type;
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart b/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
index 2d362e8..239e403 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
@@ -21,8 +21,10 @@
         Library,
         NamedType,
         NeverType,
+        TreeNode,
         TypeParameter,
         TypeParameterType,
+        Typedef,
         TypedefType,
         VoidType;
 
@@ -143,8 +145,13 @@
 
   TypeBuilder visitTypeParameterType(TypeParameterType node) {
     TypeParameter parameter = node.parameter;
-    Class kernelClass = parameter.parent;
-    Library kernelLibrary = kernelClass.enclosingLibrary;
+    TreeNode kernelClassOrTypeDef = parameter.parent;
+    Library kernelLibrary;
+    if (kernelClassOrTypeDef is Class) {
+      kernelLibrary = kernelClassOrTypeDef.enclosingLibrary;
+    } else if (kernelClassOrTypeDef is Typedef) {
+      kernelLibrary = kernelClassOrTypeDef.enclosingLibrary;
+    }
     LibraryBuilder library = loader.builders[kernelLibrary.importUri];
     return new NamedTypeBuilder(parameter.name,
         new NullabilityBuilder.fromNullability(node.nullability), null)
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index 73e86ee..e6f10d1 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -12,18 +12,29 @@
   kernel: 0.3.29
   package_config:
     path: ../../third_party/pkg_tested/package_config/
-  meta: ^1.0.2
 dev_dependencies:
   analyzer: 0.39.1
   args: '>=0.13.0 <2.0.0'
+  async_helper:
+    path: ../async_helper
   build_integration:
     path: ../build_integration
+  compiler:
+    path: ../compiler
   dart_style: '^1.0.7'
+  dev_compiler:
+    path: ../dev_compiler
+  expect:
+    path: ../expect
   json_rpc_2: ^2.0.9
   path: '^1.3.9'
   test: ^1.3.4
+  testing:
+    path: ../testing
   test_reflective_loader: ^0.1.0
-  web_socket_channel: ^1.0.4
-  yaml: '^2.1.12'
+  vm:
+    path: ../vm
   vm_service:
     path: ../vm_service
+  web_socket_channel: ^1.0.4
+  yaml: '^2.1.12'
diff --git a/pkg/front_end/test/whole_program_test.dart b/pkg/front_end/test/whole_program_test.dart
deleted file mode 100644
index f9c2d2f..0000000
--- a/pkg/front_end/test/whole_program_test.dart
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2017, 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' show Future;
-import 'dart:io' show Directory, File, Platform;
-
-import 'package:async_helper/async_helper.dart' show asyncEnd, asyncStart;
-import 'package:testing/testing.dart' show StdioProcess;
-
-import 'package:front_end/src/compute_platform_binaries_location.dart'
-    show computePlatformBinariesLocation;
-
-final Uri compiler = Uri.base.resolve('pkg/front_end/tool/_fasta/compile.dart');
-
-final Uri transform = Uri.base.resolve('pkg/kernel/bin/transform.dart');
-final Uri dump = Uri.base.resolve('pkg/kernel/bin/dump.dart');
-
-final Uri packagesFile = Uri.base.resolve('.packages');
-
-final Uri dartVm =
-    Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
-
-Future main() async {
-  asyncStart();
-  final Directory tmp = await Directory.systemTemp.createTemp('whole_program');
-  final Uri dartFile = tmp.uri.resolve('hello.dart');
-  final Uri dillFile = tmp.uri.resolve('hello.dart.dill');
-  final Uri constantsDillFile = tmp.uri.resolve('hello.dart.constants.dill');
-  final Uri constantsDillTxtFile =
-      tmp.uri.resolve('hello.dart.constants.dill.txt');
-
-  // Write the hello world file.
-  await new File(dartFile.toFilePath()).writeAsString('''
-        // Ensure we import a big program!
-        import 'package:compiler/src/dart2js.dart';
-        import 'package:front_end/src/fasta/kernel/kernel_target.dart';
-
-        void main() => print('hello world!');
-      ''');
-
-  try {
-    await runCompiler(dartFile, dillFile);
-    await transformDillFile(dillFile, constantsDillFile);
-    await dumpDillFile(constantsDillFile, constantsDillTxtFile);
-    await runHelloWorld(constantsDillFile);
-  } finally {
-    await tmp.delete(recursive: true);
-  }
-  asyncEnd();
-}
-
-Future runCompiler(Uri input, Uri output) async {
-  final Uri platformDill = computePlatformBinariesLocation(forceBuildDir: true)
-      .resolve("vm_platform_strong.dill");
-
-  final List<String> arguments = <String>[
-    '--packages=${packagesFile.toFilePath()}',
-    '-c',
-    compiler.toFilePath(),
-    '--platform=${platformDill.toFilePath()}',
-    '--output=${output.toFilePath()}',
-    '--packages=${packagesFile.toFilePath()}',
-    '--verify',
-    input.toFilePath(),
-  ];
-  await run('Compilation of hello.dart', arguments);
-}
-
-Future transformDillFile(Uri from, Uri to) async {
-  final List<String> arguments = <String>[
-    transform.toFilePath(),
-    '-f',
-    'bin',
-    '-t',
-    'constants',
-    '-o',
-    to.toFilePath(),
-    from.toFilePath(),
-  ];
-  await run('Transforming $from --to--> $to', arguments);
-}
-
-Future dumpDillFile(Uri dillFile, Uri txtFile) async {
-  final List<String> arguments = <String>[
-    dump.toFilePath(),
-    dillFile.toFilePath(),
-    txtFile.toFilePath(),
-  ];
-  await run('Dumping $dillFile --to--> $txtFile', arguments);
-}
-
-Future runHelloWorld(Uri dillFile) async {
-  final List<String> arguments = <String>[dillFile.toFilePath()];
-  await run('Running hello.dart', arguments, 'hello world!\n');
-}
-
-Future run(String message, List<String> arguments,
-    [String expectedOutput]) async {
-  final Stopwatch sw = new Stopwatch()..start();
-  print('Running:\n    ${dartVm.toFilePath()} ${arguments.join(' ')}');
-  StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments,
-      timeout: const Duration(seconds: 120));
-  print('Output:\n    ${result.output.replaceAll('\n', '    \n')}');
-  print('ExitCode: ${result.exitCode}');
-  print('Took:     ${sw.elapsed}\n\n');
-
-  if ((expectedOutput != null && result.output != expectedOutput) ||
-      result.exitCode != 0) {
-    throw '$message failed.';
-  }
-}
diff --git a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
index 5ce34ec..92e7dbc 100644
--- a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
+++ b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 
-import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix;
+import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix hide Extension;
 
 static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.expect b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.expect
index 8fe4a36..310c8c4 100644
--- a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.expect
+++ b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.expect
@@ -3,7 +3,7 @@
 import "deferred_explicit_access_lib.dart" as def;
 import "dart:core" as core;
 
-import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix;
+import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix hide Extension;
 
 static method main() → dynamic async {
   await LoadLibrary(prefix);
diff --git a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.transformed.expect
index de913ab..25a9778 100644
--- a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 import "deferred_explicit_access_lib.dart" as def;
 
-import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix;
+import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix hide Extension;
 
 static method main() → dynamic /* originally async */ {
   final asy::_AsyncAwaitCompleter<dynamic>* :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
diff --git a/pkg/front_end/testcases/extensions/export_twice.dart.outline.expect b/pkg/front_end/testcases/extensions/export_twice.dart.outline.expect
index 6f8ff7f..1ee21db 100644
--- a/pkg/front_end/testcases/extensions/export_twice.dart.outline.expect
+++ b/pkg/front_end/testcases/extensions/export_twice.dart.outline.expect
@@ -39,4 +39,4 @@
 import "export_twice_lib1.dart" as self2;
 additionalExports = (self2::Extension)
 
-export "org-dartlang-testcase:///export_twice_lib1.dart";
+export "org-dartlang-testcase:///export_twice_lib1.dart" show Extension;
diff --git a/pkg/front_end/testcases/extensions/export_twice.dart.strong.expect b/pkg/front_end/testcases/extensions/export_twice.dart.strong.expect
index e256633..bc0e513 100644
--- a/pkg/front_end/testcases/extensions/export_twice.dart.strong.expect
+++ b/pkg/front_end/testcases/extensions/export_twice.dart.strong.expect
@@ -41,4 +41,4 @@
 import "export_twice_lib1.dart" as exp;
 additionalExports = (exp::Extension)
 
-export "org-dartlang-testcase:///export_twice_lib1.dart";
+export "org-dartlang-testcase:///export_twice_lib1.dart" show Extension;
diff --git a/pkg/front_end/testcases/extensions/export_twice.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/export_twice.dart.strong.transformed.expect
index e256633..bc0e513 100644
--- a/pkg/front_end/testcases/extensions/export_twice.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extensions/export_twice.dart.strong.transformed.expect
@@ -41,4 +41,4 @@
 import "export_twice_lib1.dart" as exp;
 additionalExports = (exp::Extension)
 
-export "org-dartlang-testcase:///export_twice_lib1.dart";
+export "org-dartlang-testcase:///export_twice_lib1.dart" show Extension;
diff --git a/pkg/front_end/testcases/general/ambiguous_exports.dart.outline.expect b/pkg/front_end/testcases/general/ambiguous_exports.dart.outline.expect
index 2a2b570..1c4f96d 100644
--- a/pkg/front_end/testcases/general/ambiguous_exports.dart.outline.expect
+++ b/pkg/front_end/testcases/general/ambiguous_exports.dart.outline.expect
@@ -8,8 +8,8 @@
 //
 import self as self;
 
-export "org-dartlang-testcase:///hello.dart";
-export "org-dartlang-testcase:///map.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
+export "org-dartlang-testcase:///map.dart" show main;
 
 static const field dynamic _exports# = "{\"main\":\"'main' is exported from both 'pkg/front_end/testcases/general/hello.dart' and 'pkg/front_end/testcases/general/map.dart'.\"}" /* from null */;
 
diff --git a/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.expect b/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.expect
index 530c1e4..3937612f 100644
--- a/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.expect
+++ b/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.expect
@@ -9,8 +9,8 @@
 import self as self;
 import "dart:core" as core;
 
-export "org-dartlang-testcase:///hello.dart";
-export "org-dartlang-testcase:///map.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
+export "org-dartlang-testcase:///map.dart" show main;
 
 static const field dynamic _exports# = #C1 /* from null */;
 
diff --git a/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.transformed.expect
index 530c1e4..3937612f 100644
--- a/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/ambiguous_exports.dart.strong.transformed.expect
@@ -9,8 +9,8 @@
 import self as self;
 import "dart:core" as core;
 
-export "org-dartlang-testcase:///hello.dart";
-export "org-dartlang-testcase:///map.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
+export "org-dartlang-testcase:///map.dart" show main;
 
 static const field dynamic _exports# = #C1 /* from null */;
 
diff --git a/pkg/front_end/testcases/general/dynamic_and_void.dart.outline.expect b/pkg/front_end/testcases/general/dynamic_and_void.dart.outline.expect
index 948418a..81787a7 100644
--- a/pkg/front_end/testcases/general/dynamic_and_void.dart.outline.expect
+++ b/pkg/front_end/testcases/general/dynamic_and_void.dart.outline.expect
@@ -8,7 +8,7 @@
 //
 import self as self;
 
-import "dart:core";
+import "dart:core" show int;
 
 static method testDynamic() → invalid-type
   ;
diff --git a/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.expect b/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.expect
index 2bac3e8..c400faa 100644
--- a/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.expect
+++ b/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.expect
@@ -8,7 +8,7 @@
 //
 import self as self;
 
-import "dart:core";
+import "dart:core" show int;
 
 static method testDynamic() → invalid-type
   return 0;
diff --git a/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.transformed.expect b/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.transformed.expect
index 2bac3e8..c400faa 100644
--- a/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/dynamic_and_void.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
 //
 import self as self;
 
-import "dart:core";
+import "dart:core" show int;
 
 static method testDynamic() → invalid-type
   return 0;
diff --git a/pkg/front_end/testcases/general/export_main.dart.outline.expect b/pkg/front_end/testcases/general/export_main.dart.outline.expect
index f618c7c..a6d3627 100644
--- a/pkg/front_end/testcases/general/export_main.dart.outline.expect
+++ b/pkg/front_end/testcases/general/export_main.dart.outline.expect
@@ -3,7 +3,7 @@
 import "hello.dart" as hel;
 additionalExports = (hel::main)
 
-export "org-dartlang-testcase:///hello.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
 
 
 library;
diff --git a/pkg/front_end/testcases/general/export_main.dart.strong.expect b/pkg/front_end/testcases/general/export_main.dart.strong.expect
index 2b405e0..94479f0 100644
--- a/pkg/front_end/testcases/general/export_main.dart.strong.expect
+++ b/pkg/front_end/testcases/general/export_main.dart.strong.expect
@@ -3,7 +3,7 @@
 import "hello.dart" as hel;
 additionalExports = (hel::main)
 
-export "org-dartlang-testcase:///hello.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
 
 
 library;
diff --git a/pkg/front_end/testcases/general/export_main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/export_main.dart.strong.transformed.expect
index 2b405e0..94479f0 100644
--- a/pkg/front_end/testcases/general/export_main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/export_main.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "hello.dart" as hel;
 additionalExports = (hel::main)
 
-export "org-dartlang-testcase:///hello.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
 
 
 library;
diff --git a/pkg/front_end/testcases/general/export_test.dart.outline.expect b/pkg/front_end/testcases/general/export_test.dart.outline.expect
index f2dbda1..464a785 100644
--- a/pkg/front_end/testcases/general/export_test.dart.outline.expect
+++ b/pkg/front_end/testcases/general/export_test.dart.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 additionalExports = (core::print)
 
-import "dart:developer";
-export "dart:core";
+import "dart:developer" show UserTag;
+export "dart:core" show print;
 
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/export_test.dart.strong.expect b/pkg/front_end/testcases/general/export_test.dart.strong.expect
index 21a39a9..8dbe328 100644
--- a/pkg/front_end/testcases/general/export_test.dart.strong.expect
+++ b/pkg/front_end/testcases/general/export_test.dart.strong.expect
@@ -4,8 +4,8 @@
 import "dart:developer" as dev;
 additionalExports = (core::print)
 
-import "dart:developer";
-export "dart:core";
+import "dart:developer" show UserTag;
+export "dart:core" show print;
 
 static method main() → dynamic {
   core::print(dev::UserTag*);
diff --git a/pkg/front_end/testcases/general/export_test.dart.strong.transformed.expect b/pkg/front_end/testcases/general/export_test.dart.strong.transformed.expect
index 21a39a9..8dbe328 100644
--- a/pkg/front_end/testcases/general/export_test.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/export_test.dart.strong.transformed.expect
@@ -4,8 +4,8 @@
 import "dart:developer" as dev;
 additionalExports = (core::print)
 
-import "dart:developer";
-export "dart:core";
+import "dart:developer" show UserTag;
+export "dart:core" show print;
 
 static method main() → dynamic {
   core::print(dev::UserTag*);
diff --git a/pkg/front_end/testcases/general/function_type_is_check.dart.outline.expect b/pkg/front_end/testcases/general/function_type_is_check.dart.outline.expect
index 8278f14..f49d6de 100644
--- a/pkg/front_end/testcases/general/function_type_is_check.dart.outline.expect
+++ b/pkg/front_end/testcases/general/function_type_is_check.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 
-import "package:expect/expect.dart";
+import "package:expect/expect.dart" show Expect;
 
 static method test(dynamic f) → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/function_type_is_check.dart.strong.expect b/pkg/front_end/testcases/general/function_type_is_check.dart.strong.expect
index e3d7cfb..9279097 100644
--- a/pkg/front_end/testcases/general/function_type_is_check.dart.strong.expect
+++ b/pkg/front_end/testcases/general/function_type_is_check.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "package:expect/expect.dart" as exp;
 
-import "package:expect/expect.dart";
+import "package:expect/expect.dart" show Expect;
 
 static method test(dynamic f) → dynamic {
   if(f is (core::Object*, core::StackTrace*) →* void)
diff --git a/pkg/front_end/testcases/general/function_type_is_check.dart.strong.transformed.expect b/pkg/front_end/testcases/general/function_type_is_check.dart.strong.transformed.expect
index e3d7cfb..9279097 100644
--- a/pkg/front_end/testcases/general/function_type_is_check.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/function_type_is_check.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "package:expect/expect.dart" as exp;
 
-import "package:expect/expect.dart";
+import "package:expect/expect.dart" show Expect;
 
 static method test(dynamic f) → dynamic {
   if(f is (core::Object*, core::StackTrace*) →* void)
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart
new file mode 100644
index 0000000..fe9d179
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart
@@ -0,0 +1,10 @@
+// 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 "issue_43084_lib.dart";
+
+main() {
+  Bar<int> x = new Bar<int>();
+  print(x);
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.outline.expect
new file mode 100644
index 0000000..0cd02ea
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.outline.expect
@@ -0,0 +1,34 @@
+library;
+import self as self;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic
+  ;
+
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart:8:16: Error: Can't create typedef from non-function type.
+// typedef Bar<X> = Foo<X>;
+//                ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef Bar<unrelated X extends core::Object* = dynamic> = invalid-type;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → self2::Foo<self2::Foo::X*>*
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.expect
new file mode 100644
index 0000000..b1470cf
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.expect
@@ -0,0 +1,47 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart:8:20: Error: Method not found: 'Bar'.
+//   Bar<int> x = new Bar<int>();
+//                    ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  invalid-type x = invalid-expression "pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart:8:20: Error: Method not found: 'Bar'.
+  Bar<int> x = new Bar<int>();
+                   ^^^";
+  core::print(x);
+}
+
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart:8:16: Error: Can't create typedef from non-function type.
+// typedef Bar<X> = Foo<X>;
+//                ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef Bar<unrelated X extends core::Object* = dynamic> = invalid-type;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → self2::Foo<self2::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.transformed.expect
new file mode 100644
index 0000000..b1470cf
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.strong.transformed.expect
@@ -0,0 +1,47 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart:8:20: Error: Method not found: 'Bar'.
+//   Bar<int> x = new Bar<int>();
+//                    ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  invalid-type x = invalid-expression "pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart:8:20: Error: Method not found: 'Bar'.
+  Bar<int> x = new Bar<int>();
+                   ^^^";
+  core::print(x);
+}
+
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart:8:16: Error: Can't create typedef from non-function type.
+// typedef Bar<X> = Foo<X>;
+//                ^
+//
+import self as self2;
+import "dart:core" as core;
+
+typedef Bar<unrelated X extends core::Object* = dynamic> = invalid-type;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → self2::Foo<self2::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline.expect
new file mode 100644
index 0000000..6d40493
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import "issue_43084_lib.dart";
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6d40493
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import "issue_43084_lib.dart";
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart
new file mode 100644
index 0000000..75163af
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/issue_43084_lib.dart
@@ -0,0 +1,8 @@
+// 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.
+
+class Foo<X> {
+}
+
+typedef Bar<X> = Foo<X>;
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084/link.options b/pkg/front_end/testcases/general/with_dependencies/issue_43084/link.options
new file mode 100644
index 0000000..2511162
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084/link.options
@@ -0,0 +1 @@
+issue_43084_lib.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart
new file mode 100644
index 0000000..b4a113d
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart
@@ -0,0 +1,11 @@
+// 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 "issue_43084_lib.dart";
+
+test() {
+  F();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.outline.expect
new file mode 100644
index 0000000..8451c8931
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.outline.expect
@@ -0,0 +1,14 @@
+library;
+import self as self;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
+
+library;
+import self as self2;
+
+typedef F = () →* dynamic;
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.expect
new file mode 100644
index 0000000..89ab050
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.expect
@@ -0,0 +1,23 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart:8:3: Error: Method not found: 'F'.
+//   F();
+//   ^
+//
+import self as self;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method test() → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart:8:3: Error: Method not found: 'F'.
+  F();
+  ^";
+}
+static method main() → dynamic {}
+
+library;
+import self as self2;
+
+typedef F = () →* dynamic;
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.transformed.expect
new file mode 100644
index 0000000..89ab050
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.strong.transformed.expect
@@ -0,0 +1,23 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart:8:3: Error: Method not found: 'F'.
+//   F();
+//   ^
+//
+import self as self;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method test() → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart:8:3: Error: Method not found: 'F'.
+  F();
+  ^";
+}
+static method main() → dynamic {}
+
+library;
+import self as self2;
+
+typedef F = () →* dynamic;
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline.expect
new file mode 100644
index 0000000..14d741d
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+import "issue_43084_lib.dart";
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..ce7dcd7
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+import "issue_43084_lib.dart";
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084_lib.dart b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084_lib.dart
new file mode 100644
index 0000000..43f8523
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/issue_43084_lib.dart
@@ -0,0 +1,5 @@
+// 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.
+
+typedef F = Function();
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/link.options b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/link.options
new file mode 100644
index 0000000..2511162
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/issue_43084_2/link.options
@@ -0,0 +1 @@
+issue_43084_lib.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.expect
index 8e8305d..7c1f015 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.expect
@@ -9,8 +9,8 @@
 import self as self;
 import "dart:core" as core;
 
-export "org-dartlang-testcase:///hello.dart";
-export "org-dartlang-testcase:///map.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
+export "org-dartlang-testcase:///map.dart" show main;
 
 static const field dynamic _exports# = #C1 /* from null */;
 
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.transformed.expect
index 8e8305d..7c1f015 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/ambiguous_exports.dart.weak.transformed.expect
@@ -9,8 +9,8 @@
 import self as self;
 import "dart:core" as core;
 
-export "org-dartlang-testcase:///hello.dart";
-export "org-dartlang-testcase:///map.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
+export "org-dartlang-testcase:///map.dart" show main;
 
 static const field dynamic _exports# = #C1 /* from null */;
 
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.expect
index 87aef8c..b52bd15 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.expect
@@ -8,7 +8,7 @@
 //
 import self as self;
 
-import "dart:core";
+import "dart:core" show int;
 
 static method testDynamic() → invalid-type
   return 0;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.transformed.expect
index 87aef8c..b52bd15 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/dynamic_and_void.dart.weak.transformed.expect
@@ -8,7 +8,7 @@
 //
 import self as self;
 
-import "dart:core";
+import "dart:core" show int;
 
 static method testDynamic() → invalid-type
   return 0;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.expect
index 2b405e0..94479f0 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.expect
@@ -3,7 +3,7 @@
 import "hello.dart" as hel;
 additionalExports = (hel::main)
 
-export "org-dartlang-testcase:///hello.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
 
 
 library;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.transformed.expect
index 2b405e0..94479f0 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/export_main.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "hello.dart" as hel;
 additionalExports = (hel::main)
 
-export "org-dartlang-testcase:///hello.dart";
+export "org-dartlang-testcase:///hello.dart" show main;
 
 
 library;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.expect
index 21a39a9..8dbe328 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.expect
@@ -4,8 +4,8 @@
 import "dart:developer" as dev;
 additionalExports = (core::print)
 
-import "dart:developer";
-export "dart:core";
+import "dart:developer" show UserTag;
+export "dart:core" show print;
 
 static method main() → dynamic {
   core::print(dev::UserTag*);
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.transformed.expect
index 21a39a9..8dbe328 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/export_test.dart.weak.transformed.expect
@@ -4,8 +4,8 @@
 import "dart:developer" as dev;
 additionalExports = (core::print)
 
-import "dart:developer";
-export "dart:core";
+import "dart:developer" show UserTag;
+export "dart:core" show print;
 
 static method main() → dynamic {
   core::print(dev::UserTag*);
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.expect
index e3d7cfb..9279097 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "package:expect/expect.dart" as exp;
 
-import "package:expect/expect.dart";
+import "package:expect/expect.dart" show Expect;
 
 static method test(dynamic f) → dynamic {
   if(f is (core::Object*, core::StackTrace*) →* void)
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.transformed.expect
index e3d7cfb..9279097 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/function_type_is_check.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "package:expect/expect.dart" as exp;
 
-import "package:expect/expect.dart";
+import "package:expect/expect.dart" show Expect;
 
 static method test(dynamic f) → dynamic {
   if(f is (core::Object*, core::StackTrace*) →* void)
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules_4.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules_4.yaml.world.1.expect
index cd00e2f..b716fc7 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules_4.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules_4.yaml.world.1.expect
@@ -10,7 +10,7 @@
 additionalExports = (c::baz)
 
   import "package:moduleC/c.dart";
-  export "package:moduleC/c.dart";
+  export "package:moduleC/c.dart" show baz;
 
   class A2 extends c::A3 {
     field dart.core::int* bar = 42;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.1.expect
index dd112fb..1ae755a 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.1.expect
@@ -20,8 +20,8 @@
 // ^
 //
 
-  export "org-dartlang-test:///lib1.dart";
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib1.dart" show x;
+  export "org-dartlang-test:///lib2.dart" show x;
 
   static const field dynamic _exports# = #C1 /* from null */;
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.2.expect
index d8da84c..0b5ae77 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_exports_hash.yaml.world.2.expect
@@ -20,8 +20,8 @@
 // ^
 //
 
-  export "org-dartlang-test:///lib1.dart";
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib1.dart" show x;
+  export "org-dartlang-test:///lib2.dart" show x;
 
   static const field dynamic _exports# = #C1 /* from null */;
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.1.expect
index c65bce5..a3e602c 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.1.expect
@@ -38,8 +38,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show Bar;
+  import "org-dartlang-test:///lib1.dart" show Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.2.expect
index a0dc281c..aca89a6 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.2.expect
@@ -40,8 +40,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show Bar;
+  import "org-dartlang-test:///lib1.dart" show Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.3.expect
index c32ae9e..0a39b64 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.3.expect
@@ -42,8 +42,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show Bar;
+  import "org-dartlang-test:///lib1.dart" show Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.4.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.4.expect
index 7db3d1c..e094142 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.4.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_12.yaml.world.4.expect
@@ -42,8 +42,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show Bar;
+  import "org-dartlang-test:///lib1.dart" show Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.1.expect
index ef0bc9c..4a4a746 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.1.expect
@@ -2,7 +2,7 @@
 library from "org-dartlang-test:///lib1.dart" as lib1 {
 additionalExports = (lib2::Foo)
 
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib2.dart" show Foo;
   import "org-dartlang-test:///main.dart";
 
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.2.expect
index e907839..50f5bf9 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_13.yaml.world.2.expect
@@ -2,7 +2,7 @@
 library from "org-dartlang-test:///lib1.dart" as lib1 {
 additionalExports = (lib2::Foo)
 
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib2.dart" show Foo;
   import "org-dartlang-test:///main.dart";
 
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.1.expect
index e45b14d..ab18cd4 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.1.expect
@@ -24,8 +24,8 @@
 //                  ^
 //
 
-  export "org-dartlang-test:///lib1.dart";
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib1.dart" show x;
+  export "org-dartlang-test:///lib2.dart" show x;
 
   static const field dynamic _exports# = #C1 /* from null */;
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.2.expect
index cc76710..5bf4d8d 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_18.yaml.world.2.expect
@@ -24,8 +24,8 @@
 //                   ^
 //
 
-  export "org-dartlang-test:///lib1.dart";
-  export "org-dartlang-test:///lib2.dart";
+  export "org-dartlang-test:///lib1.dart" show x;
+  export "org-dartlang-test:///lib2.dart" show x;
 
   static const field dynamic _exports# = #C1 /* from null */;
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
index 1410f0a..93245f5 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
@@ -1,7 +1,7 @@
 main = <No Member>;
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "dart:collection";
+  import "dart:collection" show ListMixin;
 
   abstract class _WithListMixin&Object&ListMixin extends dart.core::Object implements dart.collection::ListMixin<dart.core::int*> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
     const synthetic constructor •() → main::_WithListMixin&Object&ListMixin*
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
index 1410f0a..93245f5 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
@@ -1,7 +1,7 @@
 main = <No Member>;
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "dart:collection";
+  import "dart:collection" show ListMixin;
 
   abstract class _WithListMixin&Object&ListMixin extends dart.core::Object implements dart.collection::ListMixin<dart.core::int*> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
     const synthetic constructor •() → main::_WithListMixin&Object&ListMixin*
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.1.expect
index 40377a4..6292ffe 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.1.expect
@@ -45,8 +45,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show getter, setter, method, Bar;
+  import "org-dartlang-test:///lib1.dart" show getter, setter, method, Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.2.expect
index 525c5d8..4c90325 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.2.expect
@@ -47,8 +47,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show getter, setter, method, Bar;
+  import "org-dartlang-test:///lib1.dart" show getter, setter, method, Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.3.expect
index 6e1611e..9f587ac 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.3.expect
@@ -49,8 +49,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show getter, setter, method, Bar;
+  import "org-dartlang-test:///lib1.dart" show getter, setter, method, Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.4.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.4.expect
index ab38c4f..566f811 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.4.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_33.yaml.world.4.expect
@@ -49,8 +49,8 @@
 }
 library from "org-dartlang-test:///main.dart" as main {
 
-  import "org-dartlang-test:///lib2.dart";
-  import "org-dartlang-test:///lib1.dart";
+  import "org-dartlang-test:///lib2.dart" show getter, setter, method, Bar;
+  import "org-dartlang-test:///lib1.dart" show getter, setter, method, Bar;
 
   static method main() → dynamic {
     lib2::Bar* bar = new lib2::Bar::•();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.outline.expect
index 49da2ef..8394d5c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.outline.expect
@@ -2,7 +2,7 @@
 import self as self;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.expect
index 3145b1c..4637a4f 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* async {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
index a5d1dcd..f140096 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* /* originally async */ {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.outline.expect
index 49da2ef..8394d5c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.outline.expect
@@ -2,7 +2,7 @@
 import self as self;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.expect
index 4e5afa1..99817a4 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* async {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
index bd71f4d..50d95e7 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* /* originally async */ {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.outline.expect
index 49da2ef..8394d5c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.outline.expect
@@ -2,7 +2,7 @@
 import self as self;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.expect
index a42adca..8bc9037 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* async {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
index d2c6c6f..d86bf2b 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:math" as math;
 
 import "dart:async";
-import "dart:math";
+import "dart:math" show Random;
 
 static method test() → dynamic {
   () →* asy::Future<core::num*>* f = () → asy::Future<core::num*>* /* originally async */ {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.outline.expect
index 0a623d0..e333c02 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.outline.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 
-import "dart:math";
+import "dart:math" show Random;
 
 static method test2() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.expect
index 661f9a5..3f5499c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "dart:math" as math;
 
-import "dart:math";
+import "dart:math" show Random;
 
 static method test2() → dynamic {
   core::List<core::num*>* o;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.transformed.expect
index 661f9a5..3f5499c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_lub.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "dart:math" as math;
 
-import "dart:math";
+import "dart:math" show Random;
 
 static method test2() → dynamic {
   core::List<core::num*>* o;
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.outline.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.outline.expect
index b284c39..4f1f11c 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 import "dart:math" as math;
-import "dart:math";
+import "dart:math" show min;
 
 class C extends core::Object {
   synthetic constructor •() → self::C*
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.expect
index c7d2928..258cc6e 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.expect
@@ -30,7 +30,7 @@
 import "dart:core" as core;
 
 import "dart:math" as math;
-import "dart:math";
+import "dart:math" show min;
 
 class C extends core::Object {
   synthetic constructor •() → self::C*
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.transformed.expect
index c7d2928..258cc6e 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.strong.transformed.expect
@@ -30,7 +30,7 @@
 import "dart:core" as core;
 
 import "dart:math" as math;
-import "dart:math";
+import "dart:math" show min;
 
 class C extends core::Object {
   synthetic constructor •() → self::C*
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.outline.expect b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.outline.expect
index f702343..e2d9cb9 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.outline.expect
@@ -15,7 +15,7 @@
 //
 import self as self;
 
-import "dart:_foreign_helper";
+import "dart:_foreign_helper" show JS;
 
 static method test() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.expect
index e9116be..4b1c3d6 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.expect
@@ -24,7 +24,7 @@
 import self as self;
 import "dart:core" as core;
 
-import "dart:_foreign_helper";
+import "dart:_foreign_helper" show JS;
 
 static method test() → dynamic {
   core::String* x = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart:12:14: Error: Method not found: 'JS'.
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.transformed.expect
index 6e03570..59da75c 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
 import self as self;
 import "dart:core" as core;
 
-import "dart:_foreign_helper";
+import "dart:_foreign_helper" show JS;
 
 static method test() → dynamic {
   core::String* x = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart:12:14: Error: Method not found: 'JS'.
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.outline.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.outline.expect
index c10c25d..af46292 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 import "infer_statics_transitively3_a.dart" as inf;
 
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" show a1, A;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p show a2, A;
 
 static const field core::int* t1 = 1;
 static const field core::int* t2 = self::t1;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
index 1536a22..0f736d7 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
@@ -2,8 +2,8 @@
 import self as self;
 import "dart:core" as core;
 
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" show a1, A;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p show a2, A;
 
 static const field core::int* t1 = #C1;
 static const field core::int* t2 = #C1;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
index 1536a22..0f736d7 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
@@ -2,8 +2,8 @@
 import self as self;
 import "dart:core" as core;
 
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
-import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" show a1, A;
+import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p show a2, A;
 
 static const field core::int* t1 = #C1;
 static const field core::int* t2 = #C1;
diff --git a/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.expect
index f7c8a67..a081994 100644
--- a/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.expect
@@ -42,13 +42,13 @@
   exp4::NnbdClass2)
 
 export "org-dartlang-testcase:///export_from_opt_out_lib1.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib2.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
+export "org-dartlang-testcase:///export_from_opt_out_lib2.dart" hide legacyMethod2;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyClass2;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show legacyMethod1;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyExtension;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyTypedef;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show NnbdClass1;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" hide LegacyClass2, LegacyExtension, LegacyTypedef, legacyMethod1;
 export "org-dartlang-testcase:///export_from_opt_out_lib4.dart";
 export "org-dartlang-testcase:///export_from_opt_out_lib5.dart";
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.transformed.expect
index f7c8a67..a081994 100644
--- a/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/export_from_opt_out.dart.weak.transformed.expect
@@ -42,13 +42,13 @@
   exp4::NnbdClass2)
 
 export "org-dartlang-testcase:///export_from_opt_out_lib1.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib2.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
-export "org-dartlang-testcase:///export_from_opt_out_lib3.dart";
+export "org-dartlang-testcase:///export_from_opt_out_lib2.dart" hide legacyMethod2;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyClass2;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show legacyMethod1;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyExtension;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show LegacyTypedef;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" show NnbdClass1;
+export "org-dartlang-testcase:///export_from_opt_out_lib3.dart" hide LegacyClass2, LegacyExtension, LegacyTypedef, legacyMethod1;
 export "org-dartlang-testcase:///export_from_opt_out_lib4.dart";
 export "org-dartlang-testcase:///export_from_opt_out_lib5.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
index 23cfc21..67632eb 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "private_module.dart" as pri;
 
-import "org-dartlang-testcase:///private_module.dart";
+import "org-dartlang-testcase:///private_module.dart" show Fisk;
 
 abstract class Foo extends core::Object {
   synthetic constructor •() → self::Foo*
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
index 538524e..6a52850 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "private_module.dart" as pri;
 
-import "org-dartlang-testcase:///private_module.dart";
+import "org-dartlang-testcase:///private_module.dart" show Fisk;
 
 abstract class Foo extends core::Object {
   synthetic constructor •() → self::Foo*
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
index 538524e..6a52850 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "private_module.dart" as pri;
 
-import "org-dartlang-testcase:///private_module.dart";
+import "org-dartlang-testcase:///private_module.dart" show Fisk;
 
 abstract class Foo extends core::Object {
   synthetic constructor •() → self::Foo*
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart
new file mode 100644
index 0000000..fe9d179
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart
@@ -0,0 +1,10 @@
+// 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 "issue_43084_lib.dart";
+
+main() {
+  Bar<int> x = new Bar<int>();
+  print(x);
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.outline.expect
new file mode 100644
index 0000000..796c6b3
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.outline.expect
@@ -0,0 +1,27 @@
+library;
+import self as self;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic
+  ;
+
+library;
+import self as self2;
+import "dart:core" as core;
+
+typedef Bar<X extends core::Object* = dynamic> = self2::Foo<X*>*;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → self2::Foo<self2::Foo::X*>*
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.expect
new file mode 100644
index 0000000..e216ebf
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.expect
@@ -0,0 +1,32 @@
+library;
+import self as self;
+import "issue_43084_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
+  core::print(x);
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Foo<iss::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.transformed.expect
new file mode 100644
index 0000000..e216ebf
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.strong.transformed.expect
@@ -0,0 +1,32 @@
+library;
+import self as self;
+import "issue_43084_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
+  core::print(x);
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Foo<iss::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline.expect
new file mode 100644
index 0000000..6d40493
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import "issue_43084_lib.dart";
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6d40493
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import "issue_43084_lib.dart";
+
+main() {}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.expect
new file mode 100644
index 0000000..e216ebf
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.expect
@@ -0,0 +1,32 @@
+library;
+import self as self;
+import "issue_43084_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
+  core::print(x);
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Foo<iss::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.transformed.expect b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.transformed.expect
new file mode 100644
index 0000000..e216ebf
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084.dart.weak.transformed.expect
@@ -0,0 +1,32 @@
+library;
+import self as self;
+import "issue_43084_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue_43084_lib.dart";
+
+static method main() → dynamic {
+  iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
+  core::print(x);
+}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
+class Foo<X extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Foo<iss::Foo::X*>*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084_lib.dart b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084_lib.dart
new file mode 100644
index 0000000..75163af
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/issue_43084_lib.dart
@@ -0,0 +1,8 @@
+// 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.
+
+class Foo<X> {
+}
+
+typedef Bar<X> = Foo<X>;
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/link.options b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/link.options
new file mode 100644
index 0000000..2511162
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/issue_43084/link.options
@@ -0,0 +1 @@
+issue_43084_lib.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/test.options b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/test.options
new file mode 100644
index 0000000..155ea76
--- /dev/null
+++ b/pkg/front_end/testcases/nonfunction_type_aliases_no_nnbd/test.options
@@ -0,0 +1 @@
+--enable-experiment=nonfunction-type-aliases
\ No newline at end of file
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
index ba92d00..4929577 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "mixin_library.dart" as mix;
 
-import "org-dartlang-testcase:///mixin_library.dart";
+import "org-dartlang-testcase:///mixin_library.dart" show Mixin;
 
 class Super<S extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::Super<self::Super::S*>*
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
index 3bc003d..8042da7 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 import "mixin_library.dart" as mix;
 
-import "org-dartlang-testcase:///mixin_library.dart";
+import "org-dartlang-testcase:///mixin_library.dart" show Mixin;
 
 class Super<S extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::Super<self::Super::S*>*
diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
index 2b3e31a..c6d6a98 100644
--- a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
+++ b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
@@ -4,8 +4,8 @@
 import "dart:core" as core;
 import "dart:collection" as col;
 
-import "dart:async";
-import "dart:collection";
+import "dart:async" show FutureOr;
+import "dart:collection" show LinkedHashMap, LinkedHashSet;
 
 static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.expect
index 151f50a..162d6c8 100644
--- a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.expect
+++ b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.expect
@@ -49,8 +49,8 @@
 import "dart:collection" as col;
 import "dart:async" as asy;
 
-import "dart:async";
-import "dart:collection";
+import "dart:async" show FutureOr;
+import "dart:collection" show LinkedHashMap, LinkedHashSet;
 
 static method main() → dynamic async {
   core::Map<core::int*, core::bool*>* m = <core::int*, core::bool*>{};
diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.transformed.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.transformed.expect
index cc7cfa2..f05acc0 100644
--- a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.strong.transformed.expect
@@ -50,8 +50,8 @@
 import "dart:collection" as col;
 import "dart:_internal" as _in;
 
-import "dart:async";
-import "dart:collection";
+import "dart:async" show FutureOr;
+import "dart:collection" show LinkedHashMap, LinkedHashSet;
 
 static method main() → dynamic /* originally async */ {
   final asy::_AsyncAwaitCompleter<dynamic>* :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 5fb1d61..88b85b8 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -94,6 +94,7 @@
 general/type_variable_bound_access: TypeCheckError
 general/unsound_promotion: TypeCheckError
 general/void_methods: RuntimeError
+general/with_dependencies/issue_43084/issue_43084: RuntimeError
 general_nnbd_opt_out/abstract_members: TypeCheckError
 general_nnbd_opt_out/accessors: RuntimeError
 general_nnbd_opt_out/ambiguous_exports: RuntimeError # Expected, this file exports two main methods.
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index ef32a53..5e35992 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -93,6 +93,7 @@
 general/type_variable_bound_access: TypeCheckError
 general/unsound_promotion: TypeCheckError
 general/void_methods: RuntimeError
+general/with_dependencies/issue_43084/issue_43084: RuntimeError
 general_nnbd_opt_out/abstract_members: TypeCheckError
 general_nnbd_opt_out/accessors: RuntimeError
 general_nnbd_opt_out/ambiguous_exports: RuntimeError
diff --git a/pkg/front_end/tool/fasta_perf.dart b/pkg/front_end/tool/fasta_perf.dart
index 89234b2..ecbe56d 100644
--- a/pkg/front_end/tool/fasta_perf.dart
+++ b/pkg/front_end/tool/fasta_perf.dart
@@ -218,7 +218,7 @@
 // bodies. So this listener is not feature complete.
 class _PartialAstBuilder extends AstBuilder {
   _PartialAstBuilder(Uri uri)
-      : super(null, null, true, FeatureSet.fromEnableFlags([]), uri);
+      : super(null, null, true, FeatureSet.latestLanguageVersion(), uri);
 }
 
 // Invoke the fasta kernel generator for the program starting in [entryUri]
diff --git a/pkg/front_end/tool/perf.dart b/pkg/front_end/tool/perf.dart
index 5804f9d..4f10f61 100644
--- a/pkg/front_end/tool/perf.dart
+++ b/pkg/front_end/tool/perf.dart
@@ -103,7 +103,7 @@
   var parser = new Parser(
     source,
     AnalysisErrorListener.NULL_LISTENER,
-    featureSet: FeatureSet.fromEnableFlags([]),
+    featureSet: FeatureSet.latestLanguageVersion(),
   );
   return parser.parseDirectives(token);
 }
@@ -127,7 +127,7 @@
   var parser = new Parser(
     source,
     AnalysisErrorListener.NULL_LISTENER,
-    featureSet: FeatureSet.fromEnableFlags([]),
+    featureSet: FeatureSet.latestLanguageVersion(),
   );
   var unit = parser.parseCompilationUnit(token);
   parseTimer.stop();
diff --git a/pkg/frontend_server/pubspec.yaml b/pkg/frontend_server/pubspec.yaml
index f682159..6f96f7e 100644
--- a/pkg/frontend_server/pubspec.yaml
+++ b/pkg/frontend_server/pubspec.yaml
@@ -7,16 +7,22 @@
   sdk: "^2.7.0"
 
 dependencies:
-  build_integration:
-    path: ../build_integration
-  vm:
-    path: ../vm
+  _fe_analyzer_shared:
+    path: ../_fe_analyzer_shared
+  args: ^1.4.4
   dev_compiler:
     path: ../dev_compiler
-  front_end: ^0.1.6
-  kernel: ^0.3.6
-  args: ^1.4.4
+  front_end:
+    path: ../front_end
+  kernel:
+    path: ../kernel
   package_config: ^1.9.0
+  path: any
+  usage: any
+  vm:
+    path: ../vm
 
 dev_dependencies:
+  cli_util: any
+  mockito: any
   test: any
diff --git a/pkg/js_ast/pubspec.yaml b/pkg/js_ast/pubspec.yaml
index 7349f57..7909c53 100644
--- a/pkg/js_ast/pubspec.yaml
+++ b/pkg/js_ast/pubspec.yaml
@@ -6,4 +6,6 @@
   sdk: '>=2.0.0 <3.0.0'
 
 dev_dependencies:
+  expect:
+    path: ../expect
   test: ^1.3.4
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
deleted file mode 100755
index 2b5aa60..0000000
--- a/pkg/kernel/bin/transform.dart
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2016, 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:io';
-
-import 'package:front_end/src/api_prototype/constant_evaluator.dart'
-    as constants show EvaluationMode, SimpleErrorReporter, transformComponent;
-
-import 'package:args/args.dart';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
-import 'package:kernel/src/tool/batch_util.dart';
-import 'package:kernel/target/targets.dart';
-
-import 'package:kernel/transformations/continuation.dart' as cont;
-import 'package:kernel/transformations/empty.dart' as empty;
-import 'package:kernel/transformations/value_class.dart' as valueClass;
-import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
-import 'package:kernel/type_environment.dart';
-import 'package:kernel/vm/constants_native_effects.dart';
-
-ArgParser parser = new ArgParser()
-  ..addOption('format',
-      abbr: 'f',
-      allowed: ['text', 'bin'],
-      defaultsTo: 'bin',
-      help: 'Output format.')
-  ..addOption('out', abbr: 'o', help: 'Output file.', defaultsTo: null)
-  ..addFlag('verbose',
-      abbr: 'v',
-      negatable: false,
-      help: 'Be verbose (e.g. prints transformed main library).',
-      defaultsTo: false)
-  ..addMultiOption('define', abbr: 'D', splitCommas: false)
-  ..addOption('transformation',
-      abbr: 't',
-      help: 'The transformation to apply.',
-      defaultsTo: 'continuation');
-
-main(List<String> arguments) async {
-  if (arguments.isNotEmpty && arguments[0] == '--batch') {
-    if (arguments.length != 1) {
-      throw '--batch cannot be used with other arguments';
-    }
-    await runBatch((arguments) => runTransformation(arguments));
-  } else {
-    CompilerOutcome outcome = await runTransformation(arguments);
-    exit(outcome == CompilerOutcome.Ok ? 0 : 1);
-  }
-}
-
-Future<CompilerOutcome> runTransformation(List<String> arguments) async {
-  ArgResults options = parser.parse(arguments);
-
-  if (options.rest.length != 1) {
-    throw 'Usage:\n${parser.usage}';
-  }
-
-  var input = options.rest.first;
-  var output = options['out'];
-  var format = options['format'];
-  var verbose = options['verbose'];
-
-  Map<String, String> defines = <String, String>{};
-  for (String define in options['define']) {
-    int index = define.indexOf('=');
-    String name;
-    String expression;
-    if (index != -1) {
-      name = define.substring(0, index);
-      expression = define.substring(index + 1);
-    } else {
-      name = define;
-      expression = define;
-    }
-    defines[name] = expression;
-  }
-
-  if (output == null) {
-    output = '${input.substring(0, input.lastIndexOf('.'))}.transformed.dill';
-  }
-
-  var component = loadComponentFromBinary(input);
-
-  final coreTypes = new CoreTypes(component);
-  final hierarchy = new ClassHierarchy(component, coreTypes);
-  final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
-  switch (options['transformation']) {
-    case 'continuation':
-      bool productMode = defines["dart.vm.product"] == "true";
-      component = cont.transformComponent(typeEnvironment, component,
-          productMode: productMode);
-      break;
-    case 'resolve-mixins':
-      mix.transformLibraries(new NoneTarget(null), coreTypes, hierarchy,
-          component.libraries, null);
-      break;
-    case 'constants':
-      final VmConstantsBackend backend = new VmConstantsBackend(coreTypes);
-      component = constants.transformComponent(component, backend, defines,
-          const constants.SimpleErrorReporter(), constants.EvaluationMode.weak,
-          desugarSets: false,
-          evaluateAnnotations: true,
-          enableTripleShift: false,
-          errorOnUnevaluatedConstant: false);
-      break;
-    case 'value-class':
-      component = valueClass.transformComponent(component);
-      break;
-    case 'empty':
-      component = empty.transformComponent(component);
-      break;
-    default:
-      throw 'Unknown transformation';
-  }
-
-  // TODO(30631): Fix the verifier so we can check that the transform produced
-  // valid output.
-  //
-  // verifyComponent(component);
-
-  if (format == 'text') {
-    writeComponentToText(component, path: output);
-  } else {
-    assert(format == 'bin');
-    await writeComponentToBinary(component, output);
-  }
-
-  if (verbose) {
-    writeLibraryToText(component.mainMethod.parent as Library);
-  }
-
-  return CompilerOutcome.Ok;
-}
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index d63516e..71f9fef 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1681,6 +1681,27 @@
       writeWord('as');
       writeWord(node.name);
     }
+    String last;
+    final String show = 'show';
+    final String hide = 'hide';
+    if (node.combinators.isNotEmpty) {
+      for (Combinator combinator in node.combinators) {
+        if (combinator.isShow && last != show) {
+          last = show;
+          writeWord(show);
+        } else if (combinator.isHide && last != hide) {
+          last = hide;
+          writeWord(hide);
+        }
+
+        bool first = true;
+        for (String name in combinator.names) {
+          if (!first) writeComma();
+          writeWord(name);
+          first = false;
+        }
+      }
+    }
     endLine(';');
   }
 
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index 2d80a28..4b308e1 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -12,6 +12,5 @@
   meta: ^1.0.0
 dev_dependencies:
   expect: any
-  front_end: any
   test: any
   testing: any
diff --git a/pkg/modular_test/pubspec.yaml b/pkg/modular_test/pubspec.yaml
index e0a48d0..19e04da 100644
--- a/pkg/modular_test/pubspec.yaml
+++ b/pkg/modular_test/pubspec.yaml
@@ -9,9 +9,13 @@
   sdk: ">=2.2.1 <3.0.0"
 
 dependencies:
+  args: any
   package_config: ^1.0.5
   yaml: ^2.1.15
 
 dev_dependencies:
-  args: any
+  async_helper:
+    path: ../async_helper
+  expect:
+    path: ../expect
   test: any
diff --git a/pkg/nnbd_migration/lib/migration_cli.dart b/pkg/nnbd_migration/lib/migration_cli.dart
index 7e91a82..051bfad 100644
--- a/pkg/nnbd_migration/lib/migration_cli.dart
+++ b/pkg/nnbd_migration/lib/migration_cli.dart
@@ -183,9 +183,8 @@
   @override
   String get description =>
       'Perform a null safety migration on a project or package.'
-      '\n\nThe migrate feature is in preview and not yet complete; we welcome '
-      'feedback.\n\n'
-      'https://github.com/dart-lang/sdk/tree/master/pkg/nnbd_migration#providing-feedback';
+      '\n\nThe migration tool is in preview; see '
+      'https://dart.dev/go/null-safety-migration for a migration guide.';
 
   @override
   String get invocation {
@@ -396,23 +395,22 @@
         help:
             'Attempt to perform null safety analysis even if exceptions occur.',
         hide: hide);
-    parser.addOption(CommandLineOptions.previewHostnameOption,
-        defaultsTo: 'localhost',
-        help: 'Run the preview server on the specified hostname.  If not '
-            'specified, "localhost" is used. Use "any" to specify IPv6.any or '
-            'IPv4.any.');
-    parser.addOption(CommandLineOptions.previewPortOption,
-        help:
-            'Run the preview server on the specified port.  If not specified, '
-            'dynamically allocate a port.');
-    parser.addOption(CommandLineOptions.sdkPathOption,
-        help: 'The path to the Dart SDK.', hide: hide);
     parser.addFlag(
       CommandLineOptions.skipPubOutdatedFlag,
       defaultsTo: false,
       negatable: false,
       help: 'Skip the `pub outdated --mode=null-safety` check.',
     );
+    parser.addFlag(CommandLineOptions.webPreviewFlag,
+        defaultsTo: true,
+        negatable: true,
+        help: 'Show an interactive preview of the proposed null safety changes '
+            'in a browser window.\n'
+            'With --no-web-preview, the proposed changes are instead printed to '
+            'the console.');
+
+    parser.addOption(CommandLineOptions.sdkPathOption,
+        help: 'The path to the Dart SDK.', hide: hide);
     parser.addOption(CommandLineOptions.summaryOption,
         help:
             'Output path for a machine-readable summary of migration changes');
@@ -421,13 +419,14 @@
         defaultsTo: false,
         help: 'Verbose output.',
         negatable: false);
-    parser.addFlag(CommandLineOptions.webPreviewFlag,
-        defaultsTo: true,
-        negatable: true,
-        help: 'Show an interactive preview of the proposed null safety changes '
-            'in a browser window.\n'
-            'With --no-web-preview, the proposed changes are instead printed to '
-            'the console.');
+    parser.addOption(CommandLineOptions.previewHostnameOption,
+        defaultsTo: 'localhost',
+        help: 'Run the preview server on the specified hostname.\nIf not '
+            'specified, "localhost" is used. Use "any" to specify IPv6.any or '
+            'IPv4.any.');
+    parser.addOption(CommandLineOptions.previewPortOption,
+        help: 'Run the preview server on the specified port. If not specified, '
+            'dynamically allocate a port.');
   }
 }
 
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
index dc1ee94..cbb34cd 100644
--- a/pkg/nnbd_migration/pubspec.yaml
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -21,5 +21,4 @@
 dev_dependencies:
   http: '>=0.11.3+17 <0.13.0'
   test: ^1.6.4
-  test_core: '>=0.2.6 <0.4.0'
   test_reflective_loader: ^0.1.8
diff --git a/pkg/nnbd_migration/test/edge_builder_test.dart b/pkg/nnbd_migration/test/edge_builder_test.dart
index e864bec..ff8b433 100644
--- a/pkg/nnbd_migration/test/edge_builder_test.dart
+++ b/pkg/nnbd_migration/test/edge_builder_test.dart
@@ -25,6 +25,7 @@
 import 'package:nnbd_migration/src/edge_origin.dart';
 import 'package:nnbd_migration/src/expression_checks.dart';
 import 'package:nnbd_migration/src/nullability_node.dart';
+import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -463,8 +464,17 @@
 
     var uriStr = 'package:test/test.dart';
 
-    _myLibrary = LibraryElementImpl(analysisContext, analysisSession, uriStr,
-        -1, 0, FeatureSet.fromEnableFlags([EnableString.non_nullable]));
+    _myLibrary = LibraryElementImpl(
+      analysisContext,
+      analysisSession,
+      uriStr,
+      -1,
+      0,
+      FeatureSet.fromEnableFlags2(
+        sdkLanguageVersion: Version.parse('2.10.0'),
+        flags: [EnableString.non_nullable],
+      ),
+    );
     _myLibrary.typeSystem = typeSystem;
     _myLibrary.typeProvider = coreLibrary.typeProvider;
 
diff --git a/pkg/pkg.status b/pkg/pkg.status
index d1347c4..70955b1 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -88,7 +88,6 @@
 front_end/test/incremental_compiler_leak_test: Pass, Slow
 front_end/test/incremental_dart2js_test: Pass, Slow
 front_end/test/minimal_incremental_kernel_generator_test: Slow, Pass
-front_end/test/whole_program_test: Slow, Pass
 front_end/testcases/*: Skip # These are not tests but input for tests.
 front_end/tool/incremental_perf_test: Slow, Pass
 kernel/test/closures_test: Slow, Pass
@@ -186,7 +185,6 @@
 front_end/test/fasta/strong_test: Pass, Slow, Timeout
 front_end/test/fasta/text_serialization_test: Pass, Slow, Timeout
 front_end/test/incremental_dart2js_load_from_dill_test: Pass, Slow
-front_end/test/whole_program_test: Skip # Issue 31902
 
 [ $browser ]
 */test/analyzer_test: SkipByDesign # No need to run analysis tests on browser bots
@@ -288,9 +286,6 @@
 [ $runtime == vm && ($arch == armv6 || $arch == simarm || $arch == simarm64 || $arch == simarmv6) ]
 *: Skip
 
-[ $arch != x64 || $compiler != none || $mode != release || $runtime != vm ]
-front_end/test/whole_program_test: SkipByDesign
-
 [ $mode == debug || $runtime != vm || $system == android ]
 vm/test/modular_kernel_plus_aot_test: SkipByDesign # This test should only run if binary is run from build dir
 
diff --git a/pkg/smith/pubspec.yaml b/pkg/smith/pubspec.yaml
index f88a2d3..551d7e5 100644
--- a/pkg/smith/pubspec.yaml
+++ b/pkg/smith/pubspec.yaml
@@ -4,8 +4,6 @@
 publish_to: none
 environment:
   sdk: "^2.3.0"
-dependencies:
-  args: any
 dev_dependencies:
   expect:
     path: ../expect
diff --git a/pkg/sourcemap_testing/pubspec.yaml b/pkg/sourcemap_testing/pubspec.yaml
index f1d11f0..5732caf 100644
--- a/pkg/sourcemap_testing/pubspec.yaml
+++ b/pkg/sourcemap_testing/pubspec.yaml
@@ -7,6 +7,12 @@
   sdk: '>=2.1.0 <3.0.0'
 
 dependencies:
-  package_config: '>=0.1.1 <2.0.0'
-  pub_semver: ^1.2.1
-  front_end: ^0.1.20
+  _fe_analyzer_shared:
+    path: ../_fe_analyzer_shared
+  dart2js_tools: 
+    path: ../dart2js_tools
+  expect: 
+    path: ../expect
+  path: any
+  source_maps: any
+  source_span: any
diff --git a/pkg/test_runner/pubspec.yaml b/pkg/test_runner/pubspec.yaml
index a840b28..be9765a 100644
--- a/pkg/test_runner/pubspec.yaml
+++ b/pkg/test_runner/pubspec.yaml
@@ -8,18 +8,22 @@
 environment:
   sdk: "^2.3.0"
 dependencies:
-  expect:
-    path: ../expect
-  glob:
-    path: ../../third_party/pkg/glob
+  args: any
+  dart2js_tools:
+    path: ../dart2js_tools
   package_config:
     path: ../../third_party/pkg_tested/package_config
+  path: any
+  pool: any
   smith:
     path: ../smith
   status_file:
     path: ../status_file
-  dart2js_tools:
-    path: ../dart2js_tools
+dev_dependencies:
+  expect:
+    path: ../expect
+  glob:
+    path: ../../third_party/pkg/glob    
 dependency_overrides:
   # Other packages in the dependency graph have normal hosted dependencies on
   # this, so just override it to force the local one.
diff --git a/pkg/vm/lib/transformations/type_flow/analysis.dart b/pkg/vm/lib/transformations/type_flow/analysis.dart
index fd794b1..d35e0a0 100644
--- a/pkg/vm/lib/transformations/type_flow/analysis.dart
+++ b/pkg/vm/lib/transformations/type_flow/analysis.dart
@@ -108,6 +108,36 @@
   /// Used for recursive calls while this invocation is being processed.
   Type get resultForRecursiveInvocation => result;
 
+  /// Use [type] as a current computed result of this invocation.
+  /// If this invocation was invalidated, and the invalidated result is
+  /// different, then invalidate all dependent invocations as well.
+  /// Result type may be saturated if this invocation was invalidated
+  /// too many times.
+  void setResult(TypeFlowAnalysis typeFlowAnalysis, Type type) {
+    assertx(type != null);
+    result = type;
+
+    if (invalidatedResult != null) {
+      if (invalidatedResult != result) {
+        invalidateDependentInvocations(typeFlowAnalysis.workList);
+
+        invalidationCounter++;
+        Statistics.maxInvalidationsPerInvocation =
+            max(Statistics.maxInvalidationsPerInvocation, invalidationCounter);
+        // In rare cases, loops in dependencies and approximation of
+        // recursive invocations may cause infinite bouncing of result
+        // types. To prevent infinite looping and guarantee convergence of
+        // the analysis, result is saturated after invocation is invalidated
+        // at least [_Invocation.invalidationLimit] times.
+        if (invalidationCounter > _Invocation.invalidationLimit) {
+          result =
+              result.union(invalidatedResult, typeFlowAnalysis.hierarchyCache);
+        }
+      }
+      invalidatedResult = null;
+    }
+  }
+
   // Only take selector and args into account as _Invocation objects
   // are cached in _InvocationsCache using selector and args as a key.
   @override
@@ -261,7 +291,7 @@
         if (summaryResult is Type &&
             !typeFlowAnalysis.workList._isPending(this)) {
           assertx(result == null || result == summaryResult);
-          result = summaryResult;
+          setResult(typeFlowAnalysis, summaryResult);
         }
         return summary.apply(
             args, typeFlowAnalysis.hierarchyCache, typeFlowAnalysis);
@@ -1220,6 +1250,7 @@
   void invalidateInvocation(_Invocation invocation) {
     Statistics.invocationsInvalidated++;
     if (invocation.result != null) {
+      assertx(invocation.invalidatedResult == null);
       invocation.invalidatedResult = invocation.result;
       invocation.result = null;
     }
@@ -1269,45 +1300,62 @@
 
     // Test if tracing is enabled to avoid expensive message formatting.
     if (kPrintTrace) {
-      tracePrint('PROCESSING $invocation', 1);
+      tracePrint(
+          'PROCESSING $invocation, invalidatedResult ${invocation.invalidatedResult}',
+          1);
     }
 
     if (processing.add(invocation)) {
+      // Do not process too many calls in the call stack as
+      // it may cause stack overflow in the analysis.
+      const int kMaxCallsInCallStack = 500;
+      if (callStack.length > kMaxCallsInCallStack) {
+        Statistics.deepInvocationsDeferred++;
+        // If there is invalidatedResult, then use it.
+        // When actual result is inferred it will be compared against
+        // invalidatedResult and all dependent invocations will be invalidated
+        // accordingly.
+        //
+        // Otherwise, if invocation is not invalidated yet, use empty type
+        // as a result but immediately invalidate it in order to recompute.
+        // Static type would be too inaccurate.
+        if (invocation.invalidatedResult == null) {
+          invocation.result = const EmptyType();
+        }
+        // Conservatively assume that this invocation may trigger
+        // parameter type checks. This is needed because caller may not be
+        // invalidated and recomputed if this invocation yields the
+        // same result.
+        invocation.typeChecksNeeded = true;
+        invalidateInvocation(invocation);
+        assertx(invocation.result == null);
+        assertx(invocation.invalidatedResult != null);
+        assertx(_isPending(invocation));
+        if (kPrintTrace) {
+          tracePrint("Processing deferred due to deep call stack.");
+          tracePrint(
+              'END PROCESSING $invocation, RESULT ${invocation.invalidatedResult}',
+              -1);
+        }
+        processing.remove(invocation);
+        return invocation.invalidatedResult;
+      }
+
       callStack.add(invocation);
       pending.remove(invocation);
 
       Type result = invocation.process(_typeFlowAnalysis);
 
-      assertx(result != null);
-      invocation.result = result;
+      invocation.setResult(_typeFlowAnalysis, result);
 
-      if (invocation.invalidatedResult != null) {
-        if (invocation.invalidatedResult != result) {
-          invocation.invalidateDependentInvocations(this);
-
-          invocation.invalidationCounter++;
-          Statistics.maxInvalidationsPerInvocation = max(
-              Statistics.maxInvalidationsPerInvocation,
-              invocation.invalidationCounter);
-          // In rare cases, loops in dependencies and approximation of
-          // recursive invocations may cause infinite bouncing of result
-          // types. To prevent infinite looping and guarantee convergence of
-          // the analysis, result is saturated after invocation is invalidated
-          // at least [_Invocation.invalidationLimit] times.
-          if (invocation.invalidationCounter > _Invocation.invalidationLimit) {
-            result = result.union(
-                invocation.invalidatedResult, _typeFlowAnalysis.hierarchyCache);
-            invocation.result = result;
-          }
-        }
-        invocation.invalidatedResult = null;
-      }
+      // setResult may saturate result to ensure convergence.
+      result = invocation.result;
 
       // Invocation is still pending - it was invalidated while being processed.
       // Move result to invalidatedResult.
       if (_isPending(invocation)) {
         Statistics.invocationsInvalidatedDuringProcessing++;
-        invocation.invalidatedResult = result;
+        invocation.invalidatedResult = invocation.result;
         invocation.result = null;
       }
 
diff --git a/pkg/vm/lib/transformations/type_flow/utils.dart b/pkg/vm/lib/transformations/type_flow/utils.dart
index 93c10ac..79e7d7d 100644
--- a/pkg/vm/lib/transformations/type_flow/utils.dart
+++ b/pkg/vm/lib/transformations/type_flow/utils.dart
@@ -148,6 +148,7 @@
   static int maxInvocationsCachedPerSelector = 0;
   static int approximateInvocationsCreated = 0;
   static int approximateInvocationsUsed = 0;
+  static int deepInvocationsDeferred = 0;
   static int classesDropped = 0;
   static int membersDropped = 0;
   static int methodBodiesDropped = 0;
@@ -177,6 +178,7 @@
     maxInvocationsCachedPerSelector = 0;
     approximateInvocationsCreated = 0;
     approximateInvocationsUsed = 0;
+    deepInvocationsDeferred = 0;
     classesDropped = 0;
     membersDropped = 0;
     methodBodiesDropped = 0;
@@ -207,6 +209,7 @@
     ${maxInvocationsCachedPerSelector} maximum invocations cached per selector
     ${approximateInvocationsCreated} approximate invocations created
     ${approximateInvocationsUsed} times approximate invocation is used
+    ${deepInvocationsDeferred} times invocation processing was deferred due to deep call stack
     ${classesDropped} classes dropped
     ${membersDropped} members dropped
     ${methodBodiesDropped} method bodies dropped
diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml
index ba7b719..26d0bc7 100644
--- a/pkg/vm/pubspec.yaml
+++ b/pkg/vm/pubspec.yaml
@@ -7,10 +7,19 @@
   sdk: "^2.7.0"
 
 dependencies:
+  args: ^1.4.4
   build_integration:
     path: ../build_integration
+  crypto: any
   front_end: ^0.1.6
   kernel: ^0.3.6
+  meta: any
+  package_config: any
 
 dev_dependencies:
-  args: ^1.4.4
+  expect:
+    path: ../expect
+  json_rpc_2: any
+  path: any
+  test: any
+  web_socket_channel: any
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 2341506..a42626d 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -312,31 +312,18 @@
                  "..:dart_config",
                  "..:dart_precompiler_config",
                ] + extra_configs
-    deps = []
 
     if (is_fuchsia) {
       if (using_fuchsia_gn_sdk) {
-        deps += [
-          "$fuchsia_sdk_root/fidl/fuchsia.netstack",
-          "$fuchsia_sdk_root/pkg/sys_cpp",
-        ]
         public_deps = [ "$fuchsia_sdk_root/pkg/fdio" ]
       } else if (using_fuchsia_sdk) {
-        deps += [
-          "$fuchsia_sdk_root/fidl:fuchsia.netstack",
-          "$fuchsia_sdk_root/pkg:sys_cpp",
-        ]
         public_deps = [ "$fuchsia_sdk_root/pkg:fdio" ]
       } else {
-        deps += [
-          "//sdk/fidl/fuchsia.netstack",
-          "//sdk/lib/sys/cpp",
-        ]
         public_deps = [ "//sdk/lib/fdio" ]
       }
     }
 
-    deps += [ "//third_party/zlib" ]
+    deps = [ "//third_party/zlib" ]
 
     custom_sources_filter = [
       "*_test.cc",
@@ -458,22 +445,10 @@
 
     if (is_fuchsia) {
       if (using_fuchsia_gn_sdk) {
-        deps += [
-          "$fuchsia_sdk_root/fidl/fuchsia.netstack",
-          "$fuchsia_sdk_root/pkg/sys_cpp",
-        ]
         public_deps = [ "$fuchsia_sdk_root/pkg/fdio" ]
       } else if (using_fuchsia_sdk) {
-        deps += [
-          "$fuchsia_sdk_root/fidl:fuchsia.netstack",
-          "$fuchsia_sdk_root/pkg:sys_cpp",
-        ]
         public_deps = [ "$fuchsia_sdk_root/pkg:fdio" ]
       } else {
-        deps += [
-          "//sdk/fidl/fuchsia.netstack",
-          "//sdk/lib/sys/cpp",
-        ]
         public_deps = [ "//sdk/lib/fdio" ]
       }
     }
diff --git a/runtime/bin/security_context_macos.cc b/runtime/bin/security_context_macos.cc
index e0d94db..ea642aa 100644
--- a/runtime/bin/security_context_macos.cc
+++ b/runtime/bin/security_context_macos.cc
@@ -193,8 +193,8 @@
       _IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_12_0))
   // SecTrustEvaluateWithError available as of OSX 10.14 and iOS 12.
   // The result is ignored as we get more information from the following call to
-  // SecTrustGetTrustResult which also happens to match the information we get from calling
-  // SecTrustEvaluate.
+  // SecTrustGetTrustResult which also happens to match the information we get
+  // from calling SecTrustEvaluate.
   bool res = SecTrustEvaluateWithError(trust.get(), NULL);
   USE(res);
   status = SecTrustGetTrustResult(trust.get(), &trust_result);
diff --git a/runtime/bin/security_context_win.cc b/runtime/bin/security_context_win.cc
index 0e4325b..95673ca 100644
--- a/runtime/bin/security_context_win.cc
+++ b/runtime/bin/security_context_win.cc
@@ -12,6 +12,7 @@
 #include <openssl/bio.h>
 #include <openssl/ssl.h>
 #include <openssl/x509.h>
+#include <wincrypt.h>
 
 #include "bin/directory.h"
 #include "bin/file.h"
@@ -19,6 +20,8 @@
 #include "bin/secure_socket_utils.h"
 #include "platform/syslog.h"
 
+#pragma comment(lib, "crypt32.lib")
+
 namespace dart {
 namespace bin {
 
@@ -29,6 +32,74 @@
 const intptr_t SSLCertContext::kApproximateSize =
     sizeof(SSLCertContext) + root_certificates_pem_length;
 
+static void PrintSSLErr(const char* str) {
+  int error = ERR_get_error();
+  char error_string[SecureSocketUtils::SSL_ERROR_MESSAGE_BUFFER_SIZE];
+  ERR_error_string_n(error, error_string,
+                     SecureSocketUtils::SSL_ERROR_MESSAGE_BUFFER_SIZE);
+  Syslog::PrintErr("%s ERROR: %d %s\n", str, error, error_string);
+}
+
+// Add certificates from Windows trusted root store.
+static bool AddCertificatesFromRootStore(X509_STORE* store) {
+  // Open root system store.
+  // Note that only current user certificates are accessible using this method,
+  // not the local machine store.
+  HCERTSTORE cert_store = CertOpenSystemStore(NULL, L"ROOT");
+  if (cert_store == NULL) {
+    if (SSL_LOG_STATUS) {
+      DWORD error = GetLastError();
+      Syslog::PrintErr("Failed to open Windows root store due to %d\n", error);
+    }
+    return false;
+  }
+
+  // Iterating through all certificates in the store. A NULL is required to
+  // start iteration.
+  PCCERT_CONTEXT cert_context = NULL;
+  do {
+    cert_context = CertEnumCertificatesInStore(cert_store, cert_context);
+    if (cert_context == NULL) {
+      // reach the end of store.
+      break;
+    }
+    BIO* root_cert_bio =
+        BIO_new_mem_buf(const_cast<unsigned char*>(cert_context->pbCertEncoded),
+                        cert_context->cbCertEncoded);
+    // `root_cert` has to be initialized to NULL, otherwise, it will be
+    // considerred as an existing X509 and cause segmentation fault.
+    X509* root_cert = NULL;
+    if (d2i_X509_bio(root_cert_bio, &root_cert) == NULL) {
+      if (SSL_LOG_STATUS) {
+        PrintSSLErr("Fail to read certificate");
+      }
+      BIO_free(root_cert_bio);
+      continue;
+    }
+    BIO_free(root_cert_bio);
+    int status = X509_STORE_add_cert(store, root_cert);
+    if (status == 0) {
+      if (SSL_LOG_STATUS) {
+        PrintSSLErr("Fail to add certificate to trust store");
+      }
+      X509_free(root_cert);
+      CertFreeCertificateContext(cert_context);
+      CertCloseStore(cert_store, 0);
+      return false;
+    }
+  } while (cert_context != NULL);
+
+  // It always returns non-zero.
+  CertFreeCertificateContext(cert_context);
+  if (!CertCloseStore(cert_store, 0)) {
+    if (SSL_LOG_STATUS) {
+      PrintSSLErr("Fail to close system root store");
+    }
+    return false;
+  }
+  return true;
+}
+
 void SSLCertContext::TrustBuiltinRoots() {
   // First, try to use locations specified on the command line.
   if (root_certs_file() != NULL) {
@@ -40,8 +111,18 @@
     return;
   }
 
+  if (SSL_LOG_STATUS) {
+    Syslog::Print("Trusting Windows built-in roots\n");
+  }
+  X509_STORE* store = SSL_CTX_get_cert_store(context());
+  if (AddCertificatesFromRootStore(store)) {
+    return;
+  }
+  // Reset store. SSL_CTX_set_cert_store will take ownership of store. A manual
+  // free is not needed.
+  SSL_CTX_set_cert_store(context(), X509_STORE_new());
   // Fall back on the compiled-in certs if the standard locations don't exist,
-  // or we aren't on Linux.
+  // or fail to load certificates from Windows root store.
   if (SSL_LOG_STATUS) {
     Syslog::Print("Trusting compiled-in roots\n");
   }
diff --git a/runtime/bin/socket_base_fuchsia.cc b/runtime/bin/socket_base_fuchsia.cc
index b76b6c6..be1eb256 100644
--- a/runtime/bin/socket_base_fuchsia.cc
+++ b/runtime/bin/socket_base_fuchsia.cc
@@ -8,9 +8,7 @@
 #include "bin/socket_base.h"
 
 #include <errno.h>
-#include <fuchsia/netstack/cpp/fidl.h>
 #include <ifaddrs.h>
-#include <lib/sys/cpp/service_directory.h>
 #include <net/if.h>
 #include <netinet/tcp.h>
 #include <stdio.h>
@@ -68,21 +66,10 @@
   memmove(reinterpret_cast<void*>(&addr_), sa, salen);
 }
 
-static fidl::SynchronousInterfacePtr<fuchsia::netstack::Netstack> netstack;
-static std::once_flag once;
 
 bool SocketBase::Initialize() {
-  static zx_status_t status;
-  std::call_once(once, [&]() {
-    auto directory = sys::ServiceDirectory::CreateFromNamespace();
-    status = directory->Connect(netstack.NewRequest());
-    if (status != ZX_OK) {
-      Syslog::PrintErr(
-          "Initialize: connecting to fuchsia.netstack failed: %s\n",
-          zx_status_get_string(status));
-    }
-  });
-  return status == ZX_OK;
+  // Nothing to do on Fuchsia.
+  return true;
 }
 
 bool SocketBase::FormatNumericAddress(const RawAddr& addr,
@@ -294,6 +281,17 @@
   }
 }
 
+static bool ShouldIncludeIfaAddrs(struct ifaddrs* ifa, int lookup_family) {
+  if (ifa->ifa_addr == NULL) {
+    // OpenVPN's virtual device tun0.
+    return false;
+  }
+  int family = ifa->ifa_addr->sa_family;
+  return ((lookup_family == family) ||
+          (((lookup_family == AF_UNSPEC) &&
+            ((family == AF_INET) || (family == AF_INET6)))));
+}
+
 bool SocketBase::ListInterfacesSupported() {
   return true;
 }
@@ -301,59 +299,38 @@
 AddressList<InterfaceSocketAddress>* SocketBase::ListInterfaces(
     int type,
     OSError** os_error) {
-  std::vector<fuchsia::netstack::NetInterface2> interfaces;
-  zx_status_t status = netstack->GetInterfaces2(&interfaces);
-  if (status != ZX_OK) {
-    LOG_ERR("ListInterfaces: fuchsia.netstack.GetInterfaces2 failed: %s\n",
-            zx_status_get_string(status));
-    errno = EIO;
+  struct ifaddrs* ifaddr;
+
+  int status = NO_RETRY_EXPECTED(getifaddrs(&ifaddr));
+  if (status != 0) {
+    ASSERT(*os_error == NULL);
+    *os_error =
+        new OSError(status, gai_strerror(status), OSError::kGetAddressInfo);
     return NULL;
   }
 
-  // Process the results.
-  const int lookup_family = SocketAddress::FromType(type);
+  int lookup_family = SocketAddress::FromType(type);
 
-  std::remove_if(
-      interfaces.begin(), interfaces.end(),
-      [lookup_family](const auto& interface) {
-        switch (interface.addr.Which()) {
-          case fuchsia::net::IpAddress::Tag::kIpv4:
-            return !(lookup_family == AF_UNSPEC || lookup_family == AF_INET);
-          case fuchsia::net::IpAddress::Tag::kIpv6:
-            return !(lookup_family == AF_UNSPEC || lookup_family == AF_INET6);
-          case fuchsia::net::IpAddress::Tag::Invalid:
-            return true;
-        }
-      });
-
-  auto addresses = new AddressList<InterfaceSocketAddress>(interfaces.size());
-  int addresses_idx = 0;
-  for (const auto& interface : interfaces) {
-    struct sockaddr_storage addr = {};
-    auto addr_in = reinterpret_cast<struct sockaddr_in*>(&addr);
-    auto addr_in6 = reinterpret_cast<struct sockaddr_in6*>(&addr);
-    switch (interface.addr.Which()) {
-      case fuchsia::net::IpAddress::Tag::kIpv4:
-        addr_in->sin_family = AF_INET;
-        memmove(&addr_in->sin_addr, interface.addr.ipv4().addr.data(),
-                sizeof(addr_in->sin_addr));
-        break;
-      case fuchsia::net::IpAddress::Tag::kIpv6:
-        addr_in6->sin6_family = AF_INET6;
-        memmove(&addr_in6->sin6_addr, interface.addr.ipv6().addr.data(),
-                sizeof(addr_in6->sin6_addr));
-        break;
-      case fuchsia::net::IpAddress::Tag::Invalid:
-        // Should have been filtered out above.
-        UNREACHABLE();
+  intptr_t count = 0;
+  for (struct ifaddrs* ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+    if (ShouldIncludeIfaAddrs(ifa, lookup_family)) {
+      count++;
     }
-    addresses->SetAt(addresses_idx,
-                     new InterfaceSocketAddress(
-                         reinterpret_cast<sockaddr*>(&addr),
-                         DartUtils::ScopedCopyCString(interface.name.c_str()),
-                         if_nametoindex(interface.name.c_str())));
-    addresses_idx++;
   }
+
+  AddressList<InterfaceSocketAddress>* addresses =
+      new AddressList<InterfaceSocketAddress>(count);
+  int i = 0;
+  for (struct ifaddrs* ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+    if (ShouldIncludeIfaAddrs(ifa, lookup_family)) {
+      char* ifa_name = DartUtils::ScopedCopyCString(ifa->ifa_name);
+      addresses->SetAt(
+          i, new InterfaceSocketAddress(ifa->ifa_addr, ifa_name,
+                                        if_nametoindex(ifa->ifa_name)));
+      i++;
+    }
+  }
+  freeifaddrs(ifaddr);
   return addresses;
 }
 
diff --git a/runtime/tests/vm/dart/regress_flutter_63560_test.dart b/runtime/tests/vm/dart/regress_flutter_63560_test.dart
new file mode 100644
index 0000000..717e814
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_flutter_63560_test.dart
@@ -0,0 +1,1038 @@
+// 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.
+//
+// Verifies that TFA doesn't crash with stack overflow if program
+// has deeply nested calls.
+// Regression test for https://github.com/flutter/flutter/issues/63560.
+// Generated using the following:
+/*
+void main() {
+  final N = 1000;
+  print("""
+import 'package:expect/expect.dart';
+
+class A {
+  Object m0(Object o) => o;""");
+  for (var i = 1; i < N; i++) {
+    print("  Object m${i}(Object o) => m${i - 1}(o);");
+  }
+  print("""}
+
+void main() {
+  final x = A().m${N - 1}(10);
+  Expect.equals(10, x);
+}
+""");
+}
+ */
+
+import 'package:expect/expect.dart';
+
+class A {
+  Object m0(Object o) => o;
+  Object m1(Object o) => m0(o);
+  Object m2(Object o) => m1(o);
+  Object m3(Object o) => m2(o);
+  Object m4(Object o) => m3(o);
+  Object m5(Object o) => m4(o);
+  Object m6(Object o) => m5(o);
+  Object m7(Object o) => m6(o);
+  Object m8(Object o) => m7(o);
+  Object m9(Object o) => m8(o);
+  Object m10(Object o) => m9(o);
+  Object m11(Object o) => m10(o);
+  Object m12(Object o) => m11(o);
+  Object m13(Object o) => m12(o);
+  Object m14(Object o) => m13(o);
+  Object m15(Object o) => m14(o);
+  Object m16(Object o) => m15(o);
+  Object m17(Object o) => m16(o);
+  Object m18(Object o) => m17(o);
+  Object m19(Object o) => m18(o);
+  Object m20(Object o) => m19(o);
+  Object m21(Object o) => m20(o);
+  Object m22(Object o) => m21(o);
+  Object m23(Object o) => m22(o);
+  Object m24(Object o) => m23(o);
+  Object m25(Object o) => m24(o);
+  Object m26(Object o) => m25(o);
+  Object m27(Object o) => m26(o);
+  Object m28(Object o) => m27(o);
+  Object m29(Object o) => m28(o);
+  Object m30(Object o) => m29(o);
+  Object m31(Object o) => m30(o);
+  Object m32(Object o) => m31(o);
+  Object m33(Object o) => m32(o);
+  Object m34(Object o) => m33(o);
+  Object m35(Object o) => m34(o);
+  Object m36(Object o) => m35(o);
+  Object m37(Object o) => m36(o);
+  Object m38(Object o) => m37(o);
+  Object m39(Object o) => m38(o);
+  Object m40(Object o) => m39(o);
+  Object m41(Object o) => m40(o);
+  Object m42(Object o) => m41(o);
+  Object m43(Object o) => m42(o);
+  Object m44(Object o) => m43(o);
+  Object m45(Object o) => m44(o);
+  Object m46(Object o) => m45(o);
+  Object m47(Object o) => m46(o);
+  Object m48(Object o) => m47(o);
+  Object m49(Object o) => m48(o);
+  Object m50(Object o) => m49(o);
+  Object m51(Object o) => m50(o);
+  Object m52(Object o) => m51(o);
+  Object m53(Object o) => m52(o);
+  Object m54(Object o) => m53(o);
+  Object m55(Object o) => m54(o);
+  Object m56(Object o) => m55(o);
+  Object m57(Object o) => m56(o);
+  Object m58(Object o) => m57(o);
+  Object m59(Object o) => m58(o);
+  Object m60(Object o) => m59(o);
+  Object m61(Object o) => m60(o);
+  Object m62(Object o) => m61(o);
+  Object m63(Object o) => m62(o);
+  Object m64(Object o) => m63(o);
+  Object m65(Object o) => m64(o);
+  Object m66(Object o) => m65(o);
+  Object m67(Object o) => m66(o);
+  Object m68(Object o) => m67(o);
+  Object m69(Object o) => m68(o);
+  Object m70(Object o) => m69(o);
+  Object m71(Object o) => m70(o);
+  Object m72(Object o) => m71(o);
+  Object m73(Object o) => m72(o);
+  Object m74(Object o) => m73(o);
+  Object m75(Object o) => m74(o);
+  Object m76(Object o) => m75(o);
+  Object m77(Object o) => m76(o);
+  Object m78(Object o) => m77(o);
+  Object m79(Object o) => m78(o);
+  Object m80(Object o) => m79(o);
+  Object m81(Object o) => m80(o);
+  Object m82(Object o) => m81(o);
+  Object m83(Object o) => m82(o);
+  Object m84(Object o) => m83(o);
+  Object m85(Object o) => m84(o);
+  Object m86(Object o) => m85(o);
+  Object m87(Object o) => m86(o);
+  Object m88(Object o) => m87(o);
+  Object m89(Object o) => m88(o);
+  Object m90(Object o) => m89(o);
+  Object m91(Object o) => m90(o);
+  Object m92(Object o) => m91(o);
+  Object m93(Object o) => m92(o);
+  Object m94(Object o) => m93(o);
+  Object m95(Object o) => m94(o);
+  Object m96(Object o) => m95(o);
+  Object m97(Object o) => m96(o);
+  Object m98(Object o) => m97(o);
+  Object m99(Object o) => m98(o);
+  Object m100(Object o) => m99(o);
+  Object m101(Object o) => m100(o);
+  Object m102(Object o) => m101(o);
+  Object m103(Object o) => m102(o);
+  Object m104(Object o) => m103(o);
+  Object m105(Object o) => m104(o);
+  Object m106(Object o) => m105(o);
+  Object m107(Object o) => m106(o);
+  Object m108(Object o) => m107(o);
+  Object m109(Object o) => m108(o);
+  Object m110(Object o) => m109(o);
+  Object m111(Object o) => m110(o);
+  Object m112(Object o) => m111(o);
+  Object m113(Object o) => m112(o);
+  Object m114(Object o) => m113(o);
+  Object m115(Object o) => m114(o);
+  Object m116(Object o) => m115(o);
+  Object m117(Object o) => m116(o);
+  Object m118(Object o) => m117(o);
+  Object m119(Object o) => m118(o);
+  Object m120(Object o) => m119(o);
+  Object m121(Object o) => m120(o);
+  Object m122(Object o) => m121(o);
+  Object m123(Object o) => m122(o);
+  Object m124(Object o) => m123(o);
+  Object m125(Object o) => m124(o);
+  Object m126(Object o) => m125(o);
+  Object m127(Object o) => m126(o);
+  Object m128(Object o) => m127(o);
+  Object m129(Object o) => m128(o);
+  Object m130(Object o) => m129(o);
+  Object m131(Object o) => m130(o);
+  Object m132(Object o) => m131(o);
+  Object m133(Object o) => m132(o);
+  Object m134(Object o) => m133(o);
+  Object m135(Object o) => m134(o);
+  Object m136(Object o) => m135(o);
+  Object m137(Object o) => m136(o);
+  Object m138(Object o) => m137(o);
+  Object m139(Object o) => m138(o);
+  Object m140(Object o) => m139(o);
+  Object m141(Object o) => m140(o);
+  Object m142(Object o) => m141(o);
+  Object m143(Object o) => m142(o);
+  Object m144(Object o) => m143(o);
+  Object m145(Object o) => m144(o);
+  Object m146(Object o) => m145(o);
+  Object m147(Object o) => m146(o);
+  Object m148(Object o) => m147(o);
+  Object m149(Object o) => m148(o);
+  Object m150(Object o) => m149(o);
+  Object m151(Object o) => m150(o);
+  Object m152(Object o) => m151(o);
+  Object m153(Object o) => m152(o);
+  Object m154(Object o) => m153(o);
+  Object m155(Object o) => m154(o);
+  Object m156(Object o) => m155(o);
+  Object m157(Object o) => m156(o);
+  Object m158(Object o) => m157(o);
+  Object m159(Object o) => m158(o);
+  Object m160(Object o) => m159(o);
+  Object m161(Object o) => m160(o);
+  Object m162(Object o) => m161(o);
+  Object m163(Object o) => m162(o);
+  Object m164(Object o) => m163(o);
+  Object m165(Object o) => m164(o);
+  Object m166(Object o) => m165(o);
+  Object m167(Object o) => m166(o);
+  Object m168(Object o) => m167(o);
+  Object m169(Object o) => m168(o);
+  Object m170(Object o) => m169(o);
+  Object m171(Object o) => m170(o);
+  Object m172(Object o) => m171(o);
+  Object m173(Object o) => m172(o);
+  Object m174(Object o) => m173(o);
+  Object m175(Object o) => m174(o);
+  Object m176(Object o) => m175(o);
+  Object m177(Object o) => m176(o);
+  Object m178(Object o) => m177(o);
+  Object m179(Object o) => m178(o);
+  Object m180(Object o) => m179(o);
+  Object m181(Object o) => m180(o);
+  Object m182(Object o) => m181(o);
+  Object m183(Object o) => m182(o);
+  Object m184(Object o) => m183(o);
+  Object m185(Object o) => m184(o);
+  Object m186(Object o) => m185(o);
+  Object m187(Object o) => m186(o);
+  Object m188(Object o) => m187(o);
+  Object m189(Object o) => m188(o);
+  Object m190(Object o) => m189(o);
+  Object m191(Object o) => m190(o);
+  Object m192(Object o) => m191(o);
+  Object m193(Object o) => m192(o);
+  Object m194(Object o) => m193(o);
+  Object m195(Object o) => m194(o);
+  Object m196(Object o) => m195(o);
+  Object m197(Object o) => m196(o);
+  Object m198(Object o) => m197(o);
+  Object m199(Object o) => m198(o);
+  Object m200(Object o) => m199(o);
+  Object m201(Object o) => m200(o);
+  Object m202(Object o) => m201(o);
+  Object m203(Object o) => m202(o);
+  Object m204(Object o) => m203(o);
+  Object m205(Object o) => m204(o);
+  Object m206(Object o) => m205(o);
+  Object m207(Object o) => m206(o);
+  Object m208(Object o) => m207(o);
+  Object m209(Object o) => m208(o);
+  Object m210(Object o) => m209(o);
+  Object m211(Object o) => m210(o);
+  Object m212(Object o) => m211(o);
+  Object m213(Object o) => m212(o);
+  Object m214(Object o) => m213(o);
+  Object m215(Object o) => m214(o);
+  Object m216(Object o) => m215(o);
+  Object m217(Object o) => m216(o);
+  Object m218(Object o) => m217(o);
+  Object m219(Object o) => m218(o);
+  Object m220(Object o) => m219(o);
+  Object m221(Object o) => m220(o);
+  Object m222(Object o) => m221(o);
+  Object m223(Object o) => m222(o);
+  Object m224(Object o) => m223(o);
+  Object m225(Object o) => m224(o);
+  Object m226(Object o) => m225(o);
+  Object m227(Object o) => m226(o);
+  Object m228(Object o) => m227(o);
+  Object m229(Object o) => m228(o);
+  Object m230(Object o) => m229(o);
+  Object m231(Object o) => m230(o);
+  Object m232(Object o) => m231(o);
+  Object m233(Object o) => m232(o);
+  Object m234(Object o) => m233(o);
+  Object m235(Object o) => m234(o);
+  Object m236(Object o) => m235(o);
+  Object m237(Object o) => m236(o);
+  Object m238(Object o) => m237(o);
+  Object m239(Object o) => m238(o);
+  Object m240(Object o) => m239(o);
+  Object m241(Object o) => m240(o);
+  Object m242(Object o) => m241(o);
+  Object m243(Object o) => m242(o);
+  Object m244(Object o) => m243(o);
+  Object m245(Object o) => m244(o);
+  Object m246(Object o) => m245(o);
+  Object m247(Object o) => m246(o);
+  Object m248(Object o) => m247(o);
+  Object m249(Object o) => m248(o);
+  Object m250(Object o) => m249(o);
+  Object m251(Object o) => m250(o);
+  Object m252(Object o) => m251(o);
+  Object m253(Object o) => m252(o);
+  Object m254(Object o) => m253(o);
+  Object m255(Object o) => m254(o);
+  Object m256(Object o) => m255(o);
+  Object m257(Object o) => m256(o);
+  Object m258(Object o) => m257(o);
+  Object m259(Object o) => m258(o);
+  Object m260(Object o) => m259(o);
+  Object m261(Object o) => m260(o);
+  Object m262(Object o) => m261(o);
+  Object m263(Object o) => m262(o);
+  Object m264(Object o) => m263(o);
+  Object m265(Object o) => m264(o);
+  Object m266(Object o) => m265(o);
+  Object m267(Object o) => m266(o);
+  Object m268(Object o) => m267(o);
+  Object m269(Object o) => m268(o);
+  Object m270(Object o) => m269(o);
+  Object m271(Object o) => m270(o);
+  Object m272(Object o) => m271(o);
+  Object m273(Object o) => m272(o);
+  Object m274(Object o) => m273(o);
+  Object m275(Object o) => m274(o);
+  Object m276(Object o) => m275(o);
+  Object m277(Object o) => m276(o);
+  Object m278(Object o) => m277(o);
+  Object m279(Object o) => m278(o);
+  Object m280(Object o) => m279(o);
+  Object m281(Object o) => m280(o);
+  Object m282(Object o) => m281(o);
+  Object m283(Object o) => m282(o);
+  Object m284(Object o) => m283(o);
+  Object m285(Object o) => m284(o);
+  Object m286(Object o) => m285(o);
+  Object m287(Object o) => m286(o);
+  Object m288(Object o) => m287(o);
+  Object m289(Object o) => m288(o);
+  Object m290(Object o) => m289(o);
+  Object m291(Object o) => m290(o);
+  Object m292(Object o) => m291(o);
+  Object m293(Object o) => m292(o);
+  Object m294(Object o) => m293(o);
+  Object m295(Object o) => m294(o);
+  Object m296(Object o) => m295(o);
+  Object m297(Object o) => m296(o);
+  Object m298(Object o) => m297(o);
+  Object m299(Object o) => m298(o);
+  Object m300(Object o) => m299(o);
+  Object m301(Object o) => m300(o);
+  Object m302(Object o) => m301(o);
+  Object m303(Object o) => m302(o);
+  Object m304(Object o) => m303(o);
+  Object m305(Object o) => m304(o);
+  Object m306(Object o) => m305(o);
+  Object m307(Object o) => m306(o);
+  Object m308(Object o) => m307(o);
+  Object m309(Object o) => m308(o);
+  Object m310(Object o) => m309(o);
+  Object m311(Object o) => m310(o);
+  Object m312(Object o) => m311(o);
+  Object m313(Object o) => m312(o);
+  Object m314(Object o) => m313(o);
+  Object m315(Object o) => m314(o);
+  Object m316(Object o) => m315(o);
+  Object m317(Object o) => m316(o);
+  Object m318(Object o) => m317(o);
+  Object m319(Object o) => m318(o);
+  Object m320(Object o) => m319(o);
+  Object m321(Object o) => m320(o);
+  Object m322(Object o) => m321(o);
+  Object m323(Object o) => m322(o);
+  Object m324(Object o) => m323(o);
+  Object m325(Object o) => m324(o);
+  Object m326(Object o) => m325(o);
+  Object m327(Object o) => m326(o);
+  Object m328(Object o) => m327(o);
+  Object m329(Object o) => m328(o);
+  Object m330(Object o) => m329(o);
+  Object m331(Object o) => m330(o);
+  Object m332(Object o) => m331(o);
+  Object m333(Object o) => m332(o);
+  Object m334(Object o) => m333(o);
+  Object m335(Object o) => m334(o);
+  Object m336(Object o) => m335(o);
+  Object m337(Object o) => m336(o);
+  Object m338(Object o) => m337(o);
+  Object m339(Object o) => m338(o);
+  Object m340(Object o) => m339(o);
+  Object m341(Object o) => m340(o);
+  Object m342(Object o) => m341(o);
+  Object m343(Object o) => m342(o);
+  Object m344(Object o) => m343(o);
+  Object m345(Object o) => m344(o);
+  Object m346(Object o) => m345(o);
+  Object m347(Object o) => m346(o);
+  Object m348(Object o) => m347(o);
+  Object m349(Object o) => m348(o);
+  Object m350(Object o) => m349(o);
+  Object m351(Object o) => m350(o);
+  Object m352(Object o) => m351(o);
+  Object m353(Object o) => m352(o);
+  Object m354(Object o) => m353(o);
+  Object m355(Object o) => m354(o);
+  Object m356(Object o) => m355(o);
+  Object m357(Object o) => m356(o);
+  Object m358(Object o) => m357(o);
+  Object m359(Object o) => m358(o);
+  Object m360(Object o) => m359(o);
+  Object m361(Object o) => m360(o);
+  Object m362(Object o) => m361(o);
+  Object m363(Object o) => m362(o);
+  Object m364(Object o) => m363(o);
+  Object m365(Object o) => m364(o);
+  Object m366(Object o) => m365(o);
+  Object m367(Object o) => m366(o);
+  Object m368(Object o) => m367(o);
+  Object m369(Object o) => m368(o);
+  Object m370(Object o) => m369(o);
+  Object m371(Object o) => m370(o);
+  Object m372(Object o) => m371(o);
+  Object m373(Object o) => m372(o);
+  Object m374(Object o) => m373(o);
+  Object m375(Object o) => m374(o);
+  Object m376(Object o) => m375(o);
+  Object m377(Object o) => m376(o);
+  Object m378(Object o) => m377(o);
+  Object m379(Object o) => m378(o);
+  Object m380(Object o) => m379(o);
+  Object m381(Object o) => m380(o);
+  Object m382(Object o) => m381(o);
+  Object m383(Object o) => m382(o);
+  Object m384(Object o) => m383(o);
+  Object m385(Object o) => m384(o);
+  Object m386(Object o) => m385(o);
+  Object m387(Object o) => m386(o);
+  Object m388(Object o) => m387(o);
+  Object m389(Object o) => m388(o);
+  Object m390(Object o) => m389(o);
+  Object m391(Object o) => m390(o);
+  Object m392(Object o) => m391(o);
+  Object m393(Object o) => m392(o);
+  Object m394(Object o) => m393(o);
+  Object m395(Object o) => m394(o);
+  Object m396(Object o) => m395(o);
+  Object m397(Object o) => m396(o);
+  Object m398(Object o) => m397(o);
+  Object m399(Object o) => m398(o);
+  Object m400(Object o) => m399(o);
+  Object m401(Object o) => m400(o);
+  Object m402(Object o) => m401(o);
+  Object m403(Object o) => m402(o);
+  Object m404(Object o) => m403(o);
+  Object m405(Object o) => m404(o);
+  Object m406(Object o) => m405(o);
+  Object m407(Object o) => m406(o);
+  Object m408(Object o) => m407(o);
+  Object m409(Object o) => m408(o);
+  Object m410(Object o) => m409(o);
+  Object m411(Object o) => m410(o);
+  Object m412(Object o) => m411(o);
+  Object m413(Object o) => m412(o);
+  Object m414(Object o) => m413(o);
+  Object m415(Object o) => m414(o);
+  Object m416(Object o) => m415(o);
+  Object m417(Object o) => m416(o);
+  Object m418(Object o) => m417(o);
+  Object m419(Object o) => m418(o);
+  Object m420(Object o) => m419(o);
+  Object m421(Object o) => m420(o);
+  Object m422(Object o) => m421(o);
+  Object m423(Object o) => m422(o);
+  Object m424(Object o) => m423(o);
+  Object m425(Object o) => m424(o);
+  Object m426(Object o) => m425(o);
+  Object m427(Object o) => m426(o);
+  Object m428(Object o) => m427(o);
+  Object m429(Object o) => m428(o);
+  Object m430(Object o) => m429(o);
+  Object m431(Object o) => m430(o);
+  Object m432(Object o) => m431(o);
+  Object m433(Object o) => m432(o);
+  Object m434(Object o) => m433(o);
+  Object m435(Object o) => m434(o);
+  Object m436(Object o) => m435(o);
+  Object m437(Object o) => m436(o);
+  Object m438(Object o) => m437(o);
+  Object m439(Object o) => m438(o);
+  Object m440(Object o) => m439(o);
+  Object m441(Object o) => m440(o);
+  Object m442(Object o) => m441(o);
+  Object m443(Object o) => m442(o);
+  Object m444(Object o) => m443(o);
+  Object m445(Object o) => m444(o);
+  Object m446(Object o) => m445(o);
+  Object m447(Object o) => m446(o);
+  Object m448(Object o) => m447(o);
+  Object m449(Object o) => m448(o);
+  Object m450(Object o) => m449(o);
+  Object m451(Object o) => m450(o);
+  Object m452(Object o) => m451(o);
+  Object m453(Object o) => m452(o);
+  Object m454(Object o) => m453(o);
+  Object m455(Object o) => m454(o);
+  Object m456(Object o) => m455(o);
+  Object m457(Object o) => m456(o);
+  Object m458(Object o) => m457(o);
+  Object m459(Object o) => m458(o);
+  Object m460(Object o) => m459(o);
+  Object m461(Object o) => m460(o);
+  Object m462(Object o) => m461(o);
+  Object m463(Object o) => m462(o);
+  Object m464(Object o) => m463(o);
+  Object m465(Object o) => m464(o);
+  Object m466(Object o) => m465(o);
+  Object m467(Object o) => m466(o);
+  Object m468(Object o) => m467(o);
+  Object m469(Object o) => m468(o);
+  Object m470(Object o) => m469(o);
+  Object m471(Object o) => m470(o);
+  Object m472(Object o) => m471(o);
+  Object m473(Object o) => m472(o);
+  Object m474(Object o) => m473(o);
+  Object m475(Object o) => m474(o);
+  Object m476(Object o) => m475(o);
+  Object m477(Object o) => m476(o);
+  Object m478(Object o) => m477(o);
+  Object m479(Object o) => m478(o);
+  Object m480(Object o) => m479(o);
+  Object m481(Object o) => m480(o);
+  Object m482(Object o) => m481(o);
+  Object m483(Object o) => m482(o);
+  Object m484(Object o) => m483(o);
+  Object m485(Object o) => m484(o);
+  Object m486(Object o) => m485(o);
+  Object m487(Object o) => m486(o);
+  Object m488(Object o) => m487(o);
+  Object m489(Object o) => m488(o);
+  Object m490(Object o) => m489(o);
+  Object m491(Object o) => m490(o);
+  Object m492(Object o) => m491(o);
+  Object m493(Object o) => m492(o);
+  Object m494(Object o) => m493(o);
+  Object m495(Object o) => m494(o);
+  Object m496(Object o) => m495(o);
+  Object m497(Object o) => m496(o);
+  Object m498(Object o) => m497(o);
+  Object m499(Object o) => m498(o);
+  Object m500(Object o) => m499(o);
+  Object m501(Object o) => m500(o);
+  Object m502(Object o) => m501(o);
+  Object m503(Object o) => m502(o);
+  Object m504(Object o) => m503(o);
+  Object m505(Object o) => m504(o);
+  Object m506(Object o) => m505(o);
+  Object m507(Object o) => m506(o);
+  Object m508(Object o) => m507(o);
+  Object m509(Object o) => m508(o);
+  Object m510(Object o) => m509(o);
+  Object m511(Object o) => m510(o);
+  Object m512(Object o) => m511(o);
+  Object m513(Object o) => m512(o);
+  Object m514(Object o) => m513(o);
+  Object m515(Object o) => m514(o);
+  Object m516(Object o) => m515(o);
+  Object m517(Object o) => m516(o);
+  Object m518(Object o) => m517(o);
+  Object m519(Object o) => m518(o);
+  Object m520(Object o) => m519(o);
+  Object m521(Object o) => m520(o);
+  Object m522(Object o) => m521(o);
+  Object m523(Object o) => m522(o);
+  Object m524(Object o) => m523(o);
+  Object m525(Object o) => m524(o);
+  Object m526(Object o) => m525(o);
+  Object m527(Object o) => m526(o);
+  Object m528(Object o) => m527(o);
+  Object m529(Object o) => m528(o);
+  Object m530(Object o) => m529(o);
+  Object m531(Object o) => m530(o);
+  Object m532(Object o) => m531(o);
+  Object m533(Object o) => m532(o);
+  Object m534(Object o) => m533(o);
+  Object m535(Object o) => m534(o);
+  Object m536(Object o) => m535(o);
+  Object m537(Object o) => m536(o);
+  Object m538(Object o) => m537(o);
+  Object m539(Object o) => m538(o);
+  Object m540(Object o) => m539(o);
+  Object m541(Object o) => m540(o);
+  Object m542(Object o) => m541(o);
+  Object m543(Object o) => m542(o);
+  Object m544(Object o) => m543(o);
+  Object m545(Object o) => m544(o);
+  Object m546(Object o) => m545(o);
+  Object m547(Object o) => m546(o);
+  Object m548(Object o) => m547(o);
+  Object m549(Object o) => m548(o);
+  Object m550(Object o) => m549(o);
+  Object m551(Object o) => m550(o);
+  Object m552(Object o) => m551(o);
+  Object m553(Object o) => m552(o);
+  Object m554(Object o) => m553(o);
+  Object m555(Object o) => m554(o);
+  Object m556(Object o) => m555(o);
+  Object m557(Object o) => m556(o);
+  Object m558(Object o) => m557(o);
+  Object m559(Object o) => m558(o);
+  Object m560(Object o) => m559(o);
+  Object m561(Object o) => m560(o);
+  Object m562(Object o) => m561(o);
+  Object m563(Object o) => m562(o);
+  Object m564(Object o) => m563(o);
+  Object m565(Object o) => m564(o);
+  Object m566(Object o) => m565(o);
+  Object m567(Object o) => m566(o);
+  Object m568(Object o) => m567(o);
+  Object m569(Object o) => m568(o);
+  Object m570(Object o) => m569(o);
+  Object m571(Object o) => m570(o);
+  Object m572(Object o) => m571(o);
+  Object m573(Object o) => m572(o);
+  Object m574(Object o) => m573(o);
+  Object m575(Object o) => m574(o);
+  Object m576(Object o) => m575(o);
+  Object m577(Object o) => m576(o);
+  Object m578(Object o) => m577(o);
+  Object m579(Object o) => m578(o);
+  Object m580(Object o) => m579(o);
+  Object m581(Object o) => m580(o);
+  Object m582(Object o) => m581(o);
+  Object m583(Object o) => m582(o);
+  Object m584(Object o) => m583(o);
+  Object m585(Object o) => m584(o);
+  Object m586(Object o) => m585(o);
+  Object m587(Object o) => m586(o);
+  Object m588(Object o) => m587(o);
+  Object m589(Object o) => m588(o);
+  Object m590(Object o) => m589(o);
+  Object m591(Object o) => m590(o);
+  Object m592(Object o) => m591(o);
+  Object m593(Object o) => m592(o);
+  Object m594(Object o) => m593(o);
+  Object m595(Object o) => m594(o);
+  Object m596(Object o) => m595(o);
+  Object m597(Object o) => m596(o);
+  Object m598(Object o) => m597(o);
+  Object m599(Object o) => m598(o);
+  Object m600(Object o) => m599(o);
+  Object m601(Object o) => m600(o);
+  Object m602(Object o) => m601(o);
+  Object m603(Object o) => m602(o);
+  Object m604(Object o) => m603(o);
+  Object m605(Object o) => m604(o);
+  Object m606(Object o) => m605(o);
+  Object m607(Object o) => m606(o);
+  Object m608(Object o) => m607(o);
+  Object m609(Object o) => m608(o);
+  Object m610(Object o) => m609(o);
+  Object m611(Object o) => m610(o);
+  Object m612(Object o) => m611(o);
+  Object m613(Object o) => m612(o);
+  Object m614(Object o) => m613(o);
+  Object m615(Object o) => m614(o);
+  Object m616(Object o) => m615(o);
+  Object m617(Object o) => m616(o);
+  Object m618(Object o) => m617(o);
+  Object m619(Object o) => m618(o);
+  Object m620(Object o) => m619(o);
+  Object m621(Object o) => m620(o);
+  Object m622(Object o) => m621(o);
+  Object m623(Object o) => m622(o);
+  Object m624(Object o) => m623(o);
+  Object m625(Object o) => m624(o);
+  Object m626(Object o) => m625(o);
+  Object m627(Object o) => m626(o);
+  Object m628(Object o) => m627(o);
+  Object m629(Object o) => m628(o);
+  Object m630(Object o) => m629(o);
+  Object m631(Object o) => m630(o);
+  Object m632(Object o) => m631(o);
+  Object m633(Object o) => m632(o);
+  Object m634(Object o) => m633(o);
+  Object m635(Object o) => m634(o);
+  Object m636(Object o) => m635(o);
+  Object m637(Object o) => m636(o);
+  Object m638(Object o) => m637(o);
+  Object m639(Object o) => m638(o);
+  Object m640(Object o) => m639(o);
+  Object m641(Object o) => m640(o);
+  Object m642(Object o) => m641(o);
+  Object m643(Object o) => m642(o);
+  Object m644(Object o) => m643(o);
+  Object m645(Object o) => m644(o);
+  Object m646(Object o) => m645(o);
+  Object m647(Object o) => m646(o);
+  Object m648(Object o) => m647(o);
+  Object m649(Object o) => m648(o);
+  Object m650(Object o) => m649(o);
+  Object m651(Object o) => m650(o);
+  Object m652(Object o) => m651(o);
+  Object m653(Object o) => m652(o);
+  Object m654(Object o) => m653(o);
+  Object m655(Object o) => m654(o);
+  Object m656(Object o) => m655(o);
+  Object m657(Object o) => m656(o);
+  Object m658(Object o) => m657(o);
+  Object m659(Object o) => m658(o);
+  Object m660(Object o) => m659(o);
+  Object m661(Object o) => m660(o);
+  Object m662(Object o) => m661(o);
+  Object m663(Object o) => m662(o);
+  Object m664(Object o) => m663(o);
+  Object m665(Object o) => m664(o);
+  Object m666(Object o) => m665(o);
+  Object m667(Object o) => m666(o);
+  Object m668(Object o) => m667(o);
+  Object m669(Object o) => m668(o);
+  Object m670(Object o) => m669(o);
+  Object m671(Object o) => m670(o);
+  Object m672(Object o) => m671(o);
+  Object m673(Object o) => m672(o);
+  Object m674(Object o) => m673(o);
+  Object m675(Object o) => m674(o);
+  Object m676(Object o) => m675(o);
+  Object m677(Object o) => m676(o);
+  Object m678(Object o) => m677(o);
+  Object m679(Object o) => m678(o);
+  Object m680(Object o) => m679(o);
+  Object m681(Object o) => m680(o);
+  Object m682(Object o) => m681(o);
+  Object m683(Object o) => m682(o);
+  Object m684(Object o) => m683(o);
+  Object m685(Object o) => m684(o);
+  Object m686(Object o) => m685(o);
+  Object m687(Object o) => m686(o);
+  Object m688(Object o) => m687(o);
+  Object m689(Object o) => m688(o);
+  Object m690(Object o) => m689(o);
+  Object m691(Object o) => m690(o);
+  Object m692(Object o) => m691(o);
+  Object m693(Object o) => m692(o);
+  Object m694(Object o) => m693(o);
+  Object m695(Object o) => m694(o);
+  Object m696(Object o) => m695(o);
+  Object m697(Object o) => m696(o);
+  Object m698(Object o) => m697(o);
+  Object m699(Object o) => m698(o);
+  Object m700(Object o) => m699(o);
+  Object m701(Object o) => m700(o);
+  Object m702(Object o) => m701(o);
+  Object m703(Object o) => m702(o);
+  Object m704(Object o) => m703(o);
+  Object m705(Object o) => m704(o);
+  Object m706(Object o) => m705(o);
+  Object m707(Object o) => m706(o);
+  Object m708(Object o) => m707(o);
+  Object m709(Object o) => m708(o);
+  Object m710(Object o) => m709(o);
+  Object m711(Object o) => m710(o);
+  Object m712(Object o) => m711(o);
+  Object m713(Object o) => m712(o);
+  Object m714(Object o) => m713(o);
+  Object m715(Object o) => m714(o);
+  Object m716(Object o) => m715(o);
+  Object m717(Object o) => m716(o);
+  Object m718(Object o) => m717(o);
+  Object m719(Object o) => m718(o);
+  Object m720(Object o) => m719(o);
+  Object m721(Object o) => m720(o);
+  Object m722(Object o) => m721(o);
+  Object m723(Object o) => m722(o);
+  Object m724(Object o) => m723(o);
+  Object m725(Object o) => m724(o);
+  Object m726(Object o) => m725(o);
+  Object m727(Object o) => m726(o);
+  Object m728(Object o) => m727(o);
+  Object m729(Object o) => m728(o);
+  Object m730(Object o) => m729(o);
+  Object m731(Object o) => m730(o);
+  Object m732(Object o) => m731(o);
+  Object m733(Object o) => m732(o);
+  Object m734(Object o) => m733(o);
+  Object m735(Object o) => m734(o);
+  Object m736(Object o) => m735(o);
+  Object m737(Object o) => m736(o);
+  Object m738(Object o) => m737(o);
+  Object m739(Object o) => m738(o);
+  Object m740(Object o) => m739(o);
+  Object m741(Object o) => m740(o);
+  Object m742(Object o) => m741(o);
+  Object m743(Object o) => m742(o);
+  Object m744(Object o) => m743(o);
+  Object m745(Object o) => m744(o);
+  Object m746(Object o) => m745(o);
+  Object m747(Object o) => m746(o);
+  Object m748(Object o) => m747(o);
+  Object m749(Object o) => m748(o);
+  Object m750(Object o) => m749(o);
+  Object m751(Object o) => m750(o);
+  Object m752(Object o) => m751(o);
+  Object m753(Object o) => m752(o);
+  Object m754(Object o) => m753(o);
+  Object m755(Object o) => m754(o);
+  Object m756(Object o) => m755(o);
+  Object m757(Object o) => m756(o);
+  Object m758(Object o) => m757(o);
+  Object m759(Object o) => m758(o);
+  Object m760(Object o) => m759(o);
+  Object m761(Object o) => m760(o);
+  Object m762(Object o) => m761(o);
+  Object m763(Object o) => m762(o);
+  Object m764(Object o) => m763(o);
+  Object m765(Object o) => m764(o);
+  Object m766(Object o) => m765(o);
+  Object m767(Object o) => m766(o);
+  Object m768(Object o) => m767(o);
+  Object m769(Object o) => m768(o);
+  Object m770(Object o) => m769(o);
+  Object m771(Object o) => m770(o);
+  Object m772(Object o) => m771(o);
+  Object m773(Object o) => m772(o);
+  Object m774(Object o) => m773(o);
+  Object m775(Object o) => m774(o);
+  Object m776(Object o) => m775(o);
+  Object m777(Object o) => m776(o);
+  Object m778(Object o) => m777(o);
+  Object m779(Object o) => m778(o);
+  Object m780(Object o) => m779(o);
+  Object m781(Object o) => m780(o);
+  Object m782(Object o) => m781(o);
+  Object m783(Object o) => m782(o);
+  Object m784(Object o) => m783(o);
+  Object m785(Object o) => m784(o);
+  Object m786(Object o) => m785(o);
+  Object m787(Object o) => m786(o);
+  Object m788(Object o) => m787(o);
+  Object m789(Object o) => m788(o);
+  Object m790(Object o) => m789(o);
+  Object m791(Object o) => m790(o);
+  Object m792(Object o) => m791(o);
+  Object m793(Object o) => m792(o);
+  Object m794(Object o) => m793(o);
+  Object m795(Object o) => m794(o);
+  Object m796(Object o) => m795(o);
+  Object m797(Object o) => m796(o);
+  Object m798(Object o) => m797(o);
+  Object m799(Object o) => m798(o);
+  Object m800(Object o) => m799(o);
+  Object m801(Object o) => m800(o);
+  Object m802(Object o) => m801(o);
+  Object m803(Object o) => m802(o);
+  Object m804(Object o) => m803(o);
+  Object m805(Object o) => m804(o);
+  Object m806(Object o) => m805(o);
+  Object m807(Object o) => m806(o);
+  Object m808(Object o) => m807(o);
+  Object m809(Object o) => m808(o);
+  Object m810(Object o) => m809(o);
+  Object m811(Object o) => m810(o);
+  Object m812(Object o) => m811(o);
+  Object m813(Object o) => m812(o);
+  Object m814(Object o) => m813(o);
+  Object m815(Object o) => m814(o);
+  Object m816(Object o) => m815(o);
+  Object m817(Object o) => m816(o);
+  Object m818(Object o) => m817(o);
+  Object m819(Object o) => m818(o);
+  Object m820(Object o) => m819(o);
+  Object m821(Object o) => m820(o);
+  Object m822(Object o) => m821(o);
+  Object m823(Object o) => m822(o);
+  Object m824(Object o) => m823(o);
+  Object m825(Object o) => m824(o);
+  Object m826(Object o) => m825(o);
+  Object m827(Object o) => m826(o);
+  Object m828(Object o) => m827(o);
+  Object m829(Object o) => m828(o);
+  Object m830(Object o) => m829(o);
+  Object m831(Object o) => m830(o);
+  Object m832(Object o) => m831(o);
+  Object m833(Object o) => m832(o);
+  Object m834(Object o) => m833(o);
+  Object m835(Object o) => m834(o);
+  Object m836(Object o) => m835(o);
+  Object m837(Object o) => m836(o);
+  Object m838(Object o) => m837(o);
+  Object m839(Object o) => m838(o);
+  Object m840(Object o) => m839(o);
+  Object m841(Object o) => m840(o);
+  Object m842(Object o) => m841(o);
+  Object m843(Object o) => m842(o);
+  Object m844(Object o) => m843(o);
+  Object m845(Object o) => m844(o);
+  Object m846(Object o) => m845(o);
+  Object m847(Object o) => m846(o);
+  Object m848(Object o) => m847(o);
+  Object m849(Object o) => m848(o);
+  Object m850(Object o) => m849(o);
+  Object m851(Object o) => m850(o);
+  Object m852(Object o) => m851(o);
+  Object m853(Object o) => m852(o);
+  Object m854(Object o) => m853(o);
+  Object m855(Object o) => m854(o);
+  Object m856(Object o) => m855(o);
+  Object m857(Object o) => m856(o);
+  Object m858(Object o) => m857(o);
+  Object m859(Object o) => m858(o);
+  Object m860(Object o) => m859(o);
+  Object m861(Object o) => m860(o);
+  Object m862(Object o) => m861(o);
+  Object m863(Object o) => m862(o);
+  Object m864(Object o) => m863(o);
+  Object m865(Object o) => m864(o);
+  Object m866(Object o) => m865(o);
+  Object m867(Object o) => m866(o);
+  Object m868(Object o) => m867(o);
+  Object m869(Object o) => m868(o);
+  Object m870(Object o) => m869(o);
+  Object m871(Object o) => m870(o);
+  Object m872(Object o) => m871(o);
+  Object m873(Object o) => m872(o);
+  Object m874(Object o) => m873(o);
+  Object m875(Object o) => m874(o);
+  Object m876(Object o) => m875(o);
+  Object m877(Object o) => m876(o);
+  Object m878(Object o) => m877(o);
+  Object m879(Object o) => m878(o);
+  Object m880(Object o) => m879(o);
+  Object m881(Object o) => m880(o);
+  Object m882(Object o) => m881(o);
+  Object m883(Object o) => m882(o);
+  Object m884(Object o) => m883(o);
+  Object m885(Object o) => m884(o);
+  Object m886(Object o) => m885(o);
+  Object m887(Object o) => m886(o);
+  Object m888(Object o) => m887(o);
+  Object m889(Object o) => m888(o);
+  Object m890(Object o) => m889(o);
+  Object m891(Object o) => m890(o);
+  Object m892(Object o) => m891(o);
+  Object m893(Object o) => m892(o);
+  Object m894(Object o) => m893(o);
+  Object m895(Object o) => m894(o);
+  Object m896(Object o) => m895(o);
+  Object m897(Object o) => m896(o);
+  Object m898(Object o) => m897(o);
+  Object m899(Object o) => m898(o);
+  Object m900(Object o) => m899(o);
+  Object m901(Object o) => m900(o);
+  Object m902(Object o) => m901(o);
+  Object m903(Object o) => m902(o);
+  Object m904(Object o) => m903(o);
+  Object m905(Object o) => m904(o);
+  Object m906(Object o) => m905(o);
+  Object m907(Object o) => m906(o);
+  Object m908(Object o) => m907(o);
+  Object m909(Object o) => m908(o);
+  Object m910(Object o) => m909(o);
+  Object m911(Object o) => m910(o);
+  Object m912(Object o) => m911(o);
+  Object m913(Object o) => m912(o);
+  Object m914(Object o) => m913(o);
+  Object m915(Object o) => m914(o);
+  Object m916(Object o) => m915(o);
+  Object m917(Object o) => m916(o);
+  Object m918(Object o) => m917(o);
+  Object m919(Object o) => m918(o);
+  Object m920(Object o) => m919(o);
+  Object m921(Object o) => m920(o);
+  Object m922(Object o) => m921(o);
+  Object m923(Object o) => m922(o);
+  Object m924(Object o) => m923(o);
+  Object m925(Object o) => m924(o);
+  Object m926(Object o) => m925(o);
+  Object m927(Object o) => m926(o);
+  Object m928(Object o) => m927(o);
+  Object m929(Object o) => m928(o);
+  Object m930(Object o) => m929(o);
+  Object m931(Object o) => m930(o);
+  Object m932(Object o) => m931(o);
+  Object m933(Object o) => m932(o);
+  Object m934(Object o) => m933(o);
+  Object m935(Object o) => m934(o);
+  Object m936(Object o) => m935(o);
+  Object m937(Object o) => m936(o);
+  Object m938(Object o) => m937(o);
+  Object m939(Object o) => m938(o);
+  Object m940(Object o) => m939(o);
+  Object m941(Object o) => m940(o);
+  Object m942(Object o) => m941(o);
+  Object m943(Object o) => m942(o);
+  Object m944(Object o) => m943(o);
+  Object m945(Object o) => m944(o);
+  Object m946(Object o) => m945(o);
+  Object m947(Object o) => m946(o);
+  Object m948(Object o) => m947(o);
+  Object m949(Object o) => m948(o);
+  Object m950(Object o) => m949(o);
+  Object m951(Object o) => m950(o);
+  Object m952(Object o) => m951(o);
+  Object m953(Object o) => m952(o);
+  Object m954(Object o) => m953(o);
+  Object m955(Object o) => m954(o);
+  Object m956(Object o) => m955(o);
+  Object m957(Object o) => m956(o);
+  Object m958(Object o) => m957(o);
+  Object m959(Object o) => m958(o);
+  Object m960(Object o) => m959(o);
+  Object m961(Object o) => m960(o);
+  Object m962(Object o) => m961(o);
+  Object m963(Object o) => m962(o);
+  Object m964(Object o) => m963(o);
+  Object m965(Object o) => m964(o);
+  Object m966(Object o) => m965(o);
+  Object m967(Object o) => m966(o);
+  Object m968(Object o) => m967(o);
+  Object m969(Object o) => m968(o);
+  Object m970(Object o) => m969(o);
+  Object m971(Object o) => m970(o);
+  Object m972(Object o) => m971(o);
+  Object m973(Object o) => m972(o);
+  Object m974(Object o) => m973(o);
+  Object m975(Object o) => m974(o);
+  Object m976(Object o) => m975(o);
+  Object m977(Object o) => m976(o);
+  Object m978(Object o) => m977(o);
+  Object m979(Object o) => m978(o);
+  Object m980(Object o) => m979(o);
+  Object m981(Object o) => m980(o);
+  Object m982(Object o) => m981(o);
+  Object m983(Object o) => m982(o);
+  Object m984(Object o) => m983(o);
+  Object m985(Object o) => m984(o);
+  Object m986(Object o) => m985(o);
+  Object m987(Object o) => m986(o);
+  Object m988(Object o) => m987(o);
+  Object m989(Object o) => m988(o);
+  Object m990(Object o) => m989(o);
+  Object m991(Object o) => m990(o);
+  Object m992(Object o) => m991(o);
+  Object m993(Object o) => m992(o);
+  Object m994(Object o) => m993(o);
+  Object m995(Object o) => m994(o);
+  Object m996(Object o) => m995(o);
+  Object m997(Object o) => m996(o);
+  Object m998(Object o) => m997(o);
+  Object m999(Object o) => m998(o);
+}
+
+void main() {
+  final x = A().m999(10);
+  Expect.equals(10, x);
+}
diff --git a/runtime/tests/vm/dart_2/regress_flutter_63560_test.dart b/runtime/tests/vm/dart_2/regress_flutter_63560_test.dart
new file mode 100644
index 0000000..717e814
--- /dev/null
+++ b/runtime/tests/vm/dart_2/regress_flutter_63560_test.dart
@@ -0,0 +1,1038 @@
+// 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.
+//
+// Verifies that TFA doesn't crash with stack overflow if program
+// has deeply nested calls.
+// Regression test for https://github.com/flutter/flutter/issues/63560.
+// Generated using the following:
+/*
+void main() {
+  final N = 1000;
+  print("""
+import 'package:expect/expect.dart';
+
+class A {
+  Object m0(Object o) => o;""");
+  for (var i = 1; i < N; i++) {
+    print("  Object m${i}(Object o) => m${i - 1}(o);");
+  }
+  print("""}
+
+void main() {
+  final x = A().m${N - 1}(10);
+  Expect.equals(10, x);
+}
+""");
+}
+ */
+
+import 'package:expect/expect.dart';
+
+class A {
+  Object m0(Object o) => o;
+  Object m1(Object o) => m0(o);
+  Object m2(Object o) => m1(o);
+  Object m3(Object o) => m2(o);
+  Object m4(Object o) => m3(o);
+  Object m5(Object o) => m4(o);
+  Object m6(Object o) => m5(o);
+  Object m7(Object o) => m6(o);
+  Object m8(Object o) => m7(o);
+  Object m9(Object o) => m8(o);
+  Object m10(Object o) => m9(o);
+  Object m11(Object o) => m10(o);
+  Object m12(Object o) => m11(o);
+  Object m13(Object o) => m12(o);
+  Object m14(Object o) => m13(o);
+  Object m15(Object o) => m14(o);
+  Object m16(Object o) => m15(o);
+  Object m17(Object o) => m16(o);
+  Object m18(Object o) => m17(o);
+  Object m19(Object o) => m18(o);
+  Object m20(Object o) => m19(o);
+  Object m21(Object o) => m20(o);
+  Object m22(Object o) => m21(o);
+  Object m23(Object o) => m22(o);
+  Object m24(Object o) => m23(o);
+  Object m25(Object o) => m24(o);
+  Object m26(Object o) => m25(o);
+  Object m27(Object o) => m26(o);
+  Object m28(Object o) => m27(o);
+  Object m29(Object o) => m28(o);
+  Object m30(Object o) => m29(o);
+  Object m31(Object o) => m30(o);
+  Object m32(Object o) => m31(o);
+  Object m33(Object o) => m32(o);
+  Object m34(Object o) => m33(o);
+  Object m35(Object o) => m34(o);
+  Object m36(Object o) => m35(o);
+  Object m37(Object o) => m36(o);
+  Object m38(Object o) => m37(o);
+  Object m39(Object o) => m38(o);
+  Object m40(Object o) => m39(o);
+  Object m41(Object o) => m40(o);
+  Object m42(Object o) => m41(o);
+  Object m43(Object o) => m42(o);
+  Object m44(Object o) => m43(o);
+  Object m45(Object o) => m44(o);
+  Object m46(Object o) => m45(o);
+  Object m47(Object o) => m46(o);
+  Object m48(Object o) => m47(o);
+  Object m49(Object o) => m48(o);
+  Object m50(Object o) => m49(o);
+  Object m51(Object o) => m50(o);
+  Object m52(Object o) => m51(o);
+  Object m53(Object o) => m52(o);
+  Object m54(Object o) => m53(o);
+  Object m55(Object o) => m54(o);
+  Object m56(Object o) => m55(o);
+  Object m57(Object o) => m56(o);
+  Object m58(Object o) => m57(o);
+  Object m59(Object o) => m58(o);
+  Object m60(Object o) => m59(o);
+  Object m61(Object o) => m60(o);
+  Object m62(Object o) => m61(o);
+  Object m63(Object o) => m62(o);
+  Object m64(Object o) => m63(o);
+  Object m65(Object o) => m64(o);
+  Object m66(Object o) => m65(o);
+  Object m67(Object o) => m66(o);
+  Object m68(Object o) => m67(o);
+  Object m69(Object o) => m68(o);
+  Object m70(Object o) => m69(o);
+  Object m71(Object o) => m70(o);
+  Object m72(Object o) => m71(o);
+  Object m73(Object o) => m72(o);
+  Object m74(Object o) => m73(o);
+  Object m75(Object o) => m74(o);
+  Object m76(Object o) => m75(o);
+  Object m77(Object o) => m76(o);
+  Object m78(Object o) => m77(o);
+  Object m79(Object o) => m78(o);
+  Object m80(Object o) => m79(o);
+  Object m81(Object o) => m80(o);
+  Object m82(Object o) => m81(o);
+  Object m83(Object o) => m82(o);
+  Object m84(Object o) => m83(o);
+  Object m85(Object o) => m84(o);
+  Object m86(Object o) => m85(o);
+  Object m87(Object o) => m86(o);
+  Object m88(Object o) => m87(o);
+  Object m89(Object o) => m88(o);
+  Object m90(Object o) => m89(o);
+  Object m91(Object o) => m90(o);
+  Object m92(Object o) => m91(o);
+  Object m93(Object o) => m92(o);
+  Object m94(Object o) => m93(o);
+  Object m95(Object o) => m94(o);
+  Object m96(Object o) => m95(o);
+  Object m97(Object o) => m96(o);
+  Object m98(Object o) => m97(o);
+  Object m99(Object o) => m98(o);
+  Object m100(Object o) => m99(o);
+  Object m101(Object o) => m100(o);
+  Object m102(Object o) => m101(o);
+  Object m103(Object o) => m102(o);
+  Object m104(Object o) => m103(o);
+  Object m105(Object o) => m104(o);
+  Object m106(Object o) => m105(o);
+  Object m107(Object o) => m106(o);
+  Object m108(Object o) => m107(o);
+  Object m109(Object o) => m108(o);
+  Object m110(Object o) => m109(o);
+  Object m111(Object o) => m110(o);
+  Object m112(Object o) => m111(o);
+  Object m113(Object o) => m112(o);
+  Object m114(Object o) => m113(o);
+  Object m115(Object o) => m114(o);
+  Object m116(Object o) => m115(o);
+  Object m117(Object o) => m116(o);
+  Object m118(Object o) => m117(o);
+  Object m119(Object o) => m118(o);
+  Object m120(Object o) => m119(o);
+  Object m121(Object o) => m120(o);
+  Object m122(Object o) => m121(o);
+  Object m123(Object o) => m122(o);
+  Object m124(Object o) => m123(o);
+  Object m125(Object o) => m124(o);
+  Object m126(Object o) => m125(o);
+  Object m127(Object o) => m126(o);
+  Object m128(Object o) => m127(o);
+  Object m129(Object o) => m128(o);
+  Object m130(Object o) => m129(o);
+  Object m131(Object o) => m130(o);
+  Object m132(Object o) => m131(o);
+  Object m133(Object o) => m132(o);
+  Object m134(Object o) => m133(o);
+  Object m135(Object o) => m134(o);
+  Object m136(Object o) => m135(o);
+  Object m137(Object o) => m136(o);
+  Object m138(Object o) => m137(o);
+  Object m139(Object o) => m138(o);
+  Object m140(Object o) => m139(o);
+  Object m141(Object o) => m140(o);
+  Object m142(Object o) => m141(o);
+  Object m143(Object o) => m142(o);
+  Object m144(Object o) => m143(o);
+  Object m145(Object o) => m144(o);
+  Object m146(Object o) => m145(o);
+  Object m147(Object o) => m146(o);
+  Object m148(Object o) => m147(o);
+  Object m149(Object o) => m148(o);
+  Object m150(Object o) => m149(o);
+  Object m151(Object o) => m150(o);
+  Object m152(Object o) => m151(o);
+  Object m153(Object o) => m152(o);
+  Object m154(Object o) => m153(o);
+  Object m155(Object o) => m154(o);
+  Object m156(Object o) => m155(o);
+  Object m157(Object o) => m156(o);
+  Object m158(Object o) => m157(o);
+  Object m159(Object o) => m158(o);
+  Object m160(Object o) => m159(o);
+  Object m161(Object o) => m160(o);
+  Object m162(Object o) => m161(o);
+  Object m163(Object o) => m162(o);
+  Object m164(Object o) => m163(o);
+  Object m165(Object o) => m164(o);
+  Object m166(Object o) => m165(o);
+  Object m167(Object o) => m166(o);
+  Object m168(Object o) => m167(o);
+  Object m169(Object o) => m168(o);
+  Object m170(Object o) => m169(o);
+  Object m171(Object o) => m170(o);
+  Object m172(Object o) => m171(o);
+  Object m173(Object o) => m172(o);
+  Object m174(Object o) => m173(o);
+  Object m175(Object o) => m174(o);
+  Object m176(Object o) => m175(o);
+  Object m177(Object o) => m176(o);
+  Object m178(Object o) => m177(o);
+  Object m179(Object o) => m178(o);
+  Object m180(Object o) => m179(o);
+  Object m181(Object o) => m180(o);
+  Object m182(Object o) => m181(o);
+  Object m183(Object o) => m182(o);
+  Object m184(Object o) => m183(o);
+  Object m185(Object o) => m184(o);
+  Object m186(Object o) => m185(o);
+  Object m187(Object o) => m186(o);
+  Object m188(Object o) => m187(o);
+  Object m189(Object o) => m188(o);
+  Object m190(Object o) => m189(o);
+  Object m191(Object o) => m190(o);
+  Object m192(Object o) => m191(o);
+  Object m193(Object o) => m192(o);
+  Object m194(Object o) => m193(o);
+  Object m195(Object o) => m194(o);
+  Object m196(Object o) => m195(o);
+  Object m197(Object o) => m196(o);
+  Object m198(Object o) => m197(o);
+  Object m199(Object o) => m198(o);
+  Object m200(Object o) => m199(o);
+  Object m201(Object o) => m200(o);
+  Object m202(Object o) => m201(o);
+  Object m203(Object o) => m202(o);
+  Object m204(Object o) => m203(o);
+  Object m205(Object o) => m204(o);
+  Object m206(Object o) => m205(o);
+  Object m207(Object o) => m206(o);
+  Object m208(Object o) => m207(o);
+  Object m209(Object o) => m208(o);
+  Object m210(Object o) => m209(o);
+  Object m211(Object o) => m210(o);
+  Object m212(Object o) => m211(o);
+  Object m213(Object o) => m212(o);
+  Object m214(Object o) => m213(o);
+  Object m215(Object o) => m214(o);
+  Object m216(Object o) => m215(o);
+  Object m217(Object o) => m216(o);
+  Object m218(Object o) => m217(o);
+  Object m219(Object o) => m218(o);
+  Object m220(Object o) => m219(o);
+  Object m221(Object o) => m220(o);
+  Object m222(Object o) => m221(o);
+  Object m223(Object o) => m222(o);
+  Object m224(Object o) => m223(o);
+  Object m225(Object o) => m224(o);
+  Object m226(Object o) => m225(o);
+  Object m227(Object o) => m226(o);
+  Object m228(Object o) => m227(o);
+  Object m229(Object o) => m228(o);
+  Object m230(Object o) => m229(o);
+  Object m231(Object o) => m230(o);
+  Object m232(Object o) => m231(o);
+  Object m233(Object o) => m232(o);
+  Object m234(Object o) => m233(o);
+  Object m235(Object o) => m234(o);
+  Object m236(Object o) => m235(o);
+  Object m237(Object o) => m236(o);
+  Object m238(Object o) => m237(o);
+  Object m239(Object o) => m238(o);
+  Object m240(Object o) => m239(o);
+  Object m241(Object o) => m240(o);
+  Object m242(Object o) => m241(o);
+  Object m243(Object o) => m242(o);
+  Object m244(Object o) => m243(o);
+  Object m245(Object o) => m244(o);
+  Object m246(Object o) => m245(o);
+  Object m247(Object o) => m246(o);
+  Object m248(Object o) => m247(o);
+  Object m249(Object o) => m248(o);
+  Object m250(Object o) => m249(o);
+  Object m251(Object o) => m250(o);
+  Object m252(Object o) => m251(o);
+  Object m253(Object o) => m252(o);
+  Object m254(Object o) => m253(o);
+  Object m255(Object o) => m254(o);
+  Object m256(Object o) => m255(o);
+  Object m257(Object o) => m256(o);
+  Object m258(Object o) => m257(o);
+  Object m259(Object o) => m258(o);
+  Object m260(Object o) => m259(o);
+  Object m261(Object o) => m260(o);
+  Object m262(Object o) => m261(o);
+  Object m263(Object o) => m262(o);
+  Object m264(Object o) => m263(o);
+  Object m265(Object o) => m264(o);
+  Object m266(Object o) => m265(o);
+  Object m267(Object o) => m266(o);
+  Object m268(Object o) => m267(o);
+  Object m269(Object o) => m268(o);
+  Object m270(Object o) => m269(o);
+  Object m271(Object o) => m270(o);
+  Object m272(Object o) => m271(o);
+  Object m273(Object o) => m272(o);
+  Object m274(Object o) => m273(o);
+  Object m275(Object o) => m274(o);
+  Object m276(Object o) => m275(o);
+  Object m277(Object o) => m276(o);
+  Object m278(Object o) => m277(o);
+  Object m279(Object o) => m278(o);
+  Object m280(Object o) => m279(o);
+  Object m281(Object o) => m280(o);
+  Object m282(Object o) => m281(o);
+  Object m283(Object o) => m282(o);
+  Object m284(Object o) => m283(o);
+  Object m285(Object o) => m284(o);
+  Object m286(Object o) => m285(o);
+  Object m287(Object o) => m286(o);
+  Object m288(Object o) => m287(o);
+  Object m289(Object o) => m288(o);
+  Object m290(Object o) => m289(o);
+  Object m291(Object o) => m290(o);
+  Object m292(Object o) => m291(o);
+  Object m293(Object o) => m292(o);
+  Object m294(Object o) => m293(o);
+  Object m295(Object o) => m294(o);
+  Object m296(Object o) => m295(o);
+  Object m297(Object o) => m296(o);
+  Object m298(Object o) => m297(o);
+  Object m299(Object o) => m298(o);
+  Object m300(Object o) => m299(o);
+  Object m301(Object o) => m300(o);
+  Object m302(Object o) => m301(o);
+  Object m303(Object o) => m302(o);
+  Object m304(Object o) => m303(o);
+  Object m305(Object o) => m304(o);
+  Object m306(Object o) => m305(o);
+  Object m307(Object o) => m306(o);
+  Object m308(Object o) => m307(o);
+  Object m309(Object o) => m308(o);
+  Object m310(Object o) => m309(o);
+  Object m311(Object o) => m310(o);
+  Object m312(Object o) => m311(o);
+  Object m313(Object o) => m312(o);
+  Object m314(Object o) => m313(o);
+  Object m315(Object o) => m314(o);
+  Object m316(Object o) => m315(o);
+  Object m317(Object o) => m316(o);
+  Object m318(Object o) => m317(o);
+  Object m319(Object o) => m318(o);
+  Object m320(Object o) => m319(o);
+  Object m321(Object o) => m320(o);
+  Object m322(Object o) => m321(o);
+  Object m323(Object o) => m322(o);
+  Object m324(Object o) => m323(o);
+  Object m325(Object o) => m324(o);
+  Object m326(Object o) => m325(o);
+  Object m327(Object o) => m326(o);
+  Object m328(Object o) => m327(o);
+  Object m329(Object o) => m328(o);
+  Object m330(Object o) => m329(o);
+  Object m331(Object o) => m330(o);
+  Object m332(Object o) => m331(o);
+  Object m333(Object o) => m332(o);
+  Object m334(Object o) => m333(o);
+  Object m335(Object o) => m334(o);
+  Object m336(Object o) => m335(o);
+  Object m337(Object o) => m336(o);
+  Object m338(Object o) => m337(o);
+  Object m339(Object o) => m338(o);
+  Object m340(Object o) => m339(o);
+  Object m341(Object o) => m340(o);
+  Object m342(Object o) => m341(o);
+  Object m343(Object o) => m342(o);
+  Object m344(Object o) => m343(o);
+  Object m345(Object o) => m344(o);
+  Object m346(Object o) => m345(o);
+  Object m347(Object o) => m346(o);
+  Object m348(Object o) => m347(o);
+  Object m349(Object o) => m348(o);
+  Object m350(Object o) => m349(o);
+  Object m351(Object o) => m350(o);
+  Object m352(Object o) => m351(o);
+  Object m353(Object o) => m352(o);
+  Object m354(Object o) => m353(o);
+  Object m355(Object o) => m354(o);
+  Object m356(Object o) => m355(o);
+  Object m357(Object o) => m356(o);
+  Object m358(Object o) => m357(o);
+  Object m359(Object o) => m358(o);
+  Object m360(Object o) => m359(o);
+  Object m361(Object o) => m360(o);
+  Object m362(Object o) => m361(o);
+  Object m363(Object o) => m362(o);
+  Object m364(Object o) => m363(o);
+  Object m365(Object o) => m364(o);
+  Object m366(Object o) => m365(o);
+  Object m367(Object o) => m366(o);
+  Object m368(Object o) => m367(o);
+  Object m369(Object o) => m368(o);
+  Object m370(Object o) => m369(o);
+  Object m371(Object o) => m370(o);
+  Object m372(Object o) => m371(o);
+  Object m373(Object o) => m372(o);
+  Object m374(Object o) => m373(o);
+  Object m375(Object o) => m374(o);
+  Object m376(Object o) => m375(o);
+  Object m377(Object o) => m376(o);
+  Object m378(Object o) => m377(o);
+  Object m379(Object o) => m378(o);
+  Object m380(Object o) => m379(o);
+  Object m381(Object o) => m380(o);
+  Object m382(Object o) => m381(o);
+  Object m383(Object o) => m382(o);
+  Object m384(Object o) => m383(o);
+  Object m385(Object o) => m384(o);
+  Object m386(Object o) => m385(o);
+  Object m387(Object o) => m386(o);
+  Object m388(Object o) => m387(o);
+  Object m389(Object o) => m388(o);
+  Object m390(Object o) => m389(o);
+  Object m391(Object o) => m390(o);
+  Object m392(Object o) => m391(o);
+  Object m393(Object o) => m392(o);
+  Object m394(Object o) => m393(o);
+  Object m395(Object o) => m394(o);
+  Object m396(Object o) => m395(o);
+  Object m397(Object o) => m396(o);
+  Object m398(Object o) => m397(o);
+  Object m399(Object o) => m398(o);
+  Object m400(Object o) => m399(o);
+  Object m401(Object o) => m400(o);
+  Object m402(Object o) => m401(o);
+  Object m403(Object o) => m402(o);
+  Object m404(Object o) => m403(o);
+  Object m405(Object o) => m404(o);
+  Object m406(Object o) => m405(o);
+  Object m407(Object o) => m406(o);
+  Object m408(Object o) => m407(o);
+  Object m409(Object o) => m408(o);
+  Object m410(Object o) => m409(o);
+  Object m411(Object o) => m410(o);
+  Object m412(Object o) => m411(o);
+  Object m413(Object o) => m412(o);
+  Object m414(Object o) => m413(o);
+  Object m415(Object o) => m414(o);
+  Object m416(Object o) => m415(o);
+  Object m417(Object o) => m416(o);
+  Object m418(Object o) => m417(o);
+  Object m419(Object o) => m418(o);
+  Object m420(Object o) => m419(o);
+  Object m421(Object o) => m420(o);
+  Object m422(Object o) => m421(o);
+  Object m423(Object o) => m422(o);
+  Object m424(Object o) => m423(o);
+  Object m425(Object o) => m424(o);
+  Object m426(Object o) => m425(o);
+  Object m427(Object o) => m426(o);
+  Object m428(Object o) => m427(o);
+  Object m429(Object o) => m428(o);
+  Object m430(Object o) => m429(o);
+  Object m431(Object o) => m430(o);
+  Object m432(Object o) => m431(o);
+  Object m433(Object o) => m432(o);
+  Object m434(Object o) => m433(o);
+  Object m435(Object o) => m434(o);
+  Object m436(Object o) => m435(o);
+  Object m437(Object o) => m436(o);
+  Object m438(Object o) => m437(o);
+  Object m439(Object o) => m438(o);
+  Object m440(Object o) => m439(o);
+  Object m441(Object o) => m440(o);
+  Object m442(Object o) => m441(o);
+  Object m443(Object o) => m442(o);
+  Object m444(Object o) => m443(o);
+  Object m445(Object o) => m444(o);
+  Object m446(Object o) => m445(o);
+  Object m447(Object o) => m446(o);
+  Object m448(Object o) => m447(o);
+  Object m449(Object o) => m448(o);
+  Object m450(Object o) => m449(o);
+  Object m451(Object o) => m450(o);
+  Object m452(Object o) => m451(o);
+  Object m453(Object o) => m452(o);
+  Object m454(Object o) => m453(o);
+  Object m455(Object o) => m454(o);
+  Object m456(Object o) => m455(o);
+  Object m457(Object o) => m456(o);
+  Object m458(Object o) => m457(o);
+  Object m459(Object o) => m458(o);
+  Object m460(Object o) => m459(o);
+  Object m461(Object o) => m460(o);
+  Object m462(Object o) => m461(o);
+  Object m463(Object o) => m462(o);
+  Object m464(Object o) => m463(o);
+  Object m465(Object o) => m464(o);
+  Object m466(Object o) => m465(o);
+  Object m467(Object o) => m466(o);
+  Object m468(Object o) => m467(o);
+  Object m469(Object o) => m468(o);
+  Object m470(Object o) => m469(o);
+  Object m471(Object o) => m470(o);
+  Object m472(Object o) => m471(o);
+  Object m473(Object o) => m472(o);
+  Object m474(Object o) => m473(o);
+  Object m475(Object o) => m474(o);
+  Object m476(Object o) => m475(o);
+  Object m477(Object o) => m476(o);
+  Object m478(Object o) => m477(o);
+  Object m479(Object o) => m478(o);
+  Object m480(Object o) => m479(o);
+  Object m481(Object o) => m480(o);
+  Object m482(Object o) => m481(o);
+  Object m483(Object o) => m482(o);
+  Object m484(Object o) => m483(o);
+  Object m485(Object o) => m484(o);
+  Object m486(Object o) => m485(o);
+  Object m487(Object o) => m486(o);
+  Object m488(Object o) => m487(o);
+  Object m489(Object o) => m488(o);
+  Object m490(Object o) => m489(o);
+  Object m491(Object o) => m490(o);
+  Object m492(Object o) => m491(o);
+  Object m493(Object o) => m492(o);
+  Object m494(Object o) => m493(o);
+  Object m495(Object o) => m494(o);
+  Object m496(Object o) => m495(o);
+  Object m497(Object o) => m496(o);
+  Object m498(Object o) => m497(o);
+  Object m499(Object o) => m498(o);
+  Object m500(Object o) => m499(o);
+  Object m501(Object o) => m500(o);
+  Object m502(Object o) => m501(o);
+  Object m503(Object o) => m502(o);
+  Object m504(Object o) => m503(o);
+  Object m505(Object o) => m504(o);
+  Object m506(Object o) => m505(o);
+  Object m507(Object o) => m506(o);
+  Object m508(Object o) => m507(o);
+  Object m509(Object o) => m508(o);
+  Object m510(Object o) => m509(o);
+  Object m511(Object o) => m510(o);
+  Object m512(Object o) => m511(o);
+  Object m513(Object o) => m512(o);
+  Object m514(Object o) => m513(o);
+  Object m515(Object o) => m514(o);
+  Object m516(Object o) => m515(o);
+  Object m517(Object o) => m516(o);
+  Object m518(Object o) => m517(o);
+  Object m519(Object o) => m518(o);
+  Object m520(Object o) => m519(o);
+  Object m521(Object o) => m520(o);
+  Object m522(Object o) => m521(o);
+  Object m523(Object o) => m522(o);
+  Object m524(Object o) => m523(o);
+  Object m525(Object o) => m524(o);
+  Object m526(Object o) => m525(o);
+  Object m527(Object o) => m526(o);
+  Object m528(Object o) => m527(o);
+  Object m529(Object o) => m528(o);
+  Object m530(Object o) => m529(o);
+  Object m531(Object o) => m530(o);
+  Object m532(Object o) => m531(o);
+  Object m533(Object o) => m532(o);
+  Object m534(Object o) => m533(o);
+  Object m535(Object o) => m534(o);
+  Object m536(Object o) => m535(o);
+  Object m537(Object o) => m536(o);
+  Object m538(Object o) => m537(o);
+  Object m539(Object o) => m538(o);
+  Object m540(Object o) => m539(o);
+  Object m541(Object o) => m540(o);
+  Object m542(Object o) => m541(o);
+  Object m543(Object o) => m542(o);
+  Object m544(Object o) => m543(o);
+  Object m545(Object o) => m544(o);
+  Object m546(Object o) => m545(o);
+  Object m547(Object o) => m546(o);
+  Object m548(Object o) => m547(o);
+  Object m549(Object o) => m548(o);
+  Object m550(Object o) => m549(o);
+  Object m551(Object o) => m550(o);
+  Object m552(Object o) => m551(o);
+  Object m553(Object o) => m552(o);
+  Object m554(Object o) => m553(o);
+  Object m555(Object o) => m554(o);
+  Object m556(Object o) => m555(o);
+  Object m557(Object o) => m556(o);
+  Object m558(Object o) => m557(o);
+  Object m559(Object o) => m558(o);
+  Object m560(Object o) => m559(o);
+  Object m561(Object o) => m560(o);
+  Object m562(Object o) => m561(o);
+  Object m563(Object o) => m562(o);
+  Object m564(Object o) => m563(o);
+  Object m565(Object o) => m564(o);
+  Object m566(Object o) => m565(o);
+  Object m567(Object o) => m566(o);
+  Object m568(Object o) => m567(o);
+  Object m569(Object o) => m568(o);
+  Object m570(Object o) => m569(o);
+  Object m571(Object o) => m570(o);
+  Object m572(Object o) => m571(o);
+  Object m573(Object o) => m572(o);
+  Object m574(Object o) => m573(o);
+  Object m575(Object o) => m574(o);
+  Object m576(Object o) => m575(o);
+  Object m577(Object o) => m576(o);
+  Object m578(Object o) => m577(o);
+  Object m579(Object o) => m578(o);
+  Object m580(Object o) => m579(o);
+  Object m581(Object o) => m580(o);
+  Object m582(Object o) => m581(o);
+  Object m583(Object o) => m582(o);
+  Object m584(Object o) => m583(o);
+  Object m585(Object o) => m584(o);
+  Object m586(Object o) => m585(o);
+  Object m587(Object o) => m586(o);
+  Object m588(Object o) => m587(o);
+  Object m589(Object o) => m588(o);
+  Object m590(Object o) => m589(o);
+  Object m591(Object o) => m590(o);
+  Object m592(Object o) => m591(o);
+  Object m593(Object o) => m592(o);
+  Object m594(Object o) => m593(o);
+  Object m595(Object o) => m594(o);
+  Object m596(Object o) => m595(o);
+  Object m597(Object o) => m596(o);
+  Object m598(Object o) => m597(o);
+  Object m599(Object o) => m598(o);
+  Object m600(Object o) => m599(o);
+  Object m601(Object o) => m600(o);
+  Object m602(Object o) => m601(o);
+  Object m603(Object o) => m602(o);
+  Object m604(Object o) => m603(o);
+  Object m605(Object o) => m604(o);
+  Object m606(Object o) => m605(o);
+  Object m607(Object o) => m606(o);
+  Object m608(Object o) => m607(o);
+  Object m609(Object o) => m608(o);
+  Object m610(Object o) => m609(o);
+  Object m611(Object o) => m610(o);
+  Object m612(Object o) => m611(o);
+  Object m613(Object o) => m612(o);
+  Object m614(Object o) => m613(o);
+  Object m615(Object o) => m614(o);
+  Object m616(Object o) => m615(o);
+  Object m617(Object o) => m616(o);
+  Object m618(Object o) => m617(o);
+  Object m619(Object o) => m618(o);
+  Object m620(Object o) => m619(o);
+  Object m621(Object o) => m620(o);
+  Object m622(Object o) => m621(o);
+  Object m623(Object o) => m622(o);
+  Object m624(Object o) => m623(o);
+  Object m625(Object o) => m624(o);
+  Object m626(Object o) => m625(o);
+  Object m627(Object o) => m626(o);
+  Object m628(Object o) => m627(o);
+  Object m629(Object o) => m628(o);
+  Object m630(Object o) => m629(o);
+  Object m631(Object o) => m630(o);
+  Object m632(Object o) => m631(o);
+  Object m633(Object o) => m632(o);
+  Object m634(Object o) => m633(o);
+  Object m635(Object o) => m634(o);
+  Object m636(Object o) => m635(o);
+  Object m637(Object o) => m636(o);
+  Object m638(Object o) => m637(o);
+  Object m639(Object o) => m638(o);
+  Object m640(Object o) => m639(o);
+  Object m641(Object o) => m640(o);
+  Object m642(Object o) => m641(o);
+  Object m643(Object o) => m642(o);
+  Object m644(Object o) => m643(o);
+  Object m645(Object o) => m644(o);
+  Object m646(Object o) => m645(o);
+  Object m647(Object o) => m646(o);
+  Object m648(Object o) => m647(o);
+  Object m649(Object o) => m648(o);
+  Object m650(Object o) => m649(o);
+  Object m651(Object o) => m650(o);
+  Object m652(Object o) => m651(o);
+  Object m653(Object o) => m652(o);
+  Object m654(Object o) => m653(o);
+  Object m655(Object o) => m654(o);
+  Object m656(Object o) => m655(o);
+  Object m657(Object o) => m656(o);
+  Object m658(Object o) => m657(o);
+  Object m659(Object o) => m658(o);
+  Object m660(Object o) => m659(o);
+  Object m661(Object o) => m660(o);
+  Object m662(Object o) => m661(o);
+  Object m663(Object o) => m662(o);
+  Object m664(Object o) => m663(o);
+  Object m665(Object o) => m664(o);
+  Object m666(Object o) => m665(o);
+  Object m667(Object o) => m666(o);
+  Object m668(Object o) => m667(o);
+  Object m669(Object o) => m668(o);
+  Object m670(Object o) => m669(o);
+  Object m671(Object o) => m670(o);
+  Object m672(Object o) => m671(o);
+  Object m673(Object o) => m672(o);
+  Object m674(Object o) => m673(o);
+  Object m675(Object o) => m674(o);
+  Object m676(Object o) => m675(o);
+  Object m677(Object o) => m676(o);
+  Object m678(Object o) => m677(o);
+  Object m679(Object o) => m678(o);
+  Object m680(Object o) => m679(o);
+  Object m681(Object o) => m680(o);
+  Object m682(Object o) => m681(o);
+  Object m683(Object o) => m682(o);
+  Object m684(Object o) => m683(o);
+  Object m685(Object o) => m684(o);
+  Object m686(Object o) => m685(o);
+  Object m687(Object o) => m686(o);
+  Object m688(Object o) => m687(o);
+  Object m689(Object o) => m688(o);
+  Object m690(Object o) => m689(o);
+  Object m691(Object o) => m690(o);
+  Object m692(Object o) => m691(o);
+  Object m693(Object o) => m692(o);
+  Object m694(Object o) => m693(o);
+  Object m695(Object o) => m694(o);
+  Object m696(Object o) => m695(o);
+  Object m697(Object o) => m696(o);
+  Object m698(Object o) => m697(o);
+  Object m699(Object o) => m698(o);
+  Object m700(Object o) => m699(o);
+  Object m701(Object o) => m700(o);
+  Object m702(Object o) => m701(o);
+  Object m703(Object o) => m702(o);
+  Object m704(Object o) => m703(o);
+  Object m705(Object o) => m704(o);
+  Object m706(Object o) => m705(o);
+  Object m707(Object o) => m706(o);
+  Object m708(Object o) => m707(o);
+  Object m709(Object o) => m708(o);
+  Object m710(Object o) => m709(o);
+  Object m711(Object o) => m710(o);
+  Object m712(Object o) => m711(o);
+  Object m713(Object o) => m712(o);
+  Object m714(Object o) => m713(o);
+  Object m715(Object o) => m714(o);
+  Object m716(Object o) => m715(o);
+  Object m717(Object o) => m716(o);
+  Object m718(Object o) => m717(o);
+  Object m719(Object o) => m718(o);
+  Object m720(Object o) => m719(o);
+  Object m721(Object o) => m720(o);
+  Object m722(Object o) => m721(o);
+  Object m723(Object o) => m722(o);
+  Object m724(Object o) => m723(o);
+  Object m725(Object o) => m724(o);
+  Object m726(Object o) => m725(o);
+  Object m727(Object o) => m726(o);
+  Object m728(Object o) => m727(o);
+  Object m729(Object o) => m728(o);
+  Object m730(Object o) => m729(o);
+  Object m731(Object o) => m730(o);
+  Object m732(Object o) => m731(o);
+  Object m733(Object o) => m732(o);
+  Object m734(Object o) => m733(o);
+  Object m735(Object o) => m734(o);
+  Object m736(Object o) => m735(o);
+  Object m737(Object o) => m736(o);
+  Object m738(Object o) => m737(o);
+  Object m739(Object o) => m738(o);
+  Object m740(Object o) => m739(o);
+  Object m741(Object o) => m740(o);
+  Object m742(Object o) => m741(o);
+  Object m743(Object o) => m742(o);
+  Object m744(Object o) => m743(o);
+  Object m745(Object o) => m744(o);
+  Object m746(Object o) => m745(o);
+  Object m747(Object o) => m746(o);
+  Object m748(Object o) => m747(o);
+  Object m749(Object o) => m748(o);
+  Object m750(Object o) => m749(o);
+  Object m751(Object o) => m750(o);
+  Object m752(Object o) => m751(o);
+  Object m753(Object o) => m752(o);
+  Object m754(Object o) => m753(o);
+  Object m755(Object o) => m754(o);
+  Object m756(Object o) => m755(o);
+  Object m757(Object o) => m756(o);
+  Object m758(Object o) => m757(o);
+  Object m759(Object o) => m758(o);
+  Object m760(Object o) => m759(o);
+  Object m761(Object o) => m760(o);
+  Object m762(Object o) => m761(o);
+  Object m763(Object o) => m762(o);
+  Object m764(Object o) => m763(o);
+  Object m765(Object o) => m764(o);
+  Object m766(Object o) => m765(o);
+  Object m767(Object o) => m766(o);
+  Object m768(Object o) => m767(o);
+  Object m769(Object o) => m768(o);
+  Object m770(Object o) => m769(o);
+  Object m771(Object o) => m770(o);
+  Object m772(Object o) => m771(o);
+  Object m773(Object o) => m772(o);
+  Object m774(Object o) => m773(o);
+  Object m775(Object o) => m774(o);
+  Object m776(Object o) => m775(o);
+  Object m777(Object o) => m776(o);
+  Object m778(Object o) => m777(o);
+  Object m779(Object o) => m778(o);
+  Object m780(Object o) => m779(o);
+  Object m781(Object o) => m780(o);
+  Object m782(Object o) => m781(o);
+  Object m783(Object o) => m782(o);
+  Object m784(Object o) => m783(o);
+  Object m785(Object o) => m784(o);
+  Object m786(Object o) => m785(o);
+  Object m787(Object o) => m786(o);
+  Object m788(Object o) => m787(o);
+  Object m789(Object o) => m788(o);
+  Object m790(Object o) => m789(o);
+  Object m791(Object o) => m790(o);
+  Object m792(Object o) => m791(o);
+  Object m793(Object o) => m792(o);
+  Object m794(Object o) => m793(o);
+  Object m795(Object o) => m794(o);
+  Object m796(Object o) => m795(o);
+  Object m797(Object o) => m796(o);
+  Object m798(Object o) => m797(o);
+  Object m799(Object o) => m798(o);
+  Object m800(Object o) => m799(o);
+  Object m801(Object o) => m800(o);
+  Object m802(Object o) => m801(o);
+  Object m803(Object o) => m802(o);
+  Object m804(Object o) => m803(o);
+  Object m805(Object o) => m804(o);
+  Object m806(Object o) => m805(o);
+  Object m807(Object o) => m806(o);
+  Object m808(Object o) => m807(o);
+  Object m809(Object o) => m808(o);
+  Object m810(Object o) => m809(o);
+  Object m811(Object o) => m810(o);
+  Object m812(Object o) => m811(o);
+  Object m813(Object o) => m812(o);
+  Object m814(Object o) => m813(o);
+  Object m815(Object o) => m814(o);
+  Object m816(Object o) => m815(o);
+  Object m817(Object o) => m816(o);
+  Object m818(Object o) => m817(o);
+  Object m819(Object o) => m818(o);
+  Object m820(Object o) => m819(o);
+  Object m821(Object o) => m820(o);
+  Object m822(Object o) => m821(o);
+  Object m823(Object o) => m822(o);
+  Object m824(Object o) => m823(o);
+  Object m825(Object o) => m824(o);
+  Object m826(Object o) => m825(o);
+  Object m827(Object o) => m826(o);
+  Object m828(Object o) => m827(o);
+  Object m829(Object o) => m828(o);
+  Object m830(Object o) => m829(o);
+  Object m831(Object o) => m830(o);
+  Object m832(Object o) => m831(o);
+  Object m833(Object o) => m832(o);
+  Object m834(Object o) => m833(o);
+  Object m835(Object o) => m834(o);
+  Object m836(Object o) => m835(o);
+  Object m837(Object o) => m836(o);
+  Object m838(Object o) => m837(o);
+  Object m839(Object o) => m838(o);
+  Object m840(Object o) => m839(o);
+  Object m841(Object o) => m840(o);
+  Object m842(Object o) => m841(o);
+  Object m843(Object o) => m842(o);
+  Object m844(Object o) => m843(o);
+  Object m845(Object o) => m844(o);
+  Object m846(Object o) => m845(o);
+  Object m847(Object o) => m846(o);
+  Object m848(Object o) => m847(o);
+  Object m849(Object o) => m848(o);
+  Object m850(Object o) => m849(o);
+  Object m851(Object o) => m850(o);
+  Object m852(Object o) => m851(o);
+  Object m853(Object o) => m852(o);
+  Object m854(Object o) => m853(o);
+  Object m855(Object o) => m854(o);
+  Object m856(Object o) => m855(o);
+  Object m857(Object o) => m856(o);
+  Object m858(Object o) => m857(o);
+  Object m859(Object o) => m858(o);
+  Object m860(Object o) => m859(o);
+  Object m861(Object o) => m860(o);
+  Object m862(Object o) => m861(o);
+  Object m863(Object o) => m862(o);
+  Object m864(Object o) => m863(o);
+  Object m865(Object o) => m864(o);
+  Object m866(Object o) => m865(o);
+  Object m867(Object o) => m866(o);
+  Object m868(Object o) => m867(o);
+  Object m869(Object o) => m868(o);
+  Object m870(Object o) => m869(o);
+  Object m871(Object o) => m870(o);
+  Object m872(Object o) => m871(o);
+  Object m873(Object o) => m872(o);
+  Object m874(Object o) => m873(o);
+  Object m875(Object o) => m874(o);
+  Object m876(Object o) => m875(o);
+  Object m877(Object o) => m876(o);
+  Object m878(Object o) => m877(o);
+  Object m879(Object o) => m878(o);
+  Object m880(Object o) => m879(o);
+  Object m881(Object o) => m880(o);
+  Object m882(Object o) => m881(o);
+  Object m883(Object o) => m882(o);
+  Object m884(Object o) => m883(o);
+  Object m885(Object o) => m884(o);
+  Object m886(Object o) => m885(o);
+  Object m887(Object o) => m886(o);
+  Object m888(Object o) => m887(o);
+  Object m889(Object o) => m888(o);
+  Object m890(Object o) => m889(o);
+  Object m891(Object o) => m890(o);
+  Object m892(Object o) => m891(o);
+  Object m893(Object o) => m892(o);
+  Object m894(Object o) => m893(o);
+  Object m895(Object o) => m894(o);
+  Object m896(Object o) => m895(o);
+  Object m897(Object o) => m896(o);
+  Object m898(Object o) => m897(o);
+  Object m899(Object o) => m898(o);
+  Object m900(Object o) => m899(o);
+  Object m901(Object o) => m900(o);
+  Object m902(Object o) => m901(o);
+  Object m903(Object o) => m902(o);
+  Object m904(Object o) => m903(o);
+  Object m905(Object o) => m904(o);
+  Object m906(Object o) => m905(o);
+  Object m907(Object o) => m906(o);
+  Object m908(Object o) => m907(o);
+  Object m909(Object o) => m908(o);
+  Object m910(Object o) => m909(o);
+  Object m911(Object o) => m910(o);
+  Object m912(Object o) => m911(o);
+  Object m913(Object o) => m912(o);
+  Object m914(Object o) => m913(o);
+  Object m915(Object o) => m914(o);
+  Object m916(Object o) => m915(o);
+  Object m917(Object o) => m916(o);
+  Object m918(Object o) => m917(o);
+  Object m919(Object o) => m918(o);
+  Object m920(Object o) => m919(o);
+  Object m921(Object o) => m920(o);
+  Object m922(Object o) => m921(o);
+  Object m923(Object o) => m922(o);
+  Object m924(Object o) => m923(o);
+  Object m925(Object o) => m924(o);
+  Object m926(Object o) => m925(o);
+  Object m927(Object o) => m926(o);
+  Object m928(Object o) => m927(o);
+  Object m929(Object o) => m928(o);
+  Object m930(Object o) => m929(o);
+  Object m931(Object o) => m930(o);
+  Object m932(Object o) => m931(o);
+  Object m933(Object o) => m932(o);
+  Object m934(Object o) => m933(o);
+  Object m935(Object o) => m934(o);
+  Object m936(Object o) => m935(o);
+  Object m937(Object o) => m936(o);
+  Object m938(Object o) => m937(o);
+  Object m939(Object o) => m938(o);
+  Object m940(Object o) => m939(o);
+  Object m941(Object o) => m940(o);
+  Object m942(Object o) => m941(o);
+  Object m943(Object o) => m942(o);
+  Object m944(Object o) => m943(o);
+  Object m945(Object o) => m944(o);
+  Object m946(Object o) => m945(o);
+  Object m947(Object o) => m946(o);
+  Object m948(Object o) => m947(o);
+  Object m949(Object o) => m948(o);
+  Object m950(Object o) => m949(o);
+  Object m951(Object o) => m950(o);
+  Object m952(Object o) => m951(o);
+  Object m953(Object o) => m952(o);
+  Object m954(Object o) => m953(o);
+  Object m955(Object o) => m954(o);
+  Object m956(Object o) => m955(o);
+  Object m957(Object o) => m956(o);
+  Object m958(Object o) => m957(o);
+  Object m959(Object o) => m958(o);
+  Object m960(Object o) => m959(o);
+  Object m961(Object o) => m960(o);
+  Object m962(Object o) => m961(o);
+  Object m963(Object o) => m962(o);
+  Object m964(Object o) => m963(o);
+  Object m965(Object o) => m964(o);
+  Object m966(Object o) => m965(o);
+  Object m967(Object o) => m966(o);
+  Object m968(Object o) => m967(o);
+  Object m969(Object o) => m968(o);
+  Object m970(Object o) => m969(o);
+  Object m971(Object o) => m970(o);
+  Object m972(Object o) => m971(o);
+  Object m973(Object o) => m972(o);
+  Object m974(Object o) => m973(o);
+  Object m975(Object o) => m974(o);
+  Object m976(Object o) => m975(o);
+  Object m977(Object o) => m976(o);
+  Object m978(Object o) => m977(o);
+  Object m979(Object o) => m978(o);
+  Object m980(Object o) => m979(o);
+  Object m981(Object o) => m980(o);
+  Object m982(Object o) => m981(o);
+  Object m983(Object o) => m982(o);
+  Object m984(Object o) => m983(o);
+  Object m985(Object o) => m984(o);
+  Object m986(Object o) => m985(o);
+  Object m987(Object o) => m986(o);
+  Object m988(Object o) => m987(o);
+  Object m989(Object o) => m988(o);
+  Object m990(Object o) => m989(o);
+  Object m991(Object o) => m990(o);
+  Object m992(Object o) => m991(o);
+  Object m993(Object o) => m992(o);
+  Object m994(Object o) => m993(o);
+  Object m995(Object o) => m994(o);
+  Object m996(Object o) => m995(o);
+  Object m997(Object o) => m996(o);
+  Object m998(Object o) => m997(o);
+  Object m999(Object o) => m998(o);
+}
+
+void main() {
+  final x = A().m999(10);
+  Expect.equals(10, x);
+}
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 5f51a5b..85abf0f 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -478,6 +478,80 @@
   return false;
 }
 
+// The set of supported non-integer unboxed representations.
+// Format: (unboxed representations suffix, boxed class type)
+#define FOR_EACH_NON_INT_BOXED_REPRESENTATION(M)                               \
+  M(Double, Double)                                                            \
+  M(Float, Double)                                                             \
+  M(Float32x4, Float32x4)                                                      \
+  M(Float64x2, Float64x2)                                                      \
+  M(Int32x4, Int32x4)
+
+#define BOXING_IN_SET_CASE(unboxed, boxed)                                     \
+  case kUnboxed##unboxed:                                                      \
+    return true;
+#define BOXING_VALUE_OFFSET_CASE(unboxed, boxed)                               \
+  case kUnboxed##unboxed:                                                      \
+    return compiler::target::boxed::value_offset();
+#define BOXING_CID_CASE(unboxed, boxed)                                        \
+  case kUnboxed##unboxed:                                                      \
+    return k##boxed##Cid;
+
+bool Boxing::Supports(Representation rep) {
+  if (RepresentationUtils::IsUnboxedInteger(rep)) {
+    return true;
+  }
+  switch (rep) {
+    FOR_EACH_NON_INT_BOXED_REPRESENTATION(BOXING_IN_SET_CASE)
+    default:
+      return false;
+  }
+}
+
+bool Boxing::RequiresAllocation(Representation rep) {
+  if (RepresentationUtils::IsUnboxedInteger(rep)) {
+    return (kBitsPerByte * RepresentationUtils::ValueSize(rep)) >
+           compiler::target::kSmiBits;
+  }
+  return true;
+}
+
+intptr_t Boxing::ValueOffset(Representation rep) {
+  if (RepresentationUtils::IsUnboxedInteger(rep) &&
+      Boxing::RequiresAllocation(rep) &&
+      RepresentationUtils::ValueSize(rep) <= sizeof(int64_t)) {
+    return compiler::target::Mint::value_offset();
+  }
+  switch (rep) {
+    FOR_EACH_NON_INT_BOXED_REPRESENTATION(BOXING_VALUE_OFFSET_CASE)
+    default:
+      UNREACHABLE();
+      return 0;
+  }
+}
+
+// Note that not all boxes require allocation (e.g., Smis).
+intptr_t Boxing::BoxCid(Representation rep) {
+  if (RepresentationUtils::IsUnboxedInteger(rep)) {
+    if (!Boxing::RequiresAllocation(rep)) {
+      return kSmiCid;
+    } else if (RepresentationUtils::ValueSize(rep) <= sizeof(int64_t)) {
+      return kMintCid;
+    }
+  }
+  switch (rep) {
+    FOR_EACH_NON_INT_BOXED_REPRESENTATION(BOXING_CID_CASE)
+    default:
+      UNREACHABLE();
+      return kIllegalCid;
+  }
+}
+
+#undef BOXING_CID_CASE
+#undef BOXING_VALUE_OFFSET_CASE
+#undef BOXING_IN_SET_CASE
+#undef FOR_EACH_NON_INT_BOXED_REPRESENTATION
+
 #if defined(DEBUG)
 void Instruction::CheckField(const Field& field) const {
   ASSERT(field.IsZoneHandle());
@@ -5255,6 +5329,7 @@
 
 void UnboxInstr::EmitLoadFromBoxWithDeopt(FlowGraphCompiler* compiler) {
   const intptr_t box_cid = BoxCid();
+  ASSERT(box_cid != kSmiCid);  // Should never reach here with Smi-able ints.
   const Register box = locs()->in(0).reg();
   const Register temp =
       (locs()->temp_count() > 0) ? locs()->temp(0).reg() : kNoRegister;
@@ -5285,6 +5360,11 @@
 
 void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (SpeculativeModeOfInputs() == kNotSpeculative) {
+    if (BoxCid() == kSmiCid) {
+      // Since the representation fits in a Smi, we can extract it directly.
+      ASSERT_EQUAL(value()->Type()->ToCid(), kSmiCid);
+      return EmitSmiConversion(compiler);
+    }
     switch (representation()) {
       case kUnboxedDouble:
       case kUnboxedFloat:
@@ -5317,14 +5397,15 @@
     const intptr_t value_cid = value()->Type()->ToCid();
     const intptr_t box_cid = BoxCid();
 
-    if (value_cid == box_cid) {
-      EmitLoadFromBox(compiler);
-    } else if (CanConvertSmi() && (value_cid == kSmiCid)) {
+    if (box_cid == kSmiCid || (CanConvertSmi() && (value_cid == kSmiCid))) {
+      ASSERT_EQUAL(value_cid, kSmiCid);
       EmitSmiConversion(compiler);
     } else if (representation() == kUnboxedInt32 && value()->Type()->IsInt()) {
       EmitLoadInt32FromBoxOrSmi(compiler);
     } else if (representation() == kUnboxedInt64 && value()->Type()->IsInt()) {
       EmitLoadInt64FromBoxOrSmi(compiler);
+    } else if (value_cid == box_cid) {
+      EmitLoadFromBox(compiler);
     } else {
       ASSERT(CanDeoptimize());
       EmitLoadFromBoxWithDeopt(compiler);
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index b3c6d69..df2ec7f 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -3492,19 +3492,6 @@
 
   virtual TokenPosition token_pos() const { return token_pos_; }
 
-  // Returns whether the constant fits in an unboxed 64-bit signed integer.
-  bool IsUnboxedSignedIntegerConstant() const {
-    return representation() == kUnboxedUint32 ||
-           representation() == kUnboxedInt32 ||
-           representation() == kUnboxedInt64;
-  }
-
-  int64_t GetUnboxedSignedIntegerConstantValue() const {
-    ASSERT(IsUnboxedSignedIntegerConstant());
-    return value_.IsSmi() ? Smi::Cast(value_).Value()
-                          : Mint::Cast(value_).value();
-  }
-
   void EmitMoveToLocation(FlowGraphCompiler* compiler,
                           const Location& destination,
                           Register tmp = kNoRegister);
@@ -6664,97 +6651,21 @@
   DISALLOW_COPY_AND_ASSIGN(CheckEitherNonSmiInstr);
 };
 
-class Boxing : public AllStatic {
- public:
-  static bool Supports(Representation rep) {
-    switch (rep) {
-      case kUnboxedDouble:
-      case kUnboxedFloat32x4:
-      case kUnboxedFloat64x2:
-      case kUnboxedInt32x4:
-      case kUnboxedInt64:
-      case kUnboxedInt32:
-      case kUnboxedUint32:
-        return true;
-      default:
-        return false;
-    }
-  }
+struct Boxing : public AllStatic {
+  // Whether the given representation can be boxed or unboxed.
+  static bool Supports(Representation rep);
 
-  static bool RequiresAllocation(Representation rep) {
-    switch (rep) {
-      case kUnboxedDouble:
-      case kUnboxedFloat32x4:
-      case kUnboxedFloat64x2:
-      case kUnboxedInt32x4:
-      case kUnboxedInt64:
-        return true;
-      case kUnboxedInt32:
-      case kUnboxedUint32:
-        return kBitsPerInt32 > compiler::target::kSmiBits;
-      default:
-        UNREACHABLE();
-        return true;
-    }
-  }
+  // Whether boxing this value requires allocating a new object.
+  static bool RequiresAllocation(Representation rep);
 
-  static intptr_t ValueOffset(Representation rep) {
-    switch (rep) {
-      case kUnboxedFloat:
-      case kUnboxedDouble:
-        return Double::value_offset();
+  // The offset into the Layout object for the boxed value that can store
+  // the full range of values in the representation.
+  // Only defined for allocated boxes (i.e., RequiresAllocation must be true).
+  static intptr_t ValueOffset(Representation rep);
 
-      case kUnboxedFloat32x4:
-        return Float32x4::value_offset();
-
-      case kUnboxedFloat64x2:
-        return Float64x2::value_offset();
-
-      case kUnboxedInt32x4:
-        return Int32x4::value_offset();
-
-      case kUnboxedInt64:
-        return Mint::value_offset();
-
-      case kUnboxedInt32:
-      case kUnboxedUint32:
-        if (RequiresAllocation(rep)) {
-          return Mint::value_offset();
-        }
-        UNREACHABLE();
-        return 0;
-
-      default:
-        UNREACHABLE();
-        return 0;
-    }
-  }
-
-  static intptr_t BoxCid(Representation rep) {
-    switch (rep) {
-      case kUnboxedInt32:
-      case kUnboxedUint32:
-        if (RequiresAllocation(rep)) {
-          return kMintCid;
-        }
-        UNREACHABLE();
-        return kIllegalCid;
-      case kUnboxedInt64:
-        return kMintCid;
-      case kUnboxedDouble:
-      case kUnboxedFloat:
-        return kDoubleCid;
-      case kUnboxedFloat32x4:
-        return kFloat32x4Cid;
-      case kUnboxedFloat64x2:
-        return kFloat64x2Cid;
-      case kUnboxedInt32x4:
-        return kInt32x4Cid;
-      default:
-        UNREACHABLE();
-        return kIllegalCid;
-    }
-  }
+  // The class ID for the boxed value that can store the full range
+  // of values in the representation.
+  static intptr_t BoxCid(Representation rep);
 };
 
 class BoxInstr : public TemplateDefinition<1, NoThrow, Pure> {
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index bedb2ec..1c3daa9 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -672,14 +672,12 @@
 void ConstantInstr::EmitMoveToLocation(FlowGraphCompiler* compiler,
                                        const Location& destination,
                                        Register tmp) {
-  const bool is_unboxed_int =
-      representation() == kUnboxedUint32 || representation() == kUnboxedInt32;
   if (destination.IsRegister()) {
-    if (is_unboxed_int) {
+    if (RepresentationUtils::IsUnboxedInteger(representation())) {
       int64_t v;
       const bool ok = compiler::HasIntegerValue(value_, &v);
       RELEASE_ASSERT(ok);
-      if (value_.IsSmi() && representation() == kUnboxedUint32) {
+      if (value_.IsSmi() && RepresentationUtils::IsUnsigned(representation())) {
         // If the value is negative, then the sign bit was preserved during
         // Smi untagging, which means the resulting value may be unexpected.
         ASSERT(v >= 0);
@@ -713,7 +711,7 @@
     ASSERT(destination.IsStackSlot());
     ASSERT(tmp != kNoRegister);
     const intptr_t dest_offset = destination.ToStackSlotOffset();
-    if (is_unboxed_int) {
+    if (RepresentationUtils::IsUnboxedInteger(representation())) {
       int64_t v;
       const bool ok = compiler::HasIntegerValue(value_, &v);
       RELEASE_ASSERT(ok);
@@ -728,7 +726,9 @@
 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
                                                            bool opt) const {
   const bool is_unboxed_int =
-      representation() == kUnboxedUint32 || representation() == kUnboxedInt32;
+      RepresentationUtils::IsUnboxedInteger(representation());
+  ASSERT(!is_unboxed_int || RepresentationUtils::ValueSize(representation()) <=
+                                compiler::target::kWordSize);
   const intptr_t kNumInputs = 0;
   const intptr_t kNumTemps = is_unboxed_int ? 0 : 1;
   LocationSummary* locs = new (zone)
@@ -4826,6 +4826,7 @@
 }
 
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  ASSERT(BoxCid() != kSmiCid);
   const bool needs_temp = CanDeoptimize();
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = needs_temp ? 1 : 0;
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 51f6330..8b5e746 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -619,23 +619,26 @@
 
 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
                                                            bool opt) const {
+  const bool is_unboxed_int =
+      RepresentationUtils::IsUnboxedInteger(representation());
+  ASSERT(!is_unboxed_int || RepresentationUtils::ValueSize(representation()) <=
+                                compiler::target::kWordSize);
   const intptr_t kNumInputs = 0;
-  const intptr_t kNumTemps = IsUnboxedSignedIntegerConstant() ? 0 : 1;
+  const intptr_t kNumTemps = is_unboxed_int ? 0 : 1;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  switch (representation()) {
-    case kUnboxedDouble:
-      locs->set_out(0, Location::RequiresFpuRegister());
-      locs->set_temp(0, Location::RequiresRegister());
-      break;
-    case kUnboxedInt32:
-    case kUnboxedUint32:
-    case kUnboxedInt64:
-      locs->set_out(0, Location::RequiresRegister());
-      break;
-    default:
-      UNREACHABLE();
-      break;
+  if (is_unboxed_int) {
+    locs->set_out(0, Location::RequiresRegister());
+  } else {
+    switch (representation()) {
+      case kUnboxedDouble:
+        locs->set_out(0, Location::RequiresFpuRegister());
+        locs->set_temp(0, Location::RequiresRegister());
+        break;
+      default:
+        UNREACHABLE();
+        break;
+    }
   }
   return locs;
 }
@@ -643,7 +646,9 @@
 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (!locs()->out(0).IsInvalid()) {
     const Register scratch =
-        IsUnboxedSignedIntegerConstant() ? kNoRegister : locs()->temp(0).reg();
+        RepresentationUtils::IsUnboxedInteger(representation())
+            ? kNoRegister
+            : locs()->temp(0).reg();
     EmitMoveToLocation(compiler, locs()->out(0), scratch);
   }
 }
@@ -835,29 +840,29 @@
   Condition true_condition = TokenKindToSmiCondition(kind);
   if (left.IsConstant() || right.IsConstant()) {
     // Ensure constant is on the right.
-    ConstantInstr* right_constant = NULL;
+    ConstantInstr* constant = nullptr;
     if (left.IsConstant()) {
-      right_constant = left.constant_instruction();
+      constant = left.constant_instruction();
       Location tmp = right;
       right = left;
       left = tmp;
       true_condition = FlipCondition(true_condition);
     } else {
-      right_constant = right.constant_instruction();
+      constant = right.constant_instruction();
     }
 
-    if (right_constant->IsUnboxedSignedIntegerConstant()) {
-      const int64_t constant =
-          right_constant->GetUnboxedSignedIntegerConstantValue();
-      if (constant == 0 && CanUseCbzTbzForComparison(compiler, left.reg(),
-                                                     true_condition, labels)) {
+    if (RepresentationUtils::IsUnboxedInteger(constant->representation())) {
+      int64_t value;
+      const bool ok = compiler::HasIntegerValue(constant->value(), &value);
+      RELEASE_ASSERT(ok);
+      if (value == 0 && CanUseCbzTbzForComparison(compiler, left.reg(),
+                                                  true_condition, labels)) {
         EmitCbzTbz(left.reg(), compiler, true_condition, labels);
         return kInvalidCondition;
       }
-      __ CompareImmediate(
-          left.reg(), right_constant->GetUnboxedSignedIntegerConstantValue());
+      __ CompareImmediate(left.reg(), value);
     } else {
-      ASSERT(right_constant->representation() == kTagged);
+      ASSERT(constant->representation() == kTagged);
       __ CompareObject(left.reg(), right.constant());
     }
   } else {
@@ -4050,10 +4055,11 @@
 }
 
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  ASSERT(!RepresentationUtils::IsUnsigned(representation()));
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   const bool is_floating_point =
-      representation() != kUnboxedInt64 && representation() != kUnboxedInt32;
+      !RepresentationUtils::IsUnboxedInteger(representation());
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
@@ -4103,6 +4109,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
+    case kUnboxedInt32:
     case kUnboxedInt64: {
       const Register result = locs()->out(0).reg();
       __ SmiUntag(result, box);
@@ -5855,9 +5862,9 @@
   } else if (op_kind() == Token::kMUL) {
     Register r = TMP;
     if (right.IsConstant()) {
-      ConstantInstr* constant_instr = right.constant_instruction();
-      const int64_t value =
-          constant_instr->GetUnboxedSignedIntegerConstantValue();
+      int64_t value;
+      const bool ok = compiler::HasIntegerValue(right.constant(), &value);
+      RELEASE_ASSERT(ok);
       __ LoadImmediate(r, value);
     } else {
       r = right.reg();
@@ -5867,9 +5874,9 @@
   }
 
   if (right.IsConstant()) {
-    ConstantInstr* constant_instr = right.constant_instruction();
-    const int64_t value =
-        constant_instr->GetUnboxedSignedIntegerConstantValue();
+    int64_t value;
+    const bool ok = compiler::HasIntegerValue(right.constant(), &value);
+    RELEASE_ASSERT(ok);
     switch (op_kind()) {
       case Token::kADD:
         __ AddImmediate(out, left, value);
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 4a2ad85..45958f9 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -397,14 +397,12 @@
 void ConstantInstr::EmitMoveToLocation(FlowGraphCompiler* compiler,
                                        const Location& destination,
                                        Register tmp) {
-  const bool is_unboxed_int =
-      representation() == kUnboxedUint32 || representation() == kUnboxedInt32;
   if (destination.IsRegister()) {
-    if (is_unboxed_int) {
+    if (RepresentationUtils::IsUnboxedInteger(representation())) {
       int64_t v;
       const bool ok = compiler::HasIntegerValue(value_, &v);
       RELEASE_ASSERT(ok);
-      if (value_.IsSmi() && representation() == kUnboxedUint32) {
+      if (value_.IsSmi() && RepresentationUtils::IsUnsigned(representation())) {
         // If the value is negative, then the sign bit was preserved during
         // Smi untagging, which means the resulting value may be unexpected.
         ASSERT(v >= 0);
@@ -444,7 +442,8 @@
     __ movsd(LocationToStackSlotAddress(destination), FpuTMP);
   } else {
     ASSERT(destination.IsStackSlot());
-    if (value_.IsSmi() && is_unboxed_int) {
+    if (value_.IsSmi() &&
+        RepresentationUtils::IsUnboxedInteger(representation())) {
       __ movl(LocationToStackSlotAddress(destination),
               compiler::Immediate(Smi::Cast(value_).Value()));
     } else {
@@ -464,7 +463,9 @@
 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
                                                            bool opt) const {
   const bool is_unboxed_int =
-      representation() == kUnboxedUint32 || representation() == kUnboxedInt32;
+      RepresentationUtils::IsUnboxedInteger(representation());
+  ASSERT(!is_unboxed_int || RepresentationUtils::ValueSize(representation()) <=
+                                compiler::target::kWordSize);
   const intptr_t kNumInputs = 0;
   const intptr_t kNumTemps =
       (constant_address() == 0) && !is_unboxed_int ? 1 : 0;
@@ -3758,6 +3759,7 @@
 }
 
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  ASSERT(BoxCid() != kSmiCid);
   const bool needs_temp =
       CanDeoptimize() ||
       (CanConvertSmi() && (value()->Type()->ToCid() == kSmiCid));
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index a803165..94c6bee 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -510,9 +510,7 @@
                                        const Location& destination,
                                        Register tmp) {
   if (destination.IsRegister()) {
-    if (representation() == kUnboxedInt32 ||
-        representation() == kUnboxedUint32 ||
-        representation() == kUnboxedInt64) {
+    if (RepresentationUtils::IsUnboxedInteger(representation())) {
       const int64_t value = Integer::Cast(value_).AsInt64Value();
       if (value == 0) {
         __ xorl(destination.reg(), destination.reg());
@@ -543,9 +541,7 @@
     __ movsd(LocationToStackSlotAddress(destination), FpuTMP);
   } else {
     ASSERT(destination.IsStackSlot());
-    if (representation() == kUnboxedInt32 ||
-        representation() == kUnboxedUint32 ||
-        representation() == kUnboxedInt64) {
+    if (RepresentationUtils::IsUnboxedInteger(representation())) {
       const int64_t value = Integer::Cast(value_).AsInt64Value();
       __ movq(LocationToStackSlotAddress(destination),
               compiler::Immediate(value));
@@ -558,23 +554,26 @@
 
 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
                                                            bool opt) const {
+  const bool is_unboxed_int =
+      RepresentationUtils::IsUnboxedInteger(representation());
+  ASSERT(!is_unboxed_int || RepresentationUtils::ValueSize(representation()) <=
+                                compiler::target::kWordSize);
   const intptr_t kNumInputs = 0;
-  const intptr_t kNumTemps = IsUnboxedSignedIntegerConstant() ? 0 : 1;
+  const intptr_t kNumTemps = is_unboxed_int ? 0 : 1;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  switch (representation()) {
-    case kUnboxedDouble:
-      locs->set_out(0, Location::RequiresFpuRegister());
-      locs->set_temp(0, Location::RequiresRegister());
-      break;
-    case kUnboxedInt32:
-    case kUnboxedUint32:
-    case kUnboxedInt64:
-      locs->set_out(0, Location::RequiresRegister());
-      break;
-    default:
-      UNREACHABLE();
-      break;
+  if (is_unboxed_int) {
+    locs->set_out(0, Location::RequiresRegister());
+  } else {
+    switch (representation()) {
+      case kUnboxedDouble:
+        locs->set_out(0, Location::RequiresFpuRegister());
+        locs->set_temp(0, Location::RequiresRegister());
+        break;
+      default:
+        UNREACHABLE();
+        break;
+    }
   }
   return locs;
 }
@@ -583,7 +582,9 @@
   // The register allocator drops constant definitions that have no uses.
   if (!locs()->out(0).IsInvalid()) {
     const Register scratch =
-        IsUnboxedSignedIntegerConstant() ? kNoRegister : locs()->temp(0).reg();
+        RepresentationUtils::IsUnboxedInteger(representation())
+            ? kNoRegister
+            : locs()->temp(0).reg();
     EmitMoveToLocation(compiler, locs()->out(0), scratch);
   }
 }
@@ -794,10 +795,11 @@
       constant = right.constant_instruction();
     }
 
-    if (constant->IsUnboxedSignedIntegerConstant()) {
-      __ cmpq(left.reg(),
-              compiler::Immediate(
-                  constant->GetUnboxedSignedIntegerConstantValue()));
+    if (RepresentationUtils::IsUnboxedInteger(constant->representation())) {
+      int64_t value;
+      const bool ok = compiler::HasIntegerValue(constant->value(), &value);
+      RELEASE_ASSERT(ok);
+      __ cmpq(left.reg(), compiler::Immediate(value));
     } else {
       ASSERT(constant->representation() == kTagged);
       __ CompareObject(left.reg(), right.constant());
@@ -4270,6 +4272,7 @@
 }
 
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  ASSERT(!RepresentationUtils::IsUnsigned(representation()));
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   const bool needs_writable_input =
@@ -4279,7 +4282,7 @@
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, needs_writable_input ? Location::WritableRegister()
                                           : Location::RequiresRegister());
-  if (representation() == kUnboxedInt64 || representation() == kUnboxedInt32) {
+  if (RepresentationUtils::IsUnboxedInteger(representation())) {
     summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
@@ -4328,6 +4331,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
+    case kUnboxedInt32:
     case kUnboxedInt64: {
       const Register result = locs()->out(0).reg();
       ASSERT(result == box);
@@ -6253,9 +6257,9 @@
                          temp.reg(), out.reg());
   } else if (right.IsConstant()) {
     ASSERT(out.reg() == left.reg());
-    ConstantInstr* constant_instr = right.constant_instruction();
-    const int64_t value =
-        constant_instr->GetUnboxedSignedIntegerConstantValue();
+    int64_t value;
+    const bool ok = compiler::HasIntegerValue(right.constant(), &value);
+    RELEASE_ASSERT(ok);
     EmitInt64Arithmetic(compiler, op_kind(), left.reg(),
                         compiler::Immediate(value));
   } else {
diff --git a/runtime/vm/compiler/backend/locations.cc b/runtime/vm/compiler/backend/locations.cc
index 2c40969..d31957c 100644
--- a/runtime/vm/compiler/backend/locations.cc
+++ b/runtime/vm/compiler/backend/locations.cc
@@ -11,9 +11,57 @@
 
 namespace dart {
 
+#define REP_IN_SET_CLAUSE(name, __, ___)                                       \
+  case k##name:                                                                \
+    return true;
+#define REP_SIZEOF_CLAUSE(name, __, type)                                      \
+  case k##name:                                                                \
+    return sizeof(type);
+#define REP_IS_UNSIGNED_CLAUSE(name, unsigned, ___)                            \
+  case k##name:                                                                \
+    return unsigned;
+
+bool RepresentationUtils::IsUnboxedInteger(Representation rep) {
+  switch (rep) {
+    FOR_EACH_INTEGER_REPRESENTATION_KIND(REP_IN_SET_CLAUSE)
+    default:
+      return false;
+  }
+}
+
+bool RepresentationUtils::IsUnboxed(Representation rep) {
+  switch (rep) {
+    FOR_EACH_UNBOXED_REPRESENTATION_KIND(REP_IN_SET_CLAUSE)
+    default:
+      return false;
+  }
+}
+
+size_t RepresentationUtils::ValueSize(Representation rep) {
+  switch (rep) {
+    FOR_EACH_SIMPLE_REPRESENTATION_KIND(REP_SIZEOF_CLAUSE)
+    default:
+      UNREACHABLE();
+      return compiler::target::kWordSize;
+  }
+}
+
+bool RepresentationUtils::IsUnsigned(Representation rep) {
+  switch (rep) {
+    FOR_EACH_SIMPLE_REPRESENTATION_KIND(REP_IS_UNSIGNED_CLAUSE)
+    default:
+      UNREACHABLE();
+      return false;
+  }
+}
+
+#undef REP_IS_UNSIGNED_CLAUSE
+#undef REP_SIZEOF_CLAUSE
+#undef REP_IN_SET_CLAUSE
+
 const char* Location::RepresentationToCString(Representation repr) {
   switch (repr) {
-#define REPR_CASE(Name)                                                        \
+#define REPR_CASE(Name, __, ___)                                               \
   case k##Name:                                                                \
     return #Name;
     FOR_EACH_REPRESENTATION_KIND(REPR_CASE)
@@ -26,7 +74,7 @@
 
 bool Location::ParseRepresentation(const char* str, Representation* out) {
   ASSERT(str != nullptr && out != nullptr);
-#define KIND_CASE(Name)                                                        \
+#define KIND_CASE(Name, __, ___)                                               \
   if (strcmp(str, #Name) == 0) {                                               \
     *out = k##Name;                                                            \
     return true;                                                               \
diff --git a/runtime/vm/compiler/backend/locations.h b/runtime/vm/compiler/backend/locations.h
index 34edf4c..8f4c37f 100644
--- a/runtime/vm/compiler/backend/locations.h
+++ b/runtime/vm/compiler/backend/locations.h
@@ -24,27 +24,60 @@
 class PairLocation;
 class Value;
 
+// All unboxed integer representations.
+// Format: (representation name, is unsigned, value type)
+#define FOR_EACH_INTEGER_REPRESENTATION_KIND(M)                                \
+  M(UnboxedInt32, false, int32_t)                                              \
+  M(UnboxedUint32, true, uint32_t)                                             \
+  M(UnboxedInt64, false, int64_t)
+
+// All unboxed representations.
+// Format: (representation name, is unsigned, value type)
+#define FOR_EACH_UNBOXED_REPRESENTATION_KIND(M)                                \
+  M(UnboxedDouble, false, double_t)                                            \
+  M(UnboxedFloat, false, float_t)                                              \
+  FOR_EACH_INTEGER_REPRESENTATION_KIND(M)                                      \
+  M(UnboxedFloat32x4, false, simd128_value_t)                                  \
+  M(UnboxedInt32x4, false, simd128_value_t)                                    \
+  M(UnboxedFloat64x2, false, simd128_value_t)
+
+// All representations that represent a single boxed or unboxed value.
+// (Note that packed SIMD values are considered a single value here.)
+// Format: (representation name, is unsigned, value type)
+#define FOR_EACH_SIMPLE_REPRESENTATION_KIND(M)                                 \
+  M(Tagged, false, compiler::target::word)                                     \
+  M(Untagged, false, compiler::target::word)                                   \
+  FOR_EACH_UNBOXED_REPRESENTATION_KIND(M)
+
+// All representations, including sentinel and multi-value representations.
+// Format: (representation name, _, _)  (only the name is guaranteed to exist)
+// Ordered so that NoRepresentation is first (and thus 0 in the enum).
 #define FOR_EACH_REPRESENTATION_KIND(M)                                        \
-  M(NoRepresentation)                                                          \
-  M(Tagged)                                                                    \
-  M(Untagged)                                                                  \
-  M(UnboxedDouble)                                                             \
-  M(UnboxedFloat)                                                              \
-  M(UnboxedInt32)                                                              \
-  M(UnboxedUint32)                                                             \
-  M(UnboxedInt64)                                                              \
-  M(UnboxedFloat32x4)                                                          \
-  M(UnboxedInt32x4)                                                            \
-  M(UnboxedFloat64x2)                                                          \
-  M(PairOfTagged)
+  M(NoRepresentation, _, _)                                                    \
+  FOR_EACH_SIMPLE_REPRESENTATION_KIND(M)                                       \
+  M(PairOfTagged, _, _)
 
 enum Representation {
-#define DECLARE_REPRESENTATION(name) k##name,
+#define DECLARE_REPRESENTATION(name, __, ___) k##name,
   FOR_EACH_REPRESENTATION_KIND(DECLARE_REPRESENTATION)
 #undef DECLARE_REPRESENTATION
       kNumRepresentations
 };
 
+struct RepresentationUtils : AllStatic {
+  // Whether the representation is for a type of unboxed integer.
+  static bool IsUnboxedInteger(Representation rep);
+
+  // Whether the representation is for a type of unboxed value.
+  static bool IsUnboxed(Representation rep);
+
+  // The size of values described by this representation.
+  static size_t ValueSize(Representation rep);
+
+  // Whether the values described by this representation are unsigned integers.
+  static bool IsUnsigned(Representation rep);
+};
+
 // 'UnboxedFfiIntPtr' should be able to hold a pointer of the target word-size.
 // On a 32-bit platform, it's an unsigned 32-bit int because it should be
 // zero-extended to 64-bits, not sign-extended (pointers are inherently
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index a8a9ec0..5f256b6 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -46,16 +46,15 @@
   DirectChainedHashMap<PointerKeyValueTrait<const Slot> > fields_;
 };
 
-#define NATIVE_SLOT_NAME(C, F, id, M) Kind::k##C##_##F
-#define NATIVE_TO_STR(C, F, id, M) #C "_" #F
+#define NATIVE_SLOT_NAME(C, F) Kind::k##C##_##F
+#define NATIVE_TO_STR(C, F) #C "_" #F
 
 const char* Slot::KindToCString(Kind k) {
   switch (k) {
-#define NATIVE_CASE(C, U, F, id, M)                                            \
-  case NATIVE_SLOT_NAME(C, F, id, M):                                          \
-    return NATIVE_TO_STR(C, F, id, M);
-    BOXED_NATIVE_SLOTS_LIST(NATIVE_CASE)
-    UNBOXED_NATIVE_SLOTS_LIST(NATIVE_CASE)
+#define NATIVE_CASE(C, __, F, ___, ____)                                       \
+  case NATIVE_SLOT_NAME(C, F):                                                 \
+    return NATIVE_TO_STR(C, F);
+    NATIVE_SLOTS_LIST(NATIVE_CASE)
 #undef NATIVE_CASE
     case Kind::kTypeArguments:
       return "TypeArguments";
@@ -71,13 +70,12 @@
 
 bool Slot::ParseKind(const char* str, Kind* out) {
   ASSERT(str != nullptr && out != nullptr);
-#define NATIVE_CASE(C, U, F, id, M)                                            \
-  if (strcmp(str, NATIVE_TO_STR(C, F, id, M)) == 0) {                          \
-    *out = NATIVE_SLOT_NAME(C, F, id, M);                                      \
+#define NATIVE_CASE(C, __, F, ___, ____)                                       \
+  if (strcmp(str, NATIVE_TO_STR(C, F)) == 0) {                                 \
+    *out = NATIVE_SLOT_NAME(C, F);                                             \
     return true;                                                               \
   }
-  BOXED_NATIVE_SLOTS_LIST(NATIVE_CASE)
-  UNBOXED_NATIVE_SLOTS_LIST(NATIVE_CASE)
+  NATIVE_SLOTS_LIST(NATIVE_CASE)
 #undef NATIVE_CASE
   if (strcmp(str, "TypeArguments") == 0) {
     *out = Kind::kTypeArguments;
@@ -97,31 +95,11 @@
 #undef NATIVE_TO_STR
 #undef NATIVE_SLOT_NAME
 
-static Representation CheckFit(Representation rep) {
-  ASSERT(Boxing::Supports(rep));
-  switch (rep) {
-    case kUnboxedInt64:
-    case kUnboxedInt32:
-    case kUnboxedUint32:
-      break;
-    default:
-      UNREACHABLE();
-      break;
-  }
-  return rep;
-}
-
 static classid_t GetUnboxedNativeSlotCid(Representation rep) {
-  ASSERT(Boxing::Supports(rep));
-  if (Boxing::RequiresAllocation(rep)) {
+  // Currently we only support integer unboxed fields.
+  if (RepresentationUtils::IsUnboxedInteger(rep)) {
     return Boxing::BoxCid(rep);
   }
-#if defined(TARGET_ARCH_IS_64_BIT)
-  // On 64-bit platforms, these always fit in Smis.
-  if (rep == kUnboxedInt32 || rep == kUnboxedUint32) {
-    return kSmiCid;
-  }
-#endif
   UNREACHABLE();
   return kIllegalCid;
 }
@@ -130,30 +108,45 @@
   // There is a fixed statically known number of native slots so we cache
   // them statically.
   static const Slot fields[] = {
-#define FIELD_FINAL (IsImmutableBit::encode(true))
-#define FIELD_VAR (0)
-#define DEFINE_BOXED_NATIVE_FIELD(ClassName, UnderlyingType, FieldName, cid,   \
-                                  mutability)                                  \
-  Slot(Kind::k##ClassName##_##FieldName, FIELD_##mutability, k##cid##Cid,      \
-       compiler::target::ClassName::FieldName##_offset(),                      \
+#define NULLABLE_FIELD_FINAL                                                   \
+  (IsNullableBit::encode(true) | IsImmutableBit::encode(true))
+#define NULLABLE_FIELD_VAR (IsNullableBit::encode(true))
+#define DEFINE_NULLABLE_BOXED_NATIVE_FIELD(ClassName, UnderlyingType,          \
+                                           FieldName, cid, mutability)         \
+  Slot(Kind::k##ClassName##_##FieldName, NULLABLE_FIELD_##mutability,          \
+       k##cid##Cid, compiler::target::ClassName::FieldName##_offset(),         \
        #ClassName "." #FieldName, nullptr, kTagged),
 
-      BOXED_NATIVE_SLOTS_LIST(DEFINE_BOXED_NATIVE_FIELD)
+      NULLABLE_BOXED_NATIVE_SLOTS_LIST(DEFINE_NULLABLE_BOXED_NATIVE_FIELD)
 
-#undef DEFINE_BOXED_NATIVE_FIELD
+#undef DEFINE_NULLABLE_BOXED_NATIVE_FIELD
+#undef NULLABLE_FIELD_FINAL
+#undef NULLABLE_FIELD_VAR
+
+#define NONNULLABLE_FIELD_FINAL (Slot::IsImmutableBit::encode(true))
+#define NONNULLABLE_FIELD_VAR (0)
+#define DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD(ClassName, UnderlyingType,       \
+                                              FieldName, cid, mutability)      \
+  Slot(Kind::k##ClassName##_##FieldName, NONNULLABLE_FIELD_##mutability,       \
+       k##cid##Cid, compiler::target::ClassName::FieldName##_offset(),         \
+       #ClassName "." #FieldName, nullptr, kTagged),
+
+          NONNULLABLE_BOXED_NATIVE_SLOTS_LIST(
+              DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD)
+
+#undef DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD
 #define DEFINE_UNBOXED_NATIVE_FIELD(ClassName, UnderlyingType, FieldName,      \
                                     representation, mutability)                \
-  Slot(Kind::k##ClassName##_##FieldName, FIELD_##mutability,                   \
+  Slot(Kind::k##ClassName##_##FieldName, NONNULLABLE_FIELD_##mutability,       \
        GetUnboxedNativeSlotCid(kUnboxed##representation),                      \
        compiler::target::ClassName::FieldName##_offset(),                      \
-       #ClassName "." #FieldName, nullptr,                                     \
-       CheckFit(kUnboxed##representation)),
+       #ClassName "." #FieldName, nullptr, kUnboxed##representation),
 
-          UNBOXED_NATIVE_SLOTS_LIST(DEFINE_UNBOXED_NATIVE_FIELD)
+              UNBOXED_NATIVE_SLOTS_LIST(DEFINE_UNBOXED_NATIVE_FIELD)
 
 #undef DEFINE_UNBOXED_NATIVE_FIELD
-#undef FIELD_VAR
-#undef FIELD_FINAL
+#undef NONNULLABLE_FIELD_VAR
+#undef NONNULLABLE_FIELD_FINAL
   };
 
   ASSERT(static_cast<uint8_t>(kind) < ARRAY_SIZE(fields));
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index 6b2bd68..c73b017 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -38,8 +38,8 @@
 class LocalVariable;
 class ParsedFunction;
 
-// List of slots that correspond to fields of native objects in the following
-// format:
+// The list of slots that correspond to nullable boxed fields of native objects
+// in the following format:
 //
 //     V(class_name, underlying_type, field_name, exact_type, FINAL|VAR)
 //
@@ -51,20 +51,34 @@
 // - the last component specifies whether field behaves like a final field
 //   (i.e. initialized once at construction time and does not change after
 //   that) or like a non-final field.
-//
-// Note: native slots are expected to be non-nullable.
-#define BOXED_NATIVE_SLOTS_LIST(V)                                             \
-  V(Array, ArrayLayout, length, Smi, FINAL)                                    \
+#define NULLABLE_BOXED_NATIVE_SLOTS_LIST(V)                                    \
   V(Context, ContextLayout, parent, Context, FINAL)                            \
   V(Closure, ClosureLayout, instantiator_type_arguments, TypeArguments, FINAL) \
   V(Closure, ClosureLayout, delayed_type_arguments, TypeArguments, FINAL)      \
   V(Closure, ClosureLayout, function_type_arguments, TypeArguments, FINAL)     \
+  V(Function, FunctionLayout, type_parameters, TypeArguments, FINAL)           \
+  V(Type, TypeLayout, arguments, TypeArguments, FINAL)
+
+// The list of slots that correspond to non-nullable boxed fields of native
+// objects in the following format:
+//
+//     V(class_name, underlying_type, field_name, exact_type, FINAL|VAR)
+//
+// - class_name and field_name specify the name of the host class and the name
+//   of the field respectively;
+// - underlying_type: the Raw class which holds the field;
+// - exact_type specifies exact type of the field (any load from this field
+//   would only yield instances of this type);
+// - the last component specifies whether field behaves like a final field
+//   (i.e. initialized once at construction time and does not change after
+//   that) or like a non-final field.
+#define NONNULLABLE_BOXED_NATIVE_SLOTS_LIST(V)                                 \
+  V(Array, ArrayLayout, length, Smi, FINAL)                                    \
   V(Closure, ClosureLayout, function, Function, FINAL)                         \
   V(Closure, ClosureLayout, context, Context, FINAL)                           \
   V(Closure, ClosureLayout, hash, Context, VAR)                                \
   V(Function, FunctionLayout, parameter_names, Array, FINAL)                   \
   V(Function, FunctionLayout, parameter_types, Array, FINAL)                   \
-  V(Function, FunctionLayout, type_parameters, Array, FINAL)                   \
   V(GrowableObjectArray, GrowableObjectArrayLayout, length, Smi, VAR)          \
   V(GrowableObjectArray, GrowableObjectArrayLayout, data, Array, VAR)          \
   V(TypedDataBase, TypedDataBaseLayout, length, Smi, FINAL)                    \
@@ -81,7 +95,6 @@
   V(ArgumentsDescriptor, ArrayLayout, count, Smi, FINAL)                       \
   V(ArgumentsDescriptor, ArrayLayout, size, Smi, FINAL)                        \
   V(PointerBase, PointerBaseLayout, data_field, Dynamic, FINAL)                \
-  V(Type, TypeLayout, arguments, TypeArguments, FINAL)                         \
   V(UnhandledException, UnhandledExceptionLayout, exception, Dynamic, FINAL)   \
   V(UnhandledException, UnhandledExceptionLayout, stacktrace, Dynamic, FINAL)
 
@@ -99,10 +112,18 @@
 //   (i.e. initialized once at construction time and does not change after
 //   that) or like a non-final field.
 //
-// Note: As the underlying field is not boxed, these slots cannot be nullable.
+// Note: As the underlying field is unboxed, these slots cannot be nullable.
 #define UNBOXED_NATIVE_SLOTS_LIST(V)                                           \
   V(Function, FunctionLayout, packed_fields, Uint32, FINAL)
 
+// For uses that do not need the exact_type (boxed) or representation (unboxed)
+// or whether a boxed native slot is nullable. (Generally, such users only need
+// the class name, the underlying type, and/or the field name.)
+#define NATIVE_SLOTS_LIST(V)                                                   \
+  NULLABLE_BOXED_NATIVE_SLOTS_LIST(V)                                          \
+  NONNULLABLE_BOXED_NATIVE_SLOTS_LIST(V)                                       \
+  UNBOXED_NATIVE_SLOTS_LIST(V)
+
 // Slot is an abstraction that describes an readable (and possibly writeable)
 // location within an object.
 //
@@ -115,10 +136,9 @@
   // clang-format off
   enum class Kind : uint8_t {
     // Native slots are identified by their kind - each native slot has its own.
-#define DECLARE_KIND(ClassName, UnderlyingType, FieldName, cid, mutability)    \
+#define DECLARE_KIND(ClassName, __, FieldName, ___, ____)                      \
   k##ClassName##_##FieldName,
-    BOXED_NATIVE_SLOTS_LIST(DECLARE_KIND)
-    UNBOXED_NATIVE_SLOTS_LIST(DECLARE_KIND)
+    NATIVE_SLOTS_LIST(DECLARE_KIND)
 #undef DECLARE_KIND
 
     // A slot used to store type arguments.
@@ -164,13 +184,12 @@
                          const ParsedFunction* parsed_function);
 
   // Convenience getters for native slots.
-#define DEFINE_GETTER(ClassName, UnderlyingType, FieldName, cid, mutability)   \
+#define DEFINE_GETTER(ClassName, UnderlyingType, FieldName, __, ___)           \
   static const Slot& ClassName##_##FieldName() {                               \
     return GetNativeSlot(Kind::k##ClassName##_##FieldName);                    \
   }
 
-  BOXED_NATIVE_SLOTS_LIST(DEFINE_GETTER)
-  UNBOXED_NATIVE_SLOTS_LIST(DEFINE_GETTER)
+  NATIVE_SLOTS_LIST(DEFINE_GETTER)
 #undef DEFINE_GETTER
 
   Kind kind() const { return kind_; }
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index ba9529b..3eddad6 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -761,8 +761,7 @@
   if (type_ == NULL) {
     // Type propagation has not run. Return dynamic-type.
     if (cid_ == kIllegalCid) {
-      type_ = &Object::dynamic_type();
-      return type_;
+      return &Object::dynamic_type();
     }
 
     // VM-internal objects don't have a compile-type. Return dynamic-type
@@ -1340,10 +1339,36 @@
   return is_nullable ? type : type.CopyNonNullable();
 }
 
+static CompileType ComputeListFactoryType(CompileType* inferred_type,
+                                          Value* type_args_value) {
+  ASSERT(inferred_type != nullptr);
+  const intptr_t cid = inferred_type->ToNullableCid();
+  ASSERT(cid != kDynamicCid);
+  if ((cid == kGrowableObjectArrayCid || cid == kArrayCid ||
+       cid == kImmutableArrayCid) &&
+      type_args_value->BindsToConstant()) {
+    const auto& type_args =
+        type_args_value->BoundConstant().IsNull()
+            ? TypeArguments::null_type_arguments()
+            : TypeArguments::Cast(type_args_value->BoundConstant());
+    const Class& cls =
+        Class::Handle(Isolate::Current()->class_table()->At(cid));
+    Type& type = Type::ZoneHandle(Type::New(
+        cls, type_args, TokenPosition::kNoSource, Nullability::kNonNullable));
+    ASSERT(type.IsInstantiated());
+    type.SetIsFinalized();
+    return CompileType(CompileType::kNonNullable, cid, &type);
+  }
+  return *inferred_type;
+}
+
 CompileType StaticCallInstr::ComputeType() const {
   // TODO(alexmarkov): calculate type of StaticCallInstr eagerly
   // (in optimized mode) and avoid keeping separate result_type.
-  CompileType* inferred_type = result_type();
+  CompileType* const inferred_type = result_type();
+  if (is_known_list_constructor()) {
+    return ComputeListFactoryType(inferred_type, ArgumentValueAt(0));
+  }
   if ((inferred_type != NULL) &&
       (inferred_type->ToNullableCid() != kDynamicCid)) {
     return *inferred_type;
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 2c505b8..671deaf 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -840,6 +840,8 @@
     body += B->NativeFunctionBody(dart_function, first_parameter);
   } else if (has_body) {
     body += BuildStatement();
+  } else if (dart_function.is_external()) {
+    body += ThrowNoSuchMethodError(dart_function);
   }
 
   if (body.is_open()) {
@@ -3780,24 +3782,30 @@
 
   // The type argument for the factory call.
   Fragment instructions = TranslateInstantiatedTypeArguments(type_arguments);
-  LocalVariable* type = MakeTemporary();
 
-  instructions += LoadLocal(type);
   if (length == 0) {
-    instructions += Constant(Object::empty_array());
-  } else {
-    // The type arguments for CreateArray.
-    instructions += LoadLocal(type);
-    instructions += IntConstant(length);
-    instructions += CreateArray();
+    instructions += IntConstant(0);
+    instructions += StaticCall(
+        position,
+        Function::ZoneHandle(Z, I->object_store()->growable_list_factory()), 2,
+        ICData::kStatic);
+    return instructions;
+  }
 
-    LocalVariable* array = MakeTemporary();
-    for (intptr_t i = 0; i < length; ++i) {
-      instructions += LoadLocal(array);
-      instructions += IntConstant(i);
-      instructions += BuildExpression();  // read ith expression.
-      instructions += StoreIndexed(kArrayCid);
-    }
+  LocalVariable* type = MakeTemporary();
+  instructions += LoadLocal(type);
+
+  // The type arguments for CreateArray.
+  instructions += LoadLocal(type);
+  instructions += IntConstant(length);
+  instructions += CreateArray();
+
+  LocalVariable* array = MakeTemporary();
+  for (intptr_t i = 0; i < length; ++i) {
+    instructions += LoadLocal(array);
+    instructions += IntConstant(i);
+    instructions += BuildExpression();  // read ith expression.
+    instructions += StoreIndexed(kArrayCid);
   }
 
   const Class& factory_class =
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 905112c..712deec 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -680,6 +680,11 @@
   const Class& owner = Class::Handle(Z, target.Owner());
   AbstractType& receiver = AbstractType::ZoneHandle();
   InvocationMirror::Kind kind = InvocationMirror::Kind::kMethod;
+  if (target.IsImplicitGetterFunction() || target.IsGetterFunction()) {
+    kind = InvocationMirror::kGetter;
+  } else if (target.IsImplicitSetterFunction() || target.IsSetterFunction()) {
+    kind = InvocationMirror::kSetter;
+  }
   InvocationMirror::Level level;
   if (owner.IsTopLevel()) {
     level = InvocationMirror::Level::kTopLevel;
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 572f0a0..048038e 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -714,6 +714,7 @@
 
 class Int32x4 : public AllStatic {
  public:
+  static word value_offset();
   static word InstanceSize();
   static word NextFieldOffset();
 };
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 63f65ca..6320c51 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -146,6 +146,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -648,6 +649,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -1154,6 +1156,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -1653,6 +1656,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -2160,6 +2164,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -2656,6 +2661,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -3156,6 +3162,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -3649,6 +3656,7 @@
 static constexpr dart::compiler::target::word ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
+static constexpr dart::compiler::target::word Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -4158,6 +4166,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 16;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 20;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -4712,6 +4721,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -5272,6 +5282,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -5829,6 +5840,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 12;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 16;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 20;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -6376,6 +6388,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -6929,6 +6942,7 @@
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
 static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
 static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
+static constexpr dart::compiler::target::word AOT_Int32x4_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index b477334..0dc6a35 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -109,6 +109,7 @@
   FIELD(ICData, entries_offset)                                                \
   FIELD(ICData, owner_offset)                                                  \
   FIELD(ICData, state_bits_offset)                                             \
+  FIELD(Int32x4, value_offset)                                                 \
   FIELD(Isolate, shared_class_table_offset)                                    \
   FIELD(Isolate, cached_class_table_table_offset)                              \
   FIELD(Isolate, current_tag_offset)                                           \
diff --git a/runtime/vm/compiler/write_barrier_elimination.cc b/runtime/vm/compiler/write_barrier_elimination.cc
index 4d1e453..10b18c5 100644
--- a/runtime/vm/compiler/write_barrier_elimination.cc
+++ b/runtime/vm/compiler/write_barrier_elimination.cc
@@ -329,14 +329,13 @@
     case Slot::Kind::kDartField:  // Instance
       return true;
 
-#define FOR_EACH_NATIVE_SLOT(class, underlying_type, field, type, modifiers)   \
+#define FOR_EACH_NATIVE_SLOT(class, underlying_type, field, __, ___)           \
   case Slot::Kind::k##class##_##field:                                         \
     return std::is_base_of<InstanceLayout, underlying_type>::value ||          \
            std::is_base_of<ContextLayout, underlying_type>::value ||           \
            std::is_base_of<UnhandledExceptionLayout, underlying_type>::value;
 
-      BOXED_NATIVE_SLOTS_LIST(FOR_EACH_NATIVE_SLOT)
-      UNBOXED_NATIVE_SLOTS_LIST(FOR_EACH_NATIVE_SLOT)
+      NATIVE_SLOTS_LIST(FOR_EACH_NATIVE_SLOT)
 #undef FOR_EACH_NATIVE_SLOT
 
     default:
diff --git a/tests/language/final/syntax_test.dart b/tests/language/final/syntax_test.dart
index 42b2163..4903587 100644
--- a/tests/language/final/syntax_test.dart
+++ b/tests/language/final/syntax_test.dart
@@ -6,9 +6,9 @@
 
 main() {
   final f0 = 42;
-  final f1; //# 01: compile-time error
+  final f1; //# 01: ok
   final int f2 = 87;
-  final int f3; //# 02: compile-time error
+  final int f3; //# 02: ok
   Expect.equals(42, f0);
   Expect.equals(87, f2);
 
diff --git a/tests/language/nnbd/definite_assignment/read_error_test.dart b/tests/language/nnbd/definite_assignment/read_error_test.dart
index 8da8c77..2f08ad1 100644
--- a/tests/language/nnbd/definite_assignment/read_error_test.dart
+++ b/tests/language/nnbd/definite_assignment/read_error_test.dart
@@ -1022,12 +1022,16 @@
     final dynamic x;
     x = 3;
     x++;
+//  ^
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   }
 
   {
     final dynamic x;
     x = 3;
     ++x;
+//    ^
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   }
 
   {
@@ -1040,12 +1044,16 @@
     final dynamic x;
     x = 3;
     x += 3;
+//  ^
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   }
 
   {
     final dynamic x;
     x = 3;
     x ??= 3;
+//  ^
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   }
 
   {
@@ -1058,6 +1066,8 @@
     final dynamic x;
     x = 3;
     3 ?? x;
+    //   ^
+    // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
   }
 }
 
diff --git a/tests/language/nnbd/flow_analysis/issue43093_test.dart b/tests/language/nnbd/flow_analysis/issue43093_test.dart
new file mode 100644
index 0000000..a0b9586
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/issue43093_test.dart
@@ -0,0 +1,34 @@
+// 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 a regression test for a bug in which `!` applied to a null-shorting
+// expression would corrupt the state of flow analysis, causing a crash when
+// trying to finish analyzing an enclosing `if` statement.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+class C {
+  final int? x;
+  C(this.x);
+}
+
+int? f(bool b, C? c) {
+  if (b) {
+    return c?.x!;
+  } else {
+    return null;
+  }
+}
+
+main() {
+  // Note: it is currently being discussed whether `!` should participate in
+  // null shorting (see https://github.com/dart-lang/language/issues/1163), so
+  // let's not have an expectation about whether `f(true, null)` should throw an
+  // exception.
+  //  f(true, null);
+
+  Expect.throws(() => f(true, C(null)));
+  Expect.equals(f(true, C(1)), 1);
+}
diff --git a/tests/language/variable/ref_before_declaration_test.dart b/tests/language/variable/ref_before_declaration_test.dart
index ee9ebc2..4eddfd3 100644
--- a/tests/language/variable/ref_before_declaration_test.dart
+++ b/tests/language/variable/ref_before_declaration_test.dart
@@ -45,6 +45,8 @@
       use(x); // Refers to top-level x.
       //  ^
       // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
+      //  ^
+      // [analyzer] COMPILE_TIME_ERROR.READ_POTENTIALLY_UNASSIGNED_FINAL
       use(y); // Refers to top-level y.
       //  ^
       // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
@@ -100,6 +102,8 @@
   var pie = math.pi;
   //        ^^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
+  //        ^^^^
+  // [analyzer] COMPILE_TIME_ERROR.READ_POTENTIALLY_UNASSIGNED_FINAL
   final math = 0;
   //    ^
   // [cfe] Can't declare 'math' because it was already used in this scope.
diff --git a/tests/lib/js/constructor_parameters_static_test.dart b/tests/lib/js/constructor_parameters_static_test.dart
index 82b7b1e..f52db7fe 100644
--- a/tests/lib/js/constructor_parameters_static_test.dart
+++ b/tests/lib/js/constructor_parameters_static_test.dart
@@ -2,8 +2,6 @@
 // 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.
 
-// TODO(srujzs): Fix this test once web static error testing is supported.
-
 // Checks for static errors related to parameters for constructors and
 // factories.
 
diff --git a/tests/lib/js/js_annotation_static_test.dart b/tests/lib/js/js_annotation_static_test.dart
index a8d7cd7..9ecb300 100644
--- a/tests/lib/js/js_annotation_static_test.dart
+++ b/tests/lib/js/js_annotation_static_test.dart
@@ -2,8 +2,6 @@
 // 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.
 
-// TODO(srujzs): Fix this test once web static error testing is supported.
-
 // Tests static errors for incorrect JS annotations.
 
 @JS()
@@ -12,8 +10,6 @@
 import 'package:js/js.dart';
 
 class Foo {
-  //  ^^^
-  // [web] TODO(srujzs): Test context once supported.
   @JS()
   external Foo(int bar);
   //       ^
diff --git a/tests/lib/js/parameters_static_test.dart b/tests/lib/js/parameters_static_test.dart
index 11f875a..7fa7ddc 100644
--- a/tests/lib/js/parameters_static_test.dart
+++ b/tests/lib/js/parameters_static_test.dart
@@ -2,8 +2,6 @@
 // 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.
 
-// TODO(srujzs): Fix this test once web static error testing is supported.
-
 // Checks for static errors related to parameters for methods.
 
 @JS()
diff --git a/tools/VERSION b/tools/VERSION
index 76682b3..85b59ea 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 10
 PATCH 0
-PRERELEASE 45
+PRERELEASE 46
 PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/experimental_features.yaml b/tools/experimental_features.yaml
index e9b21ba..bc31403 100644
--- a/tools/experimental_features.yaml
+++ b/tools/experimental_features.yaml
@@ -90,6 +90,7 @@
 features:
   non-nullable:
     help: "Non Nullable by default"
+    experimentalReleaseVersion: '2.10.0'
 
   triple-shift:
     help: "Triple-shift operator"
diff --git a/tools/gn.py b/tools/gn.py
index 14929d6..fbd3a2f 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -240,10 +240,24 @@
             gn_args['toolchain_prefix'] = ParseStringMap(arch, toolchain)
 
     goma_dir = os.environ.get('GOMA_DIR')
+    # Search for goma in depot_tools in path
+    goma_depot_tools_dir = None
+    for path in os.environ.get('PATH', '').split(os.pathsep):
+        if os.path.basename(path) == 'depot_tools':
+            cipd_bin = os.path.join(path, '.cipd_bin')
+            if os.path.isfile(os.path.join(cipd_bin, 'gomacc')):
+                goma_depot_tools_dir = cipd_bin
+                break
+    # Otherwise use goma from home directory.
+    # TODO(whesse): Remove support for goma installed in home directory.
+    # Goma will only be distributed through depot_tools.
     goma_home_dir = os.path.join(os.getenv('HOME', ''), 'goma')
     if args.goma and goma_dir:
         gn_args['use_goma'] = True
         gn_args['goma_dir'] = goma_dir
+    elif args.goma and goma_depot_tools_dir:
+        gn_args['use_goma'] = True
+        gn_args['goma_dir'] = goma_depot_tools_dir
     elif args.goma and os.path.exists(goma_home_dir):
         gn_args['use_goma'] = True
         gn_args['goma_dir'] = goma_home_dir
diff --git a/utils/bazel/kernel_worker.dart b/utils/bazel/kernel_worker.dart
index 779ec62..194fe55 100644
--- a/utils/bazel/kernel_worker.dart
+++ b/utils/bazel/kernel_worker.dart
@@ -144,7 +144,8 @@
   ..addMultiOption('enable-experiment',
       help: 'Enable a language experiment when invoking the CFE.')
   ..addMultiOption('define', abbr: 'D')
-  ..addFlag('verbose', defaultsTo: false);
+  ..addFlag('verbose', defaultsTo: false)
+  ..addFlag('sound-null-safety', defaultsTo: false);
 
 class ComputeKernelResult {
   final bool succeeded;
@@ -187,6 +188,9 @@
   var sources = (parsedArgs['source'] as List<String>).map(_toUri).toList();
   var excludeNonSources = parsedArgs['exclude-non-sources'] as bool;
 
+  var nnbdMode = parsedArgs['sound-null-safety'] as bool
+      ? fe.NnbdMode.Strong
+      : fe.NnbdMode.Weak;
   var summaryOnly = parsedArgs['summary-only'] as bool;
   var trackWidgetCreation = parsedArgs['track-widget-creation'] as bool;
 
@@ -294,7 +298,8 @@
         summaryOnly,
         environmentDefines,
         trackNeededDillLibraries: recordUsedInputs,
-        verbose: verbose);
+        verbose: verbose,
+        nnbdMode: nnbdMode);
   } else {
     state = await fe.initializeCompiler(
         // TODO(sigmund): pass an old state once we can make use of it.
@@ -307,7 +312,8 @@
         fileSystem,
         parsedArgs['enable-experiment'] as List<String>,
         environmentDefines,
-        verbose: verbose);
+        verbose: verbose,
+        nnbdMode: nnbdMode);
   }
 
   void onDiagnostic(fe.DiagnosticMessage message) {