Version 1.25.0-dev.11.0

Merge commit '9abec74aaff75c5b23db1daea81e66c69e63c01e' into dev
diff --git a/build/copy_tree.gni b/build/copy_tree.gni
index b3a4c0c..a368a29 100644
--- a/build/copy_tree.gni
+++ b/build/copy_tree.gni
@@ -10,11 +10,13 @@
 # Optional parameters:
 # exclude - A comma separated list that is passed to shutil.ignore_patterns()
 #           in tools/copy_tree.py.
-template("copy_tree") {
+template("_copy_tree") {
   assert(defined(invoker.source), "copy_tree must define 'source'")
   assert(defined(invoker.dest), "copy_tree must define 'dest'")
+  assert(defined(invoker.inputs), "copy_tree must define 'inputs'")
   source = invoker.source
   dest = invoker.dest
+  inputs = invoker.inputs
   action(target_name) {
     if (defined(invoker.visibility)) {
       visibility = invoker.visibility
@@ -38,12 +40,7 @@
       ]
     }
 
-    dry_run_args = common_args + [ "--dry-run" ]
-    input_files = exec_script("$_dart_root/tools/copy_tree.py",
-                              dry_run_args,
-                              "list lines")
-    inputs = input_files
-    relative_files = rebase_path(input_files, rebase_path(source))
+    relative_files = rebase_path(inputs, rebase_path(source))
 
     output_files = []
     foreach(input, relative_files) {
@@ -55,3 +52,54 @@
     args = common_args
   }
 }
+
+# copy_trees() arranges to invoke copy_tree.py only once to gather the list of
+# input source files for every _copy_tree() target. It takes a list of scopes as
+# a parameter. The scopes should contain the following mappings.
+#
+# target: The target name for the _copy_tree() target.
+# visibility: The visibility for the _copy_tree() target.
+# source: The source directory relative to this directory.
+# dest: The destination directory for the _copy_tree() target.
+# deps: Any deps needed for the _copy_tree() target.
+# ignore_patterns: Patterns to ignore when walking the directory tree.
+#                  This should be '{}' if nothing should be ignored.
+#
+# copy_trees() will then make sure each invocation of _copy_tree() has the
+# correct 'inputs' parameter
+template("copy_trees") {
+  assert(defined(invoker.sources), "$target_name must define 'source'")
+  sources = invoker.sources
+  copy_tree_source_paths = []
+  foreach(copy_tree_spec, sources) {
+    copy_tree_source_paths += [
+      rebase_path(copy_tree_spec.source),
+      copy_tree_spec.ignore_patterns
+    ]
+  }
+
+  # Evaluate script output as GN, producing a scope containing a single value
+  # "sources"
+  copy_tree_inputs_scope = exec_script("$_dart_root/tools/copy_tree.py",
+                                       ["--gn"] + copy_tree_source_paths,
+                                       "scope")
+
+  # A list of lists of input source files for copy_tree.
+  copy_tree_inputs = copy_tree_inputs_scope.sources
+  copy_tree_inputs_index = 0
+  foreach(copy_tree_spec, sources) {
+    _copy_tree(copy_tree_spec.target) {
+      visibility = copy_tree_spec.visibility
+      source = copy_tree_spec.source
+      dest = copy_tree_spec.dest
+      inputs = copy_tree_inputs[copy_tree_inputs_index]
+      if (defined(copy_tree_spec.deps)) {
+        deps = copy_tree_spec.deps
+      }
+      if (copy_tree_spec.ignore_patterns != "{}") {
+        exclude = copy_tree_spec.ignore_patterns
+      }
+    }
+    copy_tree_inputs_index = copy_tree_inputs_index + 1
+  }
+}
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 1079288..5900015 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -7,9 +7,9 @@
 \usepackage{lmodern}
 \usepackage[T1]{fontenc}
 \newcommand{\code}[1]{{\sf #1}}
-\title{Dart Programming Language  Specification  \\
+\title{Dart Programming Language Specification  \\
 {5th edition draft}\\
-{\large Version 1.15.0}}
+{\large Version 2.0.0-dev}}
 
 % For information about Location Markers (and in particular the
 % commands \LMHash and \LMLabel), see the long comment at the
@@ -19,6 +19,9 @@
 % =======
 % Significant changes to the specification.
 %
+% 2.0
+% - Don't allow functions as assert test values.
+%
 % 1.15
 % - Change how language specification describes control flow.
 % - Object initialization now specifies initialization order correctly.
@@ -6757,41 +6760,34 @@
 \LMHash{}
 The grammar allows a trailing comma before the closing parenthesis,
 similarly to an argument list. That comma, if present, has no effect.
-An assertion with a trailing comme is equivalent to one with that
+An assertion with a trailing comma is equivalent to one with that
 comma removed.
 
 \LMHash{}
-An assertion on the form \code{\ASSERT($e$))} is equivalent to an assertion
-on the form \code{\ASSERT($e$, null)}.
+An assertion on the form \code{\ASSERT($e$))} is equivalent to an assertion on the form \code{\ASSERT($e$, null)}.
 
 \LMHash{}
 Execution of an assert statement executes the assertion as described below
 and completes in the same way as the assertion.
 
 \LMHash{}
-In production mode the assertion has no effect
+In production mode an assertion has no effect
 and its execution immediately completes normally (\ref{completion}).
 In checked mode,
 execution of an assertion \code{\ASSERT{}($c$, $e$)} proceeds as follows:
 
 \LMHash{}
-The expression $c$ is evaluated to an object $o$.
-If the class of $o$ is a subtype of \code{Function}
-and the assertion does not occur in the initializer list of a \CONST{} constructor,
-then let $r$ be the result of invoking $o$ with no arguments.
-Otherwise let $r$ be $o$.
+The expression $c$ is evaluated to an object $r$.
 It is a dynamic type error if $r$ is not of type \code{bool}.
 \commentary{Hence it is a compile-time error if that situation arises during evaluation of an assertion in a \CONST{} constructor invocation.}
-If $r$ is \TRUE{}, execution of the assert statement completes normally (\ref{completion}).
+If $r$ is \TRUE{} then execution of the assert statement completes normally (\ref{completion}).
 Otherwise, $e$ is evaluated to an object $m$
-and then the execution of the assert statement throws (\ref{completion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the \ASSERT{} statement.
+and then the execution of the assert statement throws (\ref{completion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the assertion.
 
 \LMHash{}
-It is a static type warning if the type of $e$ may not be assigned to either
-\code{bool} or $() \rightarrow$ \code{bool}.
-If the assertion occurs in a \CONST{} constructor initializer list, it is a static type warning if the type of $e$ may not be assigned to \code{bool}.
+It is a static type warning if the type of $e$ may not be assigned to \code{bool}.
 
-\rationale{Why is this a statement, not a built in function call? Because it is handled magically so it has no effect and no overhead in production mode. Also, in the absence of final methods. one could not prevent it being overridden (though there is no real harm in that).  It cannot be viewed as a function call that is being optimized away because the argument might have side effects.
+\rationale{Why is this a statement, not a built in function call? Because it is handled magically so it has no effect and no overhead in production mode. Also, in the absence of final methods, one could not prevent it being overridden (though there is no real harm in that). It cannot be viewed as a function call that is being optimized away because the arguments might have side effects.
 }
 
 %If a lexically visible declaration named \code{assert} is in scope, an assert statement
diff --git a/docs/language/informal/generalized-void.md b/docs/language/informal/generalized-void.md
new file mode 100644
index 0000000..ddbc526c
--- /dev/null
+++ b/docs/language/informal/generalized-void.md
@@ -0,0 +1,326 @@
+## Feature: Generalized Void
+
+Author: eernst@
+
+**Status**: Under implementation.
+
+**This document** is an informal specification of the generalized support
+in Dart 1.x for the type `void`. Dart 2 will have a very similar kind of
+generalized support for `void`, without the function type subtype exception
+that this feature includes for backward compatibility in Dart 1.x. This
+document specifies the feature for Dart 1.x and indicates how Dart 2
+differs at relevant points.
+
+**The feature** described here, *generalized void*, allows for using the
+type `void` as a type annotation and as a type argument.
+
+The **motivation** for allowing the extended usage is that it helps
+developers state the intent that a particular **value should be
+ignored**. For example, a `Future<void>` may be awaited in order to satisfy
+ordering dependencies in the execution, but no useful value will be
+available at completion. Similarly, a `Visitor<void>` (where we assume the
+type argument is used to describe a value returned by the visitor) may be
+used to indicate that the visit is performed for its side-effects
+alone. The generalized void feature includes mechanisms to help developers
+avoid using such a value.
+
+In general, situations where it may be desirable to use `void` as
+a type argument arise when the corresponding formal type variable is used
+covariantly. For instance, the class `Future<T>` uses return types
+like `Future<T>` and `Stream<T>`, and it uses `T` as a parameter type of a
+callback in the method `then`.
+
+Note that is not technically dangerous to use a value of type `void`, it
+does not violate any constraints at the level of the language semantics.
+Developers just made the decision to declare that the value is useless,
+based on the program logic. Hence, there is **no requirement** for the
+generalized void mechanism to be strict and **sound**. However, it is the
+intention that the mechanism should be sufficiently strict to make the
+mechanism helpful and non-frustrating in practice.
+
+No constraints are imposed on which values may be given type `void`, so in
+that sense `void` can be considered to be just another name for the type
+`Object`, flagged as useless. Note that this is an approximate rule (in
+Dart 1.x), it fails to hold for function types.
+
+The mechanisms helping developers to avoid using values of type `void` are
+divided into **two phases**. This document specifies the first phase.
+
+The **first phase** uses restrictions which are based on syntactic criteria
+in order to ensure that direct usage of a value of type `void` is a static
+warning (in Dart 2: an error). A few exceptions are allowed, e.g., type
+casts, such that developers can explicitly make the choice to use such a
+value. The general rule is that all values of type `void` must be
+discarded.
+
+The **second phase** will deal with casts and preservation of
+voidness. Some casts will cause derived expressions to switch from having
+type `void` to having some other type, and hence those casts introduce the
+possibility that "a void value" will get passed and used. Here is an
+example:
+
+```dart
+class A<T> { T foo(); }
+A<Object> a = new A<void>(); // Violates voidness preservation.
+var x = a.foo(); // Use a "void value", with static type Object.
+```
+
+We intend to introduce a **voidness preservation analysis** (which is
+similar to a small type system) to keep track of such situations. As
+mentioned, the second phase is **not specified in this document**. Voidness
+preservation is a purely static analysis, and there are no plans to
+introduce dynamic checking for it.
+
+## Syntax
+
+The reserved word `void` remains a reserved word, but it will now be usable
+in additional contexts. Below are the grammar rules affected by this
+change. New grammar rules are marked NEW, other grammar rules are
+modified. Unchanged alternatives in a rule are shown as `...`. The grammar
+rules used as a starting point for this syntax are taken from the language
+specification as of June 2nd, 2017 (git commit 0603b18).
+
+```
+typeNotVoid ::= // NEW
+    typeName typeArguments?
+type ::= // ENTIRE RULE MODIFIED
+    typeNotVoid | 'void'
+redirectingFactoryConstructorSignature ::=
+    'const'? 'factory' identifier ('.' identifier)? 
+    formalParameterList `=' typeNotVoid ('.' identifier)?
+superclass ::=
+    'extends' typeNotVoid
+mixinApplication ::=
+    typeNotVoid mixins interfaces?
+typeParameter ::=
+    metadata identifier ('extends' typeNotVoid)?
+newExpression ::=
+    'new' typeNotVoid ('.' identifier)? arguments
+constObjectExpression ::=
+    'const' typeNotVoid ('.' identifier)? arguments
+typeTest ::=
+    isOperator typeNotVoid
+typeCast ::=
+    asOperator typeNotVoid
+onPart ::=
+    catchPart block |
+    'on' typeNotVoid catchPart? block
+typeNotVoidList ::=
+    typeNotVoid (',' typeNotVoid)*
+mixins ::=
+    'with' typeNotVoidList
+interfaces ::=
+    'implements' typeNotVoidList
+functionSignature ::=
+    metadata type? identifier formalParameterList
+functionFormalParameter ::=
+    metadata 'covariant'? type? identifier formalParameterList
+operatorSignature ::=
+    type? 'operator' operator formalParameterList
+getterSignature ::=
+    type? 'get' identifier
+setterSignature ::=
+    type? 'set' identifier formalParameterList
+topLevelDefinition ::=
+    ...
+    type? 'get' identifier functionBody |
+    type? 'set' identifier formalParameterList functionBody |
+    ...
+functionPrefix ::=
+    type? identifier
+```
+
+The rule for `returnType` in the grammar is deleted.
+
+*This is because we can now use `type`, which derives the same expressions
+as `returnType` used to derive. In that sense, some of these grammar
+modifications are renames. Note that the grammar contains known mistakes,
+especially concerned with the placement of `metadata`. This document makes
+no attempt to correct those mistakes, that is a separate issue.*
+
+*A complete grammar which includes support for generalized void is
+available in the file Dart.g
+from
+[https://codereview.chromium.org/2688903004/](https://codereview.chromium.org/2688903004/).*
+
+## Dynamic semantics
+
+There are no values at run time whose dynamic type is the type void.
+
+*This implies that it is never required for the getter `runtimeType` in the
+built-in class `Object` to return a reified representation of the type
+void. Note, however, that apart from the fact that usage is restricted for
+values with the type void, it is possible for an expression of type void to
+evaluate to any value. In that sense, every value has the type void, it is
+just not the only type that it has, and loosely speaking it is not the most
+specific type.*
+
+There is no value which is the reified representation of the type void at
+run time.
+
+*Syntactically, `void` cannot occur as an expression, and hence expression
+evaluation cannot directly yield such a value. However, a formal type
+parameter can be used in expressions, and the actual type argument bound to
+that formal type parameter can be the type void. That case is specified
+explicitly below. Apart from the reserved word `void` and a formal type
+parameter, no other term can denote the type void.*
+
+*Conversely, `void` cannot denote any other entity than the type void:
+`void` cannot occur as the declared name of any declaration (including
+library prefixes, types, variables, parameters, etc.). This implies that
+`void` is not subject to scoped lookup, and the name is not exported by any
+system library. Similarly, it can never be accessed using a prefixed
+expression (`p.void`). Hence, `void` has a fixed meaning everywhere in all
+Dart programs, and it can only occur as a stand-alone word.*
+
+When `void` is passed as an actual type argument to a generic class or a
+generic function, and when the type void occurs as a parameter type in a
+function type, the reified representation is equal (according to `==`) to
+the reified representation of the built-in class `Object`.
+
+*It is encouraged for an implementation to use a reified representation for
+`void` as a type argument and as a parameter type in a function type which
+is not `identical` to the reified representation of the built-in class
+`Object`, but they must be equal. This allows implementations to produce
+better diagnostic messages, e.g., in case of a runtime error.*
+
+*This treatment of the reified representation of the type void reinforces
+the understanding that "voidness" is merely a statically known flag on the
+built-in class `Object`, it is not a separate type. However, for backward
+compatibility we need to treat return types differently.*
+
+When `void` is specified as the return type of a function, the reified
+representation of the return type is left unspecified.
+
+*There is no way for a Dart program at run time to obtain a reified
+representation of that return type alone, even when the function type as a
+whole may be obtained (e.g., the function type could be evaluated as an
+expression). It is therefore not necessary to reified representation of
+such a return type.*
+
+*It may be possible to use a reflective subsystem (mirrors) to deconstruct
+a function type whose return type is the type void, but the existing design
+of the system library `dart:mirrors` already handles this case by allowing
+for a type mirror that does not have a reflected type.*
+
+Consider a type _T_ where the type void occurs as an actual type argument
+to a generic class, or as a parameter type in a function type. Dynamically,
+the more-specific-than relation (`<<`) and the dynamic subtype relation
+(`<:`) between _T_ and other types are determined by the following rule:
+the type void is treated as being the built-in class `Object`.
+
+*Dart 1.x does not support generic function types dynamically, because they
+are erased to regular function types during compilation. Hence there is no
+need to specify the the typing relations for generic function types. In
+Dart 2, the subtype relationship for generic function types follows from
+the rule that `void` is treated as `Object`.*
+
+Consider a function type _T_ where the return type is the type void. The
+dynamic more-specific-than relation, `<<`, and the dynamic subtype
+relation, `<:`, are determined by the existing rules in the language
+specification, supplemented by the above rule for handling occurrences of
+the type void other than as a return type.
+
+*This ensures backward compatibility for the cases where the type void can
+be used already today. It follows that it will be a breaking change to
+switch to a ruleset where the type void even as a return type is treated
+like the built-in class Object, i.e. when switching to Dart 2.0. However,
+the only situation where the semantics differs is as follows: Consider a
+situation where a value of type `void Function(...)` is assigned to a
+variable or parameter `x` whose type annotation is `Object Function(...)`,
+where the argument types are arbitrary, but such that the assignment is
+permitted. In that situation, in checked mode, the assignment will fail
+with the current semantics, because the type of that value is not a subtype
+of the type of `x`. The rules in this document preserve that behavior. If
+we were to consistently treat the type void as `Object` at run time (as in
+Dart 2) then this assignment would be permitted (but we would then use
+voidness preservation to detect and avoid this situation at compile time).*
+
+*The semantics of checked mode checks involving types where the type void
+occurs is determined by the semantics of subtype tests, so we do not
+specify that separately.*
+
+An instantiation of a generic class `G` is malbounded if it contains `void`
+as an actual type argument for a formal type parameter, unless that type
+parameter does not have a bound, or it has a bound which is the built-in
+class `Object`, or `dynamic`.
+
+*The treatment of malbounded types follows the current specification.*
+
+## Static Analysis
+
+For the static analysis, the more-specific-than relation, `<<`, and the
+subtype relation, `<:`, are determined by the same rules as described above
+for the dynamic semantics.
+
+*That is, the type void is considered to be equivalent to the built-in
+class `Object`, except when used as a return type, in which case it is
+effectively considered to be a proper supertype of `Object`. As mentioned,
+voidness preservation is a separate analysis which is not specified by this
+document, but it is intended to be used in the future to track "voidness"
+in types and flag implicit casts wherein information about voidness may
+indirectly be lost. With voidness preservation in place, we expect to be
+able to treat the type void as `Object` in all cases during subtype
+checks.*
+
+It is a static warning for an expression to have type void, except for the
+following situations:
+
+*   In an expressionStatement `e;`, e may have type void.
+*   In the initialization and increment expressions of a for-loop,
+    `for (e1; e2; e3) {..}`, `e1` and `e3` may have type void.
+*   In a typeCast `e as T`, `e` may have type void.
+*   In a typeTest `e is T` or `e is! T`, `e` may have type void.
+*   In a parenthesized expression `(e)`, `e` may have type void.
+*   In a return statement `return e;`, when the return type of the innermost
+    enclosing function is the type void, `e` may have type void.
+
+*Note that the parenthesized expression itself has type void, so it is
+again subject to the same constraints. Also note that we may not allow
+return statements returning an expression of type void in the future, but
+it is allowed here for backward compatibility.*
+
+During bounds checking, it is possible that a bound of a formal type
+parameter of a generic class or function is statically known to be the type
+void. In this case, the bound is considered to be the built-in class
+`Object`.
+
+## Discussion
+
+Expressions derived from typeCast and typeTest do not support `void` as the
+target type. We have omitted support for this situation because we consider
+it to be useless. If void is passed indirectly via a type variable `T` then
+`e as T`, `e is T`, and `e is! T` will treat `T` like `Object`. In general,
+the rationale is that the type void admits all values (because it is just
+`Object` plus a "static voidness flag"), but values of type void should be
+discarded.
+
+The treatment of bounds is delicate. We syntactically prohibit `void` as a
+bound of a formal type parameter of a generic class or function. It is
+possible to pass the type void as an actual type argument to a generic
+class, and that type argument might in turn be used as the bound of another
+formal type parameter of the class, or of a generic function in the
+class. It would be possible to make it a compile-time error to pass `void`
+as a type argument to a generic class where it will be used as a bound, but
+this would presumably require a transitive traversal of all generic classes
+and functions where the corresponding formal type parameter is passed on to
+other generic classes or functions, which would be highly brittle: A tiny
+change to a generic class or function could break code far away. So we do
+not wish to prevent formal type parameter bounds from indirectly becoming
+the type void. This motivated the decision to treat such a void-valued
+bound as `Object`.
+
+## Updates
+
+*   August 9th 2017: Transferred to SDK repo, docs/language/informal.
+
+*   July 16th 2017: Reformatted as a gist.
+
+*   June 13th 2017: Compile-time error for using a void value was changed to
+    static warning.
+*   June 12th 2017: Grammar changed extensively, to use
+    `typeNotVoid` rather than
+    `voidOrType`.
+*   June 5th 2017: Added `typeCast` and
+    `typeTest` to the locations where void
+    expressions may occur.
diff --git a/docs/newsletter/20170811.md b/docs/newsletter/20170811.md
new file mode 100644
index 0000000..2f04d93
--- /dev/null
+++ b/docs/newsletter/20170811.md
@@ -0,0 +1,117 @@
+# Dart Language and Library Newsletter
+2017-08-11
+@floitschG
+
+Welcome to the Dart Language and Library Newsletter.
+
+## Follow Ups
+
+### Void Arrow Functions
+As mentioned in an earlier newsletter, `void` arrow functions with non-void expressions (as in `void foo() => x++`) are supported with Dart 1.24. However, this feature still has to be used with care. Due to a temporary limitation of the type inference in strong mode, returning a non-void expression might not work as expected.
+
+For example:
+
+``` dart
+var f = new Future(() { doSomethingAsynchronously(); };
+f.catchError((e) => errorCounter++);
+```
+
+The type-inference algorithm currently infers `Null` for the generic type of the `Future`. Functions without `return` indeed return `null`, so technically, that type is correct. However, the `catchError` signature requires the provided function to return the same type as the function it is attached to. In this case, `f` is a `Future<Null>`, but `errorCounter++` is an `int`. Since `int` is not `Null` this throws at runtime.
+
+As mentioned in earlier newsletters, we are actively working on generalizing `void`, and once it is supported the inferred type of `f` will be `Future<void>`. The `catchError` closure then would just need to be a subtype of `void Function()` which would work fine for `(e) => errorCounter++`. Until then, be careful where you use the `void` arrow function syntax.
+
+### Deferred Loading
+Last time we discussed our plans to allow the use of deferred types even when the deferred libraries haven't been loaded yet. This makes programs, like the following, possible:
+
+``` dart
+/// lib1.dart
+class A {}
+
+/// lib2.dart
+export "lib1.dart" show A;
+
+/// main.dart
+import "lib1.dart";
+import "lib2.dart" deferred as def;
+
+main() {
+  print(new A() is def.A);  // Requires knowledge of `def.A`.
+}
+```
+
+A follow-up mail questioned the need for such a big hammer. In reality, most programs just want to use the deferred type as a type annotations:
+
+``` dart
+main() async {
+  def.A a; // <-- Illegal today.
+  await def.loadLibrary();
+  a = new def.A();
+}
+```
+
+Is there a simpler / better solution that would allow patterns like these, but not require full knowledge of the deferred types?
+
+It turns out, that the answer is likely "no". In fact, we find that, because of type inference, even the current behavior is already counterintuitive and should be fixed. That is, even without allowing more uses of deferred types, programs don't behave as expected:
+
+``` dart
+// ------ def.dart
+class Box<T> {
+  T value;
+  Box(this.value);
+}
+
+// ------ main.dart
+import "def.dart" deferred as def;
+
+main() async {
+  await def.loadLibrary();
+  var box = new def.Box(499);
+  var list = [box.value];
+}
+```
+
+With type inference, users expect three things to happen:
+1. `box` is of type `def.Box<int>`.
+2. the generic type of `new def.Box(499)` is `Box<int>`, as if the user had written `new def.Box<int>(499)`.
+3. `list` is of type `List<int>`.
+
+Without access to the deferred sources, none of these expectations is met. Since type inference runs at compile-time, `box` has to be treated like `dynamic`. There is simply not more information available. For similar reasons, `box` must be of type `Box<dynamic>`. Since the invocation of the constructor happens at runtime (where no type-inference happens), the missing generic type is dynamically filled with `dynamic`.
+
+Finally, `list` must be of type `List<dynamic>` since `box.value` is a dynamic invocation, and the type inference doesn't know that the returned value will be of type `int`.
+
+This small example shows that type inference requires knowledge of the deferred types to do its job. This means that all sources must be available when compiling individual libraries. Once that's the case it doesn't make sense to restrict the use of deferred types. They don't take up much space (which is the usual reason for deferring libraries), and giving full access to them removes a lot of boilerplate or dynamic code.
+
+## Const Functions
+The language team discussed the possibility of supporting `const` functions.
+
+``` dart
+class A {
+  final Function(e) callback;
+  const A(this.callback);
+}
+
+// Provide a `const` function to `A`'s constructor.
+const x = const A(const (e) { print(e); });
+
+// Default values have to be `const`.
+void sort(List<int> list, [int compare(int x, int y) = const (x, y) => x - y) {
+  ...
+}
+```
+
+This feature doesn't add new functionality. Users can already now write a static function with the same body and use its tear-off (which is guaranteed to be `const`) in all of these locations. However, it's more convenient to write functions closer to where they are needed. For example, the classic `map.putIfAbsent(x, () => [])` allocates a new function (a cheap operation, but still), whereas `map.putIfAbsent(x, const () => [])` would always reuse the same function.
+
+Sidenote: in dart2js, many const values (not functions) are allocated at initialization, which shifts some execution time to the beginning of the program where many teams already struggle with performance. In the current dart2js version it's thus not always beneficial to make objects `const`.
+
+## Shadowing of Core Libraries
+When deprecating core library classes (like `SplayTreeMap`) we intend to minimize the cost to our users. We copy the deprecated classes to packages (in this case `collection`) so that users just need to change their imports from `dart:collection` to `package:collection`. However, that means that programs that import `dart:collection` and `package:collection` at the same time now see the same class twice; once from each import. Which class should Dart now use? Is this an error?
+
+For "normal" imports (not `dart:`), the rules are simple: an ambiguous reference is an error. There is no good way to decide between class `A` of package `pkg1` or `pkg2`. With core libraries, things get a bit more complicated: whereas upgrading packages is a user-triggered action (with the fallback to revert to the previous `pubspec.lock`), upgrading the SDK should generally be safe. As a consequence, Dart considers core libraries as less important. That is, shadowing a class from any `dart:` library is ok. Importing `dart:collection` and `package:collection/collection.dart` is thus fine and will not lead to errors. It's still good practice to use `show` and `hide` to make the intention completely clear.
+
+We are still unsure how to handle cases when the user explicitly used `show` to import a specific core library type:
+
+``` dart
+import 'dart:collection` show SplayTreeMap;
+import 'package:collection/collection.dart';
+```
+
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart
index bfc24da..e79f760 100644
--- a/pkg/analysis_server/benchmark/benchmarks.dart
+++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -18,7 +18,7 @@
 Future main(List<String> args) async {
   final List<Benchmark> benchmarks = [
     new ColdAnalysisBenchmark(),
-    new AnalysisBenchmark(),
+    new AnalysisBenchmark()
   ];
 
   CommandRunner runner = new CommandRunner(
@@ -115,10 +115,7 @@
 
       time.stop();
       print('Finished in ${time.elapsed.inSeconds} seconds.\n');
-      Map m = {
-        'benchmark': benchmarkId,
-        'result': result.toJson(),
-      };
+      Map m = {'benchmark': benchmarkId, 'result': result.toJson()};
       print(JSON.encode(m));
     } catch (error, st) {
       print('$benchmarkId threw exception: $error');
@@ -133,7 +130,7 @@
   final String description;
   final bool enabled;
 
-  /// One of 'memory' or 'cpu'.
+  /// One of 'memory', 'cpu', or 'group'.
   final String kind;
 
   Benchmark(this.id, this.description, {this.enabled: true, this.kind: 'cpu'});
diff --git a/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart b/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
index 8b2c069..6e92d5f 100644
--- a/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
+++ b/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
@@ -18,16 +18,18 @@
 class ColdAnalysisBenchmark extends Benchmark {
   ColdAnalysisBenchmark()
       : super(
-          'analysis-server-cold',
-          'Analysis server benchmarks of a large project on start-up, no '
-              'existing driver cache.',
-        );
+            'analysis-server-cold',
+            'Analysis server benchmarks of a large project on start-up, no '
+            'existing driver cache.',
+            kind: 'group');
 
   int get maxIterations => 3;
 
   @override
   Future<BenchMarkResult> run({bool quick: false}) async {
-    deleteServerCache();
+    if (!quick) {
+      deleteServerCache();
+    }
 
     Stopwatch stopwatch = new Stopwatch()..start();
 
@@ -59,10 +61,10 @@
 class AnalysisBenchmark extends Benchmark {
   AnalysisBenchmark()
       : super(
-          'analysis-server',
-          'Analysis server benchmarks of a large project, with an existing '
-              'driver cache.',
-        );
+            'analysis-server',
+            'Analysis server benchmarks of a large project, with an existing '
+            'driver cache.',
+            kind: 'group');
 
   @override
   Future<BenchMarkResult> run({bool quick: false}) async {
diff --git a/pkg/analysis_server/benchmark/readme.md b/pkg/analysis_server/benchmark/readme.md
index b87b691..24eb7ec 100644
--- a/pkg/analysis_server/benchmark/readme.md
+++ b/pkg/analysis_server/benchmark/readme.md
@@ -5,13 +5,13 @@
 To see a list of all available benchmarks, run:
 
 ```
-dart benchmarks/benchmarks.dart list
+dart benchmark/benchmarks.dart list
 ```
 
 To run an individual benchmark, run:
 
 ```
-dart benchmarks/benchmarks.dart run <benchmark-id>
+dart benchmark/benchmarks.dart run <benchmark-id>
 ```
 
 ## How they're tested
@@ -27,11 +27,9 @@
 
 ## To add a new benchmark
 
-Register the new benchmark in then main() method of benchmarks/benchmarks.dart.
+Register the new benchmark in the `main()` method of benchmark/benchmarks.dart.
 
 ## On the bots
 
-Our benchmarks run on a continuous performance testing system. It will run
-any benchmark produced by the `benchmarks/benchmarks.dart list` command.
-
-To not run a benchmark on the bot, define the benchmark with the `disable` flag.
+Our benchmarks run on a continuous performance testing system. Currently, the
+benchmarks need to be manually registered ahead of time.
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index e8e7e18..a4f7046 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -109,7 +109,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  1.18.3
+  1.18.4
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -1107,41 +1107,6 @@
         <p>
           A list of the paths of the files that are being analyzed.
         </p>
-      </dd></dl></dd><dt class="notification"><a name="notification_analysis.closingLabels">analysis.closingLabels</a></dt><dd><div class="box"><pre>notification: {
-  "event": "analysis.closingLabels"
-  "params": {
-    "<b>file</b>": <a href="#type_FilePath">FilePath</a>
-    "<b>labels</b>": List&lt;<a href="#type_ClosingLabel">ClosingLabel</a>&gt;
-  }
-}</pre></div>
-    <p>
-      Reports closing labels relevant to a given file.
-    </p>
-    <p>
-      This notification is not subscribed to by default. Clients
-      can subscribe by including the value <tt>"CLOSING_LABELS"</tt>
-      in the list of services passed in an
-      analysis.setSubscriptions request.
-    </p>
-    
-  <h4>parameters:</h4><dl><dt class="field"><b>file: <a href="#type_FilePath">FilePath</a></b></dt><dd>
-        
-        <p>
-          The file the closing labels relate to.
-        </p>
-      </dd><dt class="field"><b>labels: List&lt;<a href="#type_ClosingLabel">ClosingLabel</a>&gt;</b></dt><dd>
-        
-        <p>
-          Closing labels relevant to the file. Each item
-          represents a useful label associated with some range
-          with may be useful to display to the user within the editor
-          at the end of the range to indicate what construct is closed
-          at that location. Closing labels include constructor/method
-          calls and List arguments that span multiple lines.
-          Note that the ranges that are returned can overlap
-          each other because they may be associated with
-          constructs that can be nested.
-        </p>
       </dd></dl></dd><dt class="notification"><a name="notification_analysis.errors">analysis.errors</a></dt><dd><div class="box"><pre>notification: {
   "event": "analysis.errors"
   "params": {
@@ -2534,6 +2499,7 @@
       </dd></dl></dd></dl>
 
 
+
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
     This section contains descriptions of the data types referenced
@@ -2783,10 +2749,11 @@
         </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_ClosingLabel">ClosingLabel: object</a></dt><dd>
     <p>
-      A label that is associated with a range of code that may be useful to render at the end
-      of the range to aid code readability. For example, a constructor call that spans multiple
-      lines may result in a closing label to allow the constructor type/name to be rendered
-      alongside the closing parenthesis.
+      A label that is associated with a range of code that may be useful to
+      render at the end of the range to aid code readability. For example, a
+      constructor call that spans multiple lines may result in a closing label
+      to allow the constructor type/name to be rendered alongside the closing
+      parenthesis.
     </p>
     
   <dl><dt class="field"><b>offset: int</b></dt><dd>
@@ -2802,7 +2769,8 @@
       </dd><dt class="field"><b>label: String</b></dt><dd>
         
         <p>
-          The label associated with this range that should be displayed to the user.
+          The label associated with this range that should be displayed to the
+          user.
         </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionId">CompletionId: String</a></dt><dd>
     
@@ -3500,6 +3468,79 @@
         <p>
           The names of the elements imported from the library.
         </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_KytheEntry">KytheEntry: object</a></dt><dd>
+    <p>
+      This object matches the format and documentation of the Entry object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_entry">Kythe Storage
+        Model</a>.
+    </p>
+    
+  <dl><dt class="field"><b>source: <a href="#type_KytheVName">KytheVName</a></b></dt><dd>
+        
+        <p>
+          The ticket of the source node (must not be empty).
+        </p>
+      </dd><dt class="field"><b>kind: String</b></dt><dd>
+        
+        <p>
+          An edge label (may be empty). The schema defines which labels are
+          meaningful.
+        </p>
+      </dd><dt class="field"><b>target: <a href="#type_KytheVName">KytheVName</a></b></dt><dd>
+        
+        <p>
+          The ticket of the target node (may be empty).
+        </p>
+      </dd><dt class="field"><b>fact: String</b></dt><dd>
+        
+        <p>
+          A fact label (must not be empty). The schema defines which fact labels
+          are meaningful.
+        </p>
+      </dd><dt class="field"><b>value: List&lt;int&gt;</b></dt><dd>
+        
+        <p>
+          The <tt>String</tt> value of the fact (may be empty).
+        </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_KytheVName">KytheVName: object</a></dt><dd>
+    <p>
+      This object matches the format and documentation of the Vector-Name object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_a_id_termvname_a_vector_name_strong_vname_strong">Kythe
+        Storage Model</a>.
+    </p>
+    
+  <dl><dt class="field"><b>signature: String</b></dt><dd>
+        
+        <p>
+          An opaque signature generated by the analyzer.
+        </p>
+      </dd><dt class="field"><b>corpus: String</b></dt><dd>
+        
+        <p>
+          The corpus of source code this <tt>KytheVName</tt> belongs to.
+          Loosely, a corpus is a collection of related files, such as the
+          contents of a given source repository.
+        </p>
+      </dd><dt class="field"><b>root: String</b></dt><dd>
+        
+        <p>
+          A corpus-specific root label, typically a directory path or project
+          identifier, denoting a distinct subset of the corpus. This may also be
+          used to designate virtual collections like generated files.
+        </p>
+      </dd><dt class="field"><b>path: String</b></dt><dd>
+        
+        <p>
+          A path-structured label describing the “location” of the named object
+          relative to the corpus and the root.
+        </p>
+      </dd><dt class="field"><b>language: String</b></dt><dd>
+        
+        <p>
+          The language this name belongs to.
+        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditGroup">LinkedEditGroup: object</a></dt><dd>
     <p>
       A collection of positions that should be linked (edited simultaneously)
@@ -3770,7 +3811,8 @@
       </dd><dt class="field"><b>example: String</b></dt><dd>
         
         <p>
-          A short example of the transformation performed when the template is applied.
+          A short example of the transformation performed when the template is
+          applied.
         </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_PubStatus">PubStatus: object</a></dt><dd>
     <p>
@@ -3985,6 +4027,12 @@
           An "analysis.getImportedElements" request specified a FilePath that
           does not match a file currently subject to analysis.
         </p>
+      </dd><dt class="value">GET_KYTHE_ENTRIES_INVALID_FILE</dt><dd>
+        
+        <p>
+          An "analysis.getKytheEntries" request specified a FilePath that does
+          not match a file that is currently subject to analysis.
+        </p>
       </dd><dt class="value">GET_NAVIGATION_INVALID_FILE</dt><dd>
         
         <p>
@@ -4679,7 +4727,7 @@
   TODO: TBD
 </p>
 <h2 class="domain"><a name="index">Index</a></h2>
-<h3>Domains</h3><h4>server (<a href="#domain_server">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_server.getVersion">getVersion</a></li><li><a href="#request_server.shutdown">shutdown</a></li><li><a href="#request_server.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_server.connected">connected</a></li><li><a href="#notification_server.error">error</a></li><li><a href="#notification_server.status">status</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getErrors">getErrors</a></li><li><a href="#request_analysis.getHover">getHover</a></li><li><a href="#request_analysis.getLibraryDependencies">getLibraryDependencies</a></li><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.getReachableSources">getReachableSources</a></li><li><a href="#request_analysis.reanalyze">reanalyze</a></li><li><a href="#request_analysis.setAnalysisRoots">setAnalysisRoots</a></li><li><a href="#request_analysis.setGeneralSubscriptions">setGeneralSubscriptions</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li><li><a href="#request_analysis.updateOptions">updateOptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.analyzedFiles">analyzedFiles</a></li><li><a href="#notification_analysis.closingLabels">closingLabels</a></li><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.flushResults">flushResults</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.implemented">implemented</a></li><li><a href="#notification_analysis.invalidate">invalidate</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li><li><a href="#notification_analysis.overrides">overrides</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_completion.results">results</a></li></ul></div></div><h4>search (<a href="#domain_search">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_search.findElementReferences">findElementReferences</a></li><li><a href="#request_search.findMemberDeclarations">findMemberDeclarations</a></li><li><a href="#request_search.findMemberReferences">findMemberReferences</a></li><li><a href="#request_search.findTopLevelDeclarations">findTopLevelDeclarations</a></li><li><a href="#request_search.getTypeHierarchy">getTypeHierarchy</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_search.results">results</a></li></ul></div></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.format">format</a></li><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefactoring</a></li><li><a href="#request_edit.sortMembers">sortMembers</a></li><li><a href="#request_edit.organizeDirectives">organizeDirectives</a></li></ul></div><h4>execution (<a href="#domain_execution">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_execution.createContext">createContext</a></li><li><a href="#request_execution.deleteContext">deleteContext</a></li><li><a href="#request_execution.mapUri">mapUri</a></li><li><a href="#request_execution.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_execution.launchData">launchData</a></li></ul></div></div><h4>diagnostic (<a href="#domain_diagnostic">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_diagnostic.getDiagnostics">getDiagnostics</a></li><li><a href="#request_diagnostic.getServerPort">getServerPort</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisOptions">AnalysisOptions</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_AnalysisStatus">AnalysisStatus</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_ClosingLabel">ClosingLabel</a></li><li><a href="#type_CompletionId">CompletionId</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextData">ContextData</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_ExecutableFile">ExecutableFile</a></li><li><a href="#type_ExecutableKind">ExecutableKind</a></li><li><a href="#type_ExecutionContextId">ExecutionContextId</a></li><li><a href="#type_ExecutionService">ExecutionService</a></li><li><a href="#type_FileKind">FileKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_GeneralAnalysisService">GeneralAnalysisService</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_HoverInformation">HoverInformation</a></li><li><a href="#type_ImplementedClass">ImplementedClass</a></li><li><a href="#type_ImplementedMember">ImplementedMember</a></li><li><a href="#type_ImportedElements">ImportedElements</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_OverriddenMember">OverriddenMember</a></li><li><a href="#type_Override">Override</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PostfixTemplateDescriptor">PostfixTemplateDescriptor</a></li><li><a href="#type_PubStatus">PubStatus</a></li><li><a href="#type_RefactoringFeedback">RefactoringFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_SearchId">SearchId</a></li><li><a href="#type_SearchResult">SearchResult</a></li><li><a href="#type_SearchResultKind">SearchResultKind</a></li><li><a href="#type_ServerService">ServerService</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_TypeHierarchyItem">TypeHierarchyItem</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
+<h3>Domains</h3><h4>server (<a href="#domain_server">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_server.getVersion">getVersion</a></li><li><a href="#request_server.shutdown">shutdown</a></li><li><a href="#request_server.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_server.connected">connected</a></li><li><a href="#notification_server.error">error</a></li><li><a href="#notification_server.status">status</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getErrors">getErrors</a></li><li><a href="#request_analysis.getHover">getHover</a></li><li><a href="#request_analysis.getLibraryDependencies">getLibraryDependencies</a></li><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.getReachableSources">getReachableSources</a></li><li><a href="#request_analysis.reanalyze">reanalyze</a></li><li><a href="#request_analysis.setAnalysisRoots">setAnalysisRoots</a></li><li><a href="#request_analysis.setGeneralSubscriptions">setGeneralSubscriptions</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li><li><a href="#request_analysis.updateOptions">updateOptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.analyzedFiles">analyzedFiles</a></li><li><a href="#notification_analysis.closingLabels">closingLabels</a></li><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.flushResults">flushResults</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.implemented">implemented</a></li><li><a href="#notification_analysis.invalidate">invalidate</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li><li><a href="#notification_analysis.overrides">overrides</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_completion.results">results</a></li></ul></div></div><h4>search (<a href="#domain_search">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_search.findElementReferences">findElementReferences</a></li><li><a href="#request_search.findMemberDeclarations">findMemberDeclarations</a></li><li><a href="#request_search.findMemberReferences">findMemberReferences</a></li><li><a href="#request_search.findTopLevelDeclarations">findTopLevelDeclarations</a></li><li><a href="#request_search.getTypeHierarchy">getTypeHierarchy</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_search.results">results</a></li></ul></div></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.format">format</a></li><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefactoring</a></li><li><a href="#request_edit.sortMembers">sortMembers</a></li><li><a href="#request_edit.organizeDirectives">organizeDirectives</a></li></ul></div><h4>execution (<a href="#domain_execution">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_execution.createContext">createContext</a></li><li><a href="#request_execution.deleteContext">deleteContext</a></li><li><a href="#request_execution.mapUri">mapUri</a></li><li><a href="#request_execution.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_execution.launchData">launchData</a></li></ul></div></div><h4>diagnostic (<a href="#domain_diagnostic">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_diagnostic.getDiagnostics">getDiagnostics</a></li><li><a href="#request_diagnostic.getServerPort">getServerPort</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisOptions">AnalysisOptions</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_AnalysisStatus">AnalysisStatus</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_ClosingLabel">ClosingLabel</a></li><li><a href="#type_CompletionId">CompletionId</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextData">ContextData</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_ExecutableFile">ExecutableFile</a></li><li><a href="#type_ExecutableKind">ExecutableKind</a></li><li><a href="#type_ExecutionContextId">ExecutionContextId</a></li><li><a href="#type_ExecutionService">ExecutionService</a></li><li><a href="#type_FileKind">FileKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_GeneralAnalysisService">GeneralAnalysisService</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_HoverInformation">HoverInformation</a></li><li><a href="#type_ImplementedClass">ImplementedClass</a></li><li><a href="#type_ImplementedMember">ImplementedMember</a></li><li><a href="#type_ImportedElements">ImportedElements</a></li><li><a href="#type_KytheEntry">KytheEntry</a></li><li><a href="#type_KytheVName">KytheVName</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_OverriddenMember">OverriddenMember</a></li><li><a href="#type_Override">Override</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PostfixTemplateDescriptor">PostfixTemplateDescriptor</a></li><li><a href="#type_PubStatus">PubStatus</a></li><li><a href="#type_RefactoringFeedback">RefactoringFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_SearchId">SearchId</a></li><li><a href="#type_SearchResult">SearchResult</a></li><li><a href="#type_SearchResultKind">SearchResultKind</a></li><li><a href="#type_ServerService">ServerService</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_TypeHierarchyItem">TypeHierarchyItem</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
 
 
 </body></html>
\ No newline at end of file
diff --git a/pkg/analysis_server/lib/protocol/protocol.dart b/pkg/analysis_server/lib/protocol/protocol.dart
index d9f0f86..df989b1 100644
--- a/pkg/analysis_server/lib/protocol/protocol.dart
+++ b/pkg/analysis_server/lib/protocol/protocol.dart
@@ -480,6 +480,16 @@
 
   /**
    * Initialize a newly created instance to represent the
+   * GET_KYTHE_ENTRIES_INVALID_FILE error condition.
+   */
+  Response.getKytheEntriesInvalidFile(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.GET_KYTHE_ENTRIES_INVALID_FILE,
+                'Error during `analysis.getKytheEntries`: invalid file.'));
+
+  /**
+   * Initialize a newly created instance to represent the
    * GET_NAVIGATION_INVALID_FILE error condition.
    */
   Response.getNavigationInvalidFile(Request request)
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index 1f494ff..9ff059c 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -181,7 +181,7 @@
 const String EDIT_RESPONSE_GET_STATEMENT_COMPLETION_CHANGE = 'change';
 const String EDIT_RESPONSE_GET_STATEMENT_COMPLETION_WHITESPACE_ONLY =
     'whitespaceOnly';
-const String EDIT_RESPONSE_IMPORT_ELEMENTS_EDITS = 'edits';
+const String EDIT_RESPONSE_IMPORT_ELEMENTS_EDIT = 'edit';
 const String EDIT_RESPONSE_IS_POSTFIX_COMPLETION_APPLICABLE_VALUE = 'value';
 const String EDIT_RESPONSE_LIST_POSTFIX_COMPLETION_TEMPLATES_TEMPLATES =
     'templates';
@@ -206,6 +206,10 @@
 const String EXECUTION_RESPONSE_CREATE_CONTEXT_ID = 'id';
 const String EXECUTION_RESPONSE_MAP_URI_FILE = 'file';
 const String EXECUTION_RESPONSE_MAP_URI_URI = 'uri';
+const String KYTHE_REQUEST_GET_KYTHE_ENTRIES = 'kythe.getKytheEntries';
+const String KYTHE_REQUEST_GET_KYTHE_ENTRIES_FILE = 'file';
+const String KYTHE_RESPONSE_GET_KYTHE_ENTRIES_ENTRIES = 'entries';
+const String KYTHE_RESPONSE_GET_KYTHE_ENTRIES_FILES = 'files';
 const String SEARCH_NOTIFICATION_RESULTS = 'search.results';
 const String SEARCH_NOTIFICATION_RESULTS_ID = 'id';
 const String SEARCH_NOTIFICATION_RESULTS_IS_LAST = 'isLast';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index df57b5b..2040057 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -7942,31 +7942,37 @@
  * edit.importElements result
  *
  * {
- *   "edits": List<SourceEdit>
+ *   "edit": SourceFileEdit
  * }
  *
  * Clients may not extend, implement or mix-in this class.
  */
 class EditImportElementsResult implements ResponseResult {
-  List<SourceEdit> _edits;
+  SourceFileEdit _edit;
 
   /**
-   * The edit(s) to be applied in order to make the specified elements
-   * accessible.
+   * The edits to be applied in order to make the specified elements
+   * accessible. The file to be edited will be the defining compilation unit of
+   * the library containing the file specified in the request, which can be
+   * different than the file specified in the request if the specified file is
+   * a part file.
    */
-  List<SourceEdit> get edits => _edits;
+  SourceFileEdit get edit => _edit;
 
   /**
-   * The edit(s) to be applied in order to make the specified elements
-   * accessible.
+   * The edits to be applied in order to make the specified elements
+   * accessible. The file to be edited will be the defining compilation unit of
+   * the library containing the file specified in the request, which can be
+   * different than the file specified in the request if the specified file is
+   * a part file.
    */
-  void set edits(List<SourceEdit> value) {
+  void set edit(SourceFileEdit value) {
     assert(value != null);
-    this._edits = value;
+    this._edit = value;
   }
 
-  EditImportElementsResult(List<SourceEdit> edits) {
-    this.edits = edits;
+  EditImportElementsResult(SourceFileEdit edit) {
+    this.edit = edit;
   }
 
   factory EditImportElementsResult.fromJson(
@@ -7975,17 +7981,14 @@
       json = {};
     }
     if (json is Map) {
-      List<SourceEdit> edits;
-      if (json.containsKey("edits")) {
-        edits = jsonDecoder.decodeList(
-            jsonPath + ".edits",
-            json["edits"],
-            (String jsonPath, Object json) =>
-                new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
+      SourceFileEdit edit;
+      if (json.containsKey("edit")) {
+        edit = new SourceFileEdit.fromJson(
+            jsonDecoder, jsonPath + ".edit", json["edit"]);
       } else {
-        throw jsonDecoder.mismatch(jsonPath, "edits");
+        throw jsonDecoder.mismatch(jsonPath, "edit");
       }
-      return new EditImportElementsResult(edits);
+      return new EditImportElementsResult(edit);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "edit.importElements result", json);
     }
@@ -8001,7 +8004,7 @@
   @override
   Map<String, dynamic> toJson() {
     Map<String, dynamic> result = {};
-    result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList();
+    result["edit"] = edit.toJson();
     return result;
   }
 
@@ -8016,8 +8019,7 @@
   @override
   bool operator ==(other) {
     if (other is EditImportElementsResult) {
-      return listEqual(
-          edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
+      return edit == other.edit;
     }
     return false;
   }
@@ -8025,7 +8027,7 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
@@ -11773,6 +11775,217 @@
 }
 
 /**
+ * kythe.getKytheEntries params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheGetKytheEntriesParams implements RequestParams {
+  String _file;
+
+  /**
+   * The file containing the code for which the Kythe Entry objects are being
+   * requested.
+   */
+  String get file => _file;
+
+  /**
+   * The file containing the code for which the Kythe Entry objects are being
+   * requested.
+   */
+  void set file(String value) {
+    assert(value != null);
+    this._file = value;
+  }
+
+  KytheGetKytheEntriesParams(String file) {
+    this.file = file;
+  }
+
+  factory KytheGetKytheEntriesParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String file;
+      if (json.containsKey("file")) {
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "file");
+      }
+      return new KytheGetKytheEntriesParams(file);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "kythe.getKytheEntries params", json);
+    }
+  }
+
+  factory KytheGetKytheEntriesParams.fromRequest(Request request) {
+    return new KytheGetKytheEntriesParams.fromJson(
+        new RequestDecoder(request), "params", request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["file"] = file;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return new Request(id, "kythe.getKytheEntries", toJson());
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheGetKytheEntriesParams) {
+      return file == other.file;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
+ * kythe.getKytheEntries result
+ *
+ * {
+ *   "entries": List<KytheEntry>
+ *   "files": List<FilePath>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheGetKytheEntriesResult implements ResponseResult {
+  List<KytheEntry> _entries;
+
+  List<String> _files;
+
+  /**
+   * The list of KytheEntry objects for the queried file.
+   */
+  List<KytheEntry> get entries => _entries;
+
+  /**
+   * The list of KytheEntry objects for the queried file.
+   */
+  void set entries(List<KytheEntry> value) {
+    assert(value != null);
+    this._entries = value;
+  }
+
+  /**
+   * The set of files paths that were required, but not in the file system, to
+   * give a complete and accurate Kythe graph for the file. This could be due
+   * to a referenced file that does not exist or generated files not being
+   * generated or passed before the call to "getKytheEntries".
+   */
+  List<String> get files => _files;
+
+  /**
+   * The set of files paths that were required, but not in the file system, to
+   * give a complete and accurate Kythe graph for the file. This could be due
+   * to a referenced file that does not exist or generated files not being
+   * generated or passed before the call to "getKytheEntries".
+   */
+  void set files(List<String> value) {
+    assert(value != null);
+    this._files = value;
+  }
+
+  KytheGetKytheEntriesResult(List<KytheEntry> entries, List<String> files) {
+    this.entries = entries;
+    this.files = files;
+  }
+
+  factory KytheGetKytheEntriesResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      List<KytheEntry> entries;
+      if (json.containsKey("entries")) {
+        entries = jsonDecoder.decodeList(
+            jsonPath + ".entries",
+            json["entries"],
+            (String jsonPath, Object json) =>
+                new KytheEntry.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "entries");
+      }
+      List<String> files;
+      if (json.containsKey("files")) {
+        files = jsonDecoder.decodeList(
+            jsonPath + ".files", json["files"], jsonDecoder.decodeString);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "files");
+      }
+      return new KytheGetKytheEntriesResult(entries, files);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "kythe.getKytheEntries result", json);
+    }
+  }
+
+  factory KytheGetKytheEntriesResult.fromResponse(Response response) {
+    return new KytheGetKytheEntriesResult.fromJson(
+        new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        "result",
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["entries"] =
+        entries.map((KytheEntry value) => value.toJson()).toList();
+    result["files"] = files;
+    return result;
+  }
+
+  @override
+  Response toResponse(String id) {
+    return new Response(id, result: toJson());
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheGetKytheEntriesResult) {
+      return listEqual(
+              entries, other.entries, (KytheEntry a, KytheEntry b) => a == b) &&
+          listEqual(files, other.files, (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, entries.hashCode);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * moveFile feedback
  *
  * Clients may not extend, implement or mix-in this class.
@@ -12800,6 +13013,7 @@
  *   FORMAT_WITH_ERRORS
  *   GET_ERRORS_INVALID_FILE
  *   GET_IMPORTED_ELEMENTS_INVALID_FILE
+ *   GET_KYTHE_ENTRIES_INVALID_FILE
  *   GET_NAVIGATION_INVALID_FILE
  *   GET_REACHABLE_SOURCES_INVALID_FILE
  *   IMPORT_ELEMENTS_INVALID_FILE
@@ -12873,6 +13087,13 @@
       const RequestErrorCode._("GET_IMPORTED_ELEMENTS_INVALID_FILE");
 
   /**
+   * An "analysis.getKytheEntries" request specified a FilePath that does not
+   * match a file that is currently subject to analysis.
+   */
+  static const RequestErrorCode GET_KYTHE_ENTRIES_INVALID_FILE =
+      const RequestErrorCode._("GET_KYTHE_ENTRIES_INVALID_FILE");
+
+  /**
    * An "analysis.getNavigation" request specified a FilePath which does not
    * match a file currently subject to analysis.
    */
@@ -13023,6 +13244,7 @@
     FORMAT_WITH_ERRORS,
     GET_ERRORS_INVALID_FILE,
     GET_IMPORTED_ELEMENTS_INVALID_FILE,
+    GET_KYTHE_ENTRIES_INVALID_FILE,
     GET_NAVIGATION_INVALID_FILE,
     GET_REACHABLE_SOURCES_INVALID_FILE,
     IMPORT_ELEMENTS_INVALID_FILE,
@@ -13065,6 +13287,8 @@
         return GET_ERRORS_INVALID_FILE;
       case "GET_IMPORTED_ELEMENTS_INVALID_FILE":
         return GET_IMPORTED_ELEMENTS_INVALID_FILE;
+      case "GET_KYTHE_ENTRIES_INVALID_FILE":
+        return GET_KYTHE_ENTRIES_INVALID_FILE;
       case "GET_NAVIGATION_INVALID_FILE":
         return GET_NAVIGATION_INVALID_FILE;
       case "GET_REACHABLE_SOURCES_INVALID_FILE":
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 25ede0d..1e0d956 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -100,7 +100,7 @@
    * The version of the analysis server. The value should be replaced
    * automatically during the build.
    */
-  static final String VERSION = '1.18.3';
+  static final String VERSION = '1.18.4';
 
   /**
    * The options of this server instance.
@@ -1191,6 +1191,13 @@
           }
         }
         if (analysisServer._hasAnalysisServiceSubscription(
+            AnalysisService.CLOSING_LABELS, path)) {
+          _runDelayed(() {
+            sendAnalysisNotificationClosingLabels(
+                analysisServer, path, result.lineInfo, unit);
+          });
+        }
+        if (analysisServer._hasAnalysisServiceSubscription(
             AnalysisService.OUTLINE, path)) {
           _runDelayed(() {
             SourceKind sourceKind =
@@ -1340,6 +1347,7 @@
     return collector.allOccurrences;
   }
 
+  // ignore: unused_element
   server.AnalysisOutlineParams _computeOutlineParams(
       String path, CompilationUnit unit, LineInfo lineInfo) {
     // compute FileKind
diff --git a/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
new file mode 100644
index 0000000..ff74347
--- /dev/null
+++ b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
@@ -0,0 +1,122 @@
+// 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 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/src/generated/source.dart';
+
+/**
+ * A computer for [CompilationUnit] closing labels.
+ */
+class DartUnitClosingLabelsComputer {
+  final LineInfo _lineInfo;
+  final CompilationUnit _unit;
+  final Map<int, List<_ClosingLabelWithLineCount>> _closingLabelsByEndLine = {};
+
+  DartUnitClosingLabelsComputer(this._lineInfo, this._unit);
+
+  /**
+   * Returns a list of closing labels, not `null`.
+   */
+  List<ClosingLabel> compute() {
+    _unit.accept(new _DartUnitClosingLabelsComputerVisitor(this));
+    return _closingLabelsByEndLine.values
+        .where((l) => l.any((cl) => cl.spannedLines >= 2))
+        .expand((cls) => cls)
+        .map((clwlc) => clwlc.label)
+        .toList();
+  }
+}
+
+class _ClosingLabelWithLineCount {
+  final ClosingLabel label;
+  final int spannedLines;
+
+  _ClosingLabelWithLineCount(this.label, this.spannedLines);
+}
+
+/**
+ * An AST visitor for [DartUnitClosingLabelsComputer].
+ */
+class _DartUnitClosingLabelsComputerVisitor
+    extends RecursiveAstVisitor<Object> {
+  final DartUnitClosingLabelsComputer computer;
+
+  int interpolatedStringsEntered = 0;
+
+  _DartUnitClosingLabelsComputerVisitor(this.computer);
+
+  @override
+  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+    if (node.argumentList != null) {
+      var label = node.constructorName.type.name.name;
+      if (node.constructorName.name != null)
+        label += ".${node.constructorName.name.name}";
+      // We override the node used for doing line calculations because otherwise constructors
+      // that split over multiple lines (but have parens on same line) would incorrectly
+      // get labels, because node.start on an instance creation expression starts at the start
+      // of the expression.
+      _addLabel(node, label, checkLinesUsing: node.argumentList);
+    }
+
+    return super.visitInstanceCreationExpression(node);
+  }
+
+  @override
+  visitListLiteral(ListLiteral node) {
+    final args = node.typeArguments?.arguments;
+    final typeName = args != null ? args[0]?.toString() : null;
+
+    if (typeName != null) {
+      _addLabel(node, "List<$typeName>");
+    }
+
+    return super.visitListLiteral(node);
+  }
+
+  @override
+  Object visitMethodInvocation(MethodInvocation node) {
+    if (node.argumentList != null) {
+      final target = node.target;
+      final label = target is Identifier
+          ? "${target.name}.${node.methodName.name}"
+          : node.methodName.name;
+      // We override the node used for doing line calculations because otherwise methods
+      // that chain over multiple lines (but have parens on same line) would incorrectly
+      // get labels, because node.start on a methodInvocation starts at the start of the expression.
+      _addLabel(node, label, checkLinesUsing: node.argumentList);
+    }
+
+    return super.visitMethodInvocation(node);
+  }
+
+  @override
+  visitStringInterpolation(StringInterpolation node) {
+    interpolatedStringsEntered++;
+    try {
+      return super.visitStringInterpolation(node);
+    } finally {
+      interpolatedStringsEntered--;
+    }
+  }
+
+  void _addLabel(AstNode node, String label, {AstNode checkLinesUsing}) {
+    // Never add labels if we're inside strings.
+    if (interpolatedStringsEntered > 0) {
+      return;
+    }
+
+    checkLinesUsing = checkLinesUsing ?? node;
+    final start = computer._lineInfo.getLocation(checkLinesUsing.offset);
+    final end = computer._lineInfo.getLocation(checkLinesUsing.end - 1);
+    final closingLabel = new ClosingLabel(node.offset, node.length, label);
+    final labelWithSpan = new _ClosingLabelWithLineCount(
+        closingLabel, end.lineNumber - start.lineNumber);
+
+    computer._closingLabelsByEndLine
+        .putIfAbsent(end.lineNumber, () => <_ClosingLabelWithLineCount>[])
+        .add(labelWithSpan);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
index c30639d..0b3617e 100644
--- a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
+++ b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
@@ -77,9 +77,12 @@
           Source importedSource = importedFile.createSource(uri);
           String importUri =
               _getLibrarySourceUri(libraryElement, importedSource);
-          int offset = _offsetForInsertion(importUri);
-          builder.addInsertion(offset, (DartEditBuilder builder) {
-            builder.writeln();
+          _InsertionDescription description =
+              _getInsertionDescription(importUri);
+          builder.addInsertion(description.offset, (DartEditBuilder builder) {
+            for (int i = 0; i < description.newLinesBefore; i++) {
+              builder.writeln();
+            }
             builder.write("import '");
             builder.write(importUri);
             builder.write("'");
@@ -88,6 +91,9 @@
               builder.write(importedElements.prefix);
             }
             builder.write(';');
+            for (int i = 0; i < description.newLinesAfter; i++) {
+              builder.writeln();
+            }
           });
         } else {
           //
@@ -309,6 +315,41 @@
   }
 
   /**
+   * Return the offset at which an import of the given [importUri] should be
+   * inserted.
+   *
+   * Partially copied from DartFileEditBuilderImpl.
+   */
+  _InsertionDescription _getInsertionDescription(String importUri) {
+    CompilationUnit unit = libraryResult.unit;
+    LibraryDirective libraryDirective;
+    List<ImportDirective> importDirectives = <ImportDirective>[];
+    List<Directive> otherDirectives = <Directive>[];
+    for (Directive directive in unit.directives) {
+      if (directive is LibraryDirective) {
+        libraryDirective = directive;
+      } else if (directive is ImportDirective) {
+        importDirectives.add(directive);
+      } else {
+        otherDirectives.add(directive);
+      }
+    }
+    if (importDirectives.isEmpty) {
+      if (libraryDirective == null) {
+        if (otherDirectives.isEmpty) {
+          // TODO(brianwilkerson) Insert after any non-doc comments.
+          return new _InsertionDescription(0, after: 2);
+        }
+        return new _InsertionDescription(otherDirectives[0].offset, after: 2);
+      }
+      return new _InsertionDescription(libraryDirective.end, before: 2);
+    }
+    // TODO(brianwilkerson) Fix this to find the right location.
+    // See DartFileEditBuilderImpl._addLibraryImports for inspiration.
+    return new _InsertionDescription(importDirectives.last.end, before: 1);
+  }
+
+  /**
    * Computes the best URI to import [what] into [from].
    *
    * Copied from DartFileEditBuilderImpl.
@@ -338,34 +379,6 @@
             importedElements.path &&
         (import.prefix?.name ?? '') == importedElements.prefix;
   }
-
-  /**
-   * Return the offset at which an import of the given [importUri] should be
-   * inserted.
-   *
-   * Partially copied from DartFileEditBuilderImpl.
-   */
-  int _offsetForInsertion(String importUri) {
-    // TODO(brianwilkerson) Fix this to find the right location.
-    // See DartFileEditBuilderImpl._addLibraryImports for inspiration.
-    CompilationUnit unit = libraryResult.unit;
-    LibraryDirective libraryDirective;
-    List<ImportDirective> importDirectives = <ImportDirective>[];
-    for (Directive directive in unit.directives) {
-      if (directive is LibraryDirective) {
-        libraryDirective = directive;
-      } else if (directive is ImportDirective) {
-        importDirectives.add(directive);
-      }
-    }
-    if (importDirectives.isEmpty) {
-      if (libraryDirective == null) {
-        return 0;
-      }
-      return libraryDirective.end;
-    }
-    return importDirectives.last.end;
-  }
 }
 
 /**
@@ -408,3 +421,13 @@
     namesToUnhide.add(name);
   }
 }
+
+class _InsertionDescription {
+  final int newLinesBefore;
+  final int offset;
+  final int newLinesAfter;
+
+  _InsertionDescription(this.offset, {int before: 0, int after: 0})
+      : this.newLinesBefore = before,
+        this.newLinesAfter = after;
+}
diff --git a/pkg/analysis_server/lib/src/domain_kythe.dart b/pkg/analysis_server/lib/src/domain_kythe.dart
new file mode 100644
index 0000000..cbe971c
--- /dev/null
+++ b/pkg/analysis_server/lib/src/domain_kythe.dart
@@ -0,0 +1,110 @@
+// 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';
+import 'dart:core';
+
+import 'package:analysis_server/protocol/protocol.dart';
+import 'package:analysis_server/protocol/protocol_constants.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/domain_abstract.dart';
+import 'package:analysis_server/src/plugin/plugin_manager.dart';
+import 'package:analysis_server/src/plugin/result_merger.dart';
+import 'package:analysis_server/src/services/kythe/kythe_visitors.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/resolver/inheritance_manager.dart';
+import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
+import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
+
+/**
+ * Instances of the class [KytheDomainHandler] implement a [RequestHandler]
+ * that handles requests in the `kythe` domain.
+ */
+class KytheDomainHandler extends AbstractRequestHandler {
+  /**
+   * Initialize a newly created handler to handle requests for the given [server].
+   */
+  KytheDomainHandler(AnalysisServer server) : super(server);
+
+  /**
+   * Implement the `kythe.getKytheEntries` request.
+   */
+  Future<Null> getKytheEntries(Request request) async {
+    String file = new KytheGetKytheEntriesParams.fromRequest(request).file;
+    AnalysisDriver driver = server.getAnalysisDriver(file);
+    if (driver == null) {
+      server.sendResponse(new Response.getKytheEntriesInvalidFile(request));
+    } else {
+      //
+      // Allow plugins to start computing entries.
+      //
+      plugin.KytheGetKytheEntriesParams requestParams =
+          new plugin.KytheGetKytheEntriesParams(file);
+      Map<PluginInfo, Future<plugin.Response>> pluginFutures = server
+          .pluginManager
+          .broadcastRequest(requestParams, contextRoot: driver.contextRoot);
+      //
+      // Compute entries generated by server.
+      //
+      List<KytheGetKytheEntriesResult> allResults =
+          <KytheGetKytheEntriesResult>[];
+      AnalysisResult result = await server.getAnalysisResult(file);
+      CompilationUnit unit = result?.unit;
+      if (unit != null && result.exists) {
+        List<KytheEntry> entries = <KytheEntry>[];
+        // TODO(brianwilkerson) Figure out how to get the list of files.
+        List<String> files = <String>[];
+        result.unit.accept(new KytheDartVisitor(entries, file,
+            new InheritanceManager(result.libraryElement), result.content));
+        allResults.add(new KytheGetKytheEntriesResult(entries, files));
+      }
+      //
+      // Add the entries produced by plugins to the server-generated entries.
+      //
+      if (pluginFutures != null) {
+        List<plugin.Response> responses = await waitForResponses(pluginFutures,
+            requestParameters: requestParams);
+        for (plugin.Response response in responses) {
+          plugin.KytheGetKytheEntriesResult result =
+              new plugin.KytheGetKytheEntriesResult.fromResponse(response);
+          allResults.add(
+              new KytheGetKytheEntriesResult(result.entries, result.files));
+        }
+      }
+      //
+      // Return the result.
+      //
+      ResultMerger merger = new ResultMerger();
+      KytheGetKytheEntriesResult mergedResults =
+          merger.mergeKytheEntries(allResults);
+      if (mergedResults == null) {
+        server.sendResponse(
+            new KytheGetKytheEntriesResult(<KytheEntry>[], <String>[])
+                .toResponse(request.id));
+      } else {
+        server.sendResponse(new KytheGetKytheEntriesResult(
+                mergedResults.entries, mergedResults.files)
+            .toResponse(request.id));
+      }
+    }
+  }
+
+  @override
+  Response handleRequest(Request request) {
+    try {
+      String requestName = request.method;
+      if (requestName == KYTHE_REQUEST_GET_KYTHE_ENTRIES) {
+        getKytheEntries(request);
+        return Response.DELAYED_RESPONSE;
+      }
+    } on RequestFailure catch (exception) {
+      return exception.response;
+    }
+    return null;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 0343718..f93dd79 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -406,8 +406,8 @@
     //
     // Send the response.
     //
-    server.sendResponse(new EditImportElementsResult(change.edits[0].edits)
-        .toResponse(request.id));
+    server.sendResponse(
+        new EditImportElementsResult(change.edits[0]).toResponse(request.id));
   }
 
   Future isPostfixCompletionApplicable(Request request) async {
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 0b57104..a308eec 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -5,6 +5,7 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/computer/computer_closingLabels.dart';
 import 'package:analysis_server/src/computer/computer_highlights.dart';
 import 'package:analysis_server/src/computer/computer_highlights2.dart';
 import 'package:analysis_server/src/computer/computer_outline.dart';
@@ -87,6 +88,16 @@
   });
 }
 
+void sendAnalysisNotificationClosingLabels(AnalysisServer server, String file,
+    LineInfo lineInfo, CompilationUnit dartUnit) {
+  _sendNotification(server, () {
+    var labels =
+        new DartUnitClosingLabelsComputer(lineInfo, dartUnit).compute();
+    var params = new protocol.AnalysisClosingLabelsParams(file, labels);
+    server.sendNotification(params.toNotification());
+  });
+}
+
 void sendAnalysisNotificationFlushResults(
     AnalysisServer server, List<String> files) {
   _sendNotification(server, () {
diff --git a/pkg/analysis_server/lib/src/plugin/result_merger.dart b/pkg/analysis_server/lib/src/plugin/result_merger.dart
index 5b262c1..06f0840 100644
--- a/pkg/analysis_server/lib/src/plugin/result_merger.dart
+++ b/pkg/analysis_server/lib/src/plugin/result_merger.dart
@@ -202,6 +202,25 @@
   }
 
   /**
+   * Return kythe entry result parameters composed by merging the parameters in
+   * the [partialResultList].
+   *
+   * The resulting list will contain all of the kythe entries from all of the
+   * plugins. If a plugin contributes a kythe entry that is the same as the
+   * entry from a different plugin, the entry will appear twice in the list.
+   */
+  KytheGetKytheEntriesResult mergeKytheEntries(
+      List<KytheGetKytheEntriesResult> partialResultList) {
+    List<KytheEntry> mergedEntries = <KytheEntry>[];
+    Set<String> mergedFiles = new Set<String>();
+    for (KytheGetKytheEntriesResult partialResult in partialResultList) {
+      mergedEntries.addAll(partialResult.entries);
+      mergedFiles.addAll(partialResult.files);
+    }
+    return new KytheGetKytheEntriesResult(mergedEntries, mergedFiles.toList());
+  }
+
+  /**
    * Return navigation notification parameters composed by merging the
    * parameters in the [partialResultList].
    *
diff --git a/pkg/analysis_server/lib/src/plugin/server_plugin.dart b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
index 741f425..ed450ac 100644
--- a/pkg/analysis_server/lib/src/plugin/server_plugin.dart
+++ b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
@@ -19,6 +19,7 @@
 import 'package:analysis_server/src/domain_completion.dart';
 import 'package:analysis_server/src/domain_diagnostic.dart';
 import 'package:analysis_server/src/domain_execution.dart';
+import 'package:analysis_server/src/domain_kythe.dart';
 import 'package:analysis_server/src/domain_server.dart';
 import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
@@ -309,6 +310,8 @@
         (AnalysisServer server) => new DiagnosticDomainHandler(server));
     registerExtension(domainId,
         (AnalysisServer server) => new AnalyticsDomainHandler(server));
+    registerExtension(
+        domainId, (AnalysisServer server) => new KytheDomainHandler(server));
 
     //
     // Register fix contributors.
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 3accd66..e25e759 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1167,7 +1167,7 @@
     ClassDeclaration targetClassNode = targetTypeNode;
     // prepare location
     ClassMemberLocation targetLocation =
-        utils.prepareNewFieldLocation(targetClassNode);
+        _getUtilsFor(targetClassNode).prepareNewFieldLocation(targetClassNode);
     // build field source
     Source targetSource = targetClassElement.source;
     String targetFile = targetSource.fullName;
@@ -1324,7 +1324,7 @@
     ClassDeclaration targetClassNode = targetTypeNode;
     // prepare location
     ClassMemberLocation targetLocation =
-        utils.prepareNewGetterLocation(targetClassNode);
+        _getUtilsFor(targetClassNode).prepareNewGetterLocation(targetClassNode);
     // build method source
     Source targetSource = targetClassElement.source;
     String targetFile = targetSource.fullName;
@@ -2866,6 +2866,26 @@
   }
 
   /**
+   * Return the correction utilities that should be used when creating an edit
+   * in the compilation unit containing the given [node].
+   */
+  CorrectionUtils _getUtilsFor(AstNode node) {
+    CompilationUnit targetUnit =
+        node.getAncestor((node) => node is CompilationUnit);
+    CompilationUnitElement targetUnitElement = targetUnit?.element;
+    CorrectionUtils realUtils = utils;
+    if (targetUnitElement != utils.unit.element) {
+      realUtils = new CorrectionUtils(targetUnit);
+      ClassDeclaration targetClass =
+          node.getAncestor((node) => node is ClassDeclaration);
+      if (targetClass != null) {
+        realUtils.targetClassElement = targetClass.element;
+      }
+    }
+    return realUtils;
+  }
+
+  /**
    * Returns an expected [DartType] of [expression], may be `null` if cannot be
    * inferred.
    */
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
index 995c07c..0f9f88a 100644
--- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
+++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:convert';
-import 'dart:io';
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
@@ -14,19 +13,19 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/src/dart/resolver/inheritance_manager.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show KytheEntry, KytheVName;
 
 import 'schema.dart' as schema;
 
 const int _notFound = -1;
 
-/// Computes analysis of the given compilation [unit].
-///
-/// [unit] is the compilation unit to be analyzed; it is assumed to exist in the
-/// given [corpus] and to have the given text [contents].  Analysis results are
-/// returned as a list of Kythe [pb_Entry] objects.
-List<pb_Entry> computeIndex(
+/// Computes analysis of the given compilation [unit]. The unit is assumed to
+/// exist in the given [corpus] and to have the given text [contents]. Analysis
+/// results are returned as a list of [KytheEntry] objects.
+List<KytheEntry> computeIndex(
     String corpus, CompilationUnit unit, String contents) {
-  final List<pb_Entry> entries = [];
+  final List<KytheEntry> entries = [];
   var visitor = new KytheDartVisitor(
       entries,
       corpus,
@@ -37,25 +36,9 @@
   return entries;
 }
 
-/// Outputs analysis of the given compilation [unit] to the parent process.
-///
-/// [unit] is the compilation unit to be analyzed; it is assumed to exist in the
-/// given [corpus] and to have the given text [contents].  Analysis results are
-/// sent do the parent process as raw Kythe [Entry] objects.
-void writeOutIndex(CompilationUnit unit, String corpus, String contents) {
-  List<pb_Entry> entries = computeIndex(corpus, unit, contents);
-  for (pb_Entry e in entries) {
-    assert(e.source != null);
-    if (e.edgeKind == "") {
-      assert(e.target.toString() == "");
-    }
-    _sendToParentProcess(e);
-  }
-}
-
 /// Given some [ConstructorElement], this method returns '<class-name>' as the
-/// name of the constructor, unless the constructor is a named constructor
-/// in which '<class-name>.<constructor-name>' is returned.
+/// name of the constructor, unless the constructor is a named constructor in
+/// which '<class-name>.<constructor-name>' is returned.
 String _computeConstructorElementName(ConstructorElement element) {
   assert(element != null);
   var name = element.enclosingElement.name;
@@ -72,6 +55,8 @@
 }
 
 String _getPath(Element e) {
+  // TODO(jwren) This method simply serves to provide the WORKSPACE relative
+  // path for sources in Elements, it needs to be written in a more robust way.
   // TODO(jwren) figure out what source generates a e != null, but
   // e.source == null to ensure that it is not a bug somewhere in the stack.
   if (e == null || e.source == null) {
@@ -85,8 +70,8 @@
 }
 
 /// If a non-null element is passed, the [SignatureElementVisitor] is used to
-/// generate and return a [String] signature, otherwise
-/// [schema.DYNAMIC_KIND] is returned.
+/// generate and return a [String] signature, otherwise [schema.DYNAMIC_KIND] is
+/// returned.
 String _getSignature(Element element, String nodeKind, String corpus) {
   assert(nodeKind != schema.ANCHOR_KIND); // Call _getAnchorSignature instead
   if (element == null) {
@@ -98,35 +83,24 @@
   return '$nodeKind:${element.accept(SignatureElementVisitor.instance)}';
 }
 
-/// Send a [Reply] message to the parent process via standard output.
-///
-/// The message is formatted as a base-128 encoded length followed by the
-/// serialized message data.  The base-128 encoding is in little-endian order,
-/// with the high bit set on all bytes but the last.  This was chosen since
-/// it's the same as the base-128 encoding used by protobufs, so it allows a
-/// modest amount of code reuse.  Also it parallels the format used by
-/// [messageGrouper].
-void _sendToParentProcess(pb_Entry entry) {
-  var rawMessage = entry.writeToBuffer();
-  var encodedLength = (new CodedBufferWriter(rawMessage.length)).toBuffer();
-  stdout..add(encodedLength)..add(rawMessage);
+class CodedBufferWriter {
+  CodedBufferWriter(var v);
+  toBuffer() {}
 }
 
-// TODO(jwren) This method simply serves to provide the WORKSPACE relative path
-// for sources in Elements, it needs to be written in a more robust way.
 /// This visitor writes out Kythe facts and edges as specified by the Kythe
 /// Schema here https://kythe.io/docs/schema/.  This visitor handles all nodes,
 /// facts and edges.
 class KytheDartVisitor extends GeneralizingAstVisitor with OutputUtils {
-  final List<pb_Entry> entries;
+  final List<KytheEntry> entries;
   final String corpus;
   final InheritanceManager _inheritanceManager;
   String _enclosingFilePath = '';
   Element _enclosingElement;
   ClassElement _enclosingClassElement;
-  pb_VName _enclosingVName;
-  pb_VName _enclosingFileVName;
-  pb_VName _enclosingClassVName;
+  KytheVName _enclosingVName;
+  KytheVName _enclosingFileVName;
+  KytheVName _enclosingClassVName;
   final String _contents;
 
   KytheDartVisitor(
@@ -934,7 +908,7 @@
     SyntacticEntity syntacticEntity: null,
     start: _notFound,
     end: _notFound,
-    pb_VName enclosingTarget: null,
+    KytheVName enclosingTarget: null,
   }) {
     if (element is ExecutableElement &&
         _enclosingVName != _enclosingFileVName) {
@@ -961,18 +935,18 @@
 
   /// This is a convenience method for adding ref edges. If the [start] and
   /// [end] offsets are provided, they are used, otherwise the offsets are
-  /// computed by using the [syntacticEntity].
-  /// The list of edges is assumed to be non-empty, and are added from the
-  /// anchor to the target generated using the passed [Element].
-  /// The created [pb_VName] is returned, if not `null` is returned.
-  pb_VName _handleRefEdge(
+  /// computed by using the [syntacticEntity]. The list of edges is assumed to
+  /// be non-empty, and are added from the anchor to the target generated using
+  /// the passed [Element]. The created [KytheVName] is returned, if not `null`
+  /// is returned.
+  KytheVName _handleRefEdge(
     Element element,
     List<String> refEdgeTypes, {
     SyntacticEntity syntacticEntity: null,
     start: _notFound,
     end: _notFound,
-    pb_VName enclosingTarget: null,
-    pb_VName enclosingAnchor: null,
+    KytheVName enclosingTarget: null,
+    KytheVName enclosingAnchor: null,
   }) {
     assert(refEdgeTypes.isNotEmpty);
     element = _findNonSyntheticElement(element);
@@ -1061,7 +1035,7 @@
   }
 
   _handleVariableDeclarationListAnnotations(
-      VariableDeclarationList variableDeclarationList, pb_VName refVName) {
+      VariableDeclarationList variableDeclarationList, KytheVName refVName) {
     assert(refVName != null);
     for (var varDecl in variableDeclarationList.variables) {
       if (varDecl.element != null) {
@@ -1120,24 +1094,24 @@
 
 /// This class is meant to be a mixin to concrete visitor methods to walk the
 /// [Element] or [AstNode]s produced by the Dart Analyzer to output Kythe
-/// [pb_Entry] protos.
+/// [KytheEntry] protos.
 abstract class OutputUtils {
-  /// A set of [String]s which have already had a name [pb_VName] created.
+  /// A set of [String]s which have already had a name [KytheVName] created.
   final Set<String> nameNodes = new Set<String>();
   String get corpus;
-  pb_VName get dynamicBuiltin => _vName(schema.DYNAMIC_KIND, '', '', '');
+  KytheVName get dynamicBuiltin => _vName(schema.DYNAMIC_KIND, '', '', '');
 
   String get enclosingFilePath;
 
-  List<pb_Entry> get entries;
-  pb_VName get fnBuiltin => _vName(schema.FN_BUILTIN, '', '', '');
-  pb_VName get voidBuiltin => _vName(schema.VOID_BUILTIN, '', '', '');
+  List<KytheEntry> get entries;
+  KytheVName get fnBuiltin => _vName(schema.FN_BUILTIN, '', '', '');
+  KytheVName get voidBuiltin => _vName(schema.VOID_BUILTIN, '', '', '');
 
   /// This is a convenience method for adding anchors. If the [start] and [end]
   /// offsets are provided, they are used, otherwise the offsets are computed by
   /// using the [syntacticEntity]. If a non-empty list of edges is provided, as
   /// well as a target, then this method also adds the edges from the anchor to
-  /// target. The anchor [pb_VName] is returned.
+  /// target. The anchor [KytheVName] is returned.
   ///
   /// If a [target] and [enclosingTarget] are provided, a childof edge is
   /// written out from the target to the enclosing target.
@@ -1148,14 +1122,14 @@
   ///
   /// Finally, for all anchors, a childof edge with a target of the enclosing
   /// file is written out.
-  pb_VName addAnchorEdgesContainingEdge({
+  KytheVName addAnchorEdgesContainingEdge({
     SyntacticEntity syntacticEntity: null,
     int start: _notFound,
     int end: _notFound,
     List<String> edges: const [],
-    pb_VName target: null,
-    pb_VName enclosingTarget: null,
-    pb_VName enclosingAnchor: null,
+    KytheVName target: null,
+    KytheVName enclosingTarget: null,
+    KytheVName enclosingAnchor: null,
   }) {
     if (start == _notFound && end == _notFound) {
       if (syntacticEntity != null) {
@@ -1200,7 +1174,7 @@
   /// TODO(jwren): for cases where the target is a name, we need the same kind
   /// of logic as [addNameFact] to prevent the edge from being written out.
   /// This is a convenience method for visitors to add an edge Entry.
-  pb_Entry addEdge(pb_VName source, String edgeKind, pb_VName target,
+  KytheEntry addEdge(KytheVName source, String edgeKind, KytheVName target,
       {int ordinalIntValue: _notFound}) {
     if (ordinalIntValue == _notFound) {
       return addEntry(source, edgeKind, target, "/", new List<int>());
@@ -1210,35 +1184,32 @@
     }
   }
 
-  pb_Entry addEntry(pb_VName source, String edgeKind, pb_VName target,
+  KytheEntry addEntry(KytheVName source, String edgeKind, KytheVName target,
       String factName, List<int> factValue) {
     assert(source != null);
     assert(factName != null);
     assert(factValue != null);
     // factValue may be an empty array, the fact may be that a file text or
     // document text is empty
-    var entry = pb_Entry.create()
-      ..source = source
-      ..factName = factName
-      ..factValue = factValue;
-    if (edgeKind != null && edgeKind.isNotEmpty) {
-      entry.edgeKind = edgeKind;
-      entry.target = target;
+    if (edgeKind == null || edgeKind.isEmpty) {
+      edgeKind = null;
+      target = null;
     }
+    var entry = new KytheEntry(source, edgeKind, target, factName, factValue);
     entries.add(entry);
     return entry;
   }
 
-  /// This is a convenience method for visitors to add a fact [pb_Entry].
-  pb_Entry addFact(pb_VName source, String factName, List<int> factValue) {
+  /// This is a convenience method for visitors to add a fact [KytheEntry].
+  KytheEntry addFact(KytheVName source, String factName, List<int> factValue) {
     return addEntry(source, null, null, factName, factValue);
   }
 
   /// This is a convenience method for adding function types.
-  pb_VName addFunctionType(
+  KytheVName addFunctionType(
     Element functionElement,
     FormalParameterList paramNodes,
-    pb_VName functionVName, {
+    KytheVName functionVName, {
     AstNode returnNode: null,
   }) {
     var i = 0;
@@ -1295,15 +1266,15 @@
   }
 
   /// This is a convenience method for adding nodes with facts.
-  /// If an [pb_VName] is passed, it is used, otherwise an element is required
-  /// which is used to create a [pb_VName].  Either [nodeVName] must be non-null or
+  /// If an [KytheVName] is passed, it is used, otherwise an element is required
+  /// which is used to create a [KytheVName].  Either [nodeVName] must be non-null or
   /// [element] must be non-null. Other optional parameters if passed are then
-  /// used to set the associated facts on the [pb_VName]. This method does not
+  /// used to set the associated facts on the [KytheVName]. This method does not
   /// currently guarantee that the inputs to these fact kinds are valid for the
   /// associated nodeKind- if a non-null, then it will set.
-  pb_VName addNodeAndFacts(String nodeKind,
+  KytheVName addNodeAndFacts(String nodeKind,
       {Element element: null,
-      pb_VName nodeVName: null,
+      KytheVName nodeVName: null,
       String subKind: null,
       String completeFact: null}) {
     if (nodeVName == null) {
@@ -1327,41 +1298,36 @@
     return UTF8.encode(i.toString());
   }
 
-  /// Given all parameters for a [pb_VName] this method creates and returns a
-  /// [pb_VName].
-  pb_VName _vName(String signature, String corpus, String root, String path,
+  /// Given all parameters for a [KytheVName] this method creates and returns a
+  /// [KytheVName].
+  KytheVName _vName(String signature, String corpus, String root, String path,
       [String language = schema.DART_LANG]) {
-    return pb_VName.create()
-      ..signature = signature
-      ..corpus = corpus
-      ..root = root
-      ..path = path
-      ..language = language;
+    return new KytheVName(signature, corpus, root, path, language);
   }
 
-  /// Returns an anchor [pb_VName] corresponding to the given start and end
+  /// Returns an anchor [KytheVName] corresponding to the given start and end
   /// offsets.
-  pb_VName _vNameAnchor(int start, int end) {
+  KytheVName _vNameAnchor(int start, int end) {
     return _vName(
         _getAnchorSignature(start, end), corpus, '', enclosingFilePath);
   }
 
-  /// Return the [pb_VName] for this file.
-  pb_VName _vNameFile() {
+  /// Return the [KytheVName] for this file.
+  KytheVName _vNameFile() {
     // file vnames, the signature and language are not set
     return _vName('', corpus, '', enclosingFilePath, '');
   }
 
   /// Given some [Element] and Kythe node kind, this method generates and
-  /// returns the [pb_VName].
-  pb_VName _vNameFromElement(Element e, String nodeKind) {
+  /// returns the [KytheVName].
+  KytheVName _vNameFromElement(Element e, String nodeKind) {
     assert(nodeKind != schema.FILE_KIND);
     // general case
     return _vName(_getSignature(e, nodeKind, corpus), corpus, '', _getPath(e));
   }
 
-  /// Returns a [pb_VName] corresponding to the given [DartType].
-  pb_VName _vNameFromType(DartType type) {
+  /// Returns a [KytheVName] corresponding to the given [DartType].
+  KytheVName _vNameFromType(DartType type) {
     if (type == null || type.isDynamic) {
       return dynamicBuiltin;
     } else if (type.isVoid) {
@@ -1374,22 +1340,6 @@
   }
 }
 
-class CodedBufferWriter {
-  CodedBufferWriter(var v);
-  toBuffer() {}
-}
-
-class pb_Entry {
-  var source, edgeKind, target, factName, factValue;
-  static pb_Entry create() => new pb_Entry();
-  writeToBuffer() {}
-}
-
-class pb_VName {
-  var signature, corpus, root, path, language;
-  static pb_VName create() => new pb_VName();
-}
-
 /// This visitor class should be used by [_getSignature].
 ///
 /// This visitor is an [GeneralizingElementVisitor] which builds up a [String]
diff --git a/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart b/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart
new file mode 100644
index 0000000..7ddcfc1
--- /dev/null
+++ b/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart
@@ -0,0 +1,101 @@
+// 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';
+
+import 'package:analysis_server/protocol/protocol.dart';
+import 'package:analysis_server/protocol/protocol_constants.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../analysis_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(_AnalysisNotificationClosingLabelsTest);
+  });
+}
+
+@reflectiveTest
+class _AnalysisNotificationClosingLabelsTest extends AbstractAnalysisTest {
+  static const sampleCode = '''
+Widget build(BuildContext context) {
+  return /*1*/new Row(
+    children: /*2*/<Widget>[
+      new Text('a'),
+      new Text('b'),
+    ]/*/2*/,
+  )/*/1*/;
+}
+''';
+
+  static final expectedResults = [
+    new ClosingLabel(51, 96, "Row"),
+    new ClosingLabel(79, 57, "List<Widget>")
+  ];
+
+  List<ClosingLabel> lastLabels;
+
+  Completer _labelsReceived;
+
+  void processNotification(Notification notification) {
+    if (notification.event == ANALYSIS_NOTIFICATION_CLOSING_LABELS) {
+      var params =
+          new AnalysisClosingLabelsParams.fromNotification(notification);
+      if (params.file == testFile) {
+        lastLabels = params.labels;
+        _labelsReceived.complete(null);
+      }
+    } else if (notification.event == SERVER_NOTIFICATION_ERROR) {
+      var params = new ServerErrorParams.fromNotification(notification);
+      throw "${params.message}\n${params.stackTrace}";
+    }
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    createProject();
+  }
+
+  void subscribeForLabels() {
+    addAnalysisSubscription(AnalysisService.CLOSING_LABELS, testFile);
+  }
+
+  test_afterAnalysis() async {
+    addTestFile(sampleCode);
+    await waitForTasksFinished();
+    expect(lastLabels, isNull);
+
+    await waitForLabels(() => subscribeForLabels());
+
+    expect(lastLabels, expectedResults);
+  }
+
+  test_afterUpdate() async {
+    addTestFile('');
+    // Currently required to get notifications on updates
+    setPriorityFiles([testFile]);
+
+    // Before subscribing, we shouldn't have had any labels.
+    await waitForTasksFinished();
+    expect(lastLabels, isNull);
+
+    // With no content, there should be zero labels.
+    await waitForLabels(() => subscribeForLabels());
+    expect(lastLabels, hasLength(0));
+
+    // With sample code there will be labels.
+    await waitForLabels(() => modifyTestFile(sampleCode));
+
+    expect(lastLabels, expectedResults);
+  }
+
+  Future waitForLabels(action()) {
+    _labelsReceived = new Completer();
+    action();
+    return _labelsReceived.future;
+  }
+}
diff --git a/pkg/analysis_server/test/analysis/test_all.dart b/pkg/analysis_server/test/analysis/test_all.dart
index 1e14bd1..9d3ed60 100644
--- a/pkg/analysis_server/test/analysis/test_all.dart
+++ b/pkg/analysis_server/test/analysis/test_all.dart
@@ -12,6 +12,8 @@
     as notification_analysis_options_test;
 import 'notification_analyzedFiles_test.dart'
     as notification_analyzedFiles_test;
+import 'notification_closingLabels_test.dart'
+    as notification_closingLabels_test;
 import 'notification_errors_test.dart' as notification_errors_test;
 import 'notification_highlights_test.dart' as notification_highlights_test;
 import 'notification_highlights_test2.dart' as notification_highlights_test2;
@@ -35,6 +37,7 @@
     navigation_collector_test.main();
     notification_analysis_options_test.main();
     notification_analyzedFiles_test.main();
+    notification_closingLabels_test.main();
     notification_errors_test.main();
     notification_highlights_test.main();
     notification_highlights_test2.main();
diff --git a/pkg/analysis_server/test/integration/coverage.md b/pkg/analysis_server/test/integration/coverage.md
index 8510421..c3ad3aa 100644
--- a/pkg/analysis_server/test/integration/coverage.md
+++ b/pkg/analysis_server/test/integration/coverage.md
@@ -15,9 +15,22 @@
 - [x] analysis.setSubscriptions
 - [x] analysis.updateContent
 - [x] analysis.updateOptions (failing - see #28800) (deprecated)
+- [ ] analysis.analyzedFiles
+- [ ] analysis.closingLabels
+- [ ] analysis.errors
+- [ ] analysis.flushResults
+- [ ] analysis.folding
+- [x] analysis.highlights
+- [ ] analysis.implemented
+- [ ] analysis.invalidate
+- [x] analysis.navigation
+- [x] analysis.occurrences
+- [x] analysis.outline
+- [x] analysis.overrides
 
 ## completion domain
 - [x] completion.getSuggestions
+- [ ] completion.results
 
 ## diagnostic domain
 - [x] diagnostic.getDiagnostics
@@ -42,6 +55,7 @@
 - [x] execution.deleteContext
 - [x] execution.mapUri
 - [x] execution.setSubscriptions
+- [ ] execution.launchData
 
 ## search domain
 - [x] search.findElementReferences
@@ -49,14 +63,21 @@
 - [x] search.findMemberReferences
 - [x] search.findTopLevelDeclarations
 - [x] search.getTypeHierarchy
+- [ ] search.results
 
 ## server domain
 - [x] server.getVersion
 - [x] server.shutdown
 - [x] server.setSubscriptions
+- [ ] server.connected
+- [ ] server.error
+- [x] server.status
 
 ## analytics domain
 - [x] analytics.isEnabled
 - [x] analytics.enable
 - [x] analytics.sendEvent
 - [x] analytics.sendTiming
+
+## kythe domain
+- [] kythe.getKytheEntries
diff --git a/pkg/analysis_server/test/integration/coverage_test.dart b/pkg/analysis_server/test/integration/coverage_test.dart
index 630813f..b8b3c14 100644
--- a/pkg/analysis_server/test/integration/coverage_test.dart
+++ b/pkg/analysis_server/test/integration/coverage_test.dart
@@ -65,28 +65,56 @@
       });
 
       // requests
-      for (Request request in domain.requests) {
-        String fullName = '${domain.name}.${request.method}';
-        test(fullName, () {
-          if (!allMembers.contains(fullName)) {
-            fail('$fullName not found in ${coverageFile.path}');
-          }
+      group('request', () {
+        for (Request request in domain.requests) {
+          String fullName = '${domain.name}.${request.method}';
+          test(fullName, () {
+            if (!allMembers.contains(fullName)) {
+              fail('$fullName not found in ${coverageFile.path}');
+            }
 
-          final String fileName = getCamelWords(request.method)
-              .map((s) => s.toLowerCase())
-              .join('_');
-          final String testName =
-              path.join(domain.name, '${fileName}_test.dart');
-          final String testPath =
-              path.join(pathPrefix, 'test', 'integration', testName);
+            final String fileName = getCamelWords(request.method)
+                .map((s) => s.toLowerCase())
+                .join('_');
+            final String testName =
+                path.join(domain.name, '${fileName}_test.dart');
+            final String testPath =
+                path.join(pathPrefix, 'test', 'integration', testName);
 
-          // Test that if checked, a test file exists; if not checked, no such
-          // file exists.
-          expect(FileSystemEntity.isFileSync(testPath),
-              coveredMembers.contains(fullName),
-              reason: '$testName state incorrect');
-        });
-      }
+            // Test that if checked, a test file exists; if not checked, no such
+            // file exists.
+            expect(FileSystemEntity.isFileSync(testPath),
+                coveredMembers.contains(fullName),
+                reason: '$testName state incorrect');
+          });
+        }
+      });
+
+      // notifications
+      group('notification', () {
+        for (Notification notification in domain.notifications) {
+          String fullName = '${domain.name}.${notification.event}';
+          test(fullName, () {
+            if (!allMembers.contains(fullName)) {
+              fail('$fullName not found in ${coverageFile.path}');
+            }
+
+            final String fileName = getCamelWords(notification.event)
+                .map((s) => s.toLowerCase())
+                .join('_');
+            final String testName =
+                path.join(domain.name, '${fileName}_test.dart');
+            final String testPath =
+                path.join(pathPrefix, 'test', 'integration', testName);
+
+            // Test that if checked, a test file exists; if not checked, no such
+            // file exists.
+            expect(FileSystemEntity.isFileSync(testPath),
+                coveredMembers.contains(fullName),
+                reason: '$testName state incorrect');
+          });
+        }
+      });
     });
   }
 
diff --git a/pkg/analysis_server/test/integration/edit/import_elements_test.dart b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
index e966785..cd50c0b 100644
--- a/pkg/analysis_server/test/integration/edit/import_elements_test.dart
+++ b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
@@ -39,7 +39,9 @@
     EditImportElementsResult result =
         await sendEditImportElements(pathname, elements);
 
-    expect(result.edits, hasLength(expected.length));
+    SourceFileEdit edit = result.edit;
+    expect(edit, isNotNull);
+    expect(edit.edits, hasLength(expected.length));
     // TODO(brianwilkerson) Finish implementing this.
   }
 
@@ -51,7 +53,9 @@
     EditImportElementsResult result =
         await sendEditImportElements(pathname, <ImportedElements>[]);
 
-    expect(result.edits, hasLength(0));
+    SourceFileEdit edit = result.edit;
+    expect(edit, isNotNull);
+    expect(edit.edits, hasLength(0));
   }
 
   setUp() {
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index 93cb1d4..2580f2c 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -1665,10 +1665,13 @@
    *
    * Returns
    *
-   * edits: List<SourceEdit>
+   * edit: SourceFileEdit
    *
-   *   The edit(s) to be applied in order to make the specified elements
-   *   accessible.
+   *   The edits to be applied in order to make the specified elements
+   *   accessible. The file to be edited will be the defining compilation unit
+   *   of the library containing the file specified in the request, which can
+   *   be different than the file specified in the request if the specified
+   *   file is a part file.
    */
   Future<EditImportElementsResult> sendEditImportElements(
       String file, List<ImportedElements> elements) async {
@@ -2037,6 +2040,43 @@
   }
 
   /**
+   * Return the list of KytheEntry objects for some file, given the current
+   * state of the file system populated by "analysis.updateContent".
+   *
+   * If a request is made for a file that does not exist, or that is not
+   * currently subject to analysis (e.g. because it is not associated with any
+   * analysis root specified to analysis.setAnalysisRoots), an error of type
+   * GET_KYTHE_ENTRIES_INVALID_FILE will be generated.
+   *
+   * Parameters
+   *
+   * file: FilePath
+   *
+   *   The file containing the code for which the Kythe Entry objects are being
+   *   requested.
+   *
+   * Returns
+   *
+   * entries: List<KytheEntry>
+   *
+   *   The list of KytheEntry objects for the queried file.
+   *
+   * files: List<FilePath>
+   *
+   *   The set of files paths that were required, but not in the file system,
+   *   to give a complete and accurate Kythe graph for the file. This could be
+   *   due to a referenced file that does not exist or generated files not
+   *   being generated or passed before the call to "getKytheEntries".
+   */
+  Future<KytheGetKytheEntriesResult> sendKytheGetKytheEntries(
+      String file) async {
+    var params = new KytheGetKytheEntriesParams(file).toJson();
+    var result = await server.send("kythe.getKytheEntries", params);
+    ResponseDecoder decoder = new ResponseDecoder(null);
+    return new KytheGetKytheEntriesResult.fromJson(decoder, 'result', result);
+  }
+
+  /**
    * Initialize the fields in InttestMixin, and ensure that notifications will
    * be handled.
    */
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 4d45559..6be1aa1 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -712,6 +712,46 @@
     {"path": isFilePath, "prefix": isString, "elements": isListOf(isString)}));
 
 /**
+ * KytheEntry
+ *
+ * {
+ *   "source": KytheVName
+ *   "kind": String
+ *   "target": KytheVName
+ *   "fact": String
+ *   "value": List<int>
+ * }
+ */
+final Matcher isKytheEntry =
+    new LazyMatcher(() => new MatchesJsonObject("KytheEntry", {
+          "source": isKytheVName,
+          "kind": isString,
+          "target": isKytheVName,
+          "fact": isString,
+          "value": isListOf(isInt)
+        }));
+
+/**
+ * KytheVName
+ *
+ * {
+ *   "signature": String
+ *   "corpus": String
+ *   "root": String
+ *   "path": String
+ *   "language": String
+ * }
+ */
+final Matcher isKytheVName =
+    new LazyMatcher(() => new MatchesJsonObject("KytheVName", {
+          "signature": isString,
+          "corpus": isString,
+          "root": isString,
+          "path": isString,
+          "language": isString
+        }));
+
+/**
  * LinkedEditGroup
  *
  * {
@@ -1037,6 +1077,7 @@
  *   FORMAT_WITH_ERRORS
  *   GET_ERRORS_INVALID_FILE
  *   GET_IMPORTED_ELEMENTS_INVALID_FILE
+ *   GET_KYTHE_ENTRIES_INVALID_FILE
  *   GET_NAVIGATION_INVALID_FILE
  *   GET_REACHABLE_SOURCES_INVALID_FILE
  *   IMPORT_ELEMENTS_INVALID_FILE
@@ -1066,6 +1107,7 @@
   "FORMAT_WITH_ERRORS",
   "GET_ERRORS_INVALID_FILE",
   "GET_IMPORTED_ELEMENTS_INVALID_FILE",
+  "GET_KYTHE_ENTRIES_INVALID_FILE",
   "GET_NAVIGATION_INVALID_FILE",
   "GET_REACHABLE_SOURCES_INVALID_FILE",
   "IMPORT_ELEMENTS_INVALID_FILE",
@@ -2009,12 +2051,12 @@
  * edit.importElements result
  *
  * {
- *   "edits": List<SourceEdit>
+ *   "edit": SourceFileEdit
  * }
  */
 final Matcher isEditImportElementsResult = new LazyMatcher(() =>
     new MatchesJsonObject(
-        "edit.importElements result", {"edits": isListOf(isSourceEdit)}));
+        "edit.importElements result", {"edit": isSourceFileEdit}));
 
 /**
  * edit.isPostfixCompletionApplicable params
@@ -2319,6 +2361,29 @@
         "inlineMethod options", {"deleteSource": isBool, "inlineAll": isBool}));
 
 /**
+ * kythe.getKytheEntries params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ */
+final Matcher isKytheGetKytheEntriesParams = new LazyMatcher(() =>
+    new MatchesJsonObject(
+        "kythe.getKytheEntries params", {"file": isFilePath}));
+
+/**
+ * kythe.getKytheEntries result
+ *
+ * {
+ *   "entries": List<KytheEntry>
+ *   "files": List<FilePath>
+ * }
+ */
+final Matcher isKytheGetKytheEntriesResult = new LazyMatcher(() =>
+    new MatchesJsonObject("kythe.getKytheEntries result",
+        {"entries": isListOf(isKytheEntry), "files": isListOf(isFilePath)}));
+
+/**
  * moveFile feedback
  */
 final Matcher isMoveFileFeedback = isNull;
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 8f3d30e..c880121 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -85,11 +85,13 @@
     List<SourceFileEdit> fileEdits = change.edits;
     expect(fileEdits, hasLength(1));
 
+    String fileContent = testCode;
     if (target != null) {
       expect(target, fileEdits.first.file);
+      fileContent = provider.getFile(target).readAsStringSync();
     }
 
-    resultCode = SourceEdit.applySequence(testCode, change.edits[0].edits);
+    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
     // verify
     expect(resultCode, expected);
   }
@@ -1630,6 +1632,39 @@
 ''');
   }
 
+  test_createField_getter_qualified_instance_differentLibrary() async {
+    addSource('/other.dart', '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+}
+''');
+    await resolveTestUnit('''
+import 'other.dart';
+main(A a) {
+  int v = a.test;
+}
+''');
+    await assertHasFix(
+        DartFixKind.CREATE_FIELD,
+        '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+  int test;
+}
+''',
+        target: '/other.dart');
+  }
+
   test_createField_getter_qualified_instance_dynamicType() async {
     await resolveTestUnit('''
 class A {
@@ -2219,6 +2254,39 @@
 ''');
   }
 
+  test_createGetter_qualified_instance_differentLibrary() async {
+    addSource('/other.dart', '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+}
+''');
+    await resolveTestUnit('''
+import 'other.dart';
+main(A a) {
+  int v = a.test;
+}
+''');
+    await assertHasFix(
+        DartFixKind.CREATE_GETTER,
+        '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+  int get test => null;
+}
+''',
+        target: '/other.dart');
+  }
+
   test_createGetter_qualified_instance_dynamicType() async {
     await resolveTestUnit('''
 class A {
@@ -2440,6 +2508,44 @@
     _assertLinkedGroup(change.linkedEditGroups[0], ['test;', 'test.add(']);
   }
 
+  test_createLocalVariable_withImport() async {
+    addPackageSource('pkg', 'a/a.dart', '''
+class A {}
+''');
+    addPackageSource('pkg', 'b/b.dart', '''
+class B {}
+''');
+    addPackageSource('pkg', 'c/c.dart', '''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/b/b.dart';
+
+class C {
+  C(A a, B b);
+}
+''');
+
+    await resolveTestUnit('''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/c/c.dart';
+
+main() {
+  A a;
+  new C(a, b);
+}
+''');
+    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/b/b.dart';
+import 'package:pkg/c/c.dart';
+
+main() {
+  A a;
+  B b;
+  new C(a, b);
+}
+''');
+  }
+
   test_createLocalVariable_write_assignment() async {
     await resolveTestUnit('''
 main() {
diff --git a/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
new file mode 100644
index 0000000..437e705
--- /dev/null
+++ b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
@@ -0,0 +1,389 @@
+// 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';
+
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/src/computer/computer_closingLabels.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../abstract_context.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ClosingLabelsComputerTest);
+  });
+}
+
+@reflectiveTest
+class ClosingLabelsComputerTest extends AbstractContextTest {
+  String sourcePath;
+
+  setUp() {
+    super.setUp();
+    sourcePath = provider.convertPath('/p/lib/source.dart');
+  }
+
+  test_adjacentLinesExcluded() async {
+    String content = """
+void myMethod() {
+  return new Thing(1,
+    2);
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 0);
+  }
+
+  /// When constructors span many like this, the node's start position is on the first line
+  /// of the expression and not where the opening paren is, so this test ensures we
+  /// dont end up with lots of unwanted labels on each line here.
+  test_chainedConstructorOverManyLines() async {
+    String content = """
+main() {
+  return new thing
+    .whatIsSplit
+    .acrossManyLines(1, 2);
+}
+    """;
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 0);
+  }
+
+  /// When chaining methods like this, the node's start position is on the first line
+  /// of the expression and not where the opening paren is, so this test ensures we
+  /// dont end up with lots of unwanted labels on each line here.
+  test_chainedMethodsOverManyLines() async {
+    String content = """
+List<ClosingLabel> compute() {
+  _unit.accept(new _DartUnitClosingLabelsComputerVisitor(this));
+  return _closingLabelsByEndLine.values
+      .where((l) => l.any((cl) => cl.spannedLines >= 2))
+      .expand((cls) => cls)
+      .map((clwlc) => clwlc.label)
+      .toList();
+}
+    """;
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 0);
+  }
+
+  test_constConstructor() async {
+    String content = """
+void myMethod() {
+  return /*1*/const Class(
+    1,
+    2
+  )/*1:Class*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_constNamedConstructor() async {
+    String content = """
+void myMethod() {
+  return /*1*/const Class.fromThing(
+    1,
+    2
+  )/*1:Class.fromThing*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_instanceMethod() async {
+    String content = """
+void myMethod() {
+  return /*1*/createWidget(
+    1,
+    2
+  )/*1:createWidget*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_knownBadCode1() async {
+    // This code crashed during testing when I accidentally inserted a test snippet.
+    String content = """
+@override
+Widget build(BuildContext context) {
+  new SliverGrid(
+            gridDelegate: gridDelegate,
+            delegate: myMethod(<test('', () {
+              
+            });>[
+              "a",
+              'b',
+              "c",
+            ]),
+          ),
+        ),
+      ],
+    ),
+  );
+}
+""";
+
+    // TODO(dantup) Results here are currently bad so this test is just checking that we
+    // dont crash. Need to confirm what to do here; the bad labels might not be fixed
+    // until the code is using the new shared parser.
+    // https://github.com/dart-lang/sdk/issues/30370
+    await _computeElements(content);
+  }
+
+  test_listLiterals() async {
+    String content = """
+void myMethod() {
+  return /*1*/Widget.createWidget(/*2*/<Widget>[
+    1,
+    2
+  ]/*2:List<Widget>*/)/*1:Widget.createWidget*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 2);
+  }
+
+  /// When a line contains the end of a label, we need to ensure we also include any
+  /// other labels that end on the same line, even if they are 1-2 lines, otherwise
+  /// it isn't obvious which closing bracket goes with the label.
+  test_mixedLineSpanning() async {
+    String content = """
+main() {
+    /*1*/expectedLabels.forEach((m) {
+      /*2*/expect(
+          labels,
+          /*3*/contains(
+              /*4*/new ClosingLabel(expectedStart, expectedLength, expectedLabel)/*4:ClosingLabel*/)/*3:contains*/)/*2:expect*/;
+    })/*1:expectedLabels.forEach*/;
+  }
+}
+  """;
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 4);
+  }
+
+  test_multipleNested() async {
+    String content = """
+Widget build(BuildContext context) {
+  return /*1*/new Row(
+    children: /*2*/<Widget>[
+      /*3*/new RaisedButton(
+        onPressed: increment,
+        child: /*4*/new Text(
+          'Increment'
+        )/*4:Text*/,
+      )/*3:RaisedButton*/,
+      /*5*/_makeWidget(
+        'a',
+        'b'
+      )/*5:_makeWidget*/,
+      new Text('Count: \$counter'),
+    ]/*2:List<Widget>*/,
+  )/*1:Row*/;
+}
+""";
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 5);
+  }
+
+  test_newConstructor() async {
+    String content = """
+void myMethod() {
+  return /*1*/new Class(
+    1,
+    2
+  )/*1:Class*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_newNamedConstructor() async {
+    String content = """
+void myMethod() {
+  return /*1*/new Class.fromThing(
+    1,
+    2
+  )/*1:Class.fromThing*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_NnLabelsFromInterpolatedStrings() async {
+    String content = """
+void main(HighlightRegionType type, int offset, int length) {
+  /*1*/fail(
+      'Not expected to find (offset=\$offset; length=\$length; type=\$type) in\\n'
+      '\${regions.join('\\n')}')/*1:fail*/;
+}
+    """;
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_prefixedConstConstructor() async {
+    String content = """
+import 'dart:async' as a;
+void myMethod() {
+  return /*1*/const a.Future(
+    1,
+    2
+  )/*1:a.Future*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_prefixedConstNamedConstructor() async {
+    String content = """
+import 'dart:async' as a;
+void myMethod() {
+  return /*1*/const a.Future.delayed(
+    1,
+    2
+  )/*1:a.Future.delayed*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_prefixedNewConstructor() async {
+    String content = """
+import 'dart:async' as a;
+void myMethod() {
+  return /*1*/new a.Future(
+    1,
+    2
+  )/*1:a.Future*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_prefixedNewNamedConstructor() async {
+    String content = """
+import 'dart:async' as a;
+void myMethod() {
+  return /*1*/new a.Future.delayed(
+    1,
+    2
+  )/*1:a.Future.delayed*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_prefixedStaticMethod() async {
+    String content = """
+import 'widgets.dart' as a;
+void myMethod() {
+  return /*1*/a.Widget.createWidget(
+    1,
+    2
+  )/*1:a.Widget.createWidget*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  test_sameLineExcluded() async {
+    String content = """
+void myMethod() {
+  return new Thing();
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 0);
+  }
+
+  test_staticMethod() async {
+    String content = """
+void myMethod() {
+  return /*1*/Widget.createWidget(
+    1,
+    2
+  )/*1:Widget.createWidget*/;
+}
+""";
+
+    var labels = await _computeElements(content);
+    _compareLabels(labels, content, expectedLabelCount: 1);
+  }
+
+  /// Compares provided closing labels with expected
+  /// labels extracted from the comments in the provided content.
+  _compareLabels(List<ClosingLabel> labels, String content,
+      {int expectedLabelCount}) {
+    // Require the test pass us the expected count to guard
+    // against expected annotations being mistyped and not
+    // extracted by the regex.
+    expect(labels, hasLength(expectedLabelCount));
+
+    // Find all numeric markers for label starts.
+    var regex = new RegExp("/\\*(\\d+)\\*/");
+    var expectedLabels = regex.allMatches(content);
+
+    // Check we didn't get more than expected, since the loop below only
+    // checks for the presence of matches, not absence.
+    expect(labels, hasLength(expectedLabels.length));
+
+    // Go through each marker, find the expected label/end and
+    // ensure it's in the results.
+    expectedLabels.forEach((m) {
+      var i = m.group(1);
+      // Find the end marker.
+      var endMatch = new RegExp("/\\*$i:(.+?)\\*/").firstMatch(content);
+
+      var expectedStart = m.end;
+      var expectedLength = endMatch.start - expectedStart;
+      var expectedLabel = endMatch.group(1);
+
+      expect(
+          labels,
+          contains(
+              new ClosingLabel(expectedStart, expectedLength, expectedLabel)));
+    });
+  }
+
+  Future<List<ClosingLabel>> _computeElements(String sourceContent) async {
+    provider.newFile(sourcePath, sourceContent);
+    ResolveResult result = await driver.getResult(sourcePath);
+    DartUnitClosingLabelsComputer computer =
+        new DartUnitClosingLabelsComputer(result.lineInfo, result.unit);
+    return computer.compute();
+  }
+}
diff --git a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
index 3dc4631..63d5432 100644
--- a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
@@ -58,6 +58,24 @@
     path = provider.convertPath('/test.dart');
   }
 
+  test_createEdits_addImport_noDirectives() async {
+    await createBuilder('''
+main() {
+  // paste here
+}
+''');
+    await computeChanges(<ImportedElements>[
+      new ImportedElements('/lib/math/math.dart', '', <String>['Random'])
+    ]);
+    assertChanges('''
+import 'dart:math';
+
+main() {
+  // paste here
+}
+''');
+  }
+
   test_createEdits_addImport_noPrefix() async {
     Source fooSource = addPackageSource('pkg', 'foo.dart', '');
     await createBuilder('''
diff --git a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
index 825d8d3..23462db 100644
--- a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
@@ -132,6 +132,25 @@
     expect(elements.elements, unorderedEquals(['String']));
   }
 
+  test_dartMath_noPrefix() async {
+    String selection = "new Random();";
+    String content = """
+import 'dart:math';
+bool randomBool() {
+  Random r = $selection
+  return r.nextBool();
+}
+""";
+    List<ImportedElements> elementsList = await _computeElements(
+        content, content.indexOf(selection), selection.length);
+    expect(elementsList, hasLength(1));
+    ImportedElements elements = elementsList[0];
+    expect(elements, isNotNull);
+    expect(elements.path, '/lib/math/math.dart');
+    expect(elements.prefix, '');
+    expect(elements.elements, unorderedEquals(['Random']));
+  }
+
   test_none_comment() async {
     String selection = 'comment';
     String content = """
diff --git a/pkg/analysis_server/test/src/computer/test_all.dart b/pkg/analysis_server/test/src/computer/test_all.dart
index b553230..8fd4eaa 100644
--- a/pkg/analysis_server/test/src/computer/test_all.dart
+++ b/pkg/analysis_server/test/src/computer/test_all.dart
@@ -4,12 +4,14 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'closingLabels_computer_test.dart' as closingLabels_computer_test;
 import 'import_elements_computer_test.dart' as import_elements_computer_test;
 import 'imported_elements_computer_test.dart'
     as imported_elements_computer_test;
 
 main() {
   defineReflectiveSuite(() {
+    closingLabels_computer_test.main();
     import_elements_computer_test.main();
     imported_elements_computer_test.main();
   });
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index aac8269..1323da9 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -131,8 +131,8 @@
     });
     for (String expectedAttribute in requiredAttributes) {
       if (!attributesFound.contains(expectedAttribute)) {
-        throw new Exception(
-            '$context: ${element.localName} must contain attribute $expectedAttribute');
+        throw new Exception('$context: ${element
+            .localName} must contain attribute $expectedAttribute');
       }
     }
   }
@@ -211,14 +211,17 @@
     checkName(html, 'notification', context);
     String event = html.attributes['event'];
     context = '$context.${event != null ? event : 'event'}';
-    checkAttributes(html, ['event'], context);
+    checkAttributes(html, ['event'], context,
+        optionalAttributes: ['experimental']);
+    bool experimental = html.attributes['experimental'] == 'true';
     TypeDecl params;
     recurse(html, context, {
       'params': (dom.Element child) {
         params = typeObjectFromHtml(child, '$context.params');
       }
     });
-    return new Notification(domainName, event, params, html);
+    return new Notification(domainName, event, params, html,
+        experimental: experimental);
   }
 
   /**
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
index 857a9ad..24ff37d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
+++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -632,6 +632,20 @@
   public boolean isSocketOpen();
 
   /**
+   * {@code kythe.getKytheEntries}
+   *
+   * Return the list of KytheEntry objects for some file, given the current state of the file system
+   * populated by "analysis.updateContent".
+   *
+   * If a request is made for a file that does not exist, or that is not currently subject to
+   * analysis (e.g. because it is not associated with any analysis root specified to
+   * analysis.setAnalysisRoots), an error of type GET_KYTHE_ENTRIES_INVALID_FILE will be generated.
+   *
+   * @param file The file containing the code for which the Kythe Entry objects are being requested.
+   */
+  public void kythe_getKytheEntries(String file, GetKytheEntriesConsumer consumer);
+
+  /**
    * Remove the given listener from the list of listeners that will receive notification when new
      * analysis results become available.
    *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java b/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java
new file mode 100644
index 0000000..a224a70
--- /dev/null
+++ b/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2015, the Dart project authors.
+ *
+ * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ *
+ * This file has been automatically generated.  Please do not edit it manually.
+ * To regenerate the file, use the script "pkg/analysis_server/tool/spec/generate_files".
+ */
+package org.dartlang.analysis.server.protocol;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import com.google.common.collect.Lists;
+import com.google.dart.server.utilities.general.JsonUtilities;
+import com.google.dart.server.utilities.general.ObjectUtilities;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * This object matches the format and documentation of the Entry object documented in the Kythe
+ * Storage Model.
+ *
+ * @coverage dart.server.generated.types
+ */
+@SuppressWarnings("unused")
+public class KytheEntry {
+
+  public static final KytheEntry[] EMPTY_ARRAY = new KytheEntry[0];
+
+  public static final List<KytheEntry> EMPTY_LIST = Lists.newArrayList();
+
+  /**
+   * The ticket of the source node (must not be empty).
+   */
+  private final KytheVName source;
+
+  /**
+   * An edge label (may be empty). The schema defines which labels are meaningful.
+   */
+  private final String kind;
+
+  /**
+   * The ticket of the target node (may be empty).
+   */
+  private final KytheVName target;
+
+  /**
+   * A fact label (must not be empty). The schema defines which fact labels are meaningful.
+   */
+  private final String fact;
+
+  /**
+   * The String value of the fact (may be empty).
+   */
+  private final int[] value;
+
+  /**
+   * Constructor for {@link KytheEntry}.
+   */
+  public KytheEntry(KytheVName source, String kind, KytheVName target, String fact, int[] value) {
+    this.source = source;
+    this.kind = kind;
+    this.target = target;
+    this.fact = fact;
+    this.value = value;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof KytheEntry) {
+      KytheEntry other = (KytheEntry) obj;
+      return
+        ObjectUtilities.equals(other.source, source) &&
+        ObjectUtilities.equals(other.kind, kind) &&
+        ObjectUtilities.equals(other.target, target) &&
+        ObjectUtilities.equals(other.fact, fact) &&
+        Arrays.equals(other.value, value);
+    }
+    return false;
+  }
+
+  public static KytheEntry fromJson(JsonObject jsonObject) {
+    KytheVName source = KytheVName.fromJson(jsonObject.get("source").getAsJsonObject());
+    String kind = jsonObject.get("kind").getAsString();
+    KytheVName target = KytheVName.fromJson(jsonObject.get("target").getAsJsonObject());
+    String fact = jsonObject.get("fact").getAsString();
+    int[] value = JsonUtilities.decodeIntArray(jsonObject.get("value").getAsJsonArray());
+    return new KytheEntry(source, kind, target, fact, value);
+  }
+
+  public static List<KytheEntry> fromJsonArray(JsonArray jsonArray) {
+    if (jsonArray == null) {
+      return EMPTY_LIST;
+    }
+    ArrayList<KytheEntry> list = new ArrayList<KytheEntry>(jsonArray.size());
+    Iterator<JsonElement> iterator = jsonArray.iterator();
+    while (iterator.hasNext()) {
+      list.add(fromJson(iterator.next().getAsJsonObject()));
+    }
+    return list;
+  }
+
+  /**
+   * A fact label (must not be empty). The schema defines which fact labels are meaningful.
+   */
+  public String getFact() {
+    return fact;
+  }
+
+  /**
+   * An edge label (may be empty). The schema defines which labels are meaningful.
+   */
+  public String getKind() {
+    return kind;
+  }
+
+  /**
+   * The ticket of the source node (must not be empty).
+   */
+  public KytheVName getSource() {
+    return source;
+  }
+
+  /**
+   * The ticket of the target node (may be empty).
+   */
+  public KytheVName getTarget() {
+    return target;
+  }
+
+  /**
+   * The String value of the fact (may be empty).
+   */
+  public int[] getValue() {
+    return value;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+    builder.append(source);
+    builder.append(kind);
+    builder.append(target);
+    builder.append(fact);
+    builder.append(value);
+    return builder.toHashCode();
+  }
+
+  public JsonObject toJson() {
+    JsonObject jsonObject = new JsonObject();
+    jsonObject.add("source", source.toJson());
+    jsonObject.addProperty("kind", kind);
+    jsonObject.add("target", target.toJson());
+    jsonObject.addProperty("fact", fact);
+    JsonArray jsonArrayValue = new JsonArray();
+    for (int elt : value) {
+      jsonArrayValue.add(new JsonPrimitive(elt));
+    }
+    jsonObject.add("value", jsonArrayValue);
+    return jsonObject;
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder builder = new StringBuilder();
+    builder.append("[");
+    builder.append("source=");
+    builder.append(source + ", ");
+    builder.append("kind=");
+    builder.append(kind + ", ");
+    builder.append("target=");
+    builder.append(target + ", ");
+    builder.append("fact=");
+    builder.append(fact + ", ");
+    builder.append("value=");
+    builder.append(StringUtils.join(value, ", "));
+    builder.append("]");
+    return builder.toString();
+  }
+
+}
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java b/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java
new file mode 100644
index 0000000..2c56a72
--- /dev/null
+++ b/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2015, the Dart project authors.
+ *
+ * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ *
+ * This file has been automatically generated.  Please do not edit it manually.
+ * To regenerate the file, use the script "pkg/analysis_server/tool/spec/generate_files".
+ */
+package org.dartlang.analysis.server.protocol;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import com.google.common.collect.Lists;
+import com.google.dart.server.utilities.general.JsonUtilities;
+import com.google.dart.server.utilities.general.ObjectUtilities;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * This object matches the format and documentation of the Vector-Name object documented in the
+ * Kythe Storage Model.
+ *
+ * @coverage dart.server.generated.types
+ */
+@SuppressWarnings("unused")
+public class KytheVName {
+
+  public static final KytheVName[] EMPTY_ARRAY = new KytheVName[0];
+
+  public static final List<KytheVName> EMPTY_LIST = Lists.newArrayList();
+
+  /**
+   * An opaque signature generated by the analyzer.
+   */
+  private final String signature;
+
+  /**
+   * The corpus of source code this KytheVName belongs to. Loosely, a corpus is a collection of
+   * related files, such as the contents of a given source repository.
+   */
+  private final String corpus;
+
+  /**
+   * A corpus-specific root label, typically a directory path or project identifier, denoting a
+   * distinct subset of the corpus. This may also be used to designate virtual collections like
+   * generated files.
+   */
+  private final String root;
+
+  /**
+   * A path-structured label describing the “location” of the named object relative to the corpus and
+   * the root.
+   */
+  private final String path;
+
+  /**
+   * The language this name belongs to.
+   */
+  private final String language;
+
+  /**
+   * Constructor for {@link KytheVName}.
+   */
+  public KytheVName(String signature, String corpus, String root, String path, String language) {
+    this.signature = signature;
+    this.corpus = corpus;
+    this.root = root;
+    this.path = path;
+    this.language = language;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof KytheVName) {
+      KytheVName other = (KytheVName) obj;
+      return
+        ObjectUtilities.equals(other.signature, signature) &&
+        ObjectUtilities.equals(other.corpus, corpus) &&
+        ObjectUtilities.equals(other.root, root) &&
+        ObjectUtilities.equals(other.path, path) &&
+        ObjectUtilities.equals(other.language, language);
+    }
+    return false;
+  }
+
+  public static KytheVName fromJson(JsonObject jsonObject) {
+    String signature = jsonObject.get("signature").getAsString();
+    String corpus = jsonObject.get("corpus").getAsString();
+    String root = jsonObject.get("root").getAsString();
+    String path = jsonObject.get("path").getAsString();
+    String language = jsonObject.get("language").getAsString();
+    return new KytheVName(signature, corpus, root, path, language);
+  }
+
+  public static List<KytheVName> fromJsonArray(JsonArray jsonArray) {
+    if (jsonArray == null) {
+      return EMPTY_LIST;
+    }
+    ArrayList<KytheVName> list = new ArrayList<KytheVName>(jsonArray.size());
+    Iterator<JsonElement> iterator = jsonArray.iterator();
+    while (iterator.hasNext()) {
+      list.add(fromJson(iterator.next().getAsJsonObject()));
+    }
+    return list;
+  }
+
+  /**
+   * The corpus of source code this KytheVName belongs to. Loosely, a corpus is a collection of
+   * related files, such as the contents of a given source repository.
+   */
+  public String getCorpus() {
+    return corpus;
+  }
+
+  /**
+   * The language this name belongs to.
+   */
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * A path-structured label describing the “location” of the named object relative to the corpus and
+   * the root.
+   */
+  public String getPath() {
+    return path;
+  }
+
+  /**
+   * A corpus-specific root label, typically a directory path or project identifier, denoting a
+   * distinct subset of the corpus. This may also be used to designate virtual collections like
+   * generated files.
+   */
+  public String getRoot() {
+    return root;
+  }
+
+  /**
+   * An opaque signature generated by the analyzer.
+   */
+  public String getSignature() {
+    return signature;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+    builder.append(signature);
+    builder.append(corpus);
+    builder.append(root);
+    builder.append(path);
+    builder.append(language);
+    return builder.toHashCode();
+  }
+
+  public JsonObject toJson() {
+    JsonObject jsonObject = new JsonObject();
+    jsonObject.addProperty("signature", signature);
+    jsonObject.addProperty("corpus", corpus);
+    jsonObject.addProperty("root", root);
+    jsonObject.addProperty("path", path);
+    jsonObject.addProperty("language", language);
+    return jsonObject;
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder builder = new StringBuilder();
+    builder.append("[");
+    builder.append("signature=");
+    builder.append(signature + ", ");
+    builder.append("corpus=");
+    builder.append(corpus + ", ");
+    builder.append("root=");
+    builder.append(root + ", ");
+    builder.append("path=");
+    builder.append(path + ", ");
+    builder.append("language=");
+    builder.append(language);
+    builder.append("]");
+    return builder.toString();
+  }
+
+}
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java b/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
index 0724621..a389b5b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
@@ -64,6 +64,12 @@
   public static final String GET_IMPORTED_ELEMENTS_INVALID_FILE = "GET_IMPORTED_ELEMENTS_INVALID_FILE";
 
   /**
+   * An "analysis.getKytheEntries" request specified a FilePath that does not match a file that is
+   * currently subject to analysis.
+   */
+  public static final String GET_KYTHE_ENTRIES_INVALID_FILE = "GET_KYTHE_ENTRIES_INVALID_FILE";
+
+  /**
    * An "analysis.getNavigation" request specified a FilePath which does not match a file currently
    * subject to analysis.
    */
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 531bede..29b17e6 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -7,7 +7,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  <version>1.18.3</version>
+  <version>1.18.4</version>
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -948,7 +948,7 @@
       </field>
     </params>
   </notification>
-  <notification event="closingLabels">
+  <notification event="closingLabels" experimental="true">
     <p>
       Reports closing labels relevant to a given file.
     </p>
@@ -1874,7 +1874,8 @@
       <field name="offset">
         <ref>int</ref>
         <p>
-          The offset used to identify the code to which the template will be applied.
+          The offset used to identify the code to which the template will be
+          applied.
         </p>
       </field>
     </params>
@@ -2075,7 +2076,8 @@
       <field name="offset">
         <ref>int</ref>
         <p>
-          The offset used to identify the code to which the template will be applied.
+          The offset used to identify the code to which the template will be
+          applied.
         </p>
       </field>
     </params>
@@ -2132,13 +2134,14 @@
       </field>
     </params>
     <result>
-      <field name="edits">
-        <list>
-          <ref>SourceEdit</ref>
-        </list>
+      <field name="edit">
+        <ref>SourceFileEdit</ref>
         <p>
-          The edit(s) to be applied in order to make the specified elements
-          accessible.
+          The edits to be applied in order to make the specified elements
+          accessible. The file to be edited will be the defining compilation
+          unit of the library containing the file specified in the request,
+          which can be different than the file specified in the request if the
+          specified file is a part file.
         </p>
       </field>
     </result>
@@ -2435,9 +2438,9 @@
     </tt>
   </p>
   <p>
-    The analysis server will send it's own analytics data (for example, operations
-    performed, operating system type, SDK version). No data (from the analysis
-    server or from clients) will be sent if analytics is disabled.
+    The analysis server will send it's own analytics data (for example,
+    operations performed, operating system type, SDK version). No data (from the
+    analysis server or from clients) will be sent if analytics is disabled.
   </p>
   <request method="isEnabled">
     <p>Query whether analytics is enabled.</p>
@@ -2451,10 +2454,11 @@
       The value of this flag can be changed by other tools outside of the
       analysis server's process. When you query the flag, you get the value of
       the flag at a given moment. Clients should not use the value returned to
-      decide whether or not to send the <tt>sendEvent</tt> and <tt>sendTiming</tt>
-      requests. Those requests should be used unconditionally and server will
-      determine whether or not it is appropriate to forward the information to
-      the cloud at the time each request is received.
+      decide whether or not to send the <tt>sendEvent</tt> and
+      <tt>sendTiming</tt> requests. Those requests should be used
+      unconditionally and server will determine whether or not it is appropriate
+      to forward the information to the cloud at the time each request is
+      received.
     </p>
     <result>
       <field name="enabled">
@@ -2528,6 +2532,54 @@
     </params>
   </request>
 </domain>
+<domain name="kythe" experimental="true">
+  <p>
+    The kythe domain contains APIs related to generating Dart content in the
+    <a href="http://kythe.io/">Kythe</a> format.
+  </p>
+  <request method="getKytheEntries">
+    <p>
+      Return the list of <tt>KytheEntry</tt> objects for some file, given the
+      current state of the file system populated by "analysis.updateContent".
+    </p>
+    <p>
+      If a request is made for a file that does not exist, or that is not
+      currently subject to analysis (e.g. because it is not associated with any
+      analysis root specified to analysis.setAnalysisRoots), an error of type
+      <tt>GET_KYTHE_ENTRIES_INVALID_FILE</tt> will be generated.
+    </p>
+    <params>
+      <field name="file">
+        <ref>FilePath</ref>
+        <p>
+          The file containing the code for which the Kythe Entry objects are
+          being requested.
+        </p>
+      </field>
+    </params>
+    <result>
+      <field name="entries">
+        <list>
+          <ref>KytheEntry</ref>
+        </list>
+        <p>
+          The list of <tt>KytheEntry</tt> objects for the queried file.
+        </p>
+      </field>
+      <field name="files">
+        <list>
+          <ref>FilePath</ref>
+        </list>
+        <p>
+          The set of files paths that were required, but not in the file system,
+          to give a complete and accurate Kythe graph for the file. This could
+          be due to a referenced file that does not exist or generated files not
+          being generated or passed before the call to "getKytheEntries".
+        </p>
+      </field>
+    </result>
+  </request>
+</domain>
 <types>
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
@@ -2671,10 +2723,11 @@
   </type>
   <type name="ClosingLabel">
     <p>
-      A label that is associated with a range of code that may be useful to render at the end
-      of the range to aid code readability. For example, a constructor call that spans multiple
-      lines may result in a closing label to allow the constructor type/name to be rendered
-      alongside the closing parenthesis.
+      A label that is associated with a range of code that may be useful to
+      render at the end of the range to aid code readability. For example, a
+      constructor call that spans multiple lines may result in a closing label
+      to allow the constructor type/name to be rendered alongside the closing
+      parenthesis.
     </p>
     <object>
       <field name="offset">
@@ -2692,7 +2745,8 @@
       <field name="label">
         <ref>String</ref>
         <p>
-          The label associated with this range that should be displayed to the user.
+          The label associated with this range that should be displayed to the
+          user.
         </p>
       </field>
     </object>
@@ -3059,7 +3113,8 @@
       <field name="example">
         <ref>String</ref>
         <p>
-          A short example of the transformation performed when the template is applied.
+          A short example of the transformation performed when the template is
+          applied.
         </p>
       </field>
     </object>
@@ -3177,6 +3232,13 @@
         </p>
       </value>
       <value>
+        <code>GET_KYTHE_ENTRIES_INVALID_FILE</code>
+        <p>
+          An "analysis.getKytheEntries" request specified a FilePath that does
+          not match a file that is currently subject to analysis.
+        </p>
+      </value>
+      <value>
         <code>GET_NAVIGATION_INVALID_FILE</code>
         <p>
           An "analysis.getNavigation" request specified a FilePath
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index fa6e341..ac5ec60 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -540,6 +540,9 @@
 
   @override
   void visitNotification(Notification notification) {
+    if (notification.experimental) {
+      return;
+    }
     dt('notification', () {
       anchor('notification_${notification.longEvent}', () {
         write(notification.longEvent);
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 68ca0db..150849b 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -49,6 +49,7 @@
   AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE,
   AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
   AnalysisOptionsWarningCode.UNSUPPORTED_VALUE,
+  AnalysisOptionsHintCode.DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index ba774ab..f7cc975 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -150,3 +150,31 @@
   @override
   ErrorType get type => ErrorType.STATIC_WARNING;
 }
+
+class AnalysisOptionsHintCode extends ErrorCode {
+  /**
+   * An error code indicating the analysis options file name is deprecated and
+   * the file should be renamed.
+   *
+   * Parameters:
+   * 0: the uri of the file which should be renamed
+   */
+  static const ErrorCode DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME =
+      const AnalysisOptionsHintCode(
+          'DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME',
+          "The name of the analysis options file {0} is deprecated;"
+          " consider renaming it to analysis_options.yaml.");
+
+  /**
+   * Initialize a newly created hint code to have the given [name].
+   */
+  const AnalysisOptionsHintCode(String name, String message,
+      [String correction])
+      : super(name, message, correction);
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
+
+  @override
+  ErrorType get type => ErrorType.HINT;
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 381ee24..7b98533 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -85,7 +85,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 38;
+  static const int DATA_VERSION = 40;
 
   /**
    * The number of exception contexts allowed to write. Once this field is
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 9dc5c7e5..fc3ee08 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -709,7 +709,7 @@
       if (initializer is ConstructorFieldInitializer) {
         Expression initializerExpression = initializer.expression;
         DartObjectImpl evaluationResult =
-            initializerExpression.accept(initializerVisitor);
+            initializerExpression?.accept(initializerVisitor);
         if (evaluationResult != null) {
           String fieldName = initializer.fieldName.name;
           if (fieldMap.containsKey(fieldName)) {
@@ -728,6 +728,9 @@
                   [evaluationResult.type, fieldName, field.type]);
             }
           }
+        } else {
+          errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
         }
       } else if (initializer is SuperConstructorInvocation) {
         SimpleIdentifier name = initializer.constructorName;
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 141099f..294bd16 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1530,8 +1530,10 @@
   void endLocalFunctionDeclaration(Token token) {
     debugEvent("LocalFunctionDeclaration");
     FunctionBody body = pop();
-    pop(); // constructor initializers
-    pop(); // separator before constructor initializers
+    if (isFullAst) {
+      pop(); // constructor initializers
+      pop(); // separator before constructor initializers
+    }
     FormalParameterList parameters = pop();
     SimpleIdentifier name = pop();
     TypeAnnotation returnType = pop();
@@ -1767,6 +1769,12 @@
         invocation?.argumentList));
   }
 
+  @override
+  void endMetadataStar(int count, bool forParameter) {
+    debugEvent("MetadataStar");
+    push(popList(count) ?? NullValue.Metadata);
+  }
+
   ParameterKind _toAnalyzerParameterKind(FormalParameterKind type) {
     if (type == FormalParameterKind.optionalPositional) {
       return ParameterKind.POSITIONAL;
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 52b6774..4b61a7c 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -9,8 +9,8 @@
 
 import 'dart:convert' as convert;
 
-import 'package:front_end/src/base/api_signature.dart' as api_sig;
-import 'package:front_end/src/base/flat_buffers.dart' as fb;
+import 'package:analyzer/src/summary/api_signature.dart' as api_sig;
+import 'package:analyzer/src/summary/flat_buffers.dart' as fb;
 
 import 'idl.dart' as idl;
 
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index fe9d6b1..2b2f585 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1434,6 +1434,11 @@
   @override
   final LinkedUnit _linkedUnit;
 
+  /**
+   * Set of slot ids corresponding to parameters that inherit `covariant`.
+   */
+  Set<int> parametersInheritingCovariant;
+
   List<EntityRef> _linkedTypeRefs;
 
   @override
@@ -1448,6 +1453,8 @@
       : _linkedUnit = linkedUnit,
         super(
             unlinkedUnit, unitNum, linkedUnit.references.length, absoluteUri) {
+    parametersInheritingCovariant =
+        _linkedUnit.parametersInheritingCovariant.toSet();
     // Make one pass through the linked types to determine the lengths for
     // _linkedTypeRefs and _linkedTypes.  TODO(paulberry): add an int to the
     // summary to make this unnecessary.
@@ -4297,6 +4304,12 @@
     if (_unlinkedParam.initializer?.bodyExpr != null) {
       _constNode = new ConstParameterNode(this);
     }
+    if (compilationUnit is CompilationUnitElementInDependency) {
+      _inheritsCovariant =
+          (compilationUnit as CompilationUnitElementInDependency)
+              .parametersInheritingCovariant
+              .contains(_unlinkedParam.inheritsCovariantSlot);
+    }
   }
 
   factory ParameterElementForLink.forFactory(
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 9e8c7d6..c586717 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -11,7 +11,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
 import 'package:analyzer/src/task/dart.dart';
@@ -369,15 +368,6 @@
   final List<PackageBundle> bundles = <PackageBundle>[];
 
   /**
-   * List of dependency information for the package bundles in this
-   * [SummaryDataStore], in a form that is ready to store in a newly generated
-   * summary.  Computing this information has nonzero cost, so it is only
-   * recorded if the [SummaryDataStore] is constructed with the argument
-   * `recordDependencies`.  Otherwise `null`.
-   */
-  final List<PackageDependencyInfoBuilder> dependencies;
-
-  /**
    * Map from the URI of a compilation unit to the unlinked summary of that
    * compilation unit.
    */
@@ -405,18 +395,13 @@
 
   /**
    * Create a [SummaryDataStore] and populate it with the summaries in
-   * [summaryPaths].  If [recordDependencyInfo] is `true`, record
-   * [PackageDependencyInfo] for each summary, for later access via
-   * [dependencies].
+   * [summaryPaths].
    */
   SummaryDataStore(Iterable<String> summaryPaths,
-      {bool recordDependencyInfo: false,
-      bool disallowOverlappingSummaries: false,
+      {bool disallowOverlappingSummaries: false,
       ResourceProvider resourceProvider})
       : _summaryPaths = summaryPaths,
-        _disallowOverlappingSummaries = disallowOverlappingSummaries,
-        dependencies =
-            recordDependencyInfo ? <PackageDependencyInfoBuilder>[] : null {
+        _disallowOverlappingSummaries = disallowOverlappingSummaries {
     summaryPaths.forEach((String path) => _fillMaps(path, resourceProvider));
   }
 
@@ -425,29 +410,6 @@
    */
   void addBundle(String path, PackageBundle bundle) {
     bundles.add(bundle);
-    if (dependencies != null) {
-      Set<String> includedPackageNames = new Set<String>();
-      bool includesDartUris = false;
-      bool includesFileUris = false;
-      for (String uriString in bundle.unlinkedUnitUris) {
-        Uri uri = Uri.parse(uriString);
-        String scheme = uri.scheme;
-        if (scheme == 'package') {
-          List<String> pathSegments = uri.pathSegments;
-          includedPackageNames.add(pathSegments.isEmpty ? '' : pathSegments[0]);
-        } else if (scheme == 'file') {
-          includesFileUris = true;
-        } else if (scheme == 'dart') {
-          includesDartUris = true;
-        }
-      }
-      dependencies.add(new PackageDependencyInfoBuilder(
-          includedPackageNames: includedPackageNames.toList()..sort(),
-          includesDartUris: includesDartUris,
-          includesFileUris: includesFileUris,
-          apiSignature: bundle.apiSignature,
-          summaryPath: path));
-    }
     for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
       String uri = bundle.unlinkedUnitUris[i];
       if (_disallowOverlappingSummaries &&
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index eaeede2..169e3af 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:convert/convert.dart';
 import 'package:crypto/crypto.dart';
 import 'package:front_end/src/base/api_signature.dart';
@@ -43,8 +42,6 @@
   final Map<String, UnlinkedUnitBuilder> _unlinkedUnitMap =
       <String, UnlinkedUnitBuilder>{};
   final List<String> _unlinkedUnitHashes;
-  final List<PackageDependencyInfoBuilder> _dependencies =
-      <PackageDependencyInfoBuilder>[];
   final bool _excludeHashes;
 
   /**
@@ -85,19 +82,10 @@
         unlinkedUnitHashes: _unlinkedUnitHashes,
         majorVersion: currentMajorVersion,
         minorVersion: currentMinorVersion,
-        dependencies: _dependencies,
         apiSignature: _computeApiSignature());
   }
 
   /**
-   * Use the dependency information in [summaryDataStore] to populate the
-   * dependencies in the package bundle being assembled.
-   */
-  void recordDependencies(SummaryDataStore summaryDataStore) {
-    _dependencies.addAll(summaryDataStore.dependencies);
-  }
-
-  /**
    * Compute the API signature for this package bundle.
    */
   String _computeApiSignature() {
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 4834344..02047f8 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -411,6 +411,14 @@
   List<AnalysisError> validate(Map<String, YamlNode> options) {
     RecordingErrorListener recorder = new RecordingErrorListener();
     ErrorReporter reporter = new ErrorReporter(recorder, source);
+    if (AnalysisEngine.ANALYSIS_OPTIONS_FILE == source.shortName) {
+      reporter.reportError(new AnalysisError(
+          source,
+          0, // offset
+          1, // length
+          AnalysisOptionsHintCode.DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME,
+          [source.shortName]));
+    }
     _validators.forEach((OptionsValidator v) => v.validate(reporter, options));
     return recorder.errors;
   }
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 568a598..e09f6af 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -913,13 +913,20 @@
       var expectedType = member.returnType;
 
       if (!rules.isSubtypeOf(memberLowerBound.returnType, expectedType)) {
-        if (node is MethodInvocation && member is! MethodElement) {
-          // If `o.m` is not a method, we need to cast `o.m` before the call:
-          // `(o.m as expectedType)(args)`.
+        var isMethod = member is MethodElement;
+        var isCall = node is MethodInvocation;
+
+        if (isMethod && !isCall) {
+          // If `o.m` is a method tearoff, cast to the method type.
+          setImplicitCast(node, member.type);
+        } else if (!isMethod && isCall) {
+          // If `o.g()` is calling a field/getter `g`, we need to cast `o.g`
+          // before the call: `(o.g as expectedType)(args)`.
           // This cannot be represented by an `as` node without changing the
           // Dart AST structure, so we record it as a special cast.
           setImplicitOperationCast(node, expectedType);
         } else {
+          // For method calls `o.m()` or getters `o.g`, simply cast the result.
           setImplicitCast(node, expectedType);
         }
         _hasImplicitCasts = true;
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index d8b1513..5158c90 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -881,6 +881,21 @@
     verify([source]);
   }
 
+  test_const_invalid_constructorFieldInitializer_fromLibrary() async {
+    addNamedSource('/lib.dart', r'''
+class A<T> {
+  final int f;
+  const A() : f = T.foo;
+}
+''');
+    Source source = addSource(r'''
+import 'lib.dart';
+const a = const A();
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+  }
+
   test_constConstructor_redirect_generic() async {
     Source source = addSource(r'''
 class A<T> {
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 76d0fd2..0a53f95 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -79,6 +79,19 @@
 
 @reflectiveTest
 class LineInfoTest extends EngineTestCase {
+  void test_translate_missing_closing_gt_error() {
+    // Ensure that the UnmatchedToken error for missing '>' is translated
+    // to the correct analyzer error code.
+    // See https://github.com/dart-lang/sdk/issues/30320
+    String source = '<!-- @Component(';
+    GatheringErrorListener listener = new GatheringErrorListener();
+    _scanWithListener(source, listener);
+    listener.assertErrorsWithCodes(const [
+      ScannerErrorCode.EXPECTED_TOKEN,
+      ScannerErrorCode.EXPECTED_TOKEN,
+    ]);
+  }
+
   void test_lineInfo_multilineComment() {
     String source = "/*\r\n *\r\n */";
     _assertLineInfo(source, [
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 3a768df..0ad9f69 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -207,9 +207,6 @@
 import "a.dart";
 var y = x;
 ''', path: '/b.dart');
-    expect(bundle2.dependencies, hasLength(1));
-    expect(bundle2.dependencies[0].summaryPath, '/a.ds');
-    expect(bundle2.dependencies[0].apiSignature, bundle1.apiSignature);
     addBundle('/a.ds', bundle1);
     addBundle('/b.ds', bundle2);
     createLinker('''
@@ -644,6 +641,37 @@
         'int');
   }
 
+  void test_inheritsCovariant_fromBundle() {
+    var bundle = createPackageBundle('''
+class X1 {}
+class X2 extends X1 {}
+class A {
+  void foo(covariant X1 x) {}
+}
+class B extends A {
+  void foo(X2 x) {}
+}
+''', path: '/a.dart');
+    addBundle('/a.ds', bundle);
+
+    // C.foo.x must inherit covariance from B.foo.x, even though it is
+    // resynthesized from the bundle.
+    createLinker('''
+import 'a.dart';
+class C extends B {
+  void foo(X2 x) {}
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+
+    ClassElementForLink_Class C = library.getContainedName('C');
+    expect(C.methods, hasLength(1));
+    MethodElementForLink foo = C.methods[0];
+    expect(foo.parameters, hasLength(1));
+    expect(foo.parameters[0].isCovariant, isTrue);
+  }
+
   void test_instantiate_param_of_param_to_bounds() {
     createLinker('''
 class C<T> {}
diff --git a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
index 6f76030..73266b9 100644
--- a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
+++ b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
@@ -153,8 +153,8 @@
 
 @reflectiveTest
 class SummaryDataStoreTest {
-  SummaryDataStore dataStore = new SummaryDataStore(<String>[],
-      recordDependencyInfo: true, disallowOverlappingSummaries: true);
+  SummaryDataStore dataStore =
+      new SummaryDataStore(<String>[], disallowOverlappingSummaries: true);
 
   PackageBundle bundle1 = new _PackageBundleMock();
   PackageBundle bundle2 = new _PackageBundleMock();
@@ -170,16 +170,6 @@
 
   test_addBundle() {
     expect(dataStore.bundles, unorderedEquals([bundle1, bundle2]));
-    expect(dataStore.dependencies[0].summaryPath, '/p1.ds');
-    expect(dataStore.dependencies[0].apiSignature, 'signature1');
-    expect(dataStore.dependencies[0].includedPackageNames, ['p1']);
-    expect(dataStore.dependencies[0].includesFileUris, false);
-    expect(dataStore.dependencies[0].includesDartUris, false);
-    expect(dataStore.dependencies[1].summaryPath, '/p2.ds');
-    expect(dataStore.dependencies[1].apiSignature, 'signature2');
-    expect(dataStore.dependencies[1].includedPackageNames, ['p2']);
-    expect(dataStore.dependencies[1].includesFileUris, false);
-    expect(dataStore.dependencies[1].includesDartUris, false);
     expect(dataStore.uriToSummaryPath,
         containsPair('package:p1/u1.dart', '/p1.ds'));
     // unlinkedMap
@@ -206,9 +196,6 @@
     when(bundle.linkedLibraries).thenReturn(<LinkedLibrary>[linkedLibrary1]);
     when(bundle.apiSignature).thenReturn('signature');
     dataStore.addBundle('/p3.ds', bundle);
-    expect(dataStore.dependencies.last.includedPackageNames, []);
-    expect(dataStore.dependencies.last.includesFileUris, false);
-    expect(dataStore.dependencies.last.includesDartUris, true);
   }
 
   test_addBundle_fileUris() {
@@ -219,9 +206,6 @@
     when(bundle.linkedLibraries).thenReturn(<LinkedLibrary>[linkedLibrary1]);
     when(bundle.apiSignature).thenReturn('signature');
     dataStore.addBundle('/p3.ds', bundle);
-    expect(dataStore.dependencies.last.includedPackageNames, []);
-    expect(dataStore.dependencies.last.includesFileUris, true);
-    expect(dataStore.dependencies.last.includesDartUris, false);
   }
 
   test_addBundle_multiProject() {
@@ -238,12 +222,11 @@
     // p3 conflicts (overlaps) with existing summaries.
     expect(() => dataStore.addBundle('/p3.ds', bundle),
         throwsA(isConflictingSummaryException));
-    expect(dataStore.dependencies.last.includedPackageNames, ['p1', 'p2']);
   }
 
   test_addBundle_multiProjectOverlap() {
-    SummaryDataStore dataStore2 = new SummaryDataStore(<String>[],
-        recordDependencyInfo: true, disallowOverlappingSummaries: false);
+    SummaryDataStore dataStore2 =
+        new SummaryDataStore(<String>[], disallowOverlappingSummaries: false);
     _setupDataStore(dataStore2);
 
     PackageBundle bundle = new _PackageBundleMock();
@@ -258,7 +241,6 @@
     when(bundle.apiSignature).thenReturn('signature');
     // p3 conflicts (overlaps) with existing summaries, but now allowed.
     dataStore2.addBundle('/p3.ds', bundle);
-    expect(dataStore2.dependencies.last.includedPackageNames, ['p1', 'p2']);
   }
 
   test_getContainingLibraryUris_libraryUri() {
diff --git a/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart b/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart
index cc085ff..68d43e0 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart
@@ -135,13 +135,6 @@
 
   @failingTest
   @fastaProblem
-  test_closure_generic() async {
-    // https://github.com/dart-lang/sdk/issues/30265
-    await super.test_closure_generic();
-  }
-
-  @failingTest
-  @fastaProblem
   test_const_invalid_field_const() async {
     // Fasta generates additional `#errors` top-level variable.
     await super.test_const_invalid_field_const();
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
index 433f4da..8735602 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
@@ -290,7 +290,6 @@
   PackageBundleBuilder createPackageBundle(String text,
       {String path: '/test.dart', String uri}) {
     PackageBundleAssembler assembler = new PackageBundleAssembler();
-    assembler.recordDependencies(_filesToLink.summaryDataStore);
     LinkerInputs linkerInputs = createLinkerInputs(text, path: path, uri: uri);
     Map<String, LinkedLibraryBuilder> linkedLibraries = link(
         linkerInputs.linkedLibraries,
@@ -338,6 +337,5 @@
   /**
    * Information about summaries to be included in the link process.
    */
-  SummaryDataStore summaryDataStore =
-      new SummaryDataStore([], recordDependencyInfo: true);
+  SummaryDataStore summaryDataStore = new SummaryDataStore([]);
 }
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index d88e099..fd5060e 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -296,19 +296,44 @@
 }
 
 @reflectiveTest
-class GenerateNewOptionsErrorsTaskTest extends GenerateOptionsErrorsTaskTest {
-  String get optionsFilePath => '/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}';
+class GenerateOldOptionsErrorsTaskTest extends AbstractContextTest {
+  final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
+
+  String get optionsFilePath => '/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}';
+
+  test_does_analyze_old_options_files() {
+    validate('''
+analyzer:
+  strong-mode: true
+    ''', [AnalysisOptionsHintCode.DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME]);
+  }
+
+  test_finds_issues_in_old_options_files() {
+    validate('''
+analyzer:
+  strong_mode: true
+    ''', [
+      AnalysisOptionsHintCode.DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME,
+      AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES
+    ]);
+  }
+
+  void validate(String content, List<ErrorCode> expected) {
+    final Source source = newSource(optionsFilePath, content);
+    var options = optionsProvider.getOptionsFromSource(source);
+    final OptionsFileValidator validator = new OptionsFileValidator(source);
+    var errors = validator.validate(options);
+    expect(errors.map((AnalysisError e) => e.errorCode),
+        unorderedEquals(expected));
+  }
 }
 
 @reflectiveTest
-class GenerateOldOptionsErrorsTaskTest extends GenerateOptionsErrorsTaskTest {
-  String get optionsFilePath => '/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}';
-}
-
-abstract class GenerateOptionsErrorsTaskTest extends AbstractContextTest {
+class GenerateNewOptionsErrorsTaskTest extends AbstractContextTest {
   Source source;
 
-  String get optionsFilePath;
+  String get optionsFilePath => '/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}';
+
   LineInfo lineInfo(String source) =>
       GenerateOptionsErrorsTask.computeLineInfo(source);
 
diff --git a/pkg/analyzer/tool/generate_files b/pkg/analyzer/tool/generate_files
index 4f0ea0d..39bb928 100755
--- a/pkg/analyzer/tool/generate_files
+++ b/pkg/analyzer/tool/generate_files
@@ -24,27 +24,23 @@
 
 ROOT_DIR="$(cd "${SCRIPT_DIR}/../../.." ; pwd -P)"
 
-BIN_DIR="${ROOT_DIR}/sdk/bin"
-
 if [ -z "$DART_CONFIGURATION" ];
 then
-  DART_CONFIGURATION="ReleaseIA32"
+  DART_CONFIGURATION="ReleaseX64"
 fi
 
 if [[ `uname` == 'Darwin' ]];
 then
-  BUILD_DIR="${ROOT_DIR}/xcodebuild/$DART_CONFIGURATION"
+  BIN_DIR="${ROOT_DIR}/xcodebuild/$DART_CONFIGURATION/dart-sdk/bin"
 else
-  BUILD_DIR="${ROOT_DIR}/out/$DART_CONFIGURATION"
+  BIN_DIR="${ROOT_DIR}/out/$DART_CONFIGURATION/dart-sdk/bin"
 fi
 
-PKG_DIR="${BUILD_DIR}/packages"
-
 DART="${BIN_DIR}/dart"
 
 declare -a VM_OPTIONS
 VM_OPTIONS+=("--checked")
-VM_OPTIONS+=("--package-root=${PKG_DIR}")
+VM_OPTIONS+=("--packages=${ROOT_DIR}/.packages")
 
 cd "${SCRIPT_DIR}"
 "${DART}" "${VM_OPTIONS[@]}" "task_dependency_graph/generate.dart"
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index cb6a97c..aa7afd4 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -36,12 +36,13 @@
  * Persistent Bazel worker.
  */
 class AnalyzerWorkerLoop extends AsyncWorkerLoop {
+  final ResourceProvider resourceProvider;
+  final PerformanceLog logger = new PerformanceLog(null);
+  final String dartSdkPath;
+
   final StringBuffer errorBuffer = new StringBuffer();
   final StringBuffer outBuffer = new StringBuffer();
 
-  final ResourceProvider resourceProvider;
-  final String dartSdkPath;
-
   AnalyzerWorkerLoop(this.resourceProvider, AsyncWorkerConnection connection,
       {this.dartSdkPath})
       : super(connection: connection);
@@ -58,8 +59,9 @@
    * Performs analysis with given [options].
    */
   Future<Null> analyze(CommandLineOptions options) async {
-    var buildMode =
-        new BuildMode(resourceProvider, options, new AnalysisStats());
+    var buildMode = new BuildMode(
+        resourceProvider, options, new AnalysisStats(),
+        logger: logger);
     await buildMode.analyze();
     AnalysisEngine.instance.clearCaches();
   }
@@ -69,34 +71,36 @@
    */
   @override
   Future<WorkResponse> performRequest(WorkRequest request) async {
-    errorBuffer.clear();
-    outBuffer.clear();
-    try {
-      // Add in the dart-sdk argument if `dartSdkPath` is not null, otherwise it
-      // will try to find the currently installed sdk.
-      var arguments = new List<String>.from(request.arguments);
-      if (dartSdkPath != null &&
-          !arguments.any((arg) => arg.startsWith('--dart-sdk'))) {
-        arguments.add('--dart-sdk=$dartSdkPath');
+    return logger.run('Perform request', () async {
+      errorBuffer.clear();
+      outBuffer.clear();
+      try {
+        // Add in the dart-sdk argument if `dartSdkPath` is not null,
+        // otherwise it will try to find the currently installed sdk.
+        var arguments = request.arguments.toList();
+        if (dartSdkPath != null &&
+            !arguments.any((arg) => arg.startsWith('--dart-sdk'))) {
+          arguments.add('--dart-sdk=$dartSdkPath');
+        }
+        // Prepare options.
+        CommandLineOptions options =
+            CommandLineOptions.parse(arguments, printAndFail: (String msg) {
+          throw new ArgumentError(msg);
+        });
+        // Analyze and respond.
+        await analyze(options);
+        String msg = _getErrorOutputBuffersText();
+        return new WorkResponse()
+          ..exitCode = EXIT_CODE_OK
+          ..output = msg;
+      } catch (e, st) {
+        String msg = _getErrorOutputBuffersText();
+        msg += '$e\n$st';
+        return new WorkResponse()
+          ..exitCode = EXIT_CODE_ERROR
+          ..output = msg;
       }
-      // Prepare options.
-      CommandLineOptions options =
-          CommandLineOptions.parse(arguments, printAndFail: (String msg) {
-        throw new ArgumentError(msg);
-      });
-      // Analyze and respond.
-      await analyze(options);
-      String msg = _getErrorOutputBuffersText();
-      return new WorkResponse()
-        ..exitCode = EXIT_CODE_OK
-        ..output = msg;
-    } catch (e, st) {
-      String msg = _getErrorOutputBuffersText();
-      msg += '$e\n$st';
-      return new WorkResponse()
-        ..exitCode = EXIT_CODE_ERROR
-        ..output = msg;
-    }
+    });
   }
 
   /**
@@ -131,19 +135,23 @@
   final ResourceProvider resourceProvider;
   final CommandLineOptions options;
   final AnalysisStats stats;
+  final PerformanceLog logger;
 
   SummaryDataStore summaryDataStore;
   AnalysisOptions analysisOptions;
-  AnalysisDriver analysisDriver;
   Map<Uri, File> uriToFileMap;
   final List<Source> explicitSources = <Source>[];
   final List<PackageBundle> unlinkedBundles = <PackageBundle>[];
 
+  AnalysisDriver analysisDriver;
+
   PackageBundleAssembler assembler;
   final Set<Source> processedSources = new Set<Source>();
   final Map<String, UnlinkedUnit> uriToUnit = <String, UnlinkedUnit>{};
 
-  BuildMode(this.resourceProvider, this.options, this.stats);
+  BuildMode(this.resourceProvider, this.options, this.stats,
+      {PerformanceLog logger})
+      : logger = logger ?? new PerformanceLog(null);
 
   bool get _shouldOutputSummary =>
       options.buildSummaryOutput != null ||
@@ -153,91 +161,100 @@
    * Perform package analysis according to the given [options].
    */
   Future<ErrorSeverity> analyze() async {
-    // Write initial progress message.
-    if (!options.machineFormat) {
-      outSink.writeln("Analyzing ${options.sourceFiles.join(', ')}...");
-    }
+    return await logger.runAsync('Analyze', () async {
+      // Write initial progress message.
+      if (!options.machineFormat) {
+        outSink.writeln("Analyzing ${options.sourceFiles.join(', ')}...");
+      }
 
-    // Create the URI to file map.
-    uriToFileMap = _createUriToFileMap(options.sourceFiles);
-    if (uriToFileMap == null) {
-      io.exitCode = ErrorSeverity.ERROR.ordinal;
-      return ErrorSeverity.ERROR;
-    }
-
-    // BuildMode expects sourceFiles in the format "<uri>|<filepath>",
-    // but the rest of the code base does not understand this format.
-    // Rewrite sourceFiles, stripping the "<uri>|" prefix, so that it
-    // does not cause problems with code that does not expect this format.
-    options.rewriteSourceFiles(options.sourceFiles
-        .map((String uriPipePath) =>
-            uriPipePath.substring(uriPipePath.indexOf('|') + 1))
-        .toList());
-
-    // Prepare the analysis driver.
-    try {
-      _createAnalysisDriver();
-    } on ConflictingSummaryException catch (e) {
-      errorSink.writeln('$e');
-      io.exitCode = ErrorSeverity.ERROR.ordinal;
-      return ErrorSeverity.ERROR;
-    }
-
-    // Add sources.
-    for (Uri uri in uriToFileMap.keys) {
-      File file = uriToFileMap[uri];
-      if (!file.exists) {
-        errorSink.writeln('File not found: ${file.path}');
+      // Create the URI to file map.
+      uriToFileMap = _createUriToFileMap(options.sourceFiles);
+      if (uriToFileMap == null) {
         io.exitCode = ErrorSeverity.ERROR.ordinal;
         return ErrorSeverity.ERROR;
       }
-      Source source = new FileSource(file, uri);
-      explicitSources.add(source);
-    }
 
-    // Write summary.
-    assembler = new PackageBundleAssembler();
-    if (_shouldOutputSummary) {
-      // Prepare all unlinked units.
-      for (var src in explicitSources) {
-        await _prepareUnlinkedUnit('${src.uri}');
+      // BuildMode expects sourceFiles in the format "<uri>|<filepath>",
+      // but the rest of the code base does not understand this format.
+      // Rewrite sourceFiles, stripping the "<uri>|" prefix, so that it
+      // does not cause problems with code that does not expect this format.
+      options.rewriteSourceFiles(options.sourceFiles
+          .map((String uriPipePath) =>
+              uriPipePath.substring(uriPipePath.indexOf('|') + 1))
+          .toList());
+
+      // Prepare the analysis driver.
+      try {
+        logger.run('Prepare analysis driver', () {
+          _createAnalysisDriver();
+        });
+      } on ConflictingSummaryException catch (e) {
+        errorSink.writeln('$e');
+        io.exitCode = ErrorSeverity.ERROR.ordinal;
+        return ErrorSeverity.ERROR;
       }
 
-      // Build and assemble linked libraries.
-      if (!options.buildSummaryOnlyUnlinked) {
-        // Prepare URIs of unlinked units that should be linked.
-        var unlinkedUris = new Set<String>();
-        for (var bundle in unlinkedBundles) {
-          unlinkedUris.addAll(bundle.unlinkedUnitUris);
+      // Add sources.
+      for (Uri uri in uriToFileMap.keys) {
+        File file = uriToFileMap[uri];
+        if (!file.exists) {
+          errorSink.writeln('File not found: ${file.path}');
+          io.exitCode = ErrorSeverity.ERROR.ordinal;
+          return ErrorSeverity.ERROR;
         }
-        for (var src in explicitSources) {
-          unlinkedUris.add('${src.uri}');
-        }
-        // Perform linking.
-        _computeLinkedLibraries(unlinkedUris);
-        assembler.recordDependencies(summaryDataStore);
+        Source source = new FileSource(file, uri);
+        explicitSources.add(source);
       }
 
-      // Write the whole package bundle.
-      PackageBundleBuilder bundle = assembler.assemble();
-      if (options.buildSummaryOutput != null) {
-        io.File file = new io.File(options.buildSummaryOutput);
-        file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
-      }
-      if (options.buildSummaryOutputSemantic != null) {
-        bundle.flushInformative();
-        io.File file = new io.File(options.buildSummaryOutputSemantic);
-        file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
-      }
-    }
+      // Write summary.
+      assembler = new PackageBundleAssembler();
+      if (_shouldOutputSummary) {
+        await logger.runAsync('Build and write output summary', () async {
+          // Prepare all unlinked units.
+          await logger.runAsync('Prepare unlinked units', () async {
+            for (var src in explicitSources) {
+              await _prepareUnlinkedUnit('${src.uri}');
+            }
+          });
 
-    if (options.buildSummaryOnly) {
-      return ErrorSeverity.NONE;
-    } else {
-      // Process errors.
-      await _printErrors(outputPath: options.buildAnalysisOutput);
-      return await _computeMaxSeverity();
-    }
+          // Build and assemble linked libraries.
+          if (!options.buildSummaryOnlyUnlinked) {
+            // Prepare URIs of unlinked units that should be linked.
+            var unlinkedUris = new Set<String>();
+            for (var bundle in unlinkedBundles) {
+              unlinkedUris.addAll(bundle.unlinkedUnitUris);
+            }
+            for (var src in explicitSources) {
+              unlinkedUris.add('${src.uri}');
+            }
+            // Perform linking.
+            _computeLinkedLibraries(unlinkedUris);
+          }
+
+          // Write the whole package bundle.
+          PackageBundleBuilder bundle = assembler.assemble();
+          if (options.buildSummaryOutput != null) {
+            io.File file = new io.File(options.buildSummaryOutput);
+            file.writeAsBytesSync(bundle.toBuffer(),
+                mode: io.FileMode.WRITE_ONLY);
+          }
+          if (options.buildSummaryOutputSemantic != null) {
+            bundle.flushInformative();
+            io.File file = new io.File(options.buildSummaryOutputSemantic);
+            file.writeAsBytesSync(bundle.toBuffer(),
+                mode: io.FileMode.WRITE_ONLY);
+          }
+        });
+      }
+
+      if (options.buildSummaryOnly) {
+        return ErrorSeverity.NONE;
+      } else {
+        // Process errors.
+        await _printErrors(outputPath: options.buildAnalysisOutput);
+        return await _computeMaxSeverity();
+      }
+    });
   }
 
   /**
@@ -246,19 +263,21 @@
    * add them to  the [assembler].
    */
   void _computeLinkedLibraries(Set<String> libraryUris) {
-    LinkedLibrary getDependency(String absoluteUri) =>
-        summaryDataStore.linkedMap[absoluteUri];
+    logger.run('Link output summary', () {
+      LinkedLibrary getDependency(String absoluteUri) =>
+          summaryDataStore.linkedMap[absoluteUri];
 
-    UnlinkedUnit getUnit(String absoluteUri) =>
-        summaryDataStore.unlinkedMap[absoluteUri] ?? uriToUnit[absoluteUri];
+      UnlinkedUnit getUnit(String absoluteUri) =>
+          summaryDataStore.unlinkedMap[absoluteUri] ?? uriToUnit[absoluteUri];
 
-    Map<String, LinkedLibraryBuilder> linkResult = link(
-        libraryUris,
-        getDependency,
-        getUnit,
-        analysisDriver.declaredVariables.get,
-        options.strongMode);
-    linkResult.forEach(assembler.addLinkedLibrary);
+      Map<String, LinkedLibraryBuilder> linkResult = link(
+          libraryUris,
+          getDependency,
+          getUnit,
+          analysisDriver.declaredVariables.get,
+          options.strongMode);
+      linkResult.forEach(assembler.addLinkedLibrary);
+    });
   }
 
   Future<ErrorSeverity> _computeMaxSeverity() async {
@@ -280,8 +299,7 @@
 
   void _createAnalysisDriver() {
     // Read the summaries.
-    summaryDataStore = new SummaryDataStore(<String>[],
-        recordDependencyInfo: _shouldOutputSummary);
+    summaryDataStore = new SummaryDataStore(<String>[]);
 
     // Adds a bundle at `path` to `summaryDataStore`.
     PackageBundle addBundle(String path) {
@@ -291,48 +309,56 @@
       return bundle;
     }
 
-    for (var path in options.buildSummaryInputs) {
-      var bundle = addBundle(path);
-      if (bundle.linkedLibraryUris.isEmpty &&
-          bundle.unlinkedUnitUris.isNotEmpty) {
-        throw new ArgumentError(
-            'Got an unlinked summary for --build-summary-input at `$path`. '
-            'Unlinked summaries should be provided with the '
-            '--build-summary-unlinked-input argument.');
+    int numInputs = options.buildSummaryInputs.length +
+        options.buildSummaryUnlinkedInputs.length;
+    logger.run('Add $numInputs input summaries', () {
+      for (var path in options.buildSummaryInputs) {
+        var bundle = addBundle(path);
+        if (bundle.linkedLibraryUris.isEmpty &&
+            bundle.unlinkedUnitUris.isNotEmpty) {
+          throw new ArgumentError(
+              'Got an unlinked summary for --build-summary-input at `$path`. '
+              'Unlinked summaries should be provided with the '
+              '--build-summary-unlinked-input argument.');
+        }
       }
-    }
 
-    for (var path in options.buildSummaryUnlinkedInputs) {
-      var bundle = addBundle(path);
-      unlinkedBundles.add(bundle);
-      if (bundle.linkedLibraryUris.isNotEmpty) {
-        throw new ArgumentError(
-            'Got a linked summary for --build-summary-input-unlinked at `$path`'
-            '. Linked bundles should be provided with the '
-            '--build-summary-input argument.');
+      for (var path in options.buildSummaryUnlinkedInputs) {
+        var bundle = addBundle(path);
+        unlinkedBundles.add(bundle);
+        if (bundle.linkedLibraryUris.isNotEmpty) {
+          throw new ArgumentError(
+              'Got a linked summary for --build-summary-input-unlinked at `$path`'
+              '. Linked bundles should be provided with the '
+              '--build-summary-input argument.');
+        }
       }
-    }
+    });
 
     DartSdk sdk;
-    PackageBundle sdkBundle;
-    if (options.dartSdkSummaryPath != null) {
-      SummaryBasedDartSdk summarySdk = new SummaryBasedDartSdk(
-          options.dartSdkSummaryPath, options.strongMode);
-      sdk = summarySdk;
-      sdkBundle = summarySdk.bundle;
-    } else {
-      FolderBasedDartSdk dartSdk = new FolderBasedDartSdk(resourceProvider,
-          resourceProvider.getFolder(options.dartSdkPath), options.strongMode);
-      dartSdk.analysisOptions =
-          Driver.createAnalysisOptionsForCommandLineOptions(
-              resourceProvider, options);
-      dartSdk.useSummary = !options.buildSummaryOnly;
-      sdk = dartSdk;
-      sdkBundle = dartSdk.getSummarySdkBundle(options.strongMode);
-    }
+    logger.run('Add SDK bundle', () {
+      PackageBundle sdkBundle;
+      if (options.dartSdkSummaryPath != null) {
+        SummaryBasedDartSdk summarySdk = new SummaryBasedDartSdk(
+            options.dartSdkSummaryPath, options.strongMode);
+        sdk = summarySdk;
+        sdkBundle = summarySdk.bundle;
+      } else {
+        FolderBasedDartSdk dartSdk = new FolderBasedDartSdk(
+            resourceProvider,
+            resourceProvider.getFolder(options.dartSdkPath),
+            options.strongMode);
+        dartSdk.analysisOptions =
+            Driver.createAnalysisOptionsForCommandLineOptions(
+                resourceProvider, options);
+        dartSdk.useSummary = !options.buildSummaryOnly;
+        sdk = dartSdk;
+        sdkBundle = dartSdk.getSummarySdkBundle(options.strongMode);
+      }
 
-    // Include SDK bundle to avoid parsing SDK sources.
-    summaryDataStore.addBundle(null, sdkBundle);
+      // Include SDK bundle to avoid parsing SDK sources.
+      summaryDataStore.addBundle(null, sdkBundle);
+    });
 
     var sourceFactory = new SourceFactory(<UriResolver>[
       new DartUriResolver(sdk),
@@ -343,7 +369,6 @@
     analysisOptions = Driver.createAnalysisOptionsForCommandLineOptions(
         resourceProvider, options);
 
-    PerformanceLog logger = new PerformanceLog(null);
     AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger);
     analysisDriver = new AnalysisDriver(
         scheduler,
@@ -413,29 +438,32 @@
    * is sent to a new file at that path.
    */
   Future<Null> _printErrors({String outputPath}) async {
-    StringBuffer buffer = new StringBuffer();
-    var severityProcessor = (AnalysisError error) =>
-        determineProcessedSeverity(error, options, analysisOptions);
-    ErrorFormatter formatter = options.machineFormat
-        ? new MachineErrorFormatter(buffer, options, stats,
-            severityProcessor: severityProcessor)
-        : new HumanErrorFormatter(buffer, options, stats,
-            severityProcessor: severityProcessor);
-    for (Source source in explicitSources) {
-      var result = await analysisDriver.getErrors(source.fullName);
-      var errorInfo = new AnalysisErrorInfoImpl(result.errors, result.lineInfo);
-      formatter.formatErrors([errorInfo]);
-    }
-    formatter.flush();
-    if (!options.machineFormat) {
-      stats.print(buffer);
-    }
-    if (outputPath == null) {
-      StringSink sink = options.machineFormat ? errorSink : outSink;
-      sink.write(buffer);
-    } else {
-      new io.File(outputPath).writeAsStringSync(buffer.toString());
-    }
+    await logger.runAsync('Compute and print analysis errors', () async {
+      StringBuffer buffer = new StringBuffer();
+      var severityProcessor = (AnalysisError error) =>
+          determineProcessedSeverity(error, options, analysisOptions);
+      ErrorFormatter formatter = options.machineFormat
+          ? new MachineErrorFormatter(buffer, options, stats,
+              severityProcessor: severityProcessor)
+          : new HumanErrorFormatter(buffer, options, stats,
+              severityProcessor: severityProcessor);
+      for (Source source in explicitSources) {
+        var result = await analysisDriver.getErrors(source.fullName);
+        var errorInfo =
+            new AnalysisErrorInfoImpl(result.errors, result.lineInfo);
+        formatter.formatErrors([errorInfo]);
+      }
+      formatter.flush();
+      if (!options.machineFormat) {
+        stats.print(buffer);
+      }
+      if (outputPath == null) {
+        StringSink sink = options.machineFormat ? errorSink : outSink;
+        sink.write(buffer);
+      } else {
+        new io.File(outputPath).writeAsStringSync(buffer.toString());
+      }
+    });
   }
 }
 
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index 1b03435..815f376 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -825,6 +825,7 @@
         </p>
       </dd></dl></dd></dl>
 
+
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
     This section contains descriptions of the data types referenced in the API’s
@@ -1466,6 +1467,79 @@
       </dd><dt class="value">VALID_STRING_ESCAPE</dt><dd>
         
         <p>Only for version 2 of highlight.</p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_KytheEntry">KytheEntry: object</a></dt><dd>
+    <p>
+      This object matches the format and documentation of the Entry object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_entry">Kythe Storage
+        Model</a>.
+    </p>
+    
+  <dl><dt class="field"><b>source: <a href="#type_KytheVName">KytheVName</a></b></dt><dd>
+        
+        <p>
+          The ticket of the source node (must not be empty).
+        </p>
+      </dd><dt class="field"><b>kind: String</b></dt><dd>
+        
+        <p>
+          An edge label (may be empty). The schema defines which labels are
+          meaningful.
+        </p>
+      </dd><dt class="field"><b>target: <a href="#type_KytheVName">KytheVName</a></b></dt><dd>
+        
+        <p>
+          The ticket of the target node (may be empty).
+        </p>
+      </dd><dt class="field"><b>fact: String</b></dt><dd>
+        
+        <p>
+          A fact label (must not be empty). The schema defines which fact labels
+          are meaningful.
+        </p>
+      </dd><dt class="field"><b>value: List&lt;int&gt;</b></dt><dd>
+        
+        <p>
+          The <tt>String</tt> value of the fact (may be empty).
+        </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_KytheVName">KytheVName: object</a></dt><dd>
+    <p>
+      This object matches the format and documentation of the Vector-Name object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_a_id_termvname_a_vector_name_strong_vname_strong">Kythe
+        Storage Model</a>.
+    </p>
+    
+  <dl><dt class="field"><b>signature: String</b></dt><dd>
+        
+        <p>
+          An opaque signature generated by the analyzer.
+        </p>
+      </dd><dt class="field"><b>corpus: String</b></dt><dd>
+        
+        <p>
+          The corpus of source code this <tt>KytheVName</tt> belongs to.
+          Loosely, a corpus is a collection of related files, such as the
+          contents of a given source repository.
+        </p>
+      </dd><dt class="field"><b>root: String</b></dt><dd>
+        
+        <p>
+          A corpus-specific root label, typically a directory path or project
+          identifier, denoting a distinct subset of the corpus. This may also be
+          used to designate virtual collections like generated files.
+        </p>
+      </dd><dt class="field"><b>path: String</b></dt><dd>
+        
+        <p>
+          A path-structured label describing the “location” of the named object
+          relative to the corpus and the root.
+        </p>
+      </dd><dt class="field"><b>language: String</b></dt><dd>
+        
+        <p>
+          The language this name belongs to.
+        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditGroup">LinkedEditGroup: object</a></dt><dd>
     <p>
       A collection of positions that should be linked (edited simultaneously)
@@ -2310,7 +2384,7 @@
         </p>
       </dd></dl></dd></dl>
 <h2 class="domain"><a name="index">Index</a></h2>
-<h3>Domains</h3><h4>plugin (<a href="#domain_plugin">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_plugin.versionCheck">versionCheck</a></li><li><a href="#request_plugin.shutdown">shutdown</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_plugin.error">error</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.handleWatchEvents">handleWatchEvents</a></li><li><a href="#request_analysis.setContextRoots">setContextRoots</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getFixes">getFixes</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextRoot">ContextRoot</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PrioritizedSourceChange">PrioritizedSourceChange</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_WatchEvent">WatchEvent</a></li><li><a href="#type_WatchEventType">WatchEventType</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
+<h3>Domains</h3><h4>plugin (<a href="#domain_plugin">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_plugin.versionCheck">versionCheck</a></li><li><a href="#request_plugin.shutdown">shutdown</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_plugin.error">error</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.handleWatchEvents">handleWatchEvents</a></li><li><a href="#request_analysis.setContextRoots">setContextRoots</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getFixes">getFixes</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextRoot">ContextRoot</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_KytheEntry">KytheEntry</a></li><li><a href="#type_KytheVName">KytheVName</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PrioritizedSourceChange">PrioritizedSourceChange</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_WatchEvent">WatchEvent</a></li><li><a href="#type_WatchEventType">WatchEventType</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
 
 
 </body></html>
\ No newline at end of file
diff --git a/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart b/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart
new file mode 100644
index 0000000..b790cfa
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart
@@ -0,0 +1,73 @@
+// 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';
+
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer_plugin/plugin/plugin.dart';
+import 'package:analyzer_plugin/protocol/protocol.dart';
+import 'package:analyzer_plugin/protocol/protocol_generated.dart';
+import 'package:analyzer_plugin/src/utilities/kythe/entries.dart';
+import 'package:analyzer_plugin/utilities/generator.dart';
+import 'package:analyzer_plugin/utilities/kythe/entries.dart';
+
+/**
+ * A mixin that can be used when creating a subclass of [ServerPlugin] and
+ * mixing in [KytheMixin]. This implements the creation of the kythe.getEntries
+ * request based on the assumption that the driver being created is an
+ * [AnalysisDriver].
+ *
+ * Clients may not extend or implement this class, but are allowed to use it as
+ * a mix-in when creating a subclass of [ServerPlugin] that also uses
+ * [KytheMixin] as a mix-in.
+ */
+abstract class DartEntryMixin implements EntryMixin {
+  @override
+  Future<EntryRequest> getEntryRequest(
+      KytheGetKytheEntriesParams parameters) async {
+    String path = parameters.file;
+    AnalysisDriver driver = driverForPath(path);
+    if (driver == null) {
+      // Return an error from the request.
+      throw new RequestFailure(
+          RequestErrorFactory.pluginError('Failed to analyze $path', null));
+    }
+    ResolveResult result = await driver.getResult(path);
+    return new DartEntryRequestImpl(resourceProvider, result);
+  }
+}
+
+/**
+ * A mixin that can be used when creating a subclass of [ServerPlugin] to
+ * provide most of the implementation for handling kythe.getEntries requests.
+ *
+ * Clients may not extend or implement this class, but are allowed to use it as
+ * a mix-in when creating a subclass of [ServerPlugin].
+ */
+abstract class EntryMixin implements ServerPlugin {
+  /**
+   * Return a list containing the entry contributors that should be used to
+   * create entries for the file with the given [path]
+   */
+  List<EntryContributor> getEntryContributors(String path);
+
+  /**
+   * Return the entries request that should be passes to the contributors
+   * returned from [getEntryContributors].
+   */
+  Future<EntryRequest> getEntryRequest(KytheGetKytheEntriesParams parameters);
+
+  @override
+  Future<KytheGetKytheEntriesResult> handleKytheGetKytheEntries(
+      KytheGetKytheEntriesParams parameters) async {
+    String path = parameters.file;
+    EntryRequest request = await getEntryRequest(parameters);
+    EntryGenerator generator = new EntryGenerator(getEntryContributors(path));
+    GeneratorResult result =
+        await generator.generateGetEntriesResponse(request);
+    result.sendNotifications(channel);
+    return result.result;
+  }
+}
diff --git a/pkg/analyzer_plugin/lib/plugin/plugin.dart b/pkg/analyzer_plugin/lib/plugin/plugin.dart
index 51792b6..5179732 100644
--- a/pkg/analyzer_plugin/lib/plugin/plugin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/plugin.dart
@@ -6,9 +6,12 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart'
     show AnalysisDriverGeneric, AnalysisDriverScheduler;
+import 'package:analyzer/src/dart/analysis/file_byte_store.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer_plugin/channel/channel.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
@@ -18,9 +21,6 @@
 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart';
 import 'package:analyzer_plugin/src/utilities/null_string_sink.dart';
 import 'package:analyzer_plugin/utilities/subscriptions/subscription_manager.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/file_byte_store.dart';
 import 'package:path/src/context.dart';
 import 'package:pub_semver/pub_semver.dart';
 
@@ -373,6 +373,13 @@
       null;
 
   /**
+   * Handle a 'kythe.getKytheEntries' request.
+   */
+  Future<KytheGetKytheEntriesResult> handleKytheGetKytheEntries(
+          KytheGetKytheEntriesParams parameters) async =>
+      null;
+
+  /**
    * Handle a 'plugin.shutdown' request. Subclasses can override this method to
    * perform any required clean-up, but cannot prevent the plugin from shutting
    * down.
@@ -511,6 +518,10 @@
         var params = new EditGetRefactoringParams.fromRequest(request);
         result = await handleEditGetRefactoring(params);
         break;
+      case KYTHE_REQUEST_GET_KYTHE_ENTRIES:
+        var params = new KytheGetKytheEntriesParams.fromRequest(request);
+        result = await handleKytheGetKytheEntries(params);
+        break;
       case PLUGIN_REQUEST_SHUTDOWN:
         var params = new PluginShutdownParams();
         result = await handlePluginShutdown(params);
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index c3e7d04..4967bcf 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -2936,6 +2936,381 @@
 }
 
 /**
+ * KytheEntry
+ *
+ * {
+ *   "source": KytheVName
+ *   "kind": String
+ *   "target": KytheVName
+ *   "fact": String
+ *   "value": List<int>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheEntry implements HasToJson {
+  KytheVName _source;
+
+  String _kind;
+
+  KytheVName _target;
+
+  String _fact;
+
+  List<int> _value;
+
+  /**
+   * The ticket of the source node (must not be empty).
+   */
+  KytheVName get source => _source;
+
+  /**
+   * The ticket of the source node (must not be empty).
+   */
+  void set source(KytheVName value) {
+    assert(value != null);
+    this._source = value;
+  }
+
+  /**
+   * An edge label (may be empty). The schema defines which labels are
+   * meaningful.
+   */
+  String get kind => _kind;
+
+  /**
+   * An edge label (may be empty). The schema defines which labels are
+   * meaningful.
+   */
+  void set kind(String value) {
+    assert(value != null);
+    this._kind = value;
+  }
+
+  /**
+   * The ticket of the target node (may be empty).
+   */
+  KytheVName get target => _target;
+
+  /**
+   * The ticket of the target node (may be empty).
+   */
+  void set target(KytheVName value) {
+    assert(value != null);
+    this._target = value;
+  }
+
+  /**
+   * A fact label (must not be empty). The schema defines which fact labels are
+   * meaningful.
+   */
+  String get fact => _fact;
+
+  /**
+   * A fact label (must not be empty). The schema defines which fact labels are
+   * meaningful.
+   */
+  void set fact(String value) {
+    assert(value != null);
+    this._fact = value;
+  }
+
+  /**
+   * The String value of the fact (may be empty).
+   */
+  List<int> get value => _value;
+
+  /**
+   * The String value of the fact (may be empty).
+   */
+  void set value(List<int> value) {
+    assert(value != null);
+    this._value = value;
+  }
+
+  KytheEntry(KytheVName source, String kind, KytheVName target, String fact,
+      List<int> value) {
+    this.source = source;
+    this.kind = kind;
+    this.target = target;
+    this.fact = fact;
+    this.value = value;
+  }
+
+  factory KytheEntry.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      KytheVName source;
+      if (json.containsKey("source")) {
+        source = new KytheVName.fromJson(
+            jsonDecoder, jsonPath + ".source", json["source"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "source");
+      }
+      String kind;
+      if (json.containsKey("kind")) {
+        kind = jsonDecoder.decodeString(jsonPath + ".kind", json["kind"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "kind");
+      }
+      KytheVName target;
+      if (json.containsKey("target")) {
+        target = new KytheVName.fromJson(
+            jsonDecoder, jsonPath + ".target", json["target"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "target");
+      }
+      String fact;
+      if (json.containsKey("fact")) {
+        fact = jsonDecoder.decodeString(jsonPath + ".fact", json["fact"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "fact");
+      }
+      List<int> value;
+      if (json.containsKey("value")) {
+        value = jsonDecoder.decodeList(
+            jsonPath + ".value", json["value"], jsonDecoder.decodeInt);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "value");
+      }
+      return new KytheEntry(source, kind, target, fact, value);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, "KytheEntry", json);
+    }
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["source"] = source.toJson();
+    result["kind"] = kind;
+    result["target"] = target.toJson();
+    result["fact"] = fact;
+    result["value"] = value;
+    return result;
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheEntry) {
+      return source == other.source &&
+          kind == other.kind &&
+          target == other.target &&
+          fact == other.fact &&
+          listEqual(value, other.value, (int a, int b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, source.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, target.hashCode);
+    hash = JenkinsSmiHash.combine(hash, fact.hashCode);
+    hash = JenkinsSmiHash.combine(hash, value.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
+ * KytheVName
+ *
+ * {
+ *   "signature": String
+ *   "corpus": String
+ *   "root": String
+ *   "path": String
+ *   "language": String
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheVName implements HasToJson {
+  String _signature;
+
+  String _corpus;
+
+  String _root;
+
+  String _path;
+
+  String _language;
+
+  /**
+   * An opaque signature generated by the analyzer.
+   */
+  String get signature => _signature;
+
+  /**
+   * An opaque signature generated by the analyzer.
+   */
+  void set signature(String value) {
+    assert(value != null);
+    this._signature = value;
+  }
+
+  /**
+   * The corpus of source code this KytheVName belongs to. Loosely, a corpus is
+   * a collection of related files, such as the contents of a given source
+   * repository.
+   */
+  String get corpus => _corpus;
+
+  /**
+   * The corpus of source code this KytheVName belongs to. Loosely, a corpus is
+   * a collection of related files, such as the contents of a given source
+   * repository.
+   */
+  void set corpus(String value) {
+    assert(value != null);
+    this._corpus = value;
+  }
+
+  /**
+   * A corpus-specific root label, typically a directory path or project
+   * identifier, denoting a distinct subset of the corpus. This may also be
+   * used to designate virtual collections like generated files.
+   */
+  String get root => _root;
+
+  /**
+   * A corpus-specific root label, typically a directory path or project
+   * identifier, denoting a distinct subset of the corpus. This may also be
+   * used to designate virtual collections like generated files.
+   */
+  void set root(String value) {
+    assert(value != null);
+    this._root = value;
+  }
+
+  /**
+   * A path-structured label describing the “location” of the named object
+   * relative to the corpus and the root.
+   */
+  String get path => _path;
+
+  /**
+   * A path-structured label describing the “location” of the named object
+   * relative to the corpus and the root.
+   */
+  void set path(String value) {
+    assert(value != null);
+    this._path = value;
+  }
+
+  /**
+   * The language this name belongs to.
+   */
+  String get language => _language;
+
+  /**
+   * The language this name belongs to.
+   */
+  void set language(String value) {
+    assert(value != null);
+    this._language = value;
+  }
+
+  KytheVName(String signature, String corpus, String root, String path,
+      String language) {
+    this.signature = signature;
+    this.corpus = corpus;
+    this.root = root;
+    this.path = path;
+    this.language = language;
+  }
+
+  factory KytheVName.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String signature;
+      if (json.containsKey("signature")) {
+        signature = jsonDecoder.decodeString(
+            jsonPath + ".signature", json["signature"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "signature");
+      }
+      String corpus;
+      if (json.containsKey("corpus")) {
+        corpus = jsonDecoder.decodeString(jsonPath + ".corpus", json["corpus"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "corpus");
+      }
+      String root;
+      if (json.containsKey("root")) {
+        root = jsonDecoder.decodeString(jsonPath + ".root", json["root"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "root");
+      }
+      String path;
+      if (json.containsKey("path")) {
+        path = jsonDecoder.decodeString(jsonPath + ".path", json["path"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "path");
+      }
+      String language;
+      if (json.containsKey("language")) {
+        language =
+            jsonDecoder.decodeString(jsonPath + ".language", json["language"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "language");
+      }
+      return new KytheVName(signature, corpus, root, path, language);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, "KytheVName", json);
+    }
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["signature"] = signature;
+    result["corpus"] = corpus;
+    result["root"] = root;
+    result["path"] = path;
+    result["language"] = language;
+    return result;
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheVName) {
+      return signature == other.signature &&
+          corpus == other.corpus &&
+          root == other.root &&
+          path == other.path &&
+          language == other.language;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, signature.hashCode);
+    hash = JenkinsSmiHash.combine(hash, corpus.hashCode);
+    hash = JenkinsSmiHash.combine(hash, root.hashCode);
+    hash = JenkinsSmiHash.combine(hash, path.hashCode);
+    hash = JenkinsSmiHash.combine(hash, language.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * LinkedEditGroup
  *
  * {
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_constants.dart b/pkg/analyzer_plugin/lib/protocol/protocol_constants.dart
index 79e7f8d..cb38cbf 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_constants.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_constants.dart
@@ -80,6 +80,10 @@
 const String EDIT_RESPONSE_GET_REFACTORING_INITIAL_PROBLEMS = 'initialProblems';
 const String EDIT_RESPONSE_GET_REFACTORING_OPTIONS_PROBLEMS = 'optionsProblems';
 const String EDIT_RESPONSE_GET_REFACTORING_POTENTIAL_EDITS = 'potentialEdits';
+const String KYTHE_REQUEST_GET_KYTHE_ENTRIES = 'kythe.getKytheEntries';
+const String KYTHE_REQUEST_GET_KYTHE_ENTRIES_FILE = 'file';
+const String KYTHE_RESPONSE_GET_KYTHE_ENTRIES_ENTRIES = 'entries';
+const String KYTHE_RESPONSE_GET_KYTHE_ENTRIES_FILES = 'files';
 const String PLUGIN_NOTIFICATION_ERROR = 'plugin.error';
 const String PLUGIN_NOTIFICATION_ERROR_IS_FATAL = 'isFatal';
 const String PLUGIN_NOTIFICATION_ERROR_MESSAGE = 'message';
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
index 95d7d33..e6cb08a 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
@@ -4708,6 +4708,217 @@
 }
 
 /**
+ * kythe.getKytheEntries params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheGetKytheEntriesParams implements RequestParams {
+  String _file;
+
+  /**
+   * The file containing the code for which the Kythe Entry objects are being
+   * requested.
+   */
+  String get file => _file;
+
+  /**
+   * The file containing the code for which the Kythe Entry objects are being
+   * requested.
+   */
+  void set file(String value) {
+    assert(value != null);
+    this._file = value;
+  }
+
+  KytheGetKytheEntriesParams(String file) {
+    this.file = file;
+  }
+
+  factory KytheGetKytheEntriesParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String file;
+      if (json.containsKey("file")) {
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "file");
+      }
+      return new KytheGetKytheEntriesParams(file);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "kythe.getKytheEntries params", json);
+    }
+  }
+
+  factory KytheGetKytheEntriesParams.fromRequest(Request request) {
+    return new KytheGetKytheEntriesParams.fromJson(
+        new RequestDecoder(request), "params", request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["file"] = file;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return new Request(id, "kythe.getKytheEntries", toJson());
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheGetKytheEntriesParams) {
+      return file == other.file;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
+ * kythe.getKytheEntries result
+ *
+ * {
+ *   "entries": List<KytheEntry>
+ *   "files": List<FilePath>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class KytheGetKytheEntriesResult implements ResponseResult {
+  List<KytheEntry> _entries;
+
+  List<String> _files;
+
+  /**
+   * The list of KytheEntry objects for the queried file.
+   */
+  List<KytheEntry> get entries => _entries;
+
+  /**
+   * The list of KytheEntry objects for the queried file.
+   */
+  void set entries(List<KytheEntry> value) {
+    assert(value != null);
+    this._entries = value;
+  }
+
+  /**
+   * The set of files paths that were required, but not in the file system, to
+   * give a complete and accurate Kythe graph for the file. This could be due
+   * to a referenced file that does not exist or generated files not being
+   * generated or passed before the call to "getKytheEntries".
+   */
+  List<String> get files => _files;
+
+  /**
+   * The set of files paths that were required, but not in the file system, to
+   * give a complete and accurate Kythe graph for the file. This could be due
+   * to a referenced file that does not exist or generated files not being
+   * generated or passed before the call to "getKytheEntries".
+   */
+  void set files(List<String> value) {
+    assert(value != null);
+    this._files = value;
+  }
+
+  KytheGetKytheEntriesResult(List<KytheEntry> entries, List<String> files) {
+    this.entries = entries;
+    this.files = files;
+  }
+
+  factory KytheGetKytheEntriesResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      List<KytheEntry> entries;
+      if (json.containsKey("entries")) {
+        entries = jsonDecoder.decodeList(
+            jsonPath + ".entries",
+            json["entries"],
+            (String jsonPath, Object json) =>
+                new KytheEntry.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "entries");
+      }
+      List<String> files;
+      if (json.containsKey("files")) {
+        files = jsonDecoder.decodeList(
+            jsonPath + ".files", json["files"], jsonDecoder.decodeString);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "files");
+      }
+      return new KytheGetKytheEntriesResult(entries, files);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "kythe.getKytheEntries result", json);
+    }
+  }
+
+  factory KytheGetKytheEntriesResult.fromResponse(Response response) {
+    return new KytheGetKytheEntriesResult.fromJson(
+        new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        "result",
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["entries"] =
+        entries.map((KytheEntry value) => value.toJson()).toList();
+    result["files"] = files;
+    return result;
+  }
+
+  @override
+  Response toResponse(String id, int requestTime) {
+    return new Response(id, requestTime, result: toJson());
+  }
+
+  @override
+  String toString() => JSON.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is KytheGetKytheEntriesResult) {
+      return listEqual(
+              entries, other.entries, (KytheEntry a, KytheEntry b) => a == b) &&
+          listEqual(files, other.files, (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, entries.hashCode);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * moveFile feedback
  *
  * Clients may not extend, implement or mix-in this class.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
new file mode 100644
index 0000000..66dfed7
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
@@ -0,0 +1,47 @@
+// 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 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/kythe/entries.dart';
+
+/**
+ * A concrete implementation of [EntryRequest].
+ */
+class DartEntryRequestImpl implements DartEntryRequest {
+  @override
+  final ResourceProvider resourceProvider;
+
+  @override
+  final ResolveResult result;
+
+  /**
+   * Initialize a newly create request with the given data.
+   */
+  DartEntryRequestImpl(this.resourceProvider, this.result);
+
+  @override
+  String get path => result.path;
+}
+
+/**
+ * A concrete implementation of [EntryCollector].
+ */
+class EntryCollectorImpl implements EntryCollector {
+  /**
+   * A list of entries.
+   */
+  final List<KytheEntry> entries = <KytheEntry>[];
+
+  /**
+   * A list of paths to files.
+   */
+  final List<String> files = <String>[];
+
+  @override
+  void addEntry(KytheEntry entry) {
+    entries.add(entry);
+  }
+}
diff --git a/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart b/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart
new file mode 100644
index 0000000..5571efd
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart
@@ -0,0 +1,105 @@
+// 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 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer_plugin/protocol/protocol.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart' show KytheEntry;
+import 'package:analyzer_plugin/protocol/protocol_generated.dart';
+import 'package:analyzer_plugin/src/utilities/kythe/entries.dart';
+import 'package:analyzer_plugin/utilities/generator.dart';
+
+/**
+ * The information about a requested set of entries when computing entries in a
+ * `.dart` file.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class DartEntryRequest implements EntryRequest {
+  /**
+   * The analysis result for the file in which the entries are being requested.
+   */
+  ResolveResult get result;
+}
+
+/**
+ * An object that [EntryContributor]s use to record entries.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class EntryCollector {
+  /**
+   * Record a new [entry].
+   */
+  void addEntry(KytheEntry entry);
+}
+
+/**
+ * An object used to produce entries.
+ *
+ * Clients may implement this class when implementing plugins.
+ */
+abstract class EntryContributor {
+  /**
+   * Contribute entries for the file specified by the given [request] into the
+   * given [collector].
+   */
+  void computeEntries(EntryRequest request, EntryCollector collector);
+}
+
+/**
+ * A generator that will generate a 'kythe.getEntries' response.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class EntryGenerator {
+  /**
+   * The contributors to be used to generate the entries.
+   */
+  final List<EntryContributor> contributors;
+
+  /**
+   * Initialize a newly created entry generator to use the given [contributors].
+   */
+  EntryGenerator(this.contributors);
+
+  /**
+   * Create a 'kythe.getEntries' response for the file specified by the given
+   * [request]. If any of the contributors throws an exception, also create a
+   * non-fatal 'plugin.error' notification.
+   */
+  GeneratorResult generateGetEntriesResponse(EntryRequest request) {
+    List<Notification> notifications = <Notification>[];
+    EntryCollectorImpl collector = new EntryCollectorImpl();
+    for (EntryContributor contributor in contributors) {
+      try {
+        contributor.computeEntries(request, collector);
+      } catch (exception, stackTrace) {
+        notifications.add(new PluginErrorParams(
+                false, exception.toString(), stackTrace.toString())
+            .toNotification());
+      }
+    }
+    KytheGetKytheEntriesResult result =
+        new KytheGetKytheEntriesResult(collector.entries, collector.files);
+    return new GeneratorResult(result, notifications);
+  }
+}
+
+/**
+ * The information about a requested set of entries.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class EntryRequest {
+  /**
+   * Return the path of the file in which entries are being requested.
+   */
+  String get path;
+
+  /**
+   * Return the resource provider associated with this request.
+   */
+  ResourceProvider get resourceProvider;
+}
diff --git a/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart b/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart
index 30f3c2d..58bf8dd 100644
--- a/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart
+++ b/pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart
@@ -708,6 +708,38 @@
   }
 
   /**
+   * Return the list of KytheEntry objects for some file, given the current
+   * state of the file system populated by "analysis.updateContent".
+   *
+   * Parameters
+   *
+   * file: FilePath
+   *
+   *   The file containing the code for which the Kythe Entry objects are being
+   *   requested.
+   *
+   * Returns
+   *
+   * entries: List<KytheEntry>
+   *
+   *   The list of KytheEntry objects for the queried file.
+   *
+   * files: List<FilePath>
+   *
+   *   The set of files paths that were required, but not in the file system,
+   *   to give a complete and accurate Kythe graph for the file. This could be
+   *   due to a referenced file that does not exist or generated files not
+   *   being generated or passed before the call to "getKytheEntries".
+   */
+  Future<KytheGetKytheEntriesResult> sendKytheGetKytheEntries(
+      String file) async {
+    var params = new KytheGetKytheEntriesParams(file).toJson();
+    var result = await server.send("kythe.getKytheEntries", params);
+    ResponseDecoder decoder = new ResponseDecoder(null);
+    return new KytheGetKytheEntriesResult.fromJson(decoder, 'result', result);
+  }
+
+  /**
    * Initialize the fields in InttestMixin, and ensure that notifications will
    * be handled.
    */
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index 7bc0fc1..dbb2e45 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -506,6 +506,46 @@
 ]);
 
 /**
+ * KytheEntry
+ *
+ * {
+ *   "source": KytheVName
+ *   "kind": String
+ *   "target": KytheVName
+ *   "fact": String
+ *   "value": List<int>
+ * }
+ */
+final Matcher isKytheEntry =
+    new LazyMatcher(() => new MatchesJsonObject("KytheEntry", {
+          "source": isKytheVName,
+          "kind": isString,
+          "target": isKytheVName,
+          "fact": isString,
+          "value": isListOf(isInt)
+        }));
+
+/**
+ * KytheVName
+ *
+ * {
+ *   "signature": String
+ *   "corpus": String
+ *   "root": String
+ *   "path": String
+ *   "language": String
+ * }
+ */
+final Matcher isKytheVName =
+    new LazyMatcher(() => new MatchesJsonObject("KytheVName", {
+          "signature": isString,
+          "corpus": isString,
+          "root": isString,
+          "path": isString,
+          "language": isString
+        }));
+
+/**
  * LinkedEditGroup
  *
  * {
@@ -1347,6 +1387,29 @@
         "inlineMethod options", {"deleteSource": isBool, "inlineAll": isBool}));
 
 /**
+ * kythe.getKytheEntries params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ */
+final Matcher isKytheGetKytheEntriesParams = new LazyMatcher(() =>
+    new MatchesJsonObject(
+        "kythe.getKytheEntries params", {"file": isFilePath}));
+
+/**
+ * kythe.getKytheEntries result
+ *
+ * {
+ *   "entries": List<KytheEntry>
+ *   "files": List<FilePath>
+ * }
+ */
+final Matcher isKytheGetKytheEntriesResult = new LazyMatcher(() =>
+    new MatchesJsonObject("kythe.getKytheEntries result",
+        {"entries": isListOf(isKytheEntry), "files": isListOf(isFilePath)}));
+
+/**
  * moveFile feedback
  */
 final Matcher isMoveFileFeedback = isNull;
diff --git a/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart
new file mode 100644
index 0000000..dce0271
--- /dev/null
+++ b/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart
@@ -0,0 +1,101 @@
+// 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';
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer_plugin/plugin/kythe_mixin.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/protocol/protocol_generated.dart';
+import 'package:analyzer_plugin/src/utilities/kythe/entries.dart';
+import 'package:analyzer_plugin/utilities/kythe/entries.dart';
+import 'package:path/src/context.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'mocks.dart';
+
+void main() {
+  defineReflectiveTests(KytheMixinTest);
+}
+
+@reflectiveTest
+class KytheMixinTest {
+  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
+
+  String packagePath1;
+  String filePath1;
+  ContextRoot contextRoot1;
+
+  MockChannel channel;
+  _TestServerPlugin plugin;
+
+  void setUp() {
+    Context pathContext = resourceProvider.pathContext;
+
+    packagePath1 = resourceProvider.convertPath('/package1');
+    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
+    resourceProvider.newFile(filePath1, '');
+    contextRoot1 = new ContextRoot(packagePath1, <String>[]);
+
+    channel = new MockChannel();
+    plugin = new _TestServerPlugin(resourceProvider);
+    plugin.start(channel);
+  }
+
+  test_handleEditGetAssists() async {
+    await plugin.handleAnalysisSetContextRoots(
+        new AnalysisSetContextRootsParams([contextRoot1]));
+
+    KytheGetKytheEntriesResult result = await plugin
+        .handleKytheGetKytheEntries(new KytheGetKytheEntriesParams(filePath1));
+    expect(result, isNotNull);
+    expect(result.entries, hasLength(3));
+  }
+}
+
+class _TestEntryContributor implements EntryContributor {
+  List<KytheEntry> entries;
+
+  _TestEntryContributor(this.entries);
+
+  @override
+  void computeEntries(EntryRequest request, EntryCollector collector) {
+    for (KytheEntry entry in entries) {
+      collector.addEntry(entry);
+    }
+  }
+}
+
+class _TestServerPlugin extends MockServerPlugin with EntryMixin {
+  _TestServerPlugin(ResourceProvider resourceProvider)
+      : super(resourceProvider);
+
+  PrioritizedSourceChange createChange() {
+    return new PrioritizedSourceChange(0, new SourceChange(''));
+  }
+
+  @override
+  List<EntryContributor> getEntryContributors(String path) {
+    KytheVName vName = new KytheVName('', '', '', '', '');
+    return <EntryContributor>[
+      new _TestEntryContributor(<KytheEntry>[
+        new KytheEntry(vName, '', vName, '', <int>[]),
+        new KytheEntry(vName, '', vName, '', <int>[])
+      ]),
+      new _TestEntryContributor(
+          <KytheEntry>[new KytheEntry(vName, '', vName, '', <int>[])])
+    ];
+  }
+
+  @override
+  Future<EntryRequest> getEntryRequest(
+      KytheGetKytheEntriesParams parameters) async {
+    AnalysisResult result = new AnalysisResult(
+        null, null, null, null, null, null, null, null, null, null, null);
+    return new DartEntryRequestImpl(resourceProvider, result);
+  }
+}
diff --git a/pkg/analyzer_plugin/test/plugin/test_all.dart b/pkg/analyzer_plugin/test/plugin/test_all.dart
index 1b61afb..48a3a8b 100644
--- a/pkg/analyzer_plugin/test/plugin/test_all.dart
+++ b/pkg/analyzer_plugin/test/plugin/test_all.dart
@@ -7,6 +7,7 @@
 import 'assist_mixin_test.dart' as assist_mixin_test;
 import 'completion_mixin_test.dart' as completion_mixin_test;
 import 'fix_mixin_test.dart' as fix_mixin_test;
+import 'kythe_mixin_test.dart' as kythe_mixin_test;
 import 'navigation_mixin_test.dart' as navigation_mixin_test;
 import 'plugin_test.dart' as plugin_test;
 
@@ -15,6 +16,7 @@
     assist_mixin_test.main();
     completion_mixin_test.main();
     fix_mixin_test.main();
+    kythe_mixin_test.main();
     navigation_mixin_test.main();
     plugin_test.main();
   }, name: 'plugin');
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index ea938c8..831d079 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -808,6 +808,95 @@
       </value>
     </enum>
   </type>
+  <type name="KytheEntry">
+    <p>
+      This object matches the format and documentation of the Entry object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_entry">Kythe Storage
+        Model</a>.
+    </p>
+    <object>
+      <field name="source">
+        <ref>KytheVName</ref>
+        <p>
+          The ticket of the source node (must not be empty).
+        </p>
+      </field>
+      <field name="kind">
+        <ref>String</ref>
+        <p>
+          An edge label (may be empty). The schema defines which labels are
+          meaningful.
+        </p>
+      </field>
+      <field name="target">
+        <ref>KytheVName</ref>
+        <p>
+          The ticket of the target node (may be empty).
+        </p>
+      </field>
+      <field name="fact">
+        <ref>String</ref>
+        <p>
+          A fact label (must not be empty). The schema defines which fact labels
+          are meaningful.
+        </p>
+      </field>
+      <field name="value">
+        <list>
+          <ref>int</ref>
+        </list>
+        <p>
+          The <tt>String</tt> value of the fact (may be empty).
+        </p>
+      </field>
+    </object>
+  </type>
+  <type name="KytheVName">
+    <p>
+      This object matches the format and documentation of the Vector-Name object
+      documented in the
+      <a href="https://kythe.io/docs/kythe-storage.html#_a_id_termvname_a_vector_name_strong_vname_strong">Kythe
+        Storage Model</a>.
+    </p>
+    <object>
+      <field name="signature">
+        <ref>String</ref>
+        <p>
+          An opaque signature generated by the analyzer.
+        </p>
+      </field>
+      <field name="corpus">
+        <ref>String</ref>
+        <p>
+          The corpus of source code this <tt>KytheVName</tt> belongs to.
+          Loosely, a corpus is a collection of related files, such as the
+          contents of a given source repository.
+        </p>
+      </field>
+      <field name="root">
+        <ref>String</ref>
+        <p>
+          A corpus-specific root label, typically a directory path or project
+          identifier, denoting a distinct subset of the corpus. This may also be
+          used to designate virtual collections like generated files.
+        </p>
+      </field>
+      <field name="path">
+        <ref>String</ref>
+        <p>
+          A path-structured label describing the “location” of the named object
+          relative to the corpus and the root.
+        </p>
+      </field>
+      <field name="language">
+        <ref>String</ref>
+        <p>
+          The language this name belongs to.
+        </p>
+      </field>
+    </object>
+  </type>
   <type name="LinkedEditGroup">
     <p>
       A collection of positions that should be linked (edited simultaneously)
diff --git a/pkg/analyzer_plugin/tool/spec/plugin_spec.html b/pkg/analyzer_plugin/tool/spec/plugin_spec.html
index dc3fe76..d9b11a9 100644
--- a/pkg/analyzer_plugin/tool/spec/plugin_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/plugin_spec.html
@@ -829,6 +829,48 @@
     </result>
   </request>
 </domain>
+<domain name="kythe" experimental="true">
+  <p>
+    The kythe domain contains APIs related to generating Dart content in the
+    <a href="http://kythe.io/">Kythe</a> format.
+  </p>
+  <request method="getKytheEntries">
+    <p>
+      Return the list of <tt>KytheEntry</tt> objects for some file, given the
+      current state of the file system populated by "analysis.updateContent".
+    </p>
+    <params>
+      <field name="file">
+        <ref>FilePath</ref>
+        <p>
+          The file containing the code for which the Kythe Entry objects are
+          being requested.
+        </p>
+      </field>
+    </params>
+    <result>
+      <field name="entries">
+        <list>
+          <ref>KytheEntry</ref>
+        </list>
+        <p>
+          The list of <tt>KytheEntry</tt> objects for the queried file.
+        </p>
+      </field>
+      <field name="files">
+        <list>
+          <ref>FilePath</ref>
+        </list>
+        <p>
+          The set of files paths that were required, but not in the file system,
+          to give a complete and accurate Kythe graph for the file. This could
+          be due to a referenced file that does not exist or generated files not
+          being generated or passed before the call to "getKytheEntries".
+        </p>
+      </field>
+    </result>
+  </request>
+</domain>
 <types>
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
diff --git a/pkg/compiler/lib/src/backend_strategy.dart b/pkg/compiler/lib/src/backend_strategy.dart
index 4329266..5fa828b 100644
--- a/pkg/compiler/lib/src/backend_strategy.dart
+++ b/pkg/compiler/lib/src/backend_strategy.dart
@@ -14,6 +14,7 @@
 import 'js_backend/native_data.dart';
 import 'js_emitter/sorter.dart';
 import 'ssa/ssa.dart';
+import 'types/types.dart';
 import 'universe/world_builder.dart';
 import 'world.dart';
 
@@ -48,4 +49,8 @@
 
   /// Creates a [SourceSpan] from [spannable] in context of [currentElement].
   SourceSpan spanFromSpannable(Spannable spannable, Entity currentElement);
+
+  /// Creates the [TypesInferrer] used by this strategy.
+  TypesInferrer createTypesInferrer(ClosedWorldRefiner closedWorldRefiner,
+      {bool disableTypeInference: false});
 }
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 5b43c62..4b114d3 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -51,6 +51,9 @@
   ClosureRepresentationInfo getClosureRepresentationInfo(
       covariant Entity member);
 
+  ClosureRepresentationInfo getClosureRepresentationInfoForTesting(
+      covariant Entity member);
+
   /// Look up information about a loop, in case any variables it declares need
   /// to be boxed/snapshotted.
   CapturedLoopScope getCapturedLoopScope(T loopNode);
@@ -289,6 +292,11 @@
     return getClosureToClassMapping(member);
   }
 
+  ClosureRepresentationInfo getClosureRepresentationInfoForTesting(
+      Element member) {
+    return getClosureRepresentationInfo(member);
+  }
+
   CapturedLoopScope getCapturedLoopScope(Node loopNode) {
     var value = _closureInfoMap[loopNode];
     return value == null ? const CapturedLoopScope() : value;
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 159488a..b526071 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -741,8 +741,10 @@
     assert(
         type.isInterfaceType ||
             type.isTypedef ||
-            type.isFunctionType ||
-            type.isDynamic,
+            type.isDynamic ||
+            // TODO(johnniwinther): Remove `type.isFunctionType` when
+            // [KernelAstAdapter] is removed.
+            type.isFunctionType,
         "Unexpected type constant type: $type");
   }
 
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 155c54d..722812b 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -261,10 +261,9 @@
     _constantToOutputUnit[constant] = _getCanonicalUnit(outputUnit);
   }
 
-  /// Answers whether [element] is explicitly deferred when referred to from
-  /// [library].
-  bool _isExplicitlyDeferred(Element element, LibraryElement library) {
-    Iterable<ImportElement> imports = _getImports(element, library);
+  /// Given [imports] that refer to an element from a library, determine whether
+  /// the element is explicitly deferred.
+  static bool _isExplicitlyDeferred(Iterable<ImportElement> imports) {
     // If the element is not imported explicitly, it is implicitly imported
     // not deferred.
     if (imports.isEmpty) return false;
@@ -456,7 +455,7 @@
       ClassElement cls = element.declaration;
       cls.implementation.forEachMember(addLiveInstanceMember);
       for (ResolutionInterfaceType type in cls.implementation.allSupertypes) {
-        elements.add(type.element.implementation);
+        collectTypeDependencies(type);
       }
       elements.add(cls.implementation);
     } else if (Elements.isStaticOrTopLevel(element) || element.isConstructor) {
@@ -527,14 +526,12 @@
     });
   }
 
-  /// Recursively traverses the graph of dependencies from one of [element]
-  /// or [constant], mapping deferred imports to each dependency it needs in the
-  /// sets [_importedDeferredBy] and [_constantsDeferredBy].
-  /// Only one of [element] and [constant] should be given.
+  /// Recursively traverses the graph of dependencies from [element], mapping
+  /// deferred imports to each dependency it needs in the sets
+  /// [_importedDeferredBy] and [_constantsDeferredBy].
   void _mapDependencies(
       {Element element, _DeferredImport import, isMirrorUsage: false}) {
-    Set<Element> elements =
-        _importedDeferredBy.putIfAbsent(import, () => new Set<Element>());
+    Set<Element> elements = _importedDeferredBy[import] ??= new Set<Element>();
 
     Set<Element> dependentElements = new Set<Element>();
     Set<ConstantValue> dependentConstants = new Set<ConstantValue>();
@@ -548,6 +545,8 @@
       // Anything used directly by main will be loaded from the start
       // We do not need to traverse it again.
       if (import != _fakeMainImport && _mainElements.contains(element)) return;
+      // This adds [element] to [_mainElements] because [_mainElements] is
+      // aliased with `_importedDeferredBy[_fakeMainImport]]`.
       elements.add(element);
 
       // This call can modify [dependentElements] and [dependentConstants].
@@ -558,8 +557,9 @@
     }
 
     for (Element dependency in dependentElements) {
-      if (_isExplicitlyDeferred(dependency, library)) {
-        for (ImportElement deferredImport in _getImports(dependency, library)) {
+      Iterable<ImportElement> imports = _getImports(dependency, library);
+      if (_isExplicitlyDeferred(imports)) {
+        for (ImportElement deferredImport in imports) {
           _mapDependencies(
               element: dependency,
               import: new _DeclaredDeferredImport(deferredImport));
@@ -715,97 +715,93 @@
     _constantsDeferredBy = new Map<_DeferredImport, Set<ConstantValue>>();
     _importedDeferredBy[_fakeMainImport] = _mainElements;
 
-    reporter.withCurrentElement(
-        mainLibrary,
-        () => measure(() {
-              // Starting from main, traverse the program and find all
-              // dependencies.
-              _mapDependencies(element: mainMethod, import: _fakeMainImport);
+    work() {
+      // Starting from main, traverse the program and find all dependencies.
+      _mapDependencies(element: mainMethod, import: _fakeMainImport);
 
-              // Also add "global" dependencies to the main OutputUnit.  These
-              // are things that the backend needs but cannot associate with a
-              // particular element, for example, startRootIsolate.  This set
-              // also contains elements for which we lack precise information.
-              for (MethodElement element
-                  in closedWorld.backendUsage.globalFunctionDependencies) {
-                _mapDependencies(
-                    element: element.implementation, import: _fakeMainImport);
-              }
-              for (ClassElement element
-                  in closedWorld.backendUsage.globalClassDependencies) {
-                _mapDependencies(
-                    element: element.implementation, import: _fakeMainImport);
-              }
+      // Also add "global" dependencies to the main OutputUnit.  These are
+      // things that the backend needs but cannot associate with a particular
+      // element, for example, startRootIsolate.  This set also contains
+      // elements for which we lack precise information.
+      for (MethodElement element
+          in closedWorld.backendUsage.globalFunctionDependencies) {
+        _mapDependencies(
+            element: element.implementation, import: _fakeMainImport);
+      }
+      for (ClassElement element
+          in closedWorld.backendUsage.globalClassDependencies) {
+        _mapDependencies(
+            element: element.implementation, import: _fakeMainImport);
+      }
 
-              // Now check to see if we have to add more elements due to
-              // mirrors.
-              if (closedWorld.backendUsage.isMirrorsUsed) {
-                _addMirrorElements();
-              }
+      // Now check to see if we have to add more elements due to mirrors.
+      if (closedWorld.backendUsage.isMirrorsUsed) {
+        _addMirrorElements();
+      }
 
-              // Build the OutputUnits using these two maps.
-              Map<Element, OutputUnit> elementToOutputUnitBuilder =
-                  new Map<Element, OutputUnit>();
-              Map<ConstantValue, OutputUnit> constantToOutputUnitBuilder =
-                  new Map<ConstantValue, OutputUnit>();
+      // Build the OutputUnits using these two maps.
+      Map<Element, OutputUnit> elementToOutputUnitBuilder =
+          new Map<Element, OutputUnit>();
+      Map<ConstantValue, OutputUnit> constantToOutputUnitBuilder =
+          new Map<ConstantValue, OutputUnit>();
 
-              // Add all constants that may have been registered during
-              // resolution with [registerConstantDeferredUse].
-              constantToOutputUnitBuilder.addAll(_constantToOutputUnit);
-              _constantToOutputUnit.clear();
+      // Add all constants that may have been registered during resolution with
+      // [registerConstantDeferredUse].
+      constantToOutputUnitBuilder.addAll(_constantToOutputUnit);
+      _constantToOutputUnit.clear();
 
-              // Reverse the mappings. For each element record an OutputUnit
-              // collecting all deferred imports mapped to this element. Same
-              // for constants.
-              for (_DeferredImport import in _importedDeferredBy.keys) {
-                for (Element element in _importedDeferredBy[import]) {
-                  // Only one file should be loaded when the program starts, so
-                  // make sure that only one OutputUnit is created for
-                  // [fakeMainImport].
-                  if (import == _fakeMainImport) {
-                    elementToOutputUnitBuilder[element] = mainOutputUnit;
-                  } else {
-                    elementToOutputUnitBuilder
-                        .putIfAbsent(element, () => new OutputUnit())
-                        .imports
-                        .add(import);
-                  }
-                }
-              }
-              for (_DeferredImport import in _constantsDeferredBy.keys) {
-                for (ConstantValue constant in _constantsDeferredBy[import]) {
-                  // Only one file should be loaded when the program starts, so
-                  // make sure that only one OutputUnit is created for
-                  // [fakeMainImport].
-                  if (import == _fakeMainImport) {
-                    constantToOutputUnitBuilder[constant] = mainOutputUnit;
-                  } else {
-                    constantToOutputUnitBuilder
-                        .putIfAbsent(constant, () => new OutputUnit())
-                        .imports
-                        .add(import);
-                  }
-                }
-              }
+      // Reverse the mappings. For each element record an OutputUnit collecting
+      // all deferred imports mapped to this element. Same for constants.
+      for (_DeferredImport import in _importedDeferredBy.keys) {
+        for (Element element in _importedDeferredBy[import]) {
+          // Only one file should be loaded when the program starts, so make
+          // sure that only one OutputUnit is created for [fakeMainImport].
+          if (import == _fakeMainImport) {
+            elementToOutputUnitBuilder[element] = mainOutputUnit;
+          } else {
+            elementToOutputUnitBuilder
+                .putIfAbsent(element, () => new OutputUnit())
+                .imports
+                .add(import);
+          }
+        }
+      }
+      for (_DeferredImport import in _constantsDeferredBy.keys) {
+        for (ConstantValue constant in _constantsDeferredBy[import]) {
+          // Only one file should be loaded when the program starts, so make
+          // sure that only one OutputUnit is created for [fakeMainImport].
+          if (import == _fakeMainImport) {
+            constantToOutputUnitBuilder[constant] = mainOutputUnit;
+          } else {
+            constantToOutputUnitBuilder
+                .putIfAbsent(constant, () => new OutputUnit())
+                .imports
+                .add(import);
+          }
+        }
+      }
 
-              // Release maps;
-              _importedDeferredBy = null;
-              _constantsDeferredBy = null;
+      // Release maps;
+      _importedDeferredBy = null;
+      _constantsDeferredBy = null;
 
-              // Find all the output units elements/constants have been mapped
-              // to, and canonicalize them.
-              elementToOutputUnitBuilder
-                  .forEach((Element element, OutputUnit outputUnit) {
-                _elementToOutputUnit[element] = _getCanonicalUnit(outputUnit);
-              });
-              constantToOutputUnitBuilder
-                  .forEach((ConstantValue constant, OutputUnit outputUnit) {
-                _constantToOutputUnit[constant] = _getCanonicalUnit(outputUnit);
-              });
+      // Find all the output units elements/constants have been mapped
+      // to, and canonicalize them.
+      elementToOutputUnitBuilder
+          .forEach((Element element, OutputUnit outputUnit) {
+        _elementToOutputUnit[element] = _getCanonicalUnit(outputUnit);
+      });
+      constantToOutputUnitBuilder
+          .forEach((ConstantValue constant, OutputUnit outputUnit) {
+        _constantToOutputUnit[constant] = _getCanonicalUnit(outputUnit);
+      });
 
-              // Generate a unique name for each OutputUnit.
-              _assignNamesToOutputUnits(allOutputUnits);
-            }));
+      // Generate a unique name for each OutputUnit.
+      _assignNamesToOutputUnits(allOutputUnits);
+    }
+
+    reporter.withCurrentElement(mainLibrary, () => measure(work));
+
     // Notify the impact strategy impacts are no longer needed for deferred
     // load.
     compiler.impactStrategy.onImpactUsed(IMPACT_USE);
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index 3021952..237df90 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -52,6 +52,7 @@
 }
 
 abstract class TypedefEntity extends Entity {
+  /// The library in which the typedef was declared.
   LibraryEntity get library;
 }
 
diff --git a/pkg/compiler/lib/src/elements/resolution_types.dart b/pkg/compiler/lib/src/elements/resolution_types.dart
index ed97086..9058e47 100644
--- a/pkg/compiler/lib/src/elements/resolution_types.dart
+++ b/pkg/compiler/lib/src/elements/resolution_types.dart
@@ -866,7 +866,7 @@
 bool _typeContainsMethodTypeVariableType(ResolutionDartType type) =>
     type.containsMethodTypeVariableType;
 
-class ResolutionTypedefType extends GenericType {
+class ResolutionTypedefType extends GenericType implements TypedefType {
   ResolutionDartType _unaliased;
 
   ResolutionTypedefType(TypedefElement element,
@@ -888,6 +888,11 @@
     return new ResolutionTypedefType(element, newTypeArguments);
   }
 
+  ResolutionTypedefType subst(covariant List<ResolutionDartType> arguments,
+      covariant List<ResolutionDartType> parameters) {
+    return super.subst(arguments, parameters);
+  }
+
   void computeUnaliased(Resolution resolution) {
     if (_unaliased == null) {
       element.ensureResolved(resolution);
@@ -992,7 +997,7 @@
 
   R visitMalformedType(MalformedType type, A argument) => null;
 
-  R visitTypedefType(ResolutionTypedefType type, A argument) => null;
+  R visitTypedefType(TypedefType type, A argument) => null;
 }
 
 abstract class BaseResolutionDartTypeVisitor<R, A>
@@ -1011,7 +1016,7 @@
       visitGenericType(type, argument);
 
   @override
-  R visitTypedefType(ResolutionTypedefType type, A argument) =>
+  R visitTypedefType(covariant ResolutionTypedefType type, A argument) =>
       visitGenericType(type, argument);
 }
 
@@ -1054,7 +1059,8 @@
   /// spurious errors from malformed types.
   bool visitMalformedType(MalformedType t, ResolutionDartType s) => true;
 
-  bool visitTypedefType(ResolutionTypedefType t, ResolutionDartType s) =>
+  bool visitTypedefType(
+          covariant ResolutionTypedefType t, ResolutionDartType s) =>
       visitType(t, s);
 }
 
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index da83aaa..26dfbc8 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -162,6 +162,85 @@
   }
 }
 
+class TypedefType extends DartType {
+  final TypedefEntity element;
+  final List<DartType> typeArguments;
+
+  TypedefType(this.element, this.typeArguments);
+
+  bool get isTypedef => true;
+
+  bool get containsTypeVariables =>
+      typeArguments.any((type) => type.containsTypeVariables);
+
+  void forEachTypeVariable(f(TypeVariableType variable)) {
+    typeArguments.forEach((type) => type.forEachTypeVariable(f));
+  }
+
+  TypedefType subst(List<DartType> arguments, List<DartType> parameters) {
+    if (typeArguments.isEmpty) {
+      // Return fast on non-generic types.
+      return this;
+    }
+    if (parameters.isEmpty) {
+      assert(arguments.isEmpty);
+      // Return fast on empty substitutions.
+      return this;
+    }
+    List<DartType> newTypeArguments =
+        _substTypes(typeArguments, arguments, parameters);
+    if (!identical(typeArguments, newTypeArguments)) {
+      // Create a new type only if necessary.
+      return new TypedefType(element, newTypeArguments);
+    }
+    return this;
+  }
+
+  bool get treatAsRaw {
+    for (DartType type in typeArguments) {
+      if (!type.treatAsDynamic) return false;
+    }
+    return true;
+  }
+
+  @override
+  R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
+      visitor.visitTypedefType(this, argument);
+
+  int get hashCode {
+    int hash = element.hashCode;
+    for (DartType argument in typeArguments) {
+      int argumentHash = argument != null ? argument.hashCode : 0;
+      hash = 17 * hash + 3 * argumentHash;
+    }
+    return hash;
+  }
+
+  bool operator ==(other) {
+    if (other is! TypedefType) return false;
+    return identical(element, other.element) &&
+        equalElements(typeArguments, other.typeArguments);
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write(element.name);
+    if (typeArguments.isNotEmpty) {
+      sb.write('<');
+      bool needsComma = false;
+      for (DartType typeArgument in typeArguments) {
+        if (needsComma) {
+          sb.write(',');
+        }
+        sb.write(typeArgument);
+        needsComma = true;
+      }
+      sb.write('>');
+    }
+    return sb.toString();
+  }
+}
+
 class TypeVariableType extends DartType {
   final TypeVariableEntity element;
 
@@ -421,6 +500,8 @@
 
   R visitInterfaceType(covariant InterfaceType type, A argument) => null;
 
+  R visitTypedefType(covariant TypedefType type, A argument) => null;
+
   R visitDynamicType(covariant DynamicType type, A argument) => null;
 }
 
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index ce01951..39310b6 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -14,7 +14,6 @@
 import 'compiler.dart' show Compiler;
 import 'options.dart';
 import 'elements/entities.dart';
-import 'elements/resolution_types.dart' show ResolutionTypedefType;
 import 'elements/types.dart';
 import 'js_backend/enqueuer.dart';
 import 'universe/world_builder.dart';
@@ -367,7 +366,7 @@
         break;
       case TypeUseKind.TYPE_LITERAL:
         if (type.isTypedef) {
-          ResolutionTypedefType typedef = type;
+          TypedefType typedef = type;
           worldBuilder.registerTypedef(typedef.element);
         }
         break;
diff --git a/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
new file mode 100644
index 0000000..ef8b455
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
@@ -0,0 +1,149 @@
+// 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 'package:kernel/ast.dart' as ir;
+
+import '../compiler.dart';
+import '../constants/values.dart';
+import '../elements/entities.dart';
+import '../types/types.dart';
+import '../world.dart';
+import 'inferrer_engine.dart';
+import 'type_graph_inferrer.dart';
+import 'type_graph_nodes.dart';
+import 'type_system.dart';
+
+class KernelTypeGraphInferrer extends TypeGraphInferrer<ir.Node> {
+  final Compiler _compiler;
+
+  KernelTypeGraphInferrer(this._compiler, ClosedWorld closedWorld,
+      ClosedWorldRefiner closedWorldRefiner, {bool disableTypeInference: false})
+      : super(closedWorld, closedWorldRefiner,
+            disableTypeInference: disableTypeInference);
+
+  @override
+  InferrerEngine<ir.Node> createInferrerEngineFor(FunctionEntity main) {
+    return new KernelInferrerEngine(
+        _compiler, closedWorld, closedWorldRefiner, main);
+  }
+
+  @override
+  GlobalTypeInferenceResults createResults() {
+    return new KernelGlobalTypeInferenceResults(this, closedWorld);
+  }
+}
+
+class KernelGlobalTypeInferenceResults
+    extends GlobalTypeInferenceResults<ir.Node> {
+  KernelGlobalTypeInferenceResults(
+      TypesInferrer<ir.Node> inferrer, ClosedWorld closedWorld)
+      : super(inferrer, closedWorld);
+
+  GlobalTypeInferenceMemberResult<ir.Node> createMemberResult(
+      TypeGraphInferrer<ir.Node> inferrer, MemberEntity member,
+      {bool isJsInterop: false}) {
+    return new GlobalTypeInferenceMemberResultImpl<ir.Node>(
+        member,
+        // We store data in the context of the enclosing method, even
+        // for closure elements.
+        inferrer.inferrer.lookupDataOfMember(member),
+        inferrer,
+        isJsInterop,
+        dynamicType);
+  }
+
+  GlobalTypeInferenceParameterResult<ir.Node> createParameterResult(
+      TypeGraphInferrer<ir.Node> inferrer, Local parameter) {
+    return new GlobalTypeInferenceParameterResultImpl<ir.Node>(
+        parameter, inferrer, dynamicType);
+  }
+}
+
+class KernelInferrerEngine extends InferrerEngineImpl<ir.Node> {
+  KernelInferrerEngine(Compiler compiler, ClosedWorld closedWorld,
+      ClosedWorldRefiner closedWorldRefiner, FunctionEntity mainElement)
+      : super(compiler, closedWorld, closedWorldRefiner, mainElement,
+            const KernelTypeSystemStrategy());
+
+  @override
+  ConstantValue getFieldConstant(FieldEntity field) {
+    throw new UnimplementedError('KernelInferrerEngine.getFieldConstant');
+  }
+
+  @override
+  bool isFieldInitializerPotentiallyNull(
+      FieldEntity field, ir.Node initializer) {
+    throw new UnimplementedError(
+        'KernelInferrerEngine.isFieldInitializerPotentiallyNull');
+  }
+
+  @override
+  TypeInformation computeMemberTypeInformation(
+      MemberEntity member, ir.Node body) {
+    throw new UnimplementedError(
+        'KernelInferrerEngine.computeMemberTypeInformation');
+  }
+
+  @override
+  FunctionEntity lookupCallMethod(ClassEntity cls) {
+    throw new UnimplementedError('KernelInferrerEngine.lookupCallMethod');
+  }
+
+  @override
+  void forEachParameter(FunctionEntity method, void f(Local parameter)) {
+    throw new UnimplementedError('KernelInferrerEngine.forEachParameter');
+  }
+
+  @override
+  ir.Node computeMemberBody(MemberEntity member) {
+    throw new UnimplementedError('KernelInferrerEngine.computeMemberBody');
+  }
+
+  @override
+  int computeMemberSize(MemberEntity member) {
+    throw new UnimplementedError('KernelInferrerEngine.computeMemberSize');
+  }
+
+  @override
+  GlobalTypeInferenceElementData<ir.Node> createElementData() {
+    throw new UnimplementedError('KernelInferrerEngine.createElementData');
+  }
+}
+
+class KernelTypeSystemStrategy implements TypeSystemStrategy<ir.Node> {
+  const KernelTypeSystemStrategy();
+
+  @override
+  bool checkClassEntity(ClassEntity cls) => true;
+
+  @override
+  bool checkMapNode(ir.Node node) => true;
+
+  @override
+  bool checkListNode(ir.Node node) => true;
+
+  @override
+  bool checkLoopPhiNode(ir.Node node) => true;
+
+  @override
+  bool checkPhiNode(ir.Node node) => true;
+
+  @override
+  void forEachParameter(FunctionEntity function, void f(Local parameter)) {
+    throw new UnimplementedError('KernelTypeSystemStrategy.forEachParameter');
+  }
+
+  @override
+  ParameterTypeInformation createParameterTypeInformation(
+      Local parameter, TypeSystem<ir.Node> types) {
+    throw new UnimplementedError(
+        'KernelTypeSystemStrategy.createParameterTypeInformation');
+  }
+
+  @override
+  MemberTypeInformation createMemberTypeInformation(MemberEntity member) {
+    throw new UnimplementedError(
+        'KernelTypeSystemStrategy.createParameterTypeInformation');
+  }
+}
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index cb0c618..ed1eea9 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -12,7 +12,7 @@
 import '../tree/tree.dart' as ast show Node;
 import '../types/masks.dart'
     show CommonMasks, ContainerTypeMask, MapTypeMask, TypeMask;
-import '../types/types.dart' show TypesInferrer;
+import '../types/types.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show ClosedWorld, ClosedWorldRefiner;
 import 'ast_inferrer_engine.dart';
@@ -50,13 +50,15 @@
   int get length => queue.length;
 }
 
-class TypeGraphInferrer implements TypesInferrer {
-  InferrerEngine inferrer;
-  final Compiler compiler;
+abstract class TypeGraphInferrer<T> implements TypesInferrer<T> {
+  InferrerEngine<T> inferrer;
+  final bool _disableTypeInference;
   final ClosedWorld closedWorld;
   final ClosedWorldRefiner closedWorldRefiner;
 
-  TypeGraphInferrer(this.compiler, this.closedWorld, this.closedWorldRefiner);
+  TypeGraphInferrer(this.closedWorld, this.closedWorldRefiner,
+      {bool disableTypeInference: false})
+      : this._disableTypeInference = disableTypeInference;
 
   String get name => 'Graph inferrer';
 
@@ -65,51 +67,52 @@
   TypeMask get _dynamicType => commonMasks.dynamicType;
 
   void analyzeMain(FunctionEntity main) {
-    inferrer =
-        new AstInferrerEngine(compiler, closedWorld, closedWorldRefiner, main);
+    inferrer = createInferrerEngineFor(main);
     inferrer.runOverAllElements();
   }
 
-  TypeMask getReturnTypeOfMember(MemberElement element) {
-    if (compiler.disableTypeInference) return _dynamicType;
+  InferrerEngine<T> createInferrerEngineFor(FunctionEntity main);
+
+  TypeMask getReturnTypeOfMember(MemberEntity element) {
+    if (_disableTypeInference) return _dynamicType;
     // Currently, closure calls return dynamic.
-    if (element is! MethodElement) return _dynamicType;
+    if (element is! FunctionElement) return _dynamicType;
     return inferrer.types.getInferredTypeOfMember(element).type;
   }
 
-  TypeMask getReturnTypeOfParameter(ParameterElement element) {
-    if (compiler.disableTypeInference) return _dynamicType;
+  TypeMask getReturnTypeOfParameter(Local element) {
+    if (_disableTypeInference) return _dynamicType;
     return _dynamicType;
   }
 
-  TypeMask getTypeOfMember(MemberElement element) {
-    if (compiler.disableTypeInference) return _dynamicType;
+  TypeMask getTypeOfMember(MemberEntity element) {
+    if (_disableTypeInference) return _dynamicType;
     // The inferrer stores the return type for a function, so we have to
     // be careful to not return it here.
-    if (element is MethodElement) return commonMasks.functionType;
+    if (element is FunctionEntity) return commonMasks.functionType;
     return inferrer.types.getInferredTypeOfMember(element).type;
   }
 
-  TypeMask getTypeOfParameter(ParameterElement element) {
-    if (compiler.disableTypeInference) return _dynamicType;
+  TypeMask getTypeOfParameter(Local element) {
+    if (_disableTypeInference) return _dynamicType;
     // The inferrer stores the return type for a function, so we have to
     // be careful to not return it here.
     return inferrer.types.getInferredTypeOfParameter(element).type;
   }
 
-  TypeMask getTypeForNewList(ast.Node node) {
-    if (compiler.disableTypeInference) return _dynamicType;
+  TypeMask getTypeForNewList(T node) {
+    if (_disableTypeInference) return _dynamicType;
     return inferrer.types.allocatedLists[node].type;
   }
 
-  bool isFixedArrayCheckedForGrowable(ast.Node node) {
-    if (compiler.disableTypeInference) return true;
+  bool isFixedArrayCheckedForGrowable(T node) {
+    if (_disableTypeInference) return true;
     ListTypeInformation info = inferrer.types.allocatedLists[node];
     return info.checksGrowable;
   }
 
   TypeMask getTypeOfSelector(Selector selector, TypeMask mask) {
-    if (compiler.disableTypeInference) return _dynamicType;
+    if (_disableTypeInference) return _dynamicType;
     // Bailout for closure calls. We're not tracking types of
     // closures.
     if (selector.isClosureCall) return _dynamicType;
@@ -137,16 +140,16 @@
     return result;
   }
 
-  Iterable<MemberEntity> getCallersOf(MemberElement element) {
-    if (compiler.disableTypeInference) {
+  Iterable<MemberEntity> getCallersOf(MemberEntity element) {
+    if (_disableTypeInference) {
       throw new UnsupportedError(
           "Cannot query the type inferrer when type inference is disabled.");
     }
     return inferrer.getCallersOf(element);
   }
 
-  bool isMemberCalledOnce(MemberElement element) {
-    if (compiler.disableTypeInference) return false;
+  bool isMemberCalledOnce(MemberEntity element) {
+    if (_disableTypeInference) return false;
     MemberTypeInformation info =
         inferrer.types.getInferredTypeOfMember(element);
     return info.isCalledOnce();
@@ -156,3 +159,24 @@
     inferrer.clear();
   }
 }
+
+class AstTypeGraphInferrer extends TypeGraphInferrer<ast.Node> {
+  final Compiler _compiler;
+
+  AstTypeGraphInferrer(
+      this._compiler, ClosedWorld closedWorld, closedWorldRefiner,
+      {bool disableTypeInference: false})
+      : super(closedWorld, closedWorldRefiner,
+            disableTypeInference: disableTypeInference);
+
+  @override
+  InferrerEngine<ast.Node> createInferrerEngineFor(FunctionEntity main) {
+    return new AstInferrerEngine(
+        _compiler, closedWorld, closedWorldRefiner, main);
+  }
+
+  @override
+  GlobalTypeInferenceResults createResults() {
+    return new AstGlobalTypeInferenceResults(this, closedWorld);
+  }
+}
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 5e5ac5c..e98e587 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -6,7 +6,6 @@
 import '../common_elements.dart';
 import '../constants/values.dart';
 import '../elements/entities.dart';
-import '../elements/resolution_types.dart' show ResolutionTypedefType;
 import '../elements/types.dart';
 import '../io/code_output.dart';
 import '../js/js.dart' as jsAst;
@@ -282,7 +281,7 @@
     Entity element;
     if (type is InterfaceType) {
       element = type.element;
-    } else if (type is ResolutionTypedefType) {
+    } else if (type is TypedefType) {
       // TODO(redemption): Handle typedef type literals from .dill.
       element = type.element;
     } else {
diff --git a/pkg/compiler/lib/src/js_backend/element_strategy.dart b/pkg/compiler/lib/src/js_backend/element_strategy.dart
index e50e524..e1c77da 100644
--- a/pkg/compiler/lib/src/js_backend/element_strategy.dart
+++ b/pkg/compiler/lib/src/js_backend/element_strategy.dart
@@ -13,6 +13,7 @@
 import '../compiler.dart';
 import '../elements/elements.dart';
 import '../enqueue.dart';
+import '../inferrer/type_graph_inferrer.dart' show AstTypeGraphInferrer;
 import '../io/multi_information.dart' show MultiSourceInformationStrategy;
 import '../io/position_information.dart' show PositionSourceInformationStrategy;
 import '../io/source_information.dart';
@@ -26,6 +27,7 @@
 import '../ssa/builder.dart';
 import '../ssa/rasta_ssa_builder_task.dart';
 import '../ssa/ssa.dart';
+import '../types/types.dart';
 import '../options.dart';
 import '../universe/world_builder.dart';
 import '../universe/world_impact.dart';
@@ -105,6 +107,14 @@
       return const StartEndSourceInformationStrategy();
     }
   }
+
+  @override
+  TypesInferrer createTypesInferrer(ClosedWorldRefiner closedWorldRefiner,
+      {bool disableTypeInference: false}) {
+    return new AstTypeGraphInferrer(
+        _compiler, closedWorldRefiner.closedWorld, closedWorldRefiner,
+        disableTypeInference: disableTypeInference);
+  }
 }
 
 /// Builder that creates the work item necessary for the code generation of a
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index a5b2131..66d8086 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -1935,8 +1935,13 @@
     // Generates something like 'Type_String_k8F', using the simple name of the
     // type and a hash to disambiguate the same name in different libraries.
     addRoot('Type');
-    ResolutionDartType type = constant.representedType;
-    String name = type.element?.name;
+    DartType type = constant.representedType;
+    String name;
+    if (type is InterfaceType) {
+      name = type.element.name;
+    } else if (type is TypedefType) {
+      name = type.element.name;
+    }
     if (name == null) {
       // e.g. DartType 'dynamic' has no element.
       name = rtiEncoder.getTypeRepresentationForTypeConstant(type);
@@ -2059,7 +2064,7 @@
 
   @override
   int visitType(TypeConstantValue constant, [_]) {
-    ResolutionDartType type = constant.representedType;
+    DartType type = constant.representedType;
     // This name includes the library name and type parameters.
     String name = rtiEncoder.getTypeRepresentationForTypeConstant(type);
     return _hashString(4, name);
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 8f96de0..05d21bd 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -291,9 +291,31 @@
     return jsInteropClasses.containsKey(element);
   }
 
+  bool _isJsInteropMember(MemberEntity element) {
+    return jsInteropMembers.containsKey(element);
+  }
+
   @override
   bool isJsInteropMember(MemberEntity element) {
-    return jsInteropMembers.containsKey(element);
+    // TODO(johnniwinther): Share this with [NativeDataImpl.isJsInteropMember].
+    if (element.isFunction ||
+        element.isConstructor ||
+        element.isGetter ||
+        element.isSetter) {
+      FunctionEntity function = element;
+      if (!function.isExternal) return false;
+
+      if (_isJsInteropMember(function)) return true;
+      if (function.enclosingClass != null) {
+        return isJsInteropClass(function.enclosingClass);
+      }
+      if (function.isTopLevel) {
+        return isJsInteropLibrary(function.library);
+      }
+      return false;
+    } else {
+      return _isJsInteropMember(element);
+    }
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 25b5d4b..572bbe8 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -922,7 +922,7 @@
   @override
   String getTypeRepresentationForTypeConstant(DartType type) {
     if (type.isDynamic) return "dynamic";
-    if (type is ResolutionTypedefType) {
+    if (type is TypedefType) {
       return namer.uniqueNameForTypeConstantElement(
           type.element.library, type.element);
     }
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index faa5244..778f126 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -1708,8 +1708,12 @@
           };
           // Function for initializing a loaded hunk, given its hash.
           #initializeLoadedHunk = function(hunkHash) {
-            $deferredInitializers[hunkHash](
-            #globalsHolder, ${namer.staticStateHolder});
+            var hunk = $deferredInitializers[hunkHash];
+            if (hunk == null) {
+                throw "DeferredLoading state error: code with hash '" +
+                    hunkHash + "' was not loaded";
+            }
+            hunk(#globalsHolder, ${namer.staticStateHolder});
             #deferredInitialized[hunkHash] = true;
           };
         }
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index 786d947..10bbb77 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -27,7 +27,7 @@
 import '../../elements/entities.dart';
 import '../../elements/resolution_types.dart'
     show ResolutionDartType, ResolutionFunctionType, ResolutionTypedefType;
-import '../../elements/types.dart' show DartType, DartTypes;
+import '../../elements/types.dart' show DartType, DartTypes, FunctionType;
 import '../../js/js.dart' as js;
 import '../../js_backend/backend.dart' show SuperMemberData;
 import '../../js_backend/backend_usage.dart';
@@ -970,7 +970,7 @@
   }
 
   js.Expression _generateFunctionType(
-      ResolutionFunctionType type, OutputUnit outputUnit) {
+      FunctionType type, OutputUnit outputUnit) {
     if (type.containsTypeVariables) {
       js.Expression thisAccess = js.js(r'this.$receiver');
       return _rtiEncoder.getSignatureEncoding(_task.emitter, type, thisAccess);
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 338f22e..a9f53e0 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
@@ -1303,7 +1303,12 @@
     /// deferred hunk.
     js.Expression initializeLoadedHunkFunction = js.js("""
             function(hash) {
-              initializeDeferredHunk($deferredGlobal[hash]);
+              var hunk = $deferredGlobal[hash];
+              if (hunk == null) {
+                throw "DeferredLoading state error: code with hash '" +
+                    hash + "' was not loaded";
+              }
+              initializeDeferredHunk(hunk);
               #deferredInitialized[hash] = true;
             }""", {
       'deferredInitialized': generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index bcd5228..1e086df 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -23,7 +23,7 @@
 class KernelClosureAnalysis {
   /// Inspect members and mark if those members capture any state that needs to
   /// be marked as free variables.
-  static ClosureModel computeClosureModel(MemberEntity entity, ir.Member node) {
+  static ScopeModel computeScopeModel(MemberEntity entity, ir.Member node) {
     if (entity.isAbstract) return null;
     if (entity.isField && !entity.isInstanceMember) {
       ir.Field field = node;
@@ -31,12 +31,15 @@
       if (field.initializer == null) return null;
     }
 
-    ClosureModel model = new ClosureModel();
+    ScopeModel model = new ScopeModel();
     CapturedScopeBuilder translator = new CapturedScopeBuilder(model,
         hasThisLocal: entity.isInstanceMember || entity.isConstructor);
     if (entity.isField) {
       if (node is ir.Field && node.initializer != null) {
         translator.translateLazyInitializer(node);
+      } else {
+        assert(entity.isInstanceMember);
+        model.scopeInfo = new KernelScopeInfo(true);
       }
     } else {
       assert(node is ir.Procedure || node is ir.Constructor);
@@ -64,7 +67,7 @@
 class KernelClosureConversionTask extends ClosureConversionTask<ir.Node> {
   final KernelToElementMapForBuilding _elementMap;
   final GlobalLocalsMap _globalLocalsMap;
-  final Map<MemberEntity, ClosureModel> _closureModels;
+  final Map<MemberEntity, ScopeModel> _closureModels;
 
   /// Map of the scoping information that corresponds to a particular entity.
   Map<Entity, ScopeInfo> _scopeMap = <Entity, ScopeInfo>{};
@@ -89,9 +92,9 @@
     _createClosureEntities(_closureModels, closedWorldRefiner);
   }
 
-  void _createClosureEntities(Map<MemberEntity, ClosureModel> closureModels,
+  void _createClosureEntities(Map<MemberEntity, ScopeModel> closureModels,
       JsClosedWorld closedWorldRefiner) {
-    closureModels.forEach((MemberEntity member, ClosureModel model) {
+    closureModels.forEach((MemberEntity member, ScopeModel model) {
       KernelToLocalsMap localsMap = _globalLocalsMap.getLocalsMap(member);
       if (model.scopeInfo != null) {
         _scopeMap[member] = new JsScopeInfo.from(model.scopeInfo, localsMap);
@@ -177,11 +180,19 @@
       _capturedScopesMap[loopNode] ?? const CapturedLoopScope();
 
   @override
-  // TODO(efortuna): Eventually closureRepresentationMap[node] should always be
-  // non-null, and we should just test that with an assert.
   ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) {
-    return _closureRepresentationMap[entity] ??
-        const ClosureRepresentationInfo();
+    var closure = _closureRepresentationMap[entity];
+    assert(
+        closure != null,
+        "Corresponding closure class not found for $entity. "
+        "Closures found for ${_closureRepresentationMap.keys}");
+    return closure;
+  }
+
+  @override
+  ClosureRepresentationInfo getClosureRepresentationInfoForTesting(
+      Entity member) {
+    return _closureRepresentationMap[member];
   }
 }
 
@@ -328,6 +339,7 @@
   final JLibrary library;
   JFunction callMethod;
   final Local closureEntity;
+  final Local thisLocal;
 
   /// Index into the classData, classList and classEnvironment lists where this
   /// entity is stored in [JsToFrontendMapImpl].
@@ -345,14 +357,15 @@
       : closureEntity = closureSourceNode.parent is ir.Member
             ? null
             : localsMap.getLocalFunction(closureSourceNode.parent),
+        thisLocal =
+            info.hasThisLocal ? new ThisLocal(localsMap.currentMember) : null,
         super.from(info, localsMap);
 
   ClassEntity get closureClassEntity => this;
 
   List<Local> get createdFieldEntities => localToFieldMap.keys.toList();
 
-  // TODO(efortuna): Implement.
-  FieldEntity get thisFieldEntity => null;
+  FieldEntity get thisFieldEntity => localToFieldMap[thisLocal];
 
   void forEachCapturedVariable(f(Local from, JField to)) {
     localToFieldMap.forEach(f);
@@ -504,12 +517,9 @@
       'ClosureMemberDefinition(kind:$kind,member:$member,location:$location)';
 }
 
-/// Collection of closure data collected for a single member.
-class ClosureModel {
-  /// Collection [ScopeInfo] data for the member, if any.
-  // TODO(johnniwinther): [scopeInfo] seem to be missing only for fields
-  // without initializers; we shouldn't even create a [ClosureModel] in these
-  // cases.
+/// Collection of scope data collected for a single member.
+class ScopeModel {
+  /// Collection [ScopeInfo] data for the member.
   KernelScopeInfo scopeInfo;
 
   /// Collected [CapturedScope] data for nodes.
diff --git a/pkg/compiler/lib/src/js_model/closure_visitors.dart b/pkg/compiler/lib/src/js_model/closure_visitors.dart
index a820289..b6e7d3b 100644
--- a/pkg/compiler/lib/src/js_model/closure_visitors.dart
+++ b/pkg/compiler/lib/src/js_model/closure_visitors.dart
@@ -13,7 +13,7 @@
 class CapturedScopeBuilder extends ir.Visitor {
   ir.TreeNode _currentLocalFunction;
 
-  ClosureModel _model;
+  ScopeModel _model;
 
   /// A map of each visited call node with the associated information about what
   /// variables are captured/used. Each ir.Node key corresponds to a scope that
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index ebab422..36e6901 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -101,6 +101,11 @@
     return new JClass(library, classIndex, name, isAbstract: isAbstract);
   }
 
+  IndexedTypedef createTypedef(
+      LibraryEntity library, int typedefIndex, String name) {
+    return new JTypedef(library, typedefIndex, name);
+  }
+
   TypeVariableEntity createTypeVariable(
       int typeVariableIndex, Entity typeDeclaration, String name, int index) {
     return new JTypeVariable(typeVariableIndex, typeDeclaration, name, index);
@@ -263,6 +268,12 @@
   }
 
   @override
+  DartType visitTypedefType(TypedefType type, EntityConverter converter) {
+    return new TypedefType(
+        converter(type.element), visitList(type.typeArguments, converter));
+  }
+
+  @override
   DartType visitFunctionType(FunctionType type, EntityConverter converter) {
     return new FunctionType(
         visit(type.returnType, converter),
@@ -314,6 +325,19 @@
   String toString() => '${jsElementPrefix}class($name)';
 }
 
+class JTypedef implements TypedefEntity, IndexedTypedef {
+  final JLibrary library;
+
+  /// Typedef index used for fast lookup in [JsToFrontendMapImpl].
+  final int typedefIndex;
+
+  final String name;
+
+  JTypedef(this.library, this.typedefIndex, this.name);
+
+  String toString() => '${jsElementPrefix}typedef($name)';
+}
+
 abstract class JMember implements MemberEntity, IndexedMember {
   /// Member index used for fast lookup in [JsToFrontendMapImpl].
   final int memberIndex;
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 833f3b8..cb118b7 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -16,6 +16,7 @@
 import '../elements/types.dart';
 import '../enqueue.dart';
 import '../io/source_information.dart';
+import '../inferrer/kernel_inferrer_engine.dart';
 import '../js_emitter/sorter.dart';
 import '../js/js_source_mapping.dart';
 import '../js_backend/backend.dart';
@@ -30,6 +31,7 @@
 import '../kernel/kernel_strategy.dart';
 import '../native/behavior.dart';
 import '../ssa/ssa.dart';
+import '../types/types.dart';
 import '../universe/class_set.dart';
 import '../universe/world_builder.dart';
 import '../util/emptyset.dart';
@@ -355,6 +357,14 @@
   SourceSpan spanFromSpannable(Spannable spannable, Entity currentElement) {
     return _elementMap.getSourceSpan(spannable, currentElement);
   }
+
+  @override
+  TypesInferrer createTypesInferrer(ClosedWorldRefiner closedWorldRefiner,
+      {bool disableTypeInference: false}) {
+    return new KernelTypeGraphInferrer(
+        _compiler, closedWorldRefiner.closedWorld, closedWorldRefiner,
+        disableTypeInference: disableTypeInference);
+  }
 }
 
 class JsClosedWorld extends ClosedWorldBase with KernelClosedWorldMixin {
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index dfb5a22..9bad04e 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -64,6 +64,9 @@
   /// Returns the [ClassEntity] corresponding to the class [node].
   ClassEntity getClass(ir.Class node);
 
+  /// Returns the [TypedefType] corresponding to raw type of the typedef [node].
+  TypedefType getTypedefType(ir.Typedef node);
+
   /// Returns the super [MemberEntity] for a super invocation, get or set of
   /// [name] from the member [context].
   ///
@@ -142,8 +145,9 @@
   /// Computes the native behavior for writing to the native [field].
   native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field);
 
-  /// Computes the native behavior for calling [procedure].
-  native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure,
+  /// Computes the native behavior for calling the function or constructor
+  /// [member].
+  native.NativeBehavior getNativeBehaviorForMethod(ir.Member member,
       {bool isJsInterop});
 
   /// Compute the kind of foreign helper function called by [node], if any.
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 71e0ad1..8437fe8 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -82,6 +82,7 @@
   List<ClassEntity> _classList = <ClassEntity>[];
   List<MemberEntity> _memberList = <MemberEntity>[];
   List<TypeVariableEntity> _typeVariableList = <TypeVariableEntity>[];
+  List<TypedefEntity> _typedefList = <TypedefEntity>[];
 
   /// List of library environments by `IndexedLibrary.libraryIndex`. This is
   /// used for fast lookup into library classes and members.
@@ -103,6 +104,10 @@
   /// fast lookup into member properties.
   List<MemberData> _memberData = <MemberData>[];
 
+  /// List of typedef data by `IndexedTypedef.typedefIndex`. This is used for
+  /// fast lookup into typedef properties.
+  List<TypedefData> _typedefData = <TypedefData>[];
+
   KernelToElementMapBase(this.reporter, Environment environment) {
     _elementEnvironment = new KernelElementEnvironment(this);
     _commonElements = new CommonElements(_elementEnvironment);
@@ -247,8 +252,6 @@
     assert(checkFamily(cls));
     if (data.thisType == null) {
       ir.Class node = data.cls;
-      // TODO(johnniwinther): Add the type argument to the list literal when we
-      // no longer use resolution types.
       if (node.typeParameters.isEmpty) {
         data.thisType =
             data.rawType = new InterfaceType(cls, const <DartType>[]);
@@ -324,6 +327,14 @@
   }
 
   @override
+  TypedefType getTypedefType(ir.Typedef node) {
+    IndexedTypedef typedef = _getTypedef(node);
+    return _typedefData[typedef.typedefIndex].rawType;
+  }
+
+  TypedefEntity _getTypedef(ir.Typedef node);
+
+  @override
   MemberEntity getMember(ir.Member node) {
     if (node is ir.Field) {
       return _getField(node);
@@ -395,8 +406,6 @@
   DartType getDartType(ir.DartType type) => _typeConverter.convert(type);
 
   List<DartType> getDartTypes(List<ir.DartType> types) {
-    // TODO(johnniwinther): Add the type argument to the list literal when we
-    // no longer use resolution types.
     List<DartType> list = <DartType>[];
     types.forEach((ir.DartType type) {
       list.add(getDartType(type));
@@ -611,9 +620,12 @@
   List<MemberEntity> get _memberList;
   List<MemberData> get _memberData;
   List<TypeVariableEntity> get _typeVariableList;
+  List<TypedefEntity> get _typedefList;
+  List<TypedefData> get _typedefData;
 
   Map<ir.Library, IndexedLibrary> _libraryMap = <ir.Library, IndexedLibrary>{};
   Map<ir.Class, IndexedClass> _classMap = <ir.Class, IndexedClass>{};
+  Map<ir.Typedef, IndexedTypedef> _typedefMap = <ir.Typedef, IndexedTypedef>{};
   Map<ir.TypeParameter, IndexedTypeVariable> _typeVariableMap =
       <ir.TypeParameter, IndexedTypeVariable>{};
   Map<ir.Member, IndexedConstructor> _constructorMap =
@@ -671,6 +683,21 @@
     });
   }
 
+  TypedefEntity _getTypedef(ir.Typedef node) {
+    return _typedefMap.putIfAbsent(node, () {
+      IndexedLibrary library = _getLibrary(node.enclosingLibrary);
+      TypedefEntity typedef =
+          createTypedef(library, _typedefList.length, node.name);
+      TypedefType typedefType = new TypedefType(
+          typedef,
+          new List<DartType>.filled(
+              node.typeParameters.length, const DynamicType()));
+      _typedefData.add(new TypedefData(node, typedef, typedefType));
+      _typedefList.add(typedef);
+      return typedef;
+    });
+  }
+
   TypeVariableEntity _getTypeVariable(ir.TypeParameter node) {
     return _typeVariableMap.putIfAbsent(node, () {
       if (node.parent is ir.Class) {
@@ -855,6 +882,9 @@
   IndexedClass createClass(LibraryEntity library, int classIndex, String name,
       {bool isAbstract});
 
+  IndexedTypedef createTypedef(
+      LibraryEntity library, int typedefIndex, String name);
+
   TypeVariableEntity createTypeVariable(
       int typeVariableIndex, Entity typeDeclaration, String name, int index);
 
@@ -911,6 +941,12 @@
     return new KClass(library, classIndex, name, isAbstract: isAbstract);
   }
 
+  @override
+  IndexedTypedef createTypedef(
+      LibraryEntity library, int typedefIndex, String name) {
+    throw new UnsupportedError('KElementCreatorMixin.createTypedef');
+  }
+
   TypeVariableEntity createTypeVariable(
       int typeVariableIndex, Entity typeDeclaration, String name, int index) {
     return new KTypeVariable(typeVariableIndex, typeDeclaration, name, index);
@@ -1025,9 +1061,9 @@
         _memberData[member.memberIndex].definition.node, this);
   }
 
-  ClosureModel computeClosureModel(KMember member) {
+  ScopeModel computeScopeModel(KMember member) {
     ir.Member node = _memberData[member.memberIndex].definition.node;
-    return KernelClosureAnalysis.computeClosureModel(member, node);
+    return KernelClosureAnalysis.computeScopeModel(member, node);
   }
 
   /// Returns the kernel [ir.Procedure] node for the [method].
@@ -1559,18 +1595,18 @@
 
   @override
   bool isNamedMixinApplication(ClassEntity cls) {
-    throw new UnimplementedError(
-        'KernelClosedWorldMixin.isNamedMixinApplication');
+    return elementMap._isMixinApplication(cls) &&
+        elementMap._isUnnamedMixinApplication(cls);
   }
 
   @override
   ClassEntity getAppliedMixin(ClassEntity cls) {
-    throw new UnimplementedError('KernelClosedWorldMixin.getAppliedMixin');
+    return elementMap._getAppliedMixin(cls);
   }
 
   @override
   Iterable<ClassEntity> getInterfaces(ClassEntity cls) {
-    throw new UnimplementedError('KernelClosedWorldMixin.getInterfaces');
+    return elementMap._getInterfaces(cls).map((t) => t.element);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/kernel/element_map_mixins.dart b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
index 8b30d0b..f017bee 100644
--- a/pkg/compiler/lib/src/kernel/element_map_mixins.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
@@ -402,12 +402,19 @@
     return nativeBehaviorBuilder.buildFieldStoreBehavior(type);
   }
 
-  /// Computes the native behavior for calling [procedure].
+  /// Computes the native behavior for calling [member].
   // TODO(johnniwinther): Cache this for later use.
-  native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure,
+  native.NativeBehavior getNativeBehaviorForMethod(ir.Member member,
       {bool isJsInterop}) {
-    DartType type = getFunctionType(procedure.function);
-    List<ConstantValue> metadata = getMetadata(procedure.annotations);
+    DartType type;
+    if (member is ir.Procedure) {
+      type = getFunctionType(member.function);
+    } else if (member is ir.Constructor) {
+      type = getFunctionType(member.function);
+    } else {
+      failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected method node $member.");
+    }
+    List<ConstantValue> metadata = getMetadata(member.annotations);
     return nativeBehaviorBuilder.buildMethodBehavior(
         type, metadata, typeLookup(resolveAsRaw: false),
         isJsInterop: isJsInterop);
@@ -617,16 +624,26 @@
 
   @override
   ConstantExpression visitTypeLiteral(ir.TypeLiteral node) {
-    DartType type = elementMap.getDartType(node.type);
     String name;
+    DartType type = elementMap.getDartType(node.type);
     if (type.isDynamic) {
       name = 'dynamic';
     } else if (type is InterfaceType) {
       name = type.element.name;
-    } else if (type.isFunctionType || type.isTypedef) {
+    } else if (type.isTypedef) {
       // TODO(johnniwinther): Compute a name for the type literal? It is only
       // used in error messages in the old SSA builder.
       name = '?';
+    } else if (node.type is ir.FunctionType) {
+      ir.FunctionType functionType = node.type;
+      if (functionType.typedef != null) {
+        type = elementMap.getTypedefType(functionType.typedef);
+        name = functionType.typedef.name;
+      } else {
+        // TODO(johnniwinther): Remove branch when [KernelAstAdapter] is
+        // removed.
+        name = '?';
+      }
     } else {
       return defaultExpression(node);
     }
diff --git a/pkg/compiler/lib/src/kernel/elements.dart b/pkg/compiler/lib/src/kernel/elements.dart
index 241448f..5c334fe 100644
--- a/pkg/compiler/lib/src/kernel/elements.dart
+++ b/pkg/compiler/lib/src/kernel/elements.dart
@@ -32,3 +32,8 @@
   /// Type variable index used for fast lookup in [KernelToElementMapBase].
   int get typeVariableIndex;
 }
+
+abstract class IndexedTypedef implements TypedefEntity {
+  /// Typedef index used for fast lookup in [KernelToElementMapBase].
+  int get typedefIndex;
+}
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index 7ffc471..57c853b 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -593,3 +593,11 @@
     return new FieldDataImpl(node, definition);
   }
 }
+
+class TypedefData {
+  final ir.Typedef node;
+  final TypedefEntity element;
+  final TypedefType rawType;
+
+  TypedefData(this.node, this.element, this.rawType);
+}
diff --git a/pkg/compiler/lib/src/kernel/kernel.dart b/pkg/compiler/lib/src/kernel/kernel.dart
index af37e8d4..afd9fc2 100644
--- a/pkg/compiler/lib/src/kernel/kernel.dart
+++ b/pkg/compiler/lib/src/kernel/kernel.dart
@@ -176,6 +176,15 @@
         // above gives them in reversed order.
         classes.forEach(libraryNode.addClass);
         members.forEach(libraryNode.addMember);
+        // TODO(sigmund): include combinators, etc.
+        library.imports.forEach((ImportElement import) {
+          libraryNode.addDependency(new ir.LibraryDependency.import(
+              libraryToIr(import.importedLibrary)));
+        });
+        library.exports.forEach((ExportElement export) {
+          libraryNode.addDependency(new ir.LibraryDependency.export(
+              libraryToIr(export.exportedLibrary)));
+        });
       });
       return libraryNode;
     });
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 37ca34a..567f75a 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -25,7 +25,7 @@
 import '../js_backend/native_data.dart';
 import '../js_backend/no_such_method_registry.dart';
 import '../js_backend/runtime_types.dart';
-import '../js_model/closure.dart' show ClosureModel;
+import '../js_model/closure.dart' show ScopeModel;
 import '../library_loader.dart';
 import '../native/enqueue.dart' show NativeResolutionEnqueuer;
 import '../native/resolver.dart';
@@ -47,8 +47,8 @@
 
   KernelAnnotationProcessor _annotationProcesser;
 
-  final Map<MemberEntity, ClosureModel> closureModels =
-      <MemberEntity, ClosureModel>{};
+  final Map<MemberEntity, ScopeModel> closureModels =
+      <MemberEntity, ScopeModel>{};
 
   KernelFrontEndStrategy(
       this._options, DiagnosticReporter reporter, env.Environment environment) {
@@ -155,7 +155,7 @@
   final KernelToElementMapForImpactImpl _elementMap;
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
-  final Map<MemberEntity, ClosureModel> closureModels;
+  final Map<MemberEntity, ScopeModel> closureModels;
 
   KernelWorkItemBuilder(
       this._elementMap,
@@ -178,7 +178,7 @@
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
   final MemberEntity element;
-  final Map<MemberEntity, ClosureModel> closureModels;
+  final Map<MemberEntity, ScopeModel> closureModels;
 
   KernelWorkItem(this._elementMap, this._impactTransformer,
       this._nativeMemberResolver, this.element, this.closureModels);
@@ -187,7 +187,7 @@
   WorldImpact run() {
     _nativeMemberResolver.resolveNativeMember(element);
     ResolutionImpact impact = _elementMap.computeWorldImpact(element);
-    ClosureModel closureModel = _elementMap.computeClosureModel(element);
+    ScopeModel closureModel = _elementMap.computeScopeModel(element);
     if (closureModel != null) {
       closureModels[element] = closureModel;
     }
diff --git a/pkg/compiler/lib/src/kernel/native_basic_data.dart b/pkg/compiler/lib/src/kernel/native_basic_data.dart
index c846301..ec07f7a 100644
--- a/pkg/compiler/lib/src/kernel/native_basic_data.dart
+++ b/pkg/compiler/lib/src/kernel/native_basic_data.dart
@@ -129,18 +129,33 @@
                 {'cls': cls.name, 'member': member.name});
           }
 
-          if (function is ConstructorEntity &&
-              function.isFactoryConstructor &&
-              isAnonymous) {
-            if (function.parameterStructure.requiredParameters > 0) {
+          checkFunctionParameters(function);
+        });
+        elementEnvironment.forEachConstructor(cls,
+            (ConstructorEntity constructor) {
+          String memberName = getJsInteropName(
+              library, elementEnvironment.getMemberMetadata(constructor));
+          if (memberName != null) {
+            _nativeBasicDataBuilder.markAsJsInteropMember(
+                constructor, memberName);
+          }
+
+          if (!constructor.isExternal) {
+            reporter.reportErrorMessage(
+                constructor,
+                MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
+                {'cls': cls.name, 'member': constructor.name});
+          }
+          if (constructor.isFactoryConstructor && isAnonymous) {
+            if (constructor.parameterStructure.requiredParameters > 0) {
               reporter.reportErrorMessage(
-                  function,
+                  constructor,
                   MessageKind
                       .JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
                   {'cls': cls.name});
             }
           } else {
-            checkFunctionParameters(function);
+            checkFunctionParameters(constructor);
           }
         });
       }
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index a76dcc0..38c768c 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -873,13 +873,36 @@
   // Only visible for unit testing.
   LoadedLibraries createLoadedLibraries(ir.Program program) {
     _elementMap.addProgram(program);
-    program.libraries.forEach((ir.Library library) =>
-        _allLoadedLibraries.add(_elementMap.lookupLibrary(library.importUri)));
     LibraryEntity rootLibrary = null;
+    Iterable<ir.Library> libraries = program.libraries;
     if (program.mainMethod != null) {
-      rootLibrary = _elementMap
-          .lookupLibrary(program.mainMethod.enclosingLibrary.importUri);
+      var root = program.mainMethod.enclosingLibrary;
+      rootLibrary = _elementMap.lookupLibrary(root.importUri);
+
+      // Filter unreachable libraries: [Program] was built by linking in the
+      // entire SDK libraries, not all of them are used. We include anything
+      // that is reachable from `main`. Note that all internal libraries that
+      // the compiler relies on are reachable from `dart:core`.
+      var seen = new Set<Library>();
+      search(ir.Library current) {
+        if (!seen.add(current)) return;
+        for (ir.LibraryDependency dep in current.dependencies) {
+          search(dep.targetLibrary);
+        }
+      }
+
+      search(root);
+
+      // Libraries dependencies do not show implicit imports to `dart:core`.
+      var dartCore = program.libraries.firstWhere((lib) {
+        return lib.importUri.scheme == 'dart' && lib.importUri.path == 'core';
+      });
+      search(dartCore);
+
+      libraries = libraries.where(seen.contains);
     }
+    _allLoadedLibraries.addAll(
+        libraries.map((lib) => _elementMap.lookupLibrary(lib.importUri)));
     return new _LoadedLibrariesAdapter(
         rootLibrary, _allLoadedLibraries, _elementMap);
   }
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index bb92072..2fb7738 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -496,11 +496,11 @@
     AsyncModifier asyncModifier = popNode();
     NodeList initializers = popNode();
     NodeList formals = popNode();
-    NodeList typeVariables = popNode();
     // The name can be an identifier or a send in case of named constructors.
     Expression name = popNode();
     TypeAnnotation type = popNode();
     Modifiers modifiers = popNode();
+    NodeList typeVariables = popNode();
     pushNode(new FunctionExpression(name, typeVariables, formals, body, type,
         modifiers, initializers, null, asyncModifier));
   }
diff --git a/pkg/compiler/lib/src/serialization/equivalence.dart b/pkg/compiler/lib/src/serialization/equivalence.dart
index b161a2c..1aa515a 100644
--- a/pkg/compiler/lib/src/serialization/equivalence.dart
+++ b/pkg/compiler/lib/src/serialization/equivalence.dart
@@ -712,8 +712,8 @@
   }
 
   @override
-  bool visitTypedefType(
-      ResolutionTypedefType type, covariant ResolutionTypedefType other) {
+  bool visitTypedefType(covariant ResolutionTypedefType type,
+      covariant ResolutionTypedefType other) {
     return visitGenericType(type, other);
   }
 }
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 16960d2..527e7d6 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -2124,11 +2124,18 @@
   @override
   void visitTypeLiteral(ir.TypeLiteral typeLiteral) {
     ir.DartType type = typeLiteral.type;
-    if (type is ir.InterfaceType || type is ir.DynamicType) {
+    if (type is ir.InterfaceType ||
+        type is ir.DynamicType ||
+        type is ir.TypedefType ||
+        type is ir.FunctionType) {
       ConstantValue constant = _elementMap.getConstantValue(typeLiteral);
       stack.add(graph.addConstant(constant, closedWorld));
       return;
     }
+    assert(
+        type is ir.TypeParameterType,
+        failedAt(CURRENT_ELEMENT_SPANNABLE,
+            "Unexpected type literal ${typeLiteral}."));
     // For other types (e.g. TypeParameterType, function types from expanded
     // typedefs), look-up or construct a reified type representation and convert
     // to a RuntimeType.
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index b79ec5f..ae66c07 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -375,6 +375,11 @@
         getClass(cls), getDartTypes(typeArguments));
   }
 
+  @override
+  TypedefType getTypedefType(ir.Typedef node) {
+    throw new UnsupportedError('KernelAstAdapter.getTypedefType');
+  }
+
   FunctionEntity getConstructorBody(ir.Constructor constructor) {
     AstElement element = getElement(constructor);
     MemberEntity constructorBody =
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index 3fd5548..8540e88 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -137,6 +137,14 @@
     handleSignature(constructor.function, checkReturnType: false);
     visitNodes(constructor.initializers);
     visitNode(constructor.function.body);
+    if (constructor.isExternal &&
+        !elementAdapter.isForeignLibrary(constructor.enclosingLibrary)) {
+      MemberEntity member = elementAdapter.getMember(constructor);
+      bool isJsInterop =
+          elementAdapter.nativeBasicData.isJsInteropMember(member);
+      impactBuilder.registerNativeData(elementAdapter
+          .getNativeBehaviorForMethod(constructor, isJsInterop: isJsInterop));
+    }
     return impactBuilder;
   }
 
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index 18cc72a..08203c8 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -37,8 +37,7 @@
 
   /// Produces code that checks the runtime type is actually the type specified
   /// by attempting a type conversion.
-  HInstruction _checkType(
-      HInstruction original, ResolutionDartType type, int kind) {
+  HInstruction _checkType(HInstruction original, DartType type, int kind) {
     assert(builder.options.enableTypeAssertions);
     assert(type != null);
     type = builder.localsHandler.substInContext(type);
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 2a132f1..03d72ea 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -28,7 +28,7 @@
 /// implementation would return false on all boolean properties (giving no
 /// guarantees) and the `subclass of Object or null` type mask for the type
 /// based queries (the runtime value could be anything).
-abstract class GlobalTypeInferenceElementResult {
+abstract class GlobalTypeInferenceElementResult<T> {
   /// Whether the method element associated with this result always throws.
   bool get throwsAlways;
 
@@ -40,54 +40,55 @@
   TypeMask get returnType;
 
   /// Returns the type of a list new expression [node].
-  TypeMask typeOfNewList(Send node);
+  TypeMask typeOfNewList(T node);
 
   /// Returns the type of a list literal [node].
-  TypeMask typeOfListLiteral(LiteralList node);
+  TypeMask typeOfListLiteral(T node);
 
   /// Returns the type of a send [node].
-  TypeMask typeOfSend(Send node);
-
-  /// Returns the type of the operator of a complex send-set [node], for
-  /// example, the type of `+` in `a += b`.
-  TypeMask typeOfGetter(SendSet node);
+  // TODO(johnniwinther): Rename this.
+  TypeMask typeOfSend(T node);
 
   /// Returns the type of the getter in a complex send-set [node], for example,
   /// the type of the `a.f` getter in `a.f += b`.
-  TypeMask typeOfOperator(SendSet node);
+  TypeMask typeOfGetter(T node);
+
+  /// Returns the type of the operator of a complex send-set [node], for
+  /// example, the type of `+` in `a += b`.
+  TypeMask typeOfOperator(T node);
 
   /// Returns the type of the iterator in a [loop].
-  TypeMask typeOfIterator(ForIn node);
+  TypeMask typeOfIterator(T node);
 
   /// Returns the type of the `moveNext` call of an iterator in a [loop].
-  TypeMask typeOfIteratorMoveNext(ForIn node);
+  TypeMask typeOfIteratorMoveNext(T node);
 
   /// Returns the type of the `current` getter of an iterator in a [loop].
-  TypeMask typeOfIteratorCurrent(ForIn node);
+  TypeMask typeOfIteratorCurrent(T node);
 }
 
-abstract class GlobalTypeInferenceMemberResult
-    extends GlobalTypeInferenceElementResult {
+abstract class GlobalTypeInferenceMemberResult<T>
+    extends GlobalTypeInferenceElementResult<T> {
   /// Whether the member associated with this result is only called once in one
   /// location in the entire program.
   bool get isCalledOnce;
 }
 
-abstract class GlobalTypeInferenceElementResultImpl
-    implements GlobalTypeInferenceElementResult {
-  // TODO(sigmund): delete, store data directly here.
-  final Element _owner;
+abstract class GlobalTypeInferenceParameterResult<T>
+    extends GlobalTypeInferenceElementResult<T> {}
 
+abstract class GlobalTypeInferenceElementResultImpl<T>
+    implements GlobalTypeInferenceElementResult<T> {
   // TODO(sigmund): split - stop using _data after inference is done.
-  final GlobalTypeInferenceElementData _data;
+  final GlobalTypeInferenceElementData<T> _data;
 
   // TODO(sigmund): store relevant data & drop reference to inference engine.
-  final TypesInferrer _inferrer;
+  final TypesInferrer<T> _inferrer;
   final bool _isJsInterop;
   final TypeMask _dynamic;
 
-  GlobalTypeInferenceElementResultImpl.internal(this._owner, this._data,
-      this._inferrer, this._isJsInterop, this._dynamic);
+  GlobalTypeInferenceElementResultImpl(
+      this._data, this._inferrer, this._isJsInterop, this._dynamic);
 
   bool get throwsAlways {
     TypeMask mask = this.returnType;
@@ -95,31 +96,32 @@
     return mask != null && mask.isEmpty;
   }
 
-  TypeMask typeOfNewList(Send node) => _inferrer.getTypeForNewList(node);
+  TypeMask typeOfNewList(T node) => _inferrer.getTypeForNewList(node);
 
-  TypeMask typeOfListLiteral(LiteralList node) =>
-      _inferrer.getTypeForNewList(node);
+  TypeMask typeOfListLiteral(T node) => _inferrer.getTypeForNewList(node);
 
-  TypeMask typeOfSend(Send node) => _data?.typeOfSend(node);
-  TypeMask typeOfGetter(SendSet node) => _data?.typeOfGetter(node);
-  TypeMask typeOfOperator(SendSet node) => _data?.typeOfOperator(node);
-  TypeMask typeOfIterator(ForIn node) => _data?.typeOfIterator(node);
-  TypeMask typeOfIteratorMoveNext(ForIn node) =>
+  TypeMask typeOfSend(T node) => _data?.typeOfSend(node);
+  TypeMask typeOfGetter(T node) => _data?.typeOfGetter(node);
+  TypeMask typeOfOperator(T node) => _data?.typeOfOperator(node);
+  TypeMask typeOfIterator(T node) => _data?.typeOfIterator(node);
+  TypeMask typeOfIteratorMoveNext(T node) =>
       _data?.typeOfIteratorMoveNext(node);
-  TypeMask typeOfIteratorCurrent(ForIn node) =>
-      _data?.typeOfIteratorCurrent(node);
+  TypeMask typeOfIteratorCurrent(T node) => _data?.typeOfIteratorCurrent(node);
 }
 
-class GlobalTypeInferenceMemberResultImpl
-    extends GlobalTypeInferenceElementResultImpl
-    implements GlobalTypeInferenceMemberResult {
+class GlobalTypeInferenceMemberResultImpl<T>
+    extends GlobalTypeInferenceElementResultImpl<T>
+    implements GlobalTypeInferenceMemberResult<T> {
+  // TODO(sigmund): delete, store data directly here.
+  final MemberEntity _owner;
+
   GlobalTypeInferenceMemberResultImpl(
-      MemberElement owner,
+      this._owner,
       GlobalTypeInferenceElementData data,
       TypesInferrer inferrer,
       bool isJsInterop,
       TypeMask _dynamic)
-      : super.internal(owner, data, inferrer, isJsInterop, _dynamic);
+      : super(data, inferrer, isJsInterop, _dynamic);
 
   bool get isCalledOnce => _inferrer.isMemberCalledOnce(_owner);
 
@@ -130,11 +132,15 @@
       _isJsInterop ? _dynamic : _inferrer.getTypeOfMember(_owner);
 }
 
-class GlobalTypeInferenceParameterResult
-    extends GlobalTypeInferenceElementResultImpl {
-  GlobalTypeInferenceParameterResult(
-      ParameterElement owner, TypesInferrer inferrer, TypeMask _dynamic)
-      : super.internal(owner, null, inferrer, false, _dynamic);
+class GlobalTypeInferenceParameterResultImpl<T>
+    extends GlobalTypeInferenceElementResultImpl<T>
+    implements GlobalTypeInferenceParameterResult<T> {
+  // TODO(sigmund): delete, store data directly here.
+  final Local _owner;
+
+  GlobalTypeInferenceParameterResultImpl(
+      this._owner, TypesInferrer inferrer, TypeMask _dynamic)
+      : super(null, inferrer, false, _dynamic);
 
   TypeMask get returnType =>
       _isJsInterop ? _dynamic : _inferrer.getReturnTypeOfParameter(_owner);
@@ -224,17 +230,18 @@
 }
 
 /// API to interact with the global type-inference engine.
-abstract class TypesInferrer {
+abstract class TypesInferrer<T> {
   void analyzeMain(FunctionEntity element);
-  TypeMask getReturnTypeOfMember(MemberElement element);
-  TypeMask getReturnTypeOfParameter(ParameterElement element);
-  TypeMask getTypeOfMember(MemberElement element);
-  TypeMask getTypeOfParameter(ParameterElement element);
-  TypeMask getTypeForNewList(Node node);
+  TypeMask getReturnTypeOfMember(MemberEntity element);
+  TypeMask getReturnTypeOfParameter(Local element);
+  TypeMask getTypeOfMember(MemberEntity element);
+  TypeMask getTypeOfParameter(Local element);
+  TypeMask getTypeForNewList(T node);
   TypeMask getTypeOfSelector(Selector selector, TypeMask mask);
   void clear();
-  bool isMemberCalledOnce(MemberElement element);
-  bool isFixedArrayCheckedForGrowable(Node node);
+  bool isMemberCalledOnce(MemberEntity element);
+  bool isFixedArrayCheckedForGrowable(T node);
+  GlobalTypeInferenceResults createResults();
 }
 
 /// Results produced by the global type-inference algorithm.
@@ -243,51 +250,48 @@
 /// closed-world semantics. Any [TypeMask] for an element or node that we return
 /// was inferred to be a "guaranteed type", that means, it is a type that we
 /// can prove to be correct for all executions of the program.
-class GlobalTypeInferenceResults {
+abstract class GlobalTypeInferenceResults<T> {
   // TODO(sigmund): store relevant data & drop reference to inference engine.
-  final TypeGraphInferrer _inferrer;
+  final TypeGraphInferrer<T> _inferrer;
   final ClosedWorld closedWorld;
-  final Map<MemberElement, GlobalTypeInferenceMemberResult> _memberResults =
-      <MemberElement, GlobalTypeInferenceMemberResult>{};
-  final Map<ParameterElement, GlobalTypeInferenceParameterResult>
-      _parameterResults =
-      <ParameterElement, GlobalTypeInferenceParameterResult>{};
+  final Map<MemberEntity, GlobalTypeInferenceMemberResult<T>> _memberResults =
+      <MemberEntity, GlobalTypeInferenceMemberResult<T>>{};
+  final Map<Local, GlobalTypeInferenceParameterResult<T>> _parameterResults =
+      <Local, GlobalTypeInferenceParameterResult<T>>{};
+
+  GlobalTypeInferenceResults(this._inferrer, this.closedWorld);
+
+  /// Create the [GlobalTypeInferenceMemberResult] object for [member].
+  GlobalTypeInferenceMemberResult<T> createMemberResult(
+      TypeGraphInferrer<T> inferrer, MemberEntity member,
+      {bool isJsInterop: false});
+
+  /// Create the [GlobalTypeInferenceParameterResult] object for [parameter].
+  GlobalTypeInferenceParameterResult<T> createParameterResult(
+      TypeGraphInferrer<T> inferrer, Local parameter);
 
   // TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
   // error to query for results that don't exist.
-  GlobalTypeInferenceMemberResult resultOfMember(MemberElement member) {
+  GlobalTypeInferenceMemberResult<T> resultOfMember(MemberEntity member) {
     assert(
-        !member.isGenerativeConstructorBody,
+        member is! ConstructorBodyEntity,
         failedAt(
             member,
             "unexpected input: ConstructorBodyElements are created"
             " after global type inference, no data is avaiable for them."));
 
     bool isJsInterop = closedWorld.nativeData.isJsInteropMember(member);
-    return _memberResults.putIfAbsent(
-        member,
-        () => new GlobalTypeInferenceMemberResultImpl(
-            member,
-            // We store data in the context of the enclosing method, even
-            // for closure elements.
-            _inferrer.inferrer.lookupDataOfMember(member.memberContext),
-            _inferrer,
-            isJsInterop,
-            dynamicType));
+    return _memberResults.putIfAbsent(member,
+        () => createMemberResult(_inferrer, member, isJsInterop: isJsInterop));
   }
 
   // TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
   // error to query for results that don't exist.
-  GlobalTypeInferenceElementResult resultOfParameter(
-      ParameterElement parameter) {
+  GlobalTypeInferenceElementResult<T> resultOfParameter(Local parameter) {
     return _parameterResults.putIfAbsent(
-        parameter,
-        () => new GlobalTypeInferenceParameterResult(
-            parameter, _inferrer, dynamicType));
+        parameter, () => createParameterResult(_inferrer, parameter));
   }
 
-  GlobalTypeInferenceResults(this._inferrer, this.closedWorld);
-
   TypeMask get dynamicType => closedWorld.commonMasks.dynamicType;
 
   /// Returns the type of a [selector] when applied to a receiver with the given
@@ -299,10 +303,60 @@
   /// check.
   // TODO(sigmund): move into the result of the element containing such
   // constructor call.
-  bool isFixedArrayCheckedForGrowable(Node ctorCall) =>
+  bool isFixedArrayCheckedForGrowable(T ctorCall) =>
       _inferrer.isFixedArrayCheckedForGrowable(ctorCall);
 }
 
+/// Mixin that assert the types of the nodes used for querying type masks.
+abstract class AstGlobalTypeInferenceElementResultMixin
+    implements GlobalTypeInferenceElementResultImpl<Node> {
+  TypeMask typeOfNewList(covariant Send node) =>
+      _inferrer.getTypeForNewList(node);
+
+  TypeMask typeOfListLiteral(covariant LiteralList node) =>
+      _inferrer.getTypeForNewList(node);
+
+  TypeMask typeOfSend(covariant Send node) => _data?.typeOfSend(node);
+  TypeMask typeOfGetter(covariant SendSet node) => _data?.typeOfGetter(node);
+  TypeMask typeOfOperator(covariant SendSet node) =>
+      _data?.typeOfOperator(node);
+  TypeMask typeOfIterator(covariant ForIn node) => _data?.typeOfIterator(node);
+  TypeMask typeOfIteratorMoveNext(covariant ForIn node) =>
+      _data?.typeOfIteratorMoveNext(node);
+  TypeMask typeOfIteratorCurrent(covariant ForIn node) =>
+      _data?.typeOfIteratorCurrent(node);
+}
+
+class AstMemberResult = GlobalTypeInferenceMemberResultImpl<Node>
+    with AstGlobalTypeInferenceElementResultMixin;
+
+class AstParameterResult = GlobalTypeInferenceParameterResultImpl<Node>
+    with AstGlobalTypeInferenceElementResultMixin;
+
+class AstGlobalTypeInferenceResults extends GlobalTypeInferenceResults<Node> {
+  AstGlobalTypeInferenceResults(
+      TypesInferrer<Node> inferrer, ClosedWorld closedWorld)
+      : super(inferrer, closedWorld);
+
+  GlobalTypeInferenceMemberResult<Node> createMemberResult(
+      TypeGraphInferrer<Node> inferrer, covariant MemberElement member,
+      {bool isJsInterop: false}) {
+    return new AstMemberResult(
+        member,
+        // We store data in the context of the enclosing method, even
+        // for closure elements.
+        inferrer.inferrer.lookupDataOfMember(member.memberContext),
+        inferrer,
+        isJsInterop,
+        dynamicType);
+  }
+
+  GlobalTypeInferenceParameterResult<Node> createParameterResult(
+      TypeGraphInferrer<Node> inferrer, Local parameter) {
+    return new AstParameterResult(parameter, inferrer, dynamicType);
+  }
+}
+
 /// Global analysis that infers concrete types.
 class GlobalTypeInferenceTask extends CompilerTask {
   // TODO(sigmund): rename at the same time as our benchmarking tools.
@@ -324,12 +378,12 @@
   void runGlobalTypeInference(FunctionEntity mainElement,
       ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) {
     measure(() {
-      typesInferrerInternal ??=
-          new TypeGraphInferrer(compiler, closedWorld, closedWorldRefiner);
+      typesInferrerInternal ??= compiler.backendStrategy.createTypesInferrer(
+          closedWorldRefiner,
+          disableTypeInference: compiler.disableTypeInference);
       typesInferrerInternal.analyzeMain(mainElement);
       typesInferrerInternal.clear();
-      results =
-          new GlobalTypeInferenceResults(typesInferrerInternal, closedWorld);
+      results = typesInferrerInternal.createResults();
     });
   }
 }
diff --git a/pkg/compiler/tool/status_files/log_parser.dart b/pkg/compiler/tool/status_files/log_parser.dart
index 33d50f4..9ab36d6 100644
--- a/pkg/compiler/tool/status_files/log_parser.dart
+++ b/pkg/compiler/tool/status_files/log_parser.dart
@@ -6,6 +6,8 @@
 
 import 'record.dart';
 
+final RegExp _stackRE = new RegExp('#[0-9]* ');
+
 /// Extracts test records from a test.py [log].
 List<Record> parse(String log) {
   var records = [];
@@ -15,6 +17,9 @@
   var expected;
   var actual;
   var reason;
+  var fullReason; // lines before stack, usually multiline reason.
+  var stack = [];
+  var paragraph = []; // collector of lines for fullReason.
   bool reproIsNext = false;
   for (var line in log.split('\n')) {
     if (line.startsWith("FAILED: ")) {
@@ -39,11 +44,24 @@
     }
     if (line.startsWith("The compiler crashed:")) {
       reason = line.substring("The compiler crashed:".length).trim();
+      paragraph.clear();
     }
+
+    if (line.startsWith(_stackRE)) {
+      stack.add(line);
+      fullReason ??= paragraph.take(5).join('\n');
+      paragraph.clear();
+    } else {
+      paragraph.add(line);
+    }
+
     if (reproIsNext) {
-      records.add(new Record(
-          suite, test, config, expected, actual, reason, line.trim()));
+      records.add(new Record(suite, test, config, expected, actual, reason,
+          line.trim(), fullReason, stack));
       suite = test = config = expected = actual = reason = null;
+      stack = [];
+      fullReason = null;
+      paragraph.clear();
       reproIsNext = false;
     }
     if (line.startsWith("Short reproduction command (experimental):")) {
diff --git a/pkg/compiler/tool/status_files/rank_stacks.dart b/pkg/compiler/tool/status_files/rank_stacks.dart
new file mode 100644
index 0000000..31345e0
--- /dev/null
+++ b/pkg/compiler/tool/status_files/rank_stacks.dart
@@ -0,0 +1,117 @@
+// 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.
+
+/*
+Usage:
+
+  $ tools/test.py -m release                         \
+      -c dart2js -r d8 --dart2js-batch --report      \
+      --host-checked                                 \
+      --dart2js_options="--library-root=out/ReleaseX64/dart-sdk/ --use-kernel" \
+      language corelib library_2 corelib_2           \
+      dart2js_native dart2js_extra                   \
+      2>&1 > LOG
+
+  $ sdk/bin/dart pkg/compiler/tool/status_files/rank_stacks.dart LOG > STACKS.txt
+*/
+
+import 'dart:io';
+
+import 'log_parser.dart';
+import 'record.dart';
+
+// TODO(sra): Allow command-line setting of these parameters.
+const STACK_PRINT_LENGTH = 12;
+const HOW_MANY_STACKS = 30;
+
+main(args) {
+  String text;
+
+  for (String arg in args) {
+    // Parse options.
+
+    if (text == null) {
+      var uri = Uri.base.resolve(arg);
+      var file = new File.fromUri(uri);
+      if (!file.existsSync()) {
+        print('File not found: $file.');
+        exit(1);
+      }
+      text = file.readAsStringSync();
+    } else {
+      print("Extra file argument '$arg'.");
+      exit(1);
+    }
+  }
+
+  if (text == null) {
+    print('No input file.');
+    exit(1);
+  }
+
+  var records = parse(text);
+  var trie = new TrieNode(null);
+  for (var record in records) {
+    enter(record, 0, trie);
+  }
+
+  var leaves = trieLeaves(trie).toList();
+  leaves.sort((a, b) => b.length.compareTo(a.length));
+  for (var leaf in leaves.take(HOW_MANY_STACKS)) {
+    print('');
+    var examples = leaf.members.map((r) => r.fullReason).toSet().toList();
+    examples.sort();
+    print('${leaf.length} of:');
+    for (var example in examples) {
+      var count = leaf.members.where((r) => r.fullReason == example).length;
+      var countAligned = '$count'.padLeft(6);
+      if (examples.length == 1) countAligned = '     .';
+      var indentedExample = '\t' + example.replaceAll('\n', '\n\t');
+      print('${countAligned}${indentedExample}');
+    }
+
+    for (var line in leaf.members.first.stack.take(STACK_PRINT_LENGTH)) {
+      print('  $line');
+    }
+  }
+}
+
+class TrieNode {
+  final int depth;
+  final String key;
+  final Map<String, TrieNode> map = <String, TrieNode>{};
+  final List<Record> members = <Record>[];
+
+  int get length => members.length;
+
+  TrieNode(this.key, [this.depth = 0]);
+
+  String toString() => 'TrieNode(#$length)';
+}
+
+void enter(Record record, int depth, TrieNode root) {
+  root.members.add(record);
+  if (depth >= record.stack.length) return;
+  var key = record.stack[depth];
+  var node = root.map[key] ??= new TrieNode(key, depth + 1);
+  enter(record, depth + 1, node);
+}
+
+void printTrie(TrieNode node) {
+  var indent = '  ' * node.depth;
+  print('${indent} ${node.length} ${node.key}');
+  for (var key in node.map.keys) {
+    printTrie(node.map[key]);
+  }
+}
+
+trieLeaves(node) sync* {
+  if (node.map.isEmpty) {
+    yield node;
+  } else {
+    for (var v in node.map.values) {
+      yield* trieLeaves(v);
+    }
+  }
+}
diff --git a/pkg/compiler/tool/status_files/record.dart b/pkg/compiler/tool/status_files/record.dart
index c829bae..f2a6e97 100644
--- a/pkg/compiler/tool/status_files/record.dart
+++ b/pkg/compiler/tool/status_files/record.dart
@@ -15,6 +15,8 @@
   final String actual;
   final String repro;
   final String reason;
+  final String fullReason;
+  final List<String> stack;
 
   // TODO(sigmund): extract also a failure reason if any (e.g. a stack trace or
   // error message for crashes).
@@ -22,7 +24,7 @@
   bool get isPassing => actual == 'Pass';
 
   Record(this.suite, this.test, this.config, this.expected, this.actual,
-      this.reason, this.repro);
+      this.reason, this.repro, this.fullReason, this.stack);
 
   int compareTo(Record other) {
     if (suite == null && other.suite != null) return -1;
diff --git a/pkg/compiler/tool/status_files/update_all.sh b/pkg/compiler/tool/status_files/update_all.sh
index 5f467be..e791573 100755
--- a/pkg/compiler/tool/status_files/update_all.sh
+++ b/pkg/compiler/tool/status_files/update_all.sh
@@ -15,32 +15,34 @@
 
 function update_suite {
   local suite=$1
-  echo "running '$suite' minified tests"
+  echo -e "\nupdate suite: $suite"
+  echo "  - minified tests"
   ./tools/test.py -m release -c dart2js -r d8 --dart2js-batch \
       --use-sdk --minified --dart2js-with-kernel \
       $suite > $tmp/$suite-minified.txt
-
-  echo "processing '$suite' minified tests status changes"
   $dart $update_script minified $tmp/$suite-minified.txt
 
-  echo "running '$suite' host-checked tests"
+  echo "  - host-checked tests"
   ./tools/test.py -m release -c dart2js -r d8 --dart2js-batch --host-checked \
     --dart2js-options="--library-root=$sdk" --dart2js-with-kernel \
     $suite > $tmp/$suite-checked.txt
-
-  echo "processing '$suite' checked tests status changes"
   $dart $update_script checked $tmp/$suite-checked.txt
 }
 
 
 pushd $repodir > /dev/null
 ./tools/build.py -m release create_sdk
-update_suite dart2js_native
-update_suite dart2js_extra
-update_suite language
-update_suite language_2
-update_suite corelib
-update_suite corelib_2
+
+if [[ $# -ge 1 ]]; then
+  update_suite $1
+else
+  update_suite dart2js_native
+  update_suite dart2js_extra
+  update_suite language
+  update_suite language_2
+  update_suite corelib
+  update_suite corelib_2
+fi
 
 rm -rf $tmp
 popd > /dev/null
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index 18d5f742..51f3d76 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -260,7 +260,6 @@
     }
 
     var assembler = new PackageBundleAssembler();
-    assembler.recordDependencies(summaryData);
 
     var uriToUnit = new Map<String, UnlinkedUnit>.fromIterable(units,
         key: (u) => u.element.source.uri.toString(),
diff --git a/pkg/dev_compiler/lib/src/compiler/compiler.dart b/pkg/dev_compiler/lib/src/compiler/compiler.dart
index 1b33f50..baa5a77 100644
--- a/pkg/dev_compiler/lib/src/compiler/compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/compiler.dart
@@ -89,7 +89,6 @@
     // Read the summaries.
     summaryData ??= new SummaryDataStore(options.summaryPaths,
         resourceProvider: resourceProvider,
-        recordDependencyInfo: true,
         // TODO(vsm): Reset this to true once we cleanup internal build rules.
         disallowOverlappingSummaries: false);
 
diff --git a/pkg/dev_compiler/web/web_command.dart b/pkg/dev_compiler/web/web_command.dart
index 00da902..0f0f98b 100644
--- a/pkg/dev_compiler/web/web_command.dart
+++ b/pkg/dev_compiler/web/web_command.dart
@@ -146,7 +146,7 @@
         dartSdkPath: '/dart-sdk', dartSdkSummaryPath: dartSdkSummaryPath);
 
     var summaryDataStore = new SummaryDataStore(options.summaryPaths,
-        resourceProvider: resourceProvider, recordDependencyInfo: true);
+        resourceProvider: resourceProvider);
     for (var i = 0; i < summaryBytes.length; i++) {
       var bytes = summaryBytes[i];
 
diff --git a/pkg/front_end/error_recovery.yaml b/pkg/front_end/error_recovery.yaml
new file mode 100644
index 0000000..241d4db
--- /dev/null
+++ b/pkg/front_end/error_recovery.yaml
@@ -0,0 +1,120 @@
+# 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.
+
+# Each entry in this file corresponds to an error recovery scenario. For each
+# scenario we specify:
+#
+#  1. An explanation of the problem (description).
+#  2. Important recovery notes (recovery): a list of text notes explaining of
+#     how the code is interpreted by the front-end and its clients.
+#  3. An optional set of questions if we don't have the answer at this
+#     moment (questions).
+#  4. An example code that illustrates the problem (example).
+#
+# At this time this is just a documentation file, the goal however is to turn it
+# also into a test suite so every example can be tested automatically.
+#
+# To do so we can start annotating the examples to indicate relevant error
+# locations with comments of the form `/*@error=name*/`, where `name` is a
+# message name from `messages.yaml` that corresponds to the error (if known). If
+# the compiler doesn't yet have a specific error message for the error, use
+# `/*@error=?*/`. This comment should go immediately before the token where the
+# error is reported. If we know at this time that the error has a region,
+# include an /*@errorEnd*/ at the point where the region ends.
+
+NameConflictDuplicateField:
+  description: "A field was declared twice."
+  recovery:
+    - "both fields can be seen in the generated kernel output."
+    - "code completion works on the types and inside initializers of either field."
+    - "any errors from the usage of the field should be lower priority than this error."
+    - "accesses to the field get resolved to the first declaration (in text order)."
+  example: >-
+    List bar = [1, 2];
+    StringBuffer foo = new StringBuffer();
+    class A {
+      int    /*@error=DuplicatedName*/ field /*@errorEnd*/ = bar.length;
+      String /*@error=DuplicatedName*/ field /*@errorEnd*/ = '$foo';
+    }
+
+NameConflictDuplicateMethod:
+  description: "A method was declared twice."
+  recovery:
+    - "both methods can be seen in the generated kernel output."
+    - "code completion works within both methods."
+    - "other code that accesses the method will be resolved to the first declaration."
+  example: >-
+    List bar = [1, 2];
+    class A {
+      int /*@error=DuplicatedName*/ m /*@errorEnd*/() => bar.length;
+      int /*@error=DuplicatedName*/ m /*@errorEnd*/(StringBuffer foo) => '$foo';
+    }
+
+NameConflictInconsitentMemberKind:
+  description: "A method and a field have the same name."
+  recovery:
+    - "both can be seen in the generated output."
+    - "first declaration wins."
+  example: >-
+    List bar = [1, 2];
+    class A {
+      int /*@error=DuplicatedName*/ m /*@errorEnd*/ = bar.length;
+      int /*@error=DuplicatedName*/ m /*@errorEnd*/(StringBuffer foo) => '$foo';
+    }
+
+ImportIsOutOfOrder:    
+  description: "An import was written below a definition."
+  recovery:
+    - "treat it as if the import was on top."
+    - "no cascading errors are presented as if the import was missing."
+  example: >-
+    class A extends B {}
+    /*@error=?*/
+    import 'b.dart'; // b.dart defines B
+    /*@errorEnd*/
+
+CallAMissingConstructor:
+  description: "A named constructor has a typo in the name."
+  recovery:
+    - "keep the expression where it occurs."
+    - "treat the type of the expression as if a valid constructor was used."
+  example: >-
+    class C {
+      bar() => null;
+    }
+    main() {
+      var x = new C./*error=MethodNotFound*/foo();
+      x.bar(); // no errors here, `x` has inferred type `C`.
+    }
+
+TreatAbstractFunctionsAsEmpty:
+  description: "A function in a non-abstract class is missing a body."
+  recovery: "Treat it as if it was empty."
+  example: >-
+    class A {
+      foo() /*@error=ExpectedBody*/;
+    }
+
+IgnoreEmptyOptionalArgs:
+  description: "A function declares optional argument, but the list is empty."
+  recovery: "Treat it as if it wasn't there."
+  example: >-
+    m(a, b, []){}
+
+IgnoreEmptyOptionalArgs:
+  description: "A function declares both positional and named arguments."
+  questions: "Treat it as if only named arguments are there?"
+  example: >-
+    m(a, b, [c], {d}){}
+
+# TODO(sigmund): add details to the list below
+
+NameConflictDuplicateTopLevelField:
+  description: "A top-level field was declared twice."
+
+NameConflictDuplicateTopLevelMethod:
+  description: "A top-level method was declared twice."
+
+NameConflictDuplicateTopLevelDeclaration:
+  description: "Two top-level declarations use the same name."
diff --git a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
index 7997ac2..a62aabc 100644
--- a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
+++ b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
@@ -16,22 +16,22 @@
 import 'package:front_end/src/byte_store/byte_store.dart';
 import 'package:kernel/ast.dart';
 import 'package:kernel/binary/limited_ast_to_binary.dart';
+import 'package:kernel/target/targets.dart';
 
 /// Create an instance of an [IncrementalCompiler] to compile a program whose
 /// main entry point file is [entry]. This uses some default options
 /// for the location of the sdk and temporary folder to save intermediate
 /// results.
-// TODO(sigmund): make this example work outside of the SDK repo.
 Future<IncrementalCompiler> createIncrementalCompiler(String entry,
-    {bool persistent: true}) {
+    {bool persistent: true, Uri sdkRoot, Target target}) {
   var entryUri = Uri.base.resolve(entry);
   var dartVm = Uri.base.resolve(Platform.resolvedExecutable);
-  var sdkRoot = dartVm.resolve("patched_sdk/");
   var tmpDir = Directory.systemTemp.createTempSync('ikg_cache');
   var options = new CompilerOptions()
-    ..sdkRoot = sdkRoot
+    ..sdkRoot = sdkRoot ?? dartVm.resolve("patched_sdk/")
     ..packagesFileUri = Uri.base.resolve('.packages')
     ..strongMode = false
+    ..target = target
     // Note: we do not report error on the console because the incremental
     // compiler is an ongoing background service that shouldn't polute stdout.
     // TODO(sigmund): do something with the errors.
@@ -107,6 +107,7 @@
 
     var compileTimer = new Stopwatch()..start();
     var delta = await _generator.computeDelta();
+    _generator.acceptLastDelta();
     compileTimer.stop();
     compileTime = compileTimer.elapsedMilliseconds;
     var program = delta.newProgram;
diff --git a/pkg/front_end/example/incremental_reload/run.dart b/pkg/front_end/example/incremental_reload/run.dart
index 7fadbc7..5b3dab4 100644
--- a/pkg/front_end/example/incremental_reload/run.dart
+++ b/pkg/front_end/example/incremental_reload/run.dart
@@ -46,21 +46,46 @@
 import 'dart:async';
 import 'dart:convert' show ASCII;
 
+import 'package:args/args.dart';
+import 'package:kernel/target/targets.dart';
+
 import '../../tool/vm/reload.dart';
 
 import 'compiler_with_invalidation.dart';
 
+ArgParser argParser = new ArgParser(allowTrailingOptions: true)
+  ..addOption('sdk-root', help: 'Path to sdk for compilation')
+  ..addOption('output',
+      help: 'Output dill file', defaultsTo: 'out.dill', abbr: 'o')
+  ..addOption('target',
+      help: 'One of none, vm, vm_fasta, vmcc, vmreify, flutter, flutter_fasta',
+      defaultsTo: 'vm');
+
+String usage = '''
+Usage: dart [options] input.dart
+
+Runs console-driven incremental compiler.
+
+Options:
+${argParser.usage}
+''';
+
 RemoteVm remoteVm = new RemoteVm();
 AnsiTerminal terminal = new AnsiTerminal();
 
 main(List<String> args) async {
-  if (args.length <= 1) {
-    print('usage: dart incremental_compile.dart input.dart out.dill');
+  ArgResults options = argParser.parse(args);
+  if (options.rest.isEmpty) {
+    print('Need an input file');
+    print(usage);
     exit(1);
   }
 
-  var compiler = await createIncrementalCompiler(args[0]);
-  var outputUri = Uri.base.resolve(args[1]);
+  var compiler = await createIncrementalCompiler(options.rest[0],
+      sdkRoot:
+          options['sdk-root'] != null ? Uri.parse(options['sdk-root']) : null,
+      target: targets[options['target']](new TargetFlags()));
+  var outputUri = Uri.base.resolve(options['output']);
 
   showHeader();
   listenOnKeyPress(compiler, outputUri)
@@ -76,7 +101,7 @@
     try {
       CompilationResult compilationResult;
       ReloadResult reloadResult;
-      switch (char) {
+      switch (char.trim()) {
         case 'r':
           compilationResult = await rebuild(compiler, outputUri);
           if (!compilationResult.errorSeen &&
@@ -242,7 +267,9 @@
   ];
 
   String bolden(String message) => wrap(message, _bold);
+
   String green(String message) => wrap(message, _green);
+
   String red(String message) => wrap(message, _red);
 
   String wrap(String message, String escape) {
diff --git a/pkg/front_end/lib/incremental_kernel_generator.dart b/pkg/front_end/lib/incremental_kernel_generator.dart
index 80bc222..3ed5b09 100644
--- a/pkg/front_end/lib/incremental_kernel_generator.dart
+++ b/pkg/front_end/lib/incremental_kernel_generator.dart
@@ -5,8 +5,8 @@
 import 'dart:async';
 
 import 'package:front_end/src/base/processed_options.dart';
-import 'package:front_end/src/incremental_kernel_generator_impl.dart';
 import 'package:front_end/src/fasta/compiler_context.dart';
+import 'package:front_end/src/incremental_kernel_generator_impl.dart';
 import 'package:kernel/kernel.dart';
 
 import 'compiler_options.dart';
@@ -48,11 +48,17 @@
 /// Interface for generating an initial kernel representation of a program and
 /// keeping it up to date as incremental changes are made.
 ///
-/// This class maintains an internal "previous program state"; each
-/// time [computeDelta] is called, it updates the previous program state and
-/// produces a representation of what has changed.  When there are few changes,
-/// a call to [computeDelta] should be much faster than compiling the whole
-/// program from scratch.
+/// This class maintains an internal "current program state"; each time
+/// [computeDelta] is called, it computes the "last program state" and libraries
+/// that were affected relative to the "current program state".  When there are
+/// few changes, a call to [computeDelta] should be much faster than compiling
+/// the whole program from scratch.
+///
+/// Each invocation of [computeDelta] must be followed by invocation of either
+/// [acceptLastDelta] or [rejectLastDelta].  [acceptLastDelta] makes the
+/// "last program state" the "current program state".  [rejectLastDelta] simply
+/// discards the "last program state", so that the "current program state"
+/// stays the same.
 ///
 /// This class also maintains a set of "valid sources", which is a (possibly
 /// empty) subset of the sources constituting the previous program state.  Files
@@ -62,11 +68,18 @@
 /// Behavior is undefined if the client does not obey the following concurrency
 /// restrictions:
 /// - no two invocations of [computeDelta] may be outstanding at any given time.
-/// - neither [invalidate] nor [invalidateAll] may be called while an invocation
-///   of [computeDelta] is outstanding.
+/// - [invalidate] may not be called while an invocation of [computeDelta] is
+///   outstanding.
 ///
 /// Not intended to be implemented or extended by clients.
 abstract class IncrementalKernelGenerator {
+  /// Notify the generator that the last [DeltaProgram] returned from the
+  /// [computeDelta] was accepted.  So, the "last program state" becomes the
+  /// "current program state", and the next invocation of [computeDelta] will
+  /// not include the libraries of the last delta, unless these libraries are
+  /// affected by [invalidate] since the last [computeDelta].
+  void acceptLastDelta();
+
   /// Generates a kernel representation of the changes to the program, assuming
   /// that all valid sources are unchanged since the last call to
   /// [computeDelta].
@@ -83,6 +96,9 @@
   /// source code), the caller may consider the previous file state and the set
   /// of valid sources to be unchanged; this means that once the user fixes the
   /// errors, it is safe to call [computeDelta] again.
+  ///
+  /// Each invocation of [computeDelta] must be followed by invocation of
+  /// either [acceptLastDelta] or [rejectLastDelta].
   Future<DeltaProgram> computeDelta();
 
   /// Remove the file associated with the given file [uri] from the set of
@@ -90,6 +106,11 @@
   /// next call to [computeDelta]).
   void invalidate(Uri uri);
 
+  /// Notify the generator that the last [DeltaProgram] returned from the
+  /// [computeDelta] was rejected.  The "last program state" is discared and
+  /// the "current program state" is kept unchanged.
+  void rejectLastDelta();
+
   /// Creates an [IncrementalKernelGenerator] which is prepared to generate
   /// kernel representations of the program whose main library is in the given
   /// [entryPoint].
diff --git a/pkg/front_end/lib/src/byte_store/byte_store.dart b/pkg/front_end/lib/src/byte_store/byte_store.dart
index 2f151f9..a76b9d6 100644
--- a/pkg/front_end/lib/src/byte_store/byte_store.dart
+++ b/pkg/front_end/lib/src/byte_store/byte_store.dart
@@ -5,6 +5,55 @@
 import 'dart:collection';
 
 /**
+ * In-memory LRU cache for bytes.
+ */
+class BytesMemoryCache<K> {
+  final int _maxSizeBytes;
+
+  final _map = new LinkedHashMap<K, List<int>>();
+  int _currentSizeBytes = 0;
+
+  BytesMemoryCache(this._maxSizeBytes);
+
+  List<int> get(K key, List<int> getNotCached()) {
+    List<int> bytes = _map.remove(key);
+    if (bytes == null) {
+      bytes = getNotCached();
+      if (bytes != null) {
+        _map[key] = bytes;
+        _currentSizeBytes += bytes.length;
+        _evict();
+      }
+    } else {
+      _map[key] = bytes;
+    }
+    return bytes;
+  }
+
+  void put(K key, List<int> bytes) {
+    _currentSizeBytes -= _map[key]?.length ?? 0;
+    _map[key] = bytes;
+    _currentSizeBytes += bytes.length;
+    _evict();
+  }
+
+  void _evict() {
+    while (_currentSizeBytes > _maxSizeBytes) {
+      if (_map.isEmpty) {
+        // Should be impossible, since _currentSizeBytes should always match
+        // _map.  But recover anyway.
+        assert(false);
+        _currentSizeBytes = 0;
+        break;
+      }
+      K key = _map.keys.first;
+      List<int> bytes = _map.remove(key);
+      _currentSizeBytes -= bytes.length;
+    }
+  }
+}
+
+/**
  * Store of bytes associated with string keys.
  *
  * Each key must be not longer than 100 characters and consist of only `[a-z]`,
@@ -51,51 +100,20 @@
  */
 class MemoryCachingByteStore implements ByteStore {
   final ByteStore _store;
-  final int _maxSizeBytes;
+  final BytesMemoryCache<String> _cache;
 
-  final _map = new LinkedHashMap<String, List<int>>();
-  int _currentSizeBytes = 0;
-
-  MemoryCachingByteStore(this._store, this._maxSizeBytes);
+  MemoryCachingByteStore(this._store, int maxSizeBytes)
+      : _cache = new BytesMemoryCache<String>(maxSizeBytes);
 
   @override
   List<int> get(String key) {
-    List<int> bytes = _map.remove(key);
-    if (bytes == null) {
-      bytes = _store.get(key);
-      if (bytes != null) {
-        _map[key] = bytes;
-        _currentSizeBytes += bytes.length;
-        _evict();
-      }
-    } else {
-      _map[key] = bytes;
-    }
-    return bytes;
+    return _cache.get(key, () => _store.get(key));
   }
 
   @override
   void put(String key, List<int> bytes) {
     _store.put(key, bytes);
-    _currentSizeBytes -= _map[key]?.length ?? 0;
-    _map[key] = bytes;
-    _currentSizeBytes += bytes.length;
-    _evict();
-  }
-
-  void _evict() {
-    while (_currentSizeBytes > _maxSizeBytes) {
-      if (_map.isEmpty) {
-        // Should be impossible, since _currentSizeBytes should always match
-        // _map.  But recover anyway.
-        assert(false);
-        _currentSizeBytes = 0;
-        break;
-      }
-      String key = _map.keys.first;
-      List<int> bytes = _map.remove(key);
-      _currentSizeBytes -= bytes.length;
-    }
+    _cache.put(key, bytes);
   }
 }
 
diff --git a/pkg/front_end/lib/src/codegen/tools.dart b/pkg/front_end/lib/src/codegen/tools.dart
index fbc2d45..fe2fca4 100644
--- a/pkg/front_end/lib/src/codegen/tools.dart
+++ b/pkg/front_end/lib/src/codegen/tools.dart
@@ -238,7 +238,13 @@
 class DartFormat {
   static String get _dartfmtPath {
     String binName = Platform.isWindows ? 'dartfmt.bat' : 'dartfmt';
-    return join(dirname(Platform.resolvedExecutable), binName);
+    for (var loc in [binName, join('dart-sdk', 'bin', binName)]) {
+      var candidatePath = join(dirname(Platform.resolvedExecutable), loc);
+      if (new File(candidatePath).existsSync()) {
+        return candidatePath;
+      }
+    }
+    throw new StateError('Could not find dartfmt executable');
   }
 
   static void formatFile(File file) {
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
index cb7c60b..7227a48 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -1368,6 +1368,36 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        Token
+            token)> templateIntegerLiteralIsOutOfRange = const Template<
+        Message Function(Token token)>(
+    messageTemplate:
+        r"""The integer literal #lexeme can't be represented in 64 bits.""",
+    tipTemplate:
+        r"""Try using BigInt (from 'dart:typed_data' library) if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.""",
+    withArguments: _withArgumentsIntegerLiteralIsOutOfRange);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Token token)> codeIntegerLiteralIsOutOfRange =
+    const Code<Message Function(Token token)>(
+  "IntegerLiteralIsOutOfRange",
+  templateIntegerLiteralIsOutOfRange,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsIntegerLiteralIsOutOfRange(Token token) {
+  String lexeme = token.lexeme;
+  return new Message(codeIntegerLiteralIsOutOfRange,
+      message:
+          """The integer literal $lexeme can't be represented in 64 bits.""",
+      tip:
+          """Try using BigInt (from 'dart:typed_data' library) if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.""",
+      arguments: {'token': token});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeInternalProblemAlreadyInitialized =
     messageInternalProblemAlreadyInitialized;
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index a21676d..7a84b26 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -317,7 +317,7 @@
     switchScope = outerSwitchScope;
   }
 
-  void declareVariable(VariableDeclaration variable) {
+  void declareVariable(VariableDeclaration variable, Scope scope) {
     // ignore: UNUSED_LOCAL_VARIABLE
     Statement discardedStatement;
     String name = variable.name;
@@ -1273,8 +1273,14 @@
   @override
   void handleLiteralInt(Token token) {
     debugEvent("LiteralInt");
-    push(new KernelIntLiteral(int.parse(token.lexeme))
-      ..fileOffset = offsetForToken(token));
+    int value = int.parse(token.lexeme, onError: (_) => null);
+    if (value == null) {
+      push(buildCompileTimeError(
+          fasta.templateIntegerLiteralIsOutOfRange.withArguments(token),
+          token.charOffset));
+    } else {
+      push(new KernelIntLiteral(value)..fileOffset = offsetForToken(token));
+    }
   }
 
   @override
@@ -1394,7 +1400,7 @@
     VariableDeclaration variable = pop();
     variable.fileOffset = nameToken.charOffset;
     push(variable);
-    declareVariable(variable);
+    declareVariable(variable, scope);
   }
 
   @override
@@ -2417,12 +2423,12 @@
         // The function node is created later.
         null)
       ..fileOffset = beginToken.charOffset);
-    declareVariable(variable);
-    enterLocalScope();
+    declareVariable(variable, scope.parent);
   }
 
   void enterFunction() {
     debugEvent("enterFunction");
+    enterFunctionTypeScope();
     functionNestingLevel++;
     push(switchScope ?? NullValue.SwitchScope);
     switchScope = null;
@@ -2435,6 +2441,9 @@
     functionNestingLevel--;
     inCatchBlock = pop();
     switchScope = pop();
+    List typeVariables = pop();
+    exitLocalScope();
+    push(typeVariables ?? NullValue.TypeVariables);
   }
 
   @override
@@ -2446,6 +2455,11 @@
   @override
   void beginNamedFunctionExpression(Token token) {
     debugEvent("beginNamedFunctionExpression");
+    List typeVariables = pop();
+    // Create an additional scope in which the named function expression is
+    // declared.
+    enterLocalScope();
+    push(typeVariables ?? NullValue.TypeVariables);
     enterFunction();
   }
 
@@ -2455,46 +2469,11 @@
     enterFunction();
   }
 
-  @override
-  void endNamedFunctionExpression(Token endToken) {
-    debugEvent("NamedFunctionExpression");
+  void pushNamedFunction(Token token, bool isFunctionExpression) {
     Statement body = popStatement();
     AsyncMarker asyncModifier = pop();
-    if (functionNestingLevel != 0) {
-      exitLocalScope();
-    }
-    FormalParameters formals = pop();
-    List<TypeParameter> typeParameters = typeVariableBuildersToKernel(pop());
-
     exitLocalScope();
-    KernelFunctionDeclaration declaration = pop();
-    VariableDeclaration variable = declaration.variable;
-    var returnType = pop();
-    returnType ??= const DynamicType();
-    pop(); // Modifiers.
-    exitFunction();
-
-    variable.initializer = new KernelFunctionExpression(formals.addToFunction(
-        new FunctionNode(body,
-            typeParameters: typeParameters, asyncMarker: asyncModifier)
-          ..fileOffset = formals.charOffset
-          ..fileEndOffset = endToken.charOffset))
-      ..parent = variable
-      ..fileOffset = formals.charOffset;
-    push(
-        new KernelNamedFunctionExpression(variable, new VariableGet(variable)));
-  }
-
-  @override
-  void endLocalFunctionDeclaration(Token token) {
-    debugEvent("LocalFunctionDeclaration");
-    Statement body = popStatement();
-    AsyncMarker asyncModifier = pop();
-    if (functionNestingLevel != 0) {
-      exitLocalScope();
-    }
     FormalParameters formals = pop();
-    exitLocalScope();
     var declaration = pop();
     var returnType = pop();
     var hasImplicitReturnType = returnType == null;
@@ -2503,25 +2482,57 @@
     exitFunction();
     List<TypeParameter> typeParameters = typeVariableBuildersToKernel(pop());
     FunctionNode function = formals.addToFunction(new FunctionNode(body,
-        typeParameters: typeParameters, asyncMarker: asyncModifier)
+        typeParameters: typeParameters,
+        asyncMarker: asyncModifier,
+        returnType: returnType)
       ..fileOffset = formals.charOffset
       ..fileEndOffset = token.charOffset);
+
     if (declaration is FunctionDeclaration) {
+      VariableDeclaration variable = declaration.variable;
       KernelFunctionDeclaration.setHasImplicitReturnType(
           declaration, hasImplicitReturnType);
-      function.returnType = returnType;
-      declaration.variable.type = function.functionType;
-      declaration.function = function;
-      function.parent = declaration;
-    } else {
+
+      variable.type = function.functionType;
+      if (isFunctionExpression) {
+        variable.initializer = new KernelFunctionExpression(function)
+          ..parent = variable
+          ..fileOffset = formals.charOffset;
+        exitLocalScope();
+        push(new KernelNamedFunctionExpression(variable));
+      } else {
+        declaration.function = function;
+        function.parent = declaration;
+        push(declaration);
+      }
+    } else if (declaration is ExpressionStatement) {
       // If [declaration] isn't a [FunctionDeclaration], it must be because
       // there was a compile-time error.
-
-      // TODO(paulberry): ensure that when integrating with analyzer, type
-      // inference is still performed for the dropped declaration.
       assert(library.hasCompileTimeErrors);
+
+      // TODO(paulberry,ahe): ensure that when integrating with analyzer, type
+      // inference is still performed for the dropped declaration.
+      if (isFunctionExpression) {
+        push(declaration.expression);
+      } else {
+        push(declaration);
+      }
+    } else {
+      return unhandled("${declaration.runtimeType}", "pushNamedFunction",
+          token.charOffset, uri);
     }
-    push(declaration);
+  }
+
+  @override
+  void endNamedFunctionExpression(Token endToken) {
+    debugEvent("NamedFunctionExpression");
+    pushNamedFunction(endToken, true);
+  }
+
+  @override
+  void endLocalFunctionDeclaration(Token token) {
+    debugEvent("LocalFunctionDeclaration");
+    pushNamedFunction(token, false);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index 34504be..7e8fd91 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -1357,8 +1357,8 @@
 ///
 ///     let f = () { ... } in f
 class KernelNamedFunctionExpression extends Let implements KernelExpression {
-  KernelNamedFunctionExpression(VariableDeclaration variable, Expression body)
-      : super(variable, body);
+  KernelNamedFunctionExpression(VariableDeclaration variable)
+      : super(variable, new VariableGet(variable));
 
   @override
   void _collectDependencies(KernelDependencyCollector collector) {
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 22a8c4b..9690f9c 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -261,6 +261,13 @@
     logEvent("ForInBody");
   }
 
+  /// Handle the beginning of a named function expression which isn't legal
+  /// syntax in Dart.  Useful for recovering from Javascript code being pasted
+  /// into a Dart proram, as it will interpret `function foo() {}` as a named
+  /// function expression with return type `function` and name `foo`.
+  ///
+  /// Substructures:
+  /// - Type variables
   void beginNamedFunctionExpression(Token token) {}
 
   /// A named function expression which isn't legal syntax in Dart.
@@ -269,10 +276,10 @@
   /// expression with return type `function` and name `foo`.
   ///
   /// Substructures:
+  /// - Type variables
   /// - Modifiers
   /// - Return type
   /// - Name
-  /// - Type variables
   /// - Formals
   /// - Initializers
   /// - Async modifier
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 6959812..c2b8fc7 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -1137,6 +1137,24 @@
           optional('sync', token);
     }
 
+    /// Returns true if [token] could be the start of a function declaration
+    /// without a return type.
+    bool looksLikeFunctionDeclaration(Token token) {
+      if (!token.isIdentifier) {
+        return false;
+      }
+      token = token.next;
+      if (optional('<', token)) {
+        Token closeBrace = closeBraceTokenFor(token);
+        if (closeBrace == null) return false;
+        token = closeBrace.next;
+      }
+      if (optional('(', token)) {
+        return looksLikeFunctionBody(closeBraceTokenFor(token).next);
+      }
+      return false;
+    }
+
     FormalParameterKind parameterKind;
     switch (continuation) {
       case TypeContinuation.Required:
@@ -1203,7 +1221,7 @@
               } else {
                 commitType();
               }
-              return parseLocalFunctionDeclarationRest(begin, token, formals);
+              return parseNamedFunctionRest(begin, token, formals, false);
             }
           } else if (identical(afterIdKind, LT_TOKEN)) {
             // We are looking at `type identifier '<'`.
@@ -1220,7 +1238,7 @@
                 } else {
                   commitType();
                 }
-                return parseLocalFunctionDeclarationRest(begin, token, formals);
+                return parseNamedFunctionRest(begin, token, formals, false);
               }
             }
           }
@@ -1241,7 +1259,7 @@
               listener.beginLocalFunctionDeclaration(token);
               listener.handleModifiers(0);
               listener.handleNoType(token);
-              return parseLocalFunctionDeclarationRest(begin, token, formals);
+              return parseNamedFunctionRest(begin, token, formals, false);
             }
           } else if (optional('<', token.next)) {
             Token afterTypeVariables = closeBraceTokenFor(token.next)?.next;
@@ -1255,8 +1273,8 @@
                 listener.beginLocalFunctionDeclaration(token);
                 listener.handleModifiers(0);
                 listener.handleNoType(token);
-                return parseLocalFunctionDeclarationRest(
-                    begin, token, afterTypeVariables);
+                return parseNamedFunctionRest(
+                    begin, token, afterTypeVariables, false);
               }
             }
             // Fall through to expression statement.
@@ -1286,14 +1304,36 @@
         return parseExpressionStatement(begin);
 
       case TypeContinuation.SendOrFunctionLiteral:
-        if (looksLikeType &&
-            token.isIdentifier &&
-            isFunctionDeclaration(token.next)) {
-          return parseNamedFunctionExpression(begin);
-        } else if (isFunctionDeclaration(begin.next)) {
-          return parseNamedFunctionExpression(begin);
+        Token name;
+        bool hasReturnType;
+        if (looksLikeType && looksLikeFunctionDeclaration(token)) {
+          name = token;
+          hasReturnType = true;
+          // Fall-through to parseNamedFunctionRest below.
+        } else if (looksLikeFunctionDeclaration(begin)) {
+          name = begin;
+          hasReturnType = false;
+          // Fall-through to parseNamedFunctionRest below.
+        } else {
+          return parseSend(begin, continuationContext);
         }
-        return parseSend(begin, continuationContext);
+
+        Token formals = parseTypeVariablesOpt(name.next);
+        listener.beginNamedFunctionExpression(begin);
+        listener.handleModifiers(0);
+        if (hasReturnType) {
+          if (voidToken != null) {
+            listener.handleVoidKeyword(voidToken);
+          } else {
+            commitType();
+          }
+          reportRecoverableError(
+              begin, fasta.messageReturnTypeFunctionExpression);
+        } else {
+          listener.handleNoType(begin);
+        }
+
+        return parseNamedFunctionRest(begin, name, formals, true);
 
       case TypeContinuation.VariablesDeclarationOrExpression:
         if (looksLikeType &&
@@ -2360,65 +2400,56 @@
     return token;
   }
 
-  /// Parses the rest of a local function declaration starting from its [name]
+  /// Parses the rest of a named function declaration starting from its [name]
   /// but then skips any type parameters and continue parsing from [formals]
   /// (the formal parameters).
   ///
+  /// If [isFunctionExpression] is true, this method parses the rest of named
+  /// function expression which isn't legal syntax in Dart.  Useful for
+  /// recovering from Javascript code being pasted into a Dart proram, as it
+  /// will interpret `function foo() {}` as a named function expression with
+  /// return type `function` and name `foo`.
+  ///
   /// Precondition: the parser has previously generated these events:
   ///
   /// - Type variables.
-  /// - beginLocalFunctionDeclaration.
+  /// - `beginLocalFunctionDeclaration` if [isFunctionExpression] is false,
+  ///   otherwise `beginNamedFunctionExpression`.
   /// - Modifiers.
   /// - Return type.
-  Token parseLocalFunctionDeclarationRest(
-      Token begin, Token name, Token formals) {
+  Token parseNamedFunctionRest(
+      Token begin, Token name, Token formals, bool isFunctionExpression) {
     Token token = name;
     listener.beginFunctionName(token);
     token = parseIdentifier(token, IdentifierContext.localFunctionDeclaration);
+    if (isFunctionExpression) {
+      reportRecoverableError(name, fasta.messageNamedFunctionExpression);
+    }
     listener.endFunctionName(begin, token);
     token = parseFormalParametersOpt(formals, MemberKind.Local);
     token = parseInitializersOpt(token);
-    token = parseAsyncOptBody(token, false, false);
-    listener.endLocalFunctionDeclaration(token);
-    return token.next;
-  }
-
-  /// Parses a named function expression which isn't legal syntax in Dart.
-  /// Useful for recovering from Javascript code being pasted into a Dart
-  /// proram, as it will interpret `function foo() {}` as a named function
-  /// expression with return type `function` and name `foo`.
-  Token parseNamedFunctionExpression(Token token) {
-    Token beginToken = token;
-    listener.beginNamedFunctionExpression(token);
-    listener.handleModifiers(0);
-    token = parseType(token, TypeContinuation.Optional);
-    if (token != beginToken) {
-      reportRecoverableError(token, fasta.messageReturnTypeFunctionExpression);
+    token = parseAsyncOptBody(token, isFunctionExpression, false);
+    if (isFunctionExpression) {
+      listener.endNamedFunctionExpression(token);
+      return token;
+    } else {
+      listener.endLocalFunctionDeclaration(token);
+      return token.next;
     }
-    listener.beginFunctionName(token);
-    Token nameToken = token;
-    token = parseIdentifier(token, IdentifierContext.functionExpressionName);
-    reportRecoverableError(nameToken, fasta.messageNamedFunctionExpression);
-    listener.endFunctionName(beginToken, token);
-    token = parseTypeVariablesOpt(token);
-    token = parseFormalParameters(token, MemberKind.Local);
-    listener.handleNoInitializers();
-    token = parseAsyncOptBody(token, true, false);
-    listener.endNamedFunctionExpression(token);
-    return token;
   }
 
   /// Parses a function body optionally preceded by an async modifier (see
   /// [parseAsyncModifier]).  This method is used in both expression context
-  /// (when [isExpression] is true) and statement context. In statement context
-  /// (when [isExpression] is false), and if the function body is on the form
-  /// `=> expression`, a trailing semicolon is required.
+  /// (when [ofFunctionExpression] is true) and statement context. In statement
+  /// context (when [ofFunctionExpression] is false), and if the function body
+  /// is on the form `=> expression`, a trailing semicolon is required.
   ///
   /// It's an error if there's no function body unless [allowAbstract] is true.
-  Token parseAsyncOptBody(Token token, bool isExpression, bool allowAbstract) {
+  Token parseAsyncOptBody(
+      Token token, bool ofFunctionExpression, bool allowAbstract) {
     AsyncModifier savedAsyncModifier = asyncState;
     token = parseAsyncModifier(token);
-    token = parseFunctionBody(token, isExpression, allowAbstract);
+    token = parseFunctionBody(token, ofFunctionExpression, allowAbstract);
     asyncState = savedAsyncModifier;
     return token;
   }
@@ -2482,12 +2513,13 @@
   }
 
   /// Parses a function body.  This method is used in both expression context
-  /// (when [isExpression] is true) and statement context. In statement context
-  /// (when [isExpression] is false), and if the function body is on the form
-  /// `=> expression`, a trailing semicolon is required.
+  /// (when [ofFunctionExpression] is true) and statement context. In statement
+  /// context (when [ofFunctionExpression] is false), and if the function body
+  /// is on the form `=> expression`, a trailing semicolon is required.
   ///
   /// It's an error if there's no function body unless [allowAbstract] is true.
-  Token parseFunctionBody(Token token, bool isExpression, bool allowAbstract) {
+  Token parseFunctionBody(
+      Token token, bool ofFunctionExpression, bool allowAbstract) {
     if (optional(';', token)) {
       if (!allowAbstract) {
         reportRecoverableError(token, fasta.messageExpectedBody);
@@ -2497,7 +2529,7 @@
     } else if (optional('=>', token)) {
       Token begin = token;
       token = parseExpression(token.next);
-      if (!isExpression) {
+      if (!ofFunctionExpression) {
         expectSemicolon(token);
         listener.handleExpressionFunctionBody(begin, token);
       } else {
@@ -2509,7 +2541,7 @@
       // Recover from a bad factory method.
       reportRecoverableError(token, fasta.messageExpectedBody);
       token = parseExpression(token.next);
-      if (!isExpression) {
+      if (!ofFunctionExpression) {
         expectSemicolon(token);
         listener.handleExpressionFunctionBody(begin, token);
       } else {
@@ -2535,7 +2567,7 @@
     }
     listener.endBlockFunctionBody(statementCount, begin, token);
     expect('}', token);
-    return isExpression ? token.next : token;
+    return ofFunctionExpression ? token.next : token;
   }
 
   Token skipAsyncModifier(Token token) {
@@ -3029,7 +3061,7 @@
       } else if (identical(value, "const")) {
         return parseConstExpression(token);
       } else if (identical(value, "void")) {
-        return parseNamedFunctionExpression(token);
+        return parseSendOrFunctionLiteral(token, context);
       } else if (!inPlainSync &&
           (identical(value, "yield") || identical(value, "async"))) {
         return expressionExpected(token);
@@ -3247,24 +3279,6 @@
     }
   }
 
-  bool isFunctionDeclaration(Token token) {
-    if (optional('<', token)) {
-      Token closeBrace = closeBraceTokenFor(token);
-      if (closeBrace == null) return false;
-      token = closeBrace.next;
-    }
-    if (optional('(', token)) {
-      String afterParens = closeBraceTokenFor(token).next.stringValue;
-      if (identical(afterParens, '{') ||
-          identical(afterParens, '=>') ||
-          identical(afterParens, 'async') ||
-          identical(afterParens, 'sync')) {
-        return true;
-      }
-    }
-    return false;
-  }
-
   Token parseRequiredArguments(Token token) {
     if (optional('(', token)) {
       token = parseArguments(token);
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 4765edf..b60cf57 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -164,13 +164,13 @@
 
   /**
    * Appends a substring from the scan offset [start] to the current
-   * [scanOffset] plus [closingQuotes]. The closing quote(s) will be added
+   * [scanOffset] plus [syntheticChars]. The additional char(s) will be added
    * to the unterminated string literal's lexeme but the returned
-   * token's length will *not* include those closing quotes
+   * token's length will *not* include those additional char(s)
    * so as to be true to the original source.
    */
   void appendSyntheticSubstringToken(
-      TokenType type, int start, bool asciiOnly, String closingQuotes);
+      TokenType type, int start, bool asciiOnly, String syntheticChars);
 
   /** Documentation in subclass [ArrayBasedScanner]. */
   void appendPrecedenceToken(TokenType type);
@@ -726,7 +726,9 @@
             hasExponentDigits = true;
           } else {
             if (!hasExponentDigits) {
-              unterminated('1e', shouldAdvance: false);
+              appendSyntheticSubstringToken(TokenType.DOUBLE, start, true, '0');
+              appendErrorToken(
+                  new UnterminatedToken('1e', tokenStart, stringOffset));
               return next;
             }
             break;
diff --git a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
index a5d7b09..4933378 100644
--- a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
@@ -262,9 +262,9 @@
 
   @override
   void appendSyntheticSubstringToken(
-      TokenType type, int start, bool asciiOnly, String closingQuotes) {
+      TokenType type, int start, bool asciiOnly, String syntheticChars) {
     appendToken(
-        createSyntheticSubstringToken(type, start, asciiOnly, closingQuotes));
+        createSyntheticSubstringToken(type, start, asciiOnly, syntheticChars));
   }
 
   /**
@@ -282,13 +282,13 @@
 
   /**
    * Returns a new synthetic substring from the scan offset [start]
-   * to the current [scanOffset] plus the [closingQuotes].
-   * The [closingQuotes] are appended to the unterminated string
+   * to the current [scanOffset] plus the [syntheticChars].
+   * The [syntheticChars] are appended to the unterminated string
    * literal's lexeme but the returned token's length will *not* include
-   * those closing quotes so as to be true to the original source.
+   * those additional characters so as to be true to the original source.
    */
   analyzer.StringToken createSyntheticSubstringToken(
-      TokenType type, int start, bool asciiOnly, String closingQuotes);
+      TokenType type, int start, bool asciiOnly, String syntheticChars);
 
   /**
    * This method is called to discard '<' from the "grouping" stack.
diff --git a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
index 8e45e86..5d86888 100644
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
@@ -57,10 +57,10 @@
 
   @override
   analyzer.StringToken createSyntheticSubstringToken(
-      TokenType type, int start, bool asciiOnly, String closingQuotes) {
+      TokenType type, int start, bool asciiOnly, String syntheticChars) {
     String source = string.substring(start, scanOffset);
     return new SyntheticStringToken(
-        type, source + closingQuotes, tokenStart, source.length);
+        type, source + syntheticChars, tokenStart, source.length);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
index 16bfb05..6e87514 100644
--- a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
@@ -210,10 +210,10 @@
 
   @override
   analyzer.StringToken createSyntheticSubstringToken(
-      TokenType type, int start, bool asciiOnly, String closingQuotes) {
+      TokenType type, int start, bool asciiOnly, String syntheticChars) {
     String source = StringToken.decodeUtf8(bytes, start, byteOffset, asciiOnly);
     return new SyntheticStringToken(
-        type, source + closingQuotes, tokenStart, source.length);
+        type, source + syntheticChars, tokenStart, source.length);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index b8db980..4645159 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -118,6 +118,12 @@
   }
 
   @override
+  void endMetadataStar(int count, bool forParameter) {
+    debugEvent("MetadataStar");
+    push(popList(count) ?? NullValue.Metadata);
+  }
+
+  @override
   void endHide(Token hideKeyword) {
     debugEvent("Hide");
     List<String> names = pop();
diff --git a/pkg/front_end/lib/src/fasta/source/unhandled_listener.dart b/pkg/front_end/lib/src/fasta/source/unhandled_listener.dart
index ed72851..87d392d 100644
--- a/pkg/front_end/lib/src/fasta/source/unhandled_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/unhandled_listener.dart
@@ -30,12 +30,6 @@
   List<String> popIdentifierList(int count) => popList(count);
 
   @override
-  void endMetadataStar(int count, bool forParameter) {
-    debugEvent("MetadataStar");
-    push(popList(count) ?? NullValue.Metadata);
-  }
-
-  @override
   void endConditionalUri(Token ifKeyword, Token equalitySign) {
     debugEvent("ConditionalUri");
     popCharOffset();
diff --git a/pkg/front_end/lib/src/incremental/kernel_driver.dart b/pkg/front_end/lib/src/incremental/kernel_driver.dart
index 4e029a2..be9b602 100644
--- a/pkg/front_end/lib/src/incremental/kernel_driver.dart
+++ b/pkg/front_end/lib/src/incremental/kernel_driver.dart
@@ -8,6 +8,7 @@
 import 'package:front_end/src/base/api_signature.dart';
 import 'package:front_end/src/base/performace_logger.dart';
 import 'package:front_end/src/base/processed_options.dart';
+import 'package:front_end/src/byte_store/byte_store.dart';
 import 'package:front_end/src/fasta/compiler_context.dart';
 import 'package:front_end/src/fasta/dill/dill_library_builder.dart';
 import 'package:front_end/src/fasta/dill/dill_target.dart';
@@ -15,7 +16,6 @@
 import 'package:front_end/src/fasta/kernel/utils.dart';
 import 'package:front_end/src/fasta/ticker.dart';
 import 'package:front_end/src/fasta/uri_translator.dart';
-import 'package:front_end/src/byte_store/byte_store.dart';
 import 'package:front_end/src/incremental/file_state.dart';
 import 'package:kernel/binary/ast_from_binary.dart';
 import 'package:kernel/core_types.dart';
@@ -131,9 +131,11 @@
     return await runWithFrontEndContext('Compute delta', () async {
       await _refreshInvalidatedFiles();
 
+      CanonicalName nameRoot = new CanonicalName.root();
+
       // Load the SDK outline before building the graph, so that the file
       // system state is configured to skip SDK libraries.
-      await _loadSdkOutline();
+      await _loadSdkOutline(nameRoot);
 
       // Ensure that the graph starting at the entry point is ready.
       FileState entryLibrary =
@@ -147,7 +149,6 @@
         return cycles;
       });
 
-      CanonicalName nameRoot = new CanonicalName.root();
       DillTarget dillTarget = new DillTarget(
           new Ticker(isVerbose: false), _uriTranslator, _options.target);
 
@@ -359,18 +360,16 @@
 
   /// Load the SDK outline if its bytes are provided, and configure the file
   /// system state to skip SDK library files.
-  Future<Null> _loadSdkOutline() async {
+  Future<Null> _loadSdkOutline(CanonicalName nameRoot) async {
     if (_sdkOutlineBytes != null) {
-      if (_sdkOutline == null) {
-        await _logger.runAsync('Load SDK outline from bytes.', () async {
-          _sdkOutline = new Program();
-          new BinaryBuilder(_sdkOutlineBytes).readProgram(_sdkOutline);
-          // Configure the file system state to skip the outline libraries.
-          for (var outlineLibrary in _sdkOutline.libraries) {
-            _fsState.skipSdkLibraries.add(outlineLibrary.importUri);
-          }
-        });
-      }
+      await _logger.runAsync('Load SDK outline from bytes.', () async {
+        _sdkOutline = new Program(nameRoot: nameRoot);
+        new BinaryBuilder(_sdkOutlineBytes).readProgram(_sdkOutline);
+        // Configure the file system state to skip the outline libraries.
+        for (var outlineLibrary in _sdkOutline.libraries) {
+          _fsState.skipSdkLibraries.add(outlineLibrary.importUri);
+        }
+      });
     }
   }
 
diff --git a/pkg/front_end/lib/src/incremental/unlinked_unit.dart b/pkg/front_end/lib/src/incremental/unlinked_unit.dart
index e074daf..503fb59 100644
--- a/pkg/front_end/lib/src/incremental/unlinked_unit.dart
+++ b/pkg/front_end/lib/src/incremental/unlinked_unit.dart
@@ -110,13 +110,14 @@
   _BodySkippingParser() : super(new Listener());
 
   @override
-  Token parseFunctionBody(Token token, bool isExpression, bool allowAbstract) {
+  Token parseFunctionBody(
+      Token token, bool ofFunctionExpression, bool allowAbstract) {
     if (identical('{', token.lexeme)) {
       Token close = skipBlock(token);
       bodyRanges.add(new _BodyRange(token.charOffset, close.charOffset));
-      return isExpression ? close.next : close;
+      return ofFunctionExpression ? close.next : close;
     }
-    return super.parseFunctionBody(token, isExpression, allowAbstract);
+    return super.parseFunctionBody(token, ofFunctionExpression, allowAbstract);
   }
 
   Token parseMixinApplicationRest(Token token) {
diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
index 025184e..f8f382d 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -21,8 +21,14 @@
 /// used to obtain resolved ASTs, and these are fed into kernel code generation
 /// logic.
 class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator {
-  /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 1;
+  static const MSG_PENDING_COMPUTE =
+      'A computeDelta() invocation is still executing.';
+
+  static const MSG_NO_LAST_DELTA =
+      'The last delta has been already accepted or rejected.';
+
+  static const MSG_HAS_LAST_DELTA =
+      'The last delta must be either accepted or rejected.';
 
   /// The logger to report compilation progress.
   final PerformanceLog _logger;
@@ -36,8 +42,15 @@
   /// The [KernelDriver] that is used to compute kernels.
   KernelDriver _driver;
 
-  /// Latest compilation signatures produced by [computeDelta] for libraries.
-  final Map<Uri, String> _latestSignature = {};
+  /// Whether [computeDelta] is executing.
+  bool _isComputeDeltaExecuting = false;
+
+  /// The current signatures for libraries.
+  final Map<Uri, String> _currentSignatures = {};
+
+  /// The signatures for libraries produced by the last [computeDelta], or
+  /// `null` if the last delta was either accepted or rejected.
+  Map<Uri, String> _lastSignatures;
 
   /// The object that provides additional information for tests.
   _TestView _testView;
@@ -65,63 +78,85 @@
   _TestView get test => _testView;
 
   @override
-  Future<DeltaProgram> computeDelta() async {
-    return await _logger.runAsync('Compute delta', () async {
-      KernelResult kernelResult = await _driver.getKernel(_entryPoint);
-      List<LibraryCycleResult> results = kernelResult.results;
+  void acceptLastDelta() {
+    _throwIfNoLastDelta();
+    _currentSignatures.addAll(_lastSignatures);
+    _lastSignatures = null;
+  }
 
-      // The file graph might have changed, perform GC.
-      await _gc();
+  @override
+  Future<DeltaProgram> computeDelta() {
+    if (_isComputeDeltaExecuting) {
+      throw new StateError(MSG_PENDING_COMPUTE);
+    }
 
-      // The set of affected library cycles (have different signatures).
-      final affectedLibraryCycles = new Set<LibraryCycle>();
-      for (LibraryCycleResult result in results) {
-        for (Library library in result.kernelLibraries) {
-          Uri uri = library.importUri;
-          if (_latestSignature[uri] != result.signature) {
-            _latestSignature[uri] = result.signature;
-            affectedLibraryCycles.add(result.cycle);
-          }
-        }
-      }
+    if (_lastSignatures != null) {
+      throw new StateError(MSG_HAS_LAST_DELTA);
+    }
+    _lastSignatures = {};
 
-      // The set of affected library cycles (have different signatures),
-      // or libraries that import or export affected libraries (so VM might
-      // have inlined some code from affected libraries into them).
-      final vmRequiredLibraryCycles = new Set<LibraryCycle>();
+    _isComputeDeltaExecuting = true;
 
-      void gatherVmRequiredLibraryCycles(LibraryCycle cycle) {
-        if (vmRequiredLibraryCycles.add(cycle)) {
-          cycle.directUsers.forEach(gatherVmRequiredLibraryCycles);
-        }
-      }
+    return _logger.runAsync('Compute delta', () async {
+      try {
+        KernelResult kernelResult = await _driver.getKernel(_entryPoint);
+        List<LibraryCycleResult> results = kernelResult.results;
 
-      affectedLibraryCycles.forEach(gatherVmRequiredLibraryCycles);
+        // The file graph might have changed, perform GC.
+        await _gc();
 
-      // Add required libraries.
-      Program program = new Program(nameRoot: kernelResult.nameRoot);
-      for (LibraryCycleResult result in results) {
-        if (vmRequiredLibraryCycles.contains(result.cycle)) {
+        // The set of affected library cycles (have different signatures).
+        final affectedLibraryCycles = new Set<LibraryCycle>();
+        for (LibraryCycleResult result in results) {
           for (Library library in result.kernelLibraries) {
-            program.libraries.add(library);
-            library.parent = program;
+            Uri uri = library.importUri;
+            if (_currentSignatures[uri] != result.signature) {
+              _lastSignatures[uri] = result.signature;
+              affectedLibraryCycles.add(result.cycle);
+            }
           }
         }
-      }
 
-      // Set the main method.
-      if (program.libraries.isNotEmpty) {
-        for (Library library in results.last.kernelLibraries) {
-          if (library.importUri == _entryPoint) {
-            program.mainMethod = library.procedures.firstWhere(
-                (procedure) => procedure.name.name == 'main',
-                orElse: () => null);
-            break;
+        // The set of affected library cycles (have different signatures),
+        // or libraries that import or export affected libraries (so VM might
+        // have inlined some code from affected libraries into them).
+        final vmRequiredLibraryCycles = new Set<LibraryCycle>();
+
+        void gatherVmRequiredLibraryCycles(LibraryCycle cycle) {
+          if (vmRequiredLibraryCycles.add(cycle)) {
+            cycle.directUsers.forEach(gatherVmRequiredLibraryCycles);
           }
         }
-      }
 
-      return new DeltaProgram(program);
+        affectedLibraryCycles.forEach(gatherVmRequiredLibraryCycles);
+
+        // Add required libraries.
+        Program program = new Program(nameRoot: kernelResult.nameRoot);
+        for (LibraryCycleResult result in results) {
+          if (vmRequiredLibraryCycles.contains(result.cycle)) {
+            for (Library library in result.kernelLibraries) {
+              program.libraries.add(library);
+              library.parent = program;
+            }
+          }
+        }
+
+        // Set the main method.
+        if (program.libraries.isNotEmpty) {
+          for (Library library in results.last.kernelLibraries) {
+            if (library.importUri == _entryPoint) {
+              program.mainMethod = library.procedures.firstWhere(
+                  (procedure) => procedure.name.name == 'main',
+                  orElse: () => null);
+              break;
+            }
+          }
+        }
+
+        return new DeltaProgram(program);
+      } finally {
+        _isComputeDeltaExecuting = false;
+      }
     });
   }
 
@@ -130,7 +165,14 @@
     _driver.invalidate(uri);
   }
 
-  /// TODO(scheglov) document
+  @override
+  void rejectLastDelta() {
+    _throwIfNoLastDelta();
+    _lastSignatures = null;
+  }
+
+  /// Find files which are not referenced from the entry point and report
+  /// them to the watch function.
   Future<Null> _gc() async {
     var removedFiles = _driver.fsState.gc(_entryPoint);
     if (removedFiles.isNotEmpty && _watchFn != null) {
@@ -139,6 +181,18 @@
       }
     }
   }
+
+  /// Throw [StateError] if [_lastSignatures] is `null`, i.e. there is no
+  /// last delta - it either has not been computed yet, or has been already
+  /// accepted or rejected.
+  void _throwIfNoLastDelta() {
+    if (_isComputeDeltaExecuting) {
+      throw new StateError(MSG_PENDING_COMPUTE);
+    }
+    if (_lastSignatures == null) {
+      throw new StateError(MSG_NO_LAST_DELTA);
+    }
+  }
 }
 
 @visibleForTesting
diff --git a/pkg/front_end/lib/src/scanner/errors.dart b/pkg/front_end/lib/src/scanner/errors.dart
index 93b7fb0..62756b7 100644
--- a/pkg/front_end/lib/src/scanner/errors.dart
+++ b/pkg/front_end/lib/src/scanner/errors.dart
@@ -141,6 +141,9 @@
         if (type == TokenType.OPEN_PAREN) {
           return _makeError(ScannerErrorCode.EXPECTED_TOKEN, [')']);
         }
+        if (type == TokenType.LT) {
+          return _makeError(ScannerErrorCode.EXPECTED_TOKEN, ['>']);
+        }
       } else if (errorCode == codeUnexpectedDollarInString) {
         return _makeError(ScannerErrorCode.MISSING_IDENTIFIER, null);
       }
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index ca0c8d6..d1c4ac3 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -903,3 +903,7 @@
 
 InvalidPackageUri:
   template: "Invalid package Uri '#uri':\n  #string."
+
+IntegerLiteralIsOutOfRange:
+  template: "The integer literal #lexeme can't be represented in 64 bits."
+  tip: "Try using BigInt (from 'dart:typed_data' library) if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808."
diff --git a/pkg/front_end/test/incremental_kernel_generator_test.dart b/pkg/front_end/test/incremental_kernel_generator_test.dart
index 75fdeb6..226d6dc 100644
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
@@ -8,6 +8,7 @@
 import 'package:front_end/incremental_kernel_generator.dart';
 import 'package:front_end/memory_file_system.dart';
 import 'package:front_end/src/byte_store/byte_store.dart';
+import 'package:front_end/src/fasta/kernel/utils.dart';
 import 'package:front_end/src/incremental_kernel_generator_impl.dart';
 import 'package:front_end/summary_generator.dart';
 import 'package:kernel/ast.dart';
@@ -57,6 +58,20 @@
     return (await incrementalKernelGenerator.computeDelta()).newProgram;
   }
 
+  test_acceptLastDelta() async {
+    writeFile('/test/.packages', 'test:lib/');
+    String path = '/test/lib/test.dart';
+    Uri uri = writeFile(path, '');
+
+    await getInitialState(uri);
+    incrementalKernelGenerator.acceptLastDelta();
+
+    // Attempt to accept the second time.
+    _assertStateError(() {
+      incrementalKernelGenerator.acceptLastDelta();
+    }, IncrementalKernelGeneratorImpl.MSG_NO_LAST_DELTA);
+  }
+
   test_compile_chain() async {
     writeFile('/test/.packages', 'test:lib/');
     String aPath = '/test/lib/a.dart';
@@ -77,6 +92,7 @@
 
     {
       Program program = await getInitialState(cUri);
+      incrementalKernelGenerator.acceptLastDelta();
       _assertLibraryUris(program,
           includes: [aUri, bUri, cUri, Uri.parse('dart:core')]);
       Library library = _getLibrary(program, cUri);
@@ -154,6 +170,7 @@
 
     {
       Program program = await getInitialState(aUri);
+      incrementalKernelGenerator.acceptLastDelta();
       _assertLibraryUris(program,
           includes: [aUri, bUri, cUri, dUri, Uri.parse('dart:core')]);
     }
@@ -166,6 +183,7 @@
     incrementalKernelGenerator.invalidate(cUri);
     {
       DeltaProgram delta = await incrementalKernelGenerator.computeDelta();
+      incrementalKernelGenerator.acceptLastDelta();
       Program program = delta.newProgram;
       _assertLibraryUris(program,
           includes: [aUri, bUri, cUri],
@@ -184,19 +202,29 @@
     fileSystem.entityForUri(sdkOutlineUri).writeAsBytesSync(sdkOutlineBytes);
 
     writeFile('/test/.packages', 'test:lib/');
-    String path = '/test/lib/test.dart';
-    Uri uri = writeFile(path, r'''
+    String aPath = '/test/lib/a.dart';
+    String bPath = '/test/lib/b.dart';
+    Uri aUri = writeFile(aPath, r'''
+int getValue() {
+  return 1;
+}
+''');
+    Uri bUri = writeFile(bPath, r'''
 import 'dart:async';
+import 'a.dart';
+
 var a = 1;
 Future<String> b;
 ''');
 
-    Program program = await getInitialState(uri, sdkOutlineUri: sdkOutlineUri);
+    Program program = await getInitialState(bUri, sdkOutlineUri: sdkOutlineUri);
+    incrementalKernelGenerator.acceptLastDelta();
     _assertLibraryUris(program,
-        includes: [uri], excludes: [Uri.parse('dart:core')]);
+        includes: [bUri], excludes: [Uri.parse('dart:core')]);
 
-    Library library = _getLibrary(program, uri);
-    expect(_getLibraryText(library), r'''library;
+    Library library = _getLibrary(program, bUri);
+    expect(_getLibraryText(library), r'''
+library;
 import self as self;
 import "dart:core" as core;
 import "dart:async" as asy;
@@ -204,6 +232,49 @@
 static field core::int a = 1;
 static field asy::Future<core::String> b;
 ''');
+
+    // Update a.dart and recompile.
+    writeFile(aPath, r'''
+int getValue() {
+  return 2;
+}
+''');
+    incrementalKernelGenerator.invalidate(aUri);
+    var deltaProgram = await incrementalKernelGenerator.computeDelta();
+
+    // Check that the canonical names for SDK libraries are serializable.
+    serializeProgram(deltaProgram.newProgram,
+        filter: (library) => !library.importUri.isScheme('dart'));
+  }
+
+  test_computeDelta_hasAnotherRunning() async {
+    writeFile('/test/.packages', 'test:lib/');
+    String path = '/test/lib/test.dart';
+    Uri uri = writeFile(path, '');
+
+    await getInitialState(uri);
+    incrementalKernelGenerator.acceptLastDelta();
+
+    // Run, but don't wait.
+    var future = incrementalKernelGenerator.computeDelta();
+
+    // acceptLastDelta() is failing while the future is pending.
+    _assertStateError(() {
+      incrementalKernelGenerator.acceptLastDelta();
+    }, IncrementalKernelGeneratorImpl.MSG_PENDING_COMPUTE);
+
+    // rejectLastDelta() is failing while the future is pending.
+    _assertStateError(() {
+      incrementalKernelGenerator.rejectLastDelta();
+    }, IncrementalKernelGeneratorImpl.MSG_PENDING_COMPUTE);
+
+    // Run another, this causes StateError.
+    _assertStateError(() {
+      incrementalKernelGenerator.computeDelta();
+    }, IncrementalKernelGeneratorImpl.MSG_PENDING_COMPUTE);
+
+    // Wait for the pending future.
+    await future;
   }
 
   test_inferPackagesFile() async {
@@ -230,6 +301,34 @@
 ''');
   }
 
+  test_rejectLastDelta() async {
+    writeFile('/test/.packages', 'test:lib/');
+    String path = '/test/lib/test.dart';
+    Uri uri = writeFile(path, 'var v = 1;');
+
+    // The first delta includes the the library.
+    {
+      Program program = await getInitialState(uri);
+      _assertLibraryUris(program, includes: [uri]);
+      Library library = _getLibrary(program, uri);
+      expect(_getLibraryText(library), contains('core::int v = 1'));
+    }
+
+    // Reject the last delta, so the test library is included again.
+    incrementalKernelGenerator.rejectLastDelta();
+    {
+      var delta = await incrementalKernelGenerator.computeDelta();
+      Program program = delta.newProgram;
+      _assertLibraryUris(program, includes: [uri]);
+    }
+
+    // Attempt to reject the last delta twice.
+    incrementalKernelGenerator.rejectLastDelta();
+    _assertStateError(() {
+      incrementalKernelGenerator.rejectLastDelta();
+    }, IncrementalKernelGeneratorImpl.MSG_NO_LAST_DELTA);
+  }
+
   test_updateEntryPoint() async {
     writeFile('/test/.packages', 'test:lib/');
     String path = '/test/lib/test.dart';
@@ -252,6 +351,7 @@
     // Compute the initial state.
     {
       Program program = await getInitialState(uri);
+      incrementalKernelGenerator.acceptLastDelta();
       Library library = _getLibrary(program, uri);
       expect(_getLibraryText(library), initialText);
     }
@@ -266,6 +366,7 @@
     // We have not invalidated the file, so the delta is empty.
     {
       DeltaProgram delta = await incrementalKernelGenerator.computeDelta();
+      incrementalKernelGenerator.acceptLastDelta();
       expect(delta.newProgram.libraries, isEmpty);
     }
 
@@ -273,6 +374,7 @@
     incrementalKernelGenerator.invalidate(uri);
     {
       DeltaProgram delta = await incrementalKernelGenerator.computeDelta();
+      incrementalKernelGenerator.acceptLastDelta();
       Program program = delta.newProgram;
       _assertLibraryUris(program, includes: [uri]);
       Library library = _getLibrary(program, uri);
@@ -312,6 +414,7 @@
 
     {
       await getInitialState(cUri);
+      incrementalKernelGenerator.acceptLastDelta();
       // We use at least c.dart and a.dart now.
       expect(usedFiles, contains(cUri));
       expect(usedFiles, contains(aUri));
@@ -327,6 +430,7 @@
     incrementalKernelGenerator.invalidate(cUri);
     {
       await incrementalKernelGenerator.computeDelta();
+      incrementalKernelGenerator.acceptLastDelta();
       // The only new file is b.dart now.
       expect(usedFiles, [bUri]);
       usedFiles.clear();
@@ -340,6 +444,7 @@
     incrementalKernelGenerator.invalidate(cUri);
     {
       await incrementalKernelGenerator.computeDelta();
+      incrementalKernelGenerator.acceptLastDelta();
       // No new used files.
       expect(usedFiles, isEmpty);
       // The file b.dart is not used anymore.
@@ -359,6 +464,7 @@
     watchFn = null;
 
     await getInitialState(bUri);
+    incrementalKernelGenerator.acceptLastDelta();
 
     // Update b.dart to import a.dart file.
     writeFile(bPath, "import 'a.dart';");
@@ -403,6 +509,16 @@
     }
   }
 
+  /// Assert that invocation of [f] throws a [StateError] with the given [msg].
+  void _assertStateError(f(), String msg) {
+    try {
+      f();
+      fail('StateError expected.');
+    } on StateError catch (e) {
+      expect(e.message, msg);
+    }
+  }
+
   Future<List<int>> _computeSdkOutlineBytes() async {
     var options = new CompilerOptions()
       ..fileSystem = fileSystem
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index 01b1aa5..567373f 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -225,6 +225,26 @@
     }
   }
 
+  void test_double_error() {
+    String source = "3457e";
+    ErrorListener listener = new ErrorListener();
+    Token token = scanWithListener(source, listener);
+    expect(token, isNotNull);
+    expect(token.type, TokenType.DOUBLE);
+    expect(token.offset, 0);
+    expect(token.isSynthetic, isTrue);
+    // the invalid token is updated to be valid ...
+    expect(token.lexeme, source + "0");
+    // ... but the length does *not* include the additional character
+    // so as to be true to the original source.
+    expect(token.length, source.length);
+    expect(token.next.isEof, isTrue);
+    expect(listener.errors, hasLength(1));
+    TestError error = listener.errors[0];
+    expect(error.errorCode, ScannerErrorCode.MISSING_DIGIT);
+    expect(error.offset, source.length - 1);
+  }
+
   @override
   void test_mismatched_opener_in_interpolation() {
     // When openers and closers are mismatched,
diff --git a/pkg/front_end/test/src/byte_store/byte_store_test.dart b/pkg/front_end/test/src/byte_store/byte_store_test.dart
index 2ebc024..328377a 100644
--- a/pkg/front_end/test/src/byte_store/byte_store_test.dart
+++ b/pkg/front_end/test/src/byte_store/byte_store_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:front_end/src/byte_store/byte_store.dart';
-import 'package:mockito/mockito.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(BytesMemoryCacheTest);
     defineReflectiveTests(MemoryCachingByteStoreTest);
     defineReflectiveTests(NullByteStoreTest);
   });
@@ -19,9 +19,90 @@
 }
 
 @reflectiveTest
+class BytesMemoryCacheTest {
+  test_get_notFound_evict() {
+    var cache = new BytesMemoryCache(100);
+
+    // Request '1'.  Nothing found.
+    expect(cache.get('1', _noBytes), isNull);
+
+    // Add enough data to the store to force an eviction.
+    cache.put('2', _b(40));
+    cache.put('3', _b(40));
+    cache.put('4', _b(40));
+  }
+
+  test_get_notFound_retry() {
+    var cache = new BytesMemoryCache(100);
+
+    // Request '1'.  Nothing found.
+    expect(cache.get('1', _noBytes), isNull);
+
+    // Request '1' again.
+    // The previous `null` result should not have been cached.
+    expect(cache.get('1', () => _b(40)), isNotNull);
+  }
+
+  test_get_put_evict() {
+    var cache = new BytesMemoryCache(100);
+
+    // Keys: [1, 2].
+    cache.put('1', _b(40));
+    cache.put('2', _b(50));
+
+    // Request '1', so now it is the most recently used.
+    // Keys: [2, 1].
+    cache.get('1', _noBytes);
+
+    // 40 + 50 + 30 > 100
+    // So, '2' is evicted.
+    cache.put('3', _b(30));
+    expect(cache.get('1', _noBytes), hasLength(40));
+    expect(cache.get('2', _noBytes), isNull);
+    expect(cache.get('3', _noBytes), hasLength(30));
+  }
+
+  test_put_evict_first() {
+    var cache = new BytesMemoryCache(100);
+
+    // 40 + 50 < 100
+    cache.put('1', _b(40));
+    cache.put('2', _b(50));
+    expect(cache.get('1', _noBytes), hasLength(40));
+    expect(cache.get('2', _noBytes), hasLength(50));
+
+    // 40 + 50 + 30 > 100
+    // So, '1' is evicted.
+    cache.put('3', _b(30));
+    expect(cache.get('1', _noBytes), isNull);
+    expect(cache.get('2', _noBytes), hasLength(50));
+    expect(cache.get('3', _noBytes), hasLength(30));
+  }
+
+  test_put_evict_firstAndSecond() {
+    var cache = new BytesMemoryCache(100);
+
+    // 10 + 80 < 100
+    cache.put('1', _b(10));
+    cache.put('2', _b(80));
+    expect(cache.get('1', _noBytes), hasLength(10));
+    expect(cache.get('2', _noBytes), hasLength(80));
+
+    // 10 + 80 + 30 > 100
+    // So, '1' and '2' are evicted.
+    cache.put('3', _b(30));
+    expect(cache.get('1', _noBytes), isNull);
+    expect(cache.get('2', _noBytes), isNull);
+    expect(cache.get('3', _noBytes), hasLength(30));
+  }
+
+  static List<int> _noBytes() => null;
+}
+
+@reflectiveTest
 class MemoryCachingByteStoreTest {
   test_get_notFound_evict() {
-    var store = new _TestByteStore();
+    var store = new NullByteStore();
     var cachingStore = new MemoryCachingByteStore(store, 100);
 
     // Request '1'.  Nothing found.
@@ -34,7 +115,7 @@
   }
 
   test_get_notFound_retry() {
-    var mockStore = new _TestByteStore();
+    var mockStore = new NullByteStore();
     var baseStore = new MemoryCachingByteStore(mockStore, 1000);
     var cachingStore = new MemoryCachingByteStore(baseStore, 100);
 
@@ -50,7 +131,7 @@
   }
 
   test_get_put_evict() {
-    var store = new _TestByteStore();
+    var store = new NullByteStore();
     var cachingStore = new MemoryCachingByteStore(store, 100);
 
     // Keys: [1, 2].
@@ -70,7 +151,7 @@
   }
 
   test_put_evict_first() {
-    var store = new _TestByteStore();
+    var store = new NullByteStore();
     var cachingStore = new MemoryCachingByteStore(store, 100);
 
     // 40 + 50 < 100
@@ -88,7 +169,7 @@
   }
 
   test_put_evict_firstAndSecond() {
-    var store = new _TestByteStore();
+    var store = new NullByteStore();
     var cachingStore = new MemoryCachingByteStore(store, 100);
 
     // 10 + 80 < 100
@@ -117,5 +198,3 @@
     expect(store.get('1'), isNull);
   }
 }
-
-class _TestByteStore extends Mock implements ByteStore {}
diff --git a/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart b/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
index 76dae64..00ad7e9 100644
--- a/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
+++ b/pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart
@@ -41,6 +41,7 @@
     compiler = await createIncrementalCompiler(
         'file:///a.dart', new HybridFileSystem(fs));
     await rebuild(compiler, outputUri); // this is a full compile.
+    compiler.acceptLastDelta();
   });
 
   tearDown(() async {
@@ -105,6 +106,7 @@
     var remoteVm = new RemoteVm(port);
     var reloadResult = await remoteVm.reload(outputUri);
     expect(reloadResult['success'], isTrue);
+    compiler.acceptLastDelta();
     await remoteVm.disconnect();
   }
 
diff --git a/pkg/front_end/test/src/incremental/kernel_driver_test.dart b/pkg/front_end/test/src/incremental/kernel_driver_test.dart
index 0bb7511..f4de69e 100644
--- a/pkg/front_end/test/src/incremental/kernel_driver_test.dart
+++ b/pkg/front_end/test/src/incremental/kernel_driver_test.dart
@@ -8,9 +8,9 @@
 import 'package:front_end/memory_file_system.dart';
 import 'package:front_end/src/base/performace_logger.dart';
 import 'package:front_end/src/base/processed_options.dart';
+import 'package:front_end/src/byte_store/byte_store.dart';
 import 'package:front_end/src/fasta/kernel/utils.dart';
 import 'package:front_end/src/fasta/uri_translator_impl.dart';
-import 'package:front_end/src/byte_store/byte_store.dart';
 import 'package:front_end/src/incremental/kernel_driver.dart';
 import 'package:front_end/summary_generator.dart';
 import 'package:kernel/ast.dart';
@@ -295,24 +295,63 @@
 
     writeFile('/test/.packages', 'test:lib/');
     String aPath = '/test/lib/a.dart';
+    String bPath = '/test/lib/b.dart';
     Uri aUri = writeFile(aPath, r'''
+int getValue() {
+  return 1;
+}
+''');
+    Uri bUri = writeFile(bPath, r'''
 import 'dart:async';
+import 'a.dart';
 var a = 1;
 Future<String> b;
 ''');
 
-    KernelResult result = await driver.getKernel(aUri);
+    KernelResult result = await driver.getKernel(bUri);
 
     // The result does not include SDK libraries.
     _assertLibraryUris(result,
-        includes: [aUri],
+        includes: [bUri],
         excludes: [Uri.parse('dart:core'), Uri.parse('dart:core')]);
 
     // The types of top-level variables are resolved.
-    var library = _getLibrary(result, aUri);
+    var library = _getLibrary(result, bUri);
     expect(library.fields[0].type.toString(), 'dart.core::int');
     expect(library.fields[1].type.toString(),
         'dart.async::Future<dart.core::String>');
+
+    {
+      // Update a.dart and recompile.
+      writeFile(aPath, r'''
+int getValue() {
+  return 2;
+}
+''');
+      driver.invalidate(aUri);
+      var kernelResult = await driver.getKernel(bUri);
+      var allLibraries = kernelResult.results
+          .map((c) => c.kernelLibraries)
+          .expand((libs) => libs)
+          .toList();
+
+      // The result does not include SDK libraries.
+      _assertLibraryUris(result,
+          includes: [bUri],
+          excludes: [Uri.parse('dart:core'), Uri.parse('dart:core')]);
+
+      // The types of top-level variables are resolved.
+      var library = _getLibrary(result, bUri);
+      expect(library.fields[0].type.toString(), 'dart.core::int');
+      expect(library.fields[1].type.toString(),
+          'dart.async::Future<dart.core::String>');
+
+      // We should be able to serialize the libraries without SDK.
+      var program =
+          new Program(nameRoot: kernelResult.nameRoot, libraries: allLibraries);
+      serializeProgram(program,
+          filter: (library) => !library.importUri.isScheme('dart'));
+    }
   }
 
   test_limitedStore_exportDependencies() async {
diff --git a/pkg/front_end/testcases/arrow_function.dart b/pkg/front_end/testcases/arrow_function.dart
new file mode 100644
index 0000000..0b8e57d
--- /dev/null
+++ b/pkg/front_end/testcases/arrow_function.dart
@@ -0,0 +1,5 @@
+// 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.
+
+main<T>() => () => T;
diff --git a/pkg/front_end/testcases/arrow_function.dart.direct.expect b/pkg/front_end/testcases/arrow_function.dart.direct.expect
new file mode 100644
index 0000000..ec2e898
--- /dev/null
+++ b/pkg/front_end/testcases/arrow_function.dart.direct.expect
@@ -0,0 +1,6 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method main<T extends core::Object>() → dynamic
+  return () → dynamic => self::main::T;
diff --git a/pkg/front_end/testcases/arrow_function.dart.outline.expect b/pkg/front_end/testcases/arrow_function.dart.outline.expect
new file mode 100644
index 0000000..8304bc1
--- /dev/null
+++ b/pkg/front_end/testcases/arrow_function.dart.outline.expect
@@ -0,0 +1,6 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method main<T extends core::Object>() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/arrow_function.dart.strong.expect b/pkg/front_end/testcases/arrow_function.dart.strong.expect
new file mode 100644
index 0000000..4cea2f2
--- /dev/null
+++ b/pkg/front_end/testcases/arrow_function.dart.strong.expect
@@ -0,0 +1,6 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method main<T extends core::Object>() → dynamic
+  return () → core::Type => self::main::T;
diff --git a/pkg/front_end/testcases/ast_builder.status b/pkg/front_end/testcases/ast_builder.status
index 163e22d..d91252e 100644
--- a/pkg/front_end/testcases/ast_builder.status
+++ b/pkg/front_end/testcases/ast_builder.status
@@ -23,6 +23,8 @@
 for_in_scope: Crash
 function_type_is_check: Crash
 functions: Crash
+illegal_named_function_expression: Crash
+illegal_named_function_expression_scope: Crash
 implicit_scope_test: Crash
 implicit_this: Crash
 inference/abstract_class_instantiation: Crash
@@ -351,6 +353,7 @@
 inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: Crash
 inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: Crash
 invocations: Crash
+local_generic_function: Crash
 micro: Crash
 named_parameters: Crash
 null_aware: Crash
diff --git a/pkg/front_end/testcases/compile.status b/pkg/front_end/testcases/compile.status
index 1fe28aa..f75b525 100644
--- a/pkg/front_end/testcases/compile.status
+++ b/pkg/front_end/testcases/compile.status
@@ -94,7 +94,6 @@
 
 regress/issue_29940: Crash # Issue 29940.
 regress/issue_29941: Crash # Issue 29941.
-regress/issue_29942: Crash # Issue 29942.
 regress/issue_29943: Crash # Issue 29943.
 regress/issue_29944: Crash # Issue 29944.
 regress/issue_29945: Crash # Issue 29945.
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart b/pkg/front_end/testcases/illegal_named_function_expression.dart
new file mode 100644
index 0000000..ac09db3
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart
@@ -0,0 +1,9 @@
+// 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.
+
+main() {
+  var x = void f<T>(T t) {};
+  print(x.runtimeType);
+  print(void g<T>(T t) {});
+}
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart.direct.expect b/pkg/front_end/testcases/illegal_named_function_expression.dart.direct.expect
new file mode 100644
index 0000000..d833703
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart.direct.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/illegal_named_function_expression.dart:6:11: Error: A function expression can't have a return type.\n  var x = void f<T>(T t) {};\n          ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:6:16: Error: A function expression can't have a name.\n  var x = void f<T>(T t) {};\n               ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:8:9: Error: A function expression can't have a return type.\n  print(void g<T>(T t) {});\n        ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:8:14: Error: A function expression can't have a name.\n  print(void g<T>(T t) {});\n             ^"]/* from null */;
+static method main() → dynamic {
+  dynamic x = let final <T extends core::Object>(T) → void f = <T extends core::Object>(T t) → void {} in f;
+  core::print(x.runtimeType);
+  core::print(let final <T extends core::Object>(T) → void g = <T extends core::Object>(T t) → void {} in g);
+}
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart.outline.expect b/pkg/front_end/testcases/illegal_named_function_expression.dart.outline.expect
new file mode 100644
index 0000000..6a28c0d
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart.outline.expect
@@ -0,0 +1,5 @@
+library;
+import self as self;
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart.strong.expect b/pkg/front_end/testcases/illegal_named_function_expression.dart.strong.expect
new file mode 100644
index 0000000..7fb8bba
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart.strong.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/illegal_named_function_expression.dart:6:11: Error: A function expression can't have a return type.\n  var x = void f<T>(T t) {};\n          ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:6:16: Error: A function expression can't have a name.\n  var x = void f<T>(T t) {};\n               ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:8:9: Error: A function expression can't have a return type.\n  print(void g<T>(T t) {});\n        ^", "pkg/front_end/testcases/illegal_named_function_expression.dart:8:14: Error: A function expression can't have a name.\n  print(void g<T>(T t) {});\n             ^"]/* from null */;
+static method main() → dynamic {
+  <T extends core::Object>(T) → core::Null x = let final <T extends core::Object>(T) → core::Null f = <T extends core::Object>(T t) → core::Null {} in f;
+  core::print(x.runtimeType);
+  core::print(let final <T extends core::Object>(T) → core::Null g = <T extends core::Object>(T t) → core::Null {} in g);
+}
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart
new file mode 100644
index 0000000..2b3df38
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart
@@ -0,0 +1,8 @@
+// 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.
+
+main() {
+  void f() {}
+  print(void f() {});
+}
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.direct.expect b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.direct.expect
new file mode 100644
index 0000000..7339408
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.direct.expect
@@ -0,0 +1,9 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:9: Error: A function expression can't have a return type.\n  print(void f() {});\n        ^", "pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:14: Error: A function expression can't have a name.\n  print(void f() {});\n             ^"]/* from null */;
+static method main() → dynamic {
+  function f() → void {}
+  core::print(let final () → void f = () → void {} in f);
+}
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.outline.expect b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.outline.expect
new file mode 100644
index 0000000..6a28c0d
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.outline.expect
@@ -0,0 +1,5 @@
+library;
+import self as self;
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.strong.expect b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.strong.expect
new file mode 100644
index 0000000..b32c052
--- /dev/null
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.strong.expect
@@ -0,0 +1,9 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:9: Error: A function expression can't have a return type.\n  print(void f() {});\n        ^", "pkg/front_end/testcases/illegal_named_function_expression_scope.dart:7:14: Error: A function expression can't have a name.\n  print(void f() {});\n             ^"]/* from null */;
+static method main() → dynamic {
+  function f() → void {}
+  core::print(let final () → core::Null f = () → core::Null {} in f);
+}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart.direct.expect b/pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart.direct.expect
index a80d1b4..5ffe78d 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart.direct.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_function_of_t_using_the_t.dart.direct.expect
@@ -4,13 +4,13 @@
 
 static method main() → void {
   {
-    function f<T extends core::Object>(invalid-type x) → invalid-type
+    function f<T extends core::Object>(T x) → T
       return null;
     dynamic v1 = f;
     v1 = <S extends core::Object>(dynamic x) → dynamic => x;
   }
   {
-    function f<T extends core::Object>(invalid-type x) → core::List<invalid-type>
+    function f<T extends core::Object>(T x) → core::List<T>
       return null;
     dynamic v2 = f;
     v2 = <S extends core::Object>(dynamic x) → dynamic => <dynamic>[x];
diff --git a/pkg/front_end/testcases/inference/generic_functions_return_typedef.dart.direct.expect b/pkg/front_end/testcases/inference/generic_functions_return_typedef.dart.direct.expect
index 4db3c45..e583060 100644
--- a/pkg/front_end/testcases/inference/generic_functions_return_typedef.dart.direct.expect
+++ b/pkg/front_end/testcases/inference/generic_functions_return_typedef.dart.direct.expect
@@ -4,7 +4,7 @@
 
 typedef ToValue<T extends core::Object> = (T) → void;
 static method main() → dynamic {
-  function f<T extends core::Object>(invalid-type x) → (invalid-type) → void
+  function f<T extends core::Object>(T x) → (T) → void
     return null;
   dynamic x = f.call<core::int>(42);
   dynamic y = f.call(42);
diff --git a/pkg/front_end/testcases/local_generic_function.dart b/pkg/front_end/testcases/local_generic_function.dart
new file mode 100644
index 0000000..a251f14
--- /dev/null
+++ b/pkg/front_end/testcases/local_generic_function.dart
@@ -0,0 +1,8 @@
+// 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.
+
+main() {
+  T f<T>(List<T> l) => l[0];
+  var x = f([0]);
+}
diff --git a/pkg/front_end/testcases/local_generic_function.dart.direct.expect b/pkg/front_end/testcases/local_generic_function.dart.direct.expect
new file mode 100644
index 0000000..204a1a3
--- /dev/null
+++ b/pkg/front_end/testcases/local_generic_function.dart.direct.expect
@@ -0,0 +1,9 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  function f<T extends core::Object>(core::List<T> l) → T
+    return l.[](0);
+  dynamic x = f.call(<dynamic>[0]);
+}
diff --git a/pkg/front_end/testcases/local_generic_function.dart.outline.expect b/pkg/front_end/testcases/local_generic_function.dart.outline.expect
new file mode 100644
index 0000000..6a28c0d
--- /dev/null
+++ b/pkg/front_end/testcases/local_generic_function.dart.outline.expect
@@ -0,0 +1,5 @@
+library;
+import self as self;
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/local_generic_function.dart.strong.expect b/pkg/front_end/testcases/local_generic_function.dart.strong.expect
new file mode 100644
index 0000000..8f00c9d
--- /dev/null
+++ b/pkg/front_end/testcases/local_generic_function.dart.strong.expect
@@ -0,0 +1,9 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  function f<T extends core::Object>(core::List<T> l) → T
+    return l.{core::List::[]}(0);
+  core::int x = f.call<core::int>(<core::int>[0]);
+}
diff --git a/pkg/front_end/testcases/regress/issue_29937.dart.direct.expect b/pkg/front_end/testcases/regress/issue_29937.dart.direct.expect
index cb18971..25cc209 100644
--- a/pkg/front_end/testcases/regress/issue_29937.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_29937.dart.direct.expect
@@ -3,5 +3,5 @@
 
 const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_29937.dart:6:4: Error: A function expression can't have a name.\n  [f() {}];\n   ^"]/* from null */;
 static method main() → dynamic {
-  <dynamic>[let final dynamic f = () → dynamic {} in f];
+  <dynamic>[let final () → dynamic f = () → dynamic {} in f];
 }
diff --git a/pkg/front_end/testcases/regress/issue_29942.dart.direct.expect b/pkg/front_end/testcases/regress/issue_29942.dart.direct.expect
new file mode 100644
index 0000000..3e9ea8f
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_29942.dart.direct.expect
@@ -0,0 +1,7 @@
+library;
+import self as self;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_29942.dart:8:5: Error: Expected a function body or '=>'.\nTry adding {}.\nf() =\n    ^", "pkg/front_end/testcases/regress/issue_29942.dart:8:5: Error: Expected a function body or '=>'.\nf() =\n    ^", "pkg/front_end/testcases/regress/issue_29942.dart:10:1: Error: A function expression can't have a name.\nh() => null;\n^"]/* from null */;
+static method main() → dynamic {}
+static method f() → dynamic
+  return let final () → dynamic h = () → dynamic => null in h;
diff --git a/pkg/front_end/testcases/regress/issue_29942.dart.strong.expect b/pkg/front_end/testcases/regress/issue_29942.dart.strong.expect
new file mode 100644
index 0000000..3e9ea8f
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_29942.dart.strong.expect
@@ -0,0 +1,7 @@
+library;
+import self as self;
+
+const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_29942.dart:8:5: Error: Expected a function body or '=>'.\nTry adding {}.\nf() =\n    ^", "pkg/front_end/testcases/regress/issue_29942.dart:8:5: Error: Expected a function body or '=>'.\nf() =\n    ^", "pkg/front_end/testcases/regress/issue_29942.dart:10:1: Error: A function expression can't have a name.\nh() => null;\n^"]/* from null */;
+static method main() → dynamic {}
+static method f() → dynamic
+  return let final () → dynamic h = () → dynamic => null in h;
diff --git a/pkg/front_end/testcases/regress/issue_29978.dart.direct.expect b/pkg/front_end/testcases/regress/issue_29978.dart.direct.expect
index 6289276..15ef040 100644
--- a/pkg/front_end/testcases/regress/issue_29978.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_29978.dart.direct.expect
@@ -5,5 +5,5 @@
 static method foo(dynamic a, dynamic b) → dynamic
   return null;
 static method main() → dynamic {
-  self::foo(null, let final dynamic f = () → dynamic {} in f);
+  self::foo(null, let final () → dynamic f = () → dynamic {} in f);
 }
diff --git a/pkg/front_end/testcases/regress/issue_29979.dart.direct.expect b/pkg/front_end/testcases/regress/issue_29979.dart.direct.expect
index 4087641..8812386 100644
--- a/pkg/front_end/testcases/regress/issue_29979.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_29979.dart.direct.expect
@@ -3,5 +3,5 @@
 
 const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_29979.dart:6:4: Error: A function expression can't have a name.\n  (f() {})();\n   ^"]/* from null */;
 static method main() → dynamic {
-  (let final dynamic f = () → dynamic {} in f).call();
+  (let final () → dynamic f = () → dynamic {} in f).call();
 }
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index ad537b3..a18c278 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -158,7 +158,6 @@
 
 regress/issue_29940: Crash # Issue 29940.
 regress/issue_29941: Crash # Issue 29941.
-regress/issue_29942: Crash # Issue 29942.
 regress/issue_29943: Crash # Issue 29943.
 regress/issue_29944: Crash # Issue 29944.
 regress/issue_29945: Crash # Issue 29945.
@@ -172,3 +171,7 @@
 regress/issue_29984: Crash # Issue 29984.
 regress/issue_29985: Crash # Issue 29985.
 regress/issue_29987: Crash # Issue 29987.
+
+arrow_function: RuntimeError
+illegal_named_function_expression: RuntimeError
+local_generic_function: RuntimeError
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 7ddb029..462f7ed 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -77,7 +77,7 @@
   List<Byte> utf8Bytes;
   // Line starts are delta-encoded (they are encoded as line lengths).  The list
   // [0, 10, 25, 32, 42] is encoded as [0, 10, 15, 7, 10].
-  List<Uint> lineStarts;
+  List<UInt> lineStarts;
 }
 
 type UriSource {
@@ -182,6 +182,8 @@
   UriReference fileUri;
   List<Expression> annotations;
   List<LibraryDependency> libraryDependencies;
+  List<LibraryPart> libraryParts;
+  List<Typedef> typedefs;
   List<Class> classes;
   List<Field> fields;
   List<Procedure> procedures;
@@ -195,9 +197,23 @@
   List<Combinator> combinators;
 }
 
+type LibraryPart {
+  List<Expression> annotations;
+  UriReference fileUri;
+}
+
+type Typedef {
+  CanonicalNameReference canonicalName;
+  FileOffset fileOffset;
+  StringReference name;
+  UriReference fileUri;
+  List<TypeParameter> typeParameters;
+  DartType type;
+}
+
 type Combinator {
   Byte flags (isShow);
-  List<String> names;
+  List<StringReference> names;
 }
 
 type LibraryDependencyReference {
@@ -219,7 +235,7 @@
 //
 // See ClassLevel in ast.dart for the details of each loading level.
 
-abstract type Class extends Node {
+type Class extends Node {
   Byte tag = 2;
   CanonicalNameReference canonicalName;
   FileOffset fileOffset;
@@ -228,11 +244,12 @@
   StringReference name;
   // An absolute path URI to the .dart file from which the class was created.
   UriReference fileUri;
+  StringReference documentationComment;
   List<Expression> annotations;
   List<TypeParameter> typeParameters;
-  Option<InterfaceType> superClass;
-  Option<InterfaceType> mixedInType;
-  List<InterfaceType> implementedClasses;
+  Option<DartType> superClass;
+  Option<DartType> mixedInType;
+  List<DartType> implementedClasses;
   List<Field> fields;
   List<Constructor> constructors;
   List<Procedure> procedures;
@@ -246,12 +263,10 @@
   FileOffset fileOffset;
   FileOffset fileEndOffset;
   Byte flags (isFinal, isConst, isStatic);
-  // Byte offset in the binary for the parent class,
-  // or 0 if parent is not a class
-  UInt parentPosition;
   Name name;
   // An absolute path URI to the .dart file from which the field was created.
   UriReference fileUri;
+  StringReference documentationComment;
   List<Expression> annotations;
   DartType type;
   Option<Expression> initializer;
@@ -263,8 +278,8 @@
   FileOffset fileOffset;
   FileOffset fileEndOffset;
   Byte flags (isConst, isExternal);
-  UInt parentPosition; // Byte offset in the binary for the parent class.
   Name name;
+  StringReference documentationComment;
   List<Expression> annotations;
   FunctionNode function;
   List<Initializer> initializers;
@@ -287,12 +302,10 @@
   FileOffset fileEndOffset;
   Byte kind; // Index into the ProcedureKind enum above.
   Byte flags (isStatic, isAbstract, isExternal, isConst);
-  // Byte offset in the binary for the parent class,
-  // or 0 if parent is not a class.
-  UInt parentPosition;
   Name name;
   // An absolute path URI to the .dart file from which the class was created.
   UriReference fileUri;
+  StringReference documentationComment;
   List<Expression> annotations;
   // Can only be absent if abstract, but tag is there anyway.
   Option<FunctionNode> function;
@@ -302,28 +315,33 @@
 
 type InvalidInitializer extends Initializer {
   Byte tag = 7;
+  Byte isSynthetic;
 }
 
 type FieldInitializer extends Initializer {
   Byte tag = 8;
+  Byte isSynthetic;
   FieldReference field;
   Expression value;
 }
 
 type SuperInitializer extends Initializer {
   Byte tag = 9;
+  Byte isSynthetic;
   ConstructorReference target;
   Arguments arguments;
 }
 
 type RedirectingInitializer extends Initializer {
   Byte tag = 10;
+  Byte isSynthetic;
   ConstructorReference target;
   Arguments arguments;
 }
 
 type LocalInitializer extends Initializer {
   Byte tag = 11;
+  Byte isSynthetic;
   VariableDeclaration variable;
 }
 
@@ -387,6 +405,7 @@
   // Byte offset in the binary for the variable declaration (without tag).
   UInt variableDeclarationPosition;
   VariableReference variable;
+  Option<DartType> promotedType;
 }
 
 type SpecializedVariableGet extends Expression {
@@ -554,7 +573,6 @@
   Expression left;
   Byte operator; // Index into LogicalOperator enum above
   Expression right;
-  Option<DartType> staticType;
 }
 
 type ConditionalExpression extends Expression {
@@ -676,6 +694,7 @@
 
 type ConstMapLiteral extends Expression {
   Byte tag = 59; // Note: tag is out of order.
+  FileOffset fileOffset;
   DartType keyType;
   DartType valueType;
   List<MapEntry> entries;
@@ -694,6 +713,7 @@
 
 type FunctionExpression extends Expression {
   Byte tag = 52;
+  FileOffset fileOffset;
   FunctionNode function;
 }
 
@@ -974,12 +994,15 @@
   UInt totalParameterCount;
   List<DartType> positionalParameters;
   List<NamedDartType> namedParameters;
+  List<StringReference> positionalParameterNames;
+  CanonicalNameReference typedefReference;
   DartType returnType;
 }
 
 type SimpleFunctionType extends DartType {
   Byte tag = 97; // Note: tag is out of order.
   List<DartType> positionalParameters;
+  List<StringReference> positionalParameterNames;
   DartType returnType;
   // Equivalent to a FunctionType with no type parameters or named parameters,
   // and where all positional parameters are required.
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 7afda0c..f0d508f 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -632,9 +632,6 @@
   /// (this is the default if none is specifically set).
   int fileEndOffset = TreeNode.noOffset;
 
-  /// Offset of the declaration, set and used when writing the binary.
-  int binaryOffset = -1;
-
   /// The degree to which the contents of the class have been loaded.
   ClassLevel level = ClassLevel.Body;
 
@@ -1539,13 +1536,16 @@
     List<NamedType> named =
         namedParameters.map(_getNamedTypeOfVariable).toList(growable: false);
     named.sort();
+    // We need create a copy of the list of type parameters, otherwise
+    // transformations like erasure don't work.
+    var typeParametersCopy = new List<TypeParameter>.from(parent is Constructor
+        ? parent.enclosingClass.typeParameters
+        : typeParameters);
     return new FunctionType(
         positionalParameters.map(_getTypeOfVariable).toList(growable: false),
         returnType,
         namedParameters: named,
-        typeParameters: parent is Constructor
-            ? parent.enclosingClass.typeParameters
-            : typeParameters,
+        typeParameters: typeParametersCopy,
         requiredParameterCount: requiredParameterCount);
   }
 
@@ -4402,9 +4402,6 @@
   /// be set to the root class for type parameters without an explicit bound.
   DartType bound;
 
-  /// Offset of the declaration, set and used when writing the binary.
-  int binaryOffset = 0;
-
   TypeParameter([this.name, this.bound]);
 
   accept(TreeVisitor v) => v.visitTypeParameter(this);
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index cfd6efc..c4ab123 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -535,7 +535,6 @@
     int fileOffset = readOffset();
     int fileEndOffset = readOffset();
     int flags = readByte();
-    readUInt(); // parent class binary offset.
     var name = readName();
     var fileUri = readUriReference();
     var documentationComment = readStringOrNullIfEmpty();
@@ -574,7 +573,6 @@
     var fileOffset = readOffset();
     var fileEndOffset = readOffset();
     var flags = readByte();
-    readUInt(); // parent class binary offset.
     var name = readName();
     var documentationComment = readStringOrNullIfEmpty();
     var annotations = readAnnotationList(node);
@@ -618,7 +616,6 @@
     int kindIndex = readByte();
     var kind = ProcedureKind.values[kindIndex];
     var flags = readByte();
-    readUInt(); // parent class binary offset.
     var name = readName();
     var fileUri = readUriReference();
     var documentationComment = readStringOrNullIfEmpty();
@@ -929,7 +926,8 @@
       case Tag.AwaitExpression:
         return new AwaitExpression(readExpression());
       case Tag.FunctionExpression:
-        return new FunctionExpression(readFunctionNode());
+        int offset = readOffset();
+        return new FunctionExpression(readFunctionNode())..fileOffset = offset;
       case Tag.Let:
         var variable = readVariableDeclaration();
         int stackHeight = variableStack.length;
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index e889eaa..0a738e9 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -396,7 +396,6 @@
     if (node.canonicalName == null) {
       throw 'Missing canonical name for $node';
     }
-    node.binaryOffset = _sink.flushedLength + _sink.length;
     writeByte(Tag.Class);
     writeCanonicalNameReference(getCanonicalNameOfClass(node));
     writeOffset(node.fileOffset);
@@ -429,9 +428,6 @@
     writeOffset(node.fileOffset);
     writeOffset(node.fileEndOffset);
     writeByte(node.flags);
-    assert(node.parent is Class);
-    Class parent = node.parent;
-    writeUInt30(parent.binaryOffset);
     writeName(node.name ?? _emptyName);
     writeStringReference(node.documentationComment ?? '');
     writeAnnotationList(node.annotations);
@@ -455,12 +451,6 @@
     writeOffset(node.fileEndOffset);
     writeByte(node.kind.index);
     writeByte(node.flags);
-    if (node.parent is Class) {
-      Class parent = node.parent;
-      writeUInt30(parent.binaryOffset);
-    } else {
-      writeUInt30(0); // 0 is a valid offset, but not for a class.
-    }
     writeName(node.name ?? '');
     writeUriReference(node.fileUri ?? '');
     writeStringReference(node.documentationComment ?? '');
@@ -479,12 +469,6 @@
     writeOffset(node.fileOffset);
     writeOffset(node.fileEndOffset);
     writeByte(node.flags);
-    if (node.parent is Class) {
-      Class parent = node.parent;
-      writeUInt30(parent.binaryOffset);
-    } else {
-      writeUInt30(0); // 0 is a valid offset, but not for a class.
-    }
     writeName(node.name);
     writeUriReference(node.fileUri ?? '');
     writeStringReference(node.documentationComment ?? '');
@@ -845,6 +829,7 @@
 
   visitFunctionExpression(FunctionExpression node) {
     writeByte(Tag.FunctionExpression);
+    writeOffset(node.fileOffset);
     writeNode(node.function);
   }
 
@@ -1178,7 +1163,6 @@
   }
 
   visitTypeParameter(TypeParameter node) {
-    node.binaryOffset = _sink.flushedLength + _sink.length;
     writeStringReference(node.name ?? '');
     writeNode(node.bound);
   }
diff --git a/pkg/kernel/lib/transformations/erasure.dart b/pkg/kernel/lib/transformations/erasure.dart
index c2f572d..ee36958 100644
--- a/pkg/kernel/lib/transformations/erasure.dart
+++ b/pkg/kernel/lib/transformations/erasure.dart
@@ -51,6 +51,31 @@
 
   @override
   visitDartType(DartType type) {
+    if (type is FunctionType && type.typeParameters.isNotEmpty) {
+      FunctionType function = type;
+      for (var parameter in function.typeParameters) {
+        // Note, normally, we would have to remove these substitutions again to
+        // avoid memory leaks. Unfortunately, that that's not compatible with
+        // how function types share their TypeParameter object with a
+        // FunctionNode.
+        substitution[parameter] = const DynamicType();
+      }
+      for (var parameter in function.typeParameters) {
+        if (!isObject(parameter.bound)) {
+          substitution[parameter] = substitute(parameter.bound, substitution);
+        }
+      }
+      // We need to delete the type parameters of the function type before
+      // calling [substitute], otherwise it creates a new environment with
+      // fresh type variables that shadow the ones we want to remove.  Since a
+      // FunctionType is often assumed to be immutable, we return a copy.
+      type = new FunctionType(
+          function.positionalParameters, function.returnType,
+          namedParameters: function.namedParameters,
+          requiredParameterCount: function.requiredParameterCount,
+          positionalParameterNames: function.positionalParameterNames,
+          typedefReference: function.typedefReference);
+    }
     type = substitute(type, substitution);
     if (isInConstantContext) {
       type = substitute(type, constantSubstitution);
diff --git a/pkg/kernel/test/erasure_test.dart b/pkg/kernel/test/erasure_test.dart
new file mode 100644
index 0000000..e9c6e7b
--- /dev/null
+++ b/pkg/kernel/test/erasure_test.dart
@@ -0,0 +1,103 @@
+// 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 "package:expect/expect.dart";
+import "package:kernel/ast.dart";
+import "package:kernel/core_types.dart";
+import "package:kernel/testing/mock_sdk_program.dart";
+import "package:kernel/text/ast_to_text.dart";
+import "package:kernel/transformations/erasure.dart";
+
+void main(List<String> arguments) {
+  new Tester().testLocalFunction();
+}
+
+class Tester {
+  final Program program;
+
+  final Library library;
+
+  final Procedure mainMethod;
+
+  final CoreTypes coreTypes;
+
+  static final Uri base =
+      new Uri(scheme: "org.dartlang.kernel", host: "", path: "/");
+
+  Tester.internal(this.program, this.library, this.mainMethod)
+      : coreTypes = new CoreTypes(program);
+
+  factory Tester() {
+    Program program = createMockSdkProgram();
+    Library library = new Library(base.resolve("main.dart"))..parent = program;
+    Procedure mainMethod = buildProcedure("main");
+    library.addMember(mainMethod);
+    program.libraries.add(library);
+    program.mainMethod = mainMethod;
+    return new Tester.internal(program, library, mainMethod);
+  }
+
+  void addStatement(Statement statement) {
+    Block body = mainMethod.function.body;
+    body.statements.add(statement);
+    statement.parent = body;
+  }
+
+  void testLocalFunction() {
+    FunctionDeclaration fDeclaration = buildFunctionDeclaration(
+        "f", buildFunctionNodeWithTypesAndParameters());
+    FunctionExpression functionExpression =
+        new FunctionExpression(buildFunctionNodeWithTypesAndParameters());
+
+    addStatement(fDeclaration);
+    addStatement(new ExpressionStatement(functionExpression));
+    Expect.stringEquals(
+        "<T extends dynamic, S extends dart.core::List<T>>(S) → T",
+        debugNodeToString(fDeclaration.variable.type).trim());
+    Expect.stringEquals(
+        "<T extends dynamic, S extends dart.core::List<T>>(S) → T",
+        debugNodeToString(functionExpression.getStaticType(null)).trim());
+    transformProgram(coreTypes, program);
+    Expect.stringEquals("(dart.core::List<dynamic>) → dynamic",
+        debugNodeToString(fDeclaration.variable.type).trim());
+    Expect.stringEquals("(dart.core::List<dynamic>) → dynamic",
+        debugNodeToString(functionExpression.getStaticType(null)).trim());
+  }
+
+  /// Builds this function: `f<T, S extends List<T>>(S argument) → T {}`.
+  FunctionNode buildFunctionNodeWithTypesAndParameters() {
+    TypeParameter tVariable = new TypeParameter("T", const DynamicType());
+    TypeParameter sVariable = new TypeParameter("S", const DynamicType());
+    TypeParameterType tType = new TypeParameterType(tVariable);
+    TypeParameterType sType = new TypeParameterType(sVariable);
+    sVariable.bound = new InterfaceType(coreTypes.listClass, <DartType>[tType]);
+    return new FunctionNode(buildBlock(),
+        positionalParameters: <VariableDeclaration>[
+          new VariableDeclaration("argument", type: sType),
+        ],
+        typeParameters: <TypeParameter>[tVariable, sVariable],
+        returnType: tType);
+  }
+
+  static Block buildBlock([List<Statement> statements]) {
+    return new Block(statements ?? <Statement>[]);
+  }
+
+  static FunctionNode buildFunction([Statement body]) {
+    return new FunctionNode(body ?? buildBlock());
+  }
+
+  static Procedure buildProcedure(String name, [FunctionNode function]) {
+    return new Procedure(
+        new Name(name), ProcedureKind.Method, function ?? buildFunction());
+  }
+
+  static FunctionDeclaration buildFunctionDeclaration(
+      String name, FunctionNode function) {
+    return new FunctionDeclaration(
+        new VariableDeclaration(name,
+            type: function.functionType, isFinal: true),
+        function);
+  }
+}
diff --git a/pkg/pkg.status b/pkg/pkg.status
index bc26a76..79ab37c 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -13,7 +13,6 @@
 
 analysis_server/tool/spec/check_all_test: Skip  # Issue 29133
 analyzer_plugin/tool/spec/check_all_test: Skip  # Issue 29133
-analyzer/tool/summary/check_test: Skip  # Issue 29133
 
 analyzer/test/generated/compile_time_error_code_driver_test: Slow, Pass
 analyzer/test/generated/non_error_resolver_driver_test: Slow, Pass
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 0ce7804..c32ef28 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -199,7 +199,7 @@
 libdart_library("libdart_jit") {
   extra_configs = [ ":dart_maybe_product_config" ]
   extra_deps = [
-    "vm:libdart_platform",
+    "platform:libdart_platform",
     "vm:libdart_lib_jit",
     "vm:libdart_vm_jit",
   ]
@@ -208,7 +208,7 @@
 libdart_library("libdart_jit_product") {
   extra_configs = [ ":dart_product_config" ]
   extra_deps = [
-    "vm:libdart_platform_product",
+    "platform:libdart_platform_product",
     "vm:libdart_lib_jit_product",
     "vm:libdart_vm_jit_product",
   ]
@@ -220,7 +220,7 @@
     ":dart_precompiled_runtime_config",
   ]
   extra_deps = [
-    "vm:libdart_platform",
+    "platform:libdart_platform",
     "vm:libdart_lib_precompiled_runtime",
     "vm:libdart_vm_precompiled_runtime",
   ]
@@ -232,7 +232,7 @@
     ":dart_precompiled_runtime_config",
   ]
   extra_deps = [
-    "vm:libdart_platform_product",
+    "platform:libdart_platform_product",
     "vm:libdart_lib_precompiled_runtime_product",
     "vm:libdart_vm_precompiled_runtime_product",
   ]
@@ -245,7 +245,7 @@
     ":dart_precompiler_config",
   ]
   extra_deps = [
-    "vm:libdart_platform",
+    "platform:libdart_platform",
     "vm:libdart_lib_nosnapshot_with_precompiler",
     "vm:libdart_vm_nosnapshot_with_precompiler",
   ]
@@ -258,7 +258,7 @@
     ":dart_precompiler_config",
   ]
   extra_deps = [
-    "vm:libdart_platform_product",
+    "platform:libdart_platform_product",
     "vm:libdart_lib_nosnapshot_with_precompiler_product",
     "vm:libdart_vm_nosnapshot_with_precompiler_product",
   ]
@@ -270,7 +270,7 @@
     ":dart_precompiler_config",
   ]
   extra_deps = [
-    "vm:libdart_platform",
+    "platform:libdart_platform",
     "vm:libdart_lib_with_precompiler",
     "vm:libdart_vm_with_precompiler",
   ]
@@ -282,7 +282,7 @@
     ":dart_precompiler_config",
   ]
   extra_deps = [
-    "vm:libdart_platform_product",
+    "platform:libdart_platform_product",
     "vm:libdart_lib_with_precompiler_product",
     "vm:libdart_vm_with_precompiler_product",
   ]
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index cd0213a..d194b12 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -2,9 +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("gypi_contents.gni")
-import("../runtime_args.gni")
 import("../../build/compiled_action.gni")
+import("../../sdk/lib/io/io_sources.gni")
+import("../runtime_args.gni")
+import("../vm/vm_sources.gni")
+import("builtin_impl_sources.gni")
+import("builtin_sources.gni")
+import("io_impl_sources.gni")
+import("io_sources.gni")
+import("vmservice/vmservice_sources.gni")
 
 declare_args() {
   # Controls the kind of core snapshot linked into the standalone VM. Using a
@@ -23,7 +29,7 @@
 
   # The path below is hard coded for the Mojo and Flutter trees. When moving
   # the Dart runtime to gn, this path might need to be updated.
-  sources = rebase_path(resources_sources_gypi, "", "../bin/vmservice/")
+  sources = rebase_path(vmservice_sources, "", "../bin/vmservice/")
   outputs = [
     "$target_gen_dir/resources_gen.cc",
   ]
@@ -78,29 +84,23 @@
 gen_library_src_path("generate_builtin_cc_file") {
   name = "_builtin"
   kind = "source"
-  sources = builtin_sources_gypi
+  sources = builtin_sources
   output = "$target_gen_dir/builtin_gen.cc"
 }
 
-sdk_io_sources_gypi =
-    exec_script("../../tools/gypi_to_gn.py",
-                [ rebase_path("../../sdk/lib/io/io_sources.gypi") ],
-                "scope",
-                [ "../../sdk/lib/io/io_sources.gypi" ])
-sdk_io_sources =
-    rebase_path(sdk_io_sources_gypi.sources, ".", "../../sdk/lib/io")
+rebased_io_sdk_sources = rebase_path(io_sdk_sources, ".", "../../sdk/lib/io")
 
 gen_library_src_path("generate_io_cc_file") {
   name = "io"
   kind = "source"
-  sources = [ "../../sdk/lib/io/io.dart" ] + sdk_io_sources
+  sources = [ "../../sdk/lib/io/io.dart" ] + rebased_io_sdk_sources
   output = "$target_gen_dir/io_gen.cc"
 }
 
 gen_library_src_path("generate_io_patch_cc_file") {
   name = "io"
   kind = "patch"
-  sources = io_sources_gypi
+  sources = io_runtime_sources
   output = "$target_gen_dir/io_patch_gen.cc"
 }
 
@@ -271,7 +271,7 @@
                 "log_linux.cc",
                 "log_macos.cc",
                 "log_win.cc",
-              ] + builtin_impl_sources_gypi
+              ] + builtin_impl_sources
   }
 }
 
@@ -316,6 +316,8 @@
       "address_sanitizer.cc",
       "builtin.cc",
       "builtin.h",
+      "gzip.cc",
+      "gzip.h",
       "loader.cc",
       "loader.h",
 
@@ -329,7 +331,10 @@
       "vmservice_impl.h",
     ]
 
-    include_dirs = [ ".." ]
+    include_dirs = [
+      "..",
+      "//third_party",
+    ]
 
     if (dart_use_tcmalloc) {
       deps += [ "//third_party/tcmalloc" ]
@@ -414,7 +419,7 @@
 
     defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
 
-    sources = io_impl_sources_gypi + builtin_impl_sources_gypi
+    sources = io_impl_sources + builtin_impl_sources
     sources += [
       "io_natives.cc",
       "io_natives.h",
@@ -486,7 +491,7 @@
       libs = [ "launchpad" ]
     }
 
-    sources = io_impl_sources_gypi + builtin_impl_sources_gypi
+    sources = io_impl_sources + builtin_impl_sources
     sources += [
                  "builtin_natives.cc",
                  "io_natives.cc",
@@ -760,6 +765,8 @@
     "dfe.h",
     "loader.cc",
     "loader.h",
+    "gzip.cc",
+    "gzip.h",
     "$target_gen_dir/resources_gen.cc",
   ]
   if (dart_runtime_mode == "release") {
@@ -778,6 +785,8 @@
     "snapshot_empty.cc",
     "loader.cc",
     "loader.h",
+    "gzip.cc",
+    "gzip.h",
   ]
   if (dart_runtime_mode == "release") {
     extra_sources += [ "observatory_assets_empty.cc" ]
@@ -816,6 +825,8 @@
     "dfe.h",
     "loader.cc",
     "loader.h",
+    "gzip.cc",
+    "gzip.h",
     "observatory_assets_empty.cc",
     "snapshot_empty.cc",
 
@@ -881,6 +892,21 @@
     ]
     output_name = "hello_fuchsia"
   }
+
+  # Uncomment after https://fuchsia-review.googlesource.com/#/c/build/+/37541/
+  # lands.
+  # copy("copy_hello_fuchsia_dylib") {
+  #   sources = [
+  #     get_label_info(":hello_fuchsia_lib($shlib_toolchain)", "root_out_dir") +
+  #         "/libhello_fuchsia.so",
+  #   ]
+  #   outputs = [
+  #     "$root_build_dir/{{source_file_part}}",
+  #   ]
+  #   deps = [
+  #     ":hello_fuchsia_dylib($shlib_toolchain)",
+  #   ]
+  # }
 }
 
 executable("process_test") {
@@ -955,7 +981,7 @@
 
   # The VM sources are already included in libdart, so we just want to add in
   # the tests here.
-  vm_tests = rebase_path(vm_tests_list, ".", "../vm")
+  vm_tests = rebase_path(vm_sources_tests, ".", "../vm")
 
   sources = [
               "error_exit.cc",
@@ -966,7 +992,7 @@
               "run_vm_tests.cc",
               "dfe.cc",
               "dfe.h",
-            ] + builtin_impl_tests_list + vm_tests
+            ] + builtin_impl_tests + vm_tests
 
   if (!is_win) {
     ldflags = [ "-rdynamic" ]
diff --git a/runtime/bin/builtin_impl_sources.gni b/runtime/bin/builtin_impl_sources.gni
new file mode 100644
index 0000000..c739107
--- /dev/null
+++ b/runtime/bin/builtin_impl_sources.gni
@@ -0,0 +1,80 @@
+# 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.
+
+# This file contains all C++ sources for the dart:_builtin library and
+# some of the C++ sources for the dart:io library.  The rest are in
+# io_impl_sources.gypi.
+
+builtin_impl_sources = [
+  "crypto.cc",
+  "crypto.h",
+  "crypto_android.cc",
+  "crypto_fuchsia.cc",
+  "crypto_linux.cc",
+  "crypto_macos.cc",
+  "crypto_win.cc",
+  "builtin_common.cc",
+  "dartutils.cc",
+  "dartutils.h",
+  "directory.cc",
+  "directory.h",
+  "directory_android.cc",
+  "directory_fuchsia.cc",
+  "directory_linux.cc",
+  "directory_macos.cc",
+  "directory_unsupported.cc",
+  "directory_win.cc",
+  "extensions.h",
+  "extensions.cc",
+  "extensions_android.cc",
+  "extensions_fuchsia.cc",
+  "extensions_linux.cc",
+  "extensions_macos.cc",
+  "extensions_win.cc",
+  "fdutils.h",
+  "fdutils_android.cc",
+  "fdutils_fuchsia.cc",
+  "fdutils_linux.cc",
+  "fdutils_macos.cc",
+  "file.cc",
+  "file.h",
+  "file_android.cc",
+  "file_fuchsia.cc",
+  "file_linux.cc",
+  "file_macos.cc",
+  "file_support.cc",
+  "file_unsupported.cc",
+  "file_win.cc",
+  "io_buffer.cc",
+  "io_buffer.h",
+  "isolate_data.cc",
+  "isolate_data.h",
+  "lockers.h",
+  "thread.h",
+  "thread_android.cc",
+  "thread_android.h",
+  "thread_fuchsia.cc",
+  "thread_fuchsia.h",
+  "thread_linux.cc",
+  "thread_linux.h",
+  "thread_macos.cc",
+  "thread_macos.h",
+  "thread_win.cc",
+  "thread_win.h",
+  "utils.h",
+  "utils_android.cc",
+  "utils_fuchsia.cc",
+  "utils_linux.cc",
+  "utils_macos.cc",
+  "utils_win.cc",
+  "utils_win.h",
+]
+
+builtin_impl_tests = [
+  "crypto_test.cc",
+  "directory_test.cc",
+  "eventhandler_test.cc",
+  "file_test.cc",
+  "hashmap_test.cc",
+]
diff --git a/runtime/bin/builtin_impl_sources.gypi b/runtime/bin/builtin_impl_sources.gypi
deleted file mode 100644
index ccbbc5f..0000000
--- a/runtime/bin/builtin_impl_sources.gypi
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all C++ sources for the dart:_builtin library and
-# some of the C++ sources for the dart:io library.  The rest are in
-# io_impl_sources.gypi.
-{
-  'sources': [
-    'crypto.cc',
-    'crypto.h',
-    'crypto_android.cc',
-    'crypto_fuchsia.cc',
-    'crypto_linux.cc',
-    'crypto_macos.cc',
-    'crypto_test.cc',
-    'crypto_win.cc',
-    'builtin_common.cc',
-    'dartutils.cc',
-    'dartutils.h',
-    'directory.cc',
-    'directory.h',
-    'directory_android.cc',
-    'directory_fuchsia.cc',
-    'directory_linux.cc',
-    'directory_macos.cc',
-    'directory_test.cc',
-    'directory_unsupported.cc',
-    'directory_win.cc',
-    'eventhandler_test.cc',
-    'extensions.h',
-    'extensions.cc',
-    'extensions_android.cc',
-    'extensions_fuchsia.cc',
-    'extensions_linux.cc',
-    'extensions_macos.cc',
-    'extensions_win.cc',
-    'fdutils.h',
-    'fdutils_android.cc',
-    'fdutils_fuchsia.cc',
-    'fdutils_linux.cc',
-    'fdutils_macos.cc',
-    'file.cc',
-    'file.h',
-    'file_android.cc',
-    'file_fuchsia.cc',
-    'file_linux.cc',
-    'file_macos.cc',
-    'file_support.cc',
-    'file_unsupported.cc',
-    'file_test.cc',
-    'file_win.cc',
-    'hashmap_test.cc',
-    'io_buffer.cc',
-    'io_buffer.h',
-    'isolate_data.cc',
-    'isolate_data.h',
-    'lockers.h',
-    'thread.h',
-    'thread_android.cc',
-    'thread_android.h',
-    'thread_fuchsia.cc',
-    'thread_fuchsia.h',
-    'thread_linux.cc',
-    'thread_linux.h',
-    'thread_macos.cc',
-    'thread_macos.h',
-    'thread_win.cc',
-    'thread_win.h',
-    'utils.h',
-    'utils_android.cc',
-    'utils_fuchsia.cc',
-    'utils_linux.cc',
-    'utils_macos.cc',
-    'utils_win.cc',
-    'utils_win.h',
-  ],
-}
diff --git a/runtime/bin/builtin_sources.gypi b/runtime/bin/builtin_sources.gni
similarity index 66%
rename from runtime/bin/builtin_sources.gypi
rename to runtime/bin/builtin_sources.gni
index fbf642e..c9edd40 100644
--- a/runtime/bin/builtin_sources.gypi
+++ b/runtime/bin/builtin_sources.gni
@@ -1,10 +1,6 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# 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.
 
 # This file contains all dart sources for the dart:_builtin library.
-{
-  'sources': [
-    'builtin.dart',
-  ],
-}
+builtin_sources = [ "builtin.dart" ]
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index bde9465..ed2f6759 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -48,14 +48,15 @@
 const char* const DartUtils::kVMServiceLibURL = "dart:vmservice";
 
 struct MagicNumberData {
-  static const intptr_t kLength = 4;
+  static const intptr_t kMaxLength = 4;
 
-  const uint8_t bytes[kLength];
-  bool should_skip;
+  intptr_t length;
+  const uint8_t bytes[kMaxLength];
 };
 
-MagicNumberData snapshot_magic_number = {{0xf5, 0xf5, 0xdc, 0xdc}, true};
-MagicNumberData kernel_magic_number = {{0x90, 0xab, 0xcd, 0xef}, false};
+MagicNumberData snapshot_magic_number = {4, {0xf5, 0xf5, 0xdc, 0xdc}};
+MagicNumberData kernel_magic_number = {4, {0x90, 0xab, 0xcd, 0xef}};
+MagicNumberData gzip_magic_number = {2, {0x1f, 0x8b, 0, 0}};
 
 static bool IsWindowsHost() {
 #if defined(HOST_OS_WINDOWS)
@@ -339,40 +340,45 @@
                      kNumArgs, dart_args);
 }
 
-static bool CheckMagicNumber(const uint8_t** buf,
-                             intptr_t* len,
+static bool CheckMagicNumber(const uint8_t* buffer,
+                             intptr_t buffer_length,
                              const MagicNumberData& magic_number) {
-  if ((*len >= MagicNumberData::kLength) &&
-      (memcmp(*buf, magic_number.bytes, MagicNumberData::kLength) == 0)) {
-    if (magic_number.should_skip) {
-      *buf += MagicNumberData::kLength;
-      *len -= MagicNumberData::kLength;
-    }
-    return true;
+  if ((buffer_length >= magic_number.length)) {
+    return memcmp(buffer, magic_number.bytes, magic_number.length) == 0;
   }
   return false;
 }
 
-DartUtils::MagicNumber DartUtils::SniffForMagicNumber(const uint8_t** buf,
-                                                      intptr_t* len) {
-  if (CheckMagicNumber(buf, len, snapshot_magic_number)) {
+DartUtils::MagicNumber DartUtils::SniffForMagicNumber(const uint8_t* buffer,
+                                                      intptr_t buffer_length) {
+  if (CheckMagicNumber(buffer, buffer_length, snapshot_magic_number)) {
     return kSnapshotMagicNumber;
   }
 
-  if (CheckMagicNumber(buf, len, kernel_magic_number)) {
+  if (CheckMagicNumber(buffer, buffer_length, kernel_magic_number)) {
     return kKernelMagicNumber;
   }
 
+  if (CheckMagicNumber(buffer, buffer_length, gzip_magic_number)) {
+    return kGzipMagicNumber;
+  }
+
   return kUnknownMagicNumber;
 }
 
-void DartUtils::WriteMagicNumber(File* file) {
+void DartUtils::WriteSnapshotMagicNumber(File* file) {
   // Write a magic number and version information into the snapshot file.
-  bool bytes_written =
-      file->WriteFully(snapshot_magic_number.bytes, MagicNumberData::kLength);
+  bool bytes_written = file->WriteFully(snapshot_magic_number.bytes,
+                                        snapshot_magic_number.length);
   ASSERT(bytes_written);
 }
 
+void DartUtils::SkipSnapshotMagicNumber(const uint8_t** buffer,
+                                        intptr_t* buffer_length) {
+  *buffer += snapshot_magic_number.length;
+  *buffer_length -= snapshot_magic_number.length;
+}
+
 void FUNCTION_NAME(Builtin_GetCurrentDirectory)(Dart_NativeArguments args) {
   const char* current = Directory::Current();
   if (current != NULL) {
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 135d12c..f36aac9 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -200,21 +200,17 @@
   enum MagicNumber {
     kSnapshotMagicNumber,
     kKernelMagicNumber,
+    kGzipMagicNumber,
     kUnknownMagicNumber
   };
 
-  // static const uint8_t* GetMagicNumber(MagicNumber number);
-
-  // Sniffs the specified text_buffer to see if it contains the magic number
-  // representing a script snapshot. If the text_buffer is a script snapshot
-  // the return value is an updated pointer to the text_buffer pointing past
-  // the magic number value. The 'buffer_len' parameter is also appropriately
-  // adjusted.
-  static MagicNumber SniffForMagicNumber(const uint8_t** text_buffer,
-                                         intptr_t* buffer_len);
+  // Checks if the buffer is a script snapshot, kernel file, or gzip file.
+  static MagicNumber SniffForMagicNumber(const uint8_t* text_buffer,
+                                         intptr_t buffer_len);
 
   // Write a magic number to indicate a script snapshot file.
-  static void WriteMagicNumber(File* file);
+  static void WriteSnapshotMagicNumber(File* file);
+  static void SkipSnapshotMagicNumber(const uint8_t** buffer, intptr_t* length);
 
   // Global state that stores the original working directory..
   static const char* original_working_directory;
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index bc83f5b..23a2723 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -42,6 +42,10 @@
   }
 }
 
+void DFE::clear_kernel_vmservice_io() {
+  kernel_vmservice_io_ = NULL;
+}
+
 void DFE::SetKernelBinaries(const char* name) {
   intptr_t len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(),
                           kPlatformBinaryName) +
@@ -143,10 +147,7 @@
     DartUtils::ReadFile(&buffer, kernel_ir_size, script_file);
     DartUtils::CloseFile(script_file);
     if (*kernel_ir_size > 0 && buffer != NULL) {
-      // We need a temporary variable because SniffForMagicNumber modifies the
-      // buffer pointer to skip snapshot magic number.
-      const uint8_t* temp = buffer;
-      if (DartUtils::SniffForMagicNumber(&temp, kernel_ir_size) !=
+      if (DartUtils::SniffForMagicNumber(buffer, *kernel_ir_size) !=
           DartUtils::kKernelMagicNumber) {
         free(const_cast<uint8_t*>(buffer));
         *kernel_ir = NULL;
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index 6e876fa..93f91b5 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -34,6 +34,8 @@
 
   void* kernel_vmservice_io() const { return kernel_vmservice_io_; }
 
+  void clear_kernel_vmservice_io();
+
   bool kernel_file_specified() const { return kernel_file_specified_; }
   void set_kernel_file_specified(bool value) { kernel_file_specified_ = value; }
 
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index d63328a..f543f09 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -1510,7 +1510,7 @@
       new IsolateData(script_uri, package_root, package_config, NULL);
   Dart_Isolate isolate = NULL;
   isolate = Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
-                               isolate_snapshot_instructions, NULL,
+                               isolate_snapshot_instructions, flags,
                                isolate_data, error);
 
   if (isolate == NULL) {
@@ -1629,6 +1629,7 @@
   init_params.file_write = DartUtils::WriteFile;
   init_params.file_close = DartUtils::CloseFile;
   init_params.entropy_source = DartUtils::EntropySource;
+  init_params.start_kernel_isolate = false;
 
   MappedMemory* mapped_vm_snapshot_data = NULL;
   MappedMemory* mapped_vm_snapshot_instructions = NULL;
diff --git a/runtime/bin/gypi_contents.gni b/runtime/bin/gypi_contents.gni
deleted file mode 100644
index 34fc269..0000000
--- a/runtime/bin/gypi_contents.gni
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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.
-
-_gypi_files = [
-  "builtin_sources.gypi",
-  "builtin_impl_sources.gypi",
-  "vmservice/vmservice_sources.gypi",
-  "io_sources.gypi",
-  "io_impl_sources.gypi",
-]
-
-_gypi_contents = exec_script("../../tools/gypi_to_gn.py",
-                             rebase_path(_gypi_files) + [ "--prefix" ],
-                             "scope",
-                             _gypi_files)
-
-resources_sources_gypi = _gypi_contents.vmservice_sources_sources
-
-builtin_sources_gypi = _gypi_contents.builtin_sources_sources
-builtin_impl_sources_gypi = _gypi_contents.builtin_impl_sources_sources
-
-io_sources_gypi = _gypi_contents.io_sources_sources
-io_impl_sources_gypi = _gypi_contents.io_impl_sources_sources
-
-_test_gypi_files = [
-  "../vm/vm_sources.gypi",
-  "builtin_impl_sources.gypi",
-]
-
-_test_only_gypi_contents = exec_script("../../tools/gypi_to_gn.py",
-                                       rebase_path(_test_gypi_files) + [
-                                             "--keep_only=_test.cc",
-                                             "--keep_only=_test.h",
-                                             "--prefix",
-                                           ],
-                                       "scope",
-                                       _test_gypi_files)
-
-# The VM sources are already included in libdart, so we just want to add in
-# the tests here.
-vm_tests_list = _test_only_gypi_contents.vm_sources_sources
-builtin_impl_tests_list = _test_only_gypi_contents.builtin_impl_sources_sources
diff --git a/runtime/bin/gzip.cc b/runtime/bin/gzip.cc
new file mode 100644
index 0000000..ebeb408
--- /dev/null
+++ b/runtime/bin/gzip.cc
@@ -0,0 +1,86 @@
+// 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.
+
+#include "bin/gzip.h"
+
+#include "platform/assert.h"
+#include "platform/globals.h"
+#include "zlib/zlib.h"
+
+namespace dart {
+namespace bin {
+
+void Decompress(const uint8_t* input,
+                intptr_t input_len,
+                uint8_t** output,
+                intptr_t* output_length) {
+  ASSERT(input != NULL);
+  ASSERT(input_len > 0);
+  ASSERT(output != NULL);
+  ASSERT(output_length != NULL);
+
+  const intptr_t kChunkSize = 256 * 1024;
+
+  // Initialize output.
+  intptr_t output_capacity = input_len * 2;
+  if (output_capacity < kChunkSize) {
+    output_capacity = kChunkSize;
+  }
+  *output = reinterpret_cast<uint8_t*>(malloc(output_capacity));
+
+  uint8_t chunk_out[kChunkSize];
+  z_stream strm;
+  strm.zalloc = Z_NULL;
+  strm.zfree = Z_NULL;
+  strm.opaque = Z_NULL;
+  strm.avail_in = 0;
+  strm.next_in = 0;
+  int ret = inflateInit2(&strm, 32 + MAX_WBITS);
+  ASSERT(ret == Z_OK);
+
+  intptr_t input_cursor = 0;
+  intptr_t output_cursor = 0;
+  do {
+    // Setup input.
+    intptr_t size_in = input_len - input_cursor;
+    if (size_in > kChunkSize) {
+      size_in = kChunkSize;
+    }
+    strm.avail_in = size_in;
+    strm.next_in = const_cast<uint8_t*>(&input[input_cursor]);
+
+    // Inflate until we've exhausted the current input chunk.
+    do {
+      // Setup output.
+      strm.avail_out = kChunkSize;
+      strm.next_out = &chunk_out[0];
+      // Inflate.
+      ret = inflate(&strm, Z_SYNC_FLUSH);
+      // We either hit the end of the stream or made forward progress.
+      ASSERT((ret == Z_STREAM_END) || (ret == Z_OK));
+      // Grow output buffer size.
+      intptr_t size_out = kChunkSize - strm.avail_out;
+      if (size_out > (output_capacity - output_cursor)) {
+        output_capacity *= 2;
+        ASSERT(size_out <= (output_capacity - output_cursor));
+        *output = reinterpret_cast<uint8_t*>(realloc(*output, output_capacity));
+      }
+      // Copy output.
+      memmove(&((*output)[output_cursor]), &chunk_out[0], size_out);
+      output_cursor += size_out;
+    } while (strm.avail_out == 0);
+
+    // We've processed size_in bytes.
+    input_cursor += size_in;
+
+    // We're finished decompressing when zlib tells us.
+  } while (ret != Z_STREAM_END);
+
+  inflateEnd(&strm);
+
+  *output_length = output_cursor;
+}
+
+}  // namespace bin
+}  // namespace dart
diff --git a/runtime/bin/gzip.h b/runtime/bin/gzip.h
new file mode 100644
index 0000000..c2fcfb9
--- /dev/null
+++ b/runtime/bin/gzip.h
@@ -0,0 +1,24 @@
+// 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.
+
+#ifndef RUNTIME_BIN_GZIP_H_
+#define RUNTIME_BIN_GZIP_H_
+
+#include "platform/globals.h"
+
+namespace dart {
+namespace bin {
+
+// |input| is assumed to be a gzipped stream.
+// This function allocates the output buffer in the C heap and the caller
+// is responsible for freeing it.
+void Decompress(const uint8_t* input,
+                intptr_t input_len,
+                uint8_t** output,
+                intptr_t* output_length);
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // RUNTIME_BIN_GZIP_H_
diff --git a/runtime/bin/io_impl_sources.gni b/runtime/bin/io_impl_sources.gni
new file mode 100644
index 0000000..e4396dc
--- /dev/null
+++ b/runtime/bin/io_impl_sources.gni
@@ -0,0 +1,104 @@
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# This file contains some C++ sources for the dart:io library.  The other
+# implementation files are in builtin_impl_sources.gypi.
+io_impl_sources = [
+  "eventhandler.cc",
+  "eventhandler.h",
+  "eventhandler_android.cc",
+  "eventhandler_android.h",
+  "eventhandler_fuchsia.cc",
+  "eventhandler_fuchsia.h",
+  "eventhandler_linux.cc",
+  "eventhandler_linux.h",
+  "eventhandler_macos.cc",
+  "eventhandler_macos.h",
+  "eventhandler_unsupported.cc",
+  "eventhandler_win.cc",
+  "eventhandler_win.h",
+  "file_system_watcher.cc",
+  "file_system_watcher.h",
+  "file_system_watcher_android.cc",
+  "file_system_watcher_fuchsia.cc",
+  "file_system_watcher_linux.cc",
+  "file_system_watcher_macos.cc",
+  "file_system_watcher_unsupported.cc",
+  "file_system_watcher_win.cc",
+  "filter.cc",
+  "filter.h",
+  "filter_unsupported.cc",
+  "io_service.cc",
+  "io_service.h",
+  "io_service_no_ssl.cc",
+  "io_service_no_ssl.h",
+  "io_service_unsupported.cc",
+  "platform.cc",
+  "platform.h",
+  "platform_android.cc",
+  "platform_fuchsia.cc",
+  "platform_linux.cc",
+  "platform_macos.cc",
+  "platform_unsupported.cc",
+  "platform_win.cc",
+  "process.cc",
+  "process.h",
+  "process_android.cc",
+  "process_fuchsia.cc",
+  "process_linux.cc",
+  "process_macos.cc",
+  "process_unsupported.cc",
+  "process_win.cc",
+  "reference_counting.h",
+  "root_certificates_unsupported.cc",
+  "secure_socket_filter.cc",
+  "secure_socket_filter.h",
+  "secure_socket_unsupported.cc",
+  "secure_socket_utils.cc",
+  "secure_socket_utils.h",
+  "security_context.cc",
+  "security_context.h",
+  "security_context_android.cc",
+  "security_context_fuchsia.cc",
+  "security_context_linux.cc",
+  "security_context_macos.cc",
+  "security_context_win.cc",
+  "socket.cc",
+  "socket.h",
+  "socket_android.cc",
+  "socket_base.cc",
+  "socket_base.h",
+  "socket_base_android.cc",
+  "socket_base_android.h",
+  "socket_base_fuchsia.cc",
+  "socket_base_fuchsia.h",
+  "socket_base_linux.cc",
+  "socket_base_linux.h",
+  "socket_base_macos.cc",
+  "socket_base_macos.h",
+  "socket_base_unsupported.cc",
+  "socket_base_win.cc",
+  "socket_base_win.h",
+  "socket_fuchsia.cc",
+  "socket_linux.cc",
+  "socket_macos.cc",
+  "socket_unsupported.cc",
+  "socket_win.cc",
+  "stdio.cc",
+  "stdio.h",
+  "stdio_android.cc",
+  "stdio_fuchsia.cc",
+  "stdio_linux.cc",
+  "stdio_macos.cc",
+  "stdio_unsupported.cc",
+  "stdio_win.cc",
+  "sync_socket.cc",
+  "sync_socket.h",
+  "sync_socket_android.cc",
+  "sync_socket_fuchsia.cc",
+  "sync_socket_linux.cc",
+  "sync_socket_macos.cc",
+  "sync_socket_unsupported.cc",
+  "sync_socket_win.cc",
+]
diff --git a/runtime/bin/io_impl_sources.gypi b/runtime/bin/io_impl_sources.gypi
deleted file mode 100644
index d3bce7e..0000000
--- a/runtime/bin/io_impl_sources.gypi
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains some C++ sources for the dart:io library.  The other
-# implementation files are in builtin_impl_sources.gypi.
-{
-  'sources': [
-    'eventhandler.cc',
-    'eventhandler.h',
-    'eventhandler_android.cc',
-    'eventhandler_android.h',
-    'eventhandler_fuchsia.cc',
-    'eventhandler_fuchsia.h',
-    'eventhandler_linux.cc',
-    'eventhandler_linux.h',
-    'eventhandler_macos.cc',
-    'eventhandler_macos.h',
-    'eventhandler_unsupported.cc',
-    'eventhandler_win.cc',
-    'eventhandler_win.h',
-    'file_system_watcher.cc',
-    'file_system_watcher.h',
-    'file_system_watcher_android.cc',
-    'file_system_watcher_fuchsia.cc',
-    'file_system_watcher_linux.cc',
-    'file_system_watcher_macos.cc',
-    'file_system_watcher_unsupported.cc',
-    'file_system_watcher_win.cc',
-    'filter.cc',
-    'filter.h',
-    'filter_unsupported.cc',
-    'io_service.cc',
-    'io_service.h',
-    'io_service_no_ssl.cc',
-    'io_service_no_ssl.h',
-    'io_service_unsupported.cc',
-    'platform.cc',
-    'platform.h',
-    'platform_android.cc',
-    'platform_fuchsia.cc',
-    'platform_linux.cc',
-    'platform_macos.cc',
-    'platform_unsupported.cc',
-    'platform_win.cc',
-    'process.cc',
-    'process.h',
-    'process_android.cc',
-    'process_fuchsia.cc',
-    'process_linux.cc',
-    'process_macos.cc',
-    'process_unsupported.cc',
-    'process_win.cc',
-    'reference_counting.h',
-    'root_certificates_unsupported.cc',
-    'secure_socket_filter.cc',
-    'secure_socket_filter.h',
-    'secure_socket_unsupported.cc',
-    'secure_socket_utils.cc',
-    'secure_socket_utils.h',
-    'security_context.cc',
-    'security_context.h',
-    'security_context_android.cc',
-    'security_context_fuchsia.cc',
-    'security_context_linux.cc',
-    'security_context_macos.cc',
-    'security_context_win.cc',
-    'socket.cc',
-    'socket.h',
-    'socket_android.cc',
-    'socket_base.cc',
-    'socket_base.h',
-    'socket_base_android.cc',
-    'socket_base_android.h',
-    'socket_base_fuchsia.cc',
-    'socket_base_fuchsia.h',
-    'socket_base_linux.cc',
-    'socket_base_linux.h',
-    'socket_base_macos.cc',
-    'socket_base_macos.h',
-    'socket_base_unsupported.cc',
-    'socket_base_win.cc',
-    'socket_base_win.h',
-    'socket_fuchsia.cc',
-    'socket_linux.cc',
-    'socket_macos.cc',
-    'socket_unsupported.cc',
-    'socket_win.cc',
-    'stdio.cc',
-    'stdio.h',
-    'stdio_android.cc',
-    'stdio_fuchsia.cc',
-    'stdio_linux.cc',
-    'stdio_macos.cc',
-    'stdio_unsupported.cc',
-    'stdio_win.cc',
-    'sync_socket.cc',
-    'sync_socket.h',
-    'sync_socket_android.cc',
-    'sync_socket_fuchsia.cc',
-    'sync_socket_linux.cc',
-    'sync_socket_macos.cc',
-    'sync_socket_unsupported.cc',
-    'sync_socket_win.cc',
-  ],
-}
diff --git a/runtime/bin/io_sources.gni b/runtime/bin/io_sources.gni
new file mode 100644
index 0000000..89b24f3
--- /dev/null
+++ b/runtime/bin/io_sources.gni
@@ -0,0 +1,20 @@
+# 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.
+
+# This file contains all sources for the dart:io library.
+io_runtime_sources = [
+  "common_patch.dart",
+  "directory_patch.dart",
+  "eventhandler_patch.dart",
+  "file_patch.dart",
+  "file_system_entity_patch.dart",
+  "filter_patch.dart",
+  "io_service_patch.dart",
+  "platform_patch.dart",
+  "process_patch.dart",
+  "socket_patch.dart",
+  "stdio_patch.dart",
+  "secure_socket_patch.dart",
+  "sync_socket_patch.dart",
+]
diff --git a/runtime/bin/io_sources.gypi b/runtime/bin/io_sources.gypi
deleted file mode 100644
index 24bc72e..0000000
--- a/runtime/bin/io_sources.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:io library.
-{
-  'sources': [
-    'common_patch.dart',
-    'directory_patch.dart',
-    'eventhandler_patch.dart',
-    'file_patch.dart',
-    'file_system_entity_patch.dart',
-    'filter_patch.dart',
-    'io_service_patch.dart',
-    'platform_patch.dart',
-    'process_patch.dart',
-    'socket_patch.dart',
-    'stdio_patch.dart',
-    'secure_socket_patch.dart',
-    'sync_socket_patch.dart',
-  ],
-}
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc
index a8ebdc8..28a5915 100644
--- a/runtime/bin/loader.cc
+++ b/runtime/bin/loader.cc
@@ -9,6 +9,7 @@
 #include "bin/dfe.h"
 #include "bin/extensions.h"
 #include "bin/file.h"
+#include "bin/gzip.h"
 #include "bin/lockers.h"
 #include "bin/utils.h"
 #include "include/dart_tools_api.h"
@@ -318,6 +319,39 @@
   }
 }
 
+class ScopedDecompress : public ValueObject {
+ public:
+  ScopedDecompress(const uint8_t** payload, intptr_t* payload_length)
+      : payload_(payload),
+        payload_length_(payload_length),
+        decompressed_(NULL) {
+    DartUtils::MagicNumber payload_type =
+        DartUtils::SniffForMagicNumber(*payload, *payload_length);
+    if (payload_type == DartUtils::kGzipMagicNumber) {
+      int64_t start = Dart_TimelineGetMicros();
+      intptr_t decompressed_length = 0;
+      Decompress(*payload, *payload_length, &decompressed_,
+                 &decompressed_length);
+      int64_t end = Dart_TimelineGetMicros();
+      Dart_TimelineEvent("Decompress", start, end, Dart_Timeline_Event_Duration,
+                         0, NULL, NULL);
+      *payload_ = decompressed_;
+      *payload_length_ = decompressed_length;
+    }
+  }
+
+  ~ScopedDecompress() {
+    if (decompressed_ != NULL) {
+      free(decompressed_);
+    }
+  }
+
+ private:
+  const uint8_t** payload_;
+  intptr_t* payload_length_;
+  uint8_t* decompressed_;
+};
+
 bool Loader::ProcessResultLocked(Loader* loader, Loader::IOResult* result) {
   // We have to copy everything we care about out of |result| because after
   // dropping the lock below |result| may no longer valid.
@@ -388,11 +422,15 @@
   // Check for payload and load accordingly.
   const uint8_t* payload = result->payload;
   intptr_t payload_length = result->payload_length;
+
+  // Decompress if gzip'd.
+  ScopedDecompress decompress(&payload, &payload_length);
+
   const DartUtils::MagicNumber payload_type =
-      DartUtils::SniffForMagicNumber(&payload, &payload_length);
+      DartUtils::SniffForMagicNumber(payload, payload_length);
   Dart_Handle source = Dart_Null();
   if (payload_type == DartUtils::kUnknownMagicNumber) {
-    source = Dart_NewStringFromUTF8(result->payload, result->payload_length);
+    source = Dart_NewStringFromUTF8(payload, payload_length);
     if (Dart_IsError(source)) {
       loader->error_ =
           DartUtils::NewError("%s is not a valid UTF-8 script",
@@ -424,6 +462,7 @@
     } break;
     case Dart_kScriptTag:
       if (payload_type == DartUtils::kSnapshotMagicNumber) {
+        DartUtils::SkipSnapshotMagicNumber(&payload, &payload_length);
         dart_result = Dart_LoadScriptFromSnapshot(payload, payload_length);
         reload_extensions = true;
       } else if (payload_type == DartUtils::kKernelMagicNumber) {
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index a430f8d..ffbc2e7 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -32,7 +32,7 @@
 #include "platform/hashmap.h"
 #include "platform/text_buffer.h"
 #if !defined(DART_PRECOMPILER)
-#include "zlib/zlib.h"
+#include "bin/gzip.h"
 #endif
 
 #include "vm/kernel.h"
@@ -354,7 +354,6 @@
     return false;
   }
   dfe.set_frontend_filename(filename);
-  vm_options->AddArgument("--use-dart-frontend");
   return true;
 }
 
@@ -456,6 +455,7 @@
   // These options should also be documented in the help message.
   vm_options->AddArgument("--pause-isolates-on-exit");
   vm_options->AddArgument("--pause-isolates-on-unhandled-exceptions");
+  vm_options->AddArgument("--profiler");
   vm_options->AddArgument("--warn-on-pause-with-no-debugger");
   return true;
 }
@@ -848,6 +848,7 @@
   if (dfe.kernel_file_specified()) {
     ASSERT(kernel_program != NULL);
     result = Dart_LoadKernel(kernel_program);
+    isolate_data->kernel_program = NULL;  // Dart_LoadKernel takes ownership.
   } else {
     if (kernel_program != NULL) {
       Dart_Handle uri = Dart_NewStringFromCString(script_uri);
@@ -857,6 +858,7 @@
       result =
           Dart_LoadScript(uri, resolved_script_uri,
                           reinterpret_cast<Dart_Handle>(kernel_program), 0, 0);
+      isolate_data->kernel_program = NULL;  // Dart_LoadScript takes ownership.
       CHECK_RESULT(result);
     }
   }
@@ -1047,6 +1049,7 @@
   if (dfe.UsePlatformBinary()) {
     Dart_Handle library = Dart_LoadKernel(dfe.kernel_vmservice_io());
     CHECK_RESULT_CLEANUP(library, isolate_data);
+    dfe.clear_kernel_vmservice_io();  // Dart_LoadKernel takes ownership.
     skip_library_load = true;
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -1356,6 +1359,16 @@
   return modified;
 }
 
+static void EmbedderInformationCallback(Dart_EmbedderInformation* info) {
+  int64_t max_rss = Process::MaxRSS();
+  int64_t current_rss = Process::CurrentRSS();
+
+  info->version = DART_EMBEDDER_INFORMATION_CURRENT_VERSION;
+  info->name = "Dart VM";
+  info->max_rss = max_rss >= 0 ? max_rss : 0;
+  info->current_rss = current_rss >= 0 ? current_rss : 0;
+}
+
 static void GenerateAppAOTSnapshot() {
   if (use_blobs) {
     Snapshot::GenerateAppAOTAsBlobs(snapshot_filename);
@@ -1657,74 +1670,10 @@
 extern unsigned int observatory_assets_archive_len;
 extern const uint8_t* observatory_assets_archive;
 
-// |input| is assumed to be a gzipped stream.
-// This function allocates the output buffer in the C heap and the caller
-// is responsible for freeing it.
-void Decompress(const uint8_t* input,
-                unsigned int input_len,
-                uint8_t** output,
-                unsigned int* output_length) {
-  ASSERT(input != NULL);
-  ASSERT(input_len > 0);
-  ASSERT(output != NULL);
-  ASSERT(output_length != NULL);
-
-  // Initialize output.
-  *output = NULL;
-  *output_length = 0;
-
-  const unsigned int kChunkSize = 256 * 1024;
-  uint8_t chunk_out[kChunkSize];
-  z_stream strm;
-  strm.zalloc = Z_NULL;
-  strm.zfree = Z_NULL;
-  strm.opaque = Z_NULL;
-  strm.avail_in = 0;
-  strm.next_in = 0;
-  int ret = inflateInit2(&strm, 32 + MAX_WBITS);
-  ASSERT(ret == Z_OK);
-
-  unsigned int input_cursor = 0;
-  unsigned int output_cursor = 0;
-  do {
-    // Setup input.
-    unsigned int size_in = input_len - input_cursor;
-    if (size_in > kChunkSize) {
-      size_in = kChunkSize;
-    }
-    strm.avail_in = size_in;
-    strm.next_in = const_cast<uint8_t*>(&input[input_cursor]);
-
-    // Inflate until we've exhausted the current input chunk.
-    do {
-      // Setup output.
-      strm.avail_out = kChunkSize;
-      strm.next_out = &chunk_out[0];
-      // Inflate.
-      ret = inflate(&strm, Z_SYNC_FLUSH);
-      // We either hit the end of the stream or made forward progress.
-      ASSERT((ret == Z_STREAM_END) || (ret == Z_OK));
-      // Grow output buffer size.
-      unsigned int size_out = kChunkSize - strm.avail_out;
-      *output_length += size_out;
-      *output = reinterpret_cast<uint8_t*>(realloc(*output, *output_length));
-      // Copy output.
-      memmove(&((*output)[output_cursor]), &chunk_out[0], size_out);
-      output_cursor += size_out;
-    } while (strm.avail_out == 0);
-
-    // We've processed size_in bytes.
-    input_cursor += size_in;
-
-    // We're finished decompressing when zlib tells us.
-  } while (ret != Z_STREAM_END);
-
-  inflateEnd(&strm);
-}
 
 Dart_Handle GetVMServiceAssetsArchiveCallback() {
   uint8_t* decompressed = NULL;
-  unsigned int decompressed_len = 0;
+  intptr_t decompressed_len = 0;
   Decompress(observatory_assets_archive, observatory_assets_archive_len,
              &decompressed, &decompressed_len);
   Dart_Handle tar_file =
@@ -1852,6 +1801,11 @@
   init_params.file_close = DartUtils::CloseFile;
   init_params.entropy_source = DartUtils::EntropySource;
   init_params.get_service_assets = GetVMServiceAssetsArchiveCallback;
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  init_params.start_kernel_isolate = dfe.UseDartFrontend();
+#else
+  init_params.start_kernel_isolate = false;
+#endif
 
   char* error = Dart_Initialize(&init_params);
   if (error != NULL) {
@@ -1864,6 +1818,7 @@
   Dart_SetServiceStreamCallbacks(&ServiceStreamListenCallback,
                                  &ServiceStreamCancelCallback);
   Dart_SetFileModifiedCallback(&FileModifiedCallback);
+  Dart_SetEmbedderInformationCallback(&EmbedderInformationCallback);
 
   // Run the main isolate until we aren't told to restart.
   while (RunMainIsolate(script_name, &dart_options)) {
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index 66fc280..9b307f3 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -859,25 +859,27 @@
   return static_cast<intptr_t>(getpid());
 }
 
+static void SaveErrorAndClose(FILE* file) {
+  int actual_errno = errno;
+  fclose(file);
+  errno = actual_errno;
+}
+
 int64_t Process::CurrentRSS() {
   // The second value in /proc/self/statm is the current RSS in pages.
-  File* statm = File::Open("/proc/self/statm", File::kRead);
+  // It is not possible to use getrusage() because the interested fields are not
+  // implemented by the linux kernel.
+  FILE* statm = fopen("/proc/self/statm", "r");
   if (statm == NULL) {
     return -1;
   }
-  RefCntReleaseScope<File> releaser(statm);
-  const intptr_t statm_length = 1 * KB;
-  void* buffer = reinterpret_cast<void*>(Dart_ScopeAllocate(statm_length));
-  const intptr_t statm_read = statm->Read(buffer, statm_length);
-  if (statm_read <= 0) {
-    return -1;
-  }
   int64_t current_rss_pages = 0;
-  int matches = sscanf(reinterpret_cast<char*>(buffer), "%*s%" Pd64 "",
-                       &current_rss_pages);
+  int matches = fscanf(statm, "%*s%" Pd64 "", &current_rss_pages);
   if (matches != 1) {
+    SaveErrorAndClose(statm);
     return -1;
   }
+  fclose(statm);
   return current_rss_pages * getpagesize();
 }
 
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 1ab9a13..cbaa012 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -860,25 +860,27 @@
   return static_cast<intptr_t>(getpid());
 }
 
+static void SaveErrorAndClose(FILE* file) {
+  int actual_errno = errno;
+  fclose(file);
+  errno = actual_errno;
+}
+
 int64_t Process::CurrentRSS() {
   // The second value in /proc/self/statm is the current RSS in pages.
-  File* statm = File::Open("/proc/self/statm", File::kRead);
+  // It is not possible to use getrusage() because the interested fields are not
+  // implemented by the linux kernel.
+  FILE* statm = fopen("/proc/self/statm", "r");
   if (statm == NULL) {
     return -1;
   }
-  RefCntReleaseScope<File> releaser(statm);
-  const intptr_t statm_length = 1 * KB;
-  void* buffer = reinterpret_cast<void*>(Dart_ScopeAllocate(statm_length));
-  const intptr_t statm_read = statm->Read(buffer, statm_length);
-  if (statm_read <= 0) {
-    return -1;
-  }
   int64_t current_rss_pages = 0;
-  int matches = sscanf(reinterpret_cast<char*>(buffer), "%*s%" Pd64 "",
-                       &current_rss_pages);
+  int matches = fscanf(statm, "%*s%" Pd64 "", &current_rss_pages);
   if (matches != 1) {
+    SaveErrorAndClose(statm);
     return -1;
   }
+  fclose(statm);
   return current_rss_pages * getpagesize();
 }
 
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 00d2f8d..fdae704 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -209,6 +209,7 @@
   }
 
   int arg_pos = 1;
+  bool start_kernel_isolate = false;
   if (strstr(argv[arg_pos], "--dfe") == argv[arg_pos]) {
     const char* delim = strstr(argv[1], "=");
     if (delim == NULL || strlen(delim + 1) == 0) {
@@ -220,6 +221,7 @@
     // VM needs '--use-dart-frontend' option, which we will insert in place
     // of '--dfe' option.
     argv[arg_pos] = strdup("--use-dart-frontend");
+    start_kernel_isolate = true;
     ++arg_pos;
   }
 
@@ -244,7 +246,8 @@
       NULL /* cleanup */, NULL /* thread_exit */,
       dart::bin::DartUtils::OpenFile, dart::bin::DartUtils::ReadFile,
       dart::bin::DartUtils::WriteFile, dart::bin::DartUtils::CloseFile,
-      NULL /* entropy_source */, NULL /* get_service_assets */);
+      NULL /* entropy_source */, NULL /* get_service_assets */,
+      start_kernel_isolate);
 
   ASSERT(err_msg == NULL);
   // Apply the filter to all registered tests.
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc
index e6ea9c7..6c58a30 100644
--- a/runtime/bin/snapshot_utils.cc
+++ b/runtime/bin/snapshot_utils.cc
@@ -259,7 +259,7 @@
 
   if (write_magic_number) {
     // Write the magic number to indicate file is a script snapshot.
-    DartUtils::WriteMagicNumber(file);
+    DartUtils::WriteSnapshotMagicNumber(file);
   }
 
   if (!file->WriteFully(buffer, size)) {
diff --git a/runtime/bin/vmservice/vmservice_sources.gypi b/runtime/bin/vmservice/vmservice_sources.gni
similarity index 61%
rename from runtime/bin/vmservice/vmservice_sources.gypi
rename to runtime/bin/vmservice/vmservice_sources.gni
index a7d06cd..4c5d0c6 100644
--- a/runtime/bin/vmservice/vmservice_sources.gypi
+++ b/runtime/bin/vmservice/vmservice_sources.gni
@@ -1,13 +1,11 @@
-# Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+# 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.
 
 # This file contains all Dart sources for the dart:io implementation of
 # the VM Service server.
-{
-  'sources': [
-    'loader.dart',
-    'server.dart',
-    'vmservice_io.dart',
-  ],
-}
+vmservice_sources = [
+  "loader.dart",
+  "server.dart",
+  "vmservice_io.dart",
+]
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 57d1919..8ccbe7a 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -583,7 +583,7 @@
  * for each part.
  */
 
-#define DART_FLAGS_CURRENT_VERSION (0x00000002)
+#define DART_FLAGS_CURRENT_VERSION (0x00000003)
 
 typedef struct {
   int32_t version;
@@ -593,6 +593,7 @@
   bool enable_error_on_bad_override;
   bool use_field_guards;
   bool use_osr;
+  bool use_dart_frontend;
 } Dart_IsolateFlags;
 
 /**
@@ -763,7 +764,7 @@
  * The current version of the Dart_InitializeFlags. Should be incremented every
  * time Dart_InitializeFlags changes in a binary incompatible way.
  */
-#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000002)
+#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000003)
 
 /**
  * Describes how to initialize the VM. Used with Dart_Initialize.
@@ -798,6 +799,7 @@
   Dart_FileCloseCallback file_close;
   Dart_EntropySource entropy_source;
   Dart_GetVMServiceAssetsArchive get_service_assets;
+  bool start_kernel_isolate;
 } Dart_InitializeParams;
 
 /**
@@ -3137,7 +3139,8 @@
 DART_EXPORT Dart_KernelCompilationResult
 Dart_CompileSourcesToKernel(const char* script_uri,
                             int source_files_count,
-                            Dart_SourceFile source_files[]);
+                            Dart_SourceFile source_files[],
+                            bool incremental_compile);
 
 #define DART_KERNEL_ISOLATE_NAME "kernel-service"
 
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index e7440f8..11982e3 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -765,6 +765,49 @@
     Dart_ServiceRequestCallback callback,
     void* user_data);
 
+/**
+ * Embedder information which can be requested by the VM for internal or
+ * reporting purposes.
+ *
+ * The pointers in this structure are not going to be cached or freed by the VM.
+ */
+
+ #define DART_EMBEDDER_INFORMATION_CURRENT_VERSION (0x00000001)
+
+typedef struct {
+  int32_t version;
+  const char* name;  // [optional] The name of the embedder
+  uintptr_t current_rss;  // [optional] the current RSS of the embedder
+  uintptr_t max_rss;  // [optional] the maximum RSS of the embedder
+} Dart_EmbedderInformation;
+
+/**
+ * Callback provided by the embedder that is used by the vm to request
+ * information.
+ *
+ * \return Returns a pointer to a Dart_EmbedderInformation structure.
+ * The embedder keeps the ownership of the structure and any field in it.
+ * The embedder must ensure that the structure will remain valid until the
+ * next invokation of the callback.
+ */
+typedef void (*Dart_EmbedderInformationCallback)(
+    Dart_EmbedderInformation* info);
+
+/**
+ * Register a Dart_ServiceRequestCallback to be called to handle
+ * requests for the named rpc. The callback will be invoked without a
+ * current isolate.
+ *
+ * \param method The name of the command that this callback is responsible for.
+ * \param callback The callback to invoke.
+ * \param user_data The user data passed to the callback.
+ *
+ * NOTE: If multiple callbacks with the same name are registered, only
+ * the last callback registered will be remembered.
+ */
+DART_EXPORT void Dart_SetEmbedderInformationCallback(
+    Dart_EmbedderInformationCallback callback);
+
 /*
  * ========
  * Event Streams
diff --git a/runtime/lib/async_sources.gni b/runtime/lib/async_sources.gni
new file mode 100644
index 0000000..1620f74
--- /dev/null
+++ b/runtime/lib/async_sources.gni
@@ -0,0 +1,12 @@
+# 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.
+
+# This file contains all sources for the dart:async library.
+async_runtime_sources = [
+  "async_patch.dart",
+  "deferred_load_patch.dart",
+  "schedule_microtask_patch.dart",
+  "timer_patch.dart",
+  "async.cc",
+]
diff --git a/runtime/lib/async_sources.gypi b/runtime/lib/async_sources.gypi
deleted file mode 100644
index 2c41f96..0000000
--- a/runtime/lib/async_sources.gypi
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:async library.
-{
-  'sources': [
-    'async_patch.dart',
-    'deferred_load_patch.dart',
-    'schedule_microtask_patch.dart',
-    'timer_patch.dart',
-    'async.cc',
-  ],
-}
diff --git a/runtime/lib/collection_sources.gni b/runtime/lib/collection_sources.gni
new file mode 100644
index 0000000..8ad022c
--- /dev/null
+++ b/runtime/lib/collection_sources.gni
@@ -0,0 +1,11 @@
+# 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.
+
+collection_runtime_sources = [
+  # collection_patch.dart needs to be the first dart file because it contains
+  # imports.
+  "collection_patch.dart",
+  "compact_hash.dart",
+  "linked_hash_map.cc",
+]
diff --git a/runtime/lib/collection_sources.gypi b/runtime/lib/collection_sources.gypi
deleted file mode 100644
index 8576980..0000000
--- a/runtime/lib/collection_sources.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
- # Copyright (c) 2013, 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.
-
-{
-  'sources': [
-    # collection_patch.dart needs to be the first dart file because it contains
-    # imports.
-    'collection_patch.dart',
-    'compact_hash.dart',
-    'linked_hash_map.cc',
-  ],
-}
diff --git a/runtime/lib/convert_sources.gni b/runtime/lib/convert_sources.gni
new file mode 100644
index 0000000..e37c017
--- /dev/null
+++ b/runtime/lib/convert_sources.gni
@@ -0,0 +1,5 @@
+# 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.
+
+convert_runtime_sources = [ "convert_patch.dart" ]
diff --git a/runtime/lib/convert_sources.gypi b/runtime/lib/convert_sources.gypi
deleted file mode 100644
index 0f3b46b..0000000
--- a/runtime/lib/convert_sources.gypi
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2013, 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.
-
-{
-  'sources': [
-    'convert_patch.dart',
-  ],
-}
diff --git a/runtime/lib/core_sources.gni b/runtime/lib/core_sources.gni
new file mode 100644
index 0000000..221dc03
--- /dev/null
+++ b/runtime/lib/core_sources.gni
@@ -0,0 +1,57 @@
+# 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.
+
+# Sources visible via default library.
+core_runtime_sources = [
+  "core_patch.dart",
+
+  # The above file needs to be first as it imports required libraries.
+  "array.cc",
+  "array.dart",
+  "array_patch.dart",
+  "bigint.dart",
+  "bool.cc",
+  "bool_patch.dart",
+  "date.cc",
+  "date_patch.dart",
+  "double.cc",
+  "double.dart",
+  "double_patch.dart",
+  "errors.cc",
+  "errors_patch.dart",
+  "expando_patch.dart",
+  "function.cc",
+  "function.dart",
+  "function_patch.dart",
+  "growable_array.cc",
+  "growable_array.dart",
+  "identical.cc",
+  "identical_patch.dart",
+  "immutable_map.dart",
+  "integers.cc",
+  "integers.dart",
+  "integers_patch.dart",
+  "invocation_mirror.h",
+  "invocation_mirror_patch.dart",
+  "lib_prefix.dart",
+  "map_patch.dart",
+  "null_patch.dart",
+  "object.cc",
+  "object_patch.dart",
+  "regexp.cc",
+  "regexp_patch.dart",
+  "stacktrace.cc",
+  "stacktrace.dart",
+  "stacktrace.h",
+  "stopwatch.cc",
+  "stopwatch_patch.dart",
+  "string.cc",
+  "string_buffer_patch.dart",
+  "string_patch.dart",
+  "type_patch.dart",
+  "uri.cc",
+  "uri_patch.dart",
+  "weak_property.cc",
+  "weak_property.dart",
+]
diff --git a/runtime/lib/core_sources.gypi b/runtime/lib/core_sources.gypi
deleted file mode 100644
index 5851797..0000000
--- a/runtime/lib/core_sources.gypi
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Sources visible via default library.
-
-{
-  'sources': [
-    'core_patch.dart',
-    # The above file needs to be first as it imports required libraries.
-    'array.cc',
-    'array.dart',
-    'array_patch.dart',
-    'bigint.dart',
-    'bool.cc',
-    'bool_patch.dart',
-    'date.cc',
-    'date_patch.dart',
-    'double.cc',
-    'double.dart',
-    'double_patch.dart',
-    'errors.cc',
-    'errors_patch.dart',
-    'expando_patch.dart',
-    'function.cc',
-    'function.dart',
-    'function_patch.dart',
-    'growable_array.cc',
-    'growable_array.dart',
-    'identical.cc',
-    'identical_patch.dart',
-    'immutable_map.dart',
-    'integers.cc',
-    'integers.dart',
-    'integers_patch.dart',
-    'invocation_mirror.h',
-    'invocation_mirror_patch.dart',
-    'lib_prefix.dart',
-    'map_patch.dart',
-    'null_patch.dart',
-    'object.cc',
-    'object_patch.dart',
-    'regexp.cc',
-    'regexp_patch.dart',
-    'stacktrace.cc',
-    'stacktrace.dart',
-    'stacktrace.h',
-    'stopwatch.cc',
-    'stopwatch_patch.dart',
-    'string.cc',
-    'string_buffer_patch.dart',
-    'string_patch.dart',
-    'type_patch.dart',
-    'uri.cc',
-    'uri_patch.dart',
-    'weak_property.cc',
-    'weak_property.dart',
-  ],
-}
diff --git a/runtime/lib/developer_sources.gni b/runtime/lib/developer_sources.gni
new file mode 100644
index 0000000..c6f3c29
--- /dev/null
+++ b/runtime/lib/developer_sources.gni
@@ -0,0 +1,16 @@
+# 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.
+
+# Sources visible via dart:developer library.
+developer_runtime_sources = [
+  "developer.cc",
+
+  # developer.dart needs to be the first dart file because it contains
+  # imports.
+  "developer.dart",
+  "profiler.cc",
+  "profiler.dart",
+  "timeline.cc",
+  "timeline.dart",
+]
diff --git a/runtime/lib/developer_sources.gypi b/runtime/lib/developer_sources.gypi
deleted file mode 100644
index 896f2e1..0000000
--- a/runtime/lib/developer_sources.gypi
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 2015, 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.
-
-# Sources visible via dart:developer library.
-
-{
-  'sources': [
-    'developer.cc',
-    # developer.dart needs to be the first dart file because it contains
-    # imports.
-    'developer.dart',
-    'profiler.cc',
-    'profiler.dart',
-    'timeline.cc',
-    'timeline.dart',
-  ],
-}
-
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index 4783d4d..c0dc588 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -14,15 +14,15 @@
 // Scan the stack until we hit the first function in the _AssertionError
 // class. We then return the next frame's script taking inlining into account.
 static RawScript* FindScript(DartFrameIterator* iterator) {
-  if (FLAG_precompiled_runtime) {
-    // The precompiled runtime faces two issues in recovering the correct
-    // assertion text. First, the precompiled runtime does not include
-    // the inlining meta-data so we cannot walk the inline-aware stack trace.
-    // Second, the script text itself is missing so whatever script is returned
-    // from here will be missing the assertion expression text.
-    iterator->NextFrame();  // Skip _AssertionError._evaluateAssertion frame
-    return Exceptions::GetCallerScript(iterator);
-  }
+#if defined(DART_PRECOMPILED_RUNTIME)
+  // The precompiled runtime faces two issues in recovering the correct
+  // assertion text. First, the precompiled runtime does not include
+  // the inlining meta-data so we cannot walk the inline-aware stack trace.
+  // Second, the script text itself is missing so whatever script is returned
+  // from here will be missing the assertion expression text.
+  iterator->NextFrame();  // Skip _AssertionError._evaluateAssertion frame
+  return Exceptions::GetCallerScript(iterator);
+#else
   StackFrame* stack_frame = iterator->NextFrame();
   Code& code = Code::Handle();
   Function& func = Function::Handle();
@@ -56,6 +56,7 @@
   }
   UNREACHABLE();
   return Script::null();
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 // Allocate and throw a new AssertionError.
diff --git a/runtime/lib/internal_sources.gni b/runtime/lib/internal_sources.gni
new file mode 100644
index 0000000..61c4e15
--- /dev/null
+++ b/runtime/lib/internal_sources.gni
@@ -0,0 +1,14 @@
+# 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.
+
+# Sources that patch the library "dart:_internal".
+internal_runtime_sources = [
+  "internal_patch.dart",
+
+  # The above file needs to be first as it imports required libraries.
+  "class_id.dart",
+  "class_id.cc",
+  "print_patch.dart",
+  "symbol_patch.dart",
+]
diff --git a/runtime/lib/internal_sources.gypi b/runtime/lib/internal_sources.gypi
deleted file mode 100644
index 08d9bb7..0000000
--- a/runtime/lib/internal_sources.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Sources that patch the library "dart:_internal".
-
-{
-  'sources': [
-    'internal_patch.dart',
-    # The above file needs to be first as it imports required libraries.
-    'class_id.dart',
-    'class_id.cc',
-    'print_patch.dart',
-    'symbol_patch.dart',
-  ],
-}
diff --git a/runtime/lib/isolate_sources.gni b/runtime/lib/isolate_sources.gni
new file mode 100644
index 0000000..d01a351
--- /dev/null
+++ b/runtime/lib/isolate_sources.gni
@@ -0,0 +1,10 @@
+# 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.
+
+# This file contains all sources for the dart:isolate library.
+isolate_runtime_sources = [
+  "isolate_patch.dart",
+  "isolate.cc",
+  "timer_impl.dart",
+]
diff --git a/runtime/lib/isolate_sources.gypi b/runtime/lib/isolate_sources.gypi
deleted file mode 100644
index d54fadf..0000000
--- a/runtime/lib/isolate_sources.gypi
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:isolate library.
-{
-  'sources': [
-    'isolate_patch.dart',
-    'isolate.cc',
-    'timer_impl.dart',
-  ],
-}
diff --git a/runtime/lib/math_sources.gni b/runtime/lib/math_sources.gni
new file mode 100644
index 0000000..65a07ca
--- /dev/null
+++ b/runtime/lib/math_sources.gni
@@ -0,0 +1,8 @@
+# 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.
+
+math_runtime_sources = [
+  "math.cc",
+  "math_patch.dart",
+]
diff --git a/runtime/lib/math_sources.gypi b/runtime/lib/math_sources.gypi
deleted file mode 100644
index 2a18173..0000000
--- a/runtime/lib/math_sources.gypi
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2012, 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.
-
-{
-  'sources': [
-    'math.cc',
-    'math_patch.dart',
-  ],
-}
diff --git a/runtime/lib/mirrors_sources.gni b/runtime/lib/mirrors_sources.gni
new file mode 100644
index 0000000..c3e500c
--- /dev/null
+++ b/runtime/lib/mirrors_sources.gni
@@ -0,0 +1,15 @@
+# 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.
+
+# Implementation sources.
+mirrors_runtime_sources = [
+  "mirrors.cc",
+  "mirrors.h",
+
+  # mirrors_patch.dart needs to be the first dart file because it contains
+  # imports.
+  "mirrors_patch.dart",
+  "mirrors_impl.dart",
+  "mirror_reference.dart",
+]
diff --git a/runtime/lib/mirrors_sources.gypi b/runtime/lib/mirrors_sources.gypi
deleted file mode 100644
index 46da082..0000000
--- a/runtime/lib/mirrors_sources.gypi
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Implementation sources.
-
-{
-  'sources': [
-    'mirrors.cc',
-    'mirrors.h',
-    # mirrors_patch.dart needs to be the first dart file because it contains
-    # imports.
-    'mirrors_patch.dart',
-    'mirrors_impl.dart',
-    'mirror_reference.dart',
-  ],
-}
diff --git a/runtime/lib/profiler_sources.gypi b/runtime/lib/profiler_sources.gni
similarity index 65%
rename from runtime/lib/profiler_sources.gypi
rename to runtime/lib/profiler_sources.gni
index 9175427..b27bc88 100644
--- a/runtime/lib/profiler_sources.gypi
+++ b/runtime/lib/profiler_sources.gni
@@ -1,12 +1,6 @@
-# Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+# 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.
 
 # Sources list to keep vm/BUILD.gn generate_core_libraries happy.
-
-{
-  'sources': [
-    'empty_source.dart'
-  ],
-}
-
+profiler_runtime_sources = [ "empty_source.dart" ]
diff --git a/runtime/lib/typed_data_sources.gni b/runtime/lib/typed_data_sources.gni
new file mode 100644
index 0000000..4fdebb62
--- /dev/null
+++ b/runtime/lib/typed_data_sources.gni
@@ -0,0 +1,10 @@
+# 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.
+
+# Sources visible via dart:typed_data library.
+typed_data_runtime_sources = [
+  "typed_data.cc",
+  "typed_data_patch.dart",
+  "simd128.cc",
+]
diff --git a/runtime/lib/typed_data_sources.gypi b/runtime/lib/typed_data_sources.gypi
deleted file mode 100644
index d68daed..0000000
--- a/runtime/lib/typed_data_sources.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (c) 2013, 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.
-
-# Sources visible via dart:typed_data library.
-
-{
-  'sources': [
-    'typed_data.cc',
-    'typed_data_patch.dart',
-    'simd128.cc',
-  ],
-}
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index 1f3afd07..df44862 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -83,8 +83,8 @@
     const Object& r =
         Object::Handle(DartEntry::InvokeFunction(register_function_, args));
     if (FLAG_trace_service) {
-      OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n",
-                name.ToCString(), port_id);
+      OS::PrintErr("vm-service: Isolate %s %" Pd64 " registered.\n",
+                   name.ToCString(), port_id);
     }
     ASSERT(!r.IsError());
   }
@@ -135,7 +135,7 @@
 
 DEFINE_NATIVE_ENTRY(VMService_OnStart, 0) {
   if (FLAG_trace_service) {
-    OS::Print("vm-service: Booting dart:vmservice library.\n");
+    OS::PrintErr("vm-service: Booting dart:vmservice library.\n");
   }
   // Boot the dart:vmservice library.
   ServiceIsolate::BootVmServiceLibrary();
@@ -146,7 +146,7 @@
   // Register running isolates with service.
   RegisterRunningIsolatesVisitor register_isolates(thread);
   if (FLAG_trace_service) {
-    OS::Print("vm-service: Registering running isolates.\n");
+    OS::PrintErr("vm-service: Registering running isolates.\n");
   }
   Isolate::VisitIsolates(&register_isolates);
 #endif
@@ -155,10 +155,10 @@
 
 DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) {
   if (FLAG_trace_service) {
-    OS::Print("vm-service: processed exit message.\n");
+    OS::PrintErr("vm-service: processed exit message.\n");
     MessageHandler* message_handler = isolate->message_handler();
-    OS::Print("vm-service: live ports = %" Pd "\n",
-              message_handler->live_ports());
+    OS::PrintErr("vm-service: live ports = %" Pd "\n",
+                 message_handler->live_ports());
   }
   return Object::null();
 }
diff --git a/runtime/lib/vmservice_sources.gypi b/runtime/lib/vmservice_sources.gni
similarity index 64%
rename from runtime/lib/vmservice_sources.gypi
rename to runtime/lib/vmservice_sources.gni
index 55d70fa..a5e1131 100644
--- a/runtime/lib/vmservice_sources.gypi
+++ b/runtime/lib/vmservice_sources.gni
@@ -1,11 +1,6 @@
-# Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+# 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.
 
 # Sources that patch the library "dart:_vmservice".
-
-{
-  'sources': [
-    'vmservice.cc',
-  ],
-}
+vmservice_runtime_sources = [ "vmservice.cc" ]
diff --git a/runtime/observatory/BUILD.gn b/runtime/observatory/BUILD.gn
index 229a923..71fa8f7 100644
--- a/runtime/observatory/BUILD.gn
+++ b/runtime/observatory/BUILD.gn
@@ -5,6 +5,7 @@
 import("../../build/executable_suffix.gni")
 import("../../build/prebuilt_dart_sdk.gni")
 import("../../build/dart_host_toolchain.gni")
+import("observatory_sources.gni")
 
 # Construct arguments to the observatory tool for finding pub.
 pub_build_deps = []
@@ -28,14 +29,8 @@
 current_dir = rebase_path(".", "//")
 
 # Helper build rules for packaging the Dart observatory resources.
-observatory_sources_gypi =
-    exec_script("../../tools/gypi_to_gn.py",
-                [ rebase_path("../observatory/observatory_sources.gypi") ],
-                "scope",
-                [ "../observatory/observatory_sources.gypi" ])
-
 copy("copy_observatory") {
-  sources = rebase_path(observatory_sources_gypi.sources, "", ".")
+  sources = rebase_path(observatory_sources, "", ".")
   outputs = [
     "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_part}}",
   ]
@@ -97,7 +92,7 @@
            ":copy_observatory_deps",
          ] + pub_build_deps
 
-  sources = rebase_path(observatory_sources_gypi.sources,
+  sources = rebase_path(observatory_sources,
                         "",
                         "$root_gen_dir/observatory_copy/$current_dir")
 
diff --git a/runtime/observatory/lib/models.dart b/runtime/observatory/lib/models.dart
index 18ca5c9..359b371 100644
--- a/runtime/observatory/lib/models.dart
+++ b/runtime/observatory/lib/models.dart
@@ -93,3 +93,4 @@
 part 'src/models/repositories/top_retaining_instances.dart';
 part 'src/models/repositories/type_arguments.dart';
 part 'src/models/repositories/unlinked_call.dart';
+part 'src/models/repositories/vm.dart';
diff --git a/runtime/observatory/lib/repositories.dart b/runtime/observatory/lib/repositories.dart
index aa21aad..3e88411 100644
--- a/runtime/observatory/lib/repositories.dart
+++ b/runtime/observatory/lib/repositories.dart
@@ -8,7 +8,7 @@
 import 'dart:convert';
 import 'dart:html';
 import 'package:observatory/allocation_profile.dart';
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:observatory/heap_snapshot.dart';
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/service.dart' as S;
@@ -51,3 +51,4 @@
 part 'src/repositories/top_retaining_instances.dart';
 part 'src/repositories/type_arguments.dart';
 part 'src/repositories/unlinked_call.dart';
+part 'src/repositories/vm.dart';
diff --git a/runtime/observatory/lib/cpu_profile.dart b/runtime/observatory/lib/sample_profile.dart
similarity index 84%
rename from runtime/observatory/lib/cpu_profile.dart
rename to runtime/observatory/lib/sample_profile.dart
index ccc53c5..f81f3bd 100644
--- a/runtime/observatory/lib/cpu_profile.dart
+++ b/runtime/observatory/lib/sample_profile.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.
 
-library cpu_profiler;
+library sample_profiler;
 
 import 'dart:async';
 import 'dart:typed_data';
@@ -10,4 +10,4 @@
 import 'package:observatory/service.dart';
 import 'package:observatory/utils.dart';
 
-part 'src/cpu_profile/cpu_profile.dart';
+part 'src/sample_profile/sample_profile.dart';
diff --git a/runtime/observatory/lib/service.dart b/runtime/observatory/lib/service.dart
index 07f377c..10028cb 100644
--- a/runtime/observatory/lib/service.dart
+++ b/runtime/observatory/lib/service.dart
@@ -10,7 +10,7 @@
 import 'dart:math' as math;
 
 import 'package:logging/logging.dart';
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:observatory/event.dart' show createEventFromServiceEvent;
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/tracer.dart';
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index 8500d32..eb35b84 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -35,6 +35,7 @@
 final _topRetainingInstancesRepository = new TopRetainingInstancesRepository();
 final _typeArgumentsRepository = new TypeArgumentsRepository();
 final _unlinkedCallRepository = new UnlinkedCallRepository();
+final _vmrepository = new VMRepository();
 
 class IsolateNotFound implements Exception {
   String isolateId;
@@ -170,7 +171,7 @@
     }
     app.vm.reload().then((VM vm) {
       container.children = [
-        new VMViewElement(vm, app.events, app.notifications,
+        new VMViewElement(vm, _vmrepository, app.events, app.notifications,
             new IsolateRepository(app.vm), _scriptRepository,
             queue: app.queue)
       ];
@@ -708,8 +709,8 @@
       // Preload all isolates to avoid sorting problems.
       await Future.wait(vm.isolates.map((i) => i.load()));
       container.children = [
-        new MemoryDashboardElement(vm, new IsolateRepository(vm), editor,
-            _allocationProfileRepository, app.events, app.notifications,
+        new MemoryDashboardElement(vm, _vmrepository, new IsolateRepository(vm),
+            editor, _allocationProfileRepository, app.events, app.notifications,
             queue: app.queue)
       ];
     }).catchError((e, stack) {
diff --git a/runtime/observatory/lib/src/elements/class_allocation_profile.dart b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
index 88987ae..2b7979d 100644
--- a/runtime/observatory/lib/src/elements/class_allocation_profile.dart
+++ b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
@@ -25,6 +25,7 @@
   Stream<RenderedEvent<ClassAllocationProfileElement>> get onRendered =>
       _r.onRendered;
 
+  M.VM _vm;
   M.IsolateRef _isolate;
   M.Class _cls;
   M.ClassSampleProfileRepository _profiles;
@@ -37,14 +38,16 @@
   M.IsolateRef get isolate => _isolate;
   M.Class get cls => _cls;
 
-  factory ClassAllocationProfileElement(M.IsolateRef isolate, M.Class cls,
-      M.ClassSampleProfileRepository profiles,
+  factory ClassAllocationProfileElement(M.VM vm, M.IsolateRef isolate,
+      M.Class cls, M.ClassSampleProfileRepository profiles,
       {RenderingQueue queue}) {
+    assert(vm != null);
     assert(isolate != null);
     assert(cls != null);
     assert(profiles != null);
     ClassAllocationProfileElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler(e, queue: queue);
+    e._vm = vm;
     e._isolate = isolate;
     e._cls = cls;
     e._profiles = profiles;
@@ -73,11 +76,11 @@
       return;
     }
     final content = [
-      new SampleBufferControlElement(_progress, _progressStream,
+      new SampleBufferControlElement(_vm, _progress, _progressStream,
           selectedTag: _tag, queue: _r.queue)
         ..onTagChange.listen((e) {
           _tag = e.element.selectedTag;
-          _request();
+          _request(forceFetch: true);
         })
     ];
     if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
@@ -103,9 +106,10 @@
     children = content;
   }
 
-  Future _request() async {
+  Future _request({bool forceFetch: false}) async {
     _progress = null;
-    _progressStream = _profiles.get(_isolate, _cls, _tag);
+    _progressStream =
+        _profiles.get(_isolate, _cls, _tag, forceFetch: forceFetch);
     _r.dirty();
     _progress = (await _progressStream.first).progress;
     _r.dirty();
diff --git a/runtime/observatory/lib/src/elements/class_view.dart b/runtime/observatory/lib/src/elements/class_view.dart
index 613d465..b9f612f 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -272,7 +272,8 @@
           new DivElement()
             ..children = _loadProfile
                 ? [
-                    new ClassAllocationProfileElement(_isolate, _cls, _profiles,
+                    new ClassAllocationProfileElement(
+                        _vm, _isolate, _cls, _profiles,
                         queue: _r.queue)
                   ]
                 : const [],
diff --git a/runtime/observatory/lib/src/elements/code_view.dart b/runtime/observatory/lib/src/elements/code_view.dart
index c339336..cfec45b 100644
--- a/runtime/observatory/lib/src/elements/code_view.dart
+++ b/runtime/observatory/lib/src/elements/code_view.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 import 'dart:html';
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:observatory/service.dart' as S;
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/app.dart'
@@ -347,7 +347,7 @@
     final isolate = code.isolate;
     S.ServiceMap response =
         await isolate.invokeRpc('_getCpuProfile', {'tags': 'None'});
-    final cpuProfile = new CpuProfile();
+    final cpuProfile = new SampleProfile();
     await cpuProfile.load(isolate, response);
     _r.dirty();
   }
diff --git a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
index 547a1fd..688ea0a 100644
--- a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
+++ b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
@@ -153,7 +153,7 @@
 
     final top = (scrollTop / _itemHeight).floor();
 
-    _header.style.top = '${scrollTop}px';
+    _updateHeader();
     _scroller.style.height = '${_itemHeight*(_items.length)+_headerHeight}px';
     final tail_length = (_height / _itemHeight / _preload).ceil();
     final length = tail_length * 2 + tail_length * _preload;
@@ -183,7 +183,13 @@
     }
   }
 
+  void _updateHeader() {
+    _header.style.top = '${scrollTop}px';
+  }
+
   void _onScroll(_) {
+    // needed to avoid flickering
+    _updateHeader();
     _r.dirty();
   }
 
diff --git a/runtime/observatory/lib/src/elements/cpu_profile.dart b/runtime/observatory/lib/src/elements/cpu_profile.dart
index 68fba8a..f5e5180 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile.dart
@@ -110,11 +110,11 @@
       children = content;
       return;
     }
-    content.add(new SampleBufferControlElement(_progress, _progressStream,
+    content.add(new SampleBufferControlElement(_vm, _progress, _progressStream,
         selectedTag: _tag, queue: _r.queue)
       ..onTagChange.listen((e) {
         _tag = e.element.selectedTag;
-        _request();
+        _request(forceFetch: true);
       }));
     if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
       CpuProfileVirtualTreeElement tree;
diff --git a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
index 77e1a72..21c4388 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
@@ -128,7 +128,14 @@
     }
     _tree = new VirtualTreeElement(create, update, _getChildren,
         items: tree.root.children, queue: _r.queue);
-    if (tree.root.children.length == 1) {
+    if (tree.root.children.length == 0) {
+      children = [
+        new DivElement()
+          ..classes = ['tree-item']
+          ..children = [new HeadingElement.h1()..text = 'No Samples']
+      ];
+      return;
+    } else if (tree.root.children.length == 1) {
       _tree.expand(tree.root.children.first, autoExpandSingleChildNodes: true);
     }
     children = [_tree];
diff --git a/runtime/observatory/lib/src/elements/cpu_profile_table.dart b/runtime/observatory/lib/src/elements/cpu_profile_table.dart
index 0cb40f7..b37f2ac 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile_table.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile_table.dart
@@ -127,7 +127,7 @@
       children = content;
       return;
     }
-    content.add(new SampleBufferControlElement(_progress, _progressStream,
+    content.add(new SampleBufferControlElement(_vm, _progress, _progressStream,
         showTag: false, queue: _r.queue));
     if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
       content.add(new BRElement());
diff --git a/runtime/observatory/lib/src/elements/memory/dashboard.dart b/runtime/observatory/lib/src/elements/memory/dashboard.dart
index 2aa299e..0597fa8 100644
--- a/runtime/observatory/lib/src/elements/memory/dashboard.dart
+++ b/runtime/observatory/lib/src/elements/memory/dashboard.dart
@@ -41,17 +41,19 @@
   Stream<RenderedEvent<MemoryDashboardElement>> get onRendered => _r.onRendered;
 
   M.VMRef _vm;
+  M.VMRepository _vms;
   M.IsolateRepository _isolates;
   M.EditorRepository _editor;
   M.AllocationProfileRepository _allocations;
   M.EventRepository _events;
   M.NotificationRepository _notifications;
 
-  M.VM get vm => _vm;
+  M.VMRef get vm => _vm;
   M.NotificationRepository get notifications => _notifications;
 
   factory MemoryDashboardElement(
-      M.VM vm,
+      M.VMRef vm,
+      M.VMRepository vms,
       M.IsolateRepository isolates,
       M.EditorRepository editor,
       M.AllocationProfileRepository allocations,
@@ -59,6 +61,7 @@
       M.NotificationRepository notifications,
       {RenderingQueue queue}) {
     assert(vm != null);
+    assert(vms != null);
     assert(isolates != null);
     assert(editor != null);
     assert(allocations != null);
@@ -67,6 +70,7 @@
     MemoryDashboardElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler(e, queue: queue);
     e._vm = vm;
+    e._vms = vms;
     e._isolates = isolates;
     e._editor = editor;
     e._allocations = allocations;
@@ -96,8 +100,9 @@
 
   void render() {
     if (_graph == null) {
-      _graph = new MemoryGraphElement(vm, _isolates, _events, queue: _r.queue)
-        ..onIsolateSelected.listen(_onIsolateSelected);
+      _graph =
+          new MemoryGraphElement(vm, _vms, _isolates, _events, queue: _r.queue)
+            ..onIsolateSelected.listen(_onIsolateSelected);
     }
     children = [
       navBar([new NavNotifyElement(_notifications, queue: _r.queue)]),
diff --git a/runtime/observatory/lib/src/elements/memory/graph.dart b/runtime/observatory/lib/src/elements/memory/graph.dart
index a89ba43..537767d 100644
--- a/runtime/observatory/lib/src/elements/memory/graph.dart
+++ b/runtime/observatory/lib/src/elements/memory/graph.dart
@@ -41,7 +41,8 @@
   Stream<IsolateSelectedEvent> get onIsolateSelected =>
       _onIsolateSelected.stream;
 
-  M.VM _vm;
+  M.VMRef _vm;
+  M.VMRepository _vms;
   M.IsolateRepository _isolates;
   M.EventRepository _events;
   StreamSubscription _onGCSubscription;
@@ -49,17 +50,19 @@
   StreamSubscription _onConnectionClosedSubscription;
   Timer _onTimer;
 
-  M.VM get vm => _vm;
+  M.VMRef get vm => _vm;
 
-  factory MemoryGraphElement(
-      M.VM vm, M.IsolateRepository isolates, M.EventRepository events,
+  factory MemoryGraphElement(M.VMRef vm, M.VMRepository vms,
+      M.IsolateRepository isolates, M.EventRepository events,
       {RenderingQueue queue}) {
     assert(vm != null);
+    assert(vms != null);
     assert(isolates != null);
     assert(events != null);
     MemoryGraphElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler(e, queue: queue);
     e._vm = vm;
+    e._vms = vms;
     e._isolates = isolates;
     e._events = events;
     return e;
@@ -70,13 +73,13 @@
     var sample = now.subtract(_window);
     while (sample.isBefore(now)) {
       _ts.add(sample);
-      _vmSamples.add(0);
+      _vmSamples.add(<int>[0, 0]);
       _isolateUsedSamples.add([]);
       _isolateFreeSamples.add([]);
       sample = sample.add(_period);
     }
     _ts.add(now);
-    _vmSamples.add(0);
+    _vmSamples.add(<int>[0, 0]);
     _isolateUsedSamples.add([]);
     _isolateFreeSamples.add([]);
   }
@@ -109,7 +112,7 @@
   }
 
   final List<DateTime> _ts = <DateTime>[];
-  final List<int> _vmSamples = <int>[];
+  final List<List<int>> _vmSamples = <List<int>>[];
   final List<M.IsolateRef> _seenIsolates = <M.IsolateRef>[];
   final List<List<int>> _isolateUsedSamples = <List<int>>[];
   final List<List<int>> _isolateFreeSamples = <List<int>>[];
@@ -123,6 +126,12 @@
   void render() {
     if (_previewed != null || _hovered != null) return;
 
+    // cache data of hoverboards
+    final ts = new List<DateTime>.from(_ts);
+    final vmSamples = new List<List<int>>.from(_vmSamples);
+    final isolateFreeSamples = new List<List<int>>.from(_isolateFreeSamples);
+    final isolateUsedSamples = new List<List<int>>.from(_isolateUsedSamples);
+
     final now = _ts.last;
     final nativeComponents = 1;
     final legend = new DivElement();
@@ -144,15 +153,16 @@
         ]));
     // The stacked line chart sorts from top to bottom
     final rows = new List.generate(_ts.length, (sampleIndex) {
-      final free = _isolateFreeSamples[sampleIndex];
-      final used = _isolateUsedSamples[sampleIndex];
+      final free = isolateFreeSamples[sampleIndex];
+      final used = isolateUsedSamples[sampleIndex];
+      final isolates = _isolateIndex.keys.expand((key) {
+        final isolateIndex = _isolateIndex[key];
+        return <int>[free[isolateIndex], used[isolateIndex]];
+      });
       return [
-        _ts[sampleIndex].difference(now).inMicroseconds,
-        _vmSamples[sampleIndex]
-      ]..addAll(_isolateIndex.keys.expand((key) {
-          final isolateIndex = _isolateIndex[key];
-          return [free[isolateIndex], used[isolateIndex]];
-        }));
+        ts[sampleIndex].difference(now).inMicroseconds,
+        vmSamples[sampleIndex][1] ?? 1000000
+      ]..addAll(isolates);
     });
 
     final scale = new LinearScale()..domain = [(-_window).inMicroseconds, 0];
@@ -170,9 +180,14 @@
       ..theme = theme;
     area.addChartBehavior(new Hovercard(builder: (int column, int row) {
       if (column == 1) {
-        return _formatNativeOvercard(row);
+        final data = vmSamples[row];
+        return _formatNativeOvercard(data[0], data[1]);
       }
-      return _formatIsolateOvercard(_seenIsolates[column - 2].id, row);
+      final isolate = _seenIsolates[column - 2];
+      final index = _isolateIndex[isolate.id];
+      final free = isolateFreeSamples[row][index];
+      final used = isolateUsedSamples[row][index];
+      return _formatIsolateOvercard(isolate.name, free, used);
     }));
     area.draw();
 
@@ -195,9 +210,10 @@
     _running = true;
     final now = new DateTime.now();
     final start = now.subtract(_window);
+    final vm = await _vms.get(_vm);
     // The Service classes order isolates from the older to the newer
     final isolates =
-        (await Future.wait(_vm.isolates.map(_isolates.get))).reversed.toList();
+        (await Future.wait(vm.isolates.map(_isolates.get))).reversed.toList();
     while (_ts.first.isBefore(start)) {
       _ts.removeAt(0);
       _vmSamples.removeAt(0);
@@ -252,7 +268,7 @@
       _isolateUsedSamples.add(isolateUsedSample);
       _isolateFreeSamples.add(isolateFreeSample);
 
-      _vmSamples.add(vm.heapAllocatedMemoryUsage);
+      _vmSamples.add(<int>[vm.currentRSS, vm.heapAllocatedMemoryUsage]);
 
       _ts.add(now);
     }
@@ -267,7 +283,7 @@
     _isolateUsedSamples.add(isolateUsedSample);
     _isolateFreeSamples.add(isolateFreeSample);
 
-    _vmSamples.add(vm.heapAllocatedMemoryUsage);
+    _vmSamples.add(<int>[vm.currentRSS, vm.heapAllocatedMemoryUsage]);
 
     _ts.add(now);
     _r.dirty();
@@ -322,33 +338,43 @@
     return '${name} ($usedStr / $capacityStr)';
   }
 
-  Element _formatNativeOvercard(int row) => new DivElement()
-    ..children = [
+  static HtmlElement _formatNativeOvercard(int currentRSS, int heap) =>
       new DivElement()
-        ..classes = ['hovercard-title']
-        ..text = 'Native',
-      new DivElement()
-        ..classes = ['hovercard-measure', 'hovercard-multi']
         ..children = [
           new DivElement()
-            ..classes = ['hovercard-measure-label']
-            ..text = 'Heap',
+            ..classes = ['hovercard-title']
+            ..text = 'Native',
           new DivElement()
-            ..classes = ['hovercard-measure-value']
-            ..text = Utils.formatSize(_vmSamples[row]),
-        ]
-    ];
+            ..classes = ['hovercard-measure', 'hovercard-multi']
+            ..children = [
+              new DivElement()
+                ..classes = ['hovercard-measure-label']
+                ..text = 'Total Memory Usage',
+              new DivElement()
+                ..classes = ['hovercard-measure-value']
+                ..text = currentRSS != null
+                    ? Utils.formatSize(currentRSS)
+                    : "unavailable",
+            ],
+          new DivElement()
+            ..classes = ['hovercard-measure', 'hovercard-multi']
+            ..children = [
+              new DivElement()
+                ..classes = ['hovercard-measure-label']
+                ..text = 'Native Heap',
+              new DivElement()
+                ..classes = ['hovercard-measure-value']
+                ..text = heap != null ? Utils.formatSize(heap) : "unavailable",
+            ]
+        ];
 
-  Element _formatIsolateOvercard(String isolateId, int row) {
-    final index = _isolateIndex[isolateId];
-    final free = _isolateFreeSamples[row][index];
-    final used = _isolateUsedSamples[row][index];
+  static HtmlElement _formatIsolateOvercard(String name, int free, int used) {
     final capacity = free + used;
     return new DivElement()
       ..children = [
         new DivElement()
           ..classes = ['hovercard-title']
-          ..text = _isolateName[isolateId],
+          ..text = name,
         new DivElement()
           ..classes = ['hovercard-measure', 'hovercard-multi']
           ..children = [
diff --git a/runtime/observatory/lib/src/elements/native_memory_profiler.dart b/runtime/observatory/lib/src/elements/native_memory_profiler.dart
index 4ce047e..f517447 100644
--- a/runtime/observatory/lib/src/elements/native_memory_profiler.dart
+++ b/runtime/observatory/lib/src/elements/native_memory_profiler.dart
@@ -101,11 +101,11 @@
       children = content;
       return;
     }
-    content.add(new SampleBufferControlElement(_progress, _progressStream,
+    content.add(new SampleBufferControlElement(_vm, _progress, _progressStream,
         selectedTag: _tag, queue: _r.queue)
       ..onTagChange.listen((e) {
         _tag = e.element.selectedTag;
-        _request();
+        _request(forceFetch: true);
       }));
     if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
       CpuProfileVirtualTreeElement tree;
diff --git a/runtime/observatory/lib/src/elements/sample_buffer_control.dart b/runtime/observatory/lib/src/elements/sample_buffer_control.dart
index 3661c7c..d7bd262 100644
--- a/runtime/observatory/lib/src/elements/sample_buffer_control.dart
+++ b/runtime/observatory/lib/src/elements/sample_buffer_control.dart
@@ -7,7 +7,6 @@
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
 import 'package:observatory/src/elements/helpers/tag.dart';
-import 'package:observatory/src/elements/helpers/uris.dart';
 import 'package:observatory/utils.dart';
 
 class SampleBufferControlChangedElement {
@@ -29,6 +28,7 @@
   Stream<SampleBufferControlChangedElement> get onTagChange =>
       _onTagChange.stream;
 
+  M.VM _vm;
   Stream<M.SampleProfileLoadingProgressEvent> _progressStream;
   M.SampleProfileLoadingProgress _progress;
   M.SampleProfileTag _tag;
@@ -46,7 +46,9 @@
   set showTag(bool value) => _showTag = _r.checkAndReact(_showTag, value);
   set profileVM(bool value) => _profileVM = _r.checkAndReact(_profileVM, value);
 
-  factory SampleBufferControlElement(M.SampleProfileLoadingProgress progress,
+  factory SampleBufferControlElement(
+      M.VM vm,
+      M.SampleProfileLoadingProgress progress,
       Stream<M.SampleProfileLoadingProgressEvent> progressStream,
       {M.SampleProfileTag selectedTag: M.SampleProfileTag.none,
       bool showTag: true,
@@ -57,6 +59,7 @@
     assert(showTag != null);
     SampleBufferControlElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler(e, queue: queue);
+    e._vm = vm;
     e._progress = progress;
     e._progressStream = progressStream;
     e._tag = selectedTag;
@@ -129,7 +132,7 @@
     ];
   }
 
-  static List<Element> _createDisabledMessage() {
+  List<Element> _createDisabledMessage() {
     return [
       new DivElement()
         ..classes = ['statusBox' 'shadow' 'center']
@@ -142,8 +145,11 @@
                 ..innerHtml = 'Perhaps the <b>profile</b> '
                     'flag has been disabled for this VM.',
               new BRElement(),
-              new SpanElement()..text = 'See all ',
-              new AnchorElement(href: Uris.flags())..text = 'vm flags'
+              new ButtonElement()
+                ..text = 'Enable profiler'
+                ..onClick.listen((_) {
+                  _enableProfiler();
+                })
             ]
         ]
     ];
@@ -253,5 +259,11 @@
     return new SampleBufferControlChangedElement(this);
   }
 
+  void _enableProfiler() {
+    _vm.enableProfiler().then((_) {
+      _triggerModeChange(_toEvent(null));
+    });
+  }
+
   void _triggerModeChange(e) => _onTagChange.add(e);
 }
diff --git a/runtime/observatory/lib/src/elements/vm_view.dart b/runtime/observatory/lib/src/elements/vm_view.dart
index fd37dd2..c02ef47 100644
--- a/runtime/observatory/lib/src/elements/vm_view.dart
+++ b/runtime/observatory/lib/src/elements/vm_view.dart
@@ -34,6 +34,7 @@
   Stream<RenderedEvent<VMViewElement>> get onRendered => _r.onRendered;
 
   M.VM _vm;
+  M.VMRepository _vms;
   M.EventRepository _events;
   M.NotificationRepository _notifications;
   M.IsolateRepository _isolates;
@@ -47,17 +48,22 @@
 
   factory VMViewElement(
       M.VM vm,
+      M.VMRepository vms,
       M.EventRepository events,
       M.NotificationRepository notifications,
       M.IsolateRepository isolates,
       M.ScriptRepository scripts,
       {RenderingQueue queue}) {
     assert(vm != null);
+    assert(vms != null);
     assert(events != null);
     assert(notifications != null);
+    assert(isolates != null);
+    assert(scripts != null);
     VMViewElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler(e, queue: queue);
     e._vm = vm;
+    e._vms = vms;
     e._events = events;
     e._notifications = notifications;
     e._isolates = isolates;
@@ -99,13 +105,14 @@
         new NavRefreshElement(queue: _r.queue)
           ..onRefresh.listen((e) async {
             e.element.disabled = true;
+            _vm = await _vms.get(_vm);
             _r.dirty();
           }),
         new NavNotifyElement(_notifications, queue: _r.queue)
       ]),
       new DivElement()
         ..classes = ['content-centered-big']
-        ..children = [
+        ..children = <HtmlElement>[
           new HeadingElement.h1()..text = 'VM',
           new HRElement(),
           new DivElement()
@@ -136,6 +143,16 @@
                 ..children = [
                   new DivElement()
                     ..classes = ['memberName']
+                    ..text = 'embedder',
+                  new DivElement()
+                    ..classes = ['memberValue']
+                    ..text = _vm.embedder ?? "UNKNOWN"
+                ],
+              new DivElement()
+                ..classes = ['memberItem']
+                ..children = [
+                  new DivElement()
+                    ..classes = ['memberName']
                     ..text = 'started at',
                   new DivElement()
                     ..classes = ['memberValue']
@@ -179,7 +196,21 @@
                     ..text = 'peak memory',
                   new DivElement()
                     ..classes = ['memberValue']
-                    ..text = Utils.formatSize(_vm.maxRSS)
+                    ..text = _vm.maxRSS != null
+                        ? Utils.formatSize(_vm.maxRSS)
+                        : "unavailable"
+                ],
+              new DivElement()
+                ..classes = ['memberItem']
+                ..children = [
+                  new DivElement()
+                    ..classes = ['memberName']
+                    ..text = 'current memory',
+                  new DivElement()
+                    ..classes = ['memberValue']
+                    ..text = _vm.currentRSS != null
+                        ? Utils.formatSize(_vm.currentRSS)
+                        : "unavailable"
                 ],
               new DivElement()
                 ..classes = ['memberItem']
@@ -200,8 +231,12 @@
                     ..text = 'native heap memory',
                   new DivElement()
                     ..classes = ['memberValue']
-                    ..text = Utils.formatSize(_vm.heapAllocatedMemoryUsage)
-                    ..title = '${_vm.heapAllocatedMemoryUsage} bytes'
+                    ..text = _vm.heapAllocatedMemoryUsage != null
+                        ? Utils.formatSize(_vm.heapAllocatedMemoryUsage)
+                        : 'unavailable'
+                    ..title = _vm.heapAllocatedMemoryUsage != null
+                        ? '${_vm.heapAllocatedMemoryUsage} bytes'
+                        : null
                 ],
               new DivElement()
                 ..classes = ['memberItem']
@@ -211,7 +246,9 @@
                     ..text = 'native heap allocation count',
                   new DivElement()
                     ..classes = ['memberValue']
-                    ..text = '${_vm.heapAllocationCount}'
+                    ..text = _vm.heapAllocationCount != null
+                        ? '${_vm.heapAllocationCount}'
+                        : 'unavailable'
                 ],
               new BRElement(),
               new DivElement()
diff --git a/runtime/observatory/lib/src/models/objects/vm.dart b/runtime/observatory/lib/src/models/objects/vm.dart
index f1f5088..b2bfd4d 100644
--- a/runtime/observatory/lib/src/models/objects/vm.dart
+++ b/runtime/observatory/lib/src/models/objects/vm.dart
@@ -13,11 +13,7 @@
   String get displayName;
 }
 
-abstract class ServiceObjectOwner {
-  Future<dynamic> invokeRpc(String method, Map params);
-}
-
-abstract class VM implements VMRef, ServiceObjectOwner {
+abstract class VM implements VMRef {
   /// Word length on target architecture (e.g. 32, 64).
   int get architectureBits;
 
@@ -30,6 +26,8 @@
   /// The Dart VM version string.
   String get version;
 
+  String get embedder;
+
   /// The amount of memory currently allocated by native code in zones.
   int get nativeZoneMemoryUsage;
 
@@ -43,6 +41,7 @@
   int get heapAllocationCount;
 
   int get maxRSS;
+  int get currentRSS;
 
   /// The time that the VM started in milliseconds since the epoch.
   ///
@@ -51,4 +50,7 @@
 
   // A list of isolates running in the VM.
   Iterable<IsolateRef> get isolates;
+
+  /// Enable the sampling profiler.
+  Future enableProfiler();
 }
diff --git a/runtime/observatory/lib/src/models/repositories/sample_profile.dart b/runtime/observatory/lib/src/models/repositories/sample_profile.dart
index ed38ba6..4a21ed8 100644
--- a/runtime/observatory/lib/src/models/repositories/sample_profile.dart
+++ b/runtime/observatory/lib/src/models/repositories/sample_profile.dart
@@ -34,7 +34,8 @@
 
 abstract class ClassSampleProfileRepository {
   Stream<SampleProfileLoadingProgressEvent> get(
-      IsolateRef isolate, ClassRef cls, SampleProfileTag tag);
+      IsolateRef isolate, ClassRef cls, SampleProfileTag tag,
+      {bool clear: false, bool forceFetch: false});
   Future enable(IsolateRef isolate, ClassRef cls);
   Future disable(IsolateRef isolate, ClassRef cls);
 }
diff --git a/runtime/observatory/lib/src/models/repositories/vm.dart b/runtime/observatory/lib/src/models/repositories/vm.dart
new file mode 100644
index 0000000..fd646bc
--- /dev/null
+++ b/runtime/observatory/lib/src/models/repositories/vm.dart
@@ -0,0 +1,9 @@
+// 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.
+
+part of models;
+
+abstract class VMRepository {
+  Future<VM> get(VMRef ref);
+}
diff --git a/runtime/observatory/lib/src/repositories/editor.dart b/runtime/observatory/lib/src/repositories/editor.dart
index 2639573..80b4b62 100644
--- a/runtime/observatory/lib/src/repositories/editor.dart
+++ b/runtime/observatory/lib/src/repositories/editor.dart
@@ -17,15 +17,15 @@
   }
 
   S.Service _getService() {
-    if (_vm.services.isEmpty) {
-      return null;
+    Iterable<M.Service> services =
+        _vm.services.where((s) => s.service == 'openSourceLocation');
+    if (_editor != null) {
+      services = services.where((s) => s.alias == _editor);
     }
-    if (_editor == null) {
-      return _vm.services.where((s) => s.service == 'openSourceLocation').first;
+    if (services.isNotEmpty) {
+      return services.first;
     }
-    return _vm.services
-        .where((s) => s.service == 'openSourceLocation' && s.alias == _editor)
-        .single;
+    return null;
   }
 
   Future openClass(M.IsolateRef i, M.ClassRef c) async {
diff --git a/runtime/observatory/lib/src/repositories/sample_profile.dart b/runtime/observatory/lib/src/repositories/sample_profile.dart
index f2b6ee2f..6778262 100644
--- a/runtime/observatory/lib/src/repositories/sample_profile.dart
+++ b/runtime/observatory/lib/src/repositories/sample_profile.dart
@@ -32,7 +32,7 @@
   Stream<SampleProfileLoadingProgressEvent> get onProgress =>
       _onProgress.stream;
 
-  final M.ServiceObjectOwner owner;
+  final S.ServiceObjectOwner owner;
   final S.Class cls;
   final M.SampleProfileTag tag;
   final bool clear;
@@ -42,13 +42,13 @@
   double _progress = 0.0;
   final Stopwatch _fetchingTime = new Stopwatch();
   final Stopwatch _loadingTime = new Stopwatch();
-  CpuProfile _profile;
+  SampleProfile _profile;
 
   M.SampleProfileLoadingStatus get status => _status;
   double get progress => _progress;
   Duration get fetchingTime => _fetchingTime.elapsed;
   Duration get loadingTime => _loadingTime.elapsed;
-  CpuProfile get profile => _profile;
+  SampleProfile get profile => _profile;
 
   SampleProfileLoadingProgress(this.owner, this.tag, this.clear,
       {this.type: M.SampleProfileType.cpu, this.cls}) {
@@ -81,7 +81,7 @@
       _status = M.SampleProfileLoadingStatus.loading;
       _triggerOnProgress();
 
-      CpuProfile profile = new CpuProfile();
+      SampleProfile profile = new SampleProfile();
 
       Stream<double> progress = profile.loadProgress(owner, response);
       progress.listen((value) {
@@ -146,7 +146,8 @@
 
 class ClassSampleProfileRepository implements M.ClassSampleProfileRepository {
   Stream<SampleProfileLoadingProgressEvent> get(
-      M.Isolate i, M.ClassRef c, M.SampleProfileTag t) {
+      M.Isolate i, M.ClassRef c, M.SampleProfileTag t,
+      {bool clear: false, bool forceFetch: false}) {
     S.Isolate isolate = i as S.Isolate;
     S.Class cls = c as S.Class;
     assert(isolate != null);
@@ -175,10 +176,13 @@
   Stream<SampleProfileLoadingProgressEvent> get(M.VM vm, M.SampleProfileTag t,
       {bool forceFetch: false, bool clear: false}) {
     assert(forceFetch != null);
+    S.VM owner = vm as S.VM;
+    assert(owner != null);
+
     if ((_last != null) && !forceFetch) {
       _last.reuse();
     } else {
-      _last = new SampleProfileLoadingProgress(vm, t, false,
+      _last = new SampleProfileLoadingProgress(owner, t, false,
           type: M.SampleProfileType.memory);
     }
     return _last.onProgress;
diff --git a/runtime/observatory/lib/src/repositories/vm.dart b/runtime/observatory/lib/src/repositories/vm.dart
new file mode 100644
index 0000000..514e374
--- /dev/null
+++ b/runtime/observatory/lib/src/repositories/vm.dart
@@ -0,0 +1,14 @@
+// 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.
+
+part of repositories;
+
+class VMRepository implements M.VMRepository {
+  Future<M.VM> get(M.VMRef ref) async {
+    S.VM vm = ref as S.VM;
+    assert(vm != null);
+    await vm.reload();
+    return vm;
+  }
+}
diff --git a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart b/runtime/observatory/lib/src/sample_profile/sample_profile.dart
similarity index 99%
rename from runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
rename to runtime/observatory/lib/src/sample_profile/sample_profile.dart
index 76e1a26..db9c060 100644
--- a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
+++ b/runtime/observatory/lib/src/sample_profile/sample_profile.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.
 
-part of cpu_profiler;
+part of sample_profiler;
 
 abstract class CallTreeNode<NodeT extends M.CallTreeNode>
     implements M.CallTreeNode {
@@ -460,7 +460,7 @@
 }
 
 class ProfileCode implements M.ProfileCode {
-  final CpuProfile profile;
+  final SampleProfile profile;
   final Code code;
   int exclusiveTicks;
   int inclusiveTicks;
@@ -588,7 +588,7 @@
 }
 
 class ProfileFunction implements M.ProfileFunction {
-  final CpuProfile profile;
+  final SampleProfile profile;
   final ServiceFunction function;
   // List of compiled code objects containing this function.
   final List<ProfileCode> profileCodes = new List<ProfileCode>();
@@ -747,8 +747,7 @@
   }
 }
 
-// TODO(johnmccutchan): Rename to SampleProfile
-class CpuProfile extends M.SampleProfile {
+class SampleProfile extends M.SampleProfile {
   Isolate isolate;
 
   int sampleCount = 0;
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 246fba9..ef9499c 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -441,8 +441,7 @@
   RetainingObject(this.object);
 }
 
-abstract class ServiceObjectOwner extends ServiceObject
-    implements M.ServiceObjectOwner {
+abstract class ServiceObjectOwner extends ServiceObject {
   /// Creates an empty [ServiceObjectOwner].
   ServiceObjectOwner._empty(ServiceObjectOwner owner) : super._empty(owner);
 
@@ -670,6 +669,7 @@
   String version = 'unknown';
   String hostCPU;
   String targetCPU;
+  String embedder;
   int architectureBits;
   bool assertsEnabled = false;
   bool typeChecksEnabled = false;
@@ -677,7 +677,8 @@
   int pid = 0;
   int heapAllocatedMemoryUsage = 0;
   int heapAllocationCount = 0;
-  int maxRSS = 0;
+  int maxRSS;
+  int currentRSS;
   bool profileVM = false;
   DateTime startTime;
   DateTime refreshTime;
@@ -895,6 +896,10 @@
     return invokeRpc('getFlagList', {});
   }
 
+  Future enableProfiler() {
+    return invokeRpc("_enableProfiler", {});
+  }
+
   Future<ServiceObject> _streamListen(String streamId) {
     Map params = {
       'streamId': streamId,
@@ -975,13 +980,11 @@
       nativeZoneMemoryUsage = map['_nativeZoneMemoryUsage'];
     }
     pid = map['pid'];
-    if (map['_heapAllocatedMemoryUsage'] != null) {
-      heapAllocatedMemoryUsage = map['_heapAllocatedMemoryUsage'];
-    }
-    if (map['_heapAllocationCount'] != null) {
-      heapAllocationCount = map['_heapAllocationCount'];
-    }
+    heapAllocatedMemoryUsage = map['_heapAllocatedMemoryUsage'];
+    heapAllocationCount = map['_heapAllocationCount'];
+    embedder = map['_embedder'];
     maxRSS = map['_maxRSS'];
+    currentRSS = map['_currentRSS'];
     profileVM = map['_profilerMode'] == 'VM';
     assertsEnabled = map['_assertsEnabled'];
     typeChecksEnabled = map['_typeChecksEnabled'];
diff --git a/runtime/observatory/observatory_sources.gni b/runtime/observatory/observatory_sources.gni
new file mode 100644
index 0000000..f58f817
--- /dev/null
+++ b/runtime/observatory/observatory_sources.gni
@@ -0,0 +1,284 @@
+# 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.
+
+# DO NOT EDIT. This file is generated by update_sources.py in this directory.
+
+# This file contains all dart, css, and html sources for Observatory.
+observatory_sources = [
+  "lib/allocation_profile.dart",
+  "lib/app.dart",
+  "lib/cli.dart",
+  "lib/debugger.dart",
+  "lib/elements.dart",
+  "lib/event.dart",
+  "lib/heap_snapshot.dart",
+  "lib/models.dart",
+  "lib/object_graph.dart",
+  "lib/repositories.dart",
+  "lib/sample_profile.dart",
+  "lib/service.dart",
+  "lib/service_common.dart",
+  "lib/service_html.dart",
+  "lib/service_io.dart",
+  "lib/src/allocation_profile/allocation_profile.dart",
+  "lib/src/app/analytics.dart",
+  "lib/src/app/application.dart",
+  "lib/src/app/location_manager.dart",
+  "lib/src/app/notification.dart",
+  "lib/src/app/page.dart",
+  "lib/src/app/settings.dart",
+  "lib/src/app/view_model.dart",
+  "lib/src/cli/command.dart",
+  "lib/src/debugger/debugger.dart",
+  "lib/src/debugger/debugger_location.dart",
+  "lib/src/elements/allocation_profile.dart",
+  "lib/src/elements/class_allocation_profile.dart",
+  "lib/src/elements/class_instances.dart",
+  "lib/src/elements/class_ref.dart",
+  "lib/src/elements/class_tree.dart",
+  "lib/src/elements/class_view.dart",
+  "lib/src/elements/code_ref.dart",
+  "lib/src/elements/code_view.dart",
+  "lib/src/elements/containers/virtual_collection.dart",
+  "lib/src/elements/containers/virtual_tree.dart",
+  "lib/src/elements/context_ref.dart",
+  "lib/src/elements/context_view.dart",
+  "lib/src/elements/cpu_profile.dart",
+  "lib/src/elements/cpu_profile/virtual_tree.dart",
+  "lib/src/elements/cpu_profile_table.dart",
+  "lib/src/elements/css/shared.css",
+  "lib/src/elements/curly_block.dart",
+  "lib/src/elements/debugger.dart",
+  "lib/src/elements/error_ref.dart",
+  "lib/src/elements/error_view.dart",
+  "lib/src/elements/eval_box.dart",
+  "lib/src/elements/field_ref.dart",
+  "lib/src/elements/field_view.dart",
+  "lib/src/elements/flag_list.dart",
+  "lib/src/elements/function_ref.dart",
+  "lib/src/elements/function_view.dart",
+  "lib/src/elements/general_error.dart",
+  "lib/src/elements/heap_map.dart",
+  "lib/src/elements/heap_snapshot.dart",
+  "lib/src/elements/helpers/any_ref.dart",
+  "lib/src/elements/helpers/nav_bar.dart",
+  "lib/src/elements/helpers/nav_menu.dart",
+  "lib/src/elements/helpers/rendering_queue.dart",
+  "lib/src/elements/helpers/rendering_scheduler.dart",
+  "lib/src/elements/helpers/tag.dart",
+  "lib/src/elements/helpers/uris.dart",
+  "lib/src/elements/icdata_ref.dart",
+  "lib/src/elements/icdata_view.dart",
+  "lib/src/elements/img/chromium_icon.png",
+  "lib/src/elements/img/dart_icon.png",
+  "lib/src/elements/img/isolate_icon.png",
+  "lib/src/elements/inbound_references.dart",
+  "lib/src/elements/instance_ref.dart",
+  "lib/src/elements/instance_view.dart",
+  "lib/src/elements/isolate/counter_chart.dart",
+  "lib/src/elements/isolate/location.dart",
+  "lib/src/elements/isolate/run_state.dart",
+  "lib/src/elements/isolate/shared_summary.dart",
+  "lib/src/elements/isolate/summary.dart",
+  "lib/src/elements/isolate_reconnect.dart",
+  "lib/src/elements/isolate_ref.dart",
+  "lib/src/elements/isolate_view.dart",
+  "lib/src/elements/json_view.dart",
+  "lib/src/elements/library_ref.dart",
+  "lib/src/elements/library_view.dart",
+  "lib/src/elements/local_var_descriptors_ref.dart",
+  "lib/src/elements/logging.dart",
+  "lib/src/elements/logging_list.dart",
+  "lib/src/elements/megamorphiccache_ref.dart",
+  "lib/src/elements/megamorphiccache_view.dart",
+  "lib/src/elements/memory/dashboard.dart",
+  "lib/src/elements/memory/graph.dart",
+  "lib/src/elements/memory/profile.dart",
+  "lib/src/elements/metric/details.dart",
+  "lib/src/elements/metric/graph.dart",
+  "lib/src/elements/metrics.dart",
+  "lib/src/elements/native_memory_profiler.dart",
+  "lib/src/elements/nav/class_menu.dart",
+  "lib/src/elements/nav/isolate_menu.dart",
+  "lib/src/elements/nav/library_menu.dart",
+  "lib/src/elements/nav/menu_item.dart",
+  "lib/src/elements/nav/notify.dart",
+  "lib/src/elements/nav/notify_event.dart",
+  "lib/src/elements/nav/notify_exception.dart",
+  "lib/src/elements/nav/refresh.dart",
+  "lib/src/elements/nav/reload.dart",
+  "lib/src/elements/nav/top_menu.dart",
+  "lib/src/elements/nav/vm_menu.dart",
+  "lib/src/elements/object_common.dart",
+  "lib/src/elements/object_view.dart",
+  "lib/src/elements/objectpool_ref.dart",
+  "lib/src/elements/objectpool_view.dart",
+  "lib/src/elements/objectstore_view.dart",
+  "lib/src/elements/observatory_application.dart",
+  "lib/src/elements/pc_descriptors_ref.dart",
+  "lib/src/elements/persistent_handles.dart",
+  "lib/src/elements/ports.dart",
+  "lib/src/elements/retaining_path.dart",
+  "lib/src/elements/sample_buffer_control.dart",
+  "lib/src/elements/script_inset.dart",
+  "lib/src/elements/script_ref.dart",
+  "lib/src/elements/script_view.dart",
+  "lib/src/elements/sentinel_value.dart",
+  "lib/src/elements/sentinel_view.dart",
+  "lib/src/elements/singletargetcache_ref.dart",
+  "lib/src/elements/singletargetcache_view.dart",
+  "lib/src/elements/source_inset.dart",
+  "lib/src/elements/source_link.dart",
+  "lib/src/elements/stack_trace_tree_config.dart",
+  "lib/src/elements/strongly_reachable_instances.dart",
+  "lib/src/elements/subtypetestcache_ref.dart",
+  "lib/src/elements/subtypetestcache_view.dart",
+  "lib/src/elements/timeline_page.dart",
+  "lib/src/elements/token_stream_ref.dart",
+  "lib/src/elements/top_retaining_instances.dart",
+  "lib/src/elements/type_arguments_ref.dart",
+  "lib/src/elements/unknown_ref.dart",
+  "lib/src/elements/unlinkedcall_ref.dart",
+  "lib/src/elements/unlinkedcall_view.dart",
+  "lib/src/elements/view_footer.dart",
+  "lib/src/elements/vm_connect.dart",
+  "lib/src/elements/vm_connect_target.dart",
+  "lib/src/elements/vm_view.dart",
+  "lib/src/heap_snapshot/heap_snapshot.dart",
+  "lib/src/models/exceptions.dart",
+  "lib/src/models/objects/allocation_profile.dart",
+  "lib/src/models/objects/breakpoint.dart",
+  "lib/src/models/objects/class.dart",
+  "lib/src/models/objects/code.dart",
+  "lib/src/models/objects/context.dart",
+  "lib/src/models/objects/error.dart",
+  "lib/src/models/objects/event.dart",
+  "lib/src/models/objects/extension_data.dart",
+  "lib/src/models/objects/field.dart",
+  "lib/src/models/objects/flag.dart",
+  "lib/src/models/objects/frame.dart",
+  "lib/src/models/objects/function.dart",
+  "lib/src/models/objects/guarded.dart",
+  "lib/src/models/objects/heap_snapshot.dart",
+  "lib/src/models/objects/heap_space.dart",
+  "lib/src/models/objects/icdata.dart",
+  "lib/src/models/objects/inbound_references.dart",
+  "lib/src/models/objects/instance.dart",
+  "lib/src/models/objects/isolate.dart",
+  "lib/src/models/objects/library.dart",
+  "lib/src/models/objects/local_var_descriptors.dart",
+  "lib/src/models/objects/map_association.dart",
+  "lib/src/models/objects/megamorphiccache.dart",
+  "lib/src/models/objects/metric.dart",
+  "lib/src/models/objects/notification.dart",
+  "lib/src/models/objects/object.dart",
+  "lib/src/models/objects/objectpool.dart",
+  "lib/src/models/objects/objectstore.dart",
+  "lib/src/models/objects/pc_descriptors.dart",
+  "lib/src/models/objects/persistent_handles.dart",
+  "lib/src/models/objects/ports.dart",
+  "lib/src/models/objects/retaining_path.dart",
+  "lib/src/models/objects/sample_profile.dart",
+  "lib/src/models/objects/script.dart",
+  "lib/src/models/objects/sentinel.dart",
+  "lib/src/models/objects/service.dart",
+  "lib/src/models/objects/single_target_cache.dart",
+  "lib/src/models/objects/source_location.dart",
+  "lib/src/models/objects/subtype_test_cache.dart",
+  "lib/src/models/objects/target.dart",
+  "lib/src/models/objects/thread.dart",
+  "lib/src/models/objects/timeline_event.dart",
+  "lib/src/models/objects/token_stream.dart",
+  "lib/src/models/objects/type_arguments.dart",
+  "lib/src/models/objects/unknown.dart",
+  "lib/src/models/objects/unlinked_call.dart",
+  "lib/src/models/objects/vm.dart",
+  "lib/src/models/objects/zone.dart",
+  "lib/src/models/repositories/allocation_profile.dart",
+  "lib/src/models/repositories/breakpoint.dart",
+  "lib/src/models/repositories/class.dart",
+  "lib/src/models/repositories/context.dart",
+  "lib/src/models/repositories/editor.dart",
+  "lib/src/models/repositories/eval.dart",
+  "lib/src/models/repositories/event.dart",
+  "lib/src/models/repositories/field.dart",
+  "lib/src/models/repositories/flag.dart",
+  "lib/src/models/repositories/function.dart",
+  "lib/src/models/repositories/heap_snapshot.dart",
+  "lib/src/models/repositories/icdata.dart",
+  "lib/src/models/repositories/inbound_references.dart",
+  "lib/src/models/repositories/instance.dart",
+  "lib/src/models/repositories/isolate.dart",
+  "lib/src/models/repositories/library.dart",
+  "lib/src/models/repositories/megamorphiccache.dart",
+  "lib/src/models/repositories/metric.dart",
+  "lib/src/models/repositories/notification.dart",
+  "lib/src/models/repositories/object.dart",
+  "lib/src/models/repositories/objectpool.dart",
+  "lib/src/models/repositories/objectstore.dart",
+  "lib/src/models/repositories/persistent_handles.dart",
+  "lib/src/models/repositories/ports.dart",
+  "lib/src/models/repositories/reachable_size.dart",
+  "lib/src/models/repositories/retained_size.dart",
+  "lib/src/models/repositories/retaining_path.dart",
+  "lib/src/models/repositories/sample_profile.dart",
+  "lib/src/models/repositories/script.dart",
+  "lib/src/models/repositories/single_target_cache.dart",
+  "lib/src/models/repositories/strongly_reachable_instances.dart",
+  "lib/src/models/repositories/subtype_test_cache.dart",
+  "lib/src/models/repositories/target.dart",
+  "lib/src/models/repositories/top_retaining_instances.dart",
+  "lib/src/models/repositories/type_arguments.dart",
+  "lib/src/models/repositories/unlinked_call.dart",
+  "lib/src/models/repositories/vm.dart",
+  "lib/src/repositories/allocation_profile.dart",
+  "lib/src/repositories/breakpoint.dart",
+  "lib/src/repositories/class.dart",
+  "lib/src/repositories/context.dart",
+  "lib/src/repositories/editor.dart",
+  "lib/src/repositories/eval.dart",
+  "lib/src/repositories/event.dart",
+  "lib/src/repositories/field.dart",
+  "lib/src/repositories/flag.dart",
+  "lib/src/repositories/function.dart",
+  "lib/src/repositories/heap_snapshot.dart",
+  "lib/src/repositories/icdata.dart",
+  "lib/src/repositories/inbound_references.dart",
+  "lib/src/repositories/instance.dart",
+  "lib/src/repositories/isolate.dart",
+  "lib/src/repositories/library.dart",
+  "lib/src/repositories/megamorphiccache.dart",
+  "lib/src/repositories/metric.dart",
+  "lib/src/repositories/notification.dart",
+  "lib/src/repositories/object.dart",
+  "lib/src/repositories/objectpool.dart",
+  "lib/src/repositories/objectstore.dart",
+  "lib/src/repositories/persistent_handles.dart",
+  "lib/src/repositories/ports.dart",
+  "lib/src/repositories/reachable_size.dart",
+  "lib/src/repositories/retained_size.dart",
+  "lib/src/repositories/retaining_path.dart",
+  "lib/src/repositories/sample_profile.dart",
+  "lib/src/repositories/script.dart",
+  "lib/src/repositories/settings.dart",
+  "lib/src/repositories/single_target_cache.dart",
+  "lib/src/repositories/strongly_reachable_instances.dart",
+  "lib/src/repositories/subtype_test_cache.dart",
+  "lib/src/repositories/target.dart",
+  "lib/src/repositories/top_retaining_instances.dart",
+  "lib/src/repositories/type_arguments.dart",
+  "lib/src/repositories/unlinked_call.dart",
+  "lib/src/repositories/vm.dart",
+  "lib/src/sample_profile/sample_profile.dart",
+  "lib/src/service/object.dart",
+  "lib/tracer.dart",
+  "lib/utils.dart",
+  "web/favicon.ico",
+  "web/index.html",
+  "web/main.dart",
+  "web/third_party/trace_viewer_full.html",
+  "web/timeline.html",
+  "web/timeline.js",
+  "web/timeline_message_handler.js",
+]
diff --git a/runtime/observatory/observatory_sources.gypi b/runtime/observatory/observatory_sources.gypi
deleted file mode 100644
index 45455f2..0000000
--- a/runtime/observatory/observatory_sources.gypi
+++ /dev/null
@@ -1,282 +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.
-
-# This file contains all dart, css, and html sources for Observatory.
-{
-  'sources': [
-    'lib/allocation_profile.dart',
-    'lib/app.dart',
-    'lib/cli.dart',
-    'lib/cpu_profile.dart',
-    'lib/debugger.dart',
-    'lib/elements.dart',
-    'lib/event.dart',
-    'lib/heap_snapshot.dart',
-    'lib/models.dart',
-    'lib/object_graph.dart',
-    'lib/repositories.dart',
-    'lib/service.dart',
-    'lib/service_common.dart',
-    'lib/service_html.dart',
-    'lib/service_io.dart',
-    'lib/src/allocation_profile/allocation_profile.dart',
-    'lib/src/app/analytics.dart',
-    'lib/src/app/application.dart',
-    'lib/src/app/location_manager.dart',
-    'lib/src/app/notification.dart',
-    'lib/src/app/page.dart',
-    'lib/src/app/settings.dart',
-    'lib/src/app/view_model.dart',
-    'lib/src/cli/command.dart',
-    'lib/src/cpu_profile/cpu_profile.dart',
-    'lib/src/debugger/debugger.dart',
-    'lib/src/debugger/debugger_location.dart',
-    'lib/src/elements/allocation_profile.dart',
-    'lib/src/elements/class_allocation_profile.dart',
-    'lib/src/elements/class_instances.dart',
-    'lib/src/elements/class_ref.dart',
-    'lib/src/elements/class_tree.dart',
-    'lib/src/elements/class_view.dart',
-    'lib/src/elements/code_ref.dart',
-    'lib/src/elements/code_view.dart',
-    'lib/src/elements/containers/virtual_collection.dart',
-    'lib/src/elements/containers/virtual_tree.dart',
-    'lib/src/elements/context_ref.dart',
-    'lib/src/elements/context_view.dart',
-    'lib/src/elements/cpu_profile.dart',
-    'lib/src/elements/cpu_profile/virtual_tree.dart',
-    'lib/src/elements/cpu_profile_table.dart',
-    'lib/src/elements/css/shared.css',
-    'lib/src/elements/curly_block.dart',
-    'lib/src/elements/debugger.dart',
-    'lib/src/elements/error_ref.dart',
-    'lib/src/elements/error_view.dart',
-    'lib/src/elements/eval_box.dart',
-    'lib/src/elements/field_ref.dart',
-    'lib/src/elements/field_view.dart',
-    'lib/src/elements/flag_list.dart',
-    'lib/src/elements/function_ref.dart',
-    'lib/src/elements/function_view.dart',
-    'lib/src/elements/general_error.dart',
-    'lib/src/elements/heap_map.dart',
-    'lib/src/elements/heap_snapshot.dart',
-    'lib/src/elements/helpers/any_ref.dart',
-    'lib/src/elements/helpers/nav_bar.dart',
-    'lib/src/elements/helpers/nav_menu.dart',
-    'lib/src/elements/helpers/rendering_queue.dart',
-    'lib/src/elements/helpers/rendering_scheduler.dart',
-    'lib/src/elements/helpers/tag.dart',
-    'lib/src/elements/helpers/uris.dart',
-    'lib/src/elements/icdata_ref.dart',
-    'lib/src/elements/icdata_view.dart',
-    'lib/src/elements/img/chromium_icon.png',
-    'lib/src/elements/img/dart_icon.png',
-    'lib/src/elements/img/isolate_icon.png',
-    'lib/src/elements/inbound_references.dart',
-    'lib/src/elements/instance_ref.dart',
-    'lib/src/elements/instance_view.dart',
-    'lib/src/elements/isolate/counter_chart.dart',
-    'lib/src/elements/isolate/location.dart',
-    'lib/src/elements/isolate/run_state.dart',
-    'lib/src/elements/isolate/shared_summary.dart',
-    'lib/src/elements/isolate/summary.dart',
-    'lib/src/elements/isolate_reconnect.dart',
-    'lib/src/elements/isolate_ref.dart',
-    'lib/src/elements/isolate_view.dart',
-    'lib/src/elements/json_view.dart',
-    'lib/src/elements/library_ref.dart',
-    'lib/src/elements/library_view.dart',
-    'lib/src/elements/local_var_descriptors_ref.dart',
-    'lib/src/elements/logging.dart',
-    'lib/src/elements/logging_list.dart',
-    'lib/src/elements/megamorphiccache_ref.dart',
-    'lib/src/elements/megamorphiccache_view.dart',
-    'lib/src/elements/memory/dashboard.dart',
-    'lib/src/elements/memory/graph.dart',
-    'lib/src/elements/memory/profile.dart',
-    'lib/src/elements/metric/details.dart',
-    'lib/src/elements/metric/graph.dart',
-    'lib/src/elements/metrics.dart',
-    'lib/src/elements/native_memory_profiler.dart',
-    'lib/src/elements/nav/class_menu.dart',
-    'lib/src/elements/nav/isolate_menu.dart',
-    'lib/src/elements/nav/library_menu.dart',
-    'lib/src/elements/nav/menu_item.dart',
-    'lib/src/elements/nav/notify.dart',
-    'lib/src/elements/nav/notify_event.dart',
-    'lib/src/elements/nav/notify_exception.dart',
-    'lib/src/elements/nav/refresh.dart',
-    'lib/src/elements/nav/reload.dart',
-    'lib/src/elements/nav/top_menu.dart',
-    'lib/src/elements/nav/vm_menu.dart',
-    'lib/src/elements/object_common.dart',
-    'lib/src/elements/object_view.dart',
-    'lib/src/elements/objectpool_ref.dart',
-    'lib/src/elements/objectpool_view.dart',
-    'lib/src/elements/objectstore_view.dart',
-    'lib/src/elements/observatory_application.dart',
-    'lib/src/elements/pc_descriptors_ref.dart',
-    'lib/src/elements/persistent_handles.dart',
-    'lib/src/elements/ports.dart',
-    'lib/src/elements/retaining_path.dart',
-    'lib/src/elements/sample_buffer_control.dart',
-    'lib/src/elements/script_inset.dart',
-    'lib/src/elements/script_ref.dart',
-    'lib/src/elements/script_view.dart',
-    'lib/src/elements/sentinel_value.dart',
-    'lib/src/elements/sentinel_view.dart',
-    'lib/src/elements/singletargetcache_ref.dart',
-    'lib/src/elements/singletargetcache_view.dart',
-    'lib/src/elements/source_inset.dart',
-    'lib/src/elements/source_link.dart',
-    'lib/src/elements/stack_trace_tree_config.dart',
-    'lib/src/elements/strongly_reachable_instances.dart',
-    'lib/src/elements/subtypetestcache_ref.dart',
-    'lib/src/elements/subtypetestcache_view.dart',
-    'lib/src/elements/timeline_page.dart',
-    'lib/src/elements/token_stream_ref.dart',
-    'lib/src/elements/top_retaining_instances.dart',
-    'lib/src/elements/type_arguments_ref.dart',
-    'lib/src/elements/unknown_ref.dart',
-    'lib/src/elements/unlinkedcall_ref.dart',
-    'lib/src/elements/unlinkedcall_view.dart',
-    'lib/src/elements/view_footer.dart',
-    'lib/src/elements/vm_connect.dart',
-    'lib/src/elements/vm_connect_target.dart',
-    'lib/src/elements/vm_view.dart',
-    'lib/src/heap_snapshot/heap_snapshot.dart',
-    'lib/src/models/exceptions.dart',
-    'lib/src/models/objects/allocation_profile.dart',
-    'lib/src/models/objects/breakpoint.dart',
-    'lib/src/models/objects/class.dart',
-    'lib/src/models/objects/code.dart',
-    'lib/src/models/objects/context.dart',
-    'lib/src/models/objects/error.dart',
-    'lib/src/models/objects/event.dart',
-    'lib/src/models/objects/extension_data.dart',
-    'lib/src/models/objects/field.dart',
-    'lib/src/models/objects/flag.dart',
-    'lib/src/models/objects/frame.dart',
-    'lib/src/models/objects/function.dart',
-    'lib/src/models/objects/guarded.dart',
-    'lib/src/models/objects/heap_snapshot.dart',
-    'lib/src/models/objects/heap_space.dart',
-    'lib/src/models/objects/icdata.dart',
-    'lib/src/models/objects/inbound_references.dart',
-    'lib/src/models/objects/instance.dart',
-    'lib/src/models/objects/isolate.dart',
-    'lib/src/models/objects/library.dart',
-    'lib/src/models/objects/local_var_descriptors.dart',
-    'lib/src/models/objects/map_association.dart',
-    'lib/src/models/objects/megamorphiccache.dart',
-    'lib/src/models/objects/metric.dart',
-    'lib/src/models/objects/notification.dart',
-    'lib/src/models/objects/object.dart',
-    'lib/src/models/objects/objectpool.dart',
-    'lib/src/models/objects/objectstore.dart',
-    'lib/src/models/objects/pc_descriptors.dart',
-    'lib/src/models/objects/persistent_handles.dart',
-    'lib/src/models/objects/ports.dart',
-    'lib/src/models/objects/retaining_path.dart',
-    'lib/src/models/objects/sample_profile.dart',
-    'lib/src/models/objects/script.dart',
-    'lib/src/models/objects/sentinel.dart',
-    'lib/src/models/objects/service.dart',
-    'lib/src/models/objects/single_target_cache.dart',
-    'lib/src/models/objects/source_location.dart',
-    'lib/src/models/objects/subtype_test_cache.dart',
-    'lib/src/models/objects/target.dart',
-    'lib/src/models/objects/thread.dart',
-    'lib/src/models/objects/timeline_event.dart',
-    'lib/src/models/objects/token_stream.dart',
-    'lib/src/models/objects/type_arguments.dart',
-    'lib/src/models/objects/unknown.dart',
-    'lib/src/models/objects/unlinked_call.dart',
-    'lib/src/models/objects/vm.dart',
-    'lib/src/models/objects/zone.dart',
-    'lib/src/models/repositories/allocation_profile.dart',
-    'lib/src/models/repositories/breakpoint.dart',
-    'lib/src/models/repositories/class.dart',
-    'lib/src/models/repositories/context.dart',
-    'lib/src/models/repositories/editor.dart',
-    'lib/src/models/repositories/eval.dart',
-    'lib/src/models/repositories/event.dart',
-    'lib/src/models/repositories/field.dart',
-    'lib/src/models/repositories/flag.dart',
-    'lib/src/models/repositories/function.dart',
-    'lib/src/models/repositories/heap_snapshot.dart',
-    'lib/src/models/repositories/icdata.dart',
-    'lib/src/models/repositories/inbound_references.dart',
-    'lib/src/models/repositories/instance.dart',
-    'lib/src/models/repositories/isolate.dart',
-    'lib/src/models/repositories/library.dart',
-    'lib/src/models/repositories/megamorphiccache.dart',
-    'lib/src/models/repositories/metric.dart',
-    'lib/src/models/repositories/notification.dart',
-    'lib/src/models/repositories/object.dart',
-    'lib/src/models/repositories/objectpool.dart',
-    'lib/src/models/repositories/objectstore.dart',
-    'lib/src/models/repositories/persistent_handles.dart',
-    'lib/src/models/repositories/ports.dart',
-    'lib/src/models/repositories/reachable_size.dart',
-    'lib/src/models/repositories/retained_size.dart',
-    'lib/src/models/repositories/retaining_path.dart',
-    'lib/src/models/repositories/sample_profile.dart',
-    'lib/src/models/repositories/script.dart',
-    'lib/src/models/repositories/single_target_cache.dart',
-    'lib/src/models/repositories/strongly_reachable_instances.dart',
-    'lib/src/models/repositories/subtype_test_cache.dart',
-    'lib/src/models/repositories/target.dart',
-    'lib/src/models/repositories/top_retaining_instances.dart',
-    'lib/src/models/repositories/type_arguments.dart',
-    'lib/src/models/repositories/unlinked_call.dart',
-    'lib/src/repositories/allocation_profile.dart',
-    'lib/src/repositories/breakpoint.dart',
-    'lib/src/repositories/class.dart',
-    'lib/src/repositories/context.dart',
-    'lib/src/repositories/editor.dart',
-    'lib/src/repositories/eval.dart',
-    'lib/src/repositories/event.dart',
-    'lib/src/repositories/field.dart',
-    'lib/src/repositories/flag.dart',
-    'lib/src/repositories/function.dart',
-    'lib/src/repositories/heap_snapshot.dart',
-    'lib/src/repositories/icdata.dart',
-    'lib/src/repositories/inbound_references.dart',
-    'lib/src/repositories/instance.dart',
-    'lib/src/repositories/isolate.dart',
-    'lib/src/repositories/library.dart',
-    'lib/src/repositories/megamorphiccache.dart',
-    'lib/src/repositories/metric.dart',
-    'lib/src/repositories/notification.dart',
-    'lib/src/repositories/object.dart',
-    'lib/src/repositories/objectpool.dart',
-    'lib/src/repositories/objectstore.dart',
-    'lib/src/repositories/persistent_handles.dart',
-    'lib/src/repositories/ports.dart',
-    'lib/src/repositories/reachable_size.dart',
-    'lib/src/repositories/retained_size.dart',
-    'lib/src/repositories/retaining_path.dart',
-    'lib/src/repositories/sample_profile.dart',
-    'lib/src/repositories/script.dart',
-    'lib/src/repositories/settings.dart',
-    'lib/src/repositories/single_target_cache.dart',
-    'lib/src/repositories/strongly_reachable_instances.dart',
-    'lib/src/repositories/subtype_test_cache.dart',
-    'lib/src/repositories/target.dart',
-    'lib/src/repositories/top_retaining_instances.dart',
-    'lib/src/repositories/type_arguments.dart',
-    'lib/src/repositories/unlinked_call.dart',
-    'lib/src/service/object.dart',
-    'lib/tracer.dart',
-    'lib/utils.dart',
-    'web/favicon.ico',
-    'web/index.html',
-    'web/main.dart',
-    'web/third_party/trace_viewer_full.html',
-    'web/timeline.html',
-    'web/timeline.js',
-    'web/timeline_message_handler.js',
-  ]
-}
diff --git a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.html b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/class_ref/element_test.html b/runtime/observatory/tests/observatory_ui/class_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/class_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/class_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/class_tree/element_test.html b/runtime/observatory/tests/observatory_ui/class_tree/element_test.html
index 06d42b3..8996ea9 100644
--- a/runtime/observatory/tests/observatory_ui/class_tree/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/class_tree/element_test.html
@@ -15,7 +15,7 @@
        padding-right: 10%;
      }
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/code_ref/element_test.html b/runtime/observatory/tests/observatory_ui/code_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/code_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/code_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/context_ref/element_test.html b/runtime/observatory/tests/observatory_ui/context_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/context_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/context_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/context_view/element_test.html b/runtime/observatory/tests/observatory_ui/context_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/context_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/context_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/cpu_profile/element_test.html b/runtime/observatory/tests/observatory_ui/cpu_profile/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/cpu_profile/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/cpu_profile/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/cpu_profile/virtual-tree/element_test.html b/runtime/observatory/tests/observatory_ui/cpu_profile/virtual-tree/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/cpu_profile/virtual-tree/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/cpu_profile/virtual-tree/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/cpu_profile_table/element_test.html b/runtime/observatory/tests/observatory_ui/cpu_profile_table/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/cpu_profile_table/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/cpu_profile_table/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/curly_block/element_test.html b/runtime/observatory/tests/observatory_ui/curly_block/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/curly_block/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/curly_block/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/error_ref/element_test.html b/runtime/observatory/tests/observatory_ui/error_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/error_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/error_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/error_view/element_test.html b/runtime/observatory/tests/observatory_ui/error_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/error_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/error_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/field_ref/element_test.html b/runtime/observatory/tests/observatory_ui/field_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/field_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/field_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/flag_list/element_test.html b/runtime/observatory/tests/observatory_ui/flag_list/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/flag_list/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/flag_list/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/function_ref/element_test.html b/runtime/observatory/tests/observatory_ui/function_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/function_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/function_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/general_error/element_test.html b/runtime/observatory/tests/observatory_ui/general_error/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/general_error/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/general_error/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.html b/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/icdata_ref/element_test.html b/runtime/observatory/tests/observatory_ui/icdata_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/icdata_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/icdata_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/icdata_view/element_test.html b/runtime/observatory/tests/observatory_ui/icdata_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/icdata_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/icdata_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/inbound_references/element_test.html b/runtime/observatory/tests/observatory_ui/inbound_references/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/inbound_references/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/inbound_references/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/instance_ref/element_test.html b/runtime/observatory/tests/observatory_ui/instance_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/instance_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/instance_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/isolate/counter_chart/element_test.html b/runtime/observatory/tests/observatory_ui/isolate/counter_chart/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/isolate/counter_chart/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/isolate/counter_chart/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/isolate/isolate-shared-summary/element_test.html b/runtime/observatory/tests/observatory_ui/isolate/isolate-shared-summary/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/isolate/isolate-shared-summary/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/isolate/isolate-shared-summary/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/isolate_reconnect/element_test.html b/runtime/observatory/tests/observatory_ui/isolate_reconnect/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/isolate_reconnect/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/isolate_reconnect/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.html b/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/library_ref/element_test.html b/runtime/observatory/tests/observatory_ui/library_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/library_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/library_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/local_var_descriptor_ref/element_test.html b/runtime/observatory/tests/observatory_ui/local_var_descriptor_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/local_var_descriptor_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/local_var_descriptor_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/megamorphiccache_ref/element_test.html b/runtime/observatory/tests/observatory_ui/megamorphiccache_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/megamorphiccache_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/megamorphiccache_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/megamorphiccache_view/element_test.html b/runtime/observatory/tests/observatory_ui/megamorphiccache_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/megamorphiccache_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/megamorphiccache_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart
index 1b9db55..c19ba56 100644
--- a/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart
@@ -17,8 +17,10 @@
   final String targetCPU;
   final String hostCPU;
   final String version;
+  final String embedder;
   final int pid;
   final int maxRSS;
+  final int currentRSS;
   final DateTime startTime;
   final Iterable<M.IsolateRef> isolates;
   final int nativeZoneMemoryUsage = 0;
@@ -29,6 +31,10 @@
     return null;
   }
 
+  Future enableProfiler() {
+    return null;
+  }
+
   const VMMock(
       {this.name: 'vm-name',
       this.displayName: 'vm-display-name',
@@ -36,8 +42,10 @@
       this.targetCPU,
       this.hostCPU,
       this.version,
+      this.embedder,
       this.pid: 0,
       this.maxRSS: 0,
+      this.currentRSS: 0,
       this.startTime,
       this.isolates: const []});
 }
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
index dd73082c..13c521f 100644
--- a/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
@@ -29,7 +29,11 @@
 typedef Stream<
     M
         .SampleProfileLoadingProgressEvent> ClassSampleProfileRepositoryMockCallback(
-    M.Isolate isolate, M.ClassRef cls, M.SampleProfileTag tag, bool clear);
+    M.Isolate isolate,
+    M.ClassRef cls,
+    M.SampleProfileTag tag,
+    bool clear,
+    bool forceFetch);
 typedef Future ClassSampleProfileRepositoryMockToggleCallback(
     M.Isolate isolate, M.ClassRef cls);
 
@@ -41,9 +45,9 @@
 
   Stream<M.SampleProfileLoadingProgressEvent> get(
       M.Isolate isolate, M.ClassRef cls, M.SampleProfileTag tag,
-      {bool clear: false}) {
+      {bool clear: false, bool forceFetch: false}) {
     if (_get != null) {
-      return _get(isolate, cls, tag, clear);
+      return _get(isolate, cls, tag, clear, forceFetch);
     }
     return null;
   }
diff --git a/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.html b/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.html b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.html b/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.html b/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify/element_test.html b/runtime/observatory/tests/observatory_ui/nav/notify/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/notify/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.html b/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.html b/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.html b/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.html b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/top_menu/element_test.html b/runtime/observatory/tests/observatory_ui/nav/top_menu/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/top_menu/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/top_menu/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.html b/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/object_common/element_test.html b/runtime/observatory/tests/observatory_ui/object_common/element_test.html
index 0b02fd2..4b01e65 100644
--- a/runtime/observatory/tests/observatory_ui/object_common/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/object_common/element_test.html
@@ -1,3 +1,4 @@
+
 <!DOCTYPE html>
 <html>
 <head>
@@ -9,7 +10,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/objectpool_ref/element_test.html b/runtime/observatory/tests/observatory_ui/objectpool_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/objectpool_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/objectpool_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/objectpool_view/element_test.html b/runtime/observatory/tests/observatory_ui/objectpool_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/objectpool_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/objectpool_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/objectstore_view/element_test.html b/runtime/observatory/tests/observatory_ui/objectstore_view/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/objectstore_view/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/objectstore_view/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/pc_descriptors_ref/element_test.html b/runtime/observatory/tests/observatory_ui/pc_descriptors_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/pc_descriptors_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/pc_descriptors_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/persistent_handles_page/element_test.html b/runtime/observatory/tests/observatory_ui/persistent_handles_page/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/persistent_handles_page/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/persistent_handles_page/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/ports/element_test.html b/runtime/observatory/tests/observatory_ui/ports/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/ports/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/ports/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/retaining_path/element_test.html b/runtime/observatory/tests/observatory_ui/retaining_path/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/retaining_path/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/retaining_path/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.dart b/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.dart
index 2cfebce..226ee35 100644
--- a/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.dart
@@ -12,6 +12,8 @@
 main() {
   SampleBufferControlElement.tag.ensureRegistration();
 
+  const vm = const VMMock();
+
   group('instantiation', () {
     SampleProfileLoadingProgressMock progress;
     StreamController<SampleProfileLoadingProgressEventMock> events;
@@ -20,7 +22,7 @@
       events = new StreamController<SampleProfileLoadingProgressEventMock>();
     });
     test('no additional parameters', () {
-      final e = new SampleBufferControlElement(progress, events.stream);
+      final e = new SampleBufferControlElement(vm, progress, events.stream);
       expect(e, isNotNull, reason: 'element correctly created');
       expect(e.progress, equals(progress));
       expect(e.selectedTag, equals(M.SampleProfileTag.none));
@@ -28,7 +30,7 @@
     });
     test('selected tag', () {
       const tag = M.SampleProfileTag.userOnly;
-      final e = new SampleBufferControlElement(progress, events.stream,
+      final e = new SampleBufferControlElement(vm, progress, events.stream,
           selectedTag: tag);
       expect(e, isNotNull, reason: 'element correctly created');
       expect(e.progress, equals(progress));
@@ -36,7 +38,7 @@
       expect(e.showTag, isTrue);
     });
     test('show tag (true)', () {
-      final e = new SampleBufferControlElement(progress, events.stream,
+      final e = new SampleBufferControlElement(vm, progress, events.stream,
           showTag: true);
       expect(e, isNotNull, reason: 'element correctly created');
       expect(e.progress, equals(progress));
@@ -44,7 +46,7 @@
       expect(e.showTag, isTrue);
     });
     test('show tag (false)', () {
-      final e = new SampleBufferControlElement(progress, events.stream,
+      final e = new SampleBufferControlElement(vm, progress, events.stream,
           showTag: false);
       expect(e, isNotNull, reason: 'element correctly created');
       expect(e.progress, equals(progress));
@@ -60,7 +62,7 @@
       events = new StreamController<SampleProfileLoadingProgressEventMock>();
     });
     test('created after attachment', () async {
-      final e = new SampleBufferControlElement(progress, events.stream);
+      final e = new SampleBufferControlElement(vm, progress, events.stream);
       document.body.append(e);
       await e.onRendered.first;
       expect(e.children.length, isNonZero, reason: 'has elements');
@@ -69,7 +71,7 @@
       expect(e.children.length, isZero, reason: 'is empty');
     });
     test('listen for status changes', () async {
-      final e = new SampleBufferControlElement(progress, events.stream);
+      final e = new SampleBufferControlElement(vm, progress, events.stream);
       expect(events.hasListener, isFalse);
       document.body.append(e);
       await e.onRendered.first;
@@ -81,7 +83,7 @@
       await e.onRendered.first;
     });
     test('follow updates changes', () async {
-      final e = new SampleBufferControlElement(progress, events.stream);
+      final e = new SampleBufferControlElement(vm, progress, events.stream);
       document.body.append(e);
       await e.onRendered.first;
       expect(e.querySelector('select'), isNull);
@@ -106,7 +108,7 @@
       await e.onRendered.first;
     });
     test('follow updates changes (no tag)', () async {
-      final e = new SampleBufferControlElement(progress, events.stream,
+      final e = new SampleBufferControlElement(vm, progress, events.stream,
           showTag: false);
       document.body.append(e);
       await e.onRendered.first;
@@ -139,7 +141,7 @@
       events = new StreamController<SampleProfileLoadingProgressEventMock>();
     });
     test('onModeChange', () async {
-      final e = new SampleBufferControlElement(progress, events.stream);
+      final e = new SampleBufferControlElement(vm, progress, events.stream);
       document.body.append(e);
       await e.onRendered.first;
       events.add(new SampleProfileLoadingProgressEventMock(
diff --git a/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.html b/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/sample_buffer_control/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/script_ref/element_test.html b/runtime/observatory/tests/observatory_ui/script_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/script_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/script_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/sentinel_value/element_test.html b/runtime/observatory/tests/observatory_ui/sentinel_value/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/sentinel_value/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/sentinel_value/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/source_link/element_test.html b/runtime/observatory/tests/observatory_ui/source_link/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/source_link/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/source_link/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/stack_trace_tree_config/element_test.html b/runtime/observatory/tests/observatory_ui/stack_trace_tree_config/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/stack_trace_tree_config/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/stack_trace_tree_config/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html b/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/unknown_ref/element_test.html b/runtime/observatory/tests/observatory_ui/unknown_ref/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/unknown_ref/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/unknown_ref/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/view_footer/element_test.html b/runtime/observatory/tests/observatory_ui/view_footer/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/view_footer/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/view_footer/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/virtual_tree/element_test.html b/runtime/observatory/tests/observatory_ui/virtual_tree/element_test.html
index ebc8b3e..75fd7c6 100644
--- a/runtime/observatory/tests/observatory_ui/virtual_tree/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/virtual_tree/element_test.html
@@ -19,7 +19,7 @@
        height: 20px;
      }
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <div class="test_container">
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.html b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.html b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.html
index 0b02fd2..8195849 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.html
+++ b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.html
@@ -9,7 +9,7 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents-lite.min.js"></script>
+  <script src="/root_dart/runtime/observatory/packages/web_components/webcomponents-lite.min.js"></script>
 </head>
 <body>
   <script type="text/javascript"
diff --git a/runtime/observatory/tests/service/developer_extension_test.dart b/runtime/observatory/tests/service/developer_extension_test.dart
index 3ec6a6c..a05c3dc 100644
--- a/runtime/observatory/tests/service/developer_extension_test.dart
+++ b/runtime/observatory/tests/service/developer_extension_test.dart
@@ -7,7 +7,7 @@
 import 'dart:convert';
 import 'dart:developer';
 import 'package:observatory/service_io.dart';
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:unittest/unittest.dart';
 import 'service_test_common.dart';
 import 'test_helper.dart';
diff --git a/runtime/observatory/tests/service/get_allocation_samples_test.dart b/runtime/observatory/tests/service/get_allocation_samples_test.dart
index ae773eb..239fab5 100644
--- a/runtime/observatory/tests/service/get_allocation_samples_test.dart
+++ b/runtime/observatory/tests/service/get_allocation_samples_test.dart
@@ -6,7 +6,7 @@
 import 'dart:developer';
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/service_io.dart';
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:unittest/unittest.dart';
 import 'service_test_common.dart';
 import 'test_helper.dart';
@@ -61,7 +61,7 @@
     await fooClass.setTraceAllocations(false);
     await fooClass.reload();
     expect(fooClass.traceAllocations, isFalse);
-    CpuProfile cpuProfile = new CpuProfile();
+    SampleProfile cpuProfile = new SampleProfile();
     await cpuProfile.load(isolate, profileResponse);
     cpuProfile.buildCodeCallerAndCallees();
     cpuProfile.buildFunctionCallerAndCallees();
diff --git a/runtime/observatory/tests/service/get_native_allocation_samples_test.dart b/runtime/observatory/tests/service/get_native_allocation_samples_test.dart
index c09d693..10bb7f2 100644
--- a/runtime/observatory/tests/service/get_native_allocation_samples_test.dart
+++ b/runtime/observatory/tests/service/get_native_allocation_samples_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--error_on_bad_type --error_on_bad_override
 
-import 'package:observatory/cpu_profile.dart';
+import 'package:observatory/sample_profile.dart';
 import 'package:observatory/models.dart' as M;
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
@@ -57,7 +57,7 @@
   (VM vm) async {
     var response =
         await vm.invokeRpc('_getNativeAllocationSamples', {'tags': 'None'});
-    CpuProfile cpuProfile = new CpuProfile();
+    SampleProfile cpuProfile = new SampleProfile();
     await cpuProfile.load(vm, response);
     var codeTree = cpuProfile.loadCodeTree(M.ProfileTreeDirection.inclusive);
     var functionTree =
@@ -69,7 +69,7 @@
   (VM vm) async {
     var response =
         await vm.invokeRpc('_getNativeAllocationSamples', {'tags': 'None'});
-    CpuProfile cpuProfile = new CpuProfile();
+    SampleProfile cpuProfile = new SampleProfile();
     await cpuProfile.load(vm, response);
     var codeTreeExclusive =
         cpuProfile.loadCodeTree(M.ProfileTreeDirection.exclusive);
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 81baf56..29fbd33 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -91,8 +91,6 @@
 evaluate_activation_in_method_class_test: CompileTimeError # Issue 24478
 
 [ $arch == simdbc || $arch == simdbc64 ]
-get_allocation_samples_test: RuntimeError # Profiling unimplemented.
-get_cpu_profile_timeline_rpc_test: RuntimeError # Profiling unimplemented.
 implicit_getter_setter_test: RuntimeError # Field guards unimplemented.
 async_single_step_exception_test: RuntimeError # Issue 29218
 
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 809bfa4..51cce59 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -134,6 +134,7 @@
     if (pause_on_unhandled_exceptions) {
       fullArgs.add('--pause-isolates-on-unhandled-exceptions');
     }
+    fullArgs.add('--profiler');
     if (extraArgs != null) {
       fullArgs.addAll(extraArgs);
     }
@@ -170,6 +171,7 @@
     if (pause_on_unhandled_exceptions) {
       dartFlags.add('--pause_isolates_on_unhandled_exceptions');
     }
+    dartFlags.add('--profiler');
     // Override mirrors.
     dartFlags.add('--enable_mirrors=true');
     if (extraArgs != null) {
diff --git a/runtime/observatory/tests/service/vm_test.dart b/runtime/observatory/tests/service/vm_test.dart
index f39465e..0f3c7d3 100644
--- a/runtime/observatory/tests/service/vm_test.dart
+++ b/runtime/observatory/tests/service/vm_test.dart
@@ -12,6 +12,11 @@
     VM vm = isolate.owner;
     expect(vm.targetCPU, isNotNull);
     expect(vm.architectureBits == 32 || vm.architectureBits == 64, isTrue);
+    expect(vm.embedder, equals("Dart VM"));
+    expect(vm.currentRSS, isNotNull);
+    expect(vm.currentRSS, greaterThan(0));
+    expect(vm.maxRSS, isNotNull);
+    expect(vm.maxRSS, greaterThan(0));
   },
 ];
 
diff --git a/runtime/observatory/update_sources.py b/runtime/observatory/update_sources.py
index 92752e9..cc6eb16 100755
--- a/runtime/observatory/update_sources.py
+++ b/runtime/observatory/update_sources.py
@@ -11,33 +11,35 @@
 from datetime import date
 
 def getDir(rootdir, target):
-    sources = []
-    for root, subdirs, files in os.walk(rootdir):
-        subdirs.sort()
-        files.sort()
-        for f in files:
-            sources.append(root + '/' + f)
-    return sources
+  sources = []
+  for root, subdirs, files in os.walk(rootdir):
+    subdirs.sort()
+    files.sort()
+    for f in files:
+      sources.append(root + '/' + f)
+  return sources
+
+HEADER = """# 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.
+
+# DO NOT EDIT. This file is generated by update_sources.py in this directory.
+
+# This file contains all dart, css, and html sources for Observatory.
+"""
 
 def main():
-    target = open('observatory_sources.gypi', 'w')
-    target.write('# Copyright (c) ')
-    target.write(str(date.today().year))
-    target.write(', the Dart project authors.  Please see the AUTHORS file\n');
-    target.write('# for details. All rights reserved. Use of this source code is governed by a\n');
-    target.write('# BSD-style license that can be found in the LICENSE file.\n');
-    target.write('\n');
-    target.write('# This file contains all dart, css, and html sources for Observatory.\n');
-    target.write('{\n  \'sources\': [\n')
+  with open('observatory_sources.gni', 'w') as target:
+    target.write(HEADER)
+    target.write('observatory_sources = [\n')
     sources = []
     for rootdir in ['lib', 'web']:
-        sources.extend(getDir(rootdir, target))
+      sources.extend(getDir(rootdir, target))
     sources.sort()
     for s in sources:
-        if (s[-9:] != 'README.md'):
-            target.write('    \'' + s + '\',\n')
-    target.write('  ]\n}\n')
-    target.close()
+      if (s[-9:] != 'README.md'):
+        target.write('  "' + s + '",\n')
+    target.write(']\n')
 
 if __name__ == "__main__":
    main()
diff --git a/runtime/platform/BUILD.gn b/runtime/platform/BUILD.gn
new file mode 100644
index 0000000..901b0ad
--- /dev/null
+++ b/runtime/platform/BUILD.gn
@@ -0,0 +1,34 @@
+# 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("platform_sources.gni")
+
+template("build_libdart_platform") {
+  extra_configs = []
+  if (defined(invoker.extra_configs)) {
+    extra_configs += invoker.extra_configs
+  }
+  static_library(target_name) {
+    configs += [ "..:dart_config" ] + extra_configs
+    if (is_fuchsia) {
+      configs -= [ "//build/config:symbol_visibility_hidden" ]
+      deps = [
+        "//apps/tracing/lib/trace",
+      ]
+    }
+    public_configs = [ "../vm:libdart_vm_config" ]
+
+    sources = platform_sources
+
+    include_dirs = [ ".." ]
+  }
+}
+
+build_libdart_platform("libdart_platform") {
+  extra_configs = [ "..:dart_maybe_product_config" ]
+}
+
+build_libdart_platform("libdart_platform_product") {
+  extra_configs = [ "..:dart_product_config" ]
+}
diff --git a/runtime/platform/platform_headers.gypi b/runtime/platform/platform_headers.gypi
deleted file mode 100644
index 2d47337..0000000
--- a/runtime/platform/platform_headers.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains headers shared between the vm and bin components.
-{
-  'sources': [
-    'address_sanitizer.h',
-    'allocation.h',
-    'assert.h',
-    'c99_support_win.h',
-    'floating_point.h',
-    'floating_point_win.h',
-    'globals.h',
-    'growable_array.h',
-    'hashmap.h',
-    'inttypes_support_win.h',
-    'memory_sanitizer.h',
-    'text_buffer.h',
-    'utils.h',
-  ],
-}
diff --git a/runtime/platform/platform_sources.gni b/runtime/platform/platform_sources.gni
new file mode 100644
index 0000000..b17d967
--- /dev/null
+++ b/runtime/platform/platform_sources.gni
@@ -0,0 +1,27 @@
+# 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.
+
+# This file contains headers and sources shared between the vm and bin
+# components.
+platform_sources = [
+  "address_sanitizer.h",
+  "allocation.h",
+  "assert.cc",
+  "assert.h",
+  "c99_support_win.h",
+  "floating_point.h",
+  "floating_point_win.cc",
+  "floating_point_win.h",
+  "globals.h",
+  "growable_array.h",
+  "hashmap.cc",
+  "hashmap.h",
+  "inttypes_support_win.h",
+  "memory_sanitizer.h",
+  "signal_blocker.h",
+  "text_buffer.cc",
+  "text_buffer.h",
+  "utils.cc",
+  "utils.h",
+]
diff --git a/runtime/platform/platform_sources.gypi b/runtime/platform/platform_sources.gypi
deleted file mode 100644
index 7327ad3..0000000
--- a/runtime/platform/platform_sources.gypi
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains sources shared between the vm and bin components.
-{
-  'sources': [
-    'assert.cc',
-    'hashmap.cc',
-    'floating_point_win.cc',
-    'signal_blocker.h',
-    'text_buffer.cc',
-    'utils.cc',
-  ],
-}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index a82df2f..689ec8a 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -200,7 +200,7 @@
 dart/data_uri_spawn_test: SkipByDesign # Isolate.spawnUri
 
 [ $runtime == vm && $mode == product ]
-cc/IsolateSetCheckedMode: Fail,OK  # Checked mode disabled in product mode.
+cc/DartAPI_IsolateSetCheckedMode: Fail,OK  # Checked mode disabled in product mode.
 
 [ $arch == simdbc  || $arch == simdbc64 ]
 # TODO(vegorov) These tests don't seem to work if FLAG_interpret_irregexp
@@ -249,38 +249,64 @@
 dart/regress29620_test: RuntimeError
 dart/spawn_shutdown_test: SkipSlow
 
+[ ($compiler != dartk) ]
+cc/IsolateReload_KernelIncrementalCompile: Skip
+cc/IsolateReload_KernelIncrementalCompileAppAndLib: Skip
+cc/IsolateReload_KernelIncrementalCompileGenerics: Skip
+
 [ ($compiler == dartk) && ($runtime == vm) ]
 cc/CanonicalizationInScriptSnapshots: Fail
 cc/Class_ComputeEndTokenPos: Crash
-cc/CurrentStackTraceInfo: Fail
-cc/Dart_LoadLibraryPatch_Error1: Fail
-cc/Dart_LoadLibraryPatch_Error2: Fail
-cc/Dart_LoadLibraryPatch_Error3: Fail
-cc/Dart_PropagateError: Fail
-cc/Debug_EvaluateExpr: Fail
-cc/Debug_GetClosureInfo: Fail
-cc/Debug_InterruptIsolate: SkipSlow
-cc/Debug_IsolateID: Fail
-cc/Debug_ScriptGetTokenInfo_Basic: Fail
-cc/Debug_ScriptGetTokenInfo_MultiLineInterpolation: Fail
+cc/DartAPI_CurrentStackTraceInfo: Fail
+cc/DartAPI_FieldAccess: Crash
+cc/DartAPI_ImplicitNativeFieldAccess: Crash
+cc/DartAPI_ImportLibrary2: Crash
+cc/DartAPI_ImportLibrary3: Crash
+cc/DartAPI_ImportLibrary4: Crash
+cc/DartAPI_ImportLibrary5: Crash
+cc/DartAPI_ImportLibraryWithPrefix: Crash
+cc/DartAPI_InjectNativeFields1: Skip
+cc/DartAPI_InjectNativeFields3: Crash
+cc/DartAPI_InjectNativeFields4: Crash
+cc/DartAPI_InjectNativeFieldsSuperClass: Crash
+cc/DartAPI_Invoke_CrossLibrary:  Crash
+cc/DartAPI_InvokeNoSuchMethod: Fail
+cc/DartAPI_IsolateShutdownRunDartCode: Skip # Flaky
+cc/DartAPI_LazyLoadDeoptimizes: Fail
+cc/DartAPI_LibraryGetClassNames: Crash
+cc/DartAPI_LibraryId: Crash
+cc/DartAPI_LibraryImportLibrary: Crash
+cc/DartAPI_LibraryName: Crash
+cc/DartAPI_LibraryUrl: Crash
+cc/DartAPI_LoadLibrary: Crash
+cc/DartAPI_LoadLibrary_CompileError: Crash
+cc/DartAPI_LoadLibraryPatch_Error1: Fail
+cc/DartAPI_LoadLibraryPatch_Error2: Fail
+cc/DartAPI_LoadLibraryPatch_Error3: Fail
+cc/DartAPI_LoadPatch: Crash
+cc/DartAPI_LoadPatchSignatureMismatch: Crash
+cc/DartAPI_LoadSource: Crash
+cc/DartAPI_LoadSource_LateLoad: Crash
+cc/DartAPI_LookupLibrary: Crash
+cc/DartAPI_NativeFieldAccess: Fail
+cc/DartAPI_NegativeNativeFieldInIsolateMessage: Crash
+cc/DartAPI_New: Crash
+cc/DartAPI_ParsePatchLibrary: Crash
+cc/DartAPI_PropagateError: Fail
+cc/DartAPI_StackOverflowStackTraceInfo: Skip
+cc/DartAPI_TestNativeFieldsAccess: Crash
+cc/DartAPI_TypeGetParameterizedTypes: Crash
+cc/DebuggerAPI_BreakpointStubPatching: Fail
+cc/DebuggerAPI_EvaluateExpr: Fail
+cc/DebuggerAPI_GetClosureInfo: Fail
+cc/DebuggerAPI_InterruptIsolate: SkipSlow
+cc/DebuggerAPI_IsolateID: Fail
+cc/DebuggerAPI_ScriptGetTokenInfo_Basic: Fail
+cc/DebuggerAPI_ScriptGetTokenInfo_MultiLineInterpolation: Fail
 cc/Debugger_PrintBreakpointsToJSONArray: Fail
 cc/Debugger_Rewind_Optimized: SkipSlow
 cc/Debugger_SetBreakpointInPartOfLibrary: Crash
-cc/ErrorHandleBasics: Fail
-cc/FieldAccess: Crash
-cc/FullSnapshot1: Crash
-cc/FullSnapshot: Crash
 cc/FunctionSourceFingerprint: Crash
-cc/GetFunctionNames: Crash
-cc/ImplicitNativeFieldAccess: Crash
-cc/ImportLibrary2: Crash
-cc/ImportLibrary3: Crash
-cc/ImportLibrary4: Crash
-cc/ImportLibrary5: Crash
-cc/ImportLibraryWithPrefix: Crash
-cc/InjectNativeFieldsSuperClass: Crash
-cc/InvokeNoSuchMethod: Fail
-cc/Invoke_CrossLibrary:  Crash
 cc/IsolateReload_BadClass: Fail
 cc/IsolateReload_ClassFieldAdded: Crash
 cc/IsolateReload_ClassFieldAdded2: Crash
@@ -302,6 +328,7 @@
 cc/IsolateReload_ExportedLibModified: Crash
 cc/IsolateReload_ImportedLibModified: Crash
 cc/IsolateReload_ImportedMixinFunction: Crash
+cc/IsolateReload_KernelIncrementalCompileGenerics: Crash # Issue 30322
 cc/IsolateReload_LibraryHide: Crash
 cc/IsolateReload_LibraryLookup: Fail
 cc/IsolateReload_LibraryShow: Crash
@@ -331,23 +358,6 @@
 cc/IsolateReload_TypeIdentityGeneric: Fail
 cc/IsolateReload_TypeIdentityParameter: Fail
 cc/IsolateReload_TypedefToNotTypedef: Fail
-cc/LazyLoadDeoptimizes: Fail
-cc/LibraryGetClassNames: Crash
-cc/LibraryId: Crash
-cc/LibraryImportLibrary: Crash
-cc/LibraryName: Crash
-cc/LibraryUrl: Crash
-cc/LoadPatch: Crash
-cc/LoadPatchSignatureMismatch: Crash
-cc/LoadSource: Crash
-cc/LoadLibrary: Crash
-cc/LoadLibrary_CompileError: Crash
-cc/LoadSource_LateLoad: Crash
-cc/LookupLibrary: Crash
-cc/NativeFieldAccess: Fail
-cc/NegativeNativeFieldInIsolateMessage: Crash
-cc/New: Crash
-cc/ParsePatchLibrary: Crash
 cc/Parser_AllocateVariables_CaptureLoopVar: Fail
 cc/Parser_AllocateVariables_CapturedVar: Fail
 cc/Parser_AllocateVariables_Issue7681: Fail
@@ -390,10 +400,7 @@
 cc/SourceReport_Coverage_UnusedClass_NoForceCompile: Fail
 cc/SourceReport_MultipleReports: Fail
 cc/SourceReport_PossibleBreakpoints_Simple: Fail
-cc/StackOverflowStackTraceInfo: Skip
 cc/StackTraceFormat: Fail
-cc/TestNativeFieldsAccess: Crash
-cc/TypeGetParameterizedTypes: Crash
 cc/UseDartApi: Fail
 dart/data_uri_import_test/base64: CompileTimeError
 dart/data_uri_import_test/nocharset: CompileTimeError
@@ -404,22 +411,17 @@
 dart/redirection_type_shuffling_test/00: Crash
 dart/redirection_type_shuffling_test/none: Crash
 dart/spawn_shutdown_test: SkipSlow
-cc/InjectNativeFields1: Skip
-cc/InjectNativeFields3: Crash
-cc/InjectNativeFields4: Crash
-cc/IsolateShutdownRunDartCode: Skip # Flaky
 
 [ ($compiler == dartk) && ($runtime == vm) && ($mode == release) ]
-cc/Debug_BreakpointStubPatching: Fail
 cc/InjectNativeFields1: Fail
 cc/InjectNativeFields3: Fail
 cc/Service_TokenStream: Fail
 
 [ ($compiler == dartk) && ($runtime == vm) && ($mode == debug) ]
-cc/Debug_BreakpointStubPatching: Fail
 cc/InjectNativeFields1: Crash
 cc/InjectNativeFields3: Crash
 cc/Service_TokenStream: Crash
+cc/IsolateReload_KernelIncrementalCompileAppAndLib: Crash # Issue 30420
 
 [ ($compiler == dartk) && ($runtime == vm) && ($system == macos) ]
 cc/IsolateReload_DanglingGetter_Class: Crash
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn
index f836909..5baea6e 100644
--- a/runtime/vm/BUILD.gn
+++ b/runtime/vm/BUILD.gn
@@ -4,9 +4,34 @@
 
 import("../../build/executable_suffix.gni")
 import("../../build/prebuilt_dart_sdk.gni")
+import("../../sdk/lib/async/async_sources.gni")
+import("../../sdk/lib/collection/collection_sources.gni")
+import("../../sdk/lib/convert/convert_sources.gni")
+import("../../sdk/lib/core/core_sources.gni")
+import("../../sdk/lib/developer/developer_sources.gni")
+import("../../sdk/lib/internal/internal_sources.gni")
+import("../../sdk/lib/isolate/isolate_sources.gni")
+import("../../sdk/lib/math/math_sources.gni")
+import("../../sdk/lib/mirrors/mirrors_sources.gni")
+import("../../sdk/lib/profiler/profiler_sources.gni")
+import("../../sdk/lib/typed_data/typed_data_sources.gni")
+import("../../sdk/lib/vmservice/vmservice_sources.gni")
 import("../../utils/generate_patch_sdk.gni")
-import("gypi_contents.gni")
+import("../bin/io_sources.gni")
+import("../lib/async_sources.gni")
+import("../lib/collection_sources.gni")
+import("../lib/convert_sources.gni")
+import("../lib/core_sources.gni")
+import("../lib/developer_sources.gni")
+import("../lib/internal_sources.gni")
+import("../lib/isolate_sources.gni")
+import("../lib/math_sources.gni")
+import("../lib/mirrors_sources.gni")
+import("../lib/profiler_sources.gni")
+import("../lib/typed_data_sources.gni")
+import("../lib/vmservice_sources.gni")
 import("../runtime_args.gni")
+import("vm_sources.gni")
 
 config("libdart_vm_config") {
   if (is_fuchsia) {
@@ -28,37 +53,6 @@
   }
 }
 
-template("build_libdart_platform") {
-  extra_configs = []
-  if (defined(invoker.extra_configs)) {
-    extra_configs += invoker.extra_configs
-  }
-  static_library(target_name) {
-    configs += [ "..:dart_config" ] + extra_configs
-    if (is_fuchsia) {
-      configs -= [ "//build/config:symbol_visibility_hidden" ]
-      deps = [
-        "//apps/tracing/lib/trace",
-      ]
-    }
-    public_configs = [ ":libdart_vm_config" ]
-
-    sources = rebase_path(processed_gypis.platform_sources, ".", "../platform")
-
-    include_dirs = [ ".." ]
-  }
-}
-
-build_libdart_platform("libdart_platform") {
-  extra_configs = [ "..:dart_maybe_product_config" ]
-}
-
-build_libdart_platform("libdart_platform_product") {
-  extra_configs = [ "..:dart_product_config" ]
-}
-
-vm_sources_list = processed_gypis.vm_sources
-
 template("build_libdart_vm") {
   extra_configs = []
   if (defined(invoker.extra_configs)) {
@@ -77,7 +71,7 @@
                                     "*_test.cc",
                                     "*_test.h",
                                   ])
-    sources = vm_sources_list
+    sources = vm_sources
     include_dirs = [ ".." ]
   }
 }
@@ -327,112 +321,117 @@
   sources = [
     [
       "async",
-      processed_gypis.async_sdk_sources,
+      async_sdk_sources,
       "../../sdk/lib/async",
       "async",
       true,
-      processed_gypis.async_runtime_sources,
-      "../lib",
-    ],
-    [
-      "core",
-      processed_gypis.core_sdk_sources,
-      "../../sdk/lib/core",
-      "core",
-      true,
-      processed_gypis.core_runtime_sources,
+      async_runtime_sources,
       "../lib",
     ],
     [
       "collection",
-      processed_gypis.collection_sdk_sources,
+      collection_sdk_sources,
       "../../sdk/lib/collection",
       "collection",
       true,
-      processed_gypis.collection_runtime_sources,
+      collection_runtime_sources,
       "../lib",
     ],
     [
       "convert",
-      processed_gypis.convert_sdk_sources,
+      convert_sdk_sources,
       "../../sdk/lib/convert",
       "convert",
       true,
-      processed_gypis.convert_runtime_sources,
+      convert_runtime_sources,
+      "../lib",
+    ],
+    [
+      "core",
+      core_sdk_sources,
+      "../../sdk/lib/core",
+      "core",
+      true,
+      core_runtime_sources,
       "../lib",
     ],
     [
       "developer",
-      processed_gypis.developer_sdk_sources,
+      developer_sdk_sources,
       "../../sdk/lib/developer",
       "developer",
       true,
-      processed_gypis.developer_runtime_sources,
+      developer_runtime_sources,
       "../lib",
     ],
     [
       "_internal",
-      processed_gypis.internal_sdk_sources,
+      internal_sdk_sources,
       "../../sdk/lib/internal",
       "internal",
       true,
-      processed_gypis.internal_runtime_sources,
+      internal_runtime_sources,
       "../lib",
     ],
     [
       "isolate",
-      processed_gypis.isolate_sdk_sources,
+      isolate_sdk_sources,
       "../../sdk/lib/isolate",
       "isolate",
       true,
-      processed_gypis.isolate_runtime_sources,
+      isolate_runtime_sources,
       "../lib",
     ],
     [
       "math",
-      processed_gypis.math_sdk_sources,
+      math_sdk_sources,
       "../../sdk/lib/math",
       "math",
       true,
-      processed_gypis.math_runtime_sources,
+      math_runtime_sources,
       "../lib",
     ],
     [
       "mirrors",
-      processed_gypis.mirrors_sdk_sources,
+      mirrors_sdk_sources,
       "../../sdk/lib/mirrors",
       "mirrors",
       true,
-      processed_gypis.mirrors_runtime_sources,
+      mirrors_runtime_sources,
       "../lib",
     ],
     [
       "profiler",
-      processed_gypis.profiler_sdk_sources,
+      profiler_sdk_sources,
       "../../sdk/lib/profiler",
       "profiler",
       false,
     ],
     [
       "typed_data",
-      processed_gypis.typed_data_sdk_sources,
+      typed_data_sdk_sources,
       "../../sdk/lib/typed_data",
       "typed_data",
       true,
-      processed_gypis.typed_data_runtime_sources,
+      typed_data_runtime_sources,
       "../lib",
     ],
     [
       "_vmservice",
-      processed_gypis.vmservice_sdk_sources,
+      vmservice_sdk_sources,
       "../../sdk/lib/vmservice",
       "vmservice",
       true,
-      processed_gypis.vmservice_runtime_sources,
+      vmservice_runtime_sources,
       "../lib",
     ],
   ]
-  allsources = processed_gypis.allsources
+  allsources = async_runtime_sources + collection_runtime_sources +
+               convert_runtime_sources + core_runtime_sources +
+               developer_runtime_sources + internal_runtime_sources +
+               isolate_runtime_sources + math_runtime_sources +
+               mirrors_runtime_sources + profiler_runtime_sources +
+               typed_data_runtime_sources + vmservice_runtime_sources
 }
 
 template("concatenate_patch") {
@@ -482,67 +481,67 @@
   libraries = [
     [
       "async",
-      processed_gypis.async_runtime_sources,
+      async_runtime_sources,
       "../lib",
     ],
     [
       "collection",
-      processed_gypis.collection_runtime_sources,
+      collection_runtime_sources,
       "../lib",
     ],
     [
       "convert",
-      processed_gypis.convert_runtime_sources,
+      convert_runtime_sources,
       "../lib",
     ],
     [
       "core",
-      processed_gypis.core_runtime_sources,
+      core_runtime_sources,
       "../lib",
     ],
     [
       "developer",
-      processed_gypis.developer_runtime_sources,
+      developer_runtime_sources,
       "../lib",
     ],
     [
       "internal",
-      processed_gypis.internal_runtime_sources,
+      internal_runtime_sources,
       "../lib",
     ],
     [
       "isolate",
-      processed_gypis.isolate_runtime_sources,
+      isolate_runtime_sources,
       "../lib",
     ],
     [
       "math",
-      processed_gypis.math_runtime_sources,
+      math_runtime_sources,
       "../lib",
     ],
     [
       "mirrors",
-      processed_gypis.mirrors_runtime_sources,
+      mirrors_runtime_sources,
       "../lib",
     ],
     [
       "profiler",
-      processed_gypis.profiler_runtime_sources,
+      profiler_runtime_sources,
       "../lib",
     ],
     [
       "typed_data",
-      processed_gypis.typed_data_runtime_sources,
+      typed_data_runtime_sources,
       "../lib",
     ],
     [
       "vmservice",
-      processed_gypis.vmservice_runtime_sources,
+      vmservice_runtime_sources,
       "../lib",
     ],
     [
       "io",
-      processed_gypis.bin_io_sources,
+      io_runtime_sources,
       "../bin",
     ],
   ]
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index ac1a3ac..31897eb 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -769,7 +769,7 @@
                  FlowGraphCompiler::SupportsUnboxedMints()) {
         // Don't generate mint code if the IC data is marked because of an
         // overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) return false;
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) return false;
         operands_type = kMintCid;
       } else if (ShouldSpecializeForDouble(ic_data)) {
         operands_type = kDoubleCid;
@@ -816,7 +816,7 @@
         // Left shift may overflow from smi into mint or big ints.
         // Don't generate smi code if the IC data is marked because
         // of an overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) {
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) {
           return false;
         }
         operands_type = ic_data.HasDeoptReason(ICData::kDeoptBinarySmiOp)
@@ -827,7 +827,7 @@
                      Z, ic_data.AsUnaryClassChecksForArgNr(1)))) {
         // Don't generate mint code if the IC data is marked because of an
         // overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) {
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) {
           return false;
         }
         // Check for smi/mint << smi or smi/mint >> smi.
@@ -878,11 +878,11 @@
   } else if (operands_type == kMintCid) {
     if (!FlowGraphCompiler::SupportsUnboxedMints()) return false;
     if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
-      ShiftMintOpInstr* shift_op = new (Z) ShiftMintOpInstr(
+      ShiftInt64OpInstr* shift_op = new (Z) ShiftInt64OpInstr(
           op_kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id());
       ReplaceCall(call, shift_op);
     } else {
-      BinaryMintOpInstr* bin_op = new (Z) BinaryMintOpInstr(
+      BinaryInt64OpInstr* bin_op = new (Z) BinaryInt64OpInstr(
           op_kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id());
       ReplaceCall(call, bin_op);
     }
@@ -956,7 +956,7 @@
              HasOnlySmiOrMint(*call->ic_data()) &&
              FlowGraphCompiler::SupportsUnboxedMints()) {
     unary_op = new (Z)
-        UnaryMintOpInstr(op_kind, new (Z) Value(input), call->deopt_id());
+        UnaryInt64OpInstr(op_kind, new (Z) Value(input), call->deopt_id());
   } else if (HasOnlyOneDouble(*call->ic_data()) &&
              (op_kind == Token::kNEGATE) && CanUnboxDouble()) {
     AddReceiverCheck(call);
@@ -2014,7 +2014,7 @@
 void AotOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
 // TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
-  if (!instr->can_pack_into_smi()) instr->set_representation(kUnboxedMint);
+  if (!instr->can_pack_into_smi()) instr->set_representation(kUnboxedInt64);
 #endif
 }
 
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
index c4e8c2b..8316dfd 100644
--- a/runtime/vm/assembler.cc
+++ b/runtime/vm/assembler.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/assembler.h"
 
 #include "platform/utils.h"
@@ -306,3 +308,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index ff2ecfa..c71809a 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // NOLINT
-#if defined(TARGET_ARCH_ARM)
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/cpu.h"
@@ -3435,4 +3435,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index bd5d8cf..5492c02 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // NOLINT
-#if defined(TARGET_ARCH_ARM64)
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/cpu.h"
@@ -1489,4 +1489,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM64
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index 6d1c0a6..189a784 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // NOLINT
-#if defined(TARGET_ARCH_IA32)
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/cpu.h"
@@ -2709,4 +2709,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index df49a49..4ac7a01 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // NOLINT
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/cpu.h"
@@ -3466,4 +3466,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index f97964b..ad7ced4 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/ast.h"
 #include "vm/compiler.h"
 #include "vm/dart_entry.h"
@@ -744,3 +746,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/ast_printer.cc b/runtime/vm/ast_printer.cc
index 54be6d7..62b9a3b 100644
--- a/runtime/vm/ast_printer.cc
+++ b/runtime/vm/ast_printer.cc
@@ -10,7 +10,7 @@
 #include "vm/os.h"
 #include "vm/parser.h"
 
-#if !defined(PRODUCT)
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
 namespace dart {
 
@@ -511,4 +511,4 @@
 
 }  // namespace dart
 
-#endif  // !defined(PRODUCT)
+#endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc
index 81304f6..a050e6c 100644
--- a/runtime/vm/ast_transformer.cc
+++ b/runtime/vm/ast_transformer.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/ast_transformer.h"
 
 #include "vm/object_store.h"
@@ -495,3 +497,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/atomic.h b/runtime/vm/atomic.h
index 41dfad1..e4dd4ab 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -8,7 +8,6 @@
 #include "platform/globals.h"
 
 #include "vm/allocation.h"
-#include "vm/simulator.h"
 
 namespace dart {
 
@@ -16,37 +15,23 @@
  public:
   // Atomically fetch the value at p and increment the value at p.
   // Returns the original value at p.
-  //
-  // NOTE: Not to be used for any atomic operations involving memory locations
-  // that are accessed by generated code.
   static uintptr_t FetchAndIncrement(uintptr_t* p);
   static intptr_t FetchAndIncrement(intptr_t* p);
 
   // Atomically increment the value at p by 'value'.
-  //
-  // NOTE: Not to be used for any atomic operations involving memory locations
-  // that are accessed by generated code.
   static void IncrementBy(intptr_t* p, intptr_t value);
   static void IncrementInt64By(int64_t* p, int64_t value);
 
   // Atomically fetch the value at p and decrement the value at p.
   // Returns the original value at p.
-  //
-  // NOTE: Not to be used for any atomic operations involving memory locations
-  // that are accessed by generated code.
   static uintptr_t FetchAndDecrement(uintptr_t* p);
   static intptr_t FetchAndDecrement(intptr_t* p);
 
   // Atomically decrement the value at p by 'value'.
-  //
-  // NOTE: Not to be used for any atomic operations involving memory locations
-  // that are accessed by generated code.
   static void DecrementBy(intptr_t* p, intptr_t value);
 
   // Atomically compare *ptr to old_value, and if equal, store new_value.
   // Returns the original value at ptr.
-  //
-  // NOTE: OK to use with memory locations that are accessed by generated code
   static uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value);
   static uint32_t CompareAndSwapUint32(uint32_t* ptr,
                                        uint32_t old_value,
@@ -62,16 +47,6 @@
 
 }  // namespace dart
 
-#if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
-#define USING_SIMULATOR_ATOMICS
-#endif
-
-#if defined(USING_SIMULATOR_ATOMICS)
-// We need to use the simulator to ensure that atomic operations are observed
-// both in C++ and in generated code if the simulator is active.
-#include "vm/atomic_simulator.h"
-#endif
-
 #if defined(HOST_OS_ANDROID)
 #include "vm/atomic_android.h"
 #elif defined(HOST_OS_FUCHSIA)
diff --git a/runtime/vm/atomic_android.h b/runtime/vm/atomic_android.h
index 8b53695..b5fb34d 100644
--- a/runtime/vm/atomic_android.h
+++ b/runtime/vm/atomic_android.h
@@ -43,7 +43,6 @@
   __sync_fetch_and_sub(p, value);
 }
 
-#if !defined(USING_SIMULATOR_ATOMICS)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
@@ -55,7 +54,6 @@
                                                        uint32_t new_value) {
   return __sync_val_compare_and_swap(ptr, old_value, new_value);
 }
-#endif  // !defined(USING_SIMULATOR_ATOMICS)
 
 }  // namespace dart
 
diff --git a/runtime/vm/atomic_fuchsia.h b/runtime/vm/atomic_fuchsia.h
index fd873ed..2076487 100644
--- a/runtime/vm/atomic_fuchsia.h
+++ b/runtime/vm/atomic_fuchsia.h
@@ -43,7 +43,6 @@
   __sync_fetch_and_sub(p, value);
 }
 
-#if !defined(USING_SIMULATOR_ATOMICS)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
@@ -55,7 +54,6 @@
                                                        uint32_t new_value) {
   return __sync_val_compare_and_swap(ptr, old_value, new_value);
 }
-#endif  // !defined(USING_SIMULATOR_ATOMICS)
 
 }  // namespace dart
 
diff --git a/runtime/vm/atomic_linux.h b/runtime/vm/atomic_linux.h
index 0c531a8..722deed 100644
--- a/runtime/vm/atomic_linux.h
+++ b/runtime/vm/atomic_linux.h
@@ -43,7 +43,6 @@
   __sync_fetch_and_sub(p, value);
 }
 
-#if !defined(USING_SIMULATOR_ATOMICS)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
@@ -55,7 +54,6 @@
                                                        uint32_t new_value) {
   return __sync_val_compare_and_swap(ptr, old_value, new_value);
 }
-#endif  // !defined(USING_SIMULATOR_ATOMICS)
 
 }  // namespace dart
 
diff --git a/runtime/vm/atomic_macos.h b/runtime/vm/atomic_macos.h
index 1ac693a..b60dfed 100644
--- a/runtime/vm/atomic_macos.h
+++ b/runtime/vm/atomic_macos.h
@@ -43,7 +43,6 @@
   __sync_fetch_and_sub(p, value);
 }
 
-#if !defined(USING_SIMULATOR_ATOMICS)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
@@ -55,7 +54,6 @@
                                                        uint32_t new_value) {
   return __sync_val_compare_and_swap(ptr, old_value, new_value);
 }
-#endif  // !defined(USING_SIMULATOR_ATOMICS)
 
 }  // namespace dart
 
diff --git a/runtime/vm/atomic_simulator.h b/runtime/vm/atomic_simulator.h
deleted file mode 100644
index 281dc04..0000000
--- a/runtime/vm/atomic_simulator.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2014, 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.
-
-#ifndef RUNTIME_VM_ATOMIC_SIMULATOR_H_
-#define RUNTIME_VM_ATOMIC_SIMULATOR_H_
-
-#if !defined RUNTIME_VM_ATOMIC_H_
-#error Do not include atomic_simulator.h directly. Use atomic.h instead.
-#endif
-
-namespace dart {
-
-#if defined(USING_SIMULATOR_ATOMICS)
-// Forward atomic operations to the simulator if the simulator is active.
-inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
-                                                  uword old_value,
-                                                  uword new_value) {
-  return Simulator::CompareExchange(ptr, old_value, new_value);
-}
-
-inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,
-                                                       uint32_t old_value,
-                                                       uint32_t new_value) {
-  return Simulator::CompareExchangeUint32(ptr, old_value, new_value);
-}
-#endif  // defined(USING_SIMULATOR_ATOMICS)
-
-}  // namespace dart
-
-#endif  // RUNTIME_VM_ATOMIC_SIMULATOR_H_
diff --git a/runtime/vm/atomic_win.h b/runtime/vm/atomic_win.h
index 9f2411d..55e4756 100644
--- a/runtime/vm/atomic_win.h
+++ b/runtime/vm/atomic_win.h
@@ -102,7 +102,6 @@
 #endif
 }
 
-#if !defined(USING_SIMULATOR)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
@@ -129,7 +128,6 @@
 #error Unsupported host architecture.
 #endif
 }
-#endif  // !defined(USING_SIMULATOR)
 
 }  // namespace dart
 
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 3bf9058..8a656ff 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -7,6 +7,7 @@
 #include "bin/builtin.h"
 #include "bin/file.h"
 #include "bin/isolate_data.h"
+#include "bin/process.h"
 
 #include "platform/assert.h"
 #include "platform/globals.h"
@@ -21,6 +22,8 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, use_dart_frontend);
+
 Benchmark* Benchmark::first_ = NULL;
 Benchmark* Benchmark::tail_ = NULL;
 const char* Benchmark::executable_ = NULL;
@@ -92,8 +95,11 @@
 Dart_Isolate Benchmark::CreateIsolate(const uint8_t* snapshot_data,
                                       const uint8_t* snapshot_instructions) {
   char* err = NULL;
+  Dart_IsolateFlags api_flags;
+  Isolate::FlagsInitialize(&api_flags);
+  api_flags.use_dart_frontend = FLAG_use_dart_frontend;
   isolate_ = Dart_CreateIsolate(NULL, NULL, snapshot_data,
-                                snapshot_instructions, NULL, NULL, &err);
+                                snapshot_instructions, &api_flags, NULL, &err);
   EXPECT(isolate_ != NULL);
   free(err);
   return isolate_;
@@ -697,7 +703,7 @@
 }
 
 BENCHMARK_MEMORY(InitialRSS) {
-  benchmark->set_score(OS::MaxRSS());
+  benchmark->set_score(bin::Process::MaxRSS());
 }
 
 }  // namespace dart
diff --git a/runtime/vm/block_scheduler.cc b/runtime/vm/block_scheduler.cc
index afb129b..00461d5 100644
--- a/runtime/vm/block_scheduler.cc
+++ b/runtime/vm/block_scheduler.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/block_scheduler.h"
 
 #include "vm/allocation.h"
@@ -209,3 +211,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/branch_optimizer.cc b/runtime/vm/branch_optimizer.cc
index 3693eda..b6391d0 100644
--- a/runtime/vm/branch_optimizer.cc
+++ b/runtime/vm/branch_optimizer.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/branch_optimizer.h"
 
 #include "vm/flow_graph.h"
@@ -340,3 +342,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/cha.cc b/runtime/vm/cha.cc
index 7045001..a13a838 100644
--- a/runtime/vm/cha.cc
+++ b/runtime/vm/cha.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/cha.h"
 #include "vm/class_table.h"
 #include "vm/flags.h"
@@ -172,3 +174,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 39d7413..0861d80 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -1648,6 +1648,7 @@
           getter.set_result_type(type);
           getter.set_is_debuggable(false);
           getter.set_kernel_offset(field.kernel_offset());
+          getter.set_kernel_data(TypedData::Handle(zone, field.kernel_data()));
           cls.AddFunction(getter);
           field.SetStaticValue(Object::sentinel(), true);
         }
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index f9be796..4d4ab98 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -551,6 +551,7 @@
       if (kind != Snapshot::kFullAOT) {
         s->WriteTokenPosition(func->ptr()->token_pos_);
         s->WriteTokenPosition(func->ptr()->end_token_pos_);
+        s->Write<int32_t>(func->ptr()->kernel_offset_);
       }
 #endif
       s->Write<int16_t>(func->ptr()->num_fixed_parameters_);
@@ -625,6 +626,7 @@
       if (kind != Snapshot::kFullAOT) {
         func->ptr()->token_pos_ = d->ReadTokenPosition();
         func->ptr()->end_token_pos_ = d->ReadTokenPosition();
+        func->ptr()->kernel_offset_ = d->Read<int32_t>();
       }
 #endif
       func->ptr()->num_fixed_parameters_ = d->Read<int16_t>();
@@ -937,6 +939,7 @@
     s->Push(field->ptr()->name_);
     s->Push(field->ptr()->owner_);
     s->Push(field->ptr()->type_);
+    s->Push(field->ptr()->kernel_data_);
     // Write out the initial static value or field offset.
     if (Field::StaticBit::decode(field->ptr()->kind_bits_)) {
       if (kind == Snapshot::kFullAOT) {
@@ -987,6 +990,7 @@
       s->WriteRef(field->ptr()->name_);
       s->WriteRef(field->ptr()->owner_);
       s->WriteRef(field->ptr()->type_);
+      s->WriteRef(field->ptr()->kernel_data_);
       // Write out the initial static value or field offset.
       if (Field::StaticBit::decode(field->ptr()->kind_bits_)) {
         if (kind == Snapshot::kFullAOT) {
@@ -1021,6 +1025,9 @@
         s->WriteTokenPosition(field->ptr()->token_pos_);
         s->WriteCid(field->ptr()->guarded_cid_);
         s->WriteCid(field->ptr()->is_nullable_);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        s->Write<int32_t>(field->ptr()->kernel_offset_);
+#endif
       }
       s->Write<uint8_t>(field->ptr()->kind_bits_);
     }
@@ -1068,6 +1075,9 @@
         field->ptr()->token_pos_ = d->ReadTokenPosition();
         field->ptr()->guarded_cid_ = d->ReadCid();
         field->ptr()->is_nullable_ = d->ReadCid();
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        field->ptr()->kernel_offset_ = d->Read<int32_t>();
+#endif
       }
       field->ptr()->kind_bits_ = d->Read<uint8_t>();
     }
@@ -1291,6 +1301,7 @@
       s->Write<int32_t>(script->ptr()->line_offset_);
       s->Write<int32_t>(script->ptr()->col_offset_);
       s->Write<int8_t>(script->ptr()->kind_);
+      s->Write<int32_t>(script->ptr()->kernel_script_index_);
     }
   }
 
@@ -1335,6 +1346,7 @@
       script->ptr()->line_offset_ = d->Read<int32_t>();
       script->ptr()->col_offset_ = d->Read<int32_t>();
       script->ptr()->kind_ = d->Read<int8_t>();
+      script->ptr()->kernel_script_index_ = d->Read<int32_t>();
       script->ptr()->load_timestamp_ = 0;
     }
   }
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 747f9328..0e80977 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -107,6 +107,44 @@
 
 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size);
 DECLARE_FLAG(bool, trace_failed_optimization_attempts);
+DECLARE_FLAG(bool, unbox_numeric_fields);
+
+static void PrecompilationModeHandler(bool value) {
+  if (value) {
+#if defined(TARGET_ARCH_IA32)
+    FATAL("Precompilation not supported on IA32");
+#endif
+
+    FLAG_background_compilation = false;
+    FLAG_enable_mirrors = false;
+    FLAG_fields_may_be_reset = true;
+    FLAG_interpret_irregexp = true;
+    FLAG_lazy_dispatchers = false;
+    FLAG_link_natives_lazily = true;
+    FLAG_optimization_counter_threshold = -1;
+    FLAG_polymorphic_with_deopt = false;
+    FLAG_precompiled_mode = true;
+    FLAG_reorder_basic_blocks = false;
+    FLAG_use_field_guards = false;
+    FLAG_use_cha_deopt = false;
+
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
+    // Set flags affecting runtime accordingly for dart_bootstrap.
+    // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME.
+    FLAG_collect_code = false;
+    FLAG_deoptimize_alot = false;  // Used in some tests.
+    FLAG_deoptimize_every = 0;     // Used in some tests.
+    FLAG_load_deferred_eagerly = true;
+    FLAG_print_stop_message = false;
+    FLAG_unbox_numeric_fields = false;
+    FLAG_use_osr = false;
+#endif
+  }
+}
+
+DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
+                    precompilation,
+                    "Precompilation mode");
 
 #ifndef DART_PRECOMPILED_RUNTIME
 
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 40363cb..7fe14fa 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/constant_propagator.h"
 
 #include "vm/bit_vector.h"
@@ -681,12 +683,12 @@
         (checked_type.IsInt32x4Type() && (rep == kUnboxedInt32x4)) ||
         (checked_type.IsDoubleType() && (rep == kUnboxedDouble) &&
          FlowGraphCompiler::SupportsUnboxedDoubles()) ||
-        (checked_type.IsIntType() && (rep == kUnboxedMint))) {
+        (checked_type.IsIntType() && (rep == kUnboxedInt64))) {
       // Ensure that compile time type matches representation.
       ASSERT(((rep == kUnboxedFloat32x4) && (value_cid == kFloat32x4Cid)) ||
              ((rep == kUnboxedInt32x4) && (value_cid == kInt32x4Cid)) ||
              ((rep == kUnboxedDouble) && (value_cid == kDoubleCid)) ||
-             ((rep == kUnboxedMint) && (value_cid == kMintCid)));
+             ((rep == kUnboxedInt64) && (value_cid == kMintCid)));
       // The representation guarantees the type check to be true.
       SetValue(instr, Bool::True());
     } else {
@@ -906,11 +908,11 @@
   VisitBinaryIntegerOp(instr);
 }
 
-void ConstantPropagator::VisitBinaryMintOp(BinaryMintOpInstr* instr) {
+void ConstantPropagator::VisitBinaryInt64Op(BinaryInt64OpInstr* instr) {
   VisitBinaryIntegerOp(instr);
 }
 
-void ConstantPropagator::VisitShiftMintOp(ShiftMintOpInstr* instr) {
+void ConstantPropagator::VisitShiftInt64Op(ShiftInt64OpInstr* instr) {
   VisitBinaryIntegerOp(instr);
 }
 
@@ -938,7 +940,7 @@
   SetValue(unary_op, non_constant_);
 }
 
-void ConstantPropagator::VisitUnaryMintOp(UnaryMintOpInstr* instr) {
+void ConstantPropagator::VisitUnaryInt64Op(UnaryInt64OpInstr* instr) {
   VisitUnaryIntegerOp(instr);
 }
 
@@ -1584,3 +1586,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 4553d1b..f5f34e4 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -118,7 +118,8 @@
                      Dart_FileWriteCallback file_write,
                      Dart_FileCloseCallback file_close,
                      Dart_EntropySource entropy_source,
-                     Dart_GetVMServiceAssetsArchive get_service_assets) {
+                     Dart_GetVMServiceAssetsArchive get_service_assets,
+                     bool start_kernel_isolate) {
   CheckOffsets();
   // TODO(iposva): Fix race condition here.
   if (vm_isolate_ != NULL || !Flags::Initialized()) {
@@ -149,11 +150,9 @@
   FreeListElement::InitOnce();
   ForwardingCorpse::InitOnce();
   Api::InitOnce();
+  NativeSymbolResolver::InitOnce();
   NOT_IN_PRODUCT(CodeObservers::InitOnce());
-  if (FLAG_profiler) {
-    ThreadInterrupter::InitOnce();
-    Profiler::InitOnce();
-  }
+  NOT_IN_PRODUCT(Profiler::InitOnce());
   SemiSpace::InitOnce();
   NOT_IN_PRODUCT(Metric::InitOnce());
   StoreBuffer::InitOnce();
@@ -204,9 +203,6 @@
         if (vm_snapshot_kind_ == Snapshot::kFullAOT) {
 #if defined(DART_PRECOMPILED_RUNTIME)
           vm_isolate_->set_compilation_allowed(false);
-          if (!FLAG_precompiled_runtime) {
-            return strdup("Flag --precompilation was not specified");
-          }
 #else
           return strdup("JIT runtime cannot run a precompiled snapshot");
 #endif
@@ -309,7 +305,9 @@
   ServiceIsolate::Run();
 
 #ifndef DART_PRECOMPILED_RUNTIME
-  KernelIsolate::Run();
+  if (start_kernel_isolate) {
+    KernelIsolate::Run();
+  }
 #endif  // DART_PRECOMPILED_RUNTIME
 
   return NULL;
@@ -354,14 +352,15 @@
                  UptimeMillis());
   }
 
-  if (FLAG_profiler) {
-    // Shut down profiling.
-    if (FLAG_trace_shutdown) {
-      OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Shutting down profiling\n",
-                   UptimeMillis());
-    }
-    Profiler::Shutdown();
+#if !defined(PRODUCT)
+  if (FLAG_trace_shutdown) {
+    OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Shutting down profiling\n",
+                 UptimeMillis());
   }
+  Profiler::Shutdown();
+#endif  // !defined(PRODUCT)
+
+  NativeSymbolResolver::ShutdownOnce();
 
   {
     // Set the VM isolate as current isolate when shutting down
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index e79fccc..f99605b 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -35,7 +35,8 @@
                         Dart_FileWriteCallback file_write,
                         Dart_FileCloseCallback file_close,
                         Dart_EntropySource entropy_source,
-                        Dart_GetVMServiceAssetsArchive get_service_assets);
+                        Dart_GetVMServiceAssetsArchive get_service_assets,
+                        bool start_kernel_isolate);
   static const char* Cleanup();
 
   static Isolate* CreateIsolate(const char* name_prefix,
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index aba8752..a868878 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -59,10 +59,8 @@
 // Facilitate quick access to the current zone once we have the current thread.
 #define Z (T->zone())
 
-DECLARE_FLAG(bool, use_dart_frontend);
 DECLARE_FLAG(bool, print_class_table);
 DECLARE_FLAG(bool, verify_handles);
-DECLARE_FLAG(bool, use_dart_frontend);
 #if defined(DART_NO_SNAPSHOT)
 DEFINE_FLAG(bool,
             check_function_fingerprints,
@@ -1093,7 +1091,8 @@
       params->vm_snapshot_data, params->vm_snapshot_instructions,
       params->create, params->shutdown, params->cleanup, params->thread_exit,
       params->file_open, params->file_read, params->file_write,
-      params->file_close, params->entropy_source, params->get_service_assets);
+      params->file_close, params->entropy_source, params->get_service_assets,
+      params->start_kernel_isolate);
 }
 
 DART_EXPORT char* Dart_Cleanup() {
@@ -1227,6 +1226,13 @@
                                                       Dart_IsolateFlags* flags,
                                                       void* callback_data,
                                                       char** error) {
+  // Setup default flags in case none were passed.
+  Dart_IsolateFlags api_flags;
+  if (flags == NULL) {
+    Isolate::FlagsInitialize(&api_flags);
+    flags = &api_flags;
+  }
+  flags->use_dart_frontend = true;
   return CreateIsolate(script_uri, main, NULL, NULL, -1,
                        reinterpret_cast<kernel::Program*>(kernel_program),
                        flags, callback_data, error);
@@ -5066,11 +5072,13 @@
 static Dart_Handle LoadKernelProgram(Thread* T,
                                      const String& url,
                                      void* kernel) {
-  // NOTE: Now the VM owns the [kernel_program] memory!  Currently we do not
-  // free it because (similar to the token stream) it will be used to repeatedly
-  // run the `kernel::FlowGraphBuilder()`.
-  kernel::KernelReader reader(reinterpret_cast<kernel::Program*>(kernel));
+  // NOTE: Now the VM owns the [kernel_program] memory!
+  // We will promptly delete it when done.
+  kernel::Program* program = reinterpret_cast<kernel::Program*>(kernel);
+  kernel::KernelReader reader(program);
   const Object& tmp = reader.ReadProgram();
+  delete program;
+
   if (tmp.IsError()) {
     return Api::NewHandle(T, tmp.raw());
   }
@@ -5116,7 +5124,7 @@
 
   Dart_Handle result;
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) {
+  if (I->use_dart_frontend()) {
     if ((source == Api::Null()) || (source == NULL)) {
       RETURN_NULL_ERROR(source);
     }
@@ -5248,12 +5256,13 @@
   CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
-  // NOTE: Now the VM owns the [kernel_program] memory!  Currently we do not
-  // free it because (similar to the token stream) it will be used to repeatedly
-  // run the `kernel::FlowGraphBuilder()`.
-  kernel::KernelReader reader(
-      reinterpret_cast<kernel::Program*>(kernel_program));
+  // NOTE: Now the VM owns the [kernel_program] memory!
+  // We will promptly delete it when done.
+  kernel::Program* program = reinterpret_cast<kernel::Program*>(kernel_program);
+  kernel::KernelReader reader(program);
   const Object& tmp = reader.ReadProgram();
+  delete program;
+
   if (tmp.IsError()) {
     return Api::NewHandle(T, tmp.raw());
   }
@@ -5470,10 +5479,7 @@
   }
   Dart_Handle result;
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  // Kernel isolate is loaded from script in case of dart_bootstrap
-  // even when FLAG_use_dart_frontend is true. Hence, do not interpret
-  // |source| as a kernel if the current isolate is the kernel isolate.
-  if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) {
+  if (I->use_dart_frontend()) {
     result = LoadKernelProgram(T, url_str, reinterpret_cast<void*>(source));
     if (::Dart_IsError(result)) {
       return result;
@@ -5883,15 +5889,16 @@
 DART_EXPORT Dart_KernelCompilationResult
 Dart_CompileSourcesToKernel(const char* script_uri,
                             int source_files_count,
-                            Dart_SourceFile sources[]) {
+                            Dart_SourceFile sources[],
+                            bool incremental_compile) {
 #ifdef DART_PRECOMPILED_RUNTIME
   Dart_KernelCompilationResult result;
   result.status = Dart_KernelCompilationStatus_Unknown;
   result.error = strdup("Dart_CompileSourcesToKernel is unsupported.");
   return result;
 #else
-  return KernelIsolate::CompileToKernel(script_uri, source_files_count,
-                                        sources);
+  return KernelIsolate::CompileToKernel(script_uri, source_files_count, sources,
+                                        incremental_compile);
 #endif
 }
 
@@ -5925,6 +5932,11 @@
   return;
 }
 
+DART_EXPORT void Dart_SetEmbedderInformationCallback(
+    Dart_EmbedderInformationCallback callback) {
+  return;
+}
+
 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks(
     Dart_ServiceStreamListenCallback listen_callback,
     Dart_ServiceStreamCancelCallback cancel_callback) {
@@ -5990,6 +6002,13 @@
   }
 }
 
+DART_EXPORT void Dart_SetEmbedderInformationCallback(
+    Dart_EmbedderInformationCallback callback) {
+  if (FLAG_support_service) {
+    Service::SetEmbedderInformationCallback(callback);
+  }
+}
+
 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks(
     Dart_ServiceStreamListenCallback listen_callback,
     Dart_ServiceStreamCancelCallback cancel_callback) {
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index d2ee3b2..be2415b 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -28,7 +28,7 @@
 
 #ifndef PRODUCT
 
-TEST_CASE(ErrorHandleBasics) {
+TEST_CASE(DartAPI_ErrorHandleBasics) {
   const char* kScriptChars =
       "void testMain() {\n"
       "  throw new Exception(\"bad news\");\n"
@@ -50,11 +50,11 @@
 
   EXPECT_STREQ("", Dart_GetError(instance));
   EXPECT_STREQ("myerror", Dart_GetError(error));
-  EXPECT_STREQ(
-      "Unhandled exception:\n"
-      "Exception: bad news\n"
-      "#0      testMain (test-lib:2:3)",
-      Dart_GetError(exception));
+  EXPECT_STREQ(ZONE_STR("Unhandled exception:\n"
+                        "Exception: bad news\n"
+                        "#0      testMain (%s:2:3)",
+                        TestCase::url()),
+               Dart_GetError(exception));
 
   EXPECT(Dart_IsError(Dart_ErrorGetException(instance)));
   EXPECT(Dart_IsError(Dart_ErrorGetException(error)));
@@ -65,7 +65,7 @@
   EXPECT_VALID(Dart_ErrorGetStackTrace(exception));
 }
 
-TEST_CASE(StackTraceInfo) {
+TEST_CASE(DartAPI_StackTraceInfo) {
   const char* kScriptChars =
       "bar() => throw new Error();\n"
       "foo() => bar();\n"
@@ -135,7 +135,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(DeepStackTraceInfo) {
+TEST_CASE(DartAPI_DeepStackTraceInfo) {
   const char* kScriptChars =
       "foo(n) => n == 1 ? throw new Error() : foo(n-1);\n"
       "testMain() => foo(50);\n";
@@ -213,7 +213,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(StackOverflowStackTraceInfo) {
+TEST_CASE(DartAPI_StackOverflowStackTraceInfo) {
   const char* kScriptChars =
       "class C {\n"
       "  static foo() => foo();\n"
@@ -261,7 +261,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(OutOfMemoryStackTraceInfo) {
+TEST_CASE(DartAPI_OutOfMemoryStackTraceInfo) {
   const char* kScriptChars =
       "var number_of_ints = 134000000;\n"
       "testMain() {\n"
@@ -374,7 +374,7 @@
   return reinterpret_cast<Dart_NativeFunction>(&CurrentStackTraceNative);
 }
 
-TEST_CASE(CurrentStackTraceInfo) {
+TEST_CASE(DartAPI_CurrentStackTraceInfo) {
   const char* kScriptChars =
       "inspectStack() native 'CurrentStackTraceNatve';\n"
       "foo(n) => n == 1 ? inspectStack() : foo(n-1);\n"
@@ -392,7 +392,7 @@
 
 #endif  // !PRODUCT
 
-TEST_CASE(ErrorHandleTypes) {
+TEST_CASE(DartAPI_ErrorHandleTypes) {
   const String& compile_message = String::Handle(String::New("CompileError"));
   const String& fatal_message = String::Handle(String::New("FatalError"));
 
@@ -443,7 +443,7 @@
   EXPECT_STREQ("FatalError", Dart_GetError(fatal_error));
 }
 
-TEST_CASE(UnhandleExceptionError) {
+TEST_CASE(DartAPI_UnhandleExceptionError) {
   const char* exception_cstr = "";
 
   // Test with an API Error.
@@ -525,7 +525,7 @@
   return reinterpret_cast<Dart_NativeFunction>(&PropagateErrorNative);
 }
 
-TEST_CASE(Dart_PropagateError) {
+TEST_CASE(DartAPI_PropagateError) {
   const char* kScriptChars =
       "raiseCompileError() {\n"
       "  return missing_semicolon\n"
@@ -588,13 +588,13 @@
   EXPECT_SUBSTRING("myException", Dart_GetError(result));
 }
 
-TEST_CASE(Dart_Error) {
+TEST_CASE(DartAPI_Error) {
   Dart_Handle error = Api::NewError("An %s", "error");
   EXPECT(Dart_IsError(error));
   EXPECT_STREQ("An error", Dart_GetError(error));
 }
 
-TEST_CASE(Null) {
+TEST_CASE(DartAPI_Null) {
   Dart_Handle null = Dart_Null();
   EXPECT_VALID(null);
   EXPECT(Dart_IsNull(null));
@@ -604,13 +604,13 @@
   EXPECT(!Dart_IsNull(str));
 }
 
-TEST_CASE(EmptyString) {
+TEST_CASE(DartAPI_EmptyString) {
   Dart_Handle empty = Dart_EmptyString();
   EXPECT_VALID(empty);
   EXPECT(!Dart_IsNull(empty));
 }
 
-TEST_CASE(IdentityEquals) {
+TEST_CASE(DartAPI_IdentityEquals) {
   Dart_Handle five = Dart_NewInteger(5);
   Dart_Handle five_again = Dart_NewInteger(5);
   Dart_Handle mint = Dart_NewInteger(0xFFFFFFFF);
@@ -660,7 +660,7 @@
   }
 }
 
-TEST_CASE(ObjectEquals) {
+TEST_CASE(DartAPI_ObjectEquals) {
   bool equal = false;
   Dart_Handle five = NewString("5");
   Dart_Handle five_again = NewString("5");
@@ -684,7 +684,7 @@
   EXPECT(!equal);
 }
 
-TEST_CASE(InstanceValues) {
+TEST_CASE(DartAPI_InstanceValues) {
   EXPECT(Dart_IsInstance(NewString("test")));
   EXPECT(Dart_IsInstance(Dart_True()));
 
@@ -692,7 +692,7 @@
   EXPECT(!Dart_IsInstance(Dart_Null()));
 }
 
-TEST_CASE(InstanceGetType) {
+TEST_CASE(DartAPI_InstanceGetType) {
   Zone* zone = thread->zone();
   // Get the handle from a valid instance handle.
   Dart_Handle type = Dart_InstanceGetType(Dart_Null());
@@ -734,7 +734,7 @@
                "type Instance.");
 }
 
-TEST_CASE(BooleanValues) {
+TEST_CASE(DartAPI_BooleanValues) {
   Dart_Handle str = NewString("test");
   EXPECT(!Dart_IsBoolean(str));
 
@@ -757,7 +757,7 @@
   EXPECT(!value);
 }
 
-TEST_CASE(BooleanConstants) {
+TEST_CASE(DartAPI_BooleanConstants) {
   Dart_Handle true_handle = Dart_True();
   EXPECT_VALID(true_handle);
   EXPECT(Dart_IsBoolean(true_handle));
@@ -776,7 +776,7 @@
   EXPECT(!value);
 }
 
-TEST_CASE(DoubleValues) {
+TEST_CASE(DartAPI_DoubleValues) {
   const double kDoubleVal1 = 201.29;
   const double kDoubleVal2 = 101.19;
   Dart_Handle val1 = Dart_NewDouble(kDoubleVal1);
@@ -792,7 +792,7 @@
   EXPECT_EQ(kDoubleVal2, out2);
 }
 
-TEST_CASE(NumberValues) {
+TEST_CASE(DartAPI_NumberValues) {
   // TODO(antonm): add various kinds of ints (smi, mint, bigint).
   const char* kScriptChars =
       "int getInt() { return 1; }\n"
@@ -824,7 +824,7 @@
   EXPECT(!Dart_IsNumber(result));
 }
 
-TEST_CASE(IntegerValues) {
+TEST_CASE(DartAPI_IntegerValues) {
   const int64_t kIntegerVal1 = 100;
   const int64_t kIntegerVal2 = 0xffffffff;
   const char* kIntegerVal3 = "0x123456789123456789123456789";
@@ -892,7 +892,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(IntegerToHexCString) {
+TEST_CASE(DartAPI_IntegerToHexCString) {
   const struct {
     int64_t i;
     const char* s;
@@ -943,7 +943,7 @@
   }
 }
 
-TEST_CASE(IntegerFitsIntoInt64) {
+TEST_CASE(DartAPI_IntegerFitsIntoInt64) {
   Dart_Handle max = Dart_NewInteger(kMaxInt64);
   EXPECT(Dart_IsInteger(max));
   bool fits = false;
@@ -981,7 +981,7 @@
   }
 }
 
-TEST_CASE(IntegerFitsIntoUint64) {
+TEST_CASE(DartAPI_IntegerFitsIntoUint64) {
   Dart_Handle max = Dart_NewIntegerFromUint64(kMaxUint64);
   if (FLAG_limit_ints_to_64_bits) {
     EXPECT(Dart_IsApiError(max));
@@ -1019,7 +1019,7 @@
   EXPECT(!fits);
 }
 
-TEST_CASE(ArrayValues) {
+TEST_CASE(DartAPI_ArrayValues) {
   EXPECT(!Dart_IsList(Dart_Null()));
   const int kArrayLength = 10;
   Dart_Handle str = NewString("test");
@@ -1055,7 +1055,7 @@
   }
 }
 
-TEST_CASE(IsString) {
+TEST_CASE(DartAPI_IsString) {
   uint8_t latin1[] = {'o', 'n', 'e', 0xC2, 0xA2};
 
   Dart_Handle latin1str = Dart_NewStringFromUTF8(latin1, ARRAY_SIZE(latin1));
@@ -1133,7 +1133,7 @@
   EXPECT(!Dart_IsExternalString(str32));
 }
 
-TEST_CASE(NewString) {
+TEST_CASE(DartAPI_NewString) {
   const char* ascii = "string";
   Dart_Handle ascii_str = NewString(ascii);
   EXPECT_VALID(ascii_str);
@@ -1154,7 +1154,7 @@
   EXPECT(Dart_IsError(invalid_str));
 }
 
-TEST_CASE(MalformedStringToUTF8) {
+TEST_CASE(DartAPI_MalformedStringToUTF8) {
   // 1D11E = treble clef
   // [0] should be high surrogate D834
   // [1] should be low surrogate DD1E
@@ -1224,7 +1224,7 @@
   *static_cast<int*>(peer) *= 2;
 }
 
-TEST_CASE(ExternalStringCallback) {
+TEST_CASE(DartAPI_ExternalStringCallback) {
   int peer8 = 40;
   int peer16 = 41;
 
@@ -1259,7 +1259,7 @@
   }
 }
 
-TEST_CASE(ExternalStringPretenure) {
+TEST_CASE(DartAPI_ExternalStringPretenure) {
   {
     Dart_EnterScope();
     static const uint8_t big_data8[16 * MB] = {
@@ -1298,7 +1298,7 @@
   }
 }
 
-TEST_CASE(ExternalTypedDataPretenure) {
+TEST_CASE(DartAPI_ExternalTypedDataPretenure) {
   {
     Dart_EnterScope();
     static const int kBigLength = 16 * MB / 8;
@@ -1326,7 +1326,7 @@
   }
 }
 
-TEST_CASE(ListAccess) {
+TEST_CASE(DartAPI_ListAccess) {
   const char* kScriptChars =
       "List testMain() {"
       "  List a = new List();"
@@ -1476,7 +1476,7 @@
   EXPECT(Dart_IsUnhandledExceptionError(result));
 }
 
-TEST_CASE(MapAccess) {
+TEST_CASE(DartAPI_MapAccess) {
   EXPECT(!Dart_IsMap(Dart_Null()));
   const char* kScriptChars =
       "Map testMain() {"
@@ -1568,7 +1568,7 @@
   EXPECT(Dart_IsError(Dart_MapKeys(a)));
 }
 
-TEST_CASE(IsFuture) {
+TEST_CASE(DartAPI_IsFuture) {
   const char* kScriptChars =
       "import 'dart:async';"
       "Future testMain() {"
@@ -1593,7 +1593,7 @@
   EXPECT(!Dart_IsFuture(null));
 }
 
-TEST_CASE(TypedDataViewListGetAsBytes) {
+TEST_CASE(DartAPI_TypedDataViewListGetAsBytes) {
   const int kSize = 1000;
 
   const char* kScriptChars =
@@ -1625,7 +1625,7 @@
   delete[] data;
 }
 
-TEST_CASE(TypedDataViewListIsTypedData) {
+TEST_CASE(DartAPI_TypedDataViewListIsTypedData) {
   const int kSize = 1000;
 
   const char* kScriptChars =
@@ -1647,7 +1647,7 @@
   EXPECT(Dart_IsTypedData(view_obj));
 }
 
-TEST_CASE(TypedDataAccess) {
+TEST_CASE(DartAPI_TypedDataAccess) {
   EXPECT_EQ(Dart_TypedData_kInvalid, Dart_GetTypeOfTypedData(Dart_True()));
   EXPECT_EQ(Dart_TypedData_kInvalid,
             Dart_GetTypeOfExternalTypedData(Dart_False()));
@@ -1720,7 +1720,7 @@
   }
 }
 
-TEST_CASE(ByteBufferAccess) {
+TEST_CASE(DartAPI_ByteBufferAccess) {
   EXPECT(!Dart_IsByteBuffer(Dart_True()));
   Dart_Handle byte_array = Dart_NewTypedData(Dart_TypedData_kUint8, 10);
   EXPECT_VALID(byte_array);
@@ -1782,7 +1782,7 @@
   return &ByteDataNativeFunction;
 }
 
-TEST_CASE(ByteDataAccess) {
+TEST_CASE(DartAPI_ByteDataAccess) {
   const char* kScriptChars =
       "import 'dart:typed_data';\n"
       "class Expect {\n"
@@ -1843,7 +1843,7 @@
   return &ExternalByteDataNativeFunction;
 }
 
-TEST_CASE(ExternalByteDataAccess) {
+TEST_CASE(DartAPI_ExternalByteDataAccess) {
   // TODO(asiva): Once we have getInt16LE and getInt16BE support use the
   // appropriate getter instead of the host endian format used now.
   const char* kScriptChars =
@@ -1917,7 +1917,7 @@
   return &OptExternalByteDataNativeFunction;
 }
 
-TEST_CASE(OptimizedExternalByteDataAccess) {
+TEST_CASE(DartAPI_OptimizedExternalByteDataAccess) {
   const char* kScriptChars =
       "import 'dart:typed_data';\n"
       "class Expect {\n"
@@ -1999,12 +1999,12 @@
                " to be of type 'TypedData'.");
 }
 
-TEST_CASE(TypedDataDirectAccessUnverified) {
+TEST_CASE(DartAPI_TypedDataDirectAccessUnverified) {
   FLAG_verify_acquired_data = false;
   TestTypedDataDirectAccess();
 }
 
-TEST_CASE(TypedDataDirectAccessVerified) {
+TEST_CASE(DartAPI_TypedDataDirectAccessVerified) {
   FLAG_verify_acquired_data = true;
   TestTypedDataDirectAccess();
 }
@@ -2103,12 +2103,12 @@
   TestDirectAccess(lib, ext_list_access_test_obj, Dart_TypedData_kUint8, true);
 }
 
-TEST_CASE(TypedDataDirectAccess1Unverified) {
+TEST_CASE(DartAPI_TypedDataDirectAccess1Unverified) {
   FLAG_verify_acquired_data = false;
   TestTypedDataDirectAccess1();
 }
 
-TEST_CASE(TypedDataDirectAccess1Verified) {
+TEST_CASE(DartAPI_TypedDataDirectAccess1Verified) {
   FLAG_verify_acquired_data = true;
   TestTypedDataDirectAccess1();
 }
@@ -2151,12 +2151,12 @@
   TestDirectAccess(lib, list_access_test_obj, Dart_TypedData_kInt8, false);
 }
 
-TEST_CASE(TypedDataViewDirectAccessUnverified) {
+TEST_CASE(DartAPI_TypedDataViewDirectAccessUnverified) {
   FLAG_verify_acquired_data = false;
   TestTypedDataViewDirectAccess();
 }
 
-TEST_CASE(TypedDataViewDirectAccessVerified) {
+TEST_CASE(DartAPI_TypedDataViewDirectAccessVerified) {
   FLAG_verify_acquired_data = true;
   TestTypedDataViewDirectAccess();
 }
@@ -2199,12 +2199,12 @@
   TestDirectAccess(lib, list_access_test_obj, Dart_TypedData_kByteData, false);
 }
 
-TEST_CASE(ByteDataDirectAccessUnverified) {
+TEST_CASE(DartAPI_ByteDataDirectAccessUnverified) {
   FLAG_verify_acquired_data = false;
   TestByteDataDirectAccess();
 }
 
-TEST_CASE(ByteDataDirectAccessVerified) {
+TEST_CASE(DartAPI_ByteDataDirectAccessVerified) {
   FLAG_verify_acquired_data = true;
   TestByteDataDirectAccess();
 }
@@ -2265,7 +2265,7 @@
   }
 }
 
-TEST_CASE(ExternalTypedDataAccess) {
+TEST_CASE(DartAPI_ExternalTypedDataAccess) {
   uint8_t data[] = {0, 11, 22, 33, 44, 55, 66, 77};
   intptr_t data_length = ARRAY_SIZE(data);
 
@@ -2274,7 +2274,7 @@
   ExternalTypedDataAccessTests(obj, Dart_TypedData_kUint8, data, data_length);
 }
 
-TEST_CASE(ExternalClampedTypedDataAccess) {
+TEST_CASE(DartAPI_ExternalClampedTypedDataAccess) {
   uint8_t data[] = {0, 11, 22, 33, 44, 55, 66, 77};
   intptr_t data_length = ARRAY_SIZE(data);
 
@@ -2284,7 +2284,7 @@
                                data_length);
 }
 
-TEST_CASE(ExternalUint8ClampedArrayAccess) {
+TEST_CASE(DartAPI_ExternalUint8ClampedArrayAccess) {
   const char* kScriptChars =
       "testClamped(List a) {\n"
       "  if (a[1] != 11) return false;\n"
@@ -2334,7 +2334,7 @@
   *static_cast<int*>(peer) = 42;
 }
 
-TEST_CASE(ExternalTypedDataCallback) {
+TEST_CASE(DartAPI_ExternalTypedDataCallback) {
   int peer = 0;
   {
     Dart_EnterScope();
@@ -2366,7 +2366,7 @@
   (*count)++;
 }
 
-TEST_CASE(SlowFinalizer) {
+TEST_CASE(DartAPI_SlowFinalizer) {
   intptr_t count = 0;
   for (intptr_t i = 0; i < 10; i++) {
     Dart_EnterScope();
@@ -2404,7 +2404,7 @@
   EXPECT_VALID(Dart_TypedDataReleaseData(obj));
 }
 
-TEST_CASE(Float32x4List) {
+TEST_CASE(DartAPI_Float32x4List) {
   const char* kScriptChars =
       "import 'dart:typed_data';\n"
       "Float32x4List float32x4() {\n"
@@ -2447,7 +2447,7 @@
 
 // Unit test for entering a scope, creating a local handle and exiting
 // the scope.
-VM_UNIT_TEST_CASE(EnterExitScope) {
+VM_UNIT_TEST_CASE(DartAPI_EnterExitScope) {
   TestIsolateScope __test_isolate__;
 
   Thread* thread = Thread::Current();
@@ -2468,7 +2468,7 @@
 }
 
 // Unit test for creating and deleting persistent handles.
-VM_UNIT_TEST_CASE(PersistentHandles) {
+VM_UNIT_TEST_CASE(DartAPI_PersistentHandles) {
   const char* kTestString1 = "Test String1";
   const char* kTestString2 = "Test String2";
   TestCase::CreateTestIsolate();
@@ -2536,7 +2536,7 @@
 
 // Test that we are able to create a persistent handle from a
 // persistent handle.
-VM_UNIT_TEST_CASE(NewPersistentHandle_FromPersistentHandle) {
+VM_UNIT_TEST_CASE(DartAPI_NewPersistentHandle_FromPersistentHandle) {
   TestIsolateScope __test_isolate__;
 
   Isolate* isolate = Isolate::Current();
@@ -2566,7 +2566,7 @@
 }
 
 // Test that we can assign to a persistent handle.
-VM_UNIT_TEST_CASE(AssignToPersistentHandle) {
+VM_UNIT_TEST_CASE(DartAPI_AssignToPersistentHandle) {
   const char* kTestString1 = "Test String1";
   const char* kTestString2 = "Test String2";
   TestIsolateScope __test_isolate__;
@@ -2619,7 +2619,7 @@
   }
 }
 
-TEST_CASE(WeakPersistentHandle) {
+TEST_CASE(DartAPI_WeakPersistentHandle) {
   Dart_Handle local_new_ref = Dart_Null();
   weak_new_ref = Dart_NewWeakPersistentHandle(local_new_ref, NULL, 0,
                                               WeakPersistentHandleCallback);
@@ -2739,7 +2739,7 @@
   }
 }
 
-TEST_CASE(WeakPersistentHandleErrors) {
+TEST_CASE(DartAPI_WeakPersistentHandleErrors) {
   Dart_EnterScope();
 
   // NULL callback.
@@ -2765,7 +2765,7 @@
   *static_cast<int*>(peer) = 42;
 }
 
-TEST_CASE(WeakPersistentHandleCallback) {
+TEST_CASE(DartAPI_WeakPersistentHandleCallback) {
   Dart_WeakPersistentHandle weak_ref = NULL;
   int peer = 0;
   {
@@ -2788,7 +2788,7 @@
   }
 }
 
-TEST_CASE(WeakPersistentHandleNoCallback) {
+TEST_CASE(DartAPI_WeakPersistentHandleNoCallback) {
   Dart_WeakPersistentHandle weak_ref = NULL;
   int peer = 0;
   {
@@ -2814,7 +2814,7 @@
   }
 }
 
-VM_UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
+VM_UNIT_TEST_CASE(DartAPI_WeakPersistentHandlesCallbackShutdown) {
   TestCase::CreateTestIsolate();
   Dart_EnterScope();
   Dart_Handle ref = Dart_True();
@@ -2826,7 +2826,7 @@
   EXPECT(peer == 42);
 }
 
-TEST_CASE(WeakPersistentHandleExternalAllocationSize) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSize) {
   Heap* heap = Isolate::Current()->heap();
   EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
   EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
@@ -2878,7 +2878,7 @@
   }
 }
 
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
   Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
   Heap* heap = Isolate::Current()->heap();
   Dart_WeakPersistentHandle weak1 = NULL;
@@ -2921,7 +2921,7 @@
   }
 }
 
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
   // Check that external allocation in old space can trigger GC.
   Isolate* isolate = Isolate::Current();
   Dart_EnterScope();
@@ -2950,7 +2950,7 @@
   Dart_ExitScope();
 }
 
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeOddReferents) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeOddReferents) {
   Heap* heap = Isolate::Current()->heap();
   Dart_WeakPersistentHandle weak1 = NULL;
   static const intptr_t kWeak1ExternalSize = 1 * KB;
@@ -3001,7 +3001,7 @@
   }
 }
 
-TEST_CASE(ImplicitReferencesOldSpace) {
+TEST_CASE(DartAPI_ImplicitReferencesOldSpace) {
   Dart_PersistentHandle strong = NULL;
   Dart_WeakPersistentHandle strong_weak = NULL;
 
@@ -3066,7 +3066,7 @@
   }
 }
 
-TEST_CASE(ImplicitReferencesNewSpace) {
+TEST_CASE(DartAPI_ImplicitReferencesNewSpace) {
   Dart_PersistentHandle strong = NULL;
   Dart_WeakPersistentHandle strong_weak = NULL;
 
@@ -3152,7 +3152,7 @@
   global_epilogue_callback_status *= 5;
 }
 
-TEST_CASE(SetGarbageCollectionCallbacks) {
+TEST_CASE(DartAPI_SetGarbageCollectionCallbacks) {
   // GC callback addition testing.
 
   // Add GC callbacks.
@@ -3181,7 +3181,7 @@
   EXPECT(Dart_IsError(Dart_SetGcCallbacks(NULL, &EpilogueCallbackTimes4)));
 }
 
-TEST_CASE(SingleGarbageCollectionCallback) {
+TEST_CASE(DartAPI_SingleGarbageCollectionCallback) {
   // Add a prologue callback.
   EXPECT_VALID(
       Dart_SetGcCallbacks(&PrologueCallbackTimes2, &EpilogueCallbackNOP));
@@ -3292,7 +3292,7 @@
 // Unit test for creating multiple scopes and local handles within them.
 // Ensure that the local handles get all cleaned out when exiting the
 // scope.
-VM_UNIT_TEST_CASE(LocalHandles) {
+VM_UNIT_TEST_CASE(DartAPI_LocalHandles) {
   TestCase::CreateTestIsolate();
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
@@ -3355,7 +3355,7 @@
 // Unit test for creating multiple scopes and allocating objects in the
 // zone for the scope. Ensure that the memory is freed when the scope
 // exits.
-VM_UNIT_TEST_CASE(LocalZoneMemory) {
+VM_UNIT_TEST_CASE(DartAPI_LocalZoneMemory) {
   TestCase::CreateTestIsolate();
   Thread* thread = Thread::Current();
   EXPECT(thread != NULL);
@@ -3396,7 +3396,7 @@
   Dart_ShutdownIsolate();
 }
 
-VM_UNIT_TEST_CASE(Isolates) {
+VM_UNIT_TEST_CASE(DartAPI_Isolates) {
   // This test currently assumes that the Dart_Isolate type is an opaque
   // representation of Isolate*.
   Dart_Isolate iso_1 = TestCase::CreateTestIsolate();
@@ -3419,7 +3419,7 @@
   EXPECT(NULL == Dart_CurrentIsolate());
 }
 
-VM_UNIT_TEST_CASE(CurrentIsolateData) {
+VM_UNIT_TEST_CASE(DartAPI_CurrentIsolateData) {
   intptr_t mydata = 12345;
   char* err;
   Dart_Isolate isolate =
@@ -3452,7 +3452,7 @@
   return Dart_LoadScript(url, Dart_Null(), script, 0, 0);
 }
 
-VM_UNIT_TEST_CASE(IsolateSetCheckedMode) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateSetCheckedMode) {
   const char* kScriptChars =
       "int bad1() {\n"
       "  int foo = 'string';\n"
@@ -3471,6 +3471,7 @@
   api_flags.enable_asserts = true;
   api_flags.enable_error_on_bad_type = true;
   api_flags.enable_error_on_bad_override = true;
+  api_flags.use_dart_frontend = FLAG_use_dart_frontend;
 
   char* err;
   Dart_Isolate isolate = Dart_CreateIsolate(
@@ -3505,7 +3506,7 @@
   Dart_ShutdownIsolate();
 }
 
-TEST_CASE(DebugName) {
+TEST_CASE(DartAPI_DebugName) {
   Dart_Handle debug_name = Dart_DebugName();
   EXPECT_VALID(debug_name);
   EXPECT(Dart_IsString(debug_name));
@@ -3513,7 +3514,7 @@
 
 static void MyMessageNotifyCallback(Dart_Isolate dest_isolate) {}
 
-VM_UNIT_TEST_CASE(SetMessageCallbacks) {
+VM_UNIT_TEST_CASE(DartAPI_SetMessageCallbacks) {
   Dart_Isolate dart_isolate = TestCase::CreateTestIsolate();
   Dart_SetMessageNotifyCallback(&MyMessageNotifyCallback);
   Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
@@ -3521,7 +3522,7 @@
   Dart_ShutdownIsolate();
 }
 
-TEST_CASE(SetStickyError) {
+TEST_CASE(DartAPI_SetStickyError) {
   const char* kScriptChars = "main() => throw 'HI';";
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
   Dart_Handle retobj = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -3537,7 +3538,7 @@
   EXPECT(Dart_GetStickyError() == Dart_Null());
 }
 
-TEST_CASE(TypeGetNonParamtericTypes) {
+TEST_CASE(DartAPI_TypeGetNonParamtericTypes) {
   const char* kScriptChars =
       "class MyClass0 {\n"
       "}\n"
@@ -3628,7 +3629,7 @@
   EXPECT(Dart_IdentityEquals(type2, type2_obj));
 }
 
-TEST_CASE(TypeGetParameterizedTypes) {
+TEST_CASE(DartAPI_TypeGetParameterizedTypes) {
   const char* kScriptChars =
       "class MyClass0<A, B> {\n"
       "}\n"
@@ -3773,7 +3774,7 @@
   EXPECT(Dart_IsError(Dart_SetField(container, name, Dart_Null())));
 }
 
-TEST_CASE(FieldAccess) {
+TEST_CASE(DartAPI_FieldAccess) {
   const char* kScriptChars =
       "class BaseFields {\n"
       "  BaseFields()\n"
@@ -4024,7 +4025,7 @@
   TestFieldNotFound(lib, name);
 }
 
-TEST_CASE(SetField_FunnyValue) {
+TEST_CASE(DartAPI_SetField_FunnyValue) {
   const char* kScriptChars = "var top;\n";
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -4069,7 +4070,7 @@
   return reinterpret_cast<Dart_NativeFunction>(&NativeFieldLookup);
 }
 
-TEST_CASE(InjectNativeFields1) {
+TEST_CASE(DartAPI_InjectNativeFields1) {
   const char* kScriptChars =
       "class NativeFields extends NativeFieldsWrapper {\n"
       "  NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4120,7 +4121,7 @@
   EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
 }
 
-TEST_CASE(InjectNativeFields2) {
+TEST_CASE(DartAPI_InjectNativeFields2) {
   const char* kScriptChars =
       "class NativeFields extends NativeFieldsWrapper {\n"
       "  NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4147,7 +4148,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(InjectNativeFields3) {
+TEST_CASE(DartAPI_InjectNativeFields3) {
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4188,7 +4189,7 @@
   EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
 }
 
-TEST_CASE(InjectNativeFields4) {
+TEST_CASE(DartAPI_InjectNativeFields4) {
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4268,7 +4269,7 @@
   }
 }
 
-TEST_CASE(TestNativeFieldsAccess) {
+TEST_CASE(DartAPI_TestNativeFieldsAccess) {
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4296,7 +4297,7 @@
   EXPECT_VALID(result);
 }
 
-TEST_CASE(InjectNativeFieldsSuperClass) {
+TEST_CASE(DartAPI_InjectNativeFieldsSuperClass) {
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class NativeFieldsSuper extends NativeFieldWrapperClass1 {\n"
@@ -4400,7 +4401,7 @@
   EXPECT_EQ(20, value);
 }
 
-TEST_CASE(NativeFieldAccess) {
+TEST_CASE(DartAPI_NativeFieldAccess) {
   const char* kScriptChars =
       "class NativeFields extends NativeFieldsWrapper {\n"
       "  NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4449,7 +4450,7 @@
   EXPECT_STREQ("myerror", Dart_GetError(result));
 }
 
-TEST_CASE(ImplicitNativeFieldAccess) {
+TEST_CASE(DartAPI_ImplicitNativeFieldAccess) {
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class NativeFields extends NativeFieldWrapperClass4 {\n"
@@ -4475,7 +4476,7 @@
   TestNativeFields(retobj);
 }
 
-TEST_CASE(NegativeNativeFieldAccess) {
+TEST_CASE(DartAPI_NegativeNativeFieldAccess) {
   const char* kScriptChars =
       "class NativeFields {\n"
       "  NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4546,7 +4547,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(NegativeNativeFieldInIsolateMessage) {
+TEST_CASE(DartAPI_NegativeNativeFieldInIsolateMessage) {
   const char* kScriptChars =
       "import 'dart:isolate';\n"
       "import 'dart:nativewrappers';\n"
@@ -4583,7 +4584,7 @@
   EXPECT(Dart_IsError(retobj));
 }
 
-TEST_CASE(GetStaticField_RunsInitializer) {
+TEST_CASE(DartAPI_GetStaticField_RunsInitializer) {
   const char* kScriptChars =
       "class TestClass  {\n"
       "  static const int fld1 = 7;\n"
@@ -4624,7 +4625,7 @@
   EXPECT_EQ(13, value);
 }
 
-TEST_CASE(GetField_CheckIsolate) {
+TEST_CASE(DartAPI_GetField_CheckIsolate) {
   const char* kScriptChars =
       "class TestClass  {\n"
       "  static int fld2 = 11;\n"
@@ -4645,7 +4646,7 @@
   EXPECT_EQ(11, value);
 }
 
-TEST_CASE(SetField_CheckIsolate) {
+TEST_CASE(DartAPI_SetField_CheckIsolate) {
   const char* kScriptChars =
       "class TestClass  {\n"
       "  static int fld2 = 11;\n"
@@ -4669,7 +4670,7 @@
   EXPECT_EQ(13, value);
 }
 
-TEST_CASE(New) {
+TEST_CASE(DartAPI_New) {
   const char* kScriptChars =
       "class MyClass {\n"
       "  MyClass() : foo = 7 {}\n"
@@ -4900,7 +4901,7 @@
   EXPECT(!instanceOf);
 }
 
-TEST_CASE(New_Issue2971) {
+TEST_CASE(DartAPI_New_Issue2971) {
   // Issue 2971: We were unable to use Dart_New to construct an
   // instance of List, due to problems implementing interface
   // factories.
@@ -4925,7 +4926,7 @@
   return Api::NewHandle(thread, library_obj.PrivateName(name));
 }
 
-TEST_CASE(Invoke) {
+TEST_CASE(DartAPI_Invoke) {
   const char* kScriptChars =
       "class BaseMethods {\n"
       "  inheritedMethod(arg) => 'inherited $arg';\n"
@@ -5044,7 +5045,7 @@
   EXPECT_STREQ("hidden top !!!", str);
 }
 
-TEST_CASE(Invoke_PrivateStatic) {
+TEST_CASE(DartAPI_Invoke_PrivateStatic) {
   const char* kScriptChars =
       "class Methods {\n"
       "  static _staticMethod(arg) => 'hidden static $arg';\n"
@@ -5069,7 +5070,7 @@
   EXPECT_STREQ("hidden static !!!", str);
 }
 
-TEST_CASE(Invoke_FunnyArgs) {
+TEST_CASE(DartAPI_Invoke_FunnyArgs) {
   const char* kScriptChars = "test(arg) => 'hello $arg';\n";
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -5115,7 +5116,7 @@
   EXPECT_STREQ("myerror", Dart_GetError(result));
 }
 
-TEST_CASE(Invoke_Null) {
+TEST_CASE(DartAPI_Invoke_Null) {
   Dart_Handle result = Dart_Invoke(Dart_Null(), NewString("toString"), 0, NULL);
   EXPECT_VALID(result);
   EXPECT(Dart_IsString(result));
@@ -5130,7 +5131,7 @@
   EXPECT(Dart_ErrorHasException(result));
 }
 
-TEST_CASE(InvokeNoSuchMethod) {
+TEST_CASE(DartAPI_InvokeNoSuchMethod) {
   const char* kScriptChars =
       "import 'dart:_internal' as _internal;\n"
       "class Expect {\n"
@@ -5194,7 +5195,7 @@
   EXPECT_EQ(3, value);
 }
 
-TEST_CASE(Invoke_CrossLibrary) {
+TEST_CASE(DartAPI_Invoke_CrossLibrary) {
   const char* kLibrary1Chars =
       "library library1_name;\n"
       "void local() {}\n"
@@ -5232,7 +5233,7 @@
                "did not find top-level function '_imported'");
 }
 
-TEST_CASE(InvokeClosure) {
+TEST_CASE(DartAPI_InvokeClosure) {
   const char* kScriptChars =
       "class InvokeClosure {\n"
       "  InvokeClosure(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -5312,7 +5313,7 @@
   return reinterpret_cast<Dart_NativeFunction>(&ExceptionNative);
 }
 
-TEST_CASE(ThrowException) {
+TEST_CASE(DartAPI_ThrowException) {
   const char* kScriptChars = "int test() native \"ThrowException_native\";";
   Dart_Handle result;
   intptr_t size = thread->ZoneSizeInBytes();
@@ -5484,7 +5485,7 @@
   return NULL;
 }
 
-TEST_CASE(GetNativeArguments) {
+TEST_CASE(DartAPI_GetNativeArguments) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -5550,7 +5551,7 @@
   return reinterpret_cast<Dart_NativeFunction>(&NativeArgumentCounter);
 }
 
-TEST_CASE(GetNativeArgumentCount) {
+TEST_CASE(DartAPI_GetNativeArgumentCount) {
   const char* kScriptChars =
       "class MyObject {"
       "  int method1(int i, int j) native 'Name_Does_Not_Matter';"
@@ -5573,7 +5574,7 @@
   EXPECT_EQ(3, value);
 }
 
-TEST_CASE(GetType) {
+TEST_CASE(DartAPI_GetType) {
   const char* kScriptChars =
       "library testlib;\n"
       "class Class {\n"
@@ -5621,7 +5622,7 @@
   EXPECT_STREQ("myerror", Dart_GetError(type));
 }
 
-TEST_CASE(InstanceOf) {
+TEST_CASE(DartAPI_InstanceOf) {
   const char* kScriptChars =
       "class OtherClass {\n"
       "  static returnNull() { return null; }\n"
@@ -5695,7 +5696,7 @@
   return Api::Success();
 }
 
-TEST_CASE(LoadScript) {
+TEST_CASE(DartAPI_LoadScript) {
   const char* kScriptChars =
       "main() {"
       "  return 12345;"
@@ -5768,7 +5769,7 @@
                    Dart_GetError(result));
 }
 
-TEST_CASE(RootLibrary) {
+TEST_CASE(DartAPI_RootLibrary) {
   const char* kScriptChars =
       "library testlib;"
       "main() {"
@@ -5857,7 +5858,7 @@
   return Api::Success();
 }
 
-TEST_CASE(LoadScript_CompileError) {
+TEST_CASE(DartAPI_LoadScript_CompileError) {
   const char* kScriptChars = ")";
   Dart_Handle result = Dart_SetLibraryTagHandler(import_library_handler);
   EXPECT_VALID(result);
@@ -5868,7 +5869,7 @@
   }
 }
 
-TEST_CASE(LookupLibrary) {
+TEST_CASE(DartAPI_LookupLibrary) {
   const char* kScriptChars =
       "import 'library1_dart';"
       "main() {}";
@@ -5914,7 +5915,7 @@
                Dart_GetError(result));
 }
 
-TEST_CASE(LibraryName) {
+TEST_CASE(DartAPI_LibraryName) {
   const char* kLibrary1Chars = "library library1_name;";
   Dart_Handle url = NewString("library1_url");
   Dart_Handle source = NewString(kLibrary1Chars);
@@ -5947,7 +5948,7 @@
 
 #ifndef PRODUCT
 
-TEST_CASE(LibraryId) {
+TEST_CASE(DartAPI_LibraryId) {
   const char* kLibrary1Chars = "library library1_name;";
   Dart_Handle url = NewString("library1_url");
   Dart_Handle source = NewString(kLibrary1Chars);
@@ -5984,7 +5985,7 @@
 
 #endif  // !PRODUCT
 
-TEST_CASE(LibraryUrl) {
+TEST_CASE(DartAPI_LibraryUrl) {
   const char* kLibrary1Chars = "library library1_name;";
   Dart_Handle url = NewString("library1_url");
   Dart_Handle source = NewString(kLibrary1Chars);
@@ -6015,7 +6016,7 @@
   EXPECT_STREQ("library1_url", cstr);
 }
 
-TEST_CASE(LibraryGetClassNames) {
+TEST_CASE(DartAPI_LibraryGetClassNames) {
   const char* kLibraryChars =
       "library library_name;\n"
       "\n"
@@ -6053,7 +6054,7 @@
   EXPECT_STREQ("[A, B, C, _A, _B, _C]", list_cstr);
 }
 
-TEST_CASE(GetFunctionNames) {
+TEST_CASE(DartAPI_GetFunctionNames) {
   const char* kLibraryChars =
       "library library_name;\n"
       "\n"
@@ -6081,9 +6082,7 @@
       "sort(list) => list.sort(_compare);\n";
 
   // Get the functions from a library.
-  Dart_Handle url = NewString("library_url");
-  Dart_Handle source = NewString(kLibraryChars);
-  Dart_Handle lib = Dart_LoadLibrary(url, Dart_Null(), source, 0, 0);
+  Dart_Handle lib = TestCase::LoadTestScript(kLibraryChars, NULL);
   EXPECT_VALID(lib);
   Dart_Handle result = Dart_FinalizeLoading(false);
   EXPECT_VALID(result);
@@ -6124,7 +6123,7 @@
   EXPECT_STREQ("[A2, B2, C2=, MyClass, _A2, _B2, _C2=]", list_cstr);
 }
 
-TEST_CASE(LibraryImportLibrary) {
+TEST_CASE(DartAPI_LibraryImportLibrary) {
   const char* kLibrary1Chars = "library library1_name;";
   const char* kLibrary2Chars = "library library2_name;";
   Dart_Handle error = Dart_NewApiError("incoming error");
@@ -6178,7 +6177,7 @@
   EXPECT_VALID(result);
 }
 
-TEST_CASE(ImportLibraryWithPrefix) {
+TEST_CASE(DartAPI_ImportLibraryWithPrefix) {
   const char* kLibrary1Chars =
       "library library1_name;"
       "int bar() => 42;";
@@ -6219,7 +6218,7 @@
   EXPECT_EQ(42, value);
 }
 
-TEST_CASE(LoadLibrary) {
+TEST_CASE(DartAPI_LoadLibrary) {
   const char* kLibrary1Chars = "library library1_name;";
   Dart_Handle error = Dart_NewApiError("incoming error");
   Dart_Handle result;
@@ -6279,7 +6278,7 @@
       Dart_GetError(result));
 }
 
-TEST_CASE(LoadLibrary_CompileError) {
+TEST_CASE(DartAPI_LoadLibrary_CompileError) {
   const char* kLibrary1Chars =
       "library library1_name;"
       ")";
@@ -6290,7 +6289,7 @@
   EXPECT(strstr(Dart_GetError(result), "unexpected token ')'"));
 }
 
-TEST_CASE(LoadSource) {
+TEST_CASE(DartAPI_LoadSource) {
   const char* kLibrary1Chars = "library library1_name;";
   const char* kSourceChars = "part of library1_name;\n// Something innocuous";
   const char* kBadSourceChars = ")";
@@ -6379,7 +6378,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(LoadSource_LateLoad) {
+TEST_CASE(DartAPI_LoadSource_LateLoad) {
   const char* kLibrary1Chars =
       "library library1_name;\n"
       "class OldClass {\n"
@@ -6428,7 +6427,7 @@
   EXPECT_STREQ("bar", result_cstr);
 }
 
-TEST_CASE(LoadPatch) {
+TEST_CASE(DartAPI_LoadPatch) {
   const char* kLibrary1Chars = "library library1_name;";
   const char* kSourceChars =
       "part of library1_name;\n"
@@ -6464,7 +6463,7 @@
   EXPECT_EQ(42, value);
 }
 
-TEST_CASE(LoadPatchSignatureMismatch) {
+TEST_CASE(DartAPI_LoadPatchSignatureMismatch) {
   // This tests the sort of APIs with intentional signature mismatches we need
   // for typed Dart-JavaScript interop where we emulated JavaScript semantics
   // for optional arguments.
@@ -6592,7 +6591,7 @@
   return &PatchNativeFunction;
 }
 
-TEST_CASE(ParsePatchLibrary) {
+TEST_CASE(DartAPI_ParsePatchLibrary) {
   const char* kLibraryChars =
       "library patched_library;\n"
       "class A {\n"
@@ -6790,7 +6789,7 @@
   return &MyNativeFunction2;
 }
 
-TEST_CASE(SetNativeResolver) {
+TEST_CASE(DartAPI_SetNativeResolver) {
   const char* kScriptChars =
       "class Test {"
       "  static foo() native \"SomeNativeFunction\";\n"
@@ -6868,7 +6867,7 @@
 
 // Test that an imported name does not clash with the same name defined
 // in the importing library.
-TEST_CASE(ImportLibrary2) {
+TEST_CASE(DartAPI_ImportLibrary2) {
   const char* kScriptChars =
       "import 'library1_dart';\n"
       "var foo;\n"
@@ -6905,7 +6904,7 @@
 
 // Test that if the same name is imported from two libraries, it is
 // an error if that name is referenced.
-TEST_CASE(ImportLibrary3) {
+TEST_CASE(DartAPI_ImportLibrary3) {
   const char* kScriptChars =
       "import 'library2_dart';\n"
       "import 'library1_dart';\n"
@@ -6944,7 +6943,7 @@
 
 // Test that if the same name is imported from two libraries, it is
 // not an error if that name is not used.
-TEST_CASE(ImportLibrary4) {
+TEST_CASE(DartAPI_ImportLibrary4) {
   const char* kScriptChars =
       "import 'library2_dart';\n"
       "import 'library1_dart';\n"
@@ -6978,7 +6977,7 @@
   EXPECT_VALID(result);
 }
 
-TEST_CASE(ImportLibrary5) {
+TEST_CASE(DartAPI_ImportLibrary5) {
   const char* kScriptChars =
       "import 'lib.dart';\n"
       "abstract class Y {\n"
@@ -7038,19 +7037,19 @@
                    response);
 }
 
-TEST_CASE(IllegalNewSendPort) {
+TEST_CASE(DartAPI_IllegalNewSendPort) {
   Dart_Handle error = Dart_NewSendPort(ILLEGAL_PORT);
   EXPECT(Dart_IsError(error));
   EXPECT(Dart_IsApiError(error));
 }
 
-TEST_CASE(IllegalPost) {
+TEST_CASE(DartAPI_IllegalPost) {
   Dart_Handle message = Dart_True();
   bool success = Dart_Post(ILLEGAL_PORT, message);
   EXPECT(!success);
 }
 
-VM_UNIT_TEST_CASE(NewNativePort) {
+VM_UNIT_TEST_CASE(DartAPI_NewNativePort) {
   // Create a port with a bogus handler.
   Dart_Port error_port = Dart_NewNativePort("Foo", NULL, true);
   EXPECT_EQ(ILLEGAL_PORT, error_port);
@@ -7133,7 +7132,7 @@
                    321);
 }
 
-TEST_CASE(NativePortPostInteger) {
+TEST_CASE(DartAPI_NativePortPostInteger) {
   const char* kScriptChars =
       "import 'dart:isolate';\n"
       "void callPort(SendPort port) {\n"
@@ -7198,7 +7197,7 @@
   }
 }
 
-TEST_CASE(NativePortReceiveNull) {
+TEST_CASE(DartAPI_NativePortReceiveNull) {
   const char* kScriptChars =
       "import 'dart:isolate';\n"
       "void callPort(SendPort port) {\n"
@@ -7250,7 +7249,7 @@
   }
 }
 
-TEST_CASE(NativePortReceiveInteger) {
+TEST_CASE(DartAPI_NativePortReceiveInteger) {
   const char* kScriptChars =
       "import 'dart:isolate';\n"
       "void callPort(SendPort port) {\n"
@@ -7357,11 +7356,11 @@
   Isolate::SetCreateCallback(saved);
 }
 
-VM_UNIT_TEST_CASE(RunLoop_Success) {
+VM_UNIT_TEST_CASE(DartAPI_RunLoop_Success) {
   RunLoopTest(false);
 }
 
-VM_UNIT_TEST_CASE(RunLoop_Exception) {
+VM_UNIT_TEST_CASE(DartAPI_RunLoop_Exception) {
   RunLoopTest(true);
 }
 
@@ -7408,9 +7407,12 @@
   {
     MonitorLocker ml(sync);
     char* error = NULL;
+    Dart_IsolateFlags api_flags;
+    Isolate::FlagsInitialize(&api_flags);
+    api_flags.use_dart_frontend = FLAG_use_dart_frontend;
     shared_isolate = Dart_CreateIsolate(
         NULL, NULL, bin::core_isolate_snapshot_data,
-        bin::core_isolate_snapshot_instructions, NULL, NULL, &error);
+        bin::core_isolate_snapshot_instructions, &api_flags, NULL, &error);
     EXPECT(shared_isolate != NULL);
     Dart_EnterScope();
     Dart_Handle url = NewString(TestCase::url());
@@ -7449,7 +7451,7 @@
   saved_callback_data = callback_data;
 }
 
-VM_UNIT_TEST_CASE(IsolateShutdown) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateShutdown) {
   Dart_IsolateShutdownCallback saved = Isolate::ShutdownCallback();
   Isolate::SetShutdownCallback(IsolateShutdownTestCallback);
 
@@ -7497,7 +7499,7 @@
   Dart_ExitScope();
 }
 
-VM_UNIT_TEST_CASE(IsolateShutdownRunDartCode) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateShutdownRunDartCode) {
   const char* kScriptChars =
       "int add(int a, int b) {\n"
       "  return a + b;\n"
@@ -7509,9 +7511,12 @@
 
   // Create an isolate.
   char* err;
+  Dart_IsolateFlags api_flags;
+  Isolate::FlagsInitialize(&api_flags);
+  api_flags.use_dart_frontend = FLAG_use_dart_frontend;
   Dart_Isolate isolate = Dart_CreateIsolate(
       NULL, NULL, bin::core_isolate_snapshot_data,
-      bin::core_isolate_snapshot_instructions, NULL, NULL, &err);
+      bin::core_isolate_snapshot_instructions, &api_flags, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
@@ -7637,7 +7642,7 @@
   }
 }
 
-TEST_CASE(NativeFunctionClosure) {
+TEST_CASE(DartAPI_NativeFunctionClosure) {
   const char* kScriptChars =
       "class Test {"
       "  int foo1() native \"NativeFoo1\";\n"
@@ -7776,7 +7781,7 @@
   }
 }
 
-TEST_CASE(NativeStaticFunctionClosure) {
+TEST_CASE(DartAPI_NativeStaticFunctionClosure) {
   const char* kScriptChars =
       "class Test {"
       "  static int foo1() native \"StaticNativeFoo1\";\n"
@@ -7848,7 +7853,7 @@
   EXPECT_EQ(0, value);
 }
 
-TEST_CASE(RangeLimits) {
+TEST_CASE(DartAPI_RangeLimits) {
   uint8_t chars8[1] = {'a'};
   uint16_t chars16[1] = {'a'};
   int32_t chars32[1] = {'a'};
@@ -7873,7 +7878,7 @@
       "expects argument 'length' to be in the range");
 }
 
-TEST_CASE(NewString_Null) {
+TEST_CASE(DartAPI_NewString_Null) {
   Dart_Handle str = Dart_NewStringFromUTF8(NULL, 0);
   EXPECT_VALID(str);
   EXPECT(Dart_IsString(str));
@@ -7898,7 +7903,7 @@
 
 // Try to allocate a peer with a handles to objects of prohibited
 // subtypes.
-TEST_CASE(InvalidGetSetPeer) {
+TEST_CASE(DartAPI_InvalidGetSetPeer) {
   void* out = &out;
   EXPECT(Dart_IsError(Dart_GetPeer(Dart_Null(), &out)));
   EXPECT(out == &out);
@@ -7935,7 +7940,7 @@
 // Allocates an object in new space and assigns it a peer.  Removes
 // the peer and checks that the count of peer objects is decremented
 // by one.
-TEST_CASE(OneNewSpacePeer) {
+TEST_CASE(DartAPI_OneNewSpacePeer) {
   Isolate* isolate = Isolate::Current();
   Dart_Handle str = NewString("a string");
   EXPECT_VALID(str);
@@ -7960,7 +7965,7 @@
 // Allocates an object in new space and assigns it a peer.  Allows the
 // peer referent to be garbage collected and checks that the count of
 // peer objects is decremented by one.
-TEST_CASE(CollectOneNewSpacePeer) {
+TEST_CASE(DartAPI_CollectOneNewSpacePeer) {
   Isolate* isolate = Isolate::Current();
   Dart_EnterScope();
   {
@@ -7999,7 +8004,7 @@
 // Allocates two objects in new space and assigns them peers.  Removes
 // the peers and checks that the count of peer objects is decremented
 // by two.
-TEST_CASE(TwoNewSpacePeers) {
+TEST_CASE(DartAPI_TwoNewSpacePeers) {
   Isolate* isolate = Isolate::Current();
   Dart_Handle s1 = NewString("s1");
   EXPECT_VALID(s1);
@@ -8038,7 +8043,7 @@
 // Allocates two objects in new space and assigns them a peer.  Allow
 // the peer referents to be garbage collected and check that the count
 // of peer objects is decremented by two.
-TEST_CASE(CollectTwoNewSpacePeers) {
+TEST_CASE(DartAPI_CollectTwoNewSpacePeers) {
   Isolate* isolate = Isolate::Current();
   Dart_EnterScope();
   {
@@ -8079,7 +8084,7 @@
 
 // Allocates several objects in new space.  Performs successive
 // garbage collections and checks that the peer count is stable.
-TEST_CASE(CopyNewSpacePeers) {
+TEST_CASE(DartAPI_CopyNewSpacePeers) {
   const int kPeerCount = 10;
   Isolate* isolate = Isolate::Current();
   Dart_Handle s[kPeerCount];
@@ -8113,7 +8118,7 @@
 // Allocates an object in new space and assigns it a peer.  Promotes
 // the peer to old space.  Removes the peer and check that the count
 // of peer objects is decremented by one.
-TEST_CASE(OnePromotedPeer) {
+TEST_CASE(DartAPI_OnePromotedPeer) {
   Isolate* isolate = Isolate::Current();
   Dart_Handle str = NewString("a string");
   EXPECT_VALID(str);
@@ -8153,7 +8158,7 @@
 // Allocates an object in old space and assigns it a peer.  Removes
 // the peer and checks that the count of peer objects is decremented
 // by one.
-TEST_CASE(OneOldSpacePeer) {
+TEST_CASE(DartAPI_OneOldSpacePeer) {
   Isolate* isolate = Isolate::Current();
   Dart_Handle str = Api::NewHandle(thread, String::New("str", Heap::kOld));
   EXPECT_VALID(str);
@@ -8185,7 +8190,7 @@
 // Allocates an object in old space and assigns it a peer.  Allow the
 // peer referent to be garbage collected and check that the count of
 // peer objects is decremented by one.
-TEST_CASE(CollectOneOldSpacePeer) {
+TEST_CASE(DartAPI_CollectOneOldSpacePeer) {
   Isolate* isolate = Isolate::Current();
   Dart_EnterScope();
   {
@@ -8224,7 +8229,7 @@
 // Allocates two objects in old space and assigns them peers.  Removes
 // the peers and checks that the count of peer objects is decremented
 // by two.
-TEST_CASE(TwoOldSpacePeers) {
+TEST_CASE(DartAPI_TwoOldSpacePeers) {
   Isolate* isolate = Isolate::Current();
   Dart_Handle s1 = Api::NewHandle(thread, String::New("s1", Heap::kOld));
   EXPECT_VALID(s1);
@@ -8267,7 +8272,7 @@
 // Allocates two objects in old space and assigns them a peer.  Allows
 // the peer referents to be garbage collected and checks that the
 // count of peer objects is decremented by two.
-TEST_CASE(CollectTwoOldSpacePeers) {
+TEST_CASE(DartAPI_CollectTwoOldSpacePeers) {
   Isolate* isolate = Isolate::Current();
   Dart_EnterScope();
   {
@@ -8314,7 +8319,7 @@
   *static_cast<int*>(peer) *= 2;
 }
 
-TEST_CASE(MakeExternalString) {
+TEST_CASE(DartAPI_MakeExternalString) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8499,7 +8504,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalizeConstantStrings) {
+TEST_CASE(DartAPI_ExternalizeConstantStrings) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8524,7 +8529,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(LazyLoadDeoptimizes) {
+TEST_CASE(DartAPI_LazyLoadDeoptimizes) {
   const char* kLoadFirst =
       "library L;\n"
       "start(a) {\n"
@@ -8603,7 +8608,7 @@
 
 // Do not use guarding mechanism on externalizable classes, since their class
 // can change on the fly,
-TEST_CASE(GuardExternalizedString) {
+TEST_CASE(DartAPI_GuardExternalizedString) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8642,7 +8647,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringDeoptimize) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8677,7 +8682,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringPolymorphicDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringPolymorphicDeoptimize) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8713,7 +8718,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringLoadElimination) {
+TEST_CASE(DartAPI_ExternalStringLoadElimination) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8743,7 +8748,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringGuardFieldDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringGuardFieldDeoptimize) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8784,7 +8789,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringStaticFieldDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringStaticFieldDeoptimize) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8820,7 +8825,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringTrimDoubleParse) {
+TEST_CASE(DartAPI_ExternalStringTrimDoubleParse) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8849,7 +8854,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringDoubleParse) {
+TEST_CASE(DartAPI_ExternalStringDoubleParse) {
   const bool saved_flag = FLAG_support_externalizable_strings;
   FLAG_support_externalizable_strings = true;
 
@@ -8878,7 +8883,7 @@
   FLAG_support_externalizable_strings = saved_flag;
 }
 
-TEST_CASE(ExternalStringIndexOf) {
+TEST_CASE(DartAPI_ExternalStringIndexOf) {
   const char* kScriptChars =
       "main(String pattern) {\n"
       "  var str = 'Hello World';\n"
@@ -8902,7 +8907,7 @@
   EXPECT_EQ(6, value);
 }
 
-TEST_CASE(StringFromExternalTypedData) {
+TEST_CASE(DartAPI_StringFromExternalTypedData) {
   const char* kScriptChars =
       "test(external) {\n"
       "  var str1 = new String.fromCharCodes(external);\n"
@@ -8981,7 +8986,7 @@
 
 #ifndef PRODUCT
 
-TEST_CASE(Timeline_Dart_TimelineDuration) {
+TEST_CASE(DartAPI_TimelineDuration) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
   TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -8999,7 +9004,7 @@
   EXPECT_SUBSTRING("testDurationEvent", js.ToCString());
 }
 
-TEST_CASE(Timeline_Dart_TimelineInstant) {
+TEST_CASE(DartAPI_TimelineInstant) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
   TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -9016,7 +9021,7 @@
   EXPECT_SUBSTRING("testInstantEvent", js.ToCString());
 }
 
-TEST_CASE(Timeline_Dart_TimelineAsyncDisabled) {
+TEST_CASE(DartAPI_TimelineAsyncDisabled) {
   // Grab embedder stream.
   TimelineStream* stream = Timeline::GetEmbedderStream();
   // Make sure it is disabled.
@@ -9033,7 +9038,7 @@
   EXPECT_NOTSUBSTRING("testAsyncEvent", js.ToCString());
 }
 
-TEST_CASE(Timeline_Dart_TimelineAsync) {
+TEST_CASE(DartAPI_TimelineAsync) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
   TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -9083,7 +9088,7 @@
   data->buffer_length += buffer_length;
 }
 
-TEST_CASE(Timeline_Dart_TimelineGetTrace) {
+TEST_CASE(DartAPI_TimelineGetTrace) {
   const char* kScriptChars =
       "foo() => 'a';\n"
       "main() => foo();\n";
@@ -9126,7 +9131,7 @@
   free(data.buffer);
 }
 
-TEST_CASE(Timeline_Dart_TimelineGetTraceOnlyDartEvents) {
+TEST_CASE(DartAPI_TimelineGetTraceOnlyDartEvents) {
   const char* kScriptChars =
       "import 'dart:developer';\n"
       ""
@@ -9173,7 +9178,7 @@
   free(data.buffer);
 }
 
-TEST_CASE(Timeline_Dart_TimelineGetTraceWithDartEvents) {
+TEST_CASE(DartAPI_TimelineGetTraceWithDartEvents) {
   const char* kScriptChars =
       "import 'dart:developer';\n"
       "\n"
@@ -9222,7 +9227,7 @@
   free(data.buffer);
 }
 
-TEST_CASE(Timeline_Dart_TimelineGetTraceGlobalOverride) {
+TEST_CASE(DartAPI_TimelineGetTraceGlobalOverride) {
   const char* kScriptChars =
       "foo() => 'a';\n"
       "main() => foo();\n";
@@ -9269,7 +9274,7 @@
 
 static const char* arg_values[] = {"value0"};
 
-TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace) {
+TEST_CASE(DartAPI_GlobalTimelineGetTrace) {
   const char* kScriptChars =
       "bar() => 'z';\n"
       "foo() => 'a';\n"
@@ -9435,7 +9440,7 @@
 // Dart_GlobalTimelineGetTrace are made from a fresh thread. This ensures that
 // we can call the function from a thread for which we have not set up a
 // Thread object.
-TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace_Threaded) {
+TEST_CASE(DartAPI_GlobalTimelineGetTrace_Threaded) {
   const char* kScriptChars =
       "bar() => 'z';\n"
       "foo() => 'a';\n"
@@ -9543,7 +9548,7 @@
   stop_called = true;
 }
 
-TEST_CASE(Timeline_Dart_EmbedderTimelineStartStopRecording) {
+TEST_CASE(DartAPI_EmbedderTimelineStartStopRecording) {
   Dart_SetEmbedderTimelineCallbacks(StartRecording, StopRecording);
 
   EXPECT(!start_called);
@@ -9561,7 +9566,7 @@
   EXPECT(stop_called);
 }
 
-TEST_CASE(Dart_LoadLibraryPatch_1) {
+TEST_CASE(DartAPI_LoadLibraryPatch_1) {
   const char* kScriptChars1 =
       "class A {\n"
       "  int foo() { return 10; }\n"
@@ -9593,7 +9598,7 @@
   EXPECT_VALID(result);
 }
 
-TEST_CASE(Dart_LoadLibraryPatch_Error1) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error1) {
   const char* kScriptChars1 =
       "class A {\n"
       "  int foo() { return 10; }\n"
@@ -9623,7 +9628,7 @@
   EXPECT(Dart_IsError(result));
 }
 
-TEST_CASE(Dart_LoadLibraryPatch_Error2) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error2) {
   const char* kScriptChars1 =
       "class A {\n"
       "  int foo() { return 10; }\n"
@@ -9653,7 +9658,7 @@
   OS::Print("Patched class executed\n");
 }
 
-TEST_CASE(Dart_LoadLibraryPatch_Error3) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error3) {
   const char* kScriptChars1 =
       "class A {\n"
       "  int foo() { return 10; }\n"
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 396a869..cbb528e 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -58,7 +58,6 @@
             "the VM service.");
 
 DECLARE_FLAG(bool, warn_on_pause_with_no_debugger);
-DECLARE_FLAG(bool, use_dart_frontend);
 
 #ifndef PRODUCT
 
@@ -672,8 +671,10 @@
   OS::PrintErr("pc_ %" Px "\n", pc_);
   OS::PrintErr("deopt_id_ %" Px "\n", deopt_id_);
   OS::PrintErr("context_level_ %" Px "\n", context_level_);
+#if !defined(DART_PRECOMPILED_RUNTIME)
   DisassembleToStdout formatter;
   code().Disassemble(&formatter);
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
   PcDescriptors::Handle(code().pc_descriptors()).Print();
   StackFrameIterator frames(StackFrameIterator::kDontValidateFrames,
                             Thread::Current(),
@@ -1780,6 +1781,7 @@
   return activation;
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 RawArray* Debugger::DeoptimizeToArray(Thread* thread,
                                       StackFrame* frame,
                                       const Code& code) {
@@ -1801,6 +1803,7 @@
 
   return dest_frame.raw();
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 DebuggerStackTrace* Debugger::CollectStackTrace() {
   Thread* thread = Thread::Current();
@@ -1838,7 +1841,8 @@
                                 Code* code,
                                 Code* inlined_code,
                                 Array* deopt_frame) {
-  if (code->is_optimized() && !FLAG_precompiled_runtime) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  if (code->is_optimized()) {
     // TODO(rmacnak): Use CodeSourceMap
     *deopt_frame = DeoptimizeToArray(thread, frame, *code);
     for (InlinedFunctionsIterator it(*code, frame->pc()); !it.Done();
@@ -1855,10 +1859,11 @@
                                                   *inlined_code, *deopt_frame,
                                                   deopt_frame_offset));
     }
-  } else {
-    stack_trace->AddActivation(CollectDartFrame(
-        isolate, frame->pc(), frame, *code, Object::null_array(), 0));
+    return;
   }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+  stack_trace->AddActivation(CollectDartFrame(isolate, frame->pc(), frame,
+                                              *code, Object::null_array(), 0));
 }
 
 DebuggerStackTrace* Debugger::CollectAsyncCausalStackTrace() {
@@ -1947,11 +1952,14 @@
 }
 
 DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  // Causal async stacks are not supported in the AOT runtime.
+  ASSERT(!FLAG_async_debugger);
+  return NULL;
+#else
   if (!FLAG_async_debugger) {
     return NULL;
   }
-  // Causal async stacks are not supported in the AOT runtime.
-  ASSERT(!FLAG_precompiled_runtime);
 
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
@@ -2090,6 +2098,7 @@
   }
 
   return stack_trace;
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 ActivationFrame* Debugger::TopDartFrame() const {
@@ -2577,7 +2586,8 @@
                            TokenPosition token_pos,
                            TokenPosition last_token_pos,
                            Function* best_fit) {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   Class& cls = Class::Handle(zone);
   Library& lib = Library::Handle(zone, script.FindLibrary());
   ASSERT(!lib.IsNull());
@@ -2670,7 +2680,7 @@
 
         bool has_func_literal_initializer = false;
 #ifndef DART_PRECOMPILED_RUNTIME
-        if (FLAG_use_dart_frontend) {
+        if (isolate_->use_dart_frontend()) {
           has_func_literal_initializer =
               kernel::KernelReader::FieldHasFunctionLiteralInitializer(
                   field, &start, &end);
@@ -3269,8 +3279,9 @@
   if (!FLAG_async_debugger) {
     return;
   }
-  if (stack_trace_->FrameAt(0)->function().IsAsyncClosure() ||
-      stack_trace_->FrameAt(0)->function().IsAsyncGenClosure()) {
+  if ((stack_trace_->Length()) > 0 &&
+      (stack_trace_->FrameAt(0)->function().IsAsyncClosure() ||
+       stack_trace_->FrameAt(0)->function().IsAsyncGenClosure())) {
     async_stepping_fp_ = stack_trace_->FrameAt(0)->fp();
   } else {
     async_stepping_fp_ = 0;
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 665a3ef..db6468e 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -10,6 +10,7 @@
 #include "vm/object.h"
 #include "vm/port.h"
 #include "vm/service_event.h"
+#include "vm/simulator.h"
 
 DECLARE_FLAG(bool, verbose_debug);
 
@@ -673,9 +674,11 @@
       const Array& deopt_frame,
       intptr_t deopt_frame_offset,
       ActivationFrame::Kind kind = ActivationFrame::kRegular);
+#if !defined(DART_PRECOMPILED_RUNTIME)
   static RawArray* DeoptimizeToArray(Thread* thread,
                                      StackFrame* frame,
                                      const Code& code);
+#endif
   // Appends at least one stack frame. Multiple frames will be appended
   // if |code| at the frame's pc contains inlined functions.
   static void AppendCodeFrames(Thread* thread,
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 2cc5697..e1cc805 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -332,7 +332,7 @@
   }
 }
 
-TEST_CASE(Debug_Breakpoint) {
+TEST_CASE(DebuggerAPI_Breakpoint) {
   const char* kScriptChars =
       "void moo(s) { }        \n"
       "class A {              \n"
@@ -494,11 +494,11 @@
   isolate->set_use_osr(saved_use_osr);
 }
 
-TEST_CASE(Debug_InspectStack_NotOptimized) {
+TEST_CASE(DebuggerAPI_InspectStack_NotOptimized) {
   InspectStackTest(false);
 }
 
-TEST_CASE(Debug_InspectStack_Optimized) {
+TEST_CASE(DebuggerAPI_InspectStack_Optimized) {
   // Ensure code gets optimized.
   FLAG_background_compilation = false;
   InspectStackTest(true);
@@ -591,11 +591,11 @@
   FLAG_use_osr = saved_osr;
 }
 
-TEST_CASE(Debug_InspectStackWithClosure_NotOptimized) {
+TEST_CASE(DebuggerAPI_InspectStackWithClosure_NotOptimized) {
   InspectStackWithClosureTest(false);
 }
 
-TEST_CASE(Debug_InspectStackWithClosure_Optimized) {
+TEST_CASE(DebuggerAPI_InspectStackWithClosure_Optimized) {
   // Ensure code gets optimized.
   FLAG_background_compilation = false;
   InspectStackWithClosureTest(true);
@@ -632,7 +632,7 @@
   Dart_SetStepOut();
 }
 
-TEST_CASE(Debug_StepOut) {
+TEST_CASE(DebuggerAPI_StepOut) {
   const char* kScriptChars =
       "f1() { return 1; }       \n"
       "f2() { return 2; }       \n"
@@ -713,7 +713,7 @@
   Dart_SetStepInto();
 }
 
-TEST_CASE(Debug_StepInto) {
+TEST_CASE(DebuggerAPI_StepInto) {
   const char* kScriptChars =
       "f1() { return 1; }       \n"
       "f2() { return 2; }       \n"
@@ -766,7 +766,7 @@
   Dart_SetStepInto();
 }
 
-TEST_CASE(Debug_IgnoreBP) {
+TEST_CASE(DebuggerAPI_IgnoreBP) {
   const char* kScriptChars =
       "class B {                \n"
       "  static var z = 0;      \n"
@@ -795,7 +795,7 @@
   EXPECT(breakpoint_hit == true);
 }
 
-TEST_CASE(Debug_DeoptimizeFunction) {
+TEST_CASE(DebuggerAPI_DeoptimizeFunction) {
   const char* kScriptChars =
       "foo(x) => 2 * x;                     \n"
       "                                     \n"
@@ -861,7 +861,7 @@
   Dart_SetStepOver();
 }
 
-TEST_CASE(Debug_SingleStep) {
+TEST_CASE(DebuggerAPI_SingleStep) {
   const char* kScriptChars =
       "moo(s) { return 1; }      \n"
       "                          \n"
@@ -914,7 +914,7 @@
   }
 }
 
-TEST_CASE(Debug_ClosureBreakpoint) {
+TEST_CASE(DebuggerAPI_ClosureBreakpoint) {
   const char* kScriptChars =
       "callback(s) {          \n"
       "  return 111;          \n"
@@ -957,7 +957,7 @@
   VerifyStackTrace(trace, expected_trace, expected_locals, 2, false);
 }
 
-TEST_CASE(Debug_ExprClosureBreakpoint) {
+TEST_CASE(DebuggerAPI_ExprClosureBreakpoint) {
   const char* kScriptChars =
       "var c;                 \n"
       "                       \n"
@@ -1019,7 +1019,7 @@
   return &NoopNativeFunction;
 }
 
-TEST_CASE(Debug_BreakpointStubPatching) {
+TEST_CASE(DebuggerAPI_BreakpointStubPatching) {
   // Note changes to this script may require changes to the breakpoint line
   // numbers below.
   const char* kScriptChars =
@@ -1105,7 +1105,7 @@
   }
 }
 
-TEST_CASE(Debug_DeleteBreakpoint) {
+TEST_CASE(DebuggerAPI_DeleteBreakpoint) {
   const char* kScriptChars =
       "moo(s) { }             \n"
       "                       \n"
@@ -1197,7 +1197,7 @@
   }
 }
 
-TEST_CASE(Debug_InspectStaticField) {
+TEST_CASE(DebuggerAPI_InspectStaticField) {
   const char* kScriptChars =
       " class A {                                 \n"
       "   static var bla = 'yada yada yada';      \n"
@@ -1222,7 +1222,7 @@
   EXPECT_VALID(retval);
 }
 
-TEST_CASE(Debug_InspectObject) {
+TEST_CASE(DebuggerAPI_InspectObject) {
   const char* kScriptChars =
       " class A {                                 \n"
       "   var a_field = 'a';                      \n"
@@ -1365,7 +1365,7 @@
   }
 }
 
-VM_UNIT_TEST_CASE(Debug_IsolateID) {
+VM_UNIT_TEST_CASE(DebuggerAPI_IsolateID) {
   const char* kScriptChars =
       "void moo(s) { }        \n"
       "class A {              \n"
@@ -1488,7 +1488,7 @@
   }
 }
 
-TEST_CASE(Debug_InterruptIsolate) {
+TEST_CASE(DebuggerAPI_InterruptIsolate) {
   bool saved_flag = FLAG_trace_shutdown;
   FLAG_trace_shutdown = true;
   sync = new Monitor();
@@ -1637,7 +1637,7 @@
                    true);
 }
 
-TEST_CASE(Debug_StackTraceDump1) {
+TEST_CASE(DebuggerAPI_StackTraceDump1) {
   const char* kScriptChars =
       "class Test {\n"
       "  Test(int local);\n"
@@ -1793,7 +1793,7 @@
                    true);
 }
 
-TEST_CASE(Debug_StackTraceDump2) {
+TEST_CASE(DebuggerAPI_StackTraceDump2) {
   const char* kScriptChars =
       "class Test {\n"
       "  Test(int local);\n"
@@ -1886,7 +1886,7 @@
   breakpoint_hit_counter++;
 }
 
-TEST_CASE(Debug_EvaluateExpr) {
+TEST_CASE(DebuggerAPI_EvaluateExpr) {
   const char* kScriptChars =
       "import 'dart:math';               \n"
       "main() {                          \n"
@@ -1996,7 +1996,7 @@
   EXPECT_EQ(5.0, ToDouble(result));
 }
 
-TEST_CASE(Debug_EvaluateInActivationOfEvaluate) {
+TEST_CASE(DebuggerAPI_EvaluateInActivationOfEvaluate) {
   // This library deliberately declares no top-level variables or methods. This
   // exercises a path in eval where a library may have no top-level anonymous
   // classes.
@@ -2028,7 +2028,7 @@
 
 // Check that the debugger is not called when an exception is
 // caught by Dart code.
-TEST_CASE(Debug_BreakOnUnhandledException) {
+TEST_CASE(DebuggerAPI_BreakOnUnhandledException) {
   const char* kScriptChars =
       "main() {                        \n"
       "  try {                         \n"
@@ -2063,7 +2063,7 @@
   EXPECT_EQ(1, breakpoint_hit_counter);
 }
 
-TEST_CASE(Debug_GetClosureInfo) {
+TEST_CASE(DebuggerAPI_GetClosureInfo) {
   const char* kScriptChars =
       "void foo() { return 43; } \n"
       "                          \n"
@@ -2094,7 +2094,7 @@
   EXPECT(loc.library_id > 0);
 }
 
-TEST_CASE(Debug_GetSupertype) {
+TEST_CASE(DebuggerAPI_GetSupertype) {
   const char* kScriptChars =
       "class Test {\n"
       "}\n"
@@ -2199,7 +2199,7 @@
   }
 }
 
-TEST_CASE(Debug_ListSuperType) {
+TEST_CASE(DebuggerAPI_ListSuperType) {
   const char* kScriptChars =
       "List testMain() {"
       "  List a = new List();"
@@ -2230,7 +2230,7 @@
   EXPECT(!Dart_IsError(super_type));
 }
 
-TEST_CASE(Debug_ScriptGetTokenInfo_Basic) {
+TEST_CASE(DebuggerAPI_ScriptGetTokenInfo_Basic) {
   const char* kScriptChars =
       "var foo;\n"
       "\n"
@@ -2255,7 +2255,7 @@
       tokens_cstr);
 }
 
-TEST_CASE(Debug_ScriptGetTokenInfo_MultiLineInterpolation) {
+TEST_CASE(DebuggerAPI_ScriptGetTokenInfo_MultiLineInterpolation) {
   const char* kScriptChars =
       "var foo = 'hello world';\n"
       "\n"
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 455e446..bff76a6 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/deferred_objects.h"
 
 #include "vm/code_patcher.h"
@@ -316,3 +318,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 0367a05..3eea0fa 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/deopt_instructions.h"
 
 #include "vm/assembler.h"
@@ -1095,7 +1097,7 @@
         deopt_instr =
             new (zone()) DeoptWordInstr(ToCpuRegisterSource(source_loc));
         break;
-      case kUnboxedMint: {
+      case kUnboxedInt64: {
         if (source_loc.IsPairLocation()) {
           PairLocation* pair = source_loc.AsPairLocation();
           deopt_instr =
@@ -1431,3 +1433,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index ea88628..a6c183c 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/disassembler.h"
 
 #include "vm/assembler.h"
@@ -306,3 +308,5 @@
 #endif  // !PRODUCT
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/disassembler.h b/runtime/vm/disassembler.h
index 364f4f5..2d502de 100644
--- a/runtime/vm/disassembler.h
+++ b/runtime/vm/disassembler.h
@@ -99,7 +99,7 @@
   }
 
   static void Disassemble(uword start, uword end, const Code& code) {
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
     DisassembleToStdout stdout_formatter;
     LogBlock lb;
     Disassemble(start, end, &stdout_formatter, code);
@@ -109,7 +109,7 @@
   }
 
   static void Disassemble(uword start, uword end) {
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
     DisassembleToStdout stdout_formatter;
     LogBlock lb;
     Disassemble(start, end, &stdout_formatter);
diff --git a/runtime/vm/disassembler_arm.cc b/runtime/vm/disassembler_arm.cc
index 47be39d..0fe431b 100644
--- a/runtime/vm/disassembler_arm.cc
+++ b/runtime/vm/disassembler_arm.cc
@@ -2,10 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM.
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/disassembler.h"
 
-#include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM.
-#if defined(TARGET_ARCH_ARM)
 #include "platform/assert.h"
 #include "vm/cpu.h"
 #include "vm/instructions.h"
@@ -1511,4 +1512,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/disassembler_arm64.cc b/runtime/vm/disassembler_arm64.cc
index 17baa0e..f05aea5 100644
--- a/runtime/vm/disassembler_arm64.cc
+++ b/runtime/vm/disassembler_arm64.cc
@@ -2,10 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM64.
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/disassembler.h"
 
-#include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM64.
-#if defined(TARGET_ARCH_ARM64)
 #include "platform/assert.h"
 #include "vm/instructions.h"
 
@@ -1448,4 +1449,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index 3541458..3716d12 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -2,10 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/disassembler.h"
 
-#include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
-#if defined(TARGET_ARCH_IA32)
 #include "platform/utils.h"
 #include "vm/allocation.h"
 #include "vm/heap.h"
@@ -1904,4 +1905,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index 657fbc0..38b7fa7 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -2,10 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/disassembler.h"
 
-#include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
-#if defined(TARGET_ARCH_X64)
 #include "platform/utils.h"
 #include "vm/allocation.h"
 #include "vm/heap.h"
@@ -1941,4 +1942,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index db8eb85..12e21ae 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -123,7 +123,6 @@
   P(polymorphic_with_deopt, bool, true,                                        \
     "Polymorphic calls with deoptimization / megamorphic call")                \
   P(precompiled_mode, bool, false, "Precompilation compiler mode")             \
-  C(precompiled_runtime, true, false, bool, false, "Precompiled runtime mode") \
   P(print_snapshot_sizes, bool, false, "Print sizes of generated snapshots.")  \
   P(print_benchmarking_metrics, bool, false,                                   \
     "Print additional memory and latency metrics for benchmarking.")           \
@@ -134,7 +133,7 @@
   C(print_stop_message, false, false, bool, false, "Print stop message.")      \
   D(print_variable_descriptors, bool, false,                                   \
     "Print variable descriptors in disassembly.")                              \
-  R(profiler, false, bool, !USING_DBC, "Enable the profiler.")                 \
+  R(profiler, false, bool, false, "Enable the profiler.")                      \
   R(profiler_native_memory, false, bool, false,                                \
     "Enable native memory statistic collection.")                              \
   P(reify_generic_functions, bool, false,                                      \
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 943c4de..7f578ce 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph.h"
 
 #include "vm/bit_vector.h"
@@ -1530,7 +1532,7 @@
 
 static bool IsUnboxedInteger(Representation rep) {
   return (rep == kUnboxedInt32) || (rep == kUnboxedUint32) ||
-         (rep == kUnboxedMint);
+         (rep == kUnboxedInt64);
 }
 
 static bool ShouldInlineSimd() {
@@ -1571,7 +1573,7 @@
         UnboxedIntConverterInstr(from, to, use->CopyWithType(), deopt_id);
   } else if ((from == kUnboxedInt32) && (to == kUnboxedDouble)) {
     converted = new Int32ToDoubleInstr(use->CopyWithType());
-  } else if ((from == kUnboxedMint) && (to == kUnboxedDouble) &&
+  } else if ((from == kUnboxedInt64) && (to == kUnboxedDouble) &&
              CanConvertUnboxedMintToDouble()) {
     const intptr_t deopt_id = (deopt_target != NULL)
                                   ? deopt_target->DeoptimizationTarget()
@@ -1717,7 +1719,7 @@
       unboxed =
           RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt32)
               ? kUnboxedInt32
-              : kUnboxedMint;
+              : kUnboxedInt64;
     }
   }
 
@@ -1887,7 +1889,7 @@
           worklist.Add(input);
         } else if (input->IsPhi() && (input->Type()->ToCid() == kSmiCid)) {
           worklist.Add(input);
-        } else if (input->IsBinaryMintOp()) {
+        } else if (input->IsBinaryInt64Op()) {
           // Mint operation produces untagged result. We avoid tagging.
           gain++;
           if (FLAG_support_il_printer && FLAG_trace_smi_widening) {
@@ -1929,9 +1931,9 @@
         } else if (use_defn->IsPhi() &&
                    use_defn->AsPhi()->Type()->ToCid() == kSmiCid) {
           worklist.Add(use_defn);
-        } else if (use_defn->IsBinaryMintOp()) {
-          // BinaryMintOp requires untagging of its inputs.
-          // Converting kUnboxedInt32 to kUnboxedMint is essentially zero cost
+        } else if (use_defn->IsBinaryInt64Op()) {
+          // BinaryInt64Op requires untagging of its inputs.
+          // Converting kUnboxedInt32 to kUnboxedInt64 is essentially zero cost
           // sign extension operation.
           gain++;
           if (FLAG_support_il_printer && FLAG_trace_smi_widening) {
@@ -2064,8 +2066,8 @@
             div_mod_merge.Add(binop);
           }
         }
-      } else if (it.Current()->IsBinaryMintOp()) {
-        BinaryMintOpInstr* mintop = it.Current()->AsBinaryMintOp();
+      } else if (it.Current()->IsBinaryInt64Op()) {
+        BinaryInt64OpInstr* mintop = it.Current()->AsBinaryInt64Op();
         if (mintop->op_kind() == Token::kBIT_AND) {
           OptimizeLeftShiftBitAndSmiOp(&it, mintop,
                                        mintop->left()->definition(),
@@ -2180,8 +2182,8 @@
 
   // Pattern recognized.
   smi_shift_left->mark_truncating();
-  ASSERT(bit_and_instr->IsBinarySmiOp() || bit_and_instr->IsBinaryMintOp());
-  if (bit_and_instr->IsBinaryMintOp()) {
+  ASSERT(bit_and_instr->IsBinarySmiOp() || bit_and_instr->IsBinaryInt64Op());
+  if (bit_and_instr->IsBinaryInt64Op()) {
     // Replace Mint op with Smi op.
     BinarySmiOpInstr* smi_op = new (Z) BinarySmiOpInstr(
         Token::kBIT_AND, new (Z) Value(left_instr), new (Z) Value(right_instr),
@@ -2271,3 +2273,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index e70a5b7..3a1ab0d 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph_allocator.h"
 
 #include "vm/bit_vector.h"
@@ -2848,8 +2850,8 @@
 }
 
 static Representation RepresentationForRange(Representation definition_rep) {
-  if (definition_rep == kUnboxedMint) {
-    // kUnboxedMint is split into two ranges, each of which are kUntagged.
+  if (definition_rep == kUnboxedInt64) {
+    // kUnboxedInt64 is split into two ranges, each of which are kUntagged.
     return kUntagged;
   } else if (definition_rep == kUnboxedUint32) {
     // kUnboxedUint32 is untagged.
@@ -3016,3 +3018,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 363d859..959b410 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph_builder.h"
 
 #include "lib/invocation_mirror.h"
@@ -4420,3 +4422,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 6dadee8..7c7979a 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_XXX.
 
 #include "vm/flow_graph_compiler.h"
@@ -52,57 +54,16 @@
 DECLARE_FLAG(bool, code_comments);
 DECLARE_FLAG(charp, deoptimize_filter);
 DECLARE_FLAG(bool, intrinsify);
-DECLARE_FLAG(bool, propagate_ic_data);
 DECLARE_FLAG(int, regexp_optimization_counter_threshold);
 DECLARE_FLAG(int, reoptimization_counter_threshold);
 DECLARE_FLAG(int, stacktrace_every);
 DECLARE_FLAG(charp, stacktrace_filter);
 DECLARE_FLAG(bool, trace_compiler);
-DECLARE_FLAG(int, reload_every);
-DECLARE_FLAG(bool, unbox_numeric_fields);
-
-static void PrecompilationModeHandler(bool value) {
-  if (value) {
-#if defined(TARGET_ARCH_IA32)
-    FATAL("Precompilation not supported on IA32");
-#endif
-
-    FLAG_background_compilation = false;
-    FLAG_fields_may_be_reset = true;
-    FLAG_interpret_irregexp = true;
-    FLAG_lazy_dispatchers = false;
-    FLAG_link_natives_lazily = true;
-    FLAG_optimization_counter_threshold = -1;
-    FLAG_polymorphic_with_deopt = false;
-    FLAG_precompiled_mode = true;
-    FLAG_reorder_basic_blocks = false;
-    FLAG_use_field_guards = false;
-    FLAG_use_cha_deopt = false;
-    FLAG_unbox_numeric_fields = false;
-    FLAG_enable_mirrors = false;
-
-#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
-    // Set flags affecting runtime accordingly for dart_bootstrap.
-    // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME.
-    FLAG_collect_code = false;
-    FLAG_deoptimize_alot = false;  // Used in some tests.
-    FLAG_deoptimize_every = 0;     // Used in some tests.
-    FLAG_load_deferred_eagerly = true;
-    FLAG_print_stop_message = false;
-    FLAG_use_osr = false;
-#endif
-  }
-}
-
-DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
-                    precompilation,
-                    "Precompilation mode");
 
 #ifdef DART_PRECOMPILED_RUNTIME
 
 COMPILE_ASSERT(!FLAG_collect_code);
 COMPILE_ASSERT(!FLAG_deoptimize_alot);  // Used in some tests.
-COMPILE_ASSERT(FLAG_precompiled_runtime);
 COMPILE_ASSERT(!FLAG_print_stop_message);
 COMPILE_ASSERT(!FLAG_use_osr);
 COMPILE_ASSERT(FLAG_deoptimize_every == 0);  // Used in some tests.
@@ -202,7 +163,11 @@
   ASSERT(assembler != NULL);
   ASSERT(!list_class_.IsNull());
 
-  bool stack_traces_only = !FLAG_profiler;
+#if defined(PRODUCT)
+  const bool stack_traces_only = true;
+#else
+  const bool stack_traces_only = false;
+#endif
   code_source_map_builder_ = new (zone_)
       CodeSourceMapBuilder(stack_traces_only, caller_inline_id,
                            inline_id_to_token_pos, inline_id_to_function);
@@ -1656,7 +1621,7 @@
       return float64x2_class();
     case kUnboxedInt32x4:
       return int32x4_class();
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return mint_class();
     default:
       UNREACHABLE();
@@ -1948,3 +1913,5 @@
 #endif  // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index ef278a2..e83d46f 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM.
-#if defined(TARGET_ARCH_ARM)
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/flow_graph_compiler.h"
 
@@ -1057,7 +1057,8 @@
   }
 
   // Check for a passed type argument vector if the function is generic.
-  if (FLAG_reify_generic_functions && function.IsGeneric()) {
+  if (FLAG_reify_generic_functions && function.IsGeneric() &&
+      !flow_graph().IsCompiledForOsr()) {
     __ Comment("Check passed-in type args");
     Label store_type_args, ok;
     __ ldr(R0, FieldAddress(R4, ArgumentsDescriptor::type_args_len_offset()));
@@ -1805,4 +1806,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index e0395fe..68acd23 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM64.
-#if defined(TARGET_ARCH_ARM64)
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/flow_graph_compiler.h"
 
@@ -1046,7 +1046,8 @@
   }
 
   // Check for a passed type argument vector if the function is generic.
-  if (FLAG_reify_generic_functions && function.IsGeneric()) {
+  if (FLAG_reify_generic_functions && function.IsGeneric() &&
+      !flow_graph().IsCompiledForOsr()) {
     __ Comment("Check passed-in type args");
     Label store_type_args, ok;
     __ LoadFieldFromOffset(R0, R4, ArgumentsDescriptor::type_args_len_offset());
@@ -1746,4 +1747,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM64
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc
index 63da152..06114b2 100644
--- a/runtime/vm/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/flow_graph_compiler_dbc.cc
@@ -404,7 +404,8 @@
   }
 
   // Check for a passed type argument vector if the function is generic.
-  if (FLAG_reify_generic_functions && function.IsGeneric()) {
+  if (FLAG_reify_generic_functions && function.IsGeneric() &&
+      !flow_graph().IsCompiledForOsr()) {
     __ Comment("Check passed-in type args");
     UNIMPLEMENTED();  // TODO(regis): Not yet supported.
   }
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 65331b3..35c1459 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
-#if defined(TARGET_ARCH_IA32)
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/flow_graph_compiler.h"
 
@@ -1063,7 +1063,8 @@
   }
 
   // Check for a passed type argument vector if the function is generic.
-  if (FLAG_reify_generic_functions && function.IsGeneric()) {
+  if (FLAG_reify_generic_functions && function.IsGeneric() &&
+      !flow_graph().IsCompiledForOsr()) {
     __ Comment("Check passed-in type args");
     Label store_type_args, ok;
     __ cmpl(FieldAddress(EDX, ArgumentsDescriptor::type_args_len_offset()),
@@ -1704,4 +1705,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 8aaeaa7..d5d1adf 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_X64.
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/flow_graph_compiler.h"
 
@@ -1059,7 +1059,8 @@
   }
 
   // Check for a passed type argument vector if the function is generic.
-  if (FLAG_reify_generic_functions && function.IsGeneric()) {
+  if (FLAG_reify_generic_functions && function.IsGeneric() &&
+      !flow_graph().IsCompiledForOsr()) {
     __ Comment("Check passed-in type args");
     Label store_type_args, ok;
     __ cmpq(FieldAddress(R10, ArgumentsDescriptor::type_args_len_offset()),
@@ -1682,4 +1683,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 9b44975..8e10ce1 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -1,7 +1,9 @@
 // Copyright (c) 2013, 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.
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph_inliner.h"
 
 #include "vm/aot_optimizer.h"
@@ -3740,4 +3742,5 @@
 }
 
 }  // namespace dart
+
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc
index bbd0b4c..f23e02e 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph_range_analysis.h"
 
 #include "vm/bit_vector.h"
@@ -250,10 +252,10 @@
       if (defn != NULL) {
         if (defn->HasSSATemp() && IsIntegerDefinition(defn)) {
           values_.Add(defn);
-          if (defn->IsBinaryMintOp()) {
-            binary_mint_ops_.Add(defn->AsBinaryMintOp());
-          } else if (defn->IsShiftMintOp()) {
-            shift_mint_ops_.Add(defn->AsShiftMintOp());
+          if (defn->IsBinaryInt64Op()) {
+            binary_int64_ops_.Add(defn->AsBinaryInt64Op());
+          } else if (defn->IsShiftInt64Op()) {
+            shift_int64_ops_.Add(defn->AsShiftInt64Op());
           }
         }
       } else if (current->IsCheckArrayBound()) {
@@ -1500,47 +1502,47 @@
   }
 }
 
-static void NarrowBinaryMintOp(BinaryMintOpInstr* mint_op) {
-  if (RangeUtils::Fits(mint_op->range(), RangeBoundary::kRangeBoundaryInt32) &&
-      RangeUtils::Fits(mint_op->left()->definition()->range(),
+static void NarrowBinaryInt64Op(BinaryInt64OpInstr* int64_op) {
+  if (RangeUtils::Fits(int64_op->range(), RangeBoundary::kRangeBoundaryInt32) &&
+      RangeUtils::Fits(int64_op->left()->definition()->range(),
                        RangeBoundary::kRangeBoundaryInt32) &&
-      RangeUtils::Fits(mint_op->right()->definition()->range(),
+      RangeUtils::Fits(int64_op->right()->definition()->range(),
                        RangeBoundary::kRangeBoundaryInt32) &&
-      BinaryInt32OpInstr::IsSupported(mint_op->op_kind(), mint_op->left(),
-                                      mint_op->right())) {
+      BinaryInt32OpInstr::IsSupported(int64_op->op_kind(), int64_op->left(),
+                                      int64_op->right())) {
     BinaryInt32OpInstr* int32_op = new BinaryInt32OpInstr(
-        mint_op->op_kind(), mint_op->left()->CopyWithType(),
-        mint_op->right()->CopyWithType(), mint_op->DeoptimizationTarget());
-    int32_op->set_range(*mint_op->range());
+        int64_op->op_kind(), int64_op->left()->CopyWithType(),
+        int64_op->right()->CopyWithType(), int64_op->DeoptimizationTarget());
+    int32_op->set_range(*int64_op->range());
     int32_op->set_can_overflow(false);
-    mint_op->ReplaceWith(int32_op, NULL);
+    int64_op->ReplaceWith(int32_op, NULL);
   }
 }
 
-static void NarrowShiftMintOp(ShiftMintOpInstr* mint_op) {
-  if (RangeUtils::Fits(mint_op->range(), RangeBoundary::kRangeBoundaryInt32) &&
-      RangeUtils::Fits(mint_op->left()->definition()->range(),
+static void NarrowShiftInt64Op(ShiftInt64OpInstr* int64_op) {
+  if (RangeUtils::Fits(int64_op->range(), RangeBoundary::kRangeBoundaryInt32) &&
+      RangeUtils::Fits(int64_op->left()->definition()->range(),
                        RangeBoundary::kRangeBoundaryInt32) &&
-      RangeUtils::Fits(mint_op->right()->definition()->range(),
+      RangeUtils::Fits(int64_op->right()->definition()->range(),
                        RangeBoundary::kRangeBoundaryInt32) &&
-      BinaryInt32OpInstr::IsSupported(mint_op->op_kind(), mint_op->left(),
-                                      mint_op->right())) {
+      BinaryInt32OpInstr::IsSupported(int64_op->op_kind(), int64_op->left(),
+                                      int64_op->right())) {
     BinaryInt32OpInstr* int32_op = new BinaryInt32OpInstr(
-        mint_op->op_kind(), mint_op->left()->CopyWithType(),
-        mint_op->right()->CopyWithType(), mint_op->DeoptimizationTarget());
-    int32_op->set_range(*mint_op->range());
+        int64_op->op_kind(), int64_op->left()->CopyWithType(),
+        int64_op->right()->CopyWithType(), int64_op->DeoptimizationTarget());
+    int32_op->set_range(*int64_op->range());
     int32_op->set_can_overflow(false);
-    mint_op->ReplaceWith(int32_op, NULL);
+    int64_op->ReplaceWith(int32_op, NULL);
   }
 }
 
 void RangeAnalysis::NarrowMintToInt32() {
-  for (intptr_t i = 0; i < binary_mint_ops_.length(); i++) {
-    NarrowBinaryMintOp(binary_mint_ops_[i]);
+  for (intptr_t i = 0; i < binary_int64_ops_.length(); i++) {
+    NarrowBinaryInt64Op(binary_int64_ops_[i]);
   }
 
-  for (intptr_t i = 0; i < shift_mint_ops_.length(); i++) {
-    NarrowShiftMintOp(shift_mint_ops_[i]);
+  for (intptr_t i = 0; i < shift_int64_ops_.length(); i++) {
+    NarrowShiftInt64Op(shift_int64_ops_[i]);
   }
 }
 
@@ -1571,8 +1573,8 @@
   // TODO(johnmccutchan): Consider Smi operations, to avoid unnecessary tagging
   // & untagged of intermediate results.
   // TODO(johnmccutchan): Consider phis.
-  return def->IsBoxInt64() || def->IsUnboxInt64() || def->IsBinaryMintOp() ||
-         def->IsShiftMintOp() || def->IsUnaryMintOp();
+  return def->IsBoxInt64() || def->IsUnboxInt64() || def->IsBinaryInt64Op() ||
+         def->IsShiftInt64Op() || def->IsUnaryInt64Op();
 }
 
 void IntegerInstructionSelector::FindPotentialUint32Definitions() {
@@ -1600,11 +1602,11 @@
   }
 }
 
-// BinaryMintOp masks and stores into unsigned typed arrays that truncate the
+// BinaryInt64Op masks and stores into unsigned typed arrays that truncate the
 // value into a Uint32 range.
 bool IntegerInstructionSelector::IsUint32NarrowingDefinition(Definition* def) {
-  if (def->IsBinaryMintOp()) {
-    BinaryMintOpInstr* op = def->AsBinaryMintOp();
+  if (def->IsBinaryInt64Op()) {
+    BinaryInt64OpInstr* op = def->AsBinaryInt64Op();
     // Must be a mask operation.
     if (op->op_kind() != Token::kBIT_AND) {
       return false;
@@ -1658,8 +1660,8 @@
   }
   // A right shift with an input outside of Uint32 range cannot be converted
   // because we need the high bits.
-  if (def->IsShiftMintOp()) {
-    ShiftMintOpInstr* op = def->AsShiftMintOp();
+  if (def->IsShiftInt64Op()) {
+    ShiftInt64OpInstr* op = def->AsShiftInt64Op();
     if (op->op_kind() == Token::kSHR) {
       Definition* shift_input = op->left()->definition();
       ASSERT(shift_input != NULL);
@@ -1719,8 +1721,8 @@
   ASSERT(IsPotentialUint32Definition(def));
   // Should not see constant instructions.
   ASSERT(!def->IsConstant());
-  if (def->IsBinaryMintOp()) {
-    BinaryMintOpInstr* op = def->AsBinaryMintOp();
+  if (def->IsBinaryInt64Op()) {
+    BinaryInt64OpInstr* op = def->AsBinaryInt64Op();
     Token::Kind op_kind = op->op_kind();
     Value* left = op->left()->CopyWithType();
     Value* right = op->right()->CopyWithType();
@@ -1734,14 +1736,14 @@
     Value* value = unbox->value()->CopyWithType();
     intptr_t deopt_id = unbox->DeoptimizationTarget();
     return new (Z) UnboxUint32Instr(value, deopt_id);
-  } else if (def->IsUnaryMintOp()) {
-    UnaryMintOpInstr* op = def->AsUnaryMintOp();
+  } else if (def->IsUnaryInt64Op()) {
+    UnaryInt64OpInstr* op = def->AsUnaryInt64Op();
     Token::Kind op_kind = op->op_kind();
     Value* value = op->value()->CopyWithType();
     intptr_t deopt_id = op->DeoptimizationTarget();
     return new (Z) UnaryUint32OpInstr(op_kind, value, deopt_id);
-  } else if (def->IsShiftMintOp()) {
-    ShiftMintOpInstr* op = def->AsShiftMintOp();
+  } else if (def->IsShiftInt64Op()) {
+    ShiftInt64OpInstr* op = def->AsShiftInt64Op();
     Token::Kind op_kind = op->op_kind();
     Value* left = op->left()->CopyWithType();
     Value* right = op->right()->CopyWithType();
@@ -2753,7 +2755,7 @@
       return RangeBoundary::kRangeBoundarySmi;
     case kUnboxedInt32:
       return RangeBoundary::kRangeBoundaryInt32;
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return RangeBoundary::kRangeBoundaryInt64;
     default:
       UNREACHABLE();
@@ -2818,12 +2820,12 @@
                    analysis->GetSmiRange(right()), range);
 }
 
-void BinaryMintOpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
+void BinaryInt64OpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
   InferRangeHelper(left()->definition()->range(),
                    right()->definition()->range(), range);
 }
 
-void ShiftMintOpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
+void ShiftInt64OpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
   CacheRange(&shift_range_, right()->definition()->range(),
              RangeBoundary::kRangeBoundaryInt64);
   InferRangeHelper(left()->definition()->range(),
@@ -2890,9 +2892,9 @@
 
 void UnboxedIntConverterInstr::InferRange(RangeAnalysis* analysis,
                                           Range* range) {
-  ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedMint) ||
+  ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedInt64) ||
          (from() == kUnboxedUint32));
-  ASSERT((to() == kUnboxedInt32) || (to() == kUnboxedMint) ||
+  ASSERT((to() == kUnboxedInt32) || (to() == kUnboxedInt64) ||
          (to() == kUnboxedUint32));
   const Range* value_range = value()->definition()->range();
   if (Range::IsUnknown(value_range)) {
@@ -2966,3 +2968,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flow_graph_range_analysis.h b/runtime/vm/flow_graph_range_analysis.h
index 09778a0..197078d 100644
--- a/runtime/vm/flow_graph_range_analysis.h
+++ b/runtime/vm/flow_graph_range_analysis.h
@@ -584,9 +584,9 @@
   // Value that are known to be smi or mint.
   GrowableArray<Definition*> values_;
 
-  GrowableArray<BinaryMintOpInstr*> binary_mint_ops_;
+  GrowableArray<BinaryInt64OpInstr*> binary_int64_ops_;
 
-  GrowableArray<ShiftMintOpInstr*> shift_mint_ops_;
+  GrowableArray<ShiftInt64OpInstr*> shift_int64_ops_;
 
   // All CheckArrayBound instructions.
   GrowableArray<CheckArrayBoundInstr*> bounds_checks_;
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index c86ebb3..c9e4910 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/flow_graph_type_propagator.h"
 
 #include "vm/bit_vector.h"
@@ -1120,17 +1122,17 @@
   return CompileType::FromCid(kSmiCid);
 }
 
-// Note that MintOp may produce Smi-s as result of an
+// Note that Int64Op may produce Smi-s as result of an
 // appended BoxInt64Instr node.
-CompileType BinaryMintOpInstr::ComputeType() const {
+CompileType BinaryInt64OpInstr::ComputeType() const {
   return CompileType::Int();
 }
 
-CompileType ShiftMintOpInstr::ComputeType() const {
+CompileType ShiftInt64OpInstr::ComputeType() const {
   return CompileType::Int();
 }
 
-CompileType UnaryMintOpInstr::ComputeType() const {
+CompileType UnaryInt64OpInstr::ComputeType() const {
   return CompileType::Int();
 }
 
@@ -1330,7 +1332,7 @@
     case kUnboxedInt32x4:
       return CompileType::FromCid(kInt32x4Cid);
 
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return CompileType::Int();
 
     default:
@@ -1397,3 +1399,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc
index cb1d34a..4150e9b 100644
--- a/runtime/vm/gc_sweeper.cc
+++ b/runtime/vm/gc_sweeper.cc
@@ -22,7 +22,7 @@
   }
 
   // Keep track whether this page is still in use.
-  bool in_use = false;
+  intptr_t used_in_bytes = 0;
 
   bool is_executable = (page->type() == HeapPage::kExecutable);
   uword start = page->object_start();
@@ -36,7 +36,7 @@
       // Found marked object. Clear the mark bit and update swept bytes.
       raw_obj->ClearMarkBit();
       obj_size = raw_obj->Size();
-      in_use = true;
+      used_in_bytes += obj_size;
     } else {
       uword free_end = current + raw_obj->Size();
       while (free_end < end) {
@@ -69,7 +69,8 @@
   }
   ASSERT(current == end);
 
-  return in_use;
+  page->set_used_in_bytes(used_in_bytes);
+  return used_in_bytes != 0;  // In use.
 }
 
 intptr_t GCSweeper::SweepLargePage(HeapPage* page) {
diff --git a/runtime/vm/gypi_contents.gni b/runtime/vm/gypi_contents.gni
deleted file mode 100644
index 4ba651e..0000000
--- a/runtime/vm/gypi_contents.gni
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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.
-
-_core_library_names = [
-  "async",
-  "core",
-  "collection",
-  "convert",
-  "developer",
-  "internal",
-  "isolate",
-  "math",
-  "mirrors",
-  "profiler",
-  "typed_data",
-  "vmservice",
-]
-
-_core_library_gypis = [
-  "../platform/platform_headers.gypi",
-  "../platform/platform_sources.gypi",
-  "../vm/vm_sources.gypi",
-  "../lib/async_sources.gypi",
-  "../lib/core_sources.gypi",
-  "../lib/collection_sources.gypi",
-  "../lib/convert_sources.gypi",
-  "../lib/developer_sources.gypi",
-  "../lib/internal_sources.gypi",
-  "../lib/isolate_sources.gypi",
-  "../lib/math_sources.gypi",
-  "../lib/mirrors_sources.gypi",
-  "../lib/typed_data_sources.gypi",
-  "../lib/vmservice_sources.gypi",
-  "../../sdk/lib/async/async_sources.gypi",
-  "../../sdk/lib/collection/collection_sources.gypi",
-  "../../sdk/lib/convert/convert_sources.gypi",
-  "../../sdk/lib/core/core_sources.gypi",
-  "../../sdk/lib/developer/developer_sources.gypi",
-  "../../sdk/lib/internal/internal_sources.gypi",
-  "../../sdk/lib/isolate/isolate_sources.gypi",
-  "../../sdk/lib/math/math_sources.gypi",
-  "../../sdk/lib/mirrors/mirrors_sources.gypi",
-  "../../sdk/lib/profiler/profiler_sources.gypi",
-  "../../sdk/lib/typed_data/typed_data_sources.gypi",
-  "../../sdk/lib/vmservice/vmservice_sources.gypi",
-  "../bin/io_sources.gypi",
-]
-
-processed_gypis = exec_script("../../tools/process_gypis.py",
-                              _core_library_names,
-                              "scope",
-                              _core_library_gypis)
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 7cdbf21..7f0472c 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -58,23 +58,71 @@
   }
 }
 
+void Heap::MakeTLABIterable(Thread* thread) {
+  uword start = thread->top();
+  uword end = thread->end();
+  ASSERT(end >= start);
+  intptr_t size = end - start;
+  ASSERT(Utils::IsAligned(size, kObjectAlignment));
+  if (size >= kObjectAlignment) {
+    FreeListElement::AsElement(start, size);
+    ASSERT(RawObject::FromAddr(start)->Size() == size);
+  }
+}
+
+void Heap::AbandonRemainingTLAB(Thread* thread) {
+  MakeTLABIterable(thread);
+  thread->set_top(0);
+  thread->set_end(0);
+}
+
+intptr_t Heap::CalculateTLABSize() {
+  intptr_t size = new_space_.end() - new_space_.top();
+  return Utils::RoundDown(size, kObjectAlignment);
+}
+
 uword Heap::AllocateNew(intptr_t size) {
   ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
   // Currently, only the Dart thread may allocate in new space.
   isolate()->AssertCurrentThreadIsMutator();
   Thread* thread = Thread::Current();
   uword addr = new_space_.TryAllocateInTLAB(thread, size);
-  if (addr == 0) {
-    // This call to CollectGarbage might end up "reusing" a collection spawned
-    // from a different thread and will be racing to allocate the requested
-    // memory with other threads being released after the collection.
-    CollectGarbage(kNew);
-    addr = new_space_.TryAllocateInTLAB(thread, size);
-    if (addr == 0) {
-      return AllocateOld(size, HeapPage::kData);
+  if (addr != 0) {
+    return addr;
+  }
+
+  intptr_t tlab_size = CalculateTLABSize();
+  if ((tlab_size > 0) && (size > tlab_size)) {
+    return AllocateOld(size, HeapPage::kData);
+  }
+
+  AbandonRemainingTLAB(thread);
+  if (tlab_size > 0) {
+    uword tlab_top = new_space_.TryAllocateNewTLAB(thread, tlab_size);
+    if (tlab_top != 0) {
+      addr = new_space_.TryAllocateInTLAB(thread, size);
+      ASSERT(addr != 0);
+      return addr;
     }
   }
-  return addr;
+
+  ASSERT(!thread->HasActiveTLAB());
+
+  // This call to CollectGarbage might end up "reusing" a collection spawned
+  // from a different thread and will be racing to allocate the requested
+  // memory with other threads being released after the collection.
+  CollectGarbage(kNew);
+  tlab_size = CalculateTLABSize();
+  uword tlab_top = new_space_.TryAllocateNewTLAB(thread, tlab_size);
+  if (tlab_top != 0) {
+    addr = new_space_.TryAllocateInTLAB(thread, size);
+    // It is possible a GC doesn't clear enough space.
+    // In that case, we must fall through and allocate into old space.
+    if (addr != 0) {
+      return addr;
+    }
+  }
+  return AllocateOld(size, HeapPage::kData);
 }
 
 uword Heap::AllocateOld(intptr_t size, HeapPage::PageType type) {
@@ -576,11 +624,12 @@
   StackZone stack_zone(Thread::Current());
 
   // Change the new space's top_ with the more up-to-date thread's view of top_
-  new_space_.FlushTLS();
+  new_space_.MakeNewSpaceIterable();
 
   ObjectSet* allocated_set =
       CreateAllocatedObjectSet(stack_zone.GetZone(), mark_expectation);
   VerifyPointersVisitor visitor(isolate(), allocated_set);
+
   VisitObjectPointers(&visitor);
 
   // Only returning a value so that Heap::Validate can be called from an ASSERT.
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 73f1952..e83cbf2 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -251,6 +251,10 @@
     old_space_.SetupImagePage(pointer, size, is_executable);
   }
 
+  intptr_t CalculateTLABSize();
+  void MakeTLABIterable(Thread* thread);
+  void AbandonRemainingTLAB(Thread* thread);
+
  private:
   class GCStats : public ValueObject {
    public:
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index d46c8ec..47520ba 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/il_printer.h"
 
 #include "vm/flow_graph_range_analysis.h"
@@ -1079,8 +1081,8 @@
       return "int32";
     case kUnboxedUint32:
       return "uint32";
-    case kUnboxedMint:
-      return "mint";
+    case kUnboxedInt64:
+      return "int64";
     case kUnboxedFloat32x4:
       return "float32x4";
     case kUnboxedInt32x4:
@@ -1296,3 +1298,5 @@
 #endif  // !PRODUCT
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 59161ca..724e7db 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/intermediate_language.h"
 
 #include "vm/bit_vector.h"
@@ -1331,7 +1333,7 @@
   }
 }
 
-bool ShiftMintOpInstr::IsShiftCountInRange() const {
+bool ShiftInt64OpInstr::IsShiftCountInRange() const {
   return RangeUtils::IsWithin(shift_range(), 0, kMintShiftCountLimit);
 }
 
@@ -1350,7 +1352,7 @@
     case kUnboxedInt32:
     case kUnboxedUint32:
       return 32;
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return 64;
     default:
       UNREACHABLE();
@@ -1369,7 +1371,7 @@
     if (unbox != NULL) {
       switch (unbox->representation()) {
         case kUnboxedDouble:
-        case kUnboxedMint:
+        case kUnboxedInt64:
           return ToIntegerConstant(unbox->value(), result);
 
         case kUnboxedUint32:
@@ -1521,8 +1523,8 @@
     case kUnboxedUint32:
       op = new UnaryUint32OpInstr(op_kind, value, deopt_id);
       break;
-    case kUnboxedMint:
-      op = new UnaryMintOpInstr(op_kind, value, deopt_id);
+    case kUnboxedInt64:
+      op = new UnaryInt64OpInstr(op_kind, value, deopt_id);
       break;
     default:
       UNREACHABLE();
@@ -1567,11 +1569,11 @@
         op = new BinaryUint32OpInstr(op_kind, left, right, deopt_id);
       }
       break;
-    case kUnboxedMint:
+    case kUnboxedInt64:
       if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
-        op = new ShiftMintOpInstr(op_kind, left, right, deopt_id);
+        op = new ShiftInt64OpInstr(op_kind, left, right, deopt_id);
       } else {
-        op = new BinaryMintOpInstr(op_kind, left, right, deopt_id);
+        op = new BinaryInt64OpInstr(op_kind, left, right, deopt_id);
       }
       break;
     default:
@@ -1603,7 +1605,7 @@
       }
       return false;
 
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return value.IsSmi() || value.IsMint();
 
     case kUnboxedUint32:  // Only truncating Uint32 arithmetic is supported.
@@ -2335,7 +2337,7 @@
     if (box_defn->from() == to()) {
       // Do not erase truncating conversions from 64-bit value to 32-bit values
       // because such conversions erase upper 32 bits.
-      if ((box_defn->from() == kUnboxedMint) && box_defn->is_truncating()) {
+      if ((box_defn->from() == kUnboxedInt64) && box_defn->is_truncating()) {
         return this;
       }
       return box_defn->value()->definition();
@@ -2352,7 +2354,7 @@
   }
 
   UnboxInt64Instr* unbox_defn = value()->definition()->AsUnboxInt64();
-  if (unbox_defn != NULL && (from() == kUnboxedMint) &&
+  if (unbox_defn != NULL && (from() == kUnboxedInt64) &&
       (to() == kUnboxedInt32) && unbox_defn->HasOnlyInputUse(value())) {
     // TODO(vegorov): there is a duplication of code between UnboxedIntCoverter
     // and code path that unboxes Mint into Int32. We should just schedule
@@ -2712,7 +2714,7 @@
     case kUnboxedUint32:
       return new BoxUint32Instr(value);
 
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return new BoxInt64Instr(value);
 
     case kUnboxedDouble:
@@ -2738,7 +2740,7 @@
     case kUnboxedUint32:
       return new UnboxUint32Instr(value, deopt_id);
 
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return new UnboxInt64Instr(value, deopt_id);
 
     case kUnboxedDouble:
@@ -2756,7 +2758,7 @@
 bool UnboxInstr::CanConvertSmi() const {
   switch (representation()) {
     case kUnboxedDouble:
-    case kUnboxedMint:
+    case kUnboxedInt64:
       return true;
 
     case kUnboxedFloat32x4:
@@ -4064,3 +4066,5 @@
 #undef __
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 7a16660..ed66e95 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -439,9 +439,9 @@
   M(BoxInt64)                                                                  \
   M(UnboxInt64)                                                                \
   M(CaseInsensitiveCompareUC16)                                                \
-  M(BinaryMintOp)                                                              \
-  M(ShiftMintOp)                                                               \
-  M(UnaryMintOp)                                                               \
+  M(BinaryInt64Op)                                                             \
+  M(ShiftInt64Op)                                                              \
+  M(UnaryInt64Op)                                                              \
   M(CheckArrayBound)                                                           \
   M(GenericCheckBound)                                                         \
   M(Constraint)                                                                \
@@ -1736,7 +1736,7 @@
     return representation() == kPairOfTagged;
 #else
     return (representation() == kPairOfTagged) ||
-           (representation() == kUnboxedMint);
+           (representation() == kUnboxedInt64);
 #endif
   }
 
@@ -3150,7 +3150,7 @@
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
     ASSERT((idx == 0) || (idx == 1));
     if (operation_cid() == kDoubleCid) return kUnboxedDouble;
-    if (operation_cid() == kMintCid) return kUnboxedMint;
+    if (operation_cid() == kMintCid) return kUnboxedInt64;
     return kTagged;
   }
 
@@ -3186,7 +3186,7 @@
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
     ASSERT((idx == 0) || (idx == 1));
     if (operation_cid() == kDoubleCid) return kUnboxedDouble;
-    if (operation_cid() == kMintCid) return kUnboxedMint;
+    if (operation_cid() == kMintCid) return kUnboxedInt64;
     return kTagged;
   }
 
@@ -4708,7 +4708,7 @@
       case kUnboxedFloat32x4:
       case kUnboxedFloat64x2:
       case kUnboxedInt32x4:
-      case kUnboxedMint:
+      case kUnboxedInt64:
       case kUnboxedInt32:
       case kUnboxedUint32:
         return true;
@@ -4731,7 +4731,7 @@
       case kUnboxedInt32x4:
         return Int32x4::value_offset();
 
-      case kUnboxedMint:
+      case kUnboxedInt64:
         return Mint::value_offset();
 
       default:
@@ -4742,7 +4742,7 @@
 
   static intptr_t BoxCid(Representation rep) {
     switch (rep) {
-      case kUnboxedMint:
+      case kUnboxedInt64:
         return kMintCid;
       case kUnboxedDouble:
         return kDoubleCid;
@@ -4856,7 +4856,8 @@
 
 class BoxInt64Instr : public BoxIntegerInstr {
  public:
-  explicit BoxInt64Instr(Value* value) : BoxIntegerInstr(kUnboxedMint, value) {}
+  explicit BoxInt64Instr(Value* value)
+      : BoxIntegerInstr(kUnboxedInt64, value) {}
 
   virtual Definition* Canonicalize(FlowGraph* flow_graph);
 
@@ -5003,7 +5004,7 @@
 class UnboxInt64Instr : public UnboxIntegerInstr {
  public:
   UnboxInt64Instr(Value* value, intptr_t deopt_id)
-      : UnboxIntegerInstr(kUnboxedMint, kNoTruncation, value, deopt_id) {}
+      : UnboxIntegerInstr(kUnboxedInt64, kNoTruncation, value, deopt_id) {}
 
   virtual void InferRange(RangeAnalysis* analysis, Range* range);
 
@@ -5014,8 +5015,8 @@
 };
 
 bool Definition::IsMintDefinition() {
-  return (Type()->ToCid() == kMintCid) || IsBinaryMintOp() || IsUnaryMintOp() ||
-         IsShiftMintOp() || IsBoxInt64() || IsUnboxInt64();
+  return (Type()->ToCid() == kMintCid) || IsBinaryInt64Op() ||
+         IsUnaryInt64Op() || IsShiftInt64Op() || IsBoxInt64() || IsUnboxInt64();
 }
 
 class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> {
@@ -6700,9 +6701,9 @@
   DISALLOW_COPY_AND_ASSIGN(UnaryUint32OpInstr);
 };
 
-class UnaryMintOpInstr : public UnaryIntegerOpInstr {
+class UnaryInt64OpInstr : public UnaryIntegerOpInstr {
  public:
-  UnaryMintOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
+  UnaryInt64OpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
       : UnaryIntegerOpInstr(op_kind, value, deopt_id) {
     ASSERT(op_kind == Token::kBIT_NOT);
   }
@@ -6711,17 +6712,17 @@
 
   virtual CompileType ComputeType() const;
 
-  virtual Representation representation() const { return kUnboxedMint; }
+  virtual Representation representation() const { return kUnboxedInt64; }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
     ASSERT(idx == 0);
-    return kUnboxedMint;
+    return kUnboxedInt64;
   }
 
-  DECLARE_INSTRUCTION(UnaryMintOp)
+  DECLARE_INSTRUCTION(UnaryInt64Op)
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(UnaryMintOpInstr);
+  DISALLOW_COPY_AND_ASSIGN(UnaryInt64OpInstr);
 };
 
 class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
@@ -7014,12 +7015,12 @@
   DISALLOW_COPY_AND_ASSIGN(ShiftUint32OpInstr);
 };
 
-class BinaryMintOpInstr : public BinaryIntegerOpInstr {
+class BinaryInt64OpInstr : public BinaryIntegerOpInstr {
  public:
-  BinaryMintOpInstr(Token::Kind op_kind,
-                    Value* left,
-                    Value* right,
-                    intptr_t deopt_id)
+  BinaryInt64OpInstr(Token::Kind op_kind,
+                     Value* left,
+                     Value* right,
+                     intptr_t deopt_id)
       : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {
     if (FLAG_limit_ints_to_64_bits) {
       mark_truncating();
@@ -7045,28 +7046,28 @@
     }
   }
 
-  virtual Representation representation() const { return kUnboxedMint; }
+  virtual Representation representation() const { return kUnboxedInt64; }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
     ASSERT((idx == 0) || (idx == 1));
-    return kUnboxedMint;
+    return kUnboxedInt64;
   }
 
   virtual void InferRange(RangeAnalysis* analysis, Range* range);
   virtual CompileType ComputeType() const;
 
-  DECLARE_INSTRUCTION(BinaryMintOp)
+  DECLARE_INSTRUCTION(BinaryInt64Op)
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BinaryMintOpInstr);
+  DISALLOW_COPY_AND_ASSIGN(BinaryInt64OpInstr);
 };
 
-class ShiftMintOpInstr : public BinaryIntegerOpInstr {
+class ShiftInt64OpInstr : public BinaryIntegerOpInstr {
  public:
-  ShiftMintOpInstr(Token::Kind op_kind,
-                   Value* left,
-                   Value* right,
-                   intptr_t deopt_id)
+  ShiftInt64OpInstr(Token::Kind op_kind,
+                    Value* left,
+                    Value* right,
+                    intptr_t deopt_id)
       : BinaryIntegerOpInstr(op_kind, left, right, deopt_id),
         shift_range_(NULL) {
     ASSERT((op_kind == Token::kSHR) || (op_kind == Token::kSHL));
@@ -7082,17 +7083,17 @@
            (can_overflow() && (op_kind() == Token::kSHL));
   }
 
-  virtual Representation representation() const { return kUnboxedMint; }
+  virtual Representation representation() const { return kUnboxedInt64; }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
     ASSERT((idx == 0) || (idx == 1));
-    return (idx == 0) ? kUnboxedMint : kTagged;
+    return (idx == 0) ? kUnboxedInt64 : kTagged;
   }
 
   virtual void InferRange(RangeAnalysis* analysis, Range* range);
   virtual CompileType ComputeType() const;
 
-  DECLARE_INSTRUCTION(ShiftMintOp)
+  DECLARE_INSTRUCTION(ShiftInt64Op)
 
  private:
   static const intptr_t kMintShiftCountLimit = 63;
@@ -7103,7 +7104,7 @@
 
   Range* shift_range_;
 
-  DISALLOW_COPY_AND_ASSIGN(ShiftMintOpInstr);
+  DISALLOW_COPY_AND_ASSIGN(ShiftInt64OpInstr);
 };
 
 // Handles only NEGATE.
@@ -7256,7 +7257,7 @@
 
   virtual Representation RequiredInputRepresentation(intptr_t index) const {
     ASSERT(index == 0);
-    return kUnboxedMint;
+    return kUnboxedInt64;
   }
 
   virtual Representation representation() const { return kUnboxedDouble; }
@@ -7784,9 +7785,9 @@
         to_representation_(to),
         is_truncating_(to == kUnboxedUint32) {
     ASSERT(from != to);
-    ASSERT((from == kUnboxedMint) || (from == kUnboxedUint32) ||
+    ASSERT((from == kUnboxedInt64) || (from == kUnboxedUint32) ||
            (from == kUnboxedInt32));
-    ASSERT((to == kUnboxedMint) || (to == kUnboxedUint32) ||
+    ASSERT((to == kUnboxedInt64) || (to == kUnboxedUint32) ||
            (to == kUnboxedInt32));
     SetInputAt(0, value);
   }
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 293ba9f..e18e2f0 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM.
-#if defined(TARGET_ARCH_ARM)
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intermediate_language.h"
 
@@ -1869,7 +1869,7 @@
     summary->set_temp(0, Location::RequiresRegister());
   }
 
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
   } else {
@@ -1889,7 +1889,7 @@
       true, IsExternal(), class_id(), index_scale(), str, index.reg());
   // Warning: element_address may use register IP as base.
 
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     ASSERT(compiler->is_optimizing());
     ASSERT(locs()->out(0).IsPairLocation());
     PairLocation* result_pair = locs()->out(0).AsPairLocation();
@@ -3821,7 +3821,7 @@
   if (needs_temp) {
     summary->set_temp(0, Location::RequiresRegister());
   }
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
   } else {
@@ -3834,7 +3834,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       PairLocation* result = locs()->out(0).AsPairLocation();
       __ LoadFieldFromOffset(kWord, result->At(0).reg(), box, ValueOffset());
       __ LoadFieldFromOffset(kWord, result->At(1).reg(), box,
@@ -3867,7 +3867,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       PairLocation* result = locs()->out(0).AsPairLocation();
       __ SmiUntag(result->At(0).reg(), box);
       __ SignFill(result->At(1).reg(), result->At(0).reg());
@@ -6188,8 +6188,8 @@
   }
 }
 
-LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                        bool opt) const {
+LocationSummary* BinaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                         bool opt) const {
   const intptr_t kNumInputs = 2;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -6203,7 +6203,7 @@
   return summary;
 }
 
-void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void BinaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
   Register left_hi = left_pair->At(1).reg();
@@ -6216,7 +6216,7 @@
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
   switch (op_kind()) {
     case Token::kBIT_AND: {
@@ -6266,8 +6266,8 @@
   }
 }
 
-LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* ShiftInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -6280,7 +6280,7 @@
   return summary;
 }
 
-void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void ShiftInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
   Register left_hi = left_pair->At(1).reg();
@@ -6290,7 +6290,7 @@
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
   if (locs()->in(1).IsConstant()) {
     // Code for a constant shift amount.
@@ -6401,8 +6401,8 @@
   }
 }
 
-LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* UnaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -6414,7 +6414,7 @@
   return summary;
 }
 
-void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void UnaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(op_kind() == Token::kBIT_NOT);
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
@@ -6502,7 +6502,8 @@
 
   ASSERT(left != out);
 
-  Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+  Label* deopt =
+      compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
 
   if (locs()->in(1).IsConstant()) {
     // Shifter is constant.
@@ -6575,12 +6576,12 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedMint) {
+  if (from() == kUnboxedInt64) {
     ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
     summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                       Location::RequiresRegister()));
     summary->set_out(0, Location::RequiresRegister());
-  } else if (to() == kUnboxedMint) {
+  } else if (to() == kUnboxedInt64) {
     ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
@@ -6609,7 +6610,7 @@
       __ tst(out, Operand(out));
       __ b(deopt, MI);
     }
-  } else if (from() == kUnboxedMint) {
+  } else if (from() == kUnboxedInt64) {
     ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
     PairLocation* in_pair = locs()->in(0).AsPairLocation();
     Register in_lo = in_pair->At(0).reg();
@@ -6625,7 +6626,7 @@
       __ b(deopt, NE);
     }
   } else if (from() == kUnboxedUint32 || from() == kUnboxedInt32) {
-    ASSERT(to() == kUnboxedMint);
+    ASSERT(to() == kUnboxedInt64);
     Register in = locs()->in(0).reg();
     PairLocation* out_pair = locs()->out(0).AsPairLocation();
     Register out_lo = out_pair->At(0).reg();
@@ -6872,4 +6873,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 73bf967..b18da61 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM64.
-#if defined(TARGET_ARCH_ARM64)
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intermediate_language.h"
 
@@ -3312,7 +3312,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       UNIMPLEMENTED();
       break;
     }
@@ -3341,7 +3341,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       UNIMPLEMENTED();
       break;
     }
@@ -5369,33 +5369,33 @@
   }
 }
 
-LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
+LocationSummary* BinaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                         bool opt) const {
+  UNIMPLEMENTED();
+  return NULL;
+}
+
+void BinaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  UNIMPLEMENTED();
+}
+
+LocationSummary* ShiftInt64OpInstr::MakeLocationSummary(Zone* zone,
                                                         bool opt) const {
   UNIMPLEMENTED();
   return NULL;
 }
 
-void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void ShiftInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   UNIMPLEMENTED();
 }
 
-LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* UnaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   UNIMPLEMENTED();
   return NULL;
 }
 
-void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  UNIMPLEMENTED();
-}
-
-LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
-  UNIMPLEMENTED();
-  return NULL;
-}
-
-void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void UnaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   UNIMPLEMENTED();
 }
 
@@ -5422,9 +5422,9 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedMint) {
+  if (from() == kUnboxedInt64) {
     UNREACHABLE();
-  } else if (to() == kUnboxedMint) {
+  } else if (to() == kUnboxedInt64) {
     UNREACHABLE();
   } else {
     ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
@@ -5461,9 +5461,9 @@
       __ cmp(out, Operand(value, UXTW, 0));
       __ b(deopt, NE);
     }
-  } else if (from() == kUnboxedMint) {
+  } else if (from() == kUnboxedInt64) {
     UNREACHABLE();
-  } else if (to() == kUnboxedMint) {
+  } else if (to() == kUnboxedInt64) {
     ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
     UNREACHABLE();
   } else {
@@ -5685,4 +5685,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM64
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index b3f5d4a..d4210c0 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -56,9 +56,9 @@
   M(GenericCheckBound)                                                         \
   M(IndirectGoto)                                                              \
   M(MintToDouble)                                                              \
-  M(BinaryMintOp)                                                              \
-  M(ShiftMintOp)                                                               \
-  M(UnaryMintOp)                                                               \
+  M(BinaryInt64Op)                                                             \
+  M(ShiftInt64Op)                                                              \
+  M(UnaryInt64Op)                                                              \
   M(BinaryFloat32x4Op)                                                         \
   M(Simd32x4Shuffle)                                                           \
   M(Simd32x4ShuffleMix)                                                        \
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index f5d16a8..7a8898c 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
-#if defined(TARGET_ARCH_IA32)
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intermediate_language.h"
 
@@ -3273,7 +3273,7 @@
   if (needs_temp) {
     summary->set_temp(0, Location::RequiresRegister());
   }
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RegisterLocation(EAX),
                                        Location::RegisterLocation(EDX)));
   } else {
@@ -3286,7 +3286,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       PairLocation* result = locs()->out(0).AsPairLocation();
       __ movl(result->At(0).reg(), FieldAddress(box, ValueOffset()));
       __ movl(result->At(1).reg(),
@@ -3318,7 +3318,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       PairLocation* result = locs()->out(0).AsPairLocation();
       ASSERT(result->At(0).reg() == EAX);
       ASSERT(result->At(1).reg() == EDX);
@@ -3604,7 +3604,7 @@
     summary->set_temp(1, Location::RequiresRegister());
   }
 
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
   } else {
@@ -3627,7 +3627,7 @@
     __ SmiUntag(index.reg());
   }
 
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     ASSERT(compiler->is_optimizing());
     ASSERT(locs()->out(0).IsPairLocation());
     PairLocation* result_pair = locs()->out(0).AsPairLocation();
@@ -5696,8 +5696,8 @@
   }
 }
 
-LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                        bool opt) const {
+LocationSummary* BinaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                         bool opt) const {
   const intptr_t kNumInputs = 2;
   switch (op_kind()) {
     case Token::kBIT_AND:
@@ -5728,7 +5728,7 @@
   }
 }
 
-void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void BinaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
   Register left_hi = left_pair->At(1).reg();
@@ -5743,7 +5743,7 @@
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
   switch (op_kind()) {
     case Token::kBIT_AND:
@@ -5797,8 +5797,8 @@
   }
 }
 
-LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* ShiftInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
   const intptr_t kNumTemps =
       (op_kind() == Token::kSHL) && CanDeoptimize() ? 2 : 0;
@@ -5815,7 +5815,7 @@
   return summary;
 }
 
-void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void ShiftInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
   Register left_hi = left_pair->At(1).reg();
@@ -5827,7 +5827,7 @@
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
   if (locs()->in(1).IsConstant()) {
     // Code for a constant shift amount.
@@ -5986,8 +5986,8 @@
   }
 }
 
-LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* UnaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -5998,7 +5998,7 @@
   return summary;
 }
 
-void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void UnaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(op_kind() == Token::kBIT_NOT);
   PairLocation* left_pair = locs()->in(0).AsPairLocation();
   Register left_lo = left_pair->At(0).reg();
@@ -6043,7 +6043,8 @@
   Register out = locs()->out(0).reg();
   ASSERT(left == out);
 
-  Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+  Label* deopt =
+      compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
 
   if (locs()->in(1).IsConstant()) {
     // Shifter is constant.
@@ -6135,7 +6136,7 @@
       (to() == kUnboxedInt32 || to() == kUnboxedUint32)) {
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
-  } else if (from() == kUnboxedMint) {
+  } else if (from() == kUnboxedInt64) {
     summary->set_in(
         0, Location::Pair(CanDeoptimize() ? Location::WritableRegister()
                                           : Location::RequiresRegister(),
@@ -6166,8 +6167,8 @@
       __ testl(locs()->out(0).reg(), locs()->out(0).reg());
       __ j(NEGATIVE, deopt);
     }
-  } else if (from() == kUnboxedMint) {
-    // TODO(vegorov) kUnboxedMint -> kInt32 conversion is currently usually
+  } else if (from() == kUnboxedInt64) {
+    // TODO(vegorov) kUnboxedInt64 -> kInt32 conversion is currently usually
     // dominated by a CheckSmi(BoxInt64(val)) which is an artifact of ordering
     // of optimization passes and the way we check smi-ness of values.
     // Optimize it away.
@@ -6186,7 +6187,7 @@
       __ j(NOT_EQUAL, deopt);
     }
   } else if (from() == kUnboxedUint32) {
-    ASSERT(to() == kUnboxedMint);
+    ASSERT(to() == kUnboxedInt64);
     Register in = locs()->in(0).reg();
     PairLocation* out_pair = locs()->out(0).AsPairLocation();
     Register out_lo = out_pair->At(0).reg();
@@ -6196,7 +6197,7 @@
     // Zero upper word.
     __ xorl(out_hi, out_hi);
   } else if (from() == kUnboxedInt32) {
-    ASSERT(to() == kUnboxedMint);
+    ASSERT(to() == kUnboxedInt64);
     PairLocation* out_pair = locs()->out(0).AsPairLocation();
     Register out_lo = out_pair->At(0).reg();
     Register out_hi = out_pair->At(1).reg();
@@ -6503,4 +6504,4 @@
 
 #undef __
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index bf7b822..2fe4b71 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_X64.
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intermediate_language.h"
 
@@ -928,7 +928,7 @@
     case kTypedDataUint32ArrayCid:
       return kUnboxedUint32;
     case kTypedDataInt64ArrayCid:
-      return kUnboxedMint;
+      return kUnboxedInt64;
     case kTypedDataFloat32ArrayCid:
     case kTypedDataFloat64ArrayCid:
       return kUnboxedDouble;
@@ -1032,7 +1032,7 @@
     return;
   }
 
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     ASSERT(class_id() == kTypedDataInt64ArrayCid);
     if ((index_scale() == 1) && index.IsRegister()) {
       __ SmiUntag(index.reg());
@@ -1165,7 +1165,7 @@
     case kTypedDataUint32ArrayCid:
       return kUnboxedUint32;
     case kTypedDataInt64ArrayCid:
-      return kUnboxedMint;
+      return kUnboxedInt64;
     case kTypedDataFloat32ArrayCid:
     case kTypedDataFloat64ArrayCid:
       return kUnboxedDouble;
@@ -3466,13 +3466,13 @@
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   const bool needs_writable_input =
-      (representation() != kUnboxedMint) &&
+      (representation() != kUnboxedInt64) &&
       (value()->Type()->ToNullableCid() != BoxCid());
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, needs_writable_input ? Location::WritableRegister()
                                           : Location::RequiresRegister());
-  if (representation() == kUnboxedMint) {
+  if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
@@ -3484,7 +3484,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       const Register result = locs()->out(0).reg();
       __ movq(result, FieldAddress(box, ValueOffset()));
       break;
@@ -3514,7 +3514,7 @@
   const Register box = locs()->in(0).reg();
 
   switch (representation()) {
-    case kUnboxedMint: {
+    case kUnboxedInt64: {
       const Register result = locs()->out(0).reg();
       ASSERT(result == box);
       __ SmiUntag(box);
@@ -5748,8 +5748,8 @@
   if (deopt != NULL) __ j(OVERFLOW, deopt);
 }
 
-LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                        bool opt) const {
+LocationSummary* BinaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                         bool opt) const {
   const intptr_t kNumInputs = 2;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -5760,7 +5760,7 @@
   return summary;
 }
 
-void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void BinaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const Register left = locs()->in(0).reg();
   const Register right = locs()->in(1).reg();
   const Register out = locs()->out(0).reg();
@@ -5769,14 +5769,14 @@
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
 
   EmitInt64Arithmetic(compiler, op_kind(), left, right, deopt);
 }
 
-LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* UnaryInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
@@ -5786,7 +5786,7 @@
   return summary;
 }
 
-void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void UnaryInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(op_kind() == Token::kBIT_NOT);
   const Register left = locs()->in(0).reg();
   const Register out = locs()->out(0).reg();
@@ -5794,8 +5794,8 @@
   __ notq(left);
 }
 
-LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
-                                                       bool opt) const {
+LocationSummary* ShiftInt64OpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
   const intptr_t kNumTemps = can_overflow() ? 1 : 0;
   LocationSummary* summary = new (zone)
@@ -5809,14 +5809,14 @@
   return summary;
 }
 
-void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void ShiftInt64OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const Register left = locs()->in(0).reg();
   const Register out = locs()->out(0).reg();
   ASSERT(left == out);
 
   Label* deopt = NULL;
   if (CanDeoptimize()) {
-    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+    deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
   }
   if (locs()->in(1).IsConstant()) {
     // Code for a constant shift amount.
@@ -5974,7 +5974,8 @@
   Register out = locs()->out(0).reg();
   ASSERT(left == out);
 
-  Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
+  Label* deopt =
+      compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryInt64Op);
 
   if (locs()->in(1).IsConstant()) {
     // Shifter is constant.
@@ -6064,11 +6065,11 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedMint) {
+  if (from() == kUnboxedInt64) {
     ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
-  } else if (to() == kUnboxedMint) {
+  } else if (to() == kUnboxedInt64) {
     ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedUint32));
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
@@ -6101,7 +6102,7 @@
       __ testl(out, out);
       __ j(NEGATIVE, deopt);
     }
-  } else if (from() == kUnboxedMint) {
+  } else if (from() == kUnboxedInt64) {
     ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
@@ -6118,7 +6119,7 @@
       // Value cannot be held in Int32, deopt.
       __ j(NOT_EQUAL, deopt);
     }
-  } else if (to() == kUnboxedMint) {
+  } else if (to() == kUnboxedInt64) {
     ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
@@ -6370,4 +6371,4 @@
 
 #undef __
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index 8eb5fab..1f7b2d8 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -3,7 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 // Class for intrinsifying functions.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/intrinsifier.h"
+
 #include "vm/assembler.h"
 #include "vm/compiler.h"
 #include "vm/cpu.h"
@@ -1135,3 +1138,5 @@
 #endif  // !defined(TARGET_ARCH_DBC)
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 6320d8c..2ed7831 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM.
-#if defined(TARGET_ARCH_ARM)
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intrinsifier.h"
 
@@ -2224,4 +2224,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index 88d8517..98e4d4a 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_ARM64.
-#if defined(TARGET_ARCH_ARM64)
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intrinsifier.h"
 
@@ -2304,4 +2304,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM64
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 78c1e66..574d449 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -9,7 +9,7 @@
 // Dart method was intrinsified.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_IA32.
-#if defined(TARGET_ARCH_IA32)
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intrinsifier.h"
 
@@ -2245,4 +2245,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 0eb7d64..2a0ffaf 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"  // Needed here to get TARGET_ARCH_X64.
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/intrinsifier.h"
 
@@ -2225,4 +2225,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index d97a4cf..9381e1f 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -587,8 +587,8 @@
     ServiceEvent pause_event(I, ServiceEvent::kPauseStart);
     Service::HandleEvent(&pause_event);
   } else if (FLAG_trace_service) {
-    OS::Print("vm-service: Dropping event of type PauseStart (%s)\n",
-              I->name());
+    OS::PrintErr("vm-service: Dropping event of type PauseStart (%s)\n",
+                 I->name());
   }
 }
 
@@ -603,7 +603,8 @@
     ServiceEvent pause_event(I, ServiceEvent::kPauseExit);
     Service::HandleEvent(&pause_event);
   } else if (FLAG_trace_service) {
-    OS::Print("vm-service: Dropping event of type PauseExit (%s)\n", I->name());
+    OS::PrintErr("vm-service: Dropping event of type PauseExit (%s)\n",
+                 I->name());
   }
 }
 #endif  // !PRODUCT
@@ -691,28 +692,32 @@
 
 void Isolate::FlagsInitialize(Dart_IsolateFlags* api_flags) {
   api_flags->version = DART_FLAGS_CURRENT_VERSION;
-#define INIT_FROM_FLAG(name, isolate_flag, flag) api_flags->isolate_flag = flag;
+#define INIT_FROM_FLAG(name, bitname, isolate_flag, flag)                      \
+  api_flags->isolate_flag = flag;
   ISOLATE_FLAG_LIST(INIT_FROM_FLAG)
 #undef INIT_FROM_FLAG
+  api_flags->use_dart_frontend = false;
 }
 
 void Isolate::FlagsCopyTo(Dart_IsolateFlags* api_flags) const {
   api_flags->version = DART_FLAGS_CURRENT_VERSION;
-#define INIT_FROM_FIELD(name, isolate_flag, flag)                              \
+#define INIT_FROM_FIELD(name, bitname, isolate_flag, flag)                     \
   api_flags->isolate_flag = name();
   ISOLATE_FLAG_LIST(INIT_FROM_FIELD)
 #undef INIT_FROM_FIELD
+  api_flags->use_dart_frontend = use_dart_frontend();
 }
 
-#if !defined(PRODUCT)
 void Isolate::FlagsCopyFrom(const Dart_IsolateFlags& api_flags) {
-#define SET_FROM_FLAG(name, isolate_flag, flag)                                \
-  name##_ = api_flags.isolate_flag;
+#if !defined(PRODUCT)
+#define SET_FROM_FLAG(name, bitname, isolate_flag, flag)                       \
+  isolate_flags_ = bitname##Bit::update(api_flags.isolate_flag, isolate_flags_);
   ISOLATE_FLAG_LIST(SET_FROM_FLAG)
 #undef SET_FROM_FLAG
+#endif  // !defined(PRODUCT)
+  set_use_dart_frontend(api_flags.use_dart_frontend);
   // Leave others at defaults.
 }
-#endif  // !defined(PRODUCT)
 
 #if defined(DEBUG)
 // static
@@ -748,16 +753,10 @@
       object_store_(NULL),
       class_table_(),
       single_step_(false),
-      errors_fatal_(true),
-      is_runnable_(false),
-      is_service_isolate_(false),
-      compilation_allowed_(true),
-      all_classes_finalized_(false),
-      remapping_cids_(false),
+      isolate_flags_(0),
+      background_compiler_disabled_depth_(0),
+      background_compiler_(NULL),
 #if !defined(PRODUCT)
-      resume_request_(false),
-      has_attempted_reload_(false),
-      should_pause_post_service_request_(false),
       debugger_name_(NULL),
       debugger_(NULL),
       last_resume_timestamp_(OS::GetCurrentTimeMillis()),
@@ -808,8 +807,6 @@
       tag_table_(GrowableObjectArray::null()),
       deoptimized_code_array_(GrowableObjectArray::null()),
       sticky_error_(Error::null()),
-      background_compiler_(NULL),
-      background_compiler_disabled_depth_(0),
       next_(NULL),
       loading_invalidation_gen_(kInvalidGen),
       top_level_parsing_count_(0),
@@ -819,7 +816,9 @@
       spawn_count_(0),
       handler_info_cache_(),
       catch_entry_state_cache_() {
-  NOT_IN_PRODUCT(FlagsCopyFrom(api_flags));
+  FlagsCopyFrom(api_flags);
+  SetErrorsFatal(true);
+  set_compilation_allowed(true);
   // TODO(asiva): A Thread is not available here, need to figure out
   // how the vm_tag (kEmbedderTagId) can be set, these tags need to
   // move to the OSThread structure.
@@ -1063,7 +1062,7 @@
                             const char* packages_url,
                             bool dont_delete_reload_context) {
   ASSERT(!IsReloading());
-  has_attempted_reload_ = true;
+  SetHasAttemptedReload(true);
   reload_context_ = new IsolateReloadContext(this, js);
   reload_context_->Reload(force_reload, root_script_url, packages_url);
   bool success = !reload_context_->reload_aborted();
@@ -1843,7 +1842,7 @@
   raw_class = class_table()->At(cid);
 #endif  // !PRODUCT
   ASSERT(raw_class != NULL);
-  ASSERT(remapping_cids_ || raw_class->ptr()->id_ == cid);
+  ASSERT(remapping_cids() || raw_class->ptr()->id_ == cid);
   return raw_class;
 }
 
@@ -1943,7 +1942,7 @@
     ServiceEvent pause_event(this, ServiceEvent::kPauseExit);
     jsobj.AddProperty("pauseEvent", &pause_event);
   } else if ((debugger() != NULL) && (debugger()->PauseEvent() != NULL) &&
-             !resume_request_) {
+             !ResumeRequest()) {
     jsobj.AddProperty("pauseEvent", debugger()->PauseEvent());
   } else {
     ServiceEvent pause_event(this, ServiceEvent::kResume);
@@ -2161,13 +2160,13 @@
     arguments.SetAt(kPendingEntrySize, Bool::Get(FLAG_trace_service));
 
     if (FLAG_trace_service) {
-      OS::Print("[+%" Pd64 "ms] Isolate %s invoking _runExtension for %s\n",
-                Dart::UptimeMillis(), name(), method_name.ToCString());
+      OS::PrintErr("[+%" Pd64 "ms] Isolate %s invoking _runExtension for %s\n",
+                   Dart::UptimeMillis(), name(), method_name.ToCString());
     }
     result = DartEntry::InvokeFunction(run_extension, arguments);
     if (FLAG_trace_service) {
-      OS::Print("[+%" Pd64 "ms] Isolate %s : _runExtension complete for %s\n",
-                Dart::UptimeMillis(), name(), method_name.ToCString());
+      OS::PrintErr("[+%" Pd64 "ms] Isolate %s _runExtension complete for %s\n",
+                   Dart::UptimeMillis(), name(), method_name.ToCString());
     }
     // Propagate the error.
     if (result.IsError()) {
@@ -2203,8 +2202,9 @@
                                          const Instance& reply_port,
                                          const Instance& id) {
   if (FLAG_trace_service) {
-    OS::Print("[+%" Pd64 "ms] Isolate %s ENQUEUING request for extension %s\n",
-              Dart::UptimeMillis(), name(), method_name.ToCString());
+    OS::PrintErr("[+%" Pd64
+                 "ms] Isolate %s ENQUEUING request for extension %s\n",
+                 Dart::UptimeMillis(), name(), method_name.ToCString());
   }
   GrowableObjectArray& calls =
       GrowableObjectArray::Handle(pending_service_extension_calls());
@@ -2563,10 +2563,6 @@
     os_thread->set_thread(thread);
     if (is_mutator) {
       scheduled_mutator_thread_ = thread;
-      if (this != Dart::vm_isolate()) {
-        scheduled_mutator_thread_->set_top(heap()->new_space()->top());
-        scheduled_mutator_thread_->set_end(heap()->new_space()->end());
-      }
     }
     Thread::SetCurrent(thread);
     os_thread->EnableThreadInterrupts();
@@ -2605,12 +2601,6 @@
   os_thread->set_thread(NULL);
   OSThread::SetCurrent(os_thread);
   if (is_mutator) {
-    if (this != Dart::vm_isolate()) {
-      heap()->new_space()->set_top(scheduled_mutator_thread_->top_);
-      heap()->new_space()->set_end(scheduled_mutator_thread_->end_);
-    }
-    scheduled_mutator_thread_->top_ = 0;
-    scheduled_mutator_thread_->end_ = 0;
     scheduled_mutator_thread_ = NULL;
   }
   thread->isolate_ = NULL;
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index a3e665e..316c26a 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -132,13 +132,15 @@
 //       V(name, Dart_IsolateFlags-member-name, command-line-flag-name)
 //
 #define ISOLATE_FLAG_LIST(V)                                                   \
-  V(type_checks, enable_type_checks, FLAG_enable_type_checks)                  \
-  V(asserts, enable_asserts, FLAG_enable_asserts)                              \
-  V(error_on_bad_type, enable_error_on_bad_type, FLAG_error_on_bad_type)       \
-  V(error_on_bad_override, enable_error_on_bad_override,                       \
+  V(type_checks, EnableTypeChecks, enable_type_checks,                         \
+    FLAG_enable_type_checks)                                                   \
+  V(asserts, EnableAsserts, enable_asserts, FLAG_enable_asserts)               \
+  V(error_on_bad_type, ErrorOnBadType, enable_error_on_bad_type,               \
+    FLAG_error_on_bad_type)                                                    \
+  V(error_on_bad_override, ErrorOnBadOverride, enable_error_on_bad_override,   \
     FLAG_error_on_bad_override)                                                \
-  V(use_field_guards, use_field_guards, FLAG_use_field_guards)                 \
-  V(use_osr, use_osr, FLAG_use_osr)
+  V(use_field_guards, UseFieldGuards, use_field_guards, FLAG_use_field_guards) \
+  V(use_osr, UseOsr, use_osr, FLAG_use_osr)
 
 class Isolate : public BaseIsolate {
  public:
@@ -293,11 +295,11 @@
   MessageHandler* message_handler() const { return message_handler_; }
   void set_message_handler(MessageHandler* value) { message_handler_ = value; }
 
-  bool is_runnable() const { return is_runnable_; }
+  bool is_runnable() const { return RunnableBit::decode(isolate_flags_); }
   void set_is_runnable(bool value) {
-    is_runnable_ = value;
+    isolate_flags_ = RunnableBit::update(value, isolate_flags_);
 #if !defined(PRODUCT)
-    if (is_runnable_) {
+    if (is_runnable()) {
       set_last_resume_timestamp();
     }
 #endif
@@ -330,9 +332,12 @@
   }
 
 #if !defined(PRODUCT)
+  bool ResumeRequest() const {
+    return ResumeRequestBit::decode(isolate_flags_);
+  }
   // Lets the embedder know that a service message resulted in a resume request.
   void SetResumeRequest() {
-    resume_request_ = true;
+    isolate_flags_ = ResumeRequestBit::update(true, isolate_flags_);
     set_last_resume_timestamp();
   }
 
@@ -345,8 +350,8 @@
   // Returns whether the vm service has requested that the debugger
   // resume execution.
   bool GetAndClearResumeRequest() {
-    bool resume_request = resume_request_;
-    resume_request_ = false;
+    bool resume_request = ResumeRequestBit::decode(isolate_flags_);
+    isolate_flags_ = ResumeRequestBit::update(false, isolate_flags_);
     return resume_request;
   }
 #endif
@@ -369,8 +374,10 @@
   void RemoveErrorListener(const SendPort& listener);
   bool NotifyErrorListeners(const String& msg, const String& stacktrace);
 
-  bool ErrorsFatal() const { return errors_fatal_; }
-  void SetErrorsFatal(bool val) { errors_fatal_ = val; }
+  bool ErrorsFatal() const { return ErrorsFatalBit::decode(isolate_flags_); }
+  void SetErrorsFatal(bool val) {
+    isolate_flags_ = ErrorsFatalBit::update(val, isolate_flags_);
+  }
 
   Random* random() { return &random_; }
 
@@ -514,7 +521,12 @@
 
   void DeleteReloadContext();
 
-  bool HasAttemptedReload() const { return has_attempted_reload_; }
+  bool HasAttemptedReload() const {
+    return HasAttemptedReloadBit::decode(isolate_flags_);
+  }
+  void SetHasAttemptedReload(bool value) {
+    isolate_flags_ = HasAttemptedReloadBit::update(value, isolate_flags_);
+  }
 
   bool CanReload() const;
 
@@ -528,14 +540,21 @@
 
 #if !defined(PRODUCT)
   bool should_pause_post_service_request() const {
-    return should_pause_post_service_request_;
+    return ShouldPausePostServiceRequestBit::decode(isolate_flags_);
   }
-  void set_should_pause_post_service_request(
-      bool should_pause_post_service_request) {
-    should_pause_post_service_request_ = should_pause_post_service_request;
+  void set_should_pause_post_service_request(bool value) {
+    isolate_flags_ =
+        ShouldPausePostServiceRequestBit::update(value, isolate_flags_);
   }
 #endif  // !defined(PRODUCT)
 
+  bool use_dart_frontend() const {
+    return UseDartFrontEndBit::decode(isolate_flags_);
+  }
+  void set_use_dart_frontend(bool value) {
+    isolate_flags_ = UseDartFrontEndBit::update(value, isolate_flags_);
+  }
+
   RawError* PausePostRequest();
 
   uword user_tag() const { return user_tag_; }
@@ -584,14 +603,27 @@
   RawError* sticky_error() const { return sticky_error_; }
   void clear_sticky_error();
 
-  bool compilation_allowed() const { return compilation_allowed_; }
-  void set_compilation_allowed(bool allowed) { compilation_allowed_ = allowed; }
+  bool compilation_allowed() const {
+    return CompilationAllowedBit::decode(isolate_flags_);
+  }
+  void set_compilation_allowed(bool allowed) {
+    isolate_flags_ = CompilationAllowedBit::update(allowed, isolate_flags_);
+  }
 
   // In precompilation we finalize all regular classes before compiling.
-  bool all_classes_finalized() const { return all_classes_finalized_; }
-  void set_all_classes_finalized(bool value) { all_classes_finalized_ = value; }
+  bool all_classes_finalized() const {
+    return AllClassesFinalizedBit::decode(isolate_flags_);
+  }
+  void set_all_classes_finalized(bool value) {
+    isolate_flags_ = AllClassesFinalizedBit::update(value, isolate_flags_);
+  }
 
-  void set_remapping_cids(bool value) { remapping_cids_ = value; }
+  bool remapping_cids() const {
+    return RemappingCidsBit::decode(isolate_flags_);
+  }
+  void set_remapping_cids(bool value) {
+    isolate_flags_ = RemappingCidsBit::update(value, isolate_flags_);
+  }
 
   // True during top level parsing.
   bool IsTopLevelParsing() {
@@ -652,7 +684,12 @@
   intptr_t FindClosureIndex(const Function& needle) const;
   RawFunction* ClosureFunctionFromIndex(intptr_t idx) const;
 
-  bool is_service_isolate() const { return is_service_isolate_; }
+  bool is_service_isolate() const {
+    return ServiceIsolateBit::decode(isolate_flags_);
+  }
+  void set_is_service_isolate(bool value) {
+    isolate_flags_ = ServiceIsolateBit::update(value, isolate_flags_);
+  }
 
   // Isolate-specific flag handling.
   static void FlagsInitialize(Dart_IsolateFlags* api_flags);
@@ -660,17 +697,19 @@
   void FlagsCopyFrom(const Dart_IsolateFlags& api_flags);
 
 #if defined(PRODUCT)
-#define DECLARE_GETTER(name, isolate_flag_name, flag_name)                     \
+#define DECLARE_GETTER(name, bitname, isolate_flag_name, flag_name)            \
   bool name() const { return flag_name; }
   ISOLATE_FLAG_LIST(DECLARE_GETTER)
 #undef DECLARE_GETTER
   void set_use_osr(bool use_osr) { ASSERT(!use_osr); }
 #else  // defined(PRODUCT)
-#define DECLARE_GETTER(name, isolate_flag_name, flag_name)                     \
-  bool name() const { return name##_; }
+#define DECLARE_GETTER(name, bitname, isolate_flag_name, flag_name)            \
+  bool name() const { return bitname##Bit::decode(isolate_flags_); }
   ISOLATE_FLAG_LIST(DECLARE_GETTER)
 #undef DECLARE_GETTER
-  void set_use_osr(bool use_osr) { use_osr_ = use_osr; }
+  void set_use_osr(bool use_osr) {
+    isolate_flags_ = UseOsrBit::update(use_osr, isolate_flags_);
+  }
 #endif  // defined(PRODUCT)
 
   static void KillAllIsolates(LibMsgId msg_id);
@@ -766,31 +805,68 @@
   ClassTable class_table_;
   bool single_step_;
 
-  // Try to keep boolean fields together.
-  bool errors_fatal_;
-  bool is_runnable_;
-  bool is_service_isolate_;
-  bool compilation_allowed_;
-  bool all_classes_finalized_;
-  bool remapping_cids_;
+  // Isolate specific flags.
+  enum FlagBits {
+    kErrorsFatalBit = 0,
+    kIsRunnableBit = 1,
+    kIsServiceIsolateBit = 2,
+    kCompilationAllowedBit = 3,
+    kAllClassesFinalizedBit = 4,
+    kRemappingCidsBit = 5,
+    kResumeRequestBit = 6,
+    kHasAttemptedReloadBit = 7,
+    kShouldPausePostServiceRequestBit = 8,
+    kUseDartFrontEndBit = 9,
+    kEnableTypeChecksBit = 10,
+    kEnableAssertsBit = 11,
+    kErrorOnBadTypeBit = 12,
+    kErrorOnBadOverrideBit = 13,
+    kUseFieldGuardsBit = 14,
+    kUseOsrBit = 15,
+  };
+  class ErrorsFatalBit : public BitField<uint32_t, bool, kErrorsFatalBit, 1> {};
+  class RunnableBit : public BitField<uint32_t, bool, kIsRunnableBit, 1> {};
+  class ServiceIsolateBit
+      : public BitField<uint32_t, bool, kIsServiceIsolateBit, 1> {};
+  class CompilationAllowedBit
+      : public BitField<uint32_t, bool, kCompilationAllowedBit, 1> {};
+  class AllClassesFinalizedBit
+      : public BitField<uint32_t, bool, kAllClassesFinalizedBit, 1> {};
+  class RemappingCidsBit
+      : public BitField<uint32_t, bool, kRemappingCidsBit, 1> {};
+  class ResumeRequestBit
+      : public BitField<uint32_t, bool, kResumeRequestBit, 1> {};
+  class HasAttemptedReloadBit
+      : public BitField<uint32_t, bool, kHasAttemptedReloadBit, 1> {};
+  class ShouldPausePostServiceRequestBit
+      : public BitField<uint32_t, bool, kShouldPausePostServiceRequestBit, 1> {
+  };
+  class UseDartFrontEndBit
+      : public BitField<uint32_t, bool, kUseDartFrontEndBit, 1> {};
+  class EnableTypeChecksBit
+      : public BitField<uint32_t, bool, kEnableTypeChecksBit, 1> {};
+  class EnableAssertsBit
+      : public BitField<uint32_t, bool, kEnableAssertsBit, 1> {};
+  class ErrorOnBadTypeBit
+      : public BitField<uint32_t, bool, kErrorOnBadTypeBit, 1> {};
+  class ErrorOnBadOverrideBit
+      : public BitField<uint32_t, bool, kErrorOnBadOverrideBit, 1> {};
+  class UseFieldGuardsBit
+      : public BitField<uint32_t, bool, kUseFieldGuardsBit, 1> {};
+  class UseOsrBit : public BitField<uint32_t, bool, kUseOsrBit, 1> {};
+  uint32_t isolate_flags_;
+
+  // Background compilation.
+  int16_t background_compiler_disabled_depth_;
+  BackgroundCompiler* background_compiler_;
 
 // Fields that aren't needed in a product build go here with boolean flags at
 // the top.
 #if !defined(PRODUCT)
-  bool resume_request_;
-  bool has_attempted_reload_;  // Has a reload ever been attempted?
-  // Should we pause in the debug message loop after this request?
-  bool should_pause_post_service_request_;
-
   char* debugger_name_;
   Debugger* debugger_;
   int64_t last_resume_timestamp_;
 
-// Isolate-specific flags.
-#define DECLARE_FIELD(name, isolate_flag_name, flag_name) bool name##_;
-  ISOLATE_FLAG_LIST(DECLARE_FIELD)
-#undef DECLARE_FIELD
-
   // Timestamps of last operation via service.
   int64_t last_allocationprofile_accumulator_reset_timestamp_;
   int64_t last_allocationprofile_gc_timestamp_;
@@ -871,10 +947,6 @@
 
   RawError* sticky_error_;
 
-  // Background compilation.
-  BackgroundCompiler* background_compiler_;
-  intptr_t background_compiler_disabled_depth_;
-
   // Isolate list next pointer.
   Isolate* next_;
 
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index ea63190..cbe991b 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -67,6 +67,217 @@
   EXPECT_EQ(10, SimpleInvoke(lib, "main"));
 }
 
+TEST_CASE(IsolateReload_IncrementalCompile) {
+  const char* kScriptChars =
+      "main() {\n"
+      "  return 42;\n"
+      "}\n";
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+  EXPECT_VALID(lib);
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  int64_t value = 0;
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(42, value);
+
+  const char* kUpdatedScriptChars =
+      "main() {\n"
+      "  return 24;\n"
+      "}\n"
+      "";
+  lib = TestCase::ReloadTestScript(kUpdatedScriptChars);
+  EXPECT_VALID(lib);
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(24, value);
+}
+
+TEST_CASE(IsolateReload_KernelIncrementalCompile) {
+  // clang-format off
+  Dart_SourceFile sourcefiles[] = {
+    {
+      "file:///test-app",
+      "main() {\n"
+      "  return 42;\n"
+      "}\n",
+    },
+    {
+      "file:///.packages", "untitled:/"
+    }};
+  // clang-format on
+
+  Dart_Handle lib = TestCase::LoadTestScriptWithDFE(
+      sizeof(sourcefiles) / sizeof(Dart_SourceFile), sourcefiles,
+      NULL /* resolver */, true /* finalize */, true /* incrementally */);
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  int64_t value = 0;
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(42, value);
+
+  // clang-format off
+  Dart_SourceFile updated_sourcefiles[] = {
+    {
+      "file:///test-app",
+      "main() {\n"
+      "  return 24;\n"
+      "}\n"
+      ""
+    }};
+  // clang-format on
+  {
+    void* kernel_pgm = NULL;
+    char* error = TestCase::CompileTestScriptWithDFE(
+        "file:///test-app",
+        sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
+        updated_sourcefiles, &kernel_pgm, true /* incrementally */);
+    EXPECT(error == NULL);
+    EXPECT_NOTNULL(kernel_pgm);
+
+    lib = TestCase::ReloadTestKernel(kernel_pgm);
+    EXPECT_VALID(lib);
+  }
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(24, value);
+}
+
+TEST_CASE(IsolateReload_KernelIncrementalCompileAppAndLib) {
+  // clang-format off
+  Dart_SourceFile sourcefiles[] = {
+    {
+      "file:///test-app.dart",
+      "import 'test-lib.dart';\n"
+      "main() {\n"
+      "  return WhatsTheMeaningOfAllThis();\n"
+      "}\n",
+    },
+    {
+      "file:///test-lib.dart",
+      "WhatsTheMeaningOfAllThis() {\n"
+      "  return 42;\n"
+      "}\n",
+    },
+    {
+      "file:///.packages", "untitled:/"
+    }};
+  // clang-format on
+
+  Dart_Handle lib = TestCase::LoadTestScriptWithDFE(
+      sizeof(sourcefiles) / sizeof(Dart_SourceFile), sourcefiles,
+      NULL /* resolver */, true /* finalize */, true /* incrementally */);
+  EXPECT_VALID(lib);
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  int64_t value = 0;
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(42, value);
+
+  // clang-format off
+  Dart_SourceFile updated_sourcefiles[] = {
+    {
+      "file:///test-lib.dart",
+      "WhatsTheMeaningOfAllThis() {\n"
+      "  return 24;\n"
+      "}\n"
+      ""
+    }};
+  // clang-format on
+  {
+    void* kernel_pgm = NULL;
+    char* error = TestCase::CompileTestScriptWithDFE(
+        "file:///test-app",
+        sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
+        updated_sourcefiles, &kernel_pgm, true /* incrementally */);
+    EXPECT(error == NULL);
+    EXPECT_NOTNULL(kernel_pgm);
+
+    lib = TestCase::ReloadTestKernel(kernel_pgm);
+    EXPECT_VALID(lib);
+  }
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(24, value);
+}
+
+TEST_CASE(IsolateReload_KernelIncrementalCompileGenerics) {
+  // clang-format off
+  Dart_SourceFile sourcefiles[] = {
+    {
+      "file:///test-app.dart",
+      "import 'test-lib.dart';\n"
+      "class Account {\n"
+      "  int balance() => 42;\n"
+      "}\n"
+      "class MyAccountState extends State<Account> {\n"
+      "  MyAccountState(Account a): super(a) {}\n"
+      "}\n"
+      "main() {\n"
+      "  return (new MyAccountState(new Account()))\n"
+      "      .howAreTheThings().balance();\n"
+      "}\n",
+    },
+    {
+      "file:///test-lib.dart",
+      "class State<T> {\n"
+      "  T t;"
+      "  State(this.t);\n"
+      "  T howAreTheThings() => t;\n"
+      "}\n",
+    },
+    {
+      "file:///.packages", "untitled:/"
+    }};
+  // clang-format on
+
+  Dart_Handle lib = TestCase::LoadTestScriptWithDFE(
+      sizeof(sourcefiles) / sizeof(Dart_SourceFile), sourcefiles,
+      NULL /* resolver */, true /* finalize */, true /* incrementally */);
+  EXPECT_VALID(lib);
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  int64_t value = 0;
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(42, value);
+
+  // clang-format off
+  Dart_SourceFile updated_sourcefiles[] = {
+    {
+      "file:///test-app.dart",
+      "import 'test-lib.dart';\n"
+      "class Account {\n"
+      "  int balance() => 24;\n"
+      "}\n"
+      "class MyAccountState extends State<Account> {\n"
+      "  MyAccountState(Account a): super(a) {}\n"
+      "}\n"
+      "main() {\n"
+      "  return (new MyAccountState(new Account()))\n"
+      "      .howAreTheThings().balance();\n"
+      "}\n",
+    }};
+  // clang-format on
+  {
+    void* kernel_pgm = NULL;
+    char* error = TestCase::CompileTestScriptWithDFE(
+        "file:///test-app",
+        sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
+        updated_sourcefiles, &kernel_pgm, true /* incrementally */);
+    EXPECT(error == NULL);
+    EXPECT_NOTNULL(kernel_pgm);
+
+    lib = TestCase::ReloadTestKernel(kernel_pgm);
+    EXPECT_VALID(lib);
+  }
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  result = Dart_IntegerToInt64(result, &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(24, value);
+}
+
 TEST_CASE(IsolateReload_BadClass) {
   const char* kScript =
       "class Foo {\n"
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index 61df7ea..ad9664f 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -668,7 +668,7 @@
                  FlowGraphCompiler::SupportsUnboxedMints()) {
         // Don't generate mint code if the IC data is marked because of an
         // overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) return false;
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) return false;
         operands_type = kMintCid;
       } else if (ShouldSpecializeForDouble(ic_data)) {
         operands_type = kDoubleCid;
@@ -715,7 +715,7 @@
         // Left shift may overflow from smi into mint or big ints.
         // Don't generate smi code if the IC data is marked because
         // of an overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) {
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) {
           return false;
         }
         operands_type = ic_data.HasDeoptReason(ICData::kDeoptBinarySmiOp)
@@ -726,7 +726,7 @@
                      Z, ic_data.AsUnaryClassChecksForArgNr(1)))) {
         // Don't generate mint code if the IC data is marked because of an
         // overflow.
-        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryMintOp)) {
+        if (ic_data.HasDeoptReason(ICData::kDeoptBinaryInt64Op)) {
           return false;
         }
         // Check for smi/mint << smi or smi/mint >> smi.
@@ -776,11 +776,11 @@
   } else if (operands_type == kMintCid) {
     if (!FlowGraphCompiler::SupportsUnboxedMints()) return false;
     if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
-      ShiftMintOpInstr* shift_op = new (Z) ShiftMintOpInstr(
+      ShiftInt64OpInstr* shift_op = new (Z) ShiftInt64OpInstr(
           op_kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id());
       ReplaceCall(call, shift_op);
     } else {
-      BinaryMintOpInstr* bin_op = new (Z) BinaryMintOpInstr(
+      BinaryInt64OpInstr* bin_op = new (Z) BinaryInt64OpInstr(
           op_kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id());
       ReplaceCall(call, bin_op);
     }
@@ -853,7 +853,7 @@
              HasOnlySmiOrMint(*call->ic_data()) &&
              FlowGraphCompiler::SupportsUnboxedMints()) {
     unary_op = new (Z)
-        UnaryMintOpInstr(op_kind, new (Z) Value(input), call->deopt_id());
+        UnaryInt64OpInstr(op_kind, new (Z) Value(input), call->deopt_id());
   } else if (HasOnlyOneDouble(*call->ic_data()) &&
              (op_kind == Token::kNEGATE) && CanUnboxDouble()) {
     AddReceiverCheck(call);
@@ -1609,7 +1609,7 @@
 void JitOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
 // TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
-  if (!instr->can_pack_into_smi()) instr->set_representation(kUnboxedMint);
+  if (!instr->can_pack_into_smi()) instr->set_representation(kUnboxedInt64);
 #endif
 }
 
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 8700dc7..4c229c9 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -124,8 +124,8 @@
     ASSERT(isolate != NULL);
     const char* isolate_name = isolate->name();
     setup_time_micros_ = OS::GetCurrentTimeMicros();
-    OS::Print("[+%" Pd64 "ms] Isolate %s processing service request %s\n",
-              Dart::UptimeMillis(), isolate_name, method_);
+    OS::PrintErr("[+%" Pd64 "ms] Isolate %s processing service request %s\n",
+                 Dart::UptimeMillis(), isolate_name, method_);
   }
   buffer_.Printf("{\"jsonrpc\":\"2.0\", \"result\":");
 }
@@ -282,15 +282,15 @@
     const char* isolate_name = isolate->name();
     int64_t total_time = OS::GetCurrentTimeMicros() - setup_time_micros_;
     if (result) {
-      OS::Print("[+%" Pd64
-                "ms] Isolate %s processed service request %s "
-                "(%" Pd64 "us)\n",
-                Dart::UptimeMillis(), isolate_name, method_, total_time);
+      OS::PrintErr("[+%" Pd64
+                   "ms] Isolate %s processed service request %s "
+                   "(%" Pd64 "us)\n",
+                   Dart::UptimeMillis(), isolate_name, method_, total_time);
     } else {
-      OS::Print("[+%" Pd64
-                "ms] Isolate %s processed service request %s "
-                "(%" Pd64 "us) FAILED\n",
-                Dart::UptimeMillis(), isolate_name, method_, total_time);
+      OS::PrintErr("[+%" Pd64
+                   "ms] Isolate %s processed service request %s "
+                   "(%" Pd64 "us) FAILED\n",
+                   Dart::UptimeMillis(), isolate_name, method_, total_time);
     }
   }
 }
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index aae1c28..13175e8 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -116,6 +116,11 @@
 
 class Program {
  public:
+  ~Program() {
+    free(const_cast<uint8_t*>(kernel_data_));
+    kernel_data_ = NULL;
+  }
+
   static Program* ReadFrom(Reader* reader);
 
   NameIndex main_method() { return main_method_reference_; }
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index bcc9434..080fc76 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -137,21 +137,29 @@
 class Reader {
  public:
   Reader(const uint8_t* buffer, intptr_t size)
-      : buffer_(buffer), size_(size), offset_(0) {}
+      : raw_buffer_(buffer), typed_data_(NULL), size_(size), offset_(0) {}
+
+  explicit Reader(const TypedData& typed_data)
+      : raw_buffer_(NULL),
+        typed_data_(&typed_data),
+        size_(typed_data.IsNull() ? 0 : typed_data.Length()),
+        offset_(0) {}
 
   uint32_t ReadUInt32() {
     ASSERT(offset_ + 4 <= size_);
 
-    uint32_t value = (buffer_[offset_ + 0] << 24) |
-                     (buffer_[offset_ + 1] << 16) |
-                     (buffer_[offset_ + 2] << 8) | (buffer_[offset_ + 3] << 0);
+    const uint8_t* buffer = this->buffer();
+    uint32_t value = (buffer[offset_ + 0] << 24) | (buffer[offset_ + 1] << 16) |
+                     (buffer[offset_ + 2] << 8) | (buffer[offset_ + 3] << 0);
     offset_ += 4;
     return value;
   }
 
   uint32_t ReadUInt() {
     ASSERT(offset_ + 1 <= size_);
-    uint8_t byte0 = buffer_[offset_];
+
+    const uint8_t* buffer = this->buffer();
+    uint8_t byte0 = buffer[offset_];
     if ((byte0 & 0x80) == 0) {
       // 0...
       offset_++;
@@ -159,15 +167,14 @@
     } else if ((byte0 & 0xc0) == 0x80) {
       // 10...
       ASSERT(offset_ + 2 <= size_);
-      uint32_t value = ((byte0 & ~0x80) << 8) | (buffer_[offset_ + 1]);
+      uint32_t value = ((byte0 & ~0x80) << 8) | (buffer[offset_ + 1]);
       offset_ += 2;
       return value;
     } else {
       // 11...
       ASSERT(offset_ + 4 <= size_);
-      uint32_t value = ((byte0 & ~0xc0) << 24) | (buffer_[offset_ + 1] << 16) |
-                       (buffer_[offset_ + 2] << 8) |
-                       (buffer_[offset_ + 3] << 0);
+      uint32_t value = ((byte0 & ~0xc0) << 24) | (buffer[offset_ + 1] << 16) |
+                       (buffer[offset_ + 2] << 8) | (buffer[offset_ + 3] << 0);
       offset_ += 4;
       return value;
     }
@@ -175,10 +182,6 @@
 
   /**
    * Read and return a TokenPosition from this reader.
-   * @param record specifies whether or not the read position is saved as a
-   * valid token position in the current script.
-   * If not be sure to record it later by calling record_token_position (after
-   * setting the correct current_script_id).
    */
   TokenPosition ReadPosition() {
     // Position is saved as unsigned,
@@ -197,9 +200,9 @@
 
   intptr_t ReadListLength() { return ReadUInt(); }
 
-  uint8_t ReadByte() { return buffer_[offset_++]; }
+  uint8_t ReadByte() { return buffer()[offset_++]; }
 
-  uint8_t PeekByte() { return buffer_[offset_]; }
+  uint8_t PeekByte() { return buffer()[offset_]; }
 
   bool ReadBool() { return (ReadByte() & 1) == 1; }
 
@@ -231,13 +234,6 @@
     }
   }
 
-  const uint8_t* Consume(int count) {
-    ASSERT(offset_ + count <= size_);
-    const uint8_t* old = buffer_ + offset_;
-    offset_ += count;
-    return old;
-  }
-
   void EnsureEnd() {
     if (offset_ != size_) {
       FATAL2(
@@ -256,33 +252,55 @@
   // but can be overwritten (e.g. via the PositionScope class).
   TokenPosition min_position() { return min_position_; }
 
-  template <typename T, typename RT>
-  T* ReadOptional() {
-    Tag tag = ReadTag();
-    if (tag == kNothing) {
-      return NULL;
-    }
-    ASSERT(tag == kSomething);
-    return RT::ReadFrom(this);
-  }
-
-  template <typename T>
-  T* ReadOptional() {
-    return ReadOptional<T, T>();
-  }
-
   // A canonical name reference of -1 indicates none (for optional names), not
   // the root name as in the canonical name table.
   NameIndex ReadCanonicalNameReference() { return NameIndex(ReadUInt() - 1); }
 
   intptr_t offset() { return offset_; }
   void set_offset(intptr_t offset) { offset_ = offset; }
-  intptr_t size() { return size_; }
 
-  const uint8_t* buffer() { return buffer_; }
+  intptr_t size() { return size_; }
+  void set_size(intptr_t size) { size_ = size; }
+
+  const TypedData* typed_data() { return typed_data_; }
+  void set_typed_data(const TypedData* typed_data) { typed_data_ = typed_data; }
+
+  const uint8_t* raw_buffer() { return raw_buffer_; }
+  void set_raw_buffer(const uint8_t* raw_buffer) { raw_buffer_ = raw_buffer; }
+
+  TypedData& CopyDataToVMHeap(Zone* zone,
+                              intptr_t from_byte,
+                              intptr_t to_byte) {
+    intptr_t size = to_byte - from_byte;
+    TypedData& data = TypedData::Handle(
+        zone, TypedData::New(kTypedDataUint8ArrayCid, size, Heap::kOld));
+    {
+      NoSafepointScope no_safepoint;
+      memmove(data.DataAddr(0), buffer() + from_byte, size);
+    }
+    return data;
+  }
+
+  uint8_t* CopyDataIntoZone(Zone* zone, intptr_t offset, intptr_t length) {
+    uint8_t* buffer_ = zone->Alloc<uint8_t>(length);
+    {
+      NoSafepointScope no_safepoint;
+      memmove(buffer_, buffer() + offset, length);
+    }
+    return buffer_;
+  }
 
  private:
-  const uint8_t* buffer_;
+  const uint8_t* buffer() {
+    if (raw_buffer_ != NULL) {
+      return raw_buffer_;
+    }
+    NoSafepointScope no_safepoint;
+    return reinterpret_cast<uint8_t*>(typed_data_->DataAddr(0));
+  }
+
+  const uint8_t* raw_buffer_;
+  const TypedData* typed_data_;
   intptr_t size_;
   intptr_t offset_;
   TokenPosition max_position_;
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 3f0d127..d260874 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -25,12 +25,11 @@
 }
 
 StreamingScopeBuilder::StreamingScopeBuilder(ParsedFunction* parsed_function,
-                                             intptr_t kernel_offset,
-                                             const uint8_t* buffer,
-                                             intptr_t buffer_length)
+                                             intptr_t relative_kernel_offset,
+                                             const TypedData& data)
     : result_(NULL),
       parsed_function_(parsed_function),
-      kernel_offset_(kernel_offset),
+      relative_kernel_offset_(relative_kernel_offset),
       translation_helper_(Thread::Current()),
       zone_(translation_helper_.zone()),
       current_function_scope_(NULL),
@@ -40,8 +39,8 @@
       needs_expr_temp_(false),
       builder_(new StreamingFlowGraphBuilder(&translation_helper_,
                                              zone_,
-                                             buffer,
-                                             buffer_length)),
+                                             relative_kernel_offset,
+                                             data)),
       type_translator_(builder_, /*finalize=*/true) {
   Script& script = Script::Handle(Z, parsed_function->function().script());
   H.SetStringOffsets(TypedData::Handle(Z, script.kernel_string_offsets()));
@@ -60,8 +59,7 @@
   ASSERT(scope_ == NULL && depth_.loop_ == 0 && depth_.function_ == 0);
   result_ = new (Z) ScopeBuildingResult();
 
-  ParsedFunction* parsed_function = parsed_function_;
-  const Function& function = parsed_function->function();
+  const Function& function = parsed_function_->function();
 
   // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
   // e.g. for type translation.
@@ -92,14 +90,14 @@
     parsed_function_->set_function_type_arguments(type_args_var);
   }
 
-  LocalVariable* context_var = parsed_function->current_context_var();
+  LocalVariable* context_var = parsed_function_->current_context_var();
   context_var->set_is_forced_stack();
   scope_->AddVariable(context_var);
 
-  parsed_function->SetNodeSequence(
+  parsed_function_->SetNodeSequence(
       new SequenceNode(TokenPosition::kNoSource, scope_));
 
-  builder_->SetOffset(kernel_offset_);
+  builder_->SetOffset(0);
 
   FunctionNodeHelper function_node_helper(builder_);
 
@@ -112,7 +110,7 @@
     case RawFunction::kSetterFunction:
     case RawFunction::kConstructor: {
       const Tag tag = builder_->PeekTag();
-      intptr_t parent_offset = builder_->ReadUntilFunctionNode();
+      builder_->ReadUntilFunctionNode();
       function_node_helper.ReadUntilExcluding(
           FunctionNodeHelper::kPositionalParameters);
       current_function_async_marker_ = function_node_helper.async_marker_;
@@ -139,24 +137,28 @@
         // We visit instance field initializers because they might contain
         // [Let] expressions and we need to have a mapping.
         if (tag == kConstructor) {
-          ASSERT(parent_offset >= 0);
-          AlternativeReadingScope alt(builder_->reader_, parent_offset);
-          ClassHelper class_helper(builder_);
-          class_helper.ReadUntilExcluding(ClassHelper::kFields);
-          intptr_t list_length =
-              builder_->ReadListLength();  // read fields list length.
-          for (intptr_t i = 0; i < list_length; i++) {
-            intptr_t field_offset = builder_->ReaderOffset();
-            FieldHelper field_helper(builder_);
-            field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
-            Tag initializer_tag =
-                builder_->ReadTag();  // read first part of initializer.
-            if (!field_helper.IsStatic() && initializer_tag == kSomething) {
-              EnterScope(field_offset);
-              VisitExpression();  // read initializer.
-              ExitScope(field_helper.position_, field_helper.end_position_);
-            } else if (initializer_tag == kSomething) {
-              builder_->SkipExpression();  // read initializer.
+          Class& parent_class = Class::Handle(Z, function.Owner());
+          Array& class_fields = Array::Handle(Z, parent_class.fields());
+          dart::Field& class_field = dart::Field::Handle(Z);
+          for (intptr_t i = 0; i < class_fields.Length(); ++i) {
+            class_field ^= class_fields.At(i);
+            if (!class_field.is_static()) {
+              TypedData& kernel_data =
+                  TypedData::Handle(Z, class_field.kernel_data());
+              ASSERT(!kernel_data.IsNull());
+              AlternativeReadingScope alt(builder_->reader_, &kernel_data, 0);
+              intptr_t saved_relative_kernel_offset_ = relative_kernel_offset_;
+              relative_kernel_offset_ = class_field.kernel_offset();
+              FieldHelper field_helper(builder_);
+              field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+              Tag initializer_tag =
+                  builder_->ReadTag();  // read first part of initializer.
+              if (initializer_tag == kSomething) {
+                EnterScope(class_field.kernel_offset());
+                VisitExpression();  // read initializer.
+                ExitScope(field_helper.position_, field_helper.end_position_);
+              }
+              relative_kernel_offset_ = saved_relative_kernel_offset_;
             }
           }
         }
@@ -172,11 +174,11 @@
       // read positional_parameters and named_parameters.
       AddPositionalAndNamedParameters(pos);
 
-      // We generate a syntethic body for implicit closure functions - which
+      // We generate a synthetic body for implicit closure functions - which
       // will forward the call to the real function.
       //     -> see BuildGraphOfImplicitClosureFunction
       if (!function.IsImplicitClosureFunction()) {
-        builder_->SetOffset(kernel_offset_);
+        builder_->SetOffset(0);
         first_body_token_position_ = TokenPosition::kNoSource;
         VisitNode();
 
@@ -256,7 +258,7 @@
   if (needs_expr_temp_) {
     scope_->AddVariable(parsed_function_->EnsureExpressionTemp());
   }
-  parsed_function->AllocateVariables();
+  parsed_function_->AllocateVariables();
 
   return result_;
 }
@@ -290,23 +292,27 @@
   // constructor.
   ConstructorHelper constructor_helper(builder_);
   constructor_helper.ReadUntilExcluding(ConstructorHelper::kFunction);
-  intptr_t parent_offset = constructor_helper.parent_class_binary_offset_;
-  ASSERT(parent_offset >= 0);
   {
-    AlternativeReadingScope alt(builder_->reader_, parent_offset);
-    ClassHelper class_helper(builder_);
-    class_helper.ReadUntilExcluding(ClassHelper::kFields);
-
-    intptr_t list_length =
-        builder_->ReadListLength();  // read fields list length.
-    for (intptr_t i = 0; i < list_length; i++) {
-      FieldHelper field_helper(builder_);
-      field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
-      Tag initializer_tag = builder_->ReadTag();
-      if (!field_helper.IsStatic() && initializer_tag == kSomething) {
-        VisitExpression();  // read initializer.
-      } else if (initializer_tag == kSomething) {
-        builder_->SkipExpression();  // read initializer.
+    const Function& function = parsed_function_->function();
+    Class& parent_class = Class::Handle(Z, function.Owner());
+    Array& class_fields = Array::Handle(Z, parent_class.fields());
+    dart::Field& class_field = dart::Field::Handle(Z);
+    for (intptr_t i = 0; i < class_fields.Length(); ++i) {
+      class_field ^= class_fields.At(i);
+      if (!class_field.is_static()) {
+        TypedData& kernel_data =
+            TypedData::Handle(Z, class_field.kernel_data());
+        ASSERT(!kernel_data.IsNull());
+        AlternativeReadingScope alt(builder_->reader_, &kernel_data, 0);
+        intptr_t saved_relative_kernel_offset_ = relative_kernel_offset_;
+        relative_kernel_offset_ = class_field.kernel_offset();
+        FieldHelper field_helper(builder_);
+        field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+        Tag initializer_tag = builder_->ReadTag();
+        if (initializer_tag == kSomething) {
+          VisitExpression();  // read initializer.
+        }
+        relative_kernel_offset_ = saved_relative_kernel_offset_;
       }
     }
   }
@@ -612,6 +618,7 @@
     case kFunctionExpression: {
       intptr_t offset =
           builder_->ReaderOffset() - 1;  // -1 to include tag byte.
+      builder_->ReadPosition();          // read position.
       HandleLocalFunction(offset);       // read function node.
       return;
     }
@@ -620,7 +627,7 @@
       intptr_t offset =
           builder_->ReaderOffset() - 1;  // -1 to include tag byte.
 
-      EnterScope(offset);
+      EnterScope(relative_kernel_offset_ + offset);
 
       VisitVariableDeclaration();  // read variable declaration.
       VisitExpression();           // read expression.
@@ -691,7 +698,7 @@
       intptr_t offset =
           builder_->ReaderOffset() - 1;  // -1 to include tag byte.
 
-      EnterScope(offset);
+      EnterScope(relative_kernel_offset_ + offset);
 
       intptr_t list_length =
           builder_->ReadListLength();  // read number of statements.
@@ -752,7 +759,7 @@
       intptr_t offset =
           builder_->ReaderOffset() - 1;  // -1 to include tag byte.
 
-      EnterScope(offset);
+      EnterScope(relative_kernel_offset_ + offset);
 
       TokenPosition position = builder_->ReadPosition();  // read position.
       intptr_t list_length =
@@ -798,7 +805,7 @@
       ++depth_.for_in_;
       AddIteratorVariable();
       ++depth_.loop_;
-      EnterScope(start_offset);
+      EnterScope(relative_kernel_offset_ + start_offset);
 
       {
         AlternativeReadingScope alt(builder_->reader_, offset);
@@ -874,7 +881,7 @@
         PositionScope scope(builder_->reader_);
         intptr_t offset = builder_->ReaderOffset();  // Catch has no tag.
 
-        EnterScope(offset);
+        EnterScope(relative_kernel_offset_ + offset);
 
         VisitDartType();            // Read the guard.
         tag = builder_->ReadTag();  // read first part of exception.
@@ -1003,7 +1010,8 @@
     variable->set_is_final();
   }
   scope_->AddVariable(variable);
-  result_->locals.Insert(kernel_offset_no_tag, variable);
+  result_->locals.Insert(relative_kernel_offset_ + kernel_offset_no_tag,
+                         variable);
 }
 
 void StreamingScopeBuilder::VisitDartType() {
@@ -1117,11 +1125,11 @@
       current_function_async_marker_;
   StreamingScopeBuilder::DepthState saved_depth_state = depth_;
   depth_ = DepthState(depth_.function_ + 1);
-  EnterScope(parent_kernel_offset);
+  EnterScope(relative_kernel_offset_ + parent_kernel_offset);
   current_function_scope_ = scope_;
   current_function_async_marker_ = function_node_helper.async_marker_;
   if (depth_.function_ == 1) {
-    FunctionScope function_scope = {offset, scope_};
+    FunctionScope function_scope = {relative_kernel_offset_ + offset, scope_};
     result_->function_scopes.Add(function_scope);
   }
 
@@ -1184,7 +1192,7 @@
     variable->set_is_forced_stack();
   }
   scope_->InsertParameterAt(pos, variable);
-  result_->locals.Insert(kernel_offset, variable);
+  result_->locals.Insert(relative_kernel_offset_ + kernel_offset, variable);
 
   // The default value may contain 'let' bindings for which the constant
   // evaluator needs scope bindings.
@@ -1282,22 +1290,21 @@
   }
 }
 
-void StreamingScopeBuilder::LookupVariable(intptr_t declaration_binary_offest) {
-  LocalVariable* variable = result_->locals.Lookup(declaration_binary_offest);
+void StreamingScopeBuilder::LookupVariable(intptr_t declaration_binary_offset) {
+  LocalVariable* variable = result_->locals.Lookup(declaration_binary_offset);
   if (variable == NULL) {
     // We have not seen a declaration of the variable, so it must be the
     // case that we are compiling a nested function and the variable is
     // declared in an outer scope.  In that case, look it up in the scope by
     // name and add it to the variable map to simplify later lookup.
     ASSERT(current_function_scope_->parent() != NULL);
-
-    StringIndex var_name =
-        builder_->GetNameFromVariableDeclaration(declaration_binary_offest);
+    StringIndex var_name = builder_->GetNameFromVariableDeclaration(
+        declaration_binary_offset, parsed_function_->function());
 
     const dart::String& name = H.DartSymbol(var_name);
     variable = current_function_scope_->parent()->LookupVariable(name, true);
     ASSERT(variable != NULL);
-    result_->locals.Insert(declaration_binary_offest, variable);
+    result_->locals.Insert(declaration_binary_offset, variable);
   }
 
   if (variable->owner()->function_level() < scope_->function_level()) {
@@ -1473,11 +1480,9 @@
 
 void StreamingDartTypeTranslator::BuildFunctionType(bool simple) {
   intptr_t list_length = 0;
-  intptr_t first_item_offest = -1;
   if (!simple) {
     list_length =
         builder_->ReadListLength();  // read type_parameters list length
-    first_item_offest = builder_->ReaderOffset();
     for (int i = 0; i < list_length; ++i) {
       builder_->SkipStringReference();  // read string index (name).
       builder_->SkipDartType();         // read dart type.
@@ -1491,7 +1496,7 @@
   //     checker and the runtime unless explicitly specified otherwise.
   //
   // So we convert malformed return/parameter types to `dynamic`.
-  TypeParameterScope scope(this, first_item_offest, list_length);
+  TypeParameterScope scope(this, list_length);
 
   Function& signature_function = Function::ZoneHandle(
       Z,
@@ -1641,7 +1646,7 @@
 
   if (type_parameter_scope_ != NULL && parameter_index >= 0 &&
       parameter_index < type_parameter_scope_->outer_parameter_count() +
-                            type_parameter_scope_->parameters_count()) {
+                            type_parameter_scope_->parameter_count()) {
     result_ ^= dart::Type::DynamicType();
     return;
   }
@@ -2242,7 +2247,8 @@
 }
 
 void StreamingConstantEvaluator::EvaluateLet() {
-  intptr_t kernel_position = builder_->ReaderOffset();
+  intptr_t kernel_position =
+      builder_->ReaderOffset() + builder_->relative_kernel_offset_;
   LocalVariable* local = builder_->LookupVariable(kernel_position);
 
   // read variable declaration.
@@ -2406,12 +2412,12 @@
 const TypeArguments* StreamingConstantEvaluator::TranslateTypeArguments(
     const Function& target,
     dart::Class* target_klass) {
-  intptr_t types_count = builder_->ReadListLength();  // read types count.
+  intptr_t type_count = builder_->ReadListLength();  // read type count.
 
   const TypeArguments* type_arguments = NULL;
-  if (types_count > 0) {
+  if (type_count > 0) {
     type_arguments = &T.BuildInstantiatedTypeArguments(
-        *target_klass, types_count);  // read types.
+        *target_klass, type_count);  // read types.
 
     if (!(type_arguments->IsNull() || type_arguments->IsInstantiated())) {
       H.ReportError("Type must be constant in const constructor.");
@@ -2447,7 +2453,8 @@
     return false;
   }
   KernelConstantsMap constants(script_.compile_time_constants());
-  *value ^= constants.GetOrNull(kernel_offset, &is_present);
+  *value ^= constants.GetOrNull(
+      kernel_offset + builder_->relative_kernel_offset_, &is_present);
   // Mutator compiler thread may add constants while background compiler
   // is running, and thus change the value of 'compile_time_constants';
   // do not assert that 'compile_time_constants' has not changed.
@@ -2478,7 +2485,8 @@
     script_.set_compile_time_constants(array);
   }
   KernelConstantsMap constants(script_.compile_time_constants());
-  constants.InsertNewOrGetValue(kernel_offset, value);
+  constants.InsertNewOrGetValue(
+      kernel_offset + builder_->relative_kernel_offset_, value);
   script_.set_compile_time_constants(constants.Release());
 }
 
@@ -2494,7 +2502,7 @@
   }
 }
 
-intptr_t StreamingFlowGraphBuilder::ReadUntilFunctionNode() {
+void StreamingFlowGraphBuilder::ReadUntilFunctionNode() {
   const Tag tag = PeekTag();
   if (tag == kProcedure) {
     ProcedureHelper procedure_helper(this);
@@ -2503,12 +2511,12 @@
       // Running a procedure without a function node doesn't make sense.
       UNREACHABLE();
     }
-    return -1;
+    return;
     // Now at start of FunctionNode.
   } else if (tag == kConstructor) {
     ConstructorHelper constructor_helper(this);
     constructor_helper.ReadUntilExcluding(ConstructorHelper::kFunction);
-    return constructor_helper.parent_class_binary_offset_;
+    return;
     // Now at start of FunctionNode.
     // Notice that we also have a list of initializers after that!
   } else if (tag == kFunctionNode) {
@@ -2516,13 +2524,28 @@
   } else {
     UNREACHABLE();
   }
-  return -1;
+  return;
 }
 
 StringIndex StreamingFlowGraphBuilder::GetNameFromVariableDeclaration(
-    intptr_t kernel_offset) {
+    intptr_t kernel_offset,
+    const Function& function) {
+  Function& function_or_parent = Function::Handle(Z, function.raw());
+  intptr_t function_start_relative =
+      function_or_parent.kernel_offset() - kernel_offset;
+  while (function_start_relative > 0) {
+    function_or_parent = function_or_parent.parent_function();
+    function_start_relative =
+        function_or_parent.kernel_offset() - kernel_offset;
+  }
+  TypedData& kernel_data =
+      TypedData::Handle(Z, function_or_parent.kernel_data());
+  ASSERT(!kernel_data.IsNull());
+
   // Temporarily go to the variable declaration, read the name.
-  AlternativeReadingScope alt(reader_, kernel_offset);
+  AlternativeReadingScope alt(
+      reader_, &kernel_data,
+      kernel_offset - function_or_parent.kernel_offset());
   VariableDeclarationHelper helper(this);
   helper.ReadUntilIncluding(VariableDeclarationHelper::kNameIndex);
   return helper.name_index_;
@@ -2712,7 +2735,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildInitializers(
-    intptr_t constructor_class_parent_offset) {
+    const Class& parent_class) {
   Fragment instructions;
 
   // Start by getting the position of the constructors initializer.
@@ -2733,30 +2756,40 @@
   {
     AlternativeReadingScope alt(reader_, initializers_offset);
     intptr_t list_length = ReadListLength();  // read initializers list length.
-    if (list_length == 1) {
-      Tag tag = ReadTag();
-      if (tag == kRedirectingInitializer) is_redirecting_constructor = true;
+    bool no_field_initializers = true;
+    for (intptr_t i = 0; i < list_length; ++i) {
+      if (PeekTag() == kRedirectingInitializer) {
+        is_redirecting_constructor = true;
+      } else if (PeekTag() == kFieldInitializer) {
+        no_field_initializers = false;
+      }
+      SkipInitializer();
     }
+    ASSERT(is_redirecting_constructor ? no_field_initializers : true);
   }
 
   if (!is_redirecting_constructor) {
-    AlternativeReadingScope alt(reader_, constructor_class_parent_offset);
-    ClassHelper class_helper(this);
-    class_helper.ReadUntilExcluding(ClassHelper::kFields);
-    intptr_t list_length = ReadListLength();  // read fields list length.
-
-    for (intptr_t i = 0; i < list_length; ++i) {
-      intptr_t field_offset = ReaderOffset();
-      FieldHelper field_helper(this);
-      field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
-      Tag initializer_tag = ReadTag();  // read first part of initializer.
-      if (!field_helper.IsStatic() && initializer_tag == kSomething) {
-        EnterScope(field_offset);
-        instructions += BuildFieldInitializer(
-            field_helper.canonical_name_);  // read initializer.
-        ExitScope(field_offset);
-      } else if (initializer_tag == kSomething) {
-        SkipExpression();  // read initializer.
+    Array& class_fields = Array::Handle(Z, parent_class.fields());
+    dart::Field& class_field = dart::Field::Handle(Z);
+    for (intptr_t i = 0; i < class_fields.Length(); ++i) {
+      class_field ^= class_fields.At(i);
+      if (!class_field.is_static()) {
+        TypedData& kernel_data =
+            TypedData::Handle(Z, class_field.kernel_data());
+        ASSERT(!kernel_data.IsNull());
+        AlternativeReadingScope alt(reader_, &kernel_data, 0);
+        intptr_t saved_relative_kernel_offset_ = relative_kernel_offset_;
+        relative_kernel_offset_ = class_field.kernel_offset();
+        FieldHelper field_helper(this);
+        field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+        Tag initializer_tag = ReadTag();  // read first part of initializer.
+        if (initializer_tag == kSomething) {
+          EnterScope(class_field.kernel_offset());
+          instructions += BuildFieldInitializer(
+              field_helper.canonical_name_);  // read initializer.
+          ExitScope(class_field.kernel_offset());
+        }
+        relative_kernel_offset_ = saved_relative_kernel_offset_;
       }
     }
   }
@@ -2805,7 +2838,6 @@
           break;
         }
         case kRedirectingInitializer: {
-          ASSERT(list_length == 1);
           NameIndex canonical_target =
               ReadCanonicalNameReference();  // read target_reference.
 
@@ -2848,7 +2880,8 @@
           //
           // (This is strictly speaking not what one should do in terms of the
           //  specification but that is how it is currently implemented.)
-          LocalVariable* variable = LookupVariable(ReaderOffset());
+          LocalVariable* variable =
+              LookupVariable(ReaderOffset() + relative_kernel_offset_);
 
           // Variable declaration
           VariableDeclarationHelper helper(this);
@@ -2900,7 +2933,8 @@
   // Positional.
   intptr_t positional_argument_count = ReadListLength();
   for (intptr_t i = 0; i < positional_argument_count; ++i) {
-    body += LoadLocal(LookupVariable(ReaderOffset()));  // ith variable offset.
+    body += LoadLocal(LookupVariable(
+        ReaderOffset() + relative_kernel_offset_));  // ith variable offset.
     body += PushArgument();
     SkipVariableDeclaration();  // read ith variable.
   }
@@ -2912,11 +2946,15 @@
     argument_names = Array::New(named_argument_count);
     for (intptr_t i = 0; i < named_argument_count; ++i) {
       // ith variable offset.
-      body += LoadLocal(LookupVariable(ReaderOffset()));
+      body +=
+          LoadLocal(LookupVariable(ReaderOffset() + relative_kernel_offset_));
       body += PushArgument();
-      StringIndex name = GetNameFromVariableDeclaration(ReaderOffset());
-      argument_names.SetAt(i, H.DartSymbol(name));
-      SkipVariableDeclaration();  // read ith variable.
+
+      // read ith variable.
+      VariableDeclarationHelper helper(this);
+      helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
+
+      argument_names.SetAt(i, H.DartSymbol(helper.name_index_));
     }
   }
 
@@ -2964,7 +3002,8 @@
   // closures its context field contains the context vector that is used by the
   // converted top-level function (target) explicitly and that should be passed
   // to that function as the first parameter.
-  body += LoadLocal(LookupVariable(ReaderOffset()));  // 0th variable offset.
+  body += LoadLocal(LookupVariable(
+      ReaderOffset() + relative_kernel_offset_));  // 0th variable offset.
   body += flow_graph_builder_->LoadField(Closure::context_offset());
   body += PushArgument();
   SkipVariableDeclaration();  // read 0th variable.
@@ -2972,7 +3011,8 @@
   // The rest of the parameters are the same for the method of the Closure class
   // being invoked and the top-level function (target).
   for (intptr_t i = 1; i < positional_argument_count; i++) {
-    body += LoadLocal(LookupVariable(ReaderOffset()));  // ith variable offset.
+    body += LoadLocal(LookupVariable(
+        ReaderOffset() + relative_kernel_offset_));  // ith variable offset.
     body += PushArgument();
     SkipVariableDeclaration();  // read ith variable.
   }
@@ -2983,12 +3023,16 @@
   if (named_argument_count > 0) {
     argument_names = Array::New(named_argument_count);
     for (intptr_t i = 0; i < named_argument_count; i++) {
+      // ith variable offset.
       body +=
-          LoadLocal(LookupVariable(ReaderOffset()));  // ith variable offset.
+          LoadLocal(LookupVariable(ReaderOffset() + relative_kernel_offset_));
       body += PushArgument();
-      argument_names.SetAt(
-          i, H.DartSymbol(GetNameFromVariableDeclaration(ReaderOffset())));
-      SkipVariableDeclaration();  // read ith variable.
+
+      // read ith variable.
+      VariableDeclarationHelper helper(this);
+      helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
+
+      argument_names.SetAt(i, H.DartSymbol(helper.name_index_));
     }
   }
 
@@ -3006,8 +3050,7 @@
                 flow_graph_builder_->next_block_id_ - 1);
 }
 
-FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfFunction(
-    intptr_t constructor_class_parent_offset) {
+FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfFunction(bool constructor) {
   const Function& dart_function = parsed_function()->function();
   TargetEntryInstr* normal_entry = flow_graph_builder_->BuildTargetEntry();
   flow_graph_builder_->graph_entry_ = new (Z) GraphEntryInstr(
@@ -3056,11 +3099,11 @@
     }
     body += Drop();  // The context.
   }
-  if (constructor_class_parent_offset > 0) {
+  if (constructor) {
     // TODO(27590): Currently the [VariableDeclaration]s from the
     // initializers will be visible inside the entire body of the constructor.
     // We should make a separate scope for them.
-    body += BuildInitializers(constructor_class_parent_offset);
+    body += BuildInitializers(Class::Handle(Z, dart_function.Owner()));
   }
 
   FunctionNodeHelper function_node_helper(this);
@@ -3071,7 +3114,7 @@
     AlternativeReadingScope alt(reader_);
     intptr_t list_length = ReadListLength();  // read number of positionals.
     if (list_length > 0) {
-      first_parameter_offset = ReaderOffset();
+      first_parameter_offset = ReaderOffset() + relative_kernel_offset_;
     }
   }
   // Current position: About to read list of positionals.
@@ -3115,8 +3158,10 @@
     intptr_t list_length = ReadListLength();
     for (intptr_t i = 0; i < list_length; ++i) {
       // ith variable offset.
-      body += LoadLocal(LookupVariable(ReaderOffset()));
-      body += CheckVariableTypeInCheckedMode(ReaderOffset());
+      body +=
+          LoadLocal(LookupVariable(ReaderOffset() + relative_kernel_offset_));
+      body += CheckVariableTypeInCheckedMode(ReaderOffset() +
+                                             relative_kernel_offset_);
       body += Drop();
       SkipVariableDeclaration();  // read ith variable.
     }
@@ -3125,8 +3170,10 @@
     list_length = ReadListLength();
     for (intptr_t i = 0; i < list_length; ++i) {
       // ith variable offset.
-      body += LoadLocal(LookupVariable(ReaderOffset()));
-      body += CheckVariableTypeInCheckedMode(ReaderOffset());
+      body +=
+          LoadLocal(LookupVariable(ReaderOffset() + relative_kernel_offset_));
+      body += CheckVariableTypeInCheckedMode(ReaderOffset() +
+                                             relative_kernel_offset_);
       body += Drop();
       SkipVariableDeclaration();  // read ith variable.
     }
@@ -3332,18 +3379,11 @@
       } else if (function.IsConvertedClosureFunction()) {
         return BuildGraphOfConvertedClosureFunction(function);
       }
-      return BuildGraphOfFunction();
+      return BuildGraphOfFunction(false);
     }
     case RawFunction::kConstructor: {
-      bool is_factory = function.IsFactory();
-      if (is_factory) {
-        ReadUntilFunctionNode();  // read until function node.
-        return BuildGraphOfFunction();
-      } else {
-        // Constructor: Pass offset to parent class.
-        return BuildGraphOfFunction(
-            ReadUntilFunctionNode());  // read until function node.
-      }
+      ReadUntilFunctionNode();  // read until function node.
+      return BuildGraphOfFunction(!function.IsFactory());
     }
     case RawFunction::kImplicitGetter:
     case RawFunction::kImplicitStaticFinalGetter:
@@ -3742,6 +3782,32 @@
   }
 }
 
+void StreamingFlowGraphBuilder::SkipInitializer() {
+  Tag tag = ReadTag();
+  ReadByte();  // read isSynthetic flag.
+  switch (tag) {
+    case kInvalidInitializer:
+      return;
+    case kFieldInitializer:
+      SkipCanonicalNameReference();  // read field_reference.
+      SkipExpression();              // read value.
+      return;
+    case kSuperInitializer:
+      SkipCanonicalNameReference();  // read target_reference.
+      SkipArguments();               // read arguments.
+      return;
+    case kRedirectingInitializer:
+      SkipCanonicalNameReference();  // read target_reference.
+      SkipArguments();               // read arguments.
+      return;
+    case kLocalInitializer:
+      SkipVariableDeclaration();  // read variable.
+      return;
+    default:
+      UNREACHABLE();
+  }
+}
+
 void StreamingFlowGraphBuilder::SkipExpression() {
   uint8_t payload = 0;
   Tag tag = ReadTag(&payload);
@@ -3891,6 +3957,7 @@
       return;
     }
     case kFunctionExpression:
+      ReadPosition();      // read position.
       SkipFunctionNode();  // read function node.
       return;
     case kLet:
@@ -4643,8 +4710,8 @@
 
 const TypeArguments& StreamingFlowGraphBuilder::BuildTypeArguments() {
   ReadUInt();                                // read arguments count.
-  intptr_t types_count = ReadListLength();   // read type count.
-  return T.BuildTypeArguments(types_count);  // read types.
+  intptr_t type_count = ReadListLength();    // read type count.
+  return T.BuildTypeArguments(type_count);   // read types.
 }
 
 Fragment StreamingFlowGraphBuilder::BuildArguments(Array* argument_names,
@@ -5673,8 +5740,8 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildFunctionExpression() {
-  intptr_t offset = ReaderOffset() - 1;  // -1 to include tag byte.
-  return BuildFunctionNode(offset, TokenPosition::kNoSource, false, -1);
+  ReadPosition();  // read position.
+  return BuildFunctionNode(TokenPosition::kNoSource, StringIndex());
 }
 
 Fragment StreamingFlowGraphBuilder::BuildLet(TokenPosition* position) {
@@ -5826,7 +5893,7 @@
 
   instructions += Drop();
 
-  SkipDartType();  // skip function type of the closure.
+  SkipDartType();         // skip function type of the closure.
   SkipListOfDartTypes();  // skip list of type arguments.
 
   return instructions;
@@ -5848,7 +5915,7 @@
 
   Fragment instructions;
 
-  instructions += EnterScope(offset);
+  instructions += EnterScope(offset + relative_kernel_offset_);
   intptr_t list_length = ReadListLength();  // read number of statements.
   for (intptr_t i = 0; i < list_length; ++i) {
     if (instructions.is_open()) {
@@ -5857,7 +5924,7 @@
       SkipStatement();  // read ith statement.
     }
   }
-  instructions += ExitScope(offset);
+  instructions += ExitScope(offset + relative_kernel_offset_);
 
   return instructions;
 }
@@ -6035,7 +6102,7 @@
   Fragment declarations;
 
   bool new_context = false;
-  declarations += EnterScope(offset, &new_context);
+  declarations += EnterScope(offset + relative_kernel_offset_, &new_context);
 
   intptr_t list_length = ReadListLength();  // read number of variables.
   for (intptr_t i = 0; i < list_length; ++i) {
@@ -6085,7 +6152,7 @@
   Fragment loop(declarations.entry, loop_exit);
   loop_depth_dec();
 
-  loop += ExitScope(offset);
+  loop += ExitScope(offset + relative_kernel_offset_);
 
   return loop;
 }
@@ -6095,7 +6162,7 @@
 
   ReadPosition();                                // read position.
   TokenPosition body_position = ReadPosition();  // read body position.
-  intptr_t variable_kernel_position = ReaderOffset();
+  intptr_t variable_kernel_position = ReaderOffset() + relative_kernel_offset_;
   SkipVariableDeclaration();  // read variable.
 
   TokenPosition iterable_position = TokenPosition::kNoSource;
@@ -6122,7 +6189,7 @@
   condition += BranchIfTrue(&body_entry, &loop_exit, false);
 
   Fragment body(body_entry);
-  body += EnterScope(offset);
+  body += EnterScope(offset + relative_kernel_offset_);
   body += LoadLocal(iterator);
   body += PushArgument();
   const dart::String& current_getter = dart::String::ZoneHandle(
@@ -6132,7 +6199,7 @@
                      LookupVariable(variable_kernel_position));
   body += Drop();
   body += BuildStatement();  // read body.
-  body += ExitScope(offset);
+  body += ExitScope(offset + relative_kernel_offset_);
 
   if (body.is_open()) {
     JoinEntryInstr* join = BuildJoinEntry();
@@ -6473,13 +6540,15 @@
       handler_types.SetAt(i, Object::dynamic_type());
     }
 
-    Fragment catch_handler_body = EnterScope(catch_offset);
+    Fragment catch_handler_body =
+        EnterScope(catch_offset + relative_kernel_offset_);
 
     tag = ReadTag();  // read first part of exception.
     if (tag == kSomething) {
       catch_handler_body += LoadLocal(CurrentException());
       catch_handler_body +=
-          StoreLocal(TokenPosition::kNoSource, LookupVariable(ReaderOffset()));
+          StoreLocal(TokenPosition::kNoSource,
+                     LookupVariable(ReaderOffset() + relative_kernel_offset_));
       catch_handler_body += Drop();
       SkipVariableDeclaration();  // read exception.
     }
@@ -6488,7 +6557,8 @@
     if (tag == kSomething) {
       catch_handler_body += LoadLocal(CurrentStackTrace());
       catch_handler_body +=
-          StoreLocal(TokenPosition::kNoSource, LookupVariable(ReaderOffset()));
+          StoreLocal(TokenPosition::kNoSource,
+                     LookupVariable(ReaderOffset() + relative_kernel_offset_));
       catch_handler_body += Drop();
       SkipVariableDeclaration();  // read stack trace.
     }
@@ -6501,7 +6571,7 @@
 
       // Note: ExitScope adjusts context_depth_ so even if catch_handler_body
       // is closed we still need to execute ExitScope for its side effect.
-      catch_handler_body += ExitScope(catch_offset);
+      catch_handler_body += ExitScope(catch_offset + relative_kernel_offset_);
       if (catch_handler_body.is_open()) {
         catch_handler_body += Goto(after_try);
       }
@@ -6725,7 +6795,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildVariableDeclaration() {
-  intptr_t kernel_position_no_tag = ReaderOffset();
+  intptr_t kernel_position_no_tag = ReaderOffset() + relative_kernel_offset_;
   LocalVariable* variable = LookupVariable(kernel_position_no_tag);
 
   VariableDeclarationHelper helper(this);
@@ -6764,30 +6834,32 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildFunctionDeclaration() {
-  intptr_t offset = ReaderOffset() - 1;     // -1 to include tag byte.
   TokenPosition position = ReadPosition();  // read position.
-  intptr_t variable_offeset = ReaderOffset();
-  SkipVariableDeclaration();  // read variable declaration.
+  intptr_t variable_offset = ReaderOffset() + relative_kernel_offset_;
+
+  // read variable declaration.
+  VariableDeclarationHelper helper(this);
+  helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
 
   Fragment instructions = DebugStepCheck(position);
-  instructions += BuildFunctionNode(offset, position, true, variable_offeset);
-  instructions += StoreLocal(position, LookupVariable(variable_offeset));
+  instructions += BuildFunctionNode(position, helper.name_index_);
+  instructions += StoreLocal(position, LookupVariable(variable_offset));
   instructions += Drop();
   return instructions;
 }
 
 Fragment StreamingFlowGraphBuilder::BuildFunctionNode(
-    intptr_t parent_kernel_offset,
     TokenPosition parent_position,
-    bool declaration,
-    intptr_t variable_offeset) {
-  intptr_t offset = ReaderOffset();
+    StringIndex name_index) {
+  intptr_t offset = ReaderOffset() + relative_kernel_offset_;
 
   FunctionNodeHelper function_node_helper(this);
   function_node_helper.ReadUntilExcluding(
       FunctionNodeHelper::kTotalParameterCount);
   TokenPosition position = function_node_helper.position_;
 
+  bool declaration = name_index >= 0;
+
   if (declaration) {
     position = parent_position;
   }
@@ -6811,10 +6883,10 @@
       }
 
       const dart::String* name;
-      if (!declaration) {
-        name = &Symbols::AnonymousClosure();
+      if (declaration) {
+        name = &H.DartSymbol(name_index);
       } else {
-        name = &H.DartSymbol(GetNameFromVariableDeclaration(variable_offeset));
+        name = &Symbols::AnonymousClosure();
       }
       // NOTE: This is not TokenPosition in the general sense!
       function = Function::NewClosureFunction(
@@ -6854,6 +6926,10 @@
                               false,  // is_method
                               true,   // is_closure
                               &function_node_helper);
+      function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kEnd);
+      TypedData& kernel_data = reader_->CopyDataToVMHeap(
+          Z, offset - relative_kernel_offset_, ReaderOffset());
+      function.set_kernel_data(kernel_data);
 
       // Finalize function type.
       Type& signature_type = Type::Handle(Z, function.SignatureType());
@@ -6918,18 +6994,18 @@
       function_node_helper->required_parameter_count_;
   intptr_t total_parameter_count = function_node_helper->total_parameter_count_;
 
-  intptr_t positional_parameters_count = ReadListLength();  // read list length.
+  intptr_t positional_parameter_count = ReadListLength();  // read list length.
 
-  intptr_t named_parameters_count =
-      total_parameter_count - positional_parameters_count;
+  intptr_t named_parameter_count =
+      total_parameter_count - positional_parameter_count;
 
   function.set_num_fixed_parameters(extra_parameters +
                                     required_parameter_count);
-  if (named_parameters_count > 0) {
-    function.SetNumOptionalParameters(named_parameters_count, false);
+  if (named_parameter_count > 0) {
+    function.SetNumOptionalParameters(named_parameter_count, false);
   } else {
     function.SetNumOptionalParameters(
-        positional_parameters_count - required_parameter_count, true);
+        positional_parameter_count - required_parameter_count, true);
   }
   intptr_t parameter_count = extra_parameters + total_parameter_count;
   function.set_parameter_types(
@@ -6952,7 +7028,7 @@
     pos++;
   }
 
-  for (intptr_t i = 0; i < positional_parameters_count; ++i, ++pos) {
+  for (intptr_t i = 0; i < positional_parameter_count; ++i, ++pos) {
     // Read ith variable declaration.
     VariableDeclarationHelper helper(this);
     helper.ReadUntilExcluding(VariableDeclarationHelper::kType);
@@ -6967,10 +7043,9 @@
     function.SetParameterNameAt(pos, H.DartSymbol(helper.name_index_));
   }
 
-  intptr_t named_parameters_count_check =
-      ReadListLength();  // read list length.
-  ASSERT(named_parameters_count_check == named_parameters_count);
-  for (intptr_t i = 0; i < named_parameters_count; ++i, ++pos) {
+  intptr_t named_parameter_count_check = ReadListLength();  // read list length.
+  ASSERT(named_parameter_count_check == named_parameter_count);
+  for (intptr_t i = 0; i < named_parameter_count; ++i, ++pos) {
     // Read ith variable declaration.
     VariableDeclarationHelper helper(this);
     helper.ReadUntilExcluding(VariableDeclarationHelper::kType);
@@ -7006,7 +7081,7 @@
       FunctionNodeHelper::kPositionalParameters);
   intptr_t param_count = function_node_helper.total_parameter_count_;
   intptr_t positional_count = ReadListLength();  // read list length.
-  intptr_t named_parameters_count = param_count - positional_count;
+  intptr_t named_parameter_count = param_count - positional_count;
 
   const Array& param_descriptor = Array::Handle(
       Array::New(param_count * Parser::kParameterEntrySize, Heap::kOld));
@@ -7014,9 +7089,9 @@
     const intptr_t entry_start = i * Parser::kParameterEntrySize;
 
     if (i == positional_count) {
-      intptr_t named_parameters_count_check =
+      intptr_t named_parameter_count_check =
           ReadListLength();  // read list length.
-      ASSERT(named_parameters_count_check == named_parameters_count);
+      ASSERT(named_parameter_count_check == named_parameter_count);
     }
 
     // Read ith variable declaration.
@@ -7079,23 +7154,29 @@
 
 void StreamingFlowGraphBuilder::CollectTokenPositionsFor(
     intptr_t script_index,
+    intptr_t initial_script_index,
     GrowableArray<intptr_t>* record_token_positions_in,
     GrowableArray<intptr_t>* record_yield_positions_in) {
   record_token_positions_into_ = record_token_positions_in;
   record_yield_positions_into_ = record_yield_positions_in;
   record_for_script_id_ = script_index;
+  current_script_id_ = initial_script_index;
 
-  // Get offset for 1st library.
-  SetOffset(reader_->size() - 4);
-  intptr_t library_count = reader_->ReadUInt32();
-
-  SetOffset(reader_->size() - 4 - 4 * library_count);
-  intptr_t offset = reader_->ReadUInt32();
-
-  SetOffset(offset);
-  for (intptr_t i = 0; i < library_count; ++i) {
-    LibraryHelper library_helper(this);
-    library_helper.ReadUntilExcluding(LibraryHelper::kEnd);
+  const Tag tag = PeekTag();
+  if (tag == kProcedure) {
+    ProcedureHelper procedure_helper(this);
+    procedure_helper.ReadUntilExcluding(ProcedureHelper::kEnd);
+  } else if (tag == kConstructor) {
+    ConstructorHelper constructor_helper(this);
+    constructor_helper.ReadUntilExcluding(ConstructorHelper::kEnd);
+  } else if (tag == kFunctionNode) {
+    FunctionNodeHelper function_node_helper(this);
+    function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kEnd);
+  } else if (tag == kField) {
+    FieldHelper field_helper(this);
+    field_helper.ReadUntilExcluding(FieldHelper::kEnd);
+  } else {
+    UNREACHABLE();
   }
 
   record_token_positions_into_ = NULL;
@@ -7130,8 +7211,9 @@
     }
   }
   intptr_t end_offset = ReaderOffset();
-  return H.DartString(reader_->buffer() + end_offset + start, end - start,
-                      Heap::kOld);
+  return H.DartString(
+      reader_->CopyDataIntoZone(Z, end_offset + start, end - start),
+      end - start, Heap::kOld);
 }
 
 String& StreamingFlowGraphBuilder::GetSourceFor(intptr_t index) {
@@ -7151,8 +7233,8 @@
   for (intptr_t i = 0; i < size; ++i) {
     intptr_t length = ReadUInt();
     if (index == i) {
-      return H.DartString(reader_->buffer() + ReaderOffset(), length,
-                          Heap::kOld);
+      return H.DartString(reader_->CopyDataIntoZone(Z, ReaderOffset(), length),
+                          length, Heap::kOld);
     }
     SkipBytes(length);
     intptr_t line_count = ReadUInt();
diff --git a/runtime/vm/kernel_binary_flowgraph.h b/runtime/vm/kernel_binary_flowgraph.h
index 1b000ab..b901900 100644
--- a/runtime/vm/kernel_binary_flowgraph.h
+++ b/runtime/vm/kernel_binary_flowgraph.h
@@ -51,38 +51,30 @@
   class TypeParameterScope {
    public:
     TypeParameterScope(StreamingDartTypeTranslator* translator,
-                       intptr_t parameters_offset,
-                       intptr_t parameters_count)
-        : parameters_offset_(parameters_offset),
-          parameters_count_(parameters_count),
+                       intptr_t parameter_count)
+        : parameter_count_(parameter_count),
           outer_(translator->type_parameter_scope_),
           translator_(translator) {
       outer_parameter_count_ = 0;
       if (outer_ != NULL) {
         outer_parameter_count_ =
-            outer_->outer_parameter_count_ + outer_->parameters_count_;
+            outer_->outer_parameter_count_ + outer_->parameter_count_;
       }
       translator_->type_parameter_scope_ = this;
     }
     ~TypeParameterScope() { translator_->type_parameter_scope_ = outer_; }
 
     TypeParameterScope* outer() const { return outer_; }
-    intptr_t parameters_offset() const { return parameters_offset_; }
-    intptr_t parameters_count() const { return parameters_count_; }
+    intptr_t parameter_count() const { return parameter_count_; }
     intptr_t outer_parameter_count() const { return outer_parameter_count_; }
 
    private:
-    intptr_t parameters_offset_;
-    intptr_t parameters_count_;
+    intptr_t parameter_count_;
     intptr_t outer_parameter_count_;
     TypeParameterScope* outer_;
     StreamingDartTypeTranslator* translator_;
   };
 
-  intptr_t FindTypeParameterIndex(intptr_t parameters_offset,
-                                  intptr_t parameters_count,
-                                  intptr_t look_for);
-
   StreamingFlowGraphBuilder* builder_;
   TranslationHelper& translation_helper_;
   ActiveClass* active_class_;
@@ -98,9 +90,8 @@
 class StreamingScopeBuilder {
  public:
   StreamingScopeBuilder(ParsedFunction* parsed_function,
-                        intptr_t kernel_offset,
-                        const uint8_t* buffer,
-                        intptr_t buffer_length);
+                        intptr_t relative_kernel_offset,
+                        const TypedData& data);
 
   virtual ~StreamingScopeBuilder();
 
@@ -158,7 +149,7 @@
   // Record an assignment or reference to a variable.  If the occurrence is
   // in a nested function, ensure that the variable is handled properly as a
   // captured variable.
-  void LookupVariable(intptr_t declaration_binary_offest);
+  void LookupVariable(intptr_t declaration_binary_offset);
 
   const dart::String& GenerateName(const char* prefix, intptr_t suffix);
 
@@ -185,7 +176,7 @@
 
   ScopeBuildingResult* result_;
   ParsedFunction* parsed_function_;
-  intptr_t kernel_offset_;
+  intptr_t relative_kernel_offset_;
 
   ActiveClass active_class_;
 
@@ -306,14 +297,15 @@
 class StreamingFlowGraphBuilder {
  public:
   StreamingFlowGraphBuilder(FlowGraphBuilder* flow_graph_builder,
-                            const uint8_t* buffer,
-                            intptr_t buffer_length)
+                            intptr_t relative_kernel_offset,
+                            const TypedData& data)
       : flow_graph_builder_(flow_graph_builder),
         translation_helper_(flow_graph_builder->translation_helper_),
         zone_(flow_graph_builder->zone_),
-        reader_(new Reader(buffer, buffer_length)),
+        reader_(new Reader(data)),
         constant_evaluator_(this),
         type_translator_(this, /* finalize= */ true),
+        relative_kernel_offset_(relative_kernel_offset),
         current_script_id_(-1),
         record_for_script_id_(-1),
         record_token_positions_into_(NULL),
@@ -329,6 +321,23 @@
         reader_(new Reader(buffer, buffer_length)),
         constant_evaluator_(this),
         type_translator_(this, /* finalize= */ true),
+        relative_kernel_offset_(0),
+        current_script_id_(-1),
+        record_for_script_id_(-1),
+        record_token_positions_into_(NULL),
+        record_yield_positions_into_(NULL) {}
+
+  StreamingFlowGraphBuilder(TranslationHelper* translation_helper,
+                            Zone* zone,
+                            intptr_t relative_kernel_offset,
+                            const TypedData& data)
+      : flow_graph_builder_(NULL),
+        translation_helper_(*translation_helper),
+        zone_(zone),
+        reader_(new Reader(data)),
+        constant_evaluator_(this),
+        type_translator_(this, /* finalize= */ true),
+        relative_kernel_offset_(relative_kernel_offset),
         current_script_id_(-1),
         record_for_script_id_(-1),
         record_token_positions_into_(NULL),
@@ -343,6 +352,7 @@
   RawObject* EvaluateMetadata(intptr_t kernel_offset);
   void CollectTokenPositionsFor(
       intptr_t script_index,
+      intptr_t initial_script_index,
       GrowableArray<intptr_t>* record_token_positions_in,
       GrowableArray<intptr_t>* record_yield_positions_in);
   intptr_t SourceTableSize();
@@ -355,22 +365,18 @@
                                  const Function& function,
                                  Function* outermost_function);
 
-  /**
-   * Will return kernel offset for parent class if reading a constructor.
-   * Will otherwise return -1.
-   */
-  intptr_t ReadUntilFunctionNode();
-  StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset);
+  void ReadUntilFunctionNode();
+  StringIndex GetNameFromVariableDeclaration(intptr_t kernel_offset,
+                                             const Function& function);
 
   FlowGraph* BuildGraphOfStaticFieldInitializer();
   FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value);
   void SetupDefaultParameterValues();
   Fragment BuildFieldInitializer(NameIndex canonical_name);
-  Fragment BuildInitializers(intptr_t constructor_class_parent_offset);
+  Fragment BuildInitializers(const Class& parent_class);
   FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function);
   FlowGraph* BuildGraphOfConvertedClosureFunction(const Function& function);
-  FlowGraph* BuildGraphOfFunction(
-      intptr_t constructor_class_parent_offset = -1);
+  FlowGraph* BuildGraphOfFunction(bool constructor);
 
   Fragment BuildExpression(TokenPosition* position = NULL);
   Fragment BuildStatement();
@@ -401,6 +407,7 @@
   void SkipListOfStrings();
   void SkipListOfVariableDeclarations();
   void SkipTypeParametersList();
+  void SkipInitializer();
   void SkipExpression();
   void SkipStatement();
   void SkipFunctionNode();
@@ -617,10 +624,8 @@
   Fragment BuildYieldStatement();
   Fragment BuildVariableDeclaration();
   Fragment BuildFunctionDeclaration();
-  Fragment BuildFunctionNode(intptr_t parent_kernel_offset,
-                             TokenPosition parent_position,
-                             bool declaration,
-                             intptr_t variable_offeset);
+  Fragment BuildFunctionNode(TokenPosition parent_position,
+                             StringIndex name_index);
   void SetupFunctionParameters(const dart::Class& klass,
                                const dart::Function& function,
                                bool is_method,
@@ -633,6 +638,7 @@
   Reader* reader_;
   StreamingConstantEvaluator constant_evaluator_;
   StreamingDartTypeTranslator type_translator_;
+  intptr_t relative_kernel_offset_;
   intptr_t current_script_id_;
   intptr_t record_for_script_id_;
   GrowableArray<intptr_t>* record_token_positions_into_;
@@ -657,19 +663,49 @@
 class AlternativeReadingScope {
  public:
   AlternativeReadingScope(Reader* reader, intptr_t new_position)
-      : reader_(reader), saved_offset_(reader_->offset()) {
+      : reader_(reader),
+        saved_size_(reader_->size()),
+        saved_raw_buffer_(reader_->raw_buffer()),
+        saved_typed_data_(reader_->typed_data()),
+        saved_offset_(reader_->offset()) {
+    reader_->set_offset(new_position);
+  }
+
+  AlternativeReadingScope(Reader* reader,
+                          const TypedData* new_typed_data,
+                          intptr_t new_position)
+      : reader_(reader),
+        saved_size_(reader_->size()),
+        saved_raw_buffer_(reader_->raw_buffer()),
+        saved_typed_data_(reader_->typed_data()),
+        saved_offset_(reader_->offset()) {
+    reader_->set_raw_buffer(NULL);
+    reader_->set_typed_data(new_typed_data);
+    reader_->set_size(new_typed_data->Length());
     reader_->set_offset(new_position);
   }
 
   explicit AlternativeReadingScope(Reader* reader)
-      : reader_(reader), saved_offset_(reader_->offset()) {}
+      : reader_(reader),
+        saved_size_(reader_->size()),
+        saved_raw_buffer_(reader_->raw_buffer()),
+        saved_typed_data_(reader_->typed_data()),
+        saved_offset_(reader_->offset()) {}
 
-  ~AlternativeReadingScope() { reader_->set_offset(saved_offset_); }
+  ~AlternativeReadingScope() {
+    reader_->set_raw_buffer(saved_raw_buffer_);
+    reader_->set_typed_data(saved_typed_data_);
+    reader_->set_size(saved_size_);
+    reader_->set_offset(saved_offset_);
+  }
 
   intptr_t saved_offset() { return saved_offset_; }
 
  private:
   Reader* reader_;
+  intptr_t saved_size_;
+  const uint8_t* saved_raw_buffer_;
+  const TypedData* saved_typed_data_;
   intptr_t saved_offset_;
 };
 
@@ -875,7 +911,6 @@
     kPosition,
     kEndPosition,
     kFlags,
-    kParentClassBinaryOffset,
     kName,
     kSourceUriIndex,
     kDocumentationCommentIndex,
@@ -925,10 +960,6 @@
       case kFlags:
         flags_ = builder_->ReadFlags();  // read flags.
         if (++next_read_ == field) return;
-      case kParentClassBinaryOffset:
-        parent_class_binary_offset_ =
-            builder_->ReadUInt();  // read parent class binary offset.
-        if (++next_read_ == field) return;
       case kName:
         builder_->SkipName();  // read name.
         if (++next_read_ == field) return;
@@ -958,6 +989,7 @@
             AlternativeReadingScope alt(builder_->reader_);
             Tag tag = builder_->ReadTag();
             ASSERT(tag == kFunctionExpression);
+            builder_->ReadPosition();  // read position.
 
             FunctionNodeHelper helper(builder_);
             helper.ReadUntilIncluding(FunctionNodeHelper::kEndPosition);
@@ -999,7 +1031,6 @@
   TokenPosition position_;
   TokenPosition end_position_;
   word flags_;
-  intptr_t parent_class_binary_offset_;
   intptr_t source_uri_index_;
   intptr_t annotation_count_;
 
@@ -1028,7 +1059,6 @@
     kEndPosition,
     kKind,
     kFlags,
-    kParentClassBinaryOffset,
     kName,
     kSourceUriIndex,
     kDocumentationCommentIndex,
@@ -1073,10 +1103,6 @@
       case kFlags:
         flags_ = builder_->ReadFlags();  // read flags.
         if (++next_read_ == field) return;
-      case kParentClassBinaryOffset:
-        parent_class_binary_offset_ =
-            builder_->ReadUInt();  // read parent class binary offset.
-        if (++next_read_ == field) return;
       case kName:
         builder_->SkipName();  // read name.
         if (++next_read_ == field) return;
@@ -1129,7 +1155,6 @@
   TokenPosition end_position_;
   Procedure::ProcedureKind kind_;
   word flags_;
-  intptr_t parent_class_binary_offset_;
   intptr_t source_uri_index_;
   intptr_t annotation_count_;
 
@@ -1153,7 +1178,6 @@
     kPosition,
     kEndPosition,
     kFlags,
-    kParentClassBinaryOffset,
     kName,
     kDocumentationCommentIndex,
     kAnnotations,
@@ -1194,10 +1218,6 @@
       case kFlags:
         flags_ = builder_->ReadFlags();  // read flags.
         if (++next_read_ == field) return;
-      case kParentClassBinaryOffset:
-        parent_class_binary_offset_ =
-            builder_->ReadUInt();  // read parent class binary offset.
-        if (++next_read_ == field) return;
       case kName:
         builder_->SkipName();  // read name.
         if (++next_read_ == field) return;
@@ -1266,7 +1286,6 @@
   TokenPosition position_;
   TokenPosition end_position_;
   word flags_;
-  intptr_t parent_class_binary_offset_;
   intptr_t annotation_count_;
 
  private:
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index e66b58b..75d52b9 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -31,10 +31,6 @@
 
 DEFINE_FLAG(bool, trace_kernel, false, "Trace Kernel service requests.");
 DEFINE_FLAG(bool,
-            use_dart_frontend,
-            false,
-            "Parse scripts with Dart-to-Kernel parser");
-DEFINE_FLAG(bool,
             show_kernel_isolate,
             false,
             "Show Kernel service isolate as normal isolate.");
@@ -50,14 +46,6 @@
  public:
   virtual void Run() {
     ASSERT(Isolate::Current() == NULL);
-
-    if (!FLAG_use_dart_frontend) {
-      ASSERT(FLAG_use_dart_frontend);
-      // In release builds, make this a no-op. In debug builds, the
-      // assert shows that this is not supposed to happen.
-      return;
-    }
-
 #ifndef PRODUCT
     TimelineDurationScope tds(Timeline::GetVMStream(), "KernelIsolateStartup");
 #endif  // !PRODUCT
@@ -199,9 +187,6 @@
 };
 
 void KernelIsolate::Run() {
-  if (!FLAG_use_dart_frontend) {
-    return;
-  }
   // Grab the isolate create callback here to avoid race conditions with tests
   // that change this after Dart_Initialize returns.
   create_callback_ = Isolate::CreateCallback();
@@ -213,8 +198,7 @@
   ASSERT(I == T->isolate());
   ASSERT(I != NULL);
   ASSERT(I->name() != NULL);
-  if (!FLAG_use_dart_frontend ||
-      (strstr(I->name(), DART_KERNEL_ISOLATE_NAME) == NULL)) {
+  if (strstr(I->name(), DART_KERNEL_ISOLATE_NAME) == NULL) {
     // Not kernel isolate.
     return;
   }
@@ -257,9 +241,6 @@
 }
 
 Dart_Port KernelIsolate::WaitForKernelPort() {
-  if (!FLAG_use_dart_frontend) {
-    return ILLEGAL_PORT;
-  }
   MonitorLocker ml(monitor_);
   while (initializing_ && (kernel_port_ == ILLEGAL_PORT)) {
     ml.Wait();
@@ -267,6 +248,31 @@
   return kernel_port_;
 }
 
+static Dart_CObject BuildFilesPairs(int source_files_count,
+                                    Dart_SourceFile source_files[]) {
+  Dart_CObject files;
+  files.type = Dart_CObject_kArray;
+  files.value.as_array.length = source_files_count * 2;
+  // typedef Dart_CObject* Dart_CObjectPtr;
+  Dart_CObject** fileNamePairs = new Dart_CObject*[source_files_count * 2];
+  for (int i = 0; i < source_files_count; i++) {
+    Dart_CObject* source_uri = new Dart_CObject();
+    source_uri->type = Dart_CObject_kString;
+    source_uri->value.as_string = const_cast<char*>(source_files[i].uri);
+    fileNamePairs[i * 2] = source_uri;
+
+    Dart_CObject* source_code = new Dart_CObject();
+    source_code->type = Dart_CObject_kTypedData;
+    source_code->value.as_typed_data.type = Dart_TypedData_kUint8;
+    source_code->value.as_typed_data.length = strlen(source_files[i].source);
+    source_code->value.as_typed_data.values =
+        reinterpret_cast<uint8_t*>(const_cast<char*>(source_files[i].source));
+    fileNamePairs[(i * 2) + 1] = source_code;
+  }
+  files.value.as_array.values = fileNamePairs;
+  return files;
+}
+
 class KernelCompilationRequest : public ValueObject {
  public:
   KernelCompilationRequest()
@@ -294,10 +300,12 @@
       Dart_Port kernel_port,
       const char* script_uri,
       int source_files_count,
-      Dart_SourceFile source_files[]) {
-    // Build the [null, send_port, script_uri] message for the Kernel isolate:
-    // null tag tells it that request came from this code, instead of Loader
-    // so that it can given a more informative response.
+      Dart_SourceFile source_files[],
+      bool incremental_compile) {
+    // Build the [null, send_port, script_uri, incremental_compile, isolate_id,
+    // [files]] message for the Kernel isolate: null tag tells it that request
+    // came from this code, instead of Loader so that it can given a more
+    // informative response.
     Dart_CObject tag;
     tag.type = Dart_CObject_kNull;
 
@@ -310,44 +318,38 @@
     uri.type = Dart_CObject_kString;
     uri.value.as_string = const_cast<char*>(script_uri);
 
+    Dart_CObject dart_incremental;
+    dart_incremental.type = Dart_CObject_kBool;
+    dart_incremental.value.as_bool = incremental_compile;
+
+    // TODO(aam): Assert that isolate exists once we move CompileAndReadScript
+    // compilation logic out of CreateIsolateAndSetupHelper and into
+    // IsolateSetupHelper in main.cc.
+    Isolate* isolate =
+        Thread::Current() != NULL ? Thread::Current()->isolate() : NULL;
+    if (incremental_compile) {
+      ASSERT(isolate != NULL);
+    }
+    Dart_CObject isolate_id;
+    isolate_id.type = Dart_CObject_kInt64;
+    isolate_id.value.as_int64 =
+        isolate != NULL ? static_cast<int64_t>(isolate->main_port()) : 0;
+
     Dart_CObject message;
     message.type = Dart_CObject_kArray;
 
-    if (source_files_count == 0) {
-      static const intptr_t message_len = 3;
-      Dart_CObject* message_arr[] = {&tag, &send_port, &uri};
-      message.value.as_array.values = message_arr;
-      message.value.as_array.length = message_len;
-      // Send the message.
-      Dart_PostCObject(kernel_port, &message);
-    } else {
-      Dart_CObject files;
-      files.type = Dart_CObject_kArray;
-      files.value.as_array.length = source_files_count * 2;
-      // typedef Dart_CObject* Dart_CObjectPtr;
-      Dart_CObject** fileNamePairs = new Dart_CObject*[source_files_count * 2];
-      for (int i = 0; i < source_files_count; i++) {
-        Dart_CObject* source_uri = new Dart_CObject();
-        source_uri->type = Dart_CObject_kString;
-        source_uri->value.as_string = const_cast<char*>(source_files[i].uri);
-        fileNamePairs[i * 2] = source_uri;
-
-        Dart_CObject* source_code = new Dart_CObject();
-        source_code->type = Dart_CObject_kTypedData;
-        source_code->value.as_typed_data.type = Dart_TypedData_kUint8;
-        source_code->value.as_typed_data.length =
-            strlen(source_files[i].source);
-        source_code->value.as_typed_data.values = reinterpret_cast<uint8_t*>(
-            const_cast<char*>(source_files[i].source));
-        fileNamePairs[(i * 2) + 1] = source_code;
-      }
-      files.value.as_array.values = fileNamePairs;
-      static const intptr_t message_len = 4;
-      Dart_CObject* message_arr[] = {&tag, &send_port, &uri, &files};
-      message.value.as_array.values = message_arr;
-      message.value.as_array.length = message_len;
-      Dart_PostCObject(kernel_port, &message);
+    intptr_t message_len = 5;
+    Dart_CObject files;
+    if (source_files_count != 0) {
+      files = BuildFilesPairs(source_files_count, source_files);
+      message_len++;
     }
+    Dart_CObject* message_arr[] = {
+        &tag, &send_port, &uri, &dart_incremental, &isolate_id, &files};
+    message.value.as_array.values = message_arr;
+    message.value.as_array.length = message_len;
+    // Send the message.
+    Dart_PostCObject(kernel_port, &message);
 
     // Wait for reply to arrive.
     MonitorLocker ml(monitor_);
@@ -458,7 +460,8 @@
 Dart_KernelCompilationResult KernelIsolate::CompileToKernel(
     const char* script_uri,
     int source_file_count,
-    Dart_SourceFile source_files[]) {
+    Dart_SourceFile source_files[],
+    bool incremental_compile) {
   // This must be the main script to be loaded. Wait for Kernel isolate
   // to finish initialization.
   Dart_Port kernel_port = WaitForKernelPort();
@@ -471,7 +474,8 @@
 
   KernelCompilationRequest request;
   return request.SendAndWaitForResponse(kernel_port, script_uri,
-                                        source_file_count, source_files);
+                                        source_file_count, source_files,
+                                        incremental_compile);
 }
 
 #endif  // DART_PRECOMPILED_RUNTIME
diff --git a/runtime/vm/kernel_isolate.h b/runtime/vm/kernel_isolate.h
index 7cb9f78..c87aea0 100644
--- a/runtime/vm/kernel_isolate.h
+++ b/runtime/vm/kernel_isolate.h
@@ -30,7 +30,8 @@
   static Dart_KernelCompilationResult CompileToKernel(
       const char* script_uri,
       int source_files_count = 0,
-      Dart_SourceFile source_files[] = NULL);
+      Dart_SourceFile source_files[] = NULL,
+      bool incremental_compile = false);
 
  protected:
   static Monitor* monitor_;
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index 3fcbf5b..b0b7bc8 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -155,12 +155,8 @@
   }
 
   // Copy the string data out of the binary and into the VM's heap.
-  TypedData& data = TypedData::Handle(
-      Z, TypedData::New(kTypedDataUint8ArrayCid, end_offset, Heap::kOld));
-  {
-    NoSafepointScope no_safepoint;
-    memmove(data.DataAddr(0), reader.buffer() + reader.offset(), end_offset);
-  }
+  TypedData& data =
+      reader.CopyDataToVMHeap(Z, reader.offset(), reader.offset() + end_offset);
 
   // Copy the canonical names into the VM's heap.  Encode them as unsigned, so
   // the parent indexes are adjusted when extracted.
@@ -282,11 +278,21 @@
     field.SetFieldType(type);
     field_helper.SetJustRead(FieldHelper::kType);
     field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+    intptr_t field_initializer_offset = builder_.ReaderOffset();
     field.set_has_initializer(builder_.PeekTag() == kSomething);
-    GenerateFieldAccessors(toplevel_class, field, &field_helper, field_offset);
     field_helper.ReadUntilExcluding(FieldHelper::kEnd);
+    TypedData& kernel_data = builder_.reader_->CopyDataToVMHeap(
+        Z, field_offset, builder_.ReaderOffset());
+    field.set_kernel_data(kernel_data);
+    {
+      // GenerateFieldAccessors reads (some of) the initializer.
+      AlternativeReadingScope alt(builder_.reader_, field_initializer_offset);
+      GenerateFieldAccessors(toplevel_class, field, &field_helper,
+                             field_offset);
+    }
     if (FLAG_enable_mirrors && field_helper.annotation_count_ > 0) {
-      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                               &kernel_data);
     }
     fields_.Add(&field);
     library.AddObject(field, name);
@@ -363,6 +369,8 @@
     klass.set_token_pos(class_helper.position_);
   }
 
+  class_helper.ReadUntilIncluding(ClassHelper::kAnnotations);
+  intptr_t class_offset_after_annotations = builder_.ReaderOffset();
   class_helper.ReadUntilExcluding(ClassHelper::kTypeParameters);
   intptr_t type_parameter_counts =
       builder_.ReadListLength();  // read type_parameters list length.
@@ -419,11 +427,20 @@
                            type, field_helper.position_));
       field.set_kernel_offset(field_offset);
       field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+      intptr_t field_initializer_offset = builder_.ReaderOffset();
       field.set_has_initializer(builder_.PeekTag() == kSomething);
-      GenerateFieldAccessors(klass, field, &field_helper, field_offset);
       field_helper.ReadUntilExcluding(FieldHelper::kEnd);
+      TypedData& kernel_data = builder_.reader_->CopyDataToVMHeap(
+          Z, field_offset, builder_.ReaderOffset());
+      field.set_kernel_data(kernel_data);
+      {
+        // GenerateFieldAccessors reads (some of) the initializer.
+        AlternativeReadingScope alt(builder_.reader_, field_initializer_offset);
+        GenerateFieldAccessors(klass, field, &field_helper, field_offset);
+      }
       if (FLAG_enable_mirrors && field_helper.annotation_count_ > 0) {
-        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                                 &kernel_data);
       }
       fields_.Add(&field);
     }
@@ -464,10 +481,13 @@
     function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kEnd);
     constructor_helper.SetJustRead(ConstructorHelper::kFunction);
     constructor_helper.ReadUntilExcluding(ConstructorHelper::kEnd);
+    TypedData& kernel_data = builder_.reader_->CopyDataToVMHeap(
+        Z, constructor_offset, builder_.ReaderOffset());
+    function.set_kernel_data(kernel_data);
 
     if (FLAG_enable_mirrors && constructor_helper.annotation_count_ > 0) {
       library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                  constructor_offset);
+                                  constructor_offset, &kernel_data);
     }
   }
   class_helper.SetJustRead(ClassHelper::kConstructors);
@@ -486,8 +506,10 @@
   }
 
   if (FLAG_enable_mirrors && class_helper.annotation_count_ > 0) {
+    TypedData& header_data = builder_.reader_->CopyDataToVMHeap(
+        Z, class_offset, class_offset_after_annotations);
     library.AddClassMetadata(klass, toplevel_class, TokenPosition::kNoSource,
-                             class_offset);
+                             class_offset, &header_data);
   }
 
   class_helper.ReadUntilExcluding(ClassHelper::kEnd);
@@ -636,12 +658,16 @@
                        H.DartProcedureName(procedure_helper.canonical_name_)))
                 .IsNull());
   }
-  if (FLAG_enable_mirrors && annotation_count > 0) {
-    library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                procedure_offset);
-  }
 
   procedure_helper.ReadUntilExcluding(ProcedureHelper::kEnd);
+  TypedData& kernel_data = builder_.reader_->CopyDataToVMHeap(
+      Z, procedure_offset, builder_.ReaderOffset());
+  function.set_kernel_data(kernel_data);
+
+  if (FLAG_enable_mirrors && annotation_count > 0) {
+    library.AddFunctionMetadata(function, TokenPosition::kNoSource,
+                                procedure_offset, &kernel_data);
+  }
 }
 
 void KernelReader::ReadAndSetupTypeParameters(
@@ -728,16 +754,14 @@
     dart::String& import_uri_string =
         import_uri == -1 ? uri_string : H.DartString(import_uri, Heap::kOld);
     script = Script::New(import_uri_string, uri_string,
-                         String::Handle(String::null()), RawScript::kKernelTag);
-    script.set_kernel_data(program_->kernel_data());
-    script.set_kernel_data_size(program_->kernel_data_size());
+                         builder_.GetSourceFor(index), RawScript::kKernelTag);
     script.set_kernel_script_index(index);
     script.set_kernel_string_offsets(H.string_offsets());
     script.set_kernel_string_data(H.string_data());
     script.set_kernel_canonical_names(H.canonical_names());
     scripts_.SetAt(index, script);
 
-    script.set_line_starts(Array::Handle(Array::null()));
+    script.set_line_starts(builder_.GetLineStartsFor(index));
     script.set_debug_positions(Array::Handle(Array::null()));
     script.set_yield_positions(Array::Handle(Array::null()));
   }
@@ -803,6 +827,7 @@
           false,  // is_native
           script_class, field_helper->position_));
   functions_.Add(&getter);
+  getter.set_kernel_data(TypedData::Handle(Z, field.kernel_data()));
   getter.set_end_token_pos(field_helper->end_position_);
   getter.set_kernel_offset(field_offset);
   getter.set_result_type(AbstractType::Handle(Z, field.type()));
@@ -823,6 +848,7 @@
                          false,  // is_native
                          script_class, field_helper->position_));
     functions_.Add(&setter);
+    setter.set_kernel_data(TypedData::Handle(Z, field.kernel_data()));
     setter.set_end_token_pos(field_helper->end_position_);
     setter.set_kernel_offset(field_offset);
     setter.set_result_type(Object::void_type());
@@ -920,17 +946,12 @@
       Thread::Current(), script.kernel_string_offsets(),
       script.kernel_string_data(), script.kernel_canonical_names());
 
-  kernel::StreamingFlowGraphBuilder* builder =
-      new kernel::StreamingFlowGraphBuilder(&translation_helper, zone,
-                                            script.kernel_data(),
-                                            script.kernel_data_size());
-
-  kernel::FieldHelper field_helper(builder, field.kernel_offset());
+  StreamingFlowGraphBuilder builder(
+      &translation_helper, zone, field.kernel_offset(),
+      TypedData::Handle(zone, field.kernel_data()));
+  kernel::FieldHelper field_helper(&builder);
   field_helper.ReadUntilExcluding(kernel::FieldHelper::kEnd, true);
-  bool result = field_helper.FieldHasFunctionLiteralInitializer(start, end);
-
-  delete builder;
-  return result;
+  return field_helper.FieldHasFunctionLiteralInitializer(start, end);
 }
 
 ParsedFunction* ParseStaticFieldInitializer(Zone* zone,
@@ -951,6 +972,7 @@
                           false,  // is_external
                           false,  // is_native
                           owner, TokenPosition::kNoSource));
+  initializer_fun.set_kernel_data(TypedData::Handle(zone, field.kernel_data()));
   initializer_fun.set_kernel_offset(field.kernel_offset());
   initializer_fun.set_result_type(AbstractType::Handle(zone, field.type()));
   initializer_fun.set_is_debuggable(false);
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index a315410..760db91 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -634,11 +634,7 @@
   H.SetCanonicalNames(TypedData::Handle(Z, script.kernel_canonical_names()));
 }
 
-FlowGraphBuilder::~FlowGraphBuilder() {
-  if (streaming_flow_graph_builder_ != NULL) {
-    delete streaming_flow_graph_builder_;
-  }
-}
+FlowGraphBuilder::~FlowGraphBuilder() {}
 
 Fragment FlowGraphBuilder::TranslateFinallyFinalizers(
     TryFinallyBlock* outer_finally,
@@ -1650,16 +1646,13 @@
 
   if (function.IsConstructorClosureFunction()) return NULL;
 
-  if (streaming_flow_graph_builder_ != NULL) {
-    delete streaming_flow_graph_builder_;
-    streaming_flow_graph_builder_ = NULL;
-  }
-
-  Script& script = Script::Handle(Z, function.script());
-  streaming_flow_graph_builder_ = new StreamingFlowGraphBuilder(
-      this, script.kernel_data(), script.kernel_data_size());
-
-  return streaming_flow_graph_builder_->BuildGraph(kernel_offset_);
+  StreamingFlowGraphBuilder streaming_flow_graph_builder(
+      this, function.kernel_offset(),
+      TypedData::Handle(Z, function.kernel_data()));
+  streaming_flow_graph_builder_ = &streaming_flow_graph_builder;
+  FlowGraph* result = streaming_flow_graph_builder_->BuildGraph(0);
+  streaming_flow_graph_builder_ = NULL;
+  return result;
 }
 
 Fragment FlowGraphBuilder::NativeFunctionBody(intptr_t first_positional_offset,
@@ -2248,9 +2241,9 @@
         TypedData::Handle(Z, script.kernel_canonical_names()));
 
     StreamingFlowGraphBuilder streaming_flow_graph_builder(
-        &helper, zone_, script.kernel_data(), script.kernel_data_size());
-    return streaming_flow_graph_builder.EvaluateMetadata(
-        metadata_field.kernel_offset());
+        &helper, zone_, metadata_field.kernel_offset(),
+        TypedData::Handle(Z, metadata_field.kernel_data()));
+    return streaming_flow_graph_builder.EvaluateMetadata(0);
   } else {
     Thread* thread = Thread::Current();
     Error& error = Error::Handle();
@@ -2274,9 +2267,9 @@
         TypedData::Handle(Z, script.kernel_canonical_names()));
 
     StreamingFlowGraphBuilder streaming_flow_graph_builder(
-        &helper, zone_, script.kernel_data(), script.kernel_data_size());
-    return streaming_flow_graph_builder.BuildParameterDescriptor(
-        function.kernel_offset());
+        &helper, zone_, function.kernel_offset(),
+        TypedData::Handle(Z, function.kernel_data()));
+    return streaming_flow_graph_builder.BuildParameterDescriptor(0);
   } else {
     Thread* thread = Thread::Current();
     Error& error = Error::Handle();
@@ -2322,6 +2315,26 @@
   return array_object.raw();
 }
 
+void ProcessTokenPositionsEntry(const TypedData& data,
+                                const Script& script,
+                                const Script& entry_script,
+                                intptr_t kernel_offset,
+                                Zone* zone_,
+                                TranslationHelper* helper,
+                                GrowableArray<intptr_t>* token_positions,
+                                GrowableArray<intptr_t>* yield_positions) {
+  if (data.IsNull() ||
+      script.kernel_string_offsets() != entry_script.kernel_string_offsets()) {
+    return;
+  }
+
+  StreamingFlowGraphBuilder streaming_flow_graph_builder(helper, zone_,
+                                                         kernel_offset, data);
+  streaming_flow_graph_builder.CollectTokenPositionsFor(
+      script.kernel_script_index(), entry_script.kernel_script_index(),
+      token_positions, yield_positions);
+}
+
 void CollectTokenPositionsFor(const Script& const_script) {
   Thread* thread = Thread::Current();
   Zone* zone_ = thread->zone();
@@ -2334,10 +2347,65 @@
 
   GrowableArray<intptr_t> token_positions(10);
   GrowableArray<intptr_t> yield_positions(1);
-  StreamingFlowGraphBuilder streaming_flow_graph_builder(
-      &helper, zone_, script.kernel_data(), script.kernel_data_size());
-  streaming_flow_graph_builder.CollectTokenPositionsFor(
-      script.kernel_script_index(), &token_positions, &yield_positions);
+
+  Isolate* isolate = thread->isolate();
+  const GrowableObjectArray& libs =
+      GrowableObjectArray::Handle(Z, isolate->object_store()->libraries());
+  Library& lib = Library::Handle(Z);
+  Object& entry = Object::Handle();
+  Script& entry_script = Script::Handle(Z);
+  TypedData& data = TypedData::Handle(Z);
+  for (intptr_t i = 0; i < libs.Length(); i++) {
+    lib ^= libs.At(i);
+    DictionaryIterator it(lib);
+    while (it.HasNext()) {
+      entry = it.GetNext();
+      data = TypedData::null();
+      if (entry.IsClass()) {
+        const Class& klass = Class::Cast(entry);
+        entry_script = klass.script();
+        if (!entry_script.IsNull() && script.kernel_script_index() ==
+                                          entry_script.kernel_script_index()) {
+          token_positions.Add(klass.token_pos().value());
+        }
+        Array& array = Array::Handle(zone_, klass.fields());
+        dart::Field& field = dart::Field::Handle(Z);
+        for (intptr_t i = 0; i < array.Length(); ++i) {
+          field ^= array.At(i);
+          data = field.kernel_data();
+          entry_script = field.Script();
+          ProcessTokenPositionsEntry(data, script, entry_script,
+                                     field.kernel_offset(), zone_, &helper,
+                                     &token_positions, &yield_positions);
+        }
+        array = klass.functions();
+        Function& function = Function::Handle(Z);
+        for (intptr_t i = 0; i < array.Length(); ++i) {
+          function ^= array.At(i);
+          data = function.kernel_data();
+          entry_script = function.script();
+          ProcessTokenPositionsEntry(data, script, entry_script,
+                                     function.kernel_offset(), zone_, &helper,
+                                     &token_positions, &yield_positions);
+        }
+      } else if (entry.IsFunction()) {
+        const Function& function = Function::Cast(entry);
+        data = function.kernel_data();
+        entry_script = function.script();
+        ProcessTokenPositionsEntry(data, script, entry_script,
+                                   function.kernel_offset(), zone_, &helper,
+                                   &token_positions, &yield_positions);
+      } else if (entry.IsField()) {
+        const dart::Field& field = dart::Field::Cast(entry);
+        data = field.kernel_data();
+        entry_script = field.Script();
+        ProcessTokenPositionsEntry(data, script, entry_script,
+                                   field.kernel_offset(), zone_, &helper,
+                                   &token_positions, &yield_positions);
+      }
+    }
+  }
+
   Array& array_object = Array::Handle(Z);
   array_object = AsSortedDuplicateFreeArray(&token_positions);
   script.set_debug_positions(array_object);
@@ -2345,38 +2413,6 @@
   script.set_yield_positions(array_object);
 }
 
-String& GetSourceFor(const Script& const_script) {
-  Thread* thread = Thread::Current();
-  Zone* zone_ = thread->zone();
-  Script& script = Script::Handle(Z, const_script.raw());
-  TranslationHelper helper(thread);
-  helper.SetStringOffsets(TypedData::Handle(Z, script.kernel_string_offsets()));
-  helper.SetStringData(TypedData::Handle(Z, script.kernel_string_data()));
-  helper.SetCanonicalNames(
-      TypedData::Handle(Z, script.kernel_canonical_names()));
-
-  StreamingFlowGraphBuilder streaming_flow_graph_builder(
-      &helper, zone_, script.kernel_data(), script.kernel_data_size());
-  return streaming_flow_graph_builder.GetSourceFor(
-      script.kernel_script_index());
-}
-
-Array& GetLineStartsFor(const Script& const_script) {
-  Thread* thread = Thread::Current();
-  Zone* zone_ = thread->zone();
-  Script& script = Script::Handle(Z, const_script.raw());
-  TranslationHelper helper(thread);
-  helper.SetStringOffsets(TypedData::Handle(Z, script.kernel_string_offsets()));
-  helper.SetStringData(TypedData::Handle(Z, script.kernel_string_data()));
-  helper.SetCanonicalNames(
-      TypedData::Handle(Z, script.kernel_canonical_names()));
-
-  StreamingFlowGraphBuilder streaming_flow_graph_builder(
-      &helper, zone_, script.kernel_data(), script.kernel_data_size());
-  return streaming_flow_graph_builder.GetLineStartsFor(
-      script.kernel_script_index());
-}
-
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index 7dac639..1da9173 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -320,9 +320,6 @@
   }
   dart::String& DartString(StringIndex string_index, Heap::Space space);
 
-  dart::String& DartString(const uint8_t* utf8_array, intptr_t len) {
-    return DartString(utf8_array, len, allocation_space_);
-  }
   dart::String& DartString(const uint8_t* utf8_array,
                            intptr_t len,
                            Heap::Space space);
@@ -932,8 +929,6 @@
 RawObject* EvaluateMetadata(const dart::Field& metadata_field);
 RawObject* BuildParameterDescriptor(const Function& function);
 void CollectTokenPositionsFor(const Script& script);
-String& GetSourceFor(const Script& script);
-Array& GetLineStartsFor(const Script& script);
 
 }  // namespace kernel
 }  // namespace dart
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc
index 22480dd..3f8ee15 100644
--- a/runtime/vm/locations.cc
+++ b/runtime/vm/locations.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/locations.h"
 
 #include "vm/assembler.h"
@@ -259,7 +261,7 @@
         UNREACHABLE();
     }
   } else if (IsPairLocation()) {
-    ASSERT(def->representation() == kUnboxedMint);
+    ASSERT(def->representation() == kUnboxedInt64);
     PairLocation* value_pair = AsPairLocation();
     intptr_t index_lo;
     intptr_t index_hi;
@@ -347,3 +349,5 @@
 #endif
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index d6f14f8..e7ac4d6 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -25,7 +25,7 @@
   kUnboxedDouble,
   kUnboxedInt32,
   kUnboxedUint32,
-  kUnboxedMint,
+  kUnboxedInt64,
   kUnboxedFloat32x4,
   kUnboxedInt32x4,
   kUnboxedFloat64x2,
diff --git a/runtime/vm/log.cc b/runtime/vm/log.cc
index 9e941e3..23005a7 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -149,7 +149,7 @@
   manual_flush_++;
 }
 
-void Log::DisableManualFlush() {
+void Log::DisableManualFlush(const intptr_t cursor) {
   if (this == NoOpLog()) {
     return;
   }
@@ -157,7 +157,7 @@
   manual_flush_--;
   ASSERT(manual_flush_ >= 0);
   if (manual_flush_ == 0) {
-    Flush();
+    Flush(cursor);
   }
 }
 
@@ -166,8 +166,7 @@
 }
 
 LogBlock::~LogBlock() {
-  log_->Flush(cursor_);
-  log_->DisableManualFlush();
+  log_->DisableManualFlush(cursor_);
 }
 
 }  // namespace dart
diff --git a/runtime/vm/log.h b/runtime/vm/log.h
index 868e0de..e28c02d 100644
--- a/runtime/vm/log.h
+++ b/runtime/vm/log.h
@@ -52,7 +52,7 @@
  private:
   void TerminateString();
   void EnableManualFlush();
-  void DisableManualFlush();
+  void DisableManualFlush(const intptr_t cursor);
 
   // Returns false if we should drop log messages related to 'isolate'.
   static bool ShouldLogForIsolate(const Isolate* isolate);
diff --git a/runtime/vm/log_test.cc b/runtime/vm/log_test.cc
index ea4670e..c64fd21 100644
--- a/runtime/vm/log_test.cc
+++ b/runtime/vm/log_test.cc
@@ -36,6 +36,9 @@
     test_output_ = NULL;
   }
   test_output_ = buffer;
+
+  // Also print to stdout to see the overall result.
+  OS::Print("%s", test_output_);
 }
 
 class LogTestHelper : public AllStatic {
@@ -92,9 +95,15 @@
       log->Print("BANANA");
       EXPECT_EQ(reinterpret_cast<const char*>(NULL), test_output_);
     }
-    EXPECT_STREQ("BANANA", test_output_);
+    EXPECT_EQ(reinterpret_cast<const char*>(NULL), test_output_);
+    {
+      LogBlock ba(thread, log);
+      log->Print("PEAR");
+      EXPECT_EQ(reinterpret_cast<const char*>(NULL), test_output_);
+    }
+    EXPECT_EQ(reinterpret_cast<const char*>(NULL), test_output_);
   }
-  EXPECT_STREQ("APPLE", test_output_);
+  EXPECT_STREQ("APPLEBANANAPEAR", test_output_);
   delete log;
   LogTestHelper::FreeTestOutput();
 }
diff --git a/runtime/vm/malloc_hooks_test.cc b/runtime/vm/malloc_hooks_test.cc
index e9d0e33..aa4c537 100644
--- a/runtime/vm/malloc_hooks_test.cc
+++ b/runtime/vm/malloc_hooks_test.cc
@@ -25,13 +25,47 @@
   }
 }
 
-UNIT_TEST_CASE(BasicMallocHookTest) {
-  bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
-  FLAG_profiler_native_memory = true;
-  Profiler::InitAllocationSampleBuffer();
+class EnableMallocHooksScope : public ValueObject {
+ public:
+  EnableMallocHooksScope() {
+    saved_enable_malloc_hooks_ = FLAG_profiler_native_memory;
+    FLAG_profiler_native_memory = true;
+    MallocHooks::InitOnce();
+    MallocHooks::ResetStats();
+  }
 
-  MallocHooks::InitOnce();
-  MallocHooks::ResetStats();
+  ~EnableMallocHooksScope() {
+    MallocHooks::TearDown();
+    FLAG_profiler_native_memory = saved_enable_malloc_hooks_;
+  }
+
+ private:
+  bool saved_enable_malloc_hooks_;
+};
+
+class EnableMallocHooksAndStacksScope : public EnableMallocHooksScope {
+ public:
+  EnableMallocHooksAndStacksScope() {
+    saved_enable_stack_traces_ = MallocHooks::stack_trace_collection_enabled();
+    MallocHooks::set_stack_trace_collection_enabled(true);
+    if (!FLAG_profiler) {
+      FLAG_profiler = true;
+      Profiler::InitOnce();
+    }
+    MallocHooks::ResetStats();
+  }
+
+  ~EnableMallocHooksAndStacksScope() {
+    MallocHooks::set_stack_trace_collection_enabled(saved_enable_stack_traces_);
+  }
+
+ private:
+  bool saved_enable_stack_traces_;
+};
+
+UNIT_TEST_CASE(BasicMallocHookTest) {
+  EnableMallocHooksScope scope;
+
   EXPECT_EQ(0L, MallocHooks::allocation_count());
   EXPECT_EQ(0L, MallocHooks::heap_allocated_memory_in_bytes());
   const intptr_t buffer_size = 10;
@@ -45,17 +79,11 @@
   delete[] buffer;
   EXPECT_EQ(0L, MallocHooks::allocation_count());
   EXPECT_EQ(0L, MallocHooks::heap_allocated_memory_in_bytes());
-  MallocHooks::TearDown();
-
-  FLAG_profiler_native_memory = enable_malloc_hooks_saved;
 }
 
 UNIT_TEST_CASE(FreeUnseenMemoryMallocHookTest) {
-  bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
-  FLAG_profiler_native_memory = true;
-  Profiler::InitAllocationSampleBuffer();
+  EnableMallocHooksScope scope;
 
-  MallocHooks::InitOnce();
   const intptr_t pre_hook_buffer_size = 3;
   char* pre_hook_buffer = new char[pre_hook_buffer_size];
   MallocHookTestBufferInitializer(pre_hook_buffer, pre_hook_buffer_size);
@@ -80,22 +108,10 @@
   delete[] buffer;
   EXPECT_EQ(0L, MallocHooks::allocation_count());
   EXPECT_EQ(0L, MallocHooks::heap_allocated_memory_in_bytes());
-  MallocHooks::TearDown();
-
-  FLAG_profiler_native_memory = enable_malloc_hooks_saved;
 }
 
 VM_UNIT_TEST_CASE(StackTraceMallocHookSimpleTest) {
-  bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
-  FLAG_profiler_native_memory = true;
-  Profiler::InitAllocationSampleBuffer();
-
-  MallocHooks::InitOnce();
-  MallocHooks::ResetStats();
-
-  bool enable_stack_traces_saved =
-      MallocHooks::stack_trace_collection_enabled();
-  MallocHooks::set_stack_trace_collection_enabled(true);
+  EnableMallocHooksAndStacksScope scope;
 
   char* var = static_cast<char*>(malloc(16 * sizeof(char)));
   Sample* sample = MallocHooks::GetSample(var);
@@ -104,9 +120,6 @@
   free(var);
   sample = MallocHooks::GetSample(var);
   EXPECT(sample == NULL);
-  MallocHooks::TearDown();
-  MallocHooks::set_stack_trace_collection_enabled(enable_stack_traces_saved);
-  FLAG_profiler_native_memory = enable_malloc_hooks_saved;
 }
 
 static char* DART_NOINLINE StackTraceLengthHelper(uintptr_t* end_address) {
@@ -116,9 +129,7 @@
 }
 
 VM_UNIT_TEST_CASE(StackTraceMallocHookLengthTest) {
-  bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
-  FLAG_profiler_native_memory = true;
-  Profiler::InitAllocationSampleBuffer();
+  EnableMallocHooksAndStacksScope scope;
 
   uintptr_t test_start_address =
       reinterpret_cast<uintptr_t>(Dart_TestStackTraceMallocHookLengthTest);
@@ -126,13 +137,6 @@
       reinterpret_cast<uintptr_t>(StackTraceLengthHelper);
   uintptr_t helper_end_address = 0;
 
-  MallocHooks::InitOnce();
-  MallocHooks::ResetStats();
-
-  bool enable_stack_traces_saved =
-      MallocHooks::stack_trace_collection_enabled();
-  MallocHooks::set_stack_trace_collection_enabled(true);
-
   char* var = StackTraceLengthHelper(&helper_end_address);
   Sample* sample = MallocHooks::GetSample(var);
   EXPECT(sample != NULL);
@@ -164,22 +168,10 @@
   }
 
   free(var);
-  MallocHooks::TearDown();
-  MallocHooks::set_stack_trace_collection_enabled(enable_stack_traces_saved);
-  FLAG_profiler_native_memory = enable_malloc_hooks_saved;
 }
 
 ISOLATE_UNIT_TEST_CASE(StackTraceMallocHookSimpleJSONTest) {
-  bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
-  FLAG_profiler_native_memory = true;
-  Profiler::InitAllocationSampleBuffer();
-
-  MallocHooks::InitOnce();
-  MallocHooks::ResetStats();
-
-  bool enable_stack_traces_saved =
-      MallocHooks::stack_trace_collection_enabled();
-  MallocHooks::set_stack_trace_collection_enabled(true);
+  EnableMallocHooksAndStacksScope scope;
 
   ClearProfileVisitor cpv(Isolate::Current());
   Profiler::sample_buffer()->VisitSamples(&cpv);
@@ -200,9 +192,6 @@
   EXPECT_SUBSTRING("\"main\"", json);
 
   free(var);
-  MallocHooks::TearDown();
-  MallocHooks::set_stack_trace_collection_enabled(enable_stack_traces_saved);
-  FLAG_profiler_native_memory = enable_malloc_hooks_saved;
 }
 
 };  // namespace dart
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc
index 514943f..a8811c1 100644
--- a/runtime/vm/megamorphic_cache_table.cc
+++ b/runtime/vm/megamorphic_cache_table.cc
@@ -48,6 +48,7 @@
   return isolate->object_store()->megamorphic_miss_function();
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 void MegamorphicCacheTable::InitMissHandler(Isolate* isolate) {
   // The miss handler for a class ID not found in the table is invoked as a
   // normal Dart function.
@@ -78,6 +79,7 @@
          Function::null());
   isolate->object_store()->SetMegamorphicMissHandler(code, function);
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 void MegamorphicCacheTable::PrintSizes(Isolate* isolate) {
   StackZone zone(Thread::Current());
diff --git a/runtime/vm/megamorphic_cache_table.h b/runtime/vm/megamorphic_cache_table.h
index ee65118..cc813e8 100644
--- a/runtime/vm/megamorphic_cache_table.h
+++ b/runtime/vm/megamorphic_cache_table.h
@@ -23,7 +23,7 @@
 class MegamorphicCacheTable : public AllStatic {
  public:
   static RawFunction* miss_handler(Isolate* isolate);
-  static void InitMissHandler(Isolate* isolate);
+  NOT_IN_PRECOMPILED(static void InitMissHandler(Isolate* isolate));
 
   static RawMegamorphicCache* Lookup(Isolate* isolate,
                                      const String& name,
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index afb7b87..94fd0bf 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -289,8 +289,12 @@
   return Isolate::IsolateListLength();
 }
 
+int64_t MetricCurrentRSS::Value() const {
+  return Service::CurrentRSS();
+}
+
 int64_t MetricPeakRSS::Value() const {
-  return OS::MaxRSS();
+  return Service::MaxRSS();
 }
 
 #define VM_METRIC_VARIABLE(type, variable, name, unit)                         \
diff --git a/runtime/vm/metrics.h b/runtime/vm/metrics.h
index 87467ce..530cc4d 100644
--- a/runtime/vm/metrics.h
+++ b/runtime/vm/metrics.h
@@ -31,6 +31,7 @@
 
 #define VM_METRIC_LIST(V)                                                      \
   V(MetricIsolateCount, IsolateCount, "vm.isolate.count", kCounter)            \
+  V(MetricCurrentRSS, CurrentRSS, "vm.memory.current", kByte)                  \
   V(MetricPeakRSS, PeakRSS, "vm.memory.max", kByte)
 
 class Metric {
@@ -162,6 +163,11 @@
   virtual int64_t Value() const;
 };
 
+class MetricCurrentRSS : public Metric {
+ protected:
+  virtual int64_t Value() const;
+};
+
 class MetricPeakRSS : public Metric {
  protected:
   virtual int64_t Value() const;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d48ef6b..7ec3246 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2733,6 +2733,7 @@
   extractor.set_parameter_names(Object::extractor_parameter_names());
   extractor.set_result_type(Object::dynamic_type());
   extractor.set_kernel_offset(kernel_offset());
+  extractor.set_kernel_data(TypedData::Handle(zone, kernel_data()));
 
   extractor.set_extracted_method_closure(closure_function);
   extractor.set_is_debuggable(false);
@@ -5949,6 +5950,10 @@
                                   : -num_optional_parameters);
 }
 
+void Function::set_kernel_data(const TypedData& data) const {
+  StorePointer(&raw_ptr()->kernel_data_, data.raw());
+}
+
 bool Function::IsOptimizable() const {
   if (FLAG_precompiled_mode) {
     return true;
@@ -6641,6 +6646,8 @@
   clone.set_optimized_instruction_count(0);
   clone.set_optimized_call_site_count(0);
   clone.set_kernel_offset(kernel_offset());
+  clone.set_kernel_data(TypedData::Handle(zone, kernel_data()));
+
   if (new_owner.NumTypeParameters() > 0) {
     // Adjust uninstantiated types to refer to type parameters of the new owner.
     const TypeArguments& type_params =
@@ -6824,6 +6831,7 @@
     closure_function.SetParameterNameAt(i, param_name);
   }
   closure_function.set_kernel_offset(kernel_offset());
+  closure_function.set_kernel_data(TypedData::Handle(zone, kernel_data()));
 
   const Type& signature_type =
       Type::Handle(zone, closure_function.SignatureType());
@@ -6986,6 +6994,7 @@
     closure_function.SetParameterNameAt(i, param_name);
   }
   closure_function.set_kernel_offset(kernel_offset());
+  closure_function.set_kernel_data(TypedData::Handle(zone, kernel_data()));
 
   const Type& signature_type =
       Type::Handle(zone, closure_function.SignatureType());
@@ -7699,6 +7708,10 @@
   StorePointer(&raw_ptr()->name_, value.raw());
 }
 
+void Field::set_kernel_data(const TypedData& data) const {
+  StorePointer(&raw_ptr()->kernel_data_, data.raw());
+}
+
 RawObject* Field::RawOwner() const {
   if (IsOriginal()) {
     return raw_ptr()->owner_;
@@ -8963,12 +8976,7 @@
 }
 
 bool Script::HasSource() const {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  return kind() == RawScript::kKernelTag ||
-         raw_ptr()->source_ != String::null();
-#else   // !defined(DART_PRECOMPILED_RUNTIME)
   return raw_ptr()->source_ != String::null();
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 }
 
 RawString* Script::Source() const {
@@ -8980,17 +8988,6 @@
 }
 
 RawString* Script::GenerateSource() const {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  if (kind() == RawScript::kKernelTag) {
-    String& source = String::Handle(raw_ptr()->source_);
-    if (source.IsNull()) {
-      // This is created lazily. Now we need it.
-      set_source(kernel::GetSourceFor(*this));
-    }
-    return raw_ptr()->source_;
-  }
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-
   const TokenStream& token_stream = TokenStream::Handle(tokens());
   if (token_stream.IsNull()) {
     ASSERT(Dart::vm_snapshot_kind() == Snapshot::kFullAOT);
@@ -9003,14 +9000,6 @@
   StorePointer(&raw_ptr()->compile_time_constants_, value.raw());
 }
 
-void Script::set_kernel_data(const uint8_t* kernel_data) const {
-  StoreNonPointer(&raw_ptr()->kernel_data_, kernel_data);
-}
-
-void Script::set_kernel_data_size(const intptr_t kernel_data_size) const {
-  StoreNonPointer(&raw_ptr()->kernel_data_size_, kernel_data_size);
-}
-
 void Script::set_kernel_script_index(const intptr_t kernel_script_index) const {
   StoreNonPointer(&raw_ptr()->kernel_script_index_, kernel_script_index);
 }
@@ -9213,13 +9202,6 @@
 }
 
 RawArray* Script::line_starts() const {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  const Array& line_starts_array = Array::Handle(raw_ptr()->line_starts_);
-  if (line_starts_array.IsNull() && kind() == RawScript::kKernelTag) {
-    // This is created lazily. Now we need it.
-    set_line_starts(kernel::GetLineStartsFor(*this));
-  }
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
   return raw_ptr()->line_starts_;
 }
 
@@ -9961,7 +9943,8 @@
 void Library::AddMetadata(const Object& owner,
                           const String& name,
                           TokenPosition token_pos,
-                          intptr_t kernel_offset) const {
+                          intptr_t kernel_offset,
+                          const TypedData* kernel_data) const {
   Thread* thread = Thread::Current();
   ASSERT(thread->IsMutatorThread());
   Zone* zone = thread->zone();
@@ -9975,6 +9958,9 @@
   field.set_is_reflectable(false);
   field.SetStaticValue(Array::empty_array(), true);
   field.set_kernel_offset(kernel_offset);
+  if (kernel_data != NULL) {
+    field.set_kernel_data(*kernel_data);
+  }
   GrowableObjectArray& metadata =
       GrowableObjectArray::Handle(zone, this->metadata());
   metadata.Add(field, Heap::kOld);
@@ -9983,34 +9969,37 @@
 void Library::AddClassMetadata(const Class& cls,
                                const Object& tl_owner,
                                TokenPosition token_pos,
-                               intptr_t kernel_offset) const {
+                               intptr_t kernel_offset,
+                               const TypedData* kernel_data) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   // We use the toplevel class as the owner of a class's metadata field because
   // a class's metadata is in scope of the library, not the class.
   AddMetadata(tl_owner,
               String::Handle(zone, MakeClassMetaName(thread, zone, cls)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, kernel_data);
 }
 
 void Library::AddFieldMetadata(const Field& field,
                                TokenPosition token_pos,
-                               intptr_t kernel_offset) const {
+                               intptr_t kernel_offset,
+                               const TypedData* kernel_data) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, field.RawOwner()),
               String::Handle(zone, MakeFieldMetaName(thread, zone, field)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, kernel_data);
 }
 
 void Library::AddFunctionMetadata(const Function& func,
                                   TokenPosition token_pos,
-                                  intptr_t kernel_offset) const {
+                                  intptr_t kernel_offset,
+                                  const TypedData* kernel_data) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, func.RawOwner()),
               String::Handle(zone, MakeFunctionMetaName(thread, zone, func)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, kernel_data);
 }
 
 void Library::AddTypeParameterMetadata(const TypeParameter& param,
@@ -13929,7 +13918,7 @@
 }
 
 void Code::Disassemble(DisassemblyFormatter* formatter) const {
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
   if (!FLAG_support_disassembler) {
     return;
   }
@@ -14018,6 +14007,7 @@
   return result.raw();
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 RawCode* Code::FinalizeCode(const char* name,
                             Assembler* assembler,
                             bool optimized) {
@@ -14118,6 +14108,7 @@
 #endif  // !PRODUCT
   return FinalizeCode("", assembler, optimized);
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 bool Code::SlowFindRawCodeVisitor::FindObject(RawObject* raw_obj) const {
   return RawCode::ContainsPC(raw_obj, pc_);
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index b188d6c..711320c 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1917,13 +1917,13 @@
 // printed during deoptimization itself.
 #define DEOPT_REASONS(V)                                                       \
   V(BinarySmiOp)                                                               \
-  V(BinaryMintOp)                                                              \
+  V(BinaryInt64Op)                                                             \
   V(DoubleToSmi)                                                               \
   V(CheckSmi)                                                                  \
   V(CheckClass)                                                                \
   V(Unknown)                                                                   \
   V(PolymorphicInstanceCallTestFail)                                           \
-  V(UnaryMintOp)                                                               \
+  V(UnaryInt64Op)                                                              \
   V(BinaryDoubleOp)                                                            \
   V(UnaryOp)                                                                   \
   V(UnboxInteger)                                                              \
@@ -2667,6 +2667,9 @@
 #endif
   }
 
+  RawTypedData* kernel_data() const { return raw_ptr()->kernel_data_; }
+  void set_kernel_data(const TypedData& data) const;
+
   bool IsOptimizable() const;
   void SetIsOptimizable(bool value) const;
 
@@ -3246,6 +3249,9 @@
 #endif
   }
 
+  RawTypedData* kernel_data() const { return raw_ptr()->kernel_data_; }
+  void set_kernel_data(const TypedData& data) const;
+
   inline intptr_t Offset() const;
   // Called during class finalization.
   inline void SetOffset(intptr_t offset_in_bytes) const;
@@ -3652,13 +3658,9 @@
   }
   void set_compile_time_constants(const Array& value) const;
 
-  const uint8_t* kernel_data() const { return raw_ptr()->kernel_data_; }
-  void set_kernel_data(const uint8_t* kernel_data) const;
-
-  intptr_t kernel_data_size() const { return raw_ptr()->kernel_data_size_; }
-  void set_kernel_data_size(const intptr_t kernel_data_size) const;
-
-  intptr_t kernel_script_index() { return raw_ptr()->kernel_script_index_; }
+  intptr_t kernel_script_index() const {
+    return raw_ptr()->kernel_script_index_;
+  }
   void set_kernel_script_index(const intptr_t kernel_script_index) const;
 
   RawTypedData* kernel_string_offsets() const {
@@ -3895,13 +3897,16 @@
   void AddClassMetadata(const Class& cls,
                         const Object& tl_owner,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset = 0,
+                        const TypedData* kernel_data = NULL) const;
   void AddFieldMetadata(const Field& field,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset = 0,
+                        const TypedData* kernel_data = NULL) const;
   void AddFunctionMetadata(const Function& func,
                            TokenPosition token_pos,
-                           intptr_t kernel_offset = 0) const;
+                           intptr_t kernel_offset = 0,
+                           const TypedData* kernel_data = NULL) const;
   void AddLibraryMetadata(const Object& tl_owner,
                           TokenPosition token_pos) const;
   void AddTypeParameterMetadata(const TypeParameter& param,
@@ -4073,7 +4078,8 @@
   void AddMetadata(const Object& owner,
                    const String& name,
                    TokenPosition token_pos,
-                   intptr_t kernel_offset = 0) const;
+                   intptr_t kernel_offset = 0,
+                   const TypedData* kernel_data = NULL) const;
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
 
@@ -4954,12 +4960,14 @@
     ASSERT(0 <= len && len <= kMaxElements);
     return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement));
   }
+#if !defined(DART_PRECOMPILED_RUNTIME)
   static RawCode* FinalizeCode(const Function& function,
                                Assembler* assembler,
                                bool optimized = false);
   static RawCode* FinalizeCode(const char* name,
                                Assembler* assembler,
                                bool optimized);
+#endif
   static RawCode* LookupCode(uword pc);
   static RawCode* LookupCodeInVmIsolate(uword pc);
   static RawCode* FindCode(uword pc, int64_t timestamp);
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index ba23b24..8579966 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -838,11 +838,13 @@
   jsobj.AddProperty("_objectPool", object_pool);
   {
     JSONArray jsarr(&jsobj, "_disassembly");
+#if !defined(DART_PRECOMPILED_RUNTIME)
     if (is_alive()) {
       // Only disassemble alive code objects.
       DisassembleToJSONStream formatter(jsarr);
       Disassemble(&formatter);
     }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
   }
   const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
   if (!descriptors.IsNull()) {
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index d1ec214..ee37e15 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -79,9 +79,6 @@
   // Returns number of available processor cores.
   static int NumberOfAvailableProcessors();
 
-  // Returns the maximium resident set size of this process.
-  static uintptr_t MaxRSS();
-
   // Sleep the currently executing thread for millis ms.
   static void Sleep(int64_t millis);
 
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc
index d9da8d4..7735750 100644
--- a/runtime/vm/os_android.cc
+++ b/runtime/vm/os_android.cc
@@ -214,14 +214,6 @@
   return sysconf(_SC_NPROCESSORS_ONLN);
 }
 
-uintptr_t OS::MaxRSS() {
-  struct rusage usage;
-  usage.ru_maxrss = 0;
-  int r = getrusage(RUSAGE_SELF, &usage);
-  ASSERT(r == 0);
-  return usage.ru_maxrss * KB;
-}
-
 void OS::Sleep(int64_t millis) {
   int64_t micros = millis * kMicrosecondsPerMillisecond;
   SleepMicros(micros);
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index 3781f02..11e7951 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -136,16 +136,6 @@
   return sysconf(_SC_NPROCESSORS_CONF);
 }
 
-uintptr_t OS::MaxRSS() {
-  mx_info_task_stats_t task_stats;
-  mx_handle_t process = mx_process_self();
-  mx_status_t status = mx_object_get_info(
-      process, MX_INFO_TASK_STATS, &task_stats, sizeof(task_stats), NULL, NULL);
-  return (status == MX_OK)
-             ? (task_stats.mem_private_bytes + task_stats.mem_shared_bytes)
-             : 0;
-}
-
 void OS::Sleep(int64_t millis) {
   SleepMicros(millis * kMicrosecondsPerMillisecond);
 }
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index ccbc7e5..3722ff0 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -221,14 +221,6 @@
   return sysconf(_SC_NPROCESSORS_ONLN);
 }
 
-uintptr_t OS::MaxRSS() {
-  struct rusage usage;
-  usage.ru_maxrss = 0;
-  int r = getrusage(RUSAGE_SELF, &usage);
-  ASSERT(r == 0);
-  return usage.ru_maxrss * KB;
-}
-
 void OS::Sleep(int64_t millis) {
   int64_t micros = millis * kMicrosecondsPerMillisecond;
   SleepMicros(micros);
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc
index 25e3616..f8ea9ab 100644
--- a/runtime/vm/os_macos.cc
+++ b/runtime/vm/os_macos.cc
@@ -200,14 +200,6 @@
   return sysconf(_SC_NPROCESSORS_ONLN);
 }
 
-uintptr_t OS::MaxRSS() {
-  struct rusage usage;
-  usage.ru_maxrss = 0;
-  int r = getrusage(RUSAGE_SELF, &usage);
-  ASSERT(r == 0);
-  return usage.ru_maxrss;
-}
-
 void OS::Sleep(int64_t millis) {
   int64_t micros = millis * kMicrosecondsPerMillisecond;
   SleepMicros(micros);
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index aa7e774..68f77f6 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -206,12 +206,6 @@
   return info.dwNumberOfProcessors;
 }
 
-uintptr_t OS::MaxRSS() {
-  PROCESS_MEMORY_COUNTERS pmc;
-  GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
-  return pmc.PeakWorkingSetSize;
-}
-
 void OS::Sleep(int64_t millis) {
   ::Sleep(millis);
 }
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 0ece9f1..4fe5745 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -71,6 +71,7 @@
   ASSERT(result != NULL);
   result->memory_ = memory;
   result->next_ = NULL;
+  result->used_in_bytes_ = 0;
   result->type_ = type;
 
   LSAN_REGISTER_ROOT_REGION(result, sizeof(*result));
@@ -1092,6 +1093,7 @@
   page->memory_ = memory;
   page->next_ = NULL;
   page->object_end_ = memory->end();
+  page->used_in_bytes_ = page->object_end_ - page->object_start();
 
   MutexLocker ml(pages_lock_);
   HeapPage **first, **tail;
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index 926acd3..f11b499 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -37,6 +37,11 @@
 
   uword object_start() const { return memory_->start() + ObjectStartOffset(); }
   uword object_end() const { return object_end_; }
+  uword used_in_bytes() const { return used_in_bytes_; }
+  void set_used_in_bytes(uword value) {
+    ASSERT(Utils::IsAligned(value, kObjectAlignment));
+    used_in_bytes_ = value;
+  }
 
   PageType type() const { return type_; }
 
@@ -54,9 +59,9 @@
   }
 
  private:
-  void set_object_end(uword val) {
-    ASSERT((val & kObjectAlignmentMask) == kOldObjectAlignmentOffset);
-    object_end_ = val;
+  void set_object_end(uword value) {
+    ASSERT((value & kObjectAlignmentMask) == kOldObjectAlignmentOffset);
+    object_end_ = value;
   }
 
   // These return NULL on OOM.
@@ -74,6 +79,7 @@
   VirtualMemory* memory_;
   HeapPage* next_;
   uword object_end_;
+  uword used_in_bytes_;
   PageType type_;
 
   friend class PageSpace;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 557e69d..b18c4fd 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -227,10 +227,9 @@
 
 kernel::ScopeBuildingResult* ParsedFunction::EnsureKernelScopes() {
   if (kernel_scopes_ == NULL) {
-    intptr_t kernel_offset = function().kernel_offset();
-    Script& script = Script::Handle(Z, function().script());
     kernel::StreamingScopeBuilder builder(
-        this, kernel_offset, script.kernel_data(), script.kernel_data_size());
+        this, function().kernel_offset(),
+        TypedData::Handle(Z, function().kernel_data()));
     kernel_scopes_ = builder.BuildScopes();
   }
   return kernel_scopes_;
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index a3fb9c6..0c17451 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -77,15 +77,15 @@
   Profiler::InitAllocationSampleBuffer();
   // Zero counters.
   memset(&counters_, 0, sizeof(counters_));
-  NativeSymbolResolver::InitOnce();
+  ThreadInterrupter::InitOnce();
   ThreadInterrupter::SetInterruptPeriod(FLAG_profile_period);
   ThreadInterrupter::Startup();
   initialized_ = true;
 }
 
 void Profiler::InitAllocationSampleBuffer() {
-  if (FLAG_profiler_native_memory &&
-      (Profiler::allocation_sample_buffer_ == NULL)) {
+  ASSERT(Profiler::allocation_sample_buffer_ == NULL);
+  if (FLAG_profiler_native_memory) {
     Profiler::allocation_sample_buffer_ = new AllocationSampleBuffer();
   }
 }
@@ -96,7 +96,13 @@
   }
   ASSERT(initialized_);
   ThreadInterrupter::Shutdown();
-  NativeSymbolResolver::ShutdownOnce();
+#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID)
+  // TODO(30309): Free the sample buffer on platforms that use a signal-based
+  // thread interrupter.
+#else
+  delete sample_buffer_;
+  sample_buffer_ = NULL;
+#endif
 }
 
 void Profiler::SetSampleDepth(intptr_t depth) {
@@ -406,17 +412,20 @@
 }
 
 static void DumpStackFrame(intptr_t frame_index, uword pc) {
-  Isolate* isolate = Isolate::Current();
-  if ((isolate != NULL) && isolate->is_runnable()) {
-    Code& code = Code::Handle(Code::LookupCodeInVmIsolate(pc));
-    if (!code.IsNull()) {
-      OS::PrintErr("  [0x%" Pp "] %s\n", pc, code.QualifiedName());
-      return;
-    }
-    code = Code::LookupCode(pc);
-    if (!code.IsNull()) {
-      OS::PrintErr("  [0x%" Pp "] %s\n", pc, code.QualifiedName());
-      return;
+  Thread* thread = Thread::Current();
+  if ((thread != NULL) && !thread->IsAtSafepoint()) {
+    Isolate* isolate = thread->isolate();
+    if ((isolate != NULL) && isolate->is_runnable()) {
+      // Only attempt to symbolize Dart frames if we can safely iterate the
+      // current isolate's heap.
+      Code& code = Code::Handle(Code::LookupCodeInVmIsolate(pc));
+      if (!code.IsNull()) {
+        code = Code::LookupCode(pc);  // In current isolate.
+      }
+      if (!code.IsNull()) {
+        OS::PrintErr("  [0x%" Pp "] %s\n", pc, code.QualifiedName());
+        return;
+      }
     }
   }
 
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 3702232..07d90cc 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -189,7 +189,15 @@
   bool enable_vm_ticks_;
 };
 
+static void EnableProfiler() {
+  if (!FLAG_profiler) {
+    FLAG_profiler = true;
+    Profiler::InitOnce();
+  }
+}
+
 TEST_CASE(Profiler_TrivialRecordAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
@@ -316,6 +324,8 @@
 }
 
 ISOLATE_UNIT_TEST_CASE(Profiler_NativeAllocation) {
+  EnableProfiler();
+
   bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
   FLAG_profiler_native_memory = true;
 
@@ -521,6 +531,8 @@
         // !defined(TARGET_ARCH_DBC) && !defined(HOST_OS_FUCHSIA)
 
 TEST_CASE(Profiler_ToggleRecordAllocation) {
+  EnableProfiler();
+
   DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
@@ -653,6 +665,7 @@
 }
 
 TEST_CASE(Profiler_CodeTicks) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
@@ -757,6 +770,7 @@
 }
 
 TEST_CASE(Profiler_FunctionTicks) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
@@ -861,6 +875,7 @@
 }
 
 TEST_CASE(Profiler_IntrinsicAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript = "double foo(double a, double b) => a + b;";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
@@ -935,6 +950,7 @@
 }
 
 TEST_CASE(Profiler_ArrayAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "List foo() => new List(4);\n"
@@ -1035,6 +1051,7 @@
 }
 
 TEST_CASE(Profiler_ContextAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "var msg1 = 'a';\n"
@@ -1107,6 +1124,7 @@
 }
 
 TEST_CASE(Profiler_ClosureAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "var msg1 = 'a';\n"
@@ -1180,6 +1198,7 @@
 }
 
 TEST_CASE(Profiler_TypedArrayAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript =
       "import 'dart:typed_data';\n"
@@ -1268,6 +1287,7 @@
 }
 
 TEST_CASE(Profiler_StringAllocation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   const char* kScript = "String foo(String a, String b) => a + b;";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
@@ -1357,6 +1377,7 @@
 }
 
 TEST_CASE(Profiler_StringInterpolation) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   const char* kScript = "String foo(String a, String b) => '$a | $b';";
@@ -1449,6 +1470,7 @@
 }
 
 TEST_CASE(Profiler_FunctionInline) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
 
@@ -1741,6 +1763,7 @@
   // This test checks the profiler service takes this into account; see
   // ProfileBuilder::ProcessFrame.
 
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   const char* kScript =
@@ -1874,6 +1897,7 @@
 }
 
 TEST_CASE(Profiler_ChainedSamples) {
+  EnableProfiler();
   MaxProfileDepthScope mpds(32);
   DisableNativeProfileScope dnps;
 
@@ -1987,6 +2011,7 @@
 }
 
 TEST_CASE(Profiler_BasicSourcePosition) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   const char* kScript =
@@ -2062,6 +2087,7 @@
 }
 
 TEST_CASE(Profiler_BasicSourcePositionOptimized) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   // We use the AlwaysInline and NeverInline annotations in this test.
@@ -2156,6 +2182,7 @@
 }
 
 TEST_CASE(Profiler_SourcePosition) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   const char* kScript =
@@ -2261,6 +2288,7 @@
 }
 
 TEST_CASE(Profiler_SourcePositionOptimized) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   // We use the AlwaysInline and NeverInline annotations in this test.
@@ -2386,6 +2414,7 @@
 }
 
 TEST_CASE(Profiler_BinaryOperatorSourcePosition) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   const char* kScript =
@@ -2500,6 +2529,7 @@
 }
 
 TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
+  EnableProfiler();
   DisableNativeProfileScope dnps;
   DisableBackgroundCompilationScope dbcs;
   // We use the AlwaysInline and NeverInline annotations in this test.
@@ -2673,6 +2703,7 @@
 }
 
 TEST_CASE(Profiler_GetSourceReport) {
+  EnableProfiler();
   const char* kScript =
       "doWork(i) => i * i;\n"
       "main() {\n"
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 256c9db..14affdd 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -598,10 +598,10 @@
   DedupCodeSourceMaps();
   DedupLists();
 
-  if (!FLAG_profiler) {
-    // Reduces binary size but obfuscates profiler results.
-    DedupInstructions();
-  }
+#if defined(PRODUCT)
+  // Reduces binary size but obfuscates profiler results.
+  DedupInstructions();
+#endif
 }
 
 }  // namespace dart
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index ce78c94..4ce3706 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -878,8 +878,9 @@
   RawArray* parameter_names_;
   RawTypeArguments* type_parameters_;  // Array of TypeParameter.
   RawObject* data_;  // Additional data specific to the function kind.
+  RawTypedData* kernel_data_;
   RawObject** to_snapshot() {
-    return reinterpret_cast<RawObject**>(&ptr()->data_);
+    return reinterpret_cast<RawObject**>(&ptr()->kernel_data_);
   }
   RawArray* ic_data_array_;  // ICData of unoptimized code.
   RawObject** to_no_code() {
@@ -898,12 +899,12 @@
 
   NOT_IN_PRECOMPILED(TokenPosition token_pos_);
   NOT_IN_PRECOMPILED(TokenPosition end_token_pos_);
+  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
   NOT_IN_PRECOMPILED(int32_t usage_counter_);  // Accessed from generated code
                                                // (JIT only).
   uint32_t kind_tag_;                          // See Function::KindTagBits.
   int16_t num_fixed_parameters_;
   int16_t num_optional_parameters_;  // > 0: positional; < 0: named.
-  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
   NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_);
   NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_);
   NOT_IN_PRECOMPILED(int8_t deoptimization_counter_);
@@ -964,6 +965,7 @@
   RawObject* owner_;  // Class or patch class or mixin class
                       // where this field is defined or original field.
   RawAbstractType* type_;
+  RawTypedData* kernel_data_;
   union {
     RawInstance* static_value_;  // Value for static fields.
     RawSmi* offset_;             // Offset in words for instance fields.
@@ -1004,13 +1006,13 @@
   classid_t guarded_cid_;
   classid_t is_nullable_;  // kNullCid if field can contain null value and
                            // any other value otherwise.
+  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
   // Offset to the guarded length field inside an instance of class matching
   // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code
   // generated on platforms with weak addressing modes (ARM).
   int8_t guarded_list_length_in_object_offset_;
 
   uint8_t kind_bits_;  // static, final, const, has initializer....
-  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
 
   friend class CidRewriteVisitor;
 };
@@ -1088,10 +1090,8 @@
   int32_t line_offset_;
   int32_t col_offset_;
   int8_t kind_;  // Of type Kind.
-  int64_t load_timestamp_;
-  const uint8_t* kernel_data_;
-  intptr_t kernel_data_size_;
   intptr_t kernel_script_index_;
+  int64_t load_timestamp_;
 };
 
 class RawLibrary : public RawObject {
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 79af969..cd0207c 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -719,16 +719,20 @@
     // don't set them until after setting the kind.
     const int32_t token_pos = reader->Read<int32_t>();
     const int32_t end_token_pos = reader->Read<uint32_t>();
+    int32_t kernel_offset = 0;
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    kernel_offset = reader->Read<int32_t>();
+#endif
     func.set_num_fixed_parameters(reader->Read<int16_t>());
     func.set_num_optional_parameters(reader->Read<int16_t>());
     func.set_kind_tag(reader->Read<uint32_t>());
     func.set_token_pos(TokenPosition::SnapshotDecode(token_pos));
     func.set_end_token_pos(TokenPosition::SnapshotDecode(end_token_pos));
+    func.set_kernel_offset(kernel_offset);
     func.set_usage_counter(reader->Read<int32_t>());
     func.set_deoptimization_counter(reader->Read<int8_t>());
     func.set_optimized_instruction_count(reader->Read<uint16_t>());
     func.set_optimized_call_site_count(reader->Read<uint16_t>());
-    func.set_kernel_offset(0);
     func.set_was_compiled(false);
 
     // Set all the object fields.
@@ -788,6 +792,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
     writer->Write<int32_t>(ptr()->token_pos_.SnapshotEncode());
     writer->Write<int32_t>(ptr()->end_token_pos_.SnapshotEncode());
+    writer->Write<int32_t>(ptr()->kernel_offset_);
 #endif
     writer->Write<int16_t>(ptr()->num_fixed_parameters_);
     writer->Write<int16_t>(ptr()->num_optional_parameters_);
@@ -831,8 +836,10 @@
   field.set_token_pos(TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
   field.set_guarded_cid(reader->Read<int32_t>());
   field.set_is_nullable(reader->Read<int32_t>());
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  field.set_kernel_offset(reader->Read<int32_t>());
+#endif
   field.set_kind_bits(reader->Read<uint8_t>());
-  field.set_kernel_offset(0);
 
   // Set all the object fields.
   READ_OBJECT_FIELDS(field, field.raw()->from(), field.raw()->to_snapshot(kind),
@@ -869,6 +876,9 @@
   writer->Write<int32_t>(ptr()->token_pos_.SnapshotEncode());
   writer->Write<int32_t>(ptr()->guarded_cid_);
   writer->Write<int32_t>(ptr()->is_nullable_);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  writer->Write<int32_t>(ptr()->kernel_offset_);
+#endif
   writer->Write<uint8_t>(ptr()->kind_bits_);
 
   // Write out the name.
@@ -877,6 +887,8 @@
   writer->WriteObjectImpl(ptr()->owner_, kAsReference);
   // Write out the type.
   writer->WriteObjectImpl(ptr()->type_, kAsReference);
+  // Write out the kernel_data.
+  writer->WriteObjectImpl(ptr()->kernel_data_, kAsReference);
   // Write out the initial static value or field offset.
   if (Field::StaticBit::decode(ptr()->kind_bits_)) {
     if (Field::ConstBit::decode(ptr()->kind_bits_)) {
@@ -1018,6 +1030,8 @@
   script.StoreNonPointer(&script.raw_ptr()->col_offset_,
                          reader->Read<int32_t>());
   script.StoreNonPointer(&script.raw_ptr()->kind_, reader->Read<int8_t>());
+  script.StoreNonPointer(&script.raw_ptr()->kernel_script_index_,
+                         reader->Read<int32_t>());
 
   *reader->StringHandle() ^= String::null();
   script.set_source(*reader->StringHandle());
@@ -1059,6 +1073,7 @@
   writer->Write<int32_t>(ptr()->line_offset_);
   writer->Write<int32_t>(ptr()->col_offset_);
   writer->Write<int8_t>(ptr()->kind_);
+  writer->Write<int32_t>(ptr()->kernel_script_index_);
 
   // Write out all the object pointer fields.
   SnapshotWriterVisitor visitor(writer, kAsReference);
diff --git a/runtime/vm/redundancy_elimination.cc b/runtime/vm/redundancy_elimination.cc
index 707eedc..39d97e1 100644
--- a/runtime/vm/redundancy_elimination.cc
+++ b/runtime/vm/redundancy_elimination.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/redundancy_elimination.h"
 
 #include "vm/bit_vector.h"
@@ -3334,3 +3336,5 @@
 }
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index db30e92..b47a7f3 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -2,6 +2,8 @@
 // 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.
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
 #include "vm/regexp_assembler_ir.h"
 
 #include "vm/bit_vector.h"
@@ -1732,3 +1734,5 @@
 #undef __
 
 }  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 6a74969..d5c24ff 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -1704,10 +1704,11 @@
 #ifndef DART_PRECOMPILED_RUNTIME
       // Ensure that we have unoptimized code.
       frame->function().EnsureHasCompiledUnoptimizedCode();
-#endif
+      const int num_vars = frame->NumLocalVariables();
+#else
       // Variable locations and number are unknown when precompiling.
-      const int num_vars =
-          FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables();
+      const int num_vars = 0;
+#endif
       TokenPosition unused = TokenPosition::kNoSource;
       for (intptr_t v = 0; v < num_vars; v++) {
         frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value);
@@ -2283,6 +2284,12 @@
   field.EvaluateInitializer();
 }
 
+// Print the stop message.
+DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
+  OS::Print("Stop message: %s\n", message);
+}
+END_LEAF_RUNTIME_ENTRY
+
 // Use expected function signatures to help MSVC compiler resolve overloading.
 typedef double (*UnaryMathCFunction)(double x);
 typedef double (*BinaryMathCFunction)(double x, double y);
diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h
index 0eea4fb..86c109d 100644
--- a/runtime/vm/runtime_entry.h
+++ b/runtime/vm/runtime_entry.h
@@ -58,7 +58,8 @@
   uword GetEntryPoint() const;
 
   // Generate code to call the runtime entry.
-  void Call(Assembler* assembler, intptr_t argument_count) const;
+  NOT_IN_PRECOMPILED(void Call(Assembler* assembler, intptr_t argument_count)
+                         const);
 
   void set_next(const RuntimeEntry* next) { next_ = next; }
   const RuntimeEntry* next() const { return next_; }
diff --git a/runtime/vm/runtime_entry_arm.cc b/runtime/vm/runtime_entry_arm.cc
index 06955ad..7bfc3b9 100644
--- a/runtime/vm/runtime_entry_arm.cc
+++ b/runtime/vm/runtime_entry_arm.cc
@@ -36,6 +36,7 @@
   return entry;
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 // Generate code to call into the stub which will call the runtime
 // function. Input for the stub is as follows:
 //   SP : points to the arguments and return value array.
@@ -53,6 +54,7 @@
     __ BranchLinkToRuntime();
   }
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 }  // namespace dart
 
diff --git a/runtime/vm/runtime_entry_arm64.cc b/runtime/vm/runtime_entry_arm64.cc
index a8e9e90..2f66bda 100644
--- a/runtime/vm/runtime_entry_arm64.cc
+++ b/runtime/vm/runtime_entry_arm64.cc
@@ -36,6 +36,7 @@
   return entry;
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 // Generate code to call into the stub which will call the runtime
 // function. Input for the stub is as follows:
 //   SP : points to the arguments and return value array.
@@ -71,6 +72,7 @@
     __ BranchLinkToRuntime();
   }
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 }  // namespace dart
 
diff --git a/runtime/vm/runtime_entry_ia32.cc b/runtime/vm/runtime_entry_ia32.cc
index ab22a92..2167f1d 100644
--- a/runtime/vm/runtime_entry_ia32.cc
+++ b/runtime/vm/runtime_entry_ia32.cc
@@ -18,6 +18,7 @@
   return reinterpret_cast<uword>(function());
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 // Generate code to call into the stub which will call the runtime
 // function. Input for the stub is as follows:
 // For regular runtime calls -
@@ -39,6 +40,7 @@
     __ CallToRuntime();
   }
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 }  // namespace dart
 
diff --git a/runtime/vm/runtime_entry_x64.cc b/runtime/vm/runtime_entry_x64.cc
index dfd0840..04bf856 100644
--- a/runtime/vm/runtime_entry_x64.cc
+++ b/runtime/vm/runtime_entry_x64.cc
@@ -18,6 +18,7 @@
   return reinterpret_cast<uword>(function());
 }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
 // Generate code to call into the stub which will call the runtime
 // function. Input for the stub is as follows:
 //   RSP : points to the arguments and return value array.
@@ -37,6 +38,7 @@
     __ CallToRuntime();
   }
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 }  // namespace dart
 
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 6e34bd0..959a7f3 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -324,7 +324,8 @@
       gc_time_micros_(0),
       collections_(0),
       external_size_(0),
-      failed_to_promote_(false) {
+      failed_to_promote_(false),
+      space_lock_(new Mutex()) {
   // Verify assumptions about the first word in objects which the scavenger is
   // going to use for forwarding pointers.
   ASSERT(Object::tags_offset() == 0);
@@ -355,6 +356,7 @@
 Scavenger::~Scavenger() {
   ASSERT(!scavenging_);
   to_->Delete();
+  delete space_lock_;
 }
 
 intptr_t Scavenger::NewSizeInWords(intptr_t old_size_in_words) const {
@@ -394,13 +396,6 @@
   resolved_top_ = top_;
   end_ = to_->end();
 
-  // Throw out the old information about the from space
-  if (isolate->IsMutatorThreadScheduled()) {
-    Thread* mutator_thread = isolate->mutator_thread();
-    mutator_thread->set_top(top_);
-    mutator_thread->set_end(end_);
-  }
-
   return from;
 }
 
@@ -410,13 +405,10 @@
   // All objects in the to space have been copied from the from space at this
   // moment.
 
-  // Ensure the mutator thread now has the up-to-date top_ and end_ of the
-  // semispace
-  if (isolate->IsMutatorThreadScheduled()) {
-    Thread* thread = isolate->mutator_thread();
-    thread->set_top(top_);
-    thread->set_end(end_);
-  }
+  // Ensure the mutator thread will fail the next allocation. This will force
+  // mutator to allocate a new TLAB
+  Thread* mutator_thread = isolate->mutator_thread();
+  ASSERT((mutator_thread == NULL) || (!mutator_thread->HasActiveTLAB()));
 
   double avg_frac = stats_history_.Get(0).PromoCandidatesSuccessFraction();
   if (stats_history_.Size() >= 2) {
@@ -722,18 +714,45 @@
   }
 }
 
-void Scavenger::FlushTLS() const {
+void Scavenger::MakeAllTLABsIterable(Isolate* isolate) const {
+  MonitorLocker ml(isolate->threads_lock(), false);
+  Thread* current = heap_->isolate()->thread_registry()->active_list();
+  while (current != NULL) {
+    if (current->HasActiveTLAB()) {
+      heap_->MakeTLABIterable(current);
+    }
+    current = current->next();
+  }
+  Thread* mutator_thread = isolate->mutator_thread();
+  if ((mutator_thread != NULL) && (!isolate->IsMutatorThreadScheduled())) {
+    heap_->MakeTLABIterable(mutator_thread);
+  }
+}
+
+void Scavenger::MakeNewSpaceIterable() const {
   ASSERT(heap_ != NULL);
-  if (heap_->isolate()->IsMutatorThreadScheduled()) {
-    Thread* mutator_thread = heap_->isolate()->mutator_thread();
-    mutator_thread->heap()->new_space()->set_top(mutator_thread->top());
+  if (!scavenging_) {
+    MakeAllTLABsIterable(heap_->isolate());
+  }
+}
+
+void Scavenger::AbandonAllTLABs(Isolate* isolate) {
+  MonitorLocker ml(isolate->threads_lock(), false);
+  Thread* current = isolate->thread_registry()->active_list();
+  while (current != NULL) {
+    heap_->AbandonRemainingTLAB(current);
+    current = current->next();
+  }
+  Thread* mutator_thread = isolate->mutator_thread();
+  if ((mutator_thread != NULL) && (!isolate->IsMutatorThreadScheduled())) {
+    heap_->AbandonRemainingTLAB(mutator_thread);
   }
 }
 
 void Scavenger::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
   ASSERT(Thread::Current()->IsAtSafepoint() ||
          (Thread::Current()->task_kind() == Thread::kMarkerTask));
-  FlushTLS();
+  MakeNewSpaceIterable();
   uword cur = FirstObjectStart();
   while (cur < top_) {
     RawObject* raw_obj = RawObject::FromAddr(cur);
@@ -744,7 +763,7 @@
 void Scavenger::VisitObjects(ObjectVisitor* visitor) const {
   ASSERT(Thread::Current()->IsAtSafepoint() ||
          (Thread::Current()->task_kind() == Thread::kMarkerTask));
-  FlushTLS();
+  MakeNewSpaceIterable();
   uword cur = FirstObjectStart();
   while (cur < top_) {
     RawObject* raw_obj = RawObject::FromAddr(cur);
@@ -759,7 +778,7 @@
 
 RawObject* Scavenger::FindObject(FindObjectVisitor* visitor) const {
   ASSERT(!scavenging_);
-  FlushTLS();
+  MakeNewSpaceIterable();
   uword cur = FirstObjectStart();
   if (visitor->VisitRange(cur, top_)) {
     while (cur < top_) {
@@ -806,6 +825,8 @@
   int64_t post_safe_point = OS::GetCurrentMonotonicMicros();
   heap_->RecordTime(kSafePoint, post_safe_point - pre_safe_point);
 
+  AbandonAllTLABs(isolate);
+
   // TODO(koda): Make verification more compatible with concurrent sweep.
   if (FLAG_verify_before_gc && !FLAG_concurrent_sweep) {
     OS::PrintErr("Verifying before Scavenge...");
@@ -917,11 +938,6 @@
   // Forces the next scavenge to promote all the objects in the new space.
   survivor_end_ = top_;
 
-  if (heap_->isolate()->IsMutatorThreadScheduled()) {
-    Thread* mutator_thread = heap_->isolate()->mutator_thread();
-    survivor_end_ = mutator_thread->top();
-  }
-
   Scavenge();
 
   // It is possible for objects to stay in the new space
@@ -929,4 +945,28 @@
   ASSERT((UsedInWords() == 0) || failed_to_promote_);
 }
 
+int64_t Scavenger::FreeSpaceInWords(Isolate* isolate) const {
+  MonitorLocker ml(isolate->threads_lock(), false);
+  Thread* current = isolate->thread_registry()->active_list();
+  int64_t free_space = 0;
+  while (current != NULL) {
+    if (current->HasActiveTLAB()) {
+      free_space += current->end() - current->top();
+    }
+    current = current->next();
+  }
+
+  Thread* mutator_thread = isolate->mutator_thread();
+  if ((mutator_thread != NULL) && (!isolate->IsMutatorThreadScheduled())) {
+    free_space += mutator_thread->end() - mutator_thread->top();
+  }
+  return free_space >> kWordSizeLog2;
+}
+
+int64_t Scavenger::UsedInWords() const {
+  int64_t free_space_in_tlab = FreeSpaceInWords(heap_->isolate());
+  int64_t max_space_used = (top_ - FirstObjectStart()) >> kWordSizeLog2;
+  return max_space_used - free_space_in_tlab;
+}
+
 }  // namespace dart
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index 1fd7c9f..954919e 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -10,6 +10,7 @@
 #include "vm/dart.h"
 #include "vm/flags.h"
 #include "vm/globals.h"
+#include "vm/lockers.h"
 #include "vm/raw_object.h"
 #include "vm/ring_buffer.h"
 #include "vm/spaces.h"
@@ -121,6 +122,26 @@
 
   RawObject* FindObject(FindObjectVisitor* visitor) const;
 
+  uword TryAllocateNewTLAB(Thread* thread, intptr_t size) {
+    ASSERT(Utils::IsAligned(size, kObjectAlignment));
+    ASSERT(heap_ != Dart::vm_isolate()->heap());
+    ASSERT(!scavenging_);
+    MutexLocker ml(space_lock_);
+    uword result = top_;
+    intptr_t remaining = end_ - top_;
+    if (remaining < size) {
+      return 0;
+    }
+    ASSERT(to_->Contains(result));
+    ASSERT((result & kObjectAlignmentMask) == object_alignment_);
+    top_ += size;
+    ASSERT(to_->Contains(top_) || (top_ == to_->end()));
+    ASSERT(result < top_);
+    thread->set_top(result);
+    thread->set_end(top_);
+    return result;
+  }
+
   uword AllocateGC(intptr_t size) {
     ASSERT(Utils::IsAligned(size, kObjectAlignment));
     ASSERT(heap_ != Dart::vm_isolate()->heap());
@@ -134,7 +155,7 @@
     ASSERT(to_->Contains(result));
     ASSERT((result & kObjectAlignmentMask) == object_alignment_);
     top_ += size;
-    ASSERT(to_->Contains(top_) || (top_ == to_->end()));
+    ASSERT((to_->Contains(top_)) || (top_ == to_->end()));
     return result;
   }
 
@@ -143,6 +164,8 @@
     ASSERT(heap_ != Dart::vm_isolate()->heap());
     ASSERT(thread->IsMutatorThread());
     ASSERT(thread->isolate()->IsMutatorThreadScheduled());
+    ASSERT(thread->top() <= top_);
+    ASSERT((thread->end() == 0) || (thread->end() == top_));
 #if defined(DEBUG)
     if (FLAG_gc_at_alloc) {
       ASSERT(!scavenging_);
@@ -159,7 +182,7 @@
     ASSERT(to_->Contains(result));
     ASSERT((result & kObjectAlignmentMask) == object_alignment_);
     top += size;
-    ASSERT(to_->Contains(top) || (top == to_->end()));
+    ASSERT((to_->Contains(top)) || (top == to_->end()));
     thread->set_top(top);
     return result;
   }
@@ -180,9 +203,7 @@
     end_ = value;
   }
 
-  int64_t UsedInWords() const {
-    return (top_ - FirstObjectStart()) >> kWordSizeLog2;
-  }
+  int64_t UsedInWords() const;
   int64_t CapacityInWords() const { return to_->size_in_words(); }
   int64_t ExternalInWords() const { return external_size_ >> kWordSizeLog2; }
   SpaceUsage GetCurrentUsage() const {
@@ -215,7 +236,10 @@
   void AllocateExternal(intptr_t size);
   void FreeExternal(intptr_t size);
 
-  void FlushTLS() const;
+  void MakeNewSpaceIterable() const;
+  int64_t FreeSpaceInWords(Isolate* isolate) const;
+  void MakeAllTLABsIterable(Isolate* isolate) const;
+  void AbandonAllTLABs(Isolate* isolate);
 
  private:
   // Ids for time and data records in Heap::GCStats.
@@ -314,6 +338,8 @@
 
   bool failed_to_promote_;
 
+  // Protects new space during the allocation of new TLABs
+  Mutex* space_lock_;
   friend class ScavengerVisitor;
   friend class ScavengerWeakVisitor;
 
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index f161469..066354f 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -29,6 +29,7 @@
 #include "vm/object_store.h"
 #include "vm/parser.h"
 #include "vm/port.h"
+#include "vm/profiler.h"
 #include "vm/profiler_service.h"
 #include "vm/reusable_handles.h"
 #include "vm/safepoint.h"
@@ -108,6 +109,7 @@
 Dart_ServiceStreamListenCallback Service::stream_listen_callback_ = NULL;
 Dart_ServiceStreamCancelCallback Service::stream_cancel_callback_ = NULL;
 Dart_GetVMServiceAssetsArchive Service::get_service_assets_callback_ = NULL;
+Dart_EmbedderInformationCallback Service::embedder_information_callback_ = NULL;
 
 // These are the set of streams known to the core VM.
 StreamInfo Service::vm_stream("VM");
@@ -129,7 +131,7 @@
 
 bool Service::ListenStream(const char* stream_id) {
   if (FLAG_trace_service) {
-    OS::Print("vm-service: starting stream '%s'\n", stream_id);
+    OS::PrintErr("vm-service: starting stream '%s'\n", stream_id);
   }
   intptr_t num_streams = sizeof(streams_) / sizeof(streams_[0]);
   for (intptr_t i = 0; i < num_streams; i++) {
@@ -148,7 +150,7 @@
 
 void Service::CancelStream(const char* stream_id) {
   if (FLAG_trace_service) {
-    OS::Print("vm-service: stopping stream '%s'\n", stream_id);
+    OS::PrintErr("vm-service: stopping stream '%s'\n", stream_id);
   }
   intptr_t num_streams = sizeof(streams_) / sizeof(streams_[0]);
   for (intptr_t i = 0; i < num_streams; i++) {
@@ -911,7 +913,7 @@
   ASSERT(!ServiceIsolate::IsServiceIsolateDescendant(isolate));
 
   if (FLAG_trace_service) {
-    OS::Print(
+    OS::PrintErr(
         "vm-service: Pushing ServiceEvent(isolate='%s', kind='%s',"
         " len=%" Pd ") to stream %s\n",
         isolate->name(), event_type, bytes_length, stream_id);
@@ -1096,7 +1098,7 @@
     if (isolate != NULL) {
       isolate_name = isolate->name();
     }
-    OS::Print(
+    OS::PrintErr(
         "vm-service: Pushing ServiceEvent(isolate='%s', kind='%s') "
         "to stream %s\n",
         isolate_name, kind, stream_id);
@@ -1226,6 +1228,41 @@
   get_service_assets_callback_ = get_service_assets;
 }
 
+void Service::SetEmbedderInformationCallback(
+    Dart_EmbedderInformationCallback callback) {
+  embedder_information_callback_ = callback;
+}
+
+int64_t Service::CurrentRSS() {
+  if (embedder_information_callback_ == NULL) {
+    return -1;
+  }
+  Dart_EmbedderInformation info = {
+    0,  // version
+    NULL,  // name
+    0,  // max_rss
+    0  // current_rss
+  };
+  embedder_information_callback_(&info);
+  ASSERT(info.version == DART_EMBEDDER_INFORMATION_CURRENT_VERSION);
+  return info.current_rss;
+}
+
+int64_t Service::MaxRSS() {
+  if (embedder_information_callback_ == NULL) {
+    return -1;
+  }
+  Dart_EmbedderInformation info = {
+    0,  // version
+    NULL,  // name
+    0,  // max_rss
+    0  // current_rss
+  };
+  embedder_information_callback_(&info);
+  ASSERT(info.version == DART_EMBEDDER_INFORMATION_CURRENT_VERSION);
+  return info.max_rss;
+}
+
 EmbedderServiceHandler* Service::FindRootEmbedderHandler(const char* name) {
   EmbedderServiceHandler* current = root_service_handler_head_;
   while (current != NULL) {
@@ -3121,6 +3158,19 @@
   return true;
 }
 
+static const MethodParameter* enable_profiler_params[] = {
+    NULL,
+};
+
+static bool EnableProfiler(Thread* thread, JSONStream* js) {
+  if (!FLAG_profiler) {
+    FLAG_profiler = true;
+    Profiler::InitOnce();
+  }
+  PrintSuccess(js);
+  return true;
+}
+
 static const MethodParameter* get_tag_profile_params[] = {
     RUNNABLE_ISOLATE_PARAMETER, NULL,
 };
@@ -3807,6 +3857,28 @@
     NO_ISOLATE_PARAMETER, NULL,
 };
 
+void Service::PrintJSONForEmbedderInformation(JSONObject *jsobj) {
+  if (embedder_information_callback_ != NULL) {
+    Dart_EmbedderInformation info = {
+      0,  // version
+      NULL,  // name
+      0,  // max_rss
+      0  // current_rss
+    };
+    embedder_information_callback_(&info);
+    ASSERT(info.version == DART_EMBEDDER_INFORMATION_CURRENT_VERSION);
+    if (info.name != NULL) {
+      jsobj->AddProperty("_embedder", info.name);
+    }
+    if (info.max_rss > 0) {
+      jsobj->AddProperty64("_maxRSS", info.max_rss);
+    }
+    if (info.max_rss > 0) {
+      jsobj->AddProperty64("_currentRSS", info.current_rss);
+    }
+  }
+}
+
 void Service::PrintJSONForVM(JSONStream* js, bool ref) {
   JSONObject jsobj(js);
   jsobj.AddProperty("type", (ref ? "@VM" : "VM"));
@@ -3822,10 +3894,10 @@
   jsobj.AddProperty64("_nativeZoneMemoryUsage",
                       ApiNativeScope::current_memory_usage());
   jsobj.AddProperty64("pid", OS::ProcessId());
-  jsobj.AddProperty64("_maxRSS", OS::MaxRSS());
   jsobj.AddPropertyTimeMillis(
       "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis());
   MallocHooks::PrintToJSONObject(&jsobj);
+  PrintJSONForEmbedderInformation(&jsobj);
   // Construct the isolate list.
   {
     JSONArray jsarr(&jsobj, "isolates");
@@ -4022,6 +4094,8 @@
     clear_cpu_profile_params },
   { "_clearVMTimeline", ClearVMTimeline,
     clear_vm_timeline_params, },
+  { "_enableProfiler", EnableProfiler,
+    enable_profiler_params, },
   { "evaluate", Evaluate,
     evaluate_params },
   { "evaluateInFrame", EvaluateInFrame,
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 0d9aa39..b6704cb 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -25,6 +25,7 @@
 class Instance;
 class Isolate;
 class JSONStream;
+class JSONObject;
 class Object;
 class RawInstance;
 class RawError;
@@ -100,6 +101,9 @@
                                            Dart_ServiceRequestCallback callback,
                                            void* user_data);
 
+  static void SetEmbedderInformationCallback(
+      Dart_EmbedderInformationCallback callback);
+
   static void SetEmbedderStreamCallbacks(
       Dart_ServiceStreamListenCallback listen_callback,
       Dart_ServiceStreamCancelCallback cancel_callback);
@@ -163,10 +167,14 @@
     return stream_cancel_callback_;
   }
 
+  static void PrintJSONForEmbedderInformation(JSONObject *jsobj);
   static void PrintJSONForVM(JSONStream* js, bool ref);
 
   static void CheckForPause(Isolate* isolate, JSONStream* stream);
 
+  static int64_t CurrentRSS();
+  static int64_t MaxRSS();
+
  private:
   static RawError* InvokeMethod(Isolate* isolate,
                                 const Array& message,
@@ -209,6 +217,7 @@
   static Dart_ServiceStreamListenCallback stream_listen_callback_;
   static Dart_ServiceStreamCancelCallback stream_cancel_callback_;
   static Dart_GetVMServiceAssetsArchive get_service_assets_callback_;
+  static Dart_EmbedderInformationCallback embedder_information_callback_;
 
   static bool needs_isolate_events_;
   static bool needs_debug_events_;
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 1826f16..593e208 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -199,8 +199,8 @@
   writer.WriteMessage(list);
   intptr_t len = writer.BytesWritten();
   if (FLAG_trace_service) {
-    OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n",
-              name.ToCString(), Dart_GetMainPortId());
+    OS::PrintErr("vm-service: Isolate %s %" Pd64 " registered.\n",
+                 name.ToCString(), Dart_GetMainPortId());
   }
   return PortMap::PostMessage(
       new Message(port_, data, len, Message::kNormalPriority));
@@ -227,8 +227,8 @@
   writer.WriteMessage(list);
   intptr_t len = writer.BytesWritten();
   if (FLAG_trace_service) {
-    OS::Print("vm-service: Isolate %s %" Pd64 " deregistered.\n",
-              name.ToCString(), Dart_GetMainPortId());
+    OS::PrintErr("vm-service: Isolate %s %" Pd64 " deregistered.\n",
+                 name.ToCString(), Dart_GetMainPortId());
   }
   return PortMap::PostMessage(
       new Message(port_, data, len, Message::kNormalPriority));
@@ -242,7 +242,7 @@
     return;
   }
   if (FLAG_trace_service) {
-    OS::Print("vm-service: sending service exit message.\n");
+    OS::PrintErr("vm-service: sending service exit message.\n");
   }
   PortMap::PostMessage(new Message(port_, exit_message_, exit_message_length_,
                                    Message::kNormalPriority));
@@ -257,7 +257,7 @@
   MonitorLocker ml(monitor_);
   isolate_ = isolate;
   if (isolate_ != NULL) {
-    isolate_->is_service_isolate_ = true;
+    isolate_->set_is_service_isolate(true);
     origin_ = isolate_->origin_id();
   }
 }
@@ -366,7 +366,7 @@
  protected:
   static void ShutdownIsolate(uword parameter) {
     if (FLAG_trace_service) {
-      OS::Print("vm-service: ShutdownIsolate\n");
+      OS::PrintErr("vm-service: ShutdownIsolate\n");
     }
     Isolate* I = reinterpret_cast<Isolate*>(parameter);
     ASSERT(ServiceIsolate::IsServiceIsolate(I));
@@ -396,7 +396,7 @@
     // Shut the isolate down.
     Dart::ShutdownIsolate(I);
     if (FLAG_trace_service) {
-      OS::Print("vm-service: Shutdown.\n");
+      OS::PrintErr("vm-service: Shutdown.\n");
     }
     ServiceIsolate::FinishedExiting();
   }
@@ -411,7 +411,7 @@
         Library::Handle(Z, I->object_store()->root_library());
     if (root_library.IsNull()) {
       if (FLAG_trace_service) {
-        OS::Print("vm-service: Embedder did not install a script.");
+        OS::PrintErr("vm-service: Embedder did not install a script.");
       }
       // Service isolate is not supported by embedder.
       return false;
@@ -424,7 +424,7 @@
     if (entry.IsNull()) {
       // Service isolate is not supported by embedder.
       if (FLAG_trace_service) {
-        OS::Print("vm-service: Embedder did not provide a main function.");
+        OS::PrintErr("vm-service: Embedder did not provide a main function.");
       }
       return false;
     }
@@ -436,8 +436,8 @@
       // Service isolate did not initialize properly.
       if (FLAG_trace_service) {
         const Error& error = Error::Cast(result);
-        OS::Print("vm-service: Calling main resulted in an error: %s",
-                  error.ToErrorCString());
+        OS::PrintErr("vm-service: Calling main resulted in an error: %s",
+                     error.ToErrorCString());
       }
       if (result.IsUnwindError()) {
         return true;
diff --git a/runtime/vm/service_sources.gypi b/runtime/vm/service_sources.gypi
deleted file mode 100644
index a0de7e9..0000000
--- a/runtime/vm/service_sources.gypi
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2014, 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.
-
-{
-  'sources': [
-    'service/client.dart',
-    'service/constants.dart',
-    'service/message.dart',
-    'service/message_router.dart',
-    'service/running_isolate.dart',
-    'service/running_isolates.dart',
-    'service/vmservice.dart',
-  ]
-}
\ No newline at end of file
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 7cef50b..d98b4cc 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -13,6 +13,7 @@
 #include "vm/object_id_ring.h"
 #include "vm/os.h"
 #include "vm/port.h"
+#include "vm/profiler.h"
 #include "vm/safepoint.h"
 #include "vm/service.h"
 #include "vm/unit_test.h"
@@ -725,7 +726,15 @@
 // TODO(zra): Remove when tests are ready to enable.
 #if !defined(TARGET_ARCH_ARM64)
 
+static void EnableProfiler() {
+  if (!FLAG_profiler) {
+    FLAG_profiler = true;
+    Profiler::InitOnce();
+  }
+}
+
 TEST_CASE(Service_Profile) {
+  EnableProfiler();
   const char* kScript =
       "var port;\n"  // Set to our mock port by C++.
       "\n"
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 60c0731..6bf16e0 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -17,7 +17,6 @@
 #include "vm/constants_arm.h"
 #include "vm/cpu.h"
 #include "vm/disassembler.h"
-#include "vm/lockers.h"
 #include "vm/native_arguments.h"
 #include "vm/os_thread.h"
 #include "vm/stack_frame.h"
@@ -659,18 +658,10 @@
   return result;
 }
 
-// Synchronization primitives support.
-Mutex* Simulator::exclusive_access_lock_ = NULL;
-Simulator::AddressTag Simulator::exclusive_access_state_[kNumAddressTags] = {
-    {NULL, 0}};
-int Simulator::next_address_tag_ = 0;
-
 void Simulator::InitOnce() {
-  // Setup exclusive access state lock.
-  exclusive_access_lock_ = new Mutex();
 }
 
-Simulator::Simulator() {
+Simulator::Simulator() : exclusive_access_addr_(0), exclusive_access_value_(0) {
   // Setup simulator support first. Some of this information is needed to
   // setup the architecture state.
   // We allocate the stack here, the size is computed as the sum of
@@ -1024,100 +1015,35 @@
   *ptr = value;
 }
 
-// Synchronization primitives support.
-void Simulator::SetExclusiveAccess(uword addr) {
-  Thread* thread = Thread::Current();
-  ASSERT(thread != NULL);
-  DEBUG_ASSERT(exclusive_access_lock_->IsOwnedByCurrentThread());
-  int i = 0;
-  // Find an entry for this thread in the exclusive access state.
-  while ((i < kNumAddressTags) &&
-         (exclusive_access_state_[i].thread != thread)) {
-    i++;
-  }
-  // Round-robin replacement of previously used entries.
-  if (i == kNumAddressTags) {
-    i = next_address_tag_;
-    if (++next_address_tag_ == kNumAddressTags) {
-      next_address_tag_ = 0;
-    }
-    exclusive_access_state_[i].thread = thread;
-  }
-  // Remember the address being reserved.
-  exclusive_access_state_[i].addr = addr;
-}
-
-bool Simulator::HasExclusiveAccessAndOpen(uword addr) {
-  Thread* thread = Thread::Current();
-  ASSERT(thread != NULL);
-  ASSERT(addr != 0);
-  DEBUG_ASSERT(exclusive_access_lock_->IsOwnedByCurrentThread());
-  bool result = false;
-  for (int i = 0; i < kNumAddressTags; i++) {
-    if (exclusive_access_state_[i].thread == thread) {
-      // Check whether the current thread's address reservation matches.
-      if (exclusive_access_state_[i].addr == addr) {
-        result = true;
-      }
-      exclusive_access_state_[i].addr = 0;
-    } else if (exclusive_access_state_[i].addr == addr) {
-      // Other threads with matching address lose their reservations.
-      exclusive_access_state_[i].addr = 0;
-    }
-  }
-  return result;
-}
-
 void Simulator::ClearExclusive() {
-  MutexLocker ml(exclusive_access_lock_);
-  // Remove the reservation for this thread.
-  SetExclusiveAccess(0);
+  exclusive_access_addr_ = 0;
+  exclusive_access_value_ = 0;
 }
 
 intptr_t Simulator::ReadExclusiveW(uword addr, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  SetExclusiveAccess(addr);
-  return ReadW(addr, instr);
+  exclusive_access_addr_ = addr;
+  exclusive_access_value_ = ReadW(addr, instr);
+  return exclusive_access_value_;
 }
 
 intptr_t Simulator::WriteExclusiveW(uword addr, intptr_t value, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  bool write_allowed = HasExclusiveAccessAndOpen(addr);
-  if (write_allowed) {
-    WriteW(addr, value, instr);
+  // In a well-formed code store-exclusive instruction should always follow
+  // a corresponding load-exclusive instruction with the same address.
+  ASSERT((exclusive_access_addr_ == 0) || (exclusive_access_addr_ == addr));
+  if (exclusive_access_addr_ != addr) {
+    return 1;  // Failure.
+  }
+
+  uword old_value = exclusive_access_value_;
+  ClearExclusive();
+
+  if (AtomicOperations::CompareAndSwapWord(reinterpret_cast<uword*>(addr),
+                                           old_value, value) == old_value) {
     return 0;  // Success.
   }
   return 1;  // Failure.
 }
 
-uword Simulator::CompareExchange(uword* address,
-                                 uword compare_value,
-                                 uword new_value) {
-  MutexLocker ml(exclusive_access_lock_);
-  // We do not get a reservation as it would be guaranteed to be found when
-  // writing below. No other thread is able to make a reservation while we
-  // hold the lock.
-  uword value = *address;
-  if (value == compare_value) {
-    *address = new_value;
-    // Same effect on exclusive access state as a successful STREX.
-    HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address));
-  } else {
-    // Same effect on exclusive access state as an LDREX.
-    SetExclusiveAccess(reinterpret_cast<uword>(address));
-  }
-  return value;
-}
-
-uint32_t Simulator::CompareExchangeUint32(uint32_t* address,
-                                          uint32_t compare_value,
-                                          uint32_t new_value) {
-  COMPILE_ASSERT(sizeof(uword) == sizeof(uint32_t));
-  return CompareExchange(reinterpret_cast<uword*>(address),
-                         static_cast<uword>(compare_value),
-                         static_cast<uword>(new_value));
-}
-
 // Returns the top of the stack area to enable checking for stack pointer
 // validity.
 uword Simulator::StackTop() const {
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
index 5a59f5bc..b81ad9e 100644
--- a/runtime/vm/simulator_arm.h
+++ b/runtime/vm/simulator_arm.h
@@ -104,15 +104,6 @@
                bool fp_return = false,
                bool fp_args = false);
 
-  // Implementation of atomic compare and exchange in the same synchronization
-  // domain as other synchronization primitive instructions (e.g. ldrex, strex).
-  static uword CompareExchange(uword* address,
-                               uword compare_value,
-                               uword new_value);
-  static uint32_t CompareExchangeUint32(uint32_t* address,
-                                        uint32_t compare_value,
-                                        uint32_t new_value);
-
   // Runtime and native call support.
   enum CallKind {
     kRuntimeCall,
@@ -218,31 +209,13 @@
   intptr_t ReadExclusiveW(uword addr, Instr* instr);
   intptr_t WriteExclusiveW(uword addr, intptr_t value, Instr* instr);
 
-  // We keep track of 16 exclusive access address tags across all threads.
-  // Since we cannot simulate a native context switch, which clears
-  // the exclusive access state of the local monitor (using the CLREX
-  // instruction), we associate the thread requesting exclusive access to the
-  // address tag. Multiple threads requesting exclusive access (using the LDREX
-  // instruction) to the same address will result in multiple address tags being
-  // created for the same address, one per thread.
-  // At any given time, each thread is associated to at most one address tag.
-  static Mutex* exclusive_access_lock_;
-  static const int kNumAddressTags = 16;
-  static struct AddressTag {
-    Thread* thread;
-    uword addr;
-  } exclusive_access_state_[kNumAddressTags];
-  static int next_address_tag_;
-
-  // Set access to given address to 'exclusive state' for current thread.
-  static void SetExclusiveAccess(uword addr);
-
-  // Returns true if the current thread has exclusive access to given address,
-  // returns false otherwise. In either case, set access to given address to
-  // 'open state' for all threads.
-  // If given addr is NULL, set access to 'open state' for current
-  // thread (CLREX).
-  static bool HasExclusiveAccessAndOpen(uword addr);
+  // Exclusive access reservation: address and value observed during
+  // load-exclusive. Store-exclusive verifies that address is the same and
+  // performs atomic compare-and-swap with remembered value to observe value
+  // changes. This implementation of ldrex/strex instructions does not detect
+  // ABA situation and our uses of ldrex/strex don't need this detection.
+  uword exclusive_access_addr_;
+  uword exclusive_access_value_;
 
   // Executing is handled based on the instruction type.
   void DecodeType01(Instr* instr);  // Both type 0 and type 1 rolled into one.
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 49f8635..5d74122 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -16,7 +16,6 @@
 #include "vm/assembler.h"
 #include "vm/constants_arm64.h"
 #include "vm/disassembler.h"
-#include "vm/lockers.h"
 #include "vm/native_arguments.h"
 #include "vm/os_thread.h"
 #include "vm/stack_frame.h"
@@ -706,18 +705,10 @@
   return result;
 }
 
-// Synchronization primitives support.
-Mutex* Simulator::exclusive_access_lock_ = NULL;
-Simulator::AddressTag Simulator::exclusive_access_state_[kNumAddressTags] = {
-    {NULL, 0}};
-int Simulator::next_address_tag_ = 0;
-
 void Simulator::InitOnce() {
-  // Setup exclusive access state lock.
-  exclusive_access_lock_ = new Mutex();
 }
 
-Simulator::Simulator() {
+Simulator::Simulator() : exclusive_access_addr_(0), exclusive_access_value_(0) {
   // Setup simulator support first. Some of this information is needed to
   // setup the architecture state.
   // We allocate the stack here, the size is computed as the sum of
@@ -1106,126 +1097,59 @@
   *ptr = value;
 }
 
-// Synchronization primitives support.
-void Simulator::SetExclusiveAccess(uword addr) {
-  Thread* thread = Thread::Current();
-  ASSERT(thread != NULL);
-  DEBUG_ASSERT(exclusive_access_lock_->IsOwnedByCurrentThread());
-  int i = 0;
-  // Find an entry for this thread in the exclusive access state.
-  while ((i < kNumAddressTags) &&
-         (exclusive_access_state_[i].thread != thread)) {
-    i++;
-  }
-  // Round-robin replacement of previously used entries.
-  if (i == kNumAddressTags) {
-    i = next_address_tag_;
-    if (++next_address_tag_ == kNumAddressTags) {
-      next_address_tag_ = 0;
-    }
-    exclusive_access_state_[i].thread = thread;
-  }
-  // Remember the address being reserved.
-  exclusive_access_state_[i].addr = addr;
-}
-
-bool Simulator::HasExclusiveAccessAndOpen(uword addr) {
-  Thread* thread = Thread::Current();
-  ASSERT(thread != NULL);
-  ASSERT(addr != 0);
-  DEBUG_ASSERT(exclusive_access_lock_->IsOwnedByCurrentThread());
-  bool result = false;
-  for (int i = 0; i < kNumAddressTags; i++) {
-    if (exclusive_access_state_[i].thread == thread) {
-      // Check whether the current threads address reservation matches.
-      if (exclusive_access_state_[i].addr == addr) {
-        result = true;
-      }
-      exclusive_access_state_[i].addr = 0;
-    } else if (exclusive_access_state_[i].addr == addr) {
-      // Other threads with matching address lose their reservations.
-      exclusive_access_state_[i].addr = 0;
-    }
-  }
-  return result;
-}
-
 void Simulator::ClearExclusive() {
-  MutexLocker ml(exclusive_access_lock_);
-  // Remove the reservation for this thread.
-  SetExclusiveAccess(0);
+  exclusive_access_addr_ = 0;
+  exclusive_access_value_ = 0;
 }
 
 intptr_t Simulator::ReadExclusiveX(uword addr, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  SetExclusiveAccess(addr);
-  return ReadX(addr, instr);
+  exclusive_access_addr_ = addr;
+  exclusive_access_value_ = ReadX(addr, instr);
+  return exclusive_access_value_;
 }
 
 intptr_t Simulator::ReadExclusiveW(uword addr, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  SetExclusiveAccess(addr);
-  return ReadWU(addr, instr);
+  exclusive_access_addr_ = addr;
+  exclusive_access_value_ = ReadWU(addr, instr);
+  return exclusive_access_value_;
 }
 
 intptr_t Simulator::WriteExclusiveX(uword addr, intptr_t value, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  bool write_allowed = HasExclusiveAccessAndOpen(addr);
-  if (write_allowed) {
-    WriteX(addr, value, instr);
+  // In a well-formed code store-exclusive instruction should always follow
+  // a corresponding load-exclusive instruction with the same address.
+  ASSERT((exclusive_access_addr_ == 0) || (exclusive_access_addr_ == addr));
+  if (exclusive_access_addr_ != addr) {
+    return 1;  // Failure.
+  }
+
+  uword old_value = exclusive_access_value_;
+  ClearExclusive();
+
+  if (AtomicOperations::CompareAndSwapWord(reinterpret_cast<uword*>(addr),
+                                           old_value, value) == old_value) {
     return 0;  // Success.
   }
   return 1;  // Failure.
 }
 
 intptr_t Simulator::WriteExclusiveW(uword addr, intptr_t value, Instr* instr) {
-  MutexLocker ml(exclusive_access_lock_);
-  bool write_allowed = HasExclusiveAccessAndOpen(addr);
-  if (write_allowed) {
-    WriteW(addr, value, instr);
+  // In a well-formed code store-exclusive instruction should always follow
+  // a corresponding load-exclusive instruction with the same address.
+  ASSERT((exclusive_access_addr_ == 0) || (exclusive_access_addr_ == addr));
+  if (exclusive_access_addr_ != addr) {
+    return 1;  // Failure.
+  }
+
+  uint32_t old_value = static_cast<uint32_t>(exclusive_access_value_);
+  ClearExclusive();
+
+  if (AtomicOperations::CompareAndSwapUint32(reinterpret_cast<uint32_t*>(addr),
+                                             old_value, value) == old_value) {
     return 0;  // Success.
   }
   return 1;  // Failure.
 }
 
-uword Simulator::CompareExchange(uword* address,
-                                 uword compare_value,
-                                 uword new_value) {
-  MutexLocker ml(exclusive_access_lock_);
-  // We do not get a reservation as it would be guaranteed to be found when
-  // writing below. No other thread is able to make a reservation while we
-  // hold the lock.
-  uword value = *address;
-  if (value == compare_value) {
-    *address = new_value;
-    // Same effect on exclusive access state as a successful STREX.
-    HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address));
-  } else {
-    // Same effect on exclusive access state as an LDREX.
-    SetExclusiveAccess(reinterpret_cast<uword>(address));
-  }
-  return value;
-}
-
-uint32_t Simulator::CompareExchangeUint32(uint32_t* address,
-                                          uint32_t compare_value,
-                                          uint32_t new_value) {
-  MutexLocker ml(exclusive_access_lock_);
-  // We do not get a reservation as it would be guaranteed to be found when
-  // writing below. No other thread is able to make a reservation while we
-  // hold the lock.
-  uint32_t value = *address;
-  if (value == compare_value) {
-    *address = new_value;
-    // Same effect on exclusive access state as a successful STREX.
-    HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address));
-  } else {
-    // Same effect on exclusive access state as an LDREX.
-    SetExclusiveAccess(reinterpret_cast<uword>(address));
-  }
-  return value;
-}
-
 // Unsupported instructions use Format to print an error and stop execution.
 void Simulator::Format(Instr* instr, const char* format) {
   OS::Print("Simulator found unsupported instruction:\n 0x%p: %s\n", instr,
diff --git a/runtime/vm/simulator_arm64.h b/runtime/vm/simulator_arm64.h
index a1a3669..78059ea 100644
--- a/runtime/vm/simulator_arm64.h
+++ b/runtime/vm/simulator_arm64.h
@@ -101,15 +101,6 @@
                bool fp_return = false,
                bool fp_args = false);
 
-  // Implementation of atomic compare and exchange in the same synchronization
-  // domain as other synchronization primitive instructions (e.g. ldrex, strex).
-  static uword CompareExchange(uword* address,
-                               uword compare_value,
-                               uword new_value);
-  static uint32_t CompareExchangeUint32(uint32_t* address,
-                                        uint32_t compare_value,
-                                        uint32_t new_value);
-
   // Runtime and native call support.
   enum CallKind {
     kRuntimeCall,
@@ -187,22 +178,6 @@
   inline intptr_t ReadX(uword addr, Instr* instr);
   inline void WriteX(uword addr, intptr_t value, Instr* instr);
 
-  // We keep track of 16 exclusive access address tags across all threads.
-  // Since we cannot simulate a native context switch, which clears
-  // the exclusive access state of the local monitor (using the CLREX
-  // instruction), we associate the thread requesting exclusive access to the
-  // address tag. Multiple threads requesting exclusive access (using the LDREX
-  // instruction) to the same address will result in multiple address tags being
-  // created for the same address, one per thread.
-  // At any given time, each thread is associated to at most one address tag.
-  static Mutex* exclusive_access_lock_;
-  static const int kNumAddressTags = 16;
-  static struct AddressTag {
-    Thread* thread;
-    uword addr;
-  } exclusive_access_state_[kNumAddressTags];
-  static int next_address_tag_;
-
   // Synchronization primitives support.
   void ClearExclusive();
   intptr_t ReadExclusiveX(uword addr, Instr* instr);
@@ -211,15 +186,13 @@
   intptr_t ReadExclusiveW(uword addr, Instr* instr);
   intptr_t WriteExclusiveW(uword addr, intptr_t value, Instr* instr);
 
-  // Set access to given address to 'exclusive state' for current thread.
-  static void SetExclusiveAccess(uword addr);
-
-  // Returns true if the current thread has exclusive access to given address,
-  // returns false otherwise. In either case, set access to given address to
-  // 'open state' for all threads.
-  // If given addr is NULL, set access to 'open state' for current
-  // thread (CLREX).
-  static bool HasExclusiveAccessAndOpen(uword addr);
+  // Exclusive access reservation: address and value observed during
+  // load-exclusive. Store-exclusive verifies that address is the same and
+  // performs atomic compare-and-swap with remembered value to observe value
+  // changes. This implementation of ldxr/stxr instructions does not detect
+  // ABA situation and our uses of ldxr/stxr don't need this detection.
+  uword exclusive_access_addr_;
+  uword exclusive_access_value_;
 
   // Helper functions to set the conditional flags in the architecture state.
   void SetNZFlagsW(int32_t val);
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index dda8a26..6b53454 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -39,23 +39,46 @@
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_));
 }
 
+#if defined(DART_PRECOMPILED_RUNTIME)
+void StubCode::InitOnce() {
+  // Stubs will be loaded from the snapshot.
+  UNREACHABLE();
+}
+#else
+
 #define STUB_CODE_GENERATE(name)                                               \
   code ^= Generate("_stub_" #name, StubCode::Generate##name##Stub);            \
   entries_[k##name##Index] = new StubEntry(code);
 
 void StubCode::InitOnce() {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  // Stubs will be loaded from the snapshot.
-  UNREACHABLE();
-#else
   // Generate all the stubs.
   Code& code = Code::Handle();
   VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
-#endif  // DART_PRECOMPILED_RUNTIME
 }
 
 #undef STUB_CODE_GENERATE
 
+RawCode* StubCode::Generate(const char* name,
+                            void (*GenerateStub)(Assembler* assembler)) {
+  Assembler assembler;
+  GenerateStub(&assembler);
+  const Code& code =
+      Code::Handle(Code::FinalizeCode(name, &assembler, false /* optimized */));
+#ifndef PRODUCT
+  if (FLAG_support_disassembler && FLAG_disassemble_stubs) {
+    LogBlock lb;
+    THR_Print("Code for stub '%s': {\n", name);
+    DisassembleToStdout formatter;
+    code.Disassemble(&formatter);
+    THR_Print("}\n");
+    const ObjectPool& object_pool = ObjectPool::Handle(code.object_pool());
+    object_pool.DebugPrint();
+  }
+#endif  // !PRODUCT
+  return code.raw();
+}
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
 void StubCode::Init(Isolate* isolate) {}
 
 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) {}
@@ -107,6 +130,7 @@
     return AllocateArray_entry()->code();
   }
   Code& stub = Code::Handle(zone, cls.allocation_stub());
+#if !defined(DART_PRECOMPILED_RUNTIME)
   if (stub.IsNull()) {
     Assembler assembler;
     const char* name = cls.ToCString();
@@ -158,6 +182,7 @@
     }
 #endif  // !PRODUCT
   }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
   return stub.raw();
 #endif  // !DBC
   UNIMPLEMENTED();
@@ -184,26 +209,6 @@
 #endif
 }
 
-RawCode* StubCode::Generate(const char* name,
-                            void (*GenerateStub)(Assembler* assembler)) {
-  Assembler assembler;
-  GenerateStub(&assembler);
-  const Code& code =
-      Code::Handle(Code::FinalizeCode(name, &assembler, false /* optimized */));
-#ifndef PRODUCT
-  if (FLAG_support_disassembler && FLAG_disassemble_stubs) {
-    LogBlock lb;
-    THR_Print("Code for stub '%s': {\n", name);
-    DisassembleToStdout formatter;
-    code.Disassemble(&formatter);
-    THR_Print("}\n");
-    const ObjectPool& object_pool = ObjectPool::Handle(code.object_pool());
-    object_pool.DebugPrint();
-  }
-#endif  // !PRODUCT
-  return code.raw();
-}
-
 const char* StubCode::NameOfStub(uword entry_point) {
 #define VM_STUB_CODE_TESTER(name)                                              \
   if ((name##_entry() != NULL) &&                                              \
diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h
index 6dddbea..c362769 100644
--- a/runtime/vm/stub_code.h
+++ b/runtime/vm/stub_code.h
@@ -169,11 +169,6 @@
 
   static const intptr_t kStubCodeSize = 4 * KB;
 
-#define STUB_CODE_GENERATE(name)                                               \
-  static void Generate##name##Stub(Assembler* assembler);
-  VM_STUB_CODE_LIST(STUB_CODE_GENERATE)
-#undef STUB_CODE_GENERATE
-
   enum {
 #define STUB_CODE_ENTRY(name) k##name##Index,
     VM_STUB_CODE_LIST(STUB_CODE_ENTRY)
@@ -183,6 +178,12 @@
 
   static StubEntry* entries_[kNumStubEntries];
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+#define STUB_CODE_GENERATE(name)                                               \
+  static void Generate##name##Stub(Assembler* assembler);
+  VM_STUB_CODE_LIST(STUB_CODE_GENERATE)
+#undef STUB_CODE_GENERATE
+
   // Generate the stub and finalize the generated code into the stub
   // code executable area.
   static RawCode* Generate(const char* name,
@@ -200,6 +201,7 @@
   static void GenerateUsageCounterIncrement(Assembler* assembler,
                                             Register temp_reg);
   static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 };
 
 enum DeoptStubKind { kLazyDeoptFromReturn, kLazyDeoptFromThrow, kEagerDeopt };
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 12210a2..52cf06f 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"
-#if defined(TARGET_ARCH_ARM)
+#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/compiler.h"
@@ -103,12 +103,6 @@
   __ Ret();
 }
 
-// Print the stop message.
-DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
-  OS::Print("Stop message: %s\n", message);
-}
-END_LEAF_RUNTIME_ENTRY
-
 // Input parameters:
 //   R0 : stop message (const char*).
 // Must preserve all registers.
@@ -2271,4 +2265,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM
+#endif  // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index e5aeb21..c5191ab 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"
-#if defined(TARGET_ARCH_ARM64)
+#if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/compiler.h"
@@ -123,12 +123,6 @@
   __ ret();
 }
 
-// Print the stop message.
-DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
-  OS::Print("Stop message: %s\n", message);
-}
-END_LEAF_RUNTIME_ENTRY
-
 void StubCode::GeneratePrintStopMessageStub(Assembler* assembler) {
   __ Stop("GeneratePrintStopMessageStub");
 }
@@ -2322,4 +2316,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_ARM64
+#endif  // defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/stub_code_dbc.cc b/runtime/vm/stub_code_dbc.cc
index 10db20d..decb670 100644
--- a/runtime/vm/stub_code_dbc.cc
+++ b/runtime/vm/stub_code_dbc.cc
@@ -87,12 +87,6 @@
   __ Trap();
 }
 
-// Print the stop message.
-DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
-  OS::Print("Stop message: %s\n", message);
-}
-END_LEAF_RUNTIME_ENTRY
-
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_DBC
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 75bb2a8..2509415 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"
-#if defined(TARGET_ARCH_IA32)
+#if defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/compiler.h"
@@ -92,12 +92,6 @@
   __ ret();
 }
 
-// Print the stop message.
-DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
-  OS::Print("Stop message: %s\n", message);
-}
-END_LEAF_RUNTIME_ENTRY
-
 // Input parameters:
 //   ESP : points to return address.
 //   EAX : stop message (const char*).
@@ -2081,4 +2075,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_IA32
+#endif  // defined(TARGET_ARCH_IA32) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index fd82e95..e2e3fba 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/globals.h"
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #include "vm/assembler.h"
 #include "vm/compiler.h"
@@ -96,12 +96,6 @@
   __ ret();
 }
 
-// Print the stop message.
-DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
-  OS::Print("Stop message: %s\n", message);
-}
-END_LEAF_RUNTIME_ENTRY
-
 // Input parameters:
 //   RSP : points to return address.
 //   RDI : stop message (const char*).
@@ -2266,4 +2260,4 @@
 
 }  // namespace dart
 
-#endif  // defined TARGET_ARCH_X64
+#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index f4e0df3..668c498 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -336,9 +336,11 @@
   }
   table.Release();
 
-  const double kMinLoad = 0.90;
-  const double kMaxLoad = 0.90;
-  HashTables::EnsureLoadFactor(kMinLoad, kMaxLoad, unified_table);
+  // TODO(30378): The default load factor of 0.75 / 2 burns ~100KB, but
+  // increasing the load factor regresses Flutter's hot restart time.
+  // const double kMinLoad = 0.90;
+  // const double kMaxLoad = 0.90;
+  // HashTables::EnsureLoadFactor(kMinLoad, kMaxLoad, unified_table);
 
   return unified_table.Release().raw();
 }
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 715d3b8f..4273fbb 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -510,8 +510,8 @@
     }
   }
   if (FLAG_trace_service && FLAG_trace_service_verbose) {
-    OS::Print("[+%" Pd64 "ms] Isolate %s deferring OOB interrupts\n",
-              Dart::UptimeMillis(), isolate()->name());
+    OS::PrintErr("[+%" Pd64 "ms] Isolate %s deferring OOB interrupts\n",
+                 Dart::UptimeMillis(), isolate()->name());
   }
 }
 
@@ -532,8 +532,8 @@
     deferred_interrupts_ = 0;
   }
   if (FLAG_trace_service && FLAG_trace_service_verbose) {
-    OS::Print("[+%" Pd64 "ms] Isolate %s restoring OOB interrupts\n",
-              Dart::UptimeMillis(), isolate()->name());
+    OS::PrintErr("[+%" Pd64 "ms] Isolate %s restoring OOB interrupts\n",
+                 Dart::UptimeMillis(), isolate()->name());
   }
 }
 
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index e3761cd..002b78a 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -366,17 +366,17 @@
   static intptr_t heap_offset() { return OFFSET_OF(Thread, heap_); }
 
   void set_top(uword value) {
-    ASSERT(heap_ != NULL);
     top_ = value;
   }
   void set_end(uword value) {
-    ASSERT(heap_ != NULL);
     end_ = value;
   }
 
   uword top() { return top_; }
   uword end() { return end_; }
 
+  bool HasActiveTLAB() { return end_ > 0; }
+
   static intptr_t top_offset() { return OFFSET_OF(Thread, top_); }
   static intptr_t end_offset() { return OFFSET_OF(Thread, end_); }
 
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index 12af120..6e0b2ca 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -79,6 +79,7 @@
 
   friend class Isolate;
   friend class SafepointHandler;
+  friend class Scavenger;
   DISALLOW_COPY_AND_ASSIGN(ThreadRegistry);
 };
 
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 73282c7..179e537 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -28,7 +28,10 @@
 
 namespace dart {
 
-DECLARE_FLAG(bool, use_dart_frontend);
+DEFINE_FLAG(bool,
+            use_dart_frontend,
+            false,
+            "Parse scripts with Dart-to-Kernel parser");
 
 TestCaseBase* TestCaseBase::first_ = NULL;
 TestCaseBase* TestCaseBase::tail_ = NULL;
@@ -65,8 +68,11 @@
 
 Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) {
   char* err;
+  Dart_IsolateFlags api_flags;
+  Isolate::FlagsInitialize(&api_flags);
+  api_flags.use_dart_frontend = FLAG_use_dart_frontend;
   Dart_Isolate isolate =
-      Dart_CreateIsolate(name, NULL, buffer, NULL, NULL, NULL, &err);
+      Dart_CreateIsolate(name, NULL, buffer, NULL, &api_flags, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
@@ -158,11 +164,12 @@
 }
 
 static ThreadLocalKey script_reload_key = kUnsetThreadLocalKey;
+static ThreadLocalKey kernel_reload_key = kUnsetThreadLocalKey;
 
 char* TestCase::CompileTestScriptWithDFE(const char* url,
                                          const char* source,
-                                         void** kernel_pgm) {
-  Zone* zone = Thread::Current()->zone();
+                                         void** kernel_pgm,
+                                         bool incrementally) {
   // clang-format off
   Dart_SourceFile sourcefiles[] = {
     {
@@ -172,9 +179,19 @@
       "file:///.packages", "untitled:/"
     }};
   // clang-format on
-  int sourcefiles_count = sizeof(sourcefiles) / sizeof(Dart_SourceFile);
-  Dart_KernelCompilationResult compilation_result =
-      Dart_CompileSourcesToKernel(url, sourcefiles_count, sourcefiles);
+  return CompileTestScriptWithDFE(url,
+                                  sizeof(sourcefiles) / sizeof(Dart_SourceFile),
+                                  sourcefiles, kernel_pgm, incrementally);
+}
+
+char* TestCase::CompileTestScriptWithDFE(const char* url,
+                                         int sourcefiles_count,
+                                         Dart_SourceFile sourcefiles[],
+                                         void** kernel_pgm,
+                                         bool incrementally) {
+  Zone* zone = Thread::Current()->zone();
+  Dart_KernelCompilationResult compilation_result = Dart_CompileSourcesToKernel(
+      url, sourcefiles_count, sourcefiles, incrementally);
 
   if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
     return OS::SCreate(zone, "Compilation failed %s", compilation_result.error);
@@ -196,25 +213,35 @@
                                      Dart_Handle url) {
   if (FLAG_use_dart_frontend) {
     // Reload request.
-    ASSERT(script_reload_key != kUnsetThreadLocalKey);
-    const char* script_source = reinterpret_cast<const char*>(
-        OSThread::GetThreadLocal(script_reload_key));
-    ASSERT(script_source != NULL);
-    OSThread::SetThreadLocal(script_reload_key, 0);
+
     const char* urlstr = NULL;
     Dart_Handle result = Dart_StringToCString(url, &urlstr);
     if (Dart_IsError(result)) {
       return Dart_NewApiError("accessing url characters failed");
     }
+
+    // Updated library either arrives as dart source or as
+    // a precompiled kernel binary.
     void* kernel_pgm;
-    char* error =
-        TestCase::CompileTestScriptWithDFE(urlstr, script_source, &kernel_pgm);
-    if (error == NULL) {
-      return Dart_LoadScript(url, Dart_Null(),
-                             reinterpret_cast<Dart_Handle>(kernel_pgm), 0, 0);
+    if (script_reload_key != kUnsetThreadLocalKey) {
+      const char* script_source = reinterpret_cast<const char*>(
+          OSThread::GetThreadLocal(script_reload_key));
+      ASSERT(script_source != NULL);
+      OSThread::SetThreadLocal(script_reload_key, 0);
+      char* error = TestCase::CompileTestScriptWithDFE(urlstr, script_source,
+                                                       &kernel_pgm);
+      if (error != NULL) {
+        return Dart_NewApiError(error);
+      }
     } else {
-      return Dart_NewApiError(error);
+      ASSERT(kernel_reload_key != kUnsetThreadLocalKey);
+      kernel_pgm =
+          reinterpret_cast<void*>(OSThread::GetThreadLocal(kernel_reload_key));
+      ASSERT(kernel_pgm != NULL);
+      OSThread::SetThreadLocal(kernel_reload_key, 0);
     }
+    return Dart_LoadScript(url, Dart_Null(),
+                           reinterpret_cast<Dart_Handle>(kernel_pgm), 0, 0);
   }
   if (tag == Dart_kCanonicalizeUrl) {
     Dart_Handle library_url = Dart_LibraryUrl(library);
@@ -322,47 +349,50 @@
   return lib;
 }
 
-static Dart_Handle LoadTestScriptWithDFE(const char* script,
-                                         Dart_NativeEntryResolver resolver,
-                                         const char* lib_url,
-                                         bool finalize_classes) {
-  Dart_Handle url = NewString(lib_url);
-  Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
-  EXPECT_VALID(result);
-  void* kernel_pgm = NULL;
-  char* error =
-      TestCase::CompileTestScriptWithDFE(lib_url, script, &kernel_pgm);
-  if (error == NULL) {
-    Dart_Handle lib = Dart_LoadScript(
-        url, Dart_Null(), reinterpret_cast<Dart_Handle>(kernel_pgm), 0, 0);
-    DART_CHECK_VALID(lib);
-    result = Dart_SetNativeResolver(lib, resolver, NULL);
-    DART_CHECK_VALID(result);
-    if (finalize_classes) {
-      result = Dart_FinalizeLoading(false);
-      DART_CHECK_VALID(result);
-    }
-    return lib;
-  } else {
-    return Dart_NewApiError(error);
-  }
-}
-
 Dart_Handle TestCase::LoadTestScript(const char* script,
                                      Dart_NativeEntryResolver resolver,
                                      const char* lib_url,
                                      bool finalize_classes) {
-  if (!FLAG_use_dart_frontend) {
+  if (FLAG_use_dart_frontend) {
+    Dart_SourceFile sourcefiles[] = {
+        {OS::SCreate(Thread::Current()->zone(), "file:///%s", lib_url),
+         script}};
+    return LoadTestScriptWithDFE(sizeof(sourcefiles) / sizeof(Dart_SourceFile),
+                                 sourcefiles, resolver, finalize_classes);
+  } else {
     return LoadTestScriptWithVMParser(script, resolver, lib_url,
                                       finalize_classes);
-  } else {
-    Zone* zone = Thread::Current()->zone();
-    char* resolved_lib_url = OS::SCreate(zone, "file:///%s", lib_url);
-    return LoadTestScriptWithDFE(script, resolver, resolved_lib_url,
-                                 finalize_classes);
   }
 }
 
+Dart_Handle TestCase::LoadTestScriptWithDFE(int sourcefiles_count,
+                                            Dart_SourceFile sourcefiles[],
+                                            Dart_NativeEntryResolver resolver,
+                                            bool finalize,
+                                            bool incrementally) {
+  // First script is the main script.
+  Dart_Handle url = NewString(sourcefiles[0].uri);
+  Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
+  EXPECT_VALID(result);
+  void* kernel_pgm = NULL;
+  char* error = TestCase::CompileTestScriptWithDFE(
+      sourcefiles[0].uri, sourcefiles_count, sourcefiles, &kernel_pgm,
+      incrementally);
+  if (error != NULL) {
+    return Dart_NewApiError(error);
+  }
+  Dart_Handle lib = Dart_LoadScript(
+      url, Dart_Null(), reinterpret_cast<Dart_Handle>(kernel_pgm), 0, 0);
+  DART_CHECK_VALID(lib);
+  result = Dart_SetNativeResolver(lib, resolver, NULL);
+  DART_CHECK_VALID(result);
+  if (finalize) {
+    result = Dart_FinalizeLoading(false);
+    DART_CHECK_VALID(result);
+  }
+  return lib;
+}
+
 #ifndef PRODUCT
 
 void TestCase::SetReloadTestScript(const char* script) {
@@ -375,6 +405,16 @@
   OSThread::SetThreadLocal(script_reload_key, reinterpret_cast<uword>(script));
 }
 
+void TestCase::SetReloadTestKernel(const void* kernel) {
+  if (kernel_reload_key == kUnsetThreadLocalKey) {
+    kernel_reload_key = OSThread::CreateThreadLocal();
+  }
+  ASSERT(kernel_reload_key != kUnsetThreadLocalKey);
+  ASSERT(OSThread::GetThreadLocal(kernel_reload_key) == 0);
+  // Store the new script in TLS.
+  OSThread::SetThreadLocal(kernel_reload_key, reinterpret_cast<uword>(kernel));
+}
+
 Dart_Handle TestCase::TriggerReload() {
   Isolate* isolate = Isolate::Current();
   JSONStream js;
@@ -429,6 +469,28 @@
   return result;
 }
 
+Dart_Handle TestCase::ReloadTestKernel(const void* kernel) {
+  SetReloadTestKernel(kernel);
+
+  Dart_Handle result = TriggerReload();
+  if (Dart_IsError(result)) {
+    return result;
+  }
+
+  result = GetReloadErrorOrRootLibrary();
+
+  {
+    Thread* thread = Thread::Current();
+    TransitionNativeToVM transition(thread);
+    Isolate* isolate = thread->isolate();
+    if (isolate->reload_context() != NULL) {
+      isolate->DeleteReloadContext();
+    }
+  }
+
+  return result;
+}
+
 #endif  // !PRODUCT
 
 Dart_Handle TestCase::LoadCoreTestScript(const char* script,
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index e023ae9..1e2889b 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -229,6 +229,9 @@
 #endif  // defined(HOST_ARCH_ARM)
 #endif  // defined(TARGET_ARCH_{ARM, ARM64})
 
+#define ZONE_STR(FMT, ...)                                                     \
+  OS::SCreate(Thread::Current()->zone(), FMT, __VA_ARGS__)
+
 inline Dart_Handle NewString(const char* str) {
   return Dart_NewStringFromCString(str);
 }
@@ -286,11 +289,23 @@
 
   static char* CompileTestScriptWithDFE(const char* url,
                                         const char* source,
-                                        void** kernel_pgm);
+                                        void** kernel_pgm,
+                                        bool incrementally = false);
+  static char* CompileTestScriptWithDFE(const char* url,
+                                        int sourcefiles_count,
+                                        Dart_SourceFile sourcefiles[],
+                                        void** kernel_pgm,
+                                        bool incrementally = false);
   static Dart_Handle LoadTestScript(const char* script,
                                     Dart_NativeEntryResolver resolver,
                                     const char* lib_uri = USER_TEST_URI,
                                     bool finalize = true);
+  static Dart_Handle LoadTestScriptWithDFE(
+      int sourcefiles_count,
+      Dart_SourceFile sourcefiles[],
+      Dart_NativeEntryResolver resolver = NULL,
+      bool finalize = true,
+      bool incrementally = false);
   static Dart_Handle LoadCoreTestScript(const char* script,
                                         Dart_NativeEntryResolver resolver);
   static Dart_Handle lib();
@@ -311,6 +326,8 @@
 
   // Sets |script| to be the source used at next reload.
   static void SetReloadTestScript(const char* script);
+  static void SetReloadTestKernel(const void* kernel);
+
   // Initiates the reload.
   static Dart_Handle TriggerReload();
   // Gets the result of a reload.
@@ -318,6 +335,7 @@
 
   // Helper function which reloads the current isolate using |script|.
   static Dart_Handle ReloadTestScript(const char* script);
+  static Dart_Handle ReloadTestKernel(const void* kernel);
 
   static void AddTestLib(const char* url, const char* source);
   static const char* GetTestLib(const char* url);
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni
new file mode 100644
index 0000000..f8231c3
--- /dev/null
+++ b/runtime/vm/vm_sources.gni
@@ -0,0 +1,561 @@
+# 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.
+
+# This file contains all sources (vm and tests) for the dart virtual machine.
+# Unit test files need to have a "_test" suffix appended to the name.
+vm_sources = [
+  "allocation.cc",
+  "allocation.h",
+  "aot_optimizer.cc",
+  "aot_optimizer.h",
+  "assembler.cc",
+  "assembler.h",
+  "assembler_arm.cc",
+  "assembler_arm.h",
+  "assembler_arm64.cc",
+  "assembler_arm64.h",
+  "assembler_dbc.cc",
+  "assembler_dbc.h",
+  "assembler_ia32.cc",
+  "assembler_ia32.h",
+  "assembler_x64.cc",
+  "assembler_x64.h",
+  "ast.cc",
+  "ast.h",
+  "ast_printer.cc",
+  "ast_printer.h",
+  "ast_transformer.cc",
+  "ast_transformer.h",
+  "atomic.h",
+  "atomic_android.h",
+  "atomic_fuchsia.h",
+  "atomic_linux.h",
+  "atomic_macos.h",
+  "atomic_win.h",
+  "base_isolate.h",
+  "become.h",
+  "become.cc",
+  "bit_vector.cc",
+  "bit_vector.h",
+  "bitfield.h",
+  "bitmap.cc",
+  "bitmap.h",
+  "block_scheduler.cc",
+  "block_scheduler.h",
+  "boolfield.h",
+  "bootstrap.h",
+  "bootstrap_natives.cc",
+  "bootstrap_natives.h",
+  "branch_optimizer.cc",
+  "branch_optimizer.h",
+  "cha.cc",
+  "cha.h",
+  "class_finalizer.cc",
+  "class_finalizer.h",
+  "class_table.cc",
+  "class_table.h",
+  "clustered_snapshot.cc",
+  "clustered_snapshot.h",
+  "code_descriptors.cc",
+  "code_descriptors.h",
+  "code_observers.cc",
+  "code_observers.h",
+  "code_patcher.cc",
+  "code_patcher.h",
+  "code_patcher_arm.cc",
+  "code_patcher_arm64.cc",
+  "code_patcher_dbc.cc",
+  "code_patcher_ia32.cc",
+  "code_patcher_x64.cc",
+  "compilation_trace.cc",
+  "compilation_trace.h",
+  "compiler.cc",
+  "compiler.h",
+  "compiler_stats.cc",
+  "compiler_stats.h",
+  "constant_propagator.h",
+  "constant_propagator.cc",
+  "constants_arm.h",
+  "constants_arm64.h",
+  "constants_ia32.h",
+  "constants_x64.h",
+  "cpu.h",
+  "cpu_arm.cc",
+  "cpu_arm64.cc",
+  "cpu_dbc.cc",
+  "cpu_ia32.cc",
+  "cpu_x64.cc",
+  "cpuid.h",
+  "cpuid.cc",
+  "cpuinfo.h",
+  "cpuinfo_android.cc",
+  "cpuinfo_fuchsia.cc",
+  "cpuinfo_linux.cc",
+  "cpuinfo_macos.cc",
+  "cpuinfo_win.cc",
+  "dart.cc",
+  "dart.h",
+  "dart_api_impl.h",
+  "dart_api_message.cc",
+  "dart_api_message.h",
+  "dart_api_state.cc",
+  "dart_api_state.h",
+  "dart_entry.cc",
+  "dart_entry.h",
+  "datastream.h",
+  "debugger.cc",
+  "debugger.h",
+  "debugger_arm.cc",
+  "debugger_arm64.cc",
+  "debugger_dbc.cc",
+  "debugger_ia32.cc",
+  "debugger_x64.cc",
+  "deferred_objects.cc",
+  "deferred_objects.h",
+  "deopt_instructions.cc",
+  "deopt_instructions.h",
+  "disassembler.cc",
+  "disassembler.h",
+  "disassembler_arm.cc",
+  "disassembler_arm64.cc",
+  "disassembler_dbc.cc",
+  "disassembler_ia32.cc",
+  "disassembler_x64.cc",
+  "double_conversion.cc",
+  "double_conversion.h",
+  "double_internals.h",
+  "dwarf.cc",
+  "dwarf.h",
+  "exceptions.cc",
+  "exceptions.h",
+  "fixed_cache.h",
+  "flag_list.h",
+  "flags.cc",
+  "flags.h",
+  "flow_graph.cc",
+  "flow_graph.h",
+  "flow_graph_allocator.cc",
+  "flow_graph_allocator.h",
+  "flow_graph_builder.cc",
+  "flow_graph_builder.h",
+  "flow_graph_compiler.cc",
+  "flow_graph_compiler.h",
+  "flow_graph_compiler_arm.cc",
+  "flow_graph_compiler_arm64.cc",
+  "flow_graph_compiler_dbc.cc",
+  "flow_graph_compiler_ia32.cc",
+  "flow_graph_compiler_x64.cc",
+  "flow_graph_inliner.cc",
+  "flow_graph_inliner.h",
+  "flow_graph_range_analysis.cc",
+  "flow_graph_range_analysis.h",
+  "flow_graph_type_propagator.cc",
+  "flow_graph_type_propagator.h",
+  "freelist.cc",
+  "freelist.h",
+  "gc_marker.cc",
+  "gc_marker.h",
+  "gc_sweeper.cc",
+  "gc_sweeper.h",
+  "gdb_helpers.cc",
+  "globals.h",
+  "growable_array.h",
+  "handles.cc",
+  "handles.h",
+  "handles_impl.h",
+  "hash_map.h",
+  "hash_table.h",
+  "heap.cc",
+  "heap.h",
+  "il_printer.cc",
+  "il_printer.h",
+  "instructions.h",
+  "instructions_arm.cc",
+  "instructions_arm.h",
+  "instructions_arm64.cc",
+  "instructions_arm64.h",
+  "instructions_dbc.cc",
+  "instructions_dbc.h",
+  "instructions_ia32.cc",
+  "instructions_ia32.h",
+  "instructions_x64.cc",
+  "instructions_x64.h",
+  "intermediate_language.cc",
+  "intermediate_language.h",
+  "intermediate_language_arm.cc",
+  "intermediate_language_arm64.cc",
+  "intermediate_language_dbc.cc",
+  "intermediate_language_ia32.cc",
+  "intermediate_language_x64.cc",
+  "intrinsifier.cc",
+  "intrinsifier.h",
+  "intrinsifier_arm.cc",
+  "intrinsifier_arm64.cc",
+  "intrinsifier_dbc.cc",
+  "intrinsifier_ia32.cc",
+  "intrinsifier_x64.cc",
+  "isolate.cc",
+  "isolate.h",
+  "isolate_reload.cc",
+  "isolate_reload.h",
+  "jit_optimizer.cc",
+  "jit_optimizer.h",
+  "json_parser.h",
+  "json_stream.h",
+  "json_stream.cc",
+  "kernel_isolate.cc",
+  "kernel_isolate.h",
+  "locations.cc",
+  "locations.h",
+  "lockers.cc",
+  "lockers.h",
+  "log.cc",
+  "log.h",
+  "longjump.cc",
+  "longjump.h",
+  "malloc_hooks_jemalloc.cc",
+  "malloc_hooks_tcmalloc.cc",
+  "malloc_hooks_arm.cc",
+  "malloc_hooks_arm64.cc",
+  "malloc_hooks_ia32.cc",
+  "malloc_hooks_x64.cc",
+  "malloc_hooks.h",
+  "malloc_hooks_unsupported.cc",
+  "megamorphic_cache_table.cc",
+  "megamorphic_cache_table.h",
+  "memory_region.cc",
+  "memory_region.h",
+  "message.cc",
+  "message.h",
+  "message_handler.cc",
+  "message_handler.h",
+  "method_recognizer.cc",
+  "method_recognizer.h",
+  "metrics.cc",
+  "metrics.h",
+  "native_arguments.h",
+  "native_entry.cc",
+  "native_entry.h",
+  "native_message_handler.cc",
+  "native_message_handler.h",
+  "native_symbol.h",
+  "native_symbol_android.cc",
+  "native_symbol_fuchsia.cc",
+  "native_symbol_linux.cc",
+  "native_symbol_macos.cc",
+  "native_symbol_win.cc",
+  "object.cc",
+  "object.h",
+  "object_graph.cc",
+  "object_graph.h",
+  "object_id_ring.cc",
+  "object_id_ring.h",
+  "object_reload.cc",
+  "object_service.cc",
+  "object_set.h",
+  "object_store.cc",
+  "object_store.h",
+  "optimizer.cc",
+  "optimizer.h",
+  "os.h",
+  "os_android.cc",
+  "os_fuchsia.cc",
+  "os_linux.cc",
+  "os_macos.cc",
+  "os_thread.cc",
+  "os_thread.h",
+  "os_thread_android.cc",
+  "os_thread_android.h",
+  "os_thread_fuchsia.cc",
+  "os_thread_fuchsia.h",
+  "os_thread_linux.cc",
+  "os_thread_linux.h",
+  "os_thread_macos.cc",
+  "os_thread_macos.h",
+  "os_thread_win.cc",
+  "os_thread_win.h",
+  "os_win.cc",
+  "pages.cc",
+  "pages.h",
+  "parser.cc",
+  "parser.h",
+  "port.cc",
+  "port.h",
+  "precompiler.cc",
+  "precompiler.h",
+  "program_visitor.cc",
+  "program_visitor.h",
+  "kernel.h",
+  "kernel.cc",
+  "kernel_binary.cc",
+  "kernel_binary.h",
+  "kernel_binary_flowgraph.cc",
+  "kernel_binary_flowgraph.h",
+  "kernel_to_il.cc",
+  "kernel_to_il.h",
+  "kernel_reader.h",
+  "kernel_reader.cc",
+  "proccpuinfo.cc",
+  "proccpuinfo.h",
+  "profiler_service.cc",
+  "profiler_service.h",
+  "profiler.cc",
+  "profiler.h",
+  "random.cc",
+  "random.h",
+  "raw_object.cc",
+  "raw_object.h",
+  "raw_object_snapshot.cc",
+  "redundancy_elimination.cc",
+  "redundancy_elimination.h",
+  "regexp.cc",
+  "regexp.h",
+  "regexp_assembler.cc",
+  "regexp_assembler.h",
+  "regexp_assembler_bytecode.cc",
+  "regexp_assembler_bytecode.h",
+  "regexp_assembler_bytecode_inl.h",
+  "regexp_assembler_ir.cc",
+  "regexp_assembler_ir.h",
+  "regexp_ast.cc",
+  "regexp_ast.h",
+  "regexp_bytecodes.h",
+  "regexp_interpreter.cc",
+  "regexp_interpreter.h",
+  "regexp_parser.cc",
+  "regexp_parser.h",
+  "report.cc",
+  "report.h",
+  "resolver.cc",
+  "resolver.h",
+  "reusable_handles.h",
+  "ring_buffer.h",
+  "runtime_entry.h",
+  "runtime_entry_list.h",
+  "runtime_entry_arm.cc",
+  "runtime_entry_arm64.cc",
+  "runtime_entry_dbc.cc",
+  "runtime_entry_ia32.cc",
+  "runtime_entry.cc",
+  "runtime_entry_x64.cc",
+  "safepoint.cc",
+  "safepoint.h",
+  "scanner.cc",
+  "scanner.h",
+  "scavenger.cc",
+  "scavenger.h",
+  "scope_timer.h",
+  "scopes.cc",
+  "scopes.h",
+  "service.cc",
+  "service.h",
+  "service_event.cc",
+  "service_event.h",
+  "service_isolate.cc",
+  "service_isolate.h",
+  "signal_handler_android.cc",
+  "signal_handler_fuchsia.cc",
+  "signal_handler_linux.cc",
+  "signal_handler_macos.cc",
+  "signal_handler_win.cc",
+  "signal_handler.h",
+  "simulator.h",
+  "simulator_arm.cc",
+  "simulator_arm.h",
+  "simulator_arm64.cc",
+  "simulator_arm64.h",
+  "simulator_dbc.cc",
+  "simulator_dbc.h",
+  "snapshot.cc",
+  "snapshot.h",
+  "snapshot_ids.h",
+  "source_report.cc",
+  "source_report.h",
+  "spaces.h",
+  "stack_frame.cc",
+  "stack_frame.h",
+  "stack_frame_arm.h",
+  "stack_frame_arm64.h",
+  "stack_frame_ia32.h",
+  "stack_frame_x64.h",
+  "stack_trace.cc",
+  "stack_trace.h",
+  "store_buffer.cc",
+  "store_buffer.h",
+  "stub_code.cc",
+  "stub_code.h",
+  "stub_code_arm.cc",
+  "stub_code_arm64.cc",
+  "stub_code_dbc.cc",
+  "stub_code_ia32.cc",
+  "stub_code_x64.cc",
+  "symbols.cc",
+  "symbols.h",
+  "tags.cc",
+  "tags.h",
+  "thread.cc",
+  "thread.h",
+  "thread_barrier.h",
+  "thread_interrupter.cc",
+  "thread_interrupter.h",
+  "thread_interrupter_android.cc",
+  "thread_interrupter_fuchsia.cc",
+  "thread_interrupter_linux.cc",
+  "thread_interrupter_macos.cc",
+  "thread_interrupter_win.cc",
+  "thread_pool.cc",
+  "thread_pool.h",
+  "thread_registry.cc",
+  "thread_registry.h",
+  "timeline.cc",
+  "timeline.h",
+  "timeline_analysis.cc",
+  "timeline_analysis.h",
+  "timeline_android.cc",
+  "timeline_fuchsia.cc",
+  "timeline_linux.cc",
+  "timeline_macos.cc",
+  "timeline_win.cc",
+  "timer.cc",
+  "timer.h",
+  "token.cc",
+  "token.h",
+  "token_position.cc",
+  "token_position.h",
+  "type_table.h",
+  "unibrow.cc",
+  "unibrow.h",
+  "unibrow-inl.h",
+  "unicode.cc",
+  "unicode.h",
+  "unicode_data.cc",
+  "uri.cc",
+  "uri.h",
+  "verifier.cc",
+  "verifier.h",
+  "virtual_memory.cc",
+  "virtual_memory.h",
+  "virtual_memory_android.cc",
+  "virtual_memory_fuchsia.cc",
+  "virtual_memory_linux.cc",
+  "virtual_memory_macos.cc",
+  "virtual_memory_win.cc",
+  "visitor.h",
+  "weak_code.cc",
+  "weak_code.h",
+  "weak_table.cc",
+  "weak_table.h",
+  "zone.cc",
+  "zone.h",
+  "zone_text_buffer.cc",
+  "zone_text_buffer.h",
+]
+
+vm_sources_tests = [
+  "allocation_test.cc",
+  "assembler_arm_test.cc",
+  "assembler_arm64_test.cc",
+  "assembler_dbc_test.cc",
+  "assembler_ia32_test.cc",
+  "assembler_test.cc",
+  "assembler_x64_test.cc",
+  "assert_test.cc",
+  "ast_printer_test.cc",
+  "ast_test.cc",
+  "atomic_test.cc",
+  "benchmark_test.cc",
+  "benchmark_test.h",
+  "bigint_test.cc",
+  "bit_set_test.cc",
+  "bit_vector_test.cc",
+  "bitfield_test.cc",
+  "bitmap_test.cc",
+  "boolfield_test.cc",
+  "cha_test.cc",
+  "class_finalizer_test.cc",
+  "code_descriptors_test.cc",
+  "code_generator_test.cc",
+  "code_patcher_arm_test.cc",
+  "code_patcher_arm64_test.cc",
+  "code_patcher_ia32_test.cc",
+  "code_patcher_x64_test.cc",
+  "compiler_test.cc",
+  "cpu_test.cc",
+  "cpuinfo_test.cc",
+  "custom_isolate_test.cc",
+  "dart_api_impl_test.cc",
+  "dart_entry_test.cc",
+  "debugger_test.cc",
+  "debugger_api_impl_test.cc",
+  "disassembler_test.cc",
+  "exceptions_test.cc",
+  "find_code_object_test.cc",
+  "fixed_cache_test.cc",
+  "flags_test.cc",
+  "flow_graph_builder_test.cc",
+  "flow_graph_range_analysis_test.cc",
+  "freelist_test.cc",
+  "growable_array_test.cc",
+  "guard_field_test.cc",
+  "handles_test.cc",
+  "hash_map_test.cc",
+  "hash_table_test.cc",
+  "heap_test.cc",
+  "instructions_arm_test.cc",
+  "instructions_arm64_test.cc",
+  "instructions_ia32_test.cc",
+  "instructions_x64_test.cc",
+  "intermediate_language_test.cc",
+  "isolate_reload_test.cc",
+  "isolate_test.cc",
+  "json_test.cc",
+  "log_test.cc",
+  "longjump_test.cc",
+  "malloc_hooks_test.cc",
+  "memory_region_test.cc",
+  "message_handler_test.cc",
+  "message_test.cc",
+  "metrics_test.cc",
+  "native_entry_test.cc",
+  "native_entry_test.h",
+  "object_arm_test.cc",
+  "object_arm64_test.cc",
+  "object_dbc_test.cc",
+  "object_graph_test.cc",
+  "object_ia32_test.cc",
+  "object_id_ring_test.cc",
+  "object_store_test.cc",
+  "object_test.cc",
+  "object_x64_test.cc",
+  "os_test.cc",
+  "pages_test.cc",
+  "parser_test.cc",
+  "port_test.cc",
+  "profiler_test.cc",
+  "regexp_test.cc",
+  "resolver_test.cc",
+  "ring_buffer_test.cc",
+  "scanner_test.cc",
+  "scavenger_test.cc",
+  "scopes_test.cc",
+  "service_test.cc",
+  "snapshot_test.cc",
+  "source_report_test.cc",
+  "stack_frame_test.cc",
+  "stub_code_arm_test.cc",
+  "stub_code_arm64_test.cc",
+  "stub_code_ia32_test.cc",
+  "stub_code_x64_test.cc",
+  "thread_barrier_test.cc",
+  "thread_pool_test.cc",
+  "thread_test.cc",
+  "timeline_test.cc",
+  "unicode_test.cc",
+  "unit_test.cc",
+  "unit_test.h",
+  "uri_test.cc",
+  "utils_test.cc",
+  "virtual_memory_test.cc",
+  "zone_test.cc",
+]
diff --git a/runtime/vm/vm_sources.gypi b/runtime/vm/vm_sources.gypi
deleted file mode 100644
index 3014ab7..0000000
--- a/runtime/vm/vm_sources.gypi
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources (vm and tests) for the dart virtual machine.
-# Unit test files need to have a '_test' suffix appended to the name.
-{
-  'sources': [
-    'allocation.cc',
-    'allocation.h',
-    'allocation_test.cc',
-    'aot_optimizer.cc',
-    'aot_optimizer.h',
-    'assembler.cc',
-    'assembler.h',
-    'assembler_arm.cc',
-    'assembler_arm.h',
-    'assembler_arm_test.cc',
-    'assembler_arm64.cc',
-    'assembler_arm64.h',
-    'assembler_arm64_test.cc',
-    'assembler_dbc.cc',
-    'assembler_dbc.h',
-    'assembler_dbc_test.cc',
-    'assembler_ia32.cc',
-    'assembler_ia32.h',
-    'assembler_ia32_test.cc',
-    'assembler_test.cc',
-    'assembler_x64.cc',
-    'assembler_x64.h',
-    'assembler_x64_test.cc',
-    'assert_test.cc',
-    'ast.cc',
-    'ast.h',
-    'ast_printer.cc',
-    'ast_printer.h',
-    'ast_printer_test.cc',
-    'ast_test.cc',
-    'ast_transformer.cc',
-    'ast_transformer.h',
-    'atomic.h',
-    'atomic_android.h',
-    'atomic_fuchsia.h',
-    'atomic_linux.h',
-    'atomic_macos.h',
-    'atomic_simulator.h',
-    'atomic_test.cc',
-    'atomic_win.h',
-    'base_isolate.h',
-    'become.h',
-    'become.cc',
-    'benchmark_test.cc',
-    'benchmark_test.h',
-    'bigint_test.cc',
-    'bit_set_test.cc',
-    'bit_vector.cc',
-    'bit_vector.h',
-    'bit_vector_test.cc',
-    'bitfield.h',
-    'bitfield_test.cc',
-    'bitmap.cc',
-    'bitmap.h',
-    'bitmap_test.cc',
-    'block_scheduler.cc',
-    'block_scheduler.h',
-    'boolfield.h',
-    'boolfield_test.cc',
-    'bootstrap.h',
-    'bootstrap_natives.cc',
-    'bootstrap_natives.h',
-    'branch_optimizer.cc',
-    'branch_optimizer.h',
-    'cha.cc',
-    'cha.h',
-    'cha_test.cc',
-    'class_finalizer.cc',
-    'class_finalizer.h',
-    'class_finalizer_test.cc',
-    'class_table.cc',
-    'class_table.h',
-    'clustered_snapshot.cc',
-    'clustered_snapshot.h',
-    'code_descriptors.cc',
-    'code_descriptors.h',
-    'code_descriptors_test.cc',
-    'code_generator_test.cc',
-    'code_observers.cc',
-    'code_observers.h',
-    'code_patcher.cc',
-    'code_patcher.h',
-    'code_patcher_arm.cc',
-    'code_patcher_arm_test.cc',
-    'code_patcher_arm64.cc',
-    'code_patcher_arm64_test.cc',
-    'code_patcher_dbc.cc',
-    'code_patcher_ia32.cc',
-    'code_patcher_ia32_test.cc',
-    'code_patcher_x64.cc',
-    'code_patcher_x64_test.cc',
-    'compilation_trace.cc',
-    'compilation_trace.h',
-    'compiler.cc',
-    'compiler.h',
-    'compiler_stats.cc',
-    'compiler_stats.h',
-    'compiler_test.cc',
-    'constant_propagator.h',
-    'constant_propagator.cc',
-    'constants_arm.h',
-    'constants_arm64.h',
-    'constants_ia32.h',
-    'constants_x64.h',
-    'cpu.h',
-    'cpu_arm.cc',
-    'cpu_arm64.cc',
-    'cpu_dbc.cc',
-    'cpu_ia32.cc',
-    'cpu_test.cc',
-    'cpu_x64.cc',
-    'cpuid.h',
-    'cpuid.cc',
-    'cpuinfo.h',
-    'cpuinfo_android.cc',
-    'cpuinfo_fuchsia.cc',
-    'cpuinfo_linux.cc',
-    'cpuinfo_macos.cc',
-    'cpuinfo_test.cc',
-    'cpuinfo_win.cc',
-    'custom_isolate_test.cc',
-    'dart.cc',
-    'dart.h',
-    'dart_api_impl.h',
-    'dart_api_impl_test.cc',
-    'dart_api_message.cc',
-    'dart_api_message.h',
-    'dart_api_state.cc',
-    'dart_api_state.h',
-    'dart_entry.cc',
-    'dart_entry.h',
-    'dart_entry_test.cc',
-    'datastream.h',
-    'debugger.cc',
-    'debugger_test.cc',
-    'debugger.h',
-    'debugger_api_impl_test.cc',
-    'debugger_arm.cc',
-    'debugger_arm64.cc',
-    'debugger_dbc.cc',
-    'debugger_ia32.cc',
-    'debugger_x64.cc',
-    'deferred_objects.cc',
-    'deferred_objects.h',
-    'deopt_instructions.cc',
-    'deopt_instructions.h',
-    'disassembler.cc',
-    'disassembler.h',
-    'disassembler_arm.cc',
-    'disassembler_arm64.cc',
-    'disassembler_dbc.cc',
-    'disassembler_ia32.cc',
-    'disassembler_test.cc',
-    'disassembler_x64.cc',
-    'double_conversion.cc',
-    'double_conversion.h',
-    'double_internals.h',
-    'dwarf.cc',
-    'dwarf.h',
-    'exceptions.cc',
-    'exceptions.h',
-    'exceptions_test.cc',
-    'find_code_object_test.cc',
-    'fixed_cache.h',
-    'fixed_cache_test.cc',
-    'flag_list.h',
-    'flags.cc',
-    'flags.h',
-    'flags_test.cc',
-    'flow_graph.cc',
-    'flow_graph.h',
-    'flow_graph_allocator.cc',
-    'flow_graph_allocator.h',
-    'flow_graph_builder.cc',
-    'flow_graph_builder.h',
-    'flow_graph_builder_test.cc',
-    'flow_graph_compiler.cc',
-    'flow_graph_compiler.h',
-    'flow_graph_compiler_arm.cc',
-    'flow_graph_compiler_arm64.cc',
-    'flow_graph_compiler_dbc.cc',
-    'flow_graph_compiler_ia32.cc',
-    'flow_graph_compiler_x64.cc',
-    'flow_graph_inliner.cc',
-    'flow_graph_inliner.h',
-    'flow_graph_range_analysis.cc',
-    'flow_graph_range_analysis.h',
-    'flow_graph_range_analysis_test.cc',
-    'flow_graph_type_propagator.cc',
-    'flow_graph_type_propagator.h',
-    'freelist.cc',
-    'freelist.h',
-    'freelist_test.cc',
-    'gc_marker.cc',
-    'gc_marker.h',
-    'gc_sweeper.cc',
-    'gc_sweeper.h',
-    'gdb_helpers.cc',
-    'globals.h',
-    'growable_array.h',
-    'growable_array_test.cc',
-    'guard_field_test.cc',
-    'handles.cc',
-    'handles.h',
-    'handles_impl.h',
-    'handles_test.cc',
-    'hash_map.h',
-    'hash_map_test.cc',
-    'hash_table.h',
-    'hash_table_test.cc',
-    'heap.cc',
-    'heap.h',
-    'heap_test.cc',
-    'il_printer.cc',
-    'il_printer.h',
-    'instructions.h',
-    'instructions_arm.cc',
-    'instructions_arm.h',
-    'instructions_arm_test.cc',
-    'instructions_arm64.cc',
-    'instructions_arm64.h',
-    'instructions_arm64_test.cc',
-    'instructions_dbc.cc',
-    'instructions_dbc.h',
-    'instructions_ia32.cc',
-    'instructions_ia32.h',
-    'instructions_ia32_test.cc',
-    'instructions_x64.cc',
-    'instructions_x64.h',
-    'instructions_x64_test.cc',
-    'intermediate_language.cc',
-    'intermediate_language.h',
-    'intermediate_language_arm.cc',
-    'intermediate_language_arm64.cc',
-    'intermediate_language_dbc.cc',
-    'intermediate_language_ia32.cc',
-    'intermediate_language_test.cc',
-    'intermediate_language_x64.cc',
-    'intrinsifier.cc',
-    'intrinsifier.h',
-    'intrinsifier_arm.cc',
-    'intrinsifier_arm64.cc',
-    'intrinsifier_dbc.cc',
-    'intrinsifier_ia32.cc',
-    'intrinsifier_x64.cc',
-    'isolate.cc',
-    'isolate.h',
-    'isolate_reload.cc',
-    'isolate_reload.h',
-    'isolate_reload_test.cc',
-    'isolate_test.cc',
-    'jit_optimizer.cc',
-    'jit_optimizer.h',
-    'json_parser.h',
-    'json_stream.h',
-    'json_stream.cc',
-    'json_test.cc',
-    'kernel_isolate.cc',
-    'kernel_isolate.h',
-    'locations.cc',
-    'locations.h',
-    'lockers.cc',
-    'lockers.h',
-    'log_test.cc',
-    'log.cc',
-    'log.h',
-    'longjump.cc',
-    'longjump.h',
-    'longjump_test.cc',
-    'malloc_hooks_jemalloc.cc',
-    'malloc_hooks_tcmalloc.cc',
-    'malloc_hooks_arm.cc',
-    'malloc_hooks_arm64.cc',
-    'malloc_hooks_ia32.cc',
-    'malloc_hooks_x64.cc',
-    'malloc_hooks.h',
-    'malloc_hooks_test.cc',
-    'malloc_hooks_unsupported.cc',
-    'megamorphic_cache_table.cc',
-    'megamorphic_cache_table.h',
-    'memory_region.cc',
-    'memory_region.h',
-    'memory_region_test.cc',
-    'message.cc',
-    'message.h',
-    'message_handler.cc',
-    'message_handler.h',
-    'message_handler_test.cc',
-    'message_test.cc',
-    'method_recognizer.cc',
-    'method_recognizer.h',
-    'metrics.cc',
-    'metrics.h',
-    'metrics_test.cc',
-    'native_arguments.h',
-    'native_entry.cc',
-    'native_entry.h',
-    'native_entry_test.cc',
-    'native_entry_test.h',
-    'native_message_handler.cc',
-    'native_message_handler.h',
-    'native_symbol.h',
-    'native_symbol_android.cc',
-    'native_symbol_fuchsia.cc',
-    'native_symbol_linux.cc',
-    'native_symbol_macos.cc',
-    'native_symbol_win.cc',
-    'object.cc',
-    'object.h',
-    'object_arm_test.cc',
-    'object_arm64_test.cc',
-    'object_dbc_test.cc',
-    'object_graph.cc',
-    'object_graph.h',
-    'object_graph_test.cc',
-    'object_ia32_test.cc',
-    'object_id_ring.cc',
-    'object_id_ring.h',
-    'object_id_ring_test.cc',
-    'object_reload.cc',
-    'object_service.cc',
-    'object_set.h',
-    'object_store.cc',
-    'object_store.h',
-    'object_store_test.cc',
-    'object_test.cc',
-    'object_x64_test.cc',
-    'optimizer.cc',
-    'optimizer.h',
-    'os.h',
-    'os_android.cc',
-    'os_fuchsia.cc',
-    'os_linux.cc',
-    'os_macos.cc',
-    'os_test.cc',
-    'os_thread.cc',
-    'os_thread.h',
-    'os_thread_android.cc',
-    'os_thread_android.h',
-    'os_thread_fuchsia.cc',
-    'os_thread_fuchsia.h',
-    'os_thread_linux.cc',
-    'os_thread_linux.h',
-    'os_thread_macos.cc',
-    'os_thread_macos.h',
-    'os_thread_win.cc',
-    'os_thread_win.h',
-    'os_win.cc',
-    'pages.cc',
-    'pages.h',
-    'pages_test.cc',
-    'parser.cc',
-    'parser.h',
-    'parser_test.cc',
-    'port.cc',
-    'port.h',
-    'port_test.cc',
-    'precompiler.cc',
-    'precompiler.h',
-    'program_visitor.cc',
-    'program_visitor.h',
-    'kernel.h',
-    'kernel.cc',
-    'kernel_binary.cc',
-    'kernel_binary.h',
-    'kernel_binary_flowgraph.cc',
-    'kernel_binary_flowgraph.h',
-    'kernel_to_il.cc',
-    'kernel_to_il.h',
-    'kernel_reader.h',
-    'kernel_reader.cc',
-    'proccpuinfo.cc',
-    'proccpuinfo.h',
-    'profiler_service.cc',
-    'profiler_service.h',
-    'profiler_test.cc',
-    'profiler.cc',
-    'profiler.h',
-    'random.cc',
-    'random.h',
-    'raw_object.cc',
-    'raw_object.h',
-    'raw_object_snapshot.cc',
-    'redundancy_elimination.cc',
-    'redundancy_elimination.h',
-    'regexp.cc',
-    'regexp.h',
-    'regexp_assembler.cc',
-    'regexp_assembler.h',
-    'regexp_assembler_bytecode.cc',
-    'regexp_assembler_bytecode.h',
-    'regexp_assembler_bytecode_inl.h',
-    'regexp_assembler_ir.cc',
-    'regexp_assembler_ir.h',
-    'regexp_ast.cc',
-    'regexp_ast.h',
-    'regexp_bytecodes.h',
-    'regexp_interpreter.cc',
-    'regexp_interpreter.h',
-    'regexp_parser.cc',
-    'regexp_parser.h',
-    'regexp_test.cc',
-    'report.cc',
-    'report.h',
-    'resolver.cc',
-    'resolver.h',
-    'resolver_test.cc',
-    'reusable_handles.h',
-    'ring_buffer.h',
-    'ring_buffer_test.cc',
-    'runtime_entry.h',
-    'runtime_entry_list.h',
-    'runtime_entry_arm.cc',
-    'runtime_entry_arm64.cc',
-    'runtime_entry_dbc.cc',
-    'runtime_entry_ia32.cc',
-    'runtime_entry.cc',
-    'runtime_entry_x64.cc',
-    'safepoint.cc',
-    'safepoint.h',
-    'scanner.cc',
-    'scanner.h',
-    'scanner_test.cc',
-    'scavenger.cc',
-    'scavenger.h',
-    'scavenger_test.cc',
-    'scope_timer.h',
-    'scopes.cc',
-    'scopes.h',
-    'scopes_test.cc',
-    'service.cc',
-    'service.h',
-    'service_event.cc',
-    'service_event.h',
-    'service_isolate.cc',
-    'service_isolate.h',
-    'service_test.cc',
-    'signal_handler_android.cc',
-    'signal_handler_fuchsia.cc',
-    'signal_handler_linux.cc',
-    'signal_handler_macos.cc',
-    'signal_handler_win.cc',
-    'signal_handler.h',
-    'simulator.h',
-    'simulator_arm.cc',
-    'simulator_arm.h',
-    'simulator_arm64.cc',
-    'simulator_arm64.h',
-    'simulator_dbc.cc',
-    'simulator_dbc.h',
-    'snapshot.cc',
-    'snapshot.h',
-    'snapshot_ids.h',
-    'snapshot_test.cc',
-    'source_report.cc',
-    'source_report.h',
-    'source_report_test.cc',
-    'spaces.h',
-    'stack_frame.cc',
-    'stack_frame.h',
-    'stack_frame_arm.h',
-    'stack_frame_arm64.h',
-    'stack_frame_ia32.h',
-    'stack_frame_test.cc',
-    'stack_frame_x64.h',
-    'stack_trace.cc',
-    'stack_trace.h',
-    'store_buffer.cc',
-    'store_buffer.h',
-    'stub_code.cc',
-    'stub_code.h',
-    'stub_code_arm.cc',
-    'stub_code_arm_test.cc',
-    'stub_code_arm64.cc',
-    'stub_code_arm64_test.cc',
-    'stub_code_dbc.cc',
-    'stub_code_ia32.cc',
-    'stub_code_ia32_test.cc',
-    'stub_code_x64.cc',
-    'stub_code_x64_test.cc',
-    'symbols.cc',
-    'symbols.h',
-    'tags.cc',
-    'tags.h',
-    'thread.cc',
-    'thread.h',
-    'thread_barrier.h',
-    'thread_barrier_test.cc',
-    'thread_interrupter.cc',
-    'thread_interrupter.h',
-    'thread_interrupter_android.cc',
-    'thread_interrupter_fuchsia.cc',
-    'thread_interrupter_linux.cc',
-    'thread_interrupter_macos.cc',
-    'thread_interrupter_win.cc',
-    'thread_pool.cc',
-    'thread_pool.h',
-    'thread_pool_test.cc',
-    'thread_registry.cc',
-    'thread_registry.h',
-    'thread_test.cc',
-    'timeline.cc',
-    'timeline.h',
-    'timeline_analysis.cc',
-    'timeline_analysis.h',
-    'timeline_android.cc',
-    'timeline_fuchsia.cc',
-    'timeline_linux.cc',
-    'timeline_macos.cc',
-    'timeline_test.cc',
-    'timeline_win.cc',
-    'timer.cc',
-    'timer.h',
-    'token.cc',
-    'token.h',
-    'token_position.cc',
-    'token_position.h',
-    'type_table.h',
-    'unibrow.cc',
-    'unibrow.h',
-    'unibrow-inl.h',
-    'unicode.cc',
-    'unicode.h',
-    'unicode_data.cc',
-    'unicode_test.cc',
-    'unit_test.cc',
-    'unit_test.h',
-    'uri.cc',
-    'uri.h',
-    'uri_test.cc',
-    'utils_test.cc',
-    'verifier.cc',
-    'verifier.h',
-    'virtual_memory.cc',
-    'virtual_memory.h',
-    'virtual_memory_android.cc',
-    'virtual_memory_fuchsia.cc',
-    'virtual_memory_linux.cc',
-    'virtual_memory_macos.cc',
-    'virtual_memory_test.cc',
-    'virtual_memory_win.cc',
-    'visitor.h',
-    'weak_code.cc',
-    'weak_code.h',
-    'weak_table.cc',
-    'weak_table.h',
-    'zone.cc',
-    'zone.h',
-    'zone_test.cc',
-    'zone_text_buffer.cc',
-    'zone_text_buffer.h',
-  ],
-}
diff --git a/runtime/vm/weak_code.cc b/runtime/vm/weak_code.cc
index c750d94..8a4343e 100644
--- a/runtime/vm/weak_code.cc
+++ b/runtime/vm/weak_code.cc
@@ -60,10 +60,14 @@
 void WeakCodeReferences::DisableCode() {
   Thread* thread = Thread::Current();
   const Array& code_objects = Array::Handle(thread->zone(), array_.raw());
+#if defined(DART_PRECOMPILED_RUNTIME)
+  ASSERT(code_objects.IsNull());
+  return;
+#else
   if (code_objects.IsNull()) {
     return;
   }
-  ASSERT(!FLAG_precompiled_runtime);
+
   UpdateArrayTo(Object::null_array());
   // Disable all code on stack.
   Code& code = Code::Handle();
@@ -129,6 +133,7 @@
       }
     }
   }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 }  // namespace dart
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 6ec91ae..82a9a1a 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -210,6 +210,103 @@
   "kernel",
 ]
 
+# From here down to the copy_trees() invocation, we collect all the information
+# about trees that need to be copied in the list of scopes, copy_tree_specs.
+copy_tree_specs = []
+
+# This loop generates rules for copying analyzer sources into lib/
+foreach(analyzer_source_dir, _analyzer_source_dirs) {
+  copy_tree_specs += [{
+    target = "copy_${analyzer_source_dir}_source_dir"
+    visibility = [ ":copy_analyzer_sources" ]
+    source = "../pkg/$analyzer_source_dir"
+    dest = "$root_out_dir/dart-sdk/lib/$analyzer_source_dir"
+    ignore_patterns = "*.svn,doc,*.py,*.gypi,*.sh,.gitignore,packages,test,testcases"
+  }]
+}
+
+# This rule copies dartdoc templates to
+# bin/snapshots/resources/dartdoc/templates
+copy_tree_specs += [{
+  target = "copy_dartdoc_templates"
+  visibility = [ ":copy_dartdoc_files" ]
+  source = "../third_party/pkg/dartdoc/lib/templates"
+  dest = "$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/templates"
+  ignore_patterns = "{}"
+}]
+
+# This rule copies dartdoc resources to
+# bin/snapshots/resources/dartdoc/resources
+copy_tree_specs += [{
+  target = "copy_dartdoc_resources"
+  visibility = [ ":copy_dartdoc_files" ]
+  source = "../third_party/pkg/dartdoc/lib/resources"
+  dest = "$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/resources"
+  ignore_patterns = "{}"
+}]
+
+# This rule copies js needed by ddc to lib/dev_compiler
+copy_tree_specs += [{
+  target = "copy_dev_compiler_js"
+  visibility = [
+    ":copy_dev_compiler_sdk",
+    ":copy_dev_compiler_require_js",
+    ":copy_dev_compiler_tools",
+  ]
+  source = "../pkg/dev_compiler/lib/js"
+  dest = "$root_out_dir/dart-sdk/lib/dev_compiler"
+  ignore_patterns = "{}"
+}]
+
+# This rule copies pub assets to lib/_internal/pub/asset
+copy_tree_specs += [{
+  target = "copy_pub_assets"
+  visibility = [
+    ":create_common_sdk",
+    ":copy_7zip",
+  ]
+  deps = [
+    ":copy_libraries",
+  ]
+  source = "../third_party/pkg/pub/lib/src/asset"
+  dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset"
+  ignore_patterns = "{}"
+}]
+
+# This loop generates rules to copy libraries to lib/
+foreach(library, _full_sdk_libraries) {
+  copy_tree_specs += [{
+    target = "copy_${library}_library"
+    visibility = [
+      ":copy_platform_sdk_libraries",
+      ":copy_full_sdk_libraries",
+    ]
+    source = "lib/$library"
+    dest = "$root_out_dir/dart-sdk/lib/$library"
+    ignore_patterns = "*.svn,doc,*.py,*.gypi,*.sh,.gitignore"
+  }]
+}
+
+if (is_win) {
+  copy_tree_specs += [{
+    target = "copy_7zip"
+    visibility = [ ":create_common_sdk" ]
+    deps = [
+      ":copy_libraries",
+      ":copy_pub_assets",
+    ]
+    source = "../third_party/7zip"
+    dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset/7zip"
+    ignore_patterns = ".svn"
+  }]
+}
+
+# This generates targets for everything in copy_tree_specs. The targets have the
+# same name as the "target" fields in the scopes of copy_tree_specs.
+copy_trees("copy_trees") {
+  sources = copy_tree_specs
+}
+
 # Copies the Dart VM binary into bin/
 copy("copy_dart") {
   visibility = [ ":create_common_sdk" ]
@@ -372,16 +469,6 @@
   }
 }
 
-# This loop generates rules for copying analyzer sources into lib/
-foreach(analyzer_source_dir, _analyzer_source_dirs) {
-  copy_tree("copy_${analyzer_source_dir}_source_dir") {
-    visibility = [ ":copy_analyzer_sources" ]
-    source = "../pkg/$analyzer_source_dir"
-    dest = "$root_out_dir/dart-sdk/lib/$analyzer_source_dir"
-    exclude = "*.svn,doc,*.py,*.gypi,*.sh,.gitignore,packages,test,testcases"
-  }
-}
-
 # This is the main rule for copying analyzer sources to lib/
 group("copy_analyzer_sources") {
   visibility = [ ":create_common_sdk" ]
@@ -391,22 +478,6 @@
   }
 }
 
-# This rule copies dartdoc templates to
-# bin/snapshots/resources/dartdoc/templates
-copy_tree("copy_dartdoc_templates") {
-  visibility = [ ":copy_dartdoc_files" ]
-  source = "../third_party/pkg/dartdoc/lib/templates"
-  dest = "$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/templates"
-}
-
-# This rule copies dartdoc resources to
-# bin/snapshots/resources/dartdoc/resources
-copy_tree("copy_dartdoc_resources") {
-  visibility = [ ":copy_dartdoc_files" ]
-  source = "../third_party/pkg/dartdoc/lib/resources"
-  dest = "$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/resources"
-}
-
 # This rule writes the .packages file for dartdoc resources.
 write_file("$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/.packages",
            "dartdoc:.")
@@ -481,17 +552,6 @@
   ]
 }
 
-# This rule copies js needed by ddc to lib/dev_compiler
-copy_tree("copy_dev_compiler_js") {
-  visibility = [
-    ":copy_dev_compiler_sdk",
-    ":copy_dev_compiler_require_js",
-    ":copy_dev_compiler_tools",
-  ]
-  source = "../pkg/dev_compiler/lib/js"
-  dest = "$root_out_dir/dart-sdk/lib/dev_compiler"
-}
-
 # This rule copies require.js to lib/dev_compiler/amd
 copy("copy_dev_compiler_require_js") {
   visibility = [ ":copy_dev_compiler_sdk" ]
@@ -562,32 +622,6 @@
   ]
 }
 
-# This rule copies pub assets to lib/_internal/pub/asset
-copy_tree("copy_pub_assets") {
-  visibility = [
-    ":create_common_sdk",
-    ":copy_7zip",
-  ]
-  deps = [
-    ":copy_libraries",
-  ]
-  source = "../third_party/pkg/pub/lib/src/asset"
-  dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset"
-}
-
-# This loop generates rules to copy libraries to lib/
-foreach(library, _full_sdk_libraries) {
-  copy_tree("copy_${library}_library") {
-    visibility = [
-      ":copy_platform_sdk_libraries",
-      ":copy_full_sdk_libraries",
-    ]
-    source = "lib/$library"
-    dest = "$root_out_dir/dart-sdk/lib/$library"
-    exclude = "*.svn,doc,*.py,*.gypi,*.sh,.gitignore"
-  }
-}
-
 # This is the main rule to copy libraries in _platform_sdk_libraries to lib/
 group("copy_platform_sdk_libraries") {
   visibility = [
@@ -624,19 +658,6 @@
   }
 }
 
-if (is_win) {
-  copy_tree("copy_7zip") {
-    visibility = [ ":create_common_sdk" ]
-    deps = [
-      ":copy_libraries",
-      ":copy_pub_assets",
-    ]
-    source = "../third_party/7zip"
-    dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset/7zip"
-    exclude = ".svn"
-  }
-}
-
 # This rule writes the version file.
 action("write_version_file") {
   visibility = [ ":create_common_sdk" ]
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index bf21636..77058e9 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -3647,6 +3647,9 @@
 final Map<String, Future<Null>> _loadingLibraries = <String, Future<Null>>{};
 final Set<String> _loadedLibraries = new Set<String>();
 
+/// Events used to diagnose failures from deferred loading requests.
+final List<String> _eventLog = <String>[];
+
 typedef void DeferredLoadCallback();
 
 // Function that will be called every time a new deferred import is loaded.
@@ -3674,15 +3677,30 @@
     // Now all hunks have been loaded, we run the needed initializers.
     var isHunkInitialized = JS_EMBEDDED_GLOBAL('', IS_HUNK_INITIALIZED);
     var initializer = JS_EMBEDDED_GLOBAL('', INITIALIZE_LOADED_HUNK);
-    for (String hash in hashes) {
+    for (int i = 0; i < hashes.length; ++i) {
       // It is possible for a hash to be repeated. This happens when two
       // different parts both end up empty. Checking in the loop rather than
       // pre-filtering prevents duplicate hashes leading to duplicated
       // initializations.
       // TODO(29572): Merge small parts.
       // TODO(29635): Remove duplicate parts from tables and output files.
-      if (JS('bool', '#(#)', isHunkInitialized, hash)) continue;
-      JS('void', '#(#)', initializer, hash);
+      var uri = uris[i];
+      var hash = hashes[i];
+      if (JS('bool', '#(#)', isHunkInitialized, hash)) {
+        _eventLog.add(' - already initialized: $uri ($hash)');
+        continue;
+      }
+      // On strange scenarios, e.g. if js encounters parse errors, we might get
+      // an "success" callback on the script load but the hunk will be null.
+      if (JS('bool', '#(#)', isHunkLoaded, hash)) {
+        _eventLog.add(' - initialize: $uri ($hash)');
+        JS('void', '#(#)', initializer, hash);
+      } else {
+        _eventLog.add(' - missing hunk: $uri ($hash)');
+        throw new DeferredLoadException("Loading ${uris[i]} failed: "
+            "the code with hash '${hash}' was not loaded.\n"
+            "event log:\n${_eventLog.join("\n")}\n");
+      }
     }
     bool updated = _loadedLibraries.add(loadId);
     if (updated && deferredLoadHook != null) {
@@ -3693,7 +3711,9 @@
 
 Future<Null> _loadHunk(String hunkName) {
   Future<Null> future = _loadingLibraries[hunkName];
+  _eventLog.add(' - _loadHunk: $hunkName');
   if (future != null) {
+    _eventLog.add('reuse: $hunkName');
     return future.then((_) => null);
   }
 
@@ -3701,23 +3721,29 @@
 
   int index = uri.lastIndexOf('/');
   uri = '${uri.substring(0, index + 1)}$hunkName';
+  _eventLog.add(' - download: $hunkName from $uri');
 
   var deferredLibraryLoader = JS('', 'self.dartDeferredLibraryLoader');
   Completer<Null> completer = new Completer<Null>();
 
   void success() {
+    _eventLog.add(' - download success: $hunkName');
     completer.complete(null);
   }
 
-  void failure([error, StackTrace stackTrace]) {
+  void failure(error, String context, StackTrace stackTrace) {
+    _eventLog.add(' - download failed: $hunkName (context: $context)');
     _loadingLibraries[hunkName] = null;
-    completer.completeError(
-        new DeferredLoadException('Loading $uri failed: $error'), stackTrace);
+    stackTrace ??= StackTrace.current;
+    completer.completeError(new DeferredLoadException(
+          'Loading $uri failed: $error\n'
+          'event log:\n${_eventLog.join("\n")}\n'), stackTrace);
   }
 
   var jsSuccess = convertDartClosureToJS(success, 0);
   var jsFailure = convertDartClosureToJS((error) {
-    failure(unwrapException(error), getTraceFromException(error));
+    failure(unwrapException(error), 'js-failure-wrapper',
+        getTraceFromException(error));
   }, 1);
 
   if (JS('bool', 'typeof # === "function"', deferredLibraryLoader)) {
@@ -3725,7 +3751,7 @@
       JS('void', '#(#, #, #)', deferredLibraryLoader, uri, jsSuccess,
           jsFailure);
     } catch (error, stackTrace) {
-      failure(error, stackTrace);
+      failure(error, "invoking dartDeferredLibraryLoader hook", stackTrace);
     }
   } else if (isWorker()) {
     // We are in a web worker. Load the code with an XMLHttpRequest.
@@ -3745,7 +3771,7 @@
         convertDartClosureToJS((event) {
           int status = JS('int', '#.status', xhr);
           if (status != 200) {
-            failure('Request status: $status');
+            failure('Request status: $status', 'worker xhr', null);
           }
           String code = JS('String', '#.responseText', xhr);
           try {
@@ -3754,12 +3780,16 @@
             JS('void', '(new Function(#))()', code);
             success();
           } catch (error, stackTrace) {
-            failure(error, stackTrace);
+            failure(error, 'evaluating the code in worker xhr', stackTrace);
           }
         }, 1));
 
-    JS('void', '#.addEventListener("error", #, false)', xhr, failure);
-    JS('void', '#.addEventListener("abort", #, false)', xhr, failure);
+    JS('void', '#.addEventListener("error", #, false)', xhr, (e) {
+      failure(e, 'xhr error handler', null);
+    });
+    JS('void', '#.addEventListener("abort", #, false)', xhr, (e) {
+      failure(e, 'xhr abort handler', null);
+    });
     JS('void', '#.send()', xhr);
   } else {
     // We are in a dom-context.
diff --git a/sdk/lib/async/async_sources.gni b/sdk/lib/async/async_sources.gni
new file mode 100644
index 0000000..3299cd4
--- /dev/null
+++ b/sdk/lib/async/async_sources.gni
@@ -0,0 +1,23 @@
+# 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.
+
+# This file contains all sources for the dart:async library.
+async_sdk_sources = [
+  "async.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "async_error.dart",
+  "broadcast_stream_controller.dart",
+  "deferred_load.dart",
+  "future.dart",
+  "future_impl.dart",
+  "schedule_microtask.dart",
+  "stream.dart",
+  "stream_controller.dart",
+  "stream_impl.dart",
+  "stream_pipe.dart",
+  "stream_transformers.dart",
+  "timer.dart",
+  "zone.dart",
+]
diff --git a/sdk/lib/async/async_sources.gypi b/sdk/lib/async/async_sources.gypi
deleted file mode 100644
index 59904c9..0000000
--- a/sdk/lib/async/async_sources.gypi
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:async library.
-{
-  'sources': [
-    'async.dart',
-    # The above file needs to be first as it lists the parts below.
-    'async_error.dart',
-    'broadcast_stream_controller.dart',
-    'deferred_load.dart',
-    'future.dart',
-    'future_impl.dart',
-    'schedule_microtask.dart',
-    'stream.dart',
-    'stream_controller.dart',
-    'stream_impl.dart',
-    'stream_pipe.dart',
-    'stream_transformers.dart',
-    'timer.dart',
-    'zone.dart',
-  ],
-}
diff --git a/sdk/lib/collection/collection_sources.gni b/sdk/lib/collection/collection_sources.gni
new file mode 100644
index 0000000..3f2f19e
--- /dev/null
+++ b/sdk/lib/collection/collection_sources.gni
@@ -0,0 +1,23 @@
+# 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.
+
+# This file contains all sources for the dart:collection library.
+collection_sdk_sources = [
+  "collection.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "collections.dart",
+  "hash_map.dart",
+  "hash_set.dart",
+  "iterable.dart",
+  "iterator.dart",
+  "linked_hash_map.dart",
+  "linked_hash_set.dart",
+  "linked_list.dart",
+  "list.dart",
+  "maps.dart",
+  "queue.dart",
+  "set.dart",
+  "splay_tree.dart",
+]
diff --git a/sdk/lib/collection/collection_sources.gypi b/sdk/lib/collection/collection_sources.gypi
deleted file mode 100644
index 3656895..0000000
--- a/sdk/lib/collection/collection_sources.gypi
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:collection library.
-{
-  'sources': [
-    'collection.dart',
-    # The above file needs to be first as it lists the parts below.
-    'collections.dart',
-    'hash_map.dart',
-    'hash_set.dart',
-    'iterable.dart',
-    'iterator.dart',
-    'linked_hash_map.dart',
-    'linked_hash_set.dart',
-    'linked_list.dart',
-    'list.dart',
-    'maps.dart',
-    'queue.dart',
-    'set.dart',
-    'splay_tree.dart',
-  ],
-}
diff --git a/sdk/lib/convert/convert_sources.gni b/sdk/lib/convert/convert_sources.gni
new file mode 100644
index 0000000..ad79649
--- /dev/null
+++ b/sdk/lib/convert/convert_sources.gni
@@ -0,0 +1,23 @@
+# 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.
+
+# This file contains all sources for the dart:convert library.
+convert_sdk_sources = [
+  "convert.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "ascii.dart",
+  "base64.dart",
+  "byte_conversion.dart",
+  "chunked_conversion.dart",
+  "codec.dart",
+  "converter.dart",
+  "encoding.dart",
+  "html_escape.dart",
+  "json.dart",
+  "latin1.dart",
+  "line_splitter.dart",
+  "string_conversion.dart",
+  "utf.dart",
+]
diff --git a/sdk/lib/convert/convert_sources.gypi b/sdk/lib/convert/convert_sources.gypi
deleted file mode 100644
index d8d40cb..0000000
--- a/sdk/lib/convert/convert_sources.gypi
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:convert library.
-{
-  'sources': [
-    'convert.dart',
-    # The above file needs to be first as it lists the parts below.
-    'ascii.dart',
-    'base64.dart',
-    'byte_conversion.dart',
-    'chunked_conversion.dart',
-    'codec.dart',
-    'converter.dart',
-    'encoding.dart',
-    'html_escape.dart',
-    'json.dart',
-    'latin1.dart',
-    'line_splitter.dart',
-    'string_conversion.dart',
-    'utf.dart',
-  ],
-}
diff --git a/sdk/lib/core/core_sources.gni b/sdk/lib/core/core_sources.gni
new file mode 100644
index 0000000..ad8e40d
--- /dev/null
+++ b/sdk/lib/core/core_sources.gni
@@ -0,0 +1,42 @@
+# 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.
+
+core_sdk_sources = [
+  "core.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "annotations.dart",
+  "bool.dart",
+  "comparable.dart",
+  "date_time.dart",
+  "double.dart",
+  "duration.dart",
+  "errors.dart",
+  "exceptions.dart",
+  "expando.dart",
+  "function.dart",
+  "identical.dart",
+  "int.dart",
+  "invocation.dart",
+  "iterable.dart",
+  "iterator.dart",
+  "list.dart",
+  "map.dart",
+  "null.dart",
+  "num.dart",
+  "object.dart",
+  "pattern.dart",
+  "print.dart",
+  "regexp.dart",
+  "set.dart",
+  "sink.dart",
+  "stacktrace.dart",
+  "stopwatch.dart",
+  "string.dart",
+  "string_buffer.dart",
+  "string_sink.dart",
+  "symbol.dart",
+  "type.dart",
+  "uri.dart",
+]
diff --git a/sdk/lib/core/core_sources.gypi b/sdk/lib/core/core_sources.gypi
deleted file mode 100644
index 2c12762..0000000
--- a/sdk/lib/core/core_sources.gypi
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-{
-  'sources': [
-    'core.dart',
-    # The above file needs to be first as it lists the parts below.
-    'annotations.dart',
-    'bool.dart',
-    'comparable.dart',
-    'date_time.dart',
-    'double.dart',
-    'duration.dart',
-    'errors.dart',
-    'exceptions.dart',
-    'expando.dart',
-    'function.dart',
-    'identical.dart',
-    'int.dart',
-    'invocation.dart',
-    'iterable.dart',
-    'iterator.dart',
-    'list.dart',
-    'map.dart',
-    'null.dart',
-    'num.dart',
-    'object.dart',
-    'pattern.dart',
-    'print.dart',
-    'regexp.dart',
-    'set.dart',
-    'sink.dart',
-    'stacktrace.dart',
-    'stopwatch.dart',
-    'string.dart',
-    'string_buffer.dart',
-    'string_sink.dart',
-    'symbol.dart',
-    'type.dart',
-    'uri.dart',
-  ],
-}
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 2c61556..c64450a 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -93,7 +93,7 @@
    *     List<int> list = [1, 2, 3];
    *     Map<String, int> map = new Map.fromIterable(list,
    *         key: (item) => item.toString(),
-   *         value: (item) => item * item));
+   *         value: (item) => item * item);
    *
    *     map['1'] + map['2']; // 1 + 4
    *     map['3'] - map['2']; // 9 - 4
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 18ee8c3..bf18121 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -436,10 +436,6 @@
    *
    * The optional [startIndex] is by default set to 0. If provided, it must be
    * an integer in the range `[0 .. len]`, where `len` is this string's length.
-   *
-   * If the value returned by calling `replace` is not a [String], it
-   * is converted to a `String` using its `toString` method, which must
-   * then return a string.
    */
   String replaceFirstMapped(Pattern from, String replace(Match match),
       [int startIndex = 0]);
diff --git a/sdk/lib/developer/developer_sources.gni b/sdk/lib/developer/developer_sources.gni
new file mode 100644
index 0000000..df0dbc2
--- /dev/null
+++ b/sdk/lib/developer/developer_sources.gni
@@ -0,0 +1,13 @@
+# 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.
+
+developer_sdk_sources = [
+  "developer.dart",
+
+  # The above file needs to be first if additional parts are added to the lib.
+  "extension.dart",
+  "profiler.dart",
+  "service.dart",
+  "timeline.dart",
+]
diff --git a/sdk/lib/developer/developer_sources.gypi b/sdk/lib/developer/developer_sources.gypi
deleted file mode 100644
index 91596a3..0000000
--- a/sdk/lib/developer/developer_sources.gypi
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2015, 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.
-
-{
-  'sources': [
-    'developer.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-    'extension.dart',
-    'profiler.dart',
-    'service.dart',
-    'timeline.dart',
-  ],
-}
diff --git a/sdk/lib/internal/internal_sources.gni b/sdk/lib/internal/internal_sources.gni
new file mode 100644
index 0000000..9f7db6b
--- /dev/null
+++ b/sdk/lib/internal/internal_sources.gni
@@ -0,0 +1,16 @@
+# 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.
+
+# This file contains all sources for the dart:_internal library.
+internal_sdk_sources = [
+  "internal.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "iterable.dart",
+  "list.dart",
+  "linked_list.dart",
+  "print.dart",
+  "sort.dart",
+  "symbol.dart",
+]
diff --git a/sdk/lib/internal/internal_sources.gypi b/sdk/lib/internal/internal_sources.gypi
deleted file mode 100644
index f655856..0000000
--- a/sdk/lib/internal/internal_sources.gypi
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file contains all sources for the dart:_internal library.
-{
-  'sources': [
-    'internal.dart',
-    # The above file needs to be first as it lists the parts below.
-    'iterable.dart',
-    'list.dart',
-    'linked_list.dart',
-    'print.dart',
-    'sort.dart',
-    'symbol.dart',
-  ],
-}
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index 2641526..9281b59 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -756,6 +756,10 @@
 
   /**
    * Is `true` if the event target was a directory.
+   *
+   * Note that if the file has been deleted by the time the event has arrived,
+   * this will always be `false` on Windows. In particular, it will always be
+   * `false` for `DELETE` events.
    */
   final bool isDirectory;
 
diff --git a/sdk/lib/io/io_sources.gni b/sdk/lib/io/io_sources.gni
new file mode 100644
index 0000000..1e17be1
--- /dev/null
+++ b/sdk/lib/io/io_sources.gni
@@ -0,0 +1,42 @@
+# 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.
+
+io_sdk_sources = [
+  "io.dart",
+
+  # The above file needs to be first if additional parts are added to the lib.
+  "bytes_builder.dart",
+  "common.dart",
+  "crypto.dart",
+  "data_transformer.dart",
+  "directory.dart",
+  "directory_impl.dart",
+  "eventhandler.dart",
+  "file.dart",
+  "file_impl.dart",
+  "file_system_entity.dart",
+  "http.dart",
+  "http_date.dart",
+  "http_headers.dart",
+  "http_impl.dart",
+  "http_parser.dart",
+  "http_session.dart",
+  "io_resource_info.dart",
+  "io_sink.dart",
+  "io_service.dart",
+  "link.dart",
+  "platform.dart",
+  "platform_impl.dart",
+  "process.dart",
+  "service_object.dart",
+  "secure_server_socket.dart",
+  "secure_socket.dart",
+  "security_context.dart",
+  "socket.dart",
+  "stdio.dart",
+  "string_transformer.dart",
+  "sync_socket.dart",
+  "websocket.dart",
+  "websocket_impl.dart",
+]
diff --git a/sdk/lib/io/io_sources.gypi b/sdk/lib/io/io_sources.gypi
deleted file mode 100644
index c49b923..0000000
--- a/sdk/lib/io/io_sources.gypi
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2012, 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.
-
-{
-  'sources': [
-    'io.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-    'bytes_builder.dart',
-    'common.dart',
-    'crypto.dart',
-    'data_transformer.dart',
-    'directory.dart',
-    'directory_impl.dart',
-    'eventhandler.dart',
-    'file.dart',
-    'file_impl.dart',
-    'file_system_entity.dart',
-    'http.dart',
-    'http_date.dart',
-    'http_headers.dart',
-    'http_impl.dart',
-    'http_parser.dart',
-    'http_session.dart',
-    'io_resource_info.dart',
-    'io_sink.dart',
-    'io_service.dart',
-    'link.dart',
-    'platform.dart',
-    'platform_impl.dart',
-    'process.dart',
-    'service_object.dart',
-    'secure_server_socket.dart',
-    'secure_socket.dart',
-    'security_context.dart',
-    'socket.dart',
-    'stdio.dart',
-    'string_transformer.dart',
-    'sync_socket.dart',
-    'websocket.dart',
-    'websocket_impl.dart',
-  ],
-}
diff --git a/sdk/lib/isolate/isolate_sources.gni b/sdk/lib/isolate/isolate_sources.gni
new file mode 100644
index 0000000..8af8ba1
--- /dev/null
+++ b/sdk/lib/isolate/isolate_sources.gni
@@ -0,0 +1,10 @@
+# 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.
+
+isolate_sdk_sources = [
+  "isolate.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "capability.dart",
+]
diff --git a/sdk/lib/isolate/isolate_sources.gypi b/sdk/lib/isolate/isolate_sources.gypi
deleted file mode 100644
index 8d3ff84..0000000
--- a/sdk/lib/isolate/isolate_sources.gypi
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (c) 2012, 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.
-
-{
-  'sources': [
-    'isolate.dart',
-    # The above file needs to be first as it lists the parts below.
-    'capability.dart',
-  ],
-}
diff --git a/sdk/lib/math/math_sources.gni b/sdk/lib/math/math_sources.gni
new file mode 100644
index 0000000..ff8f3fa
--- /dev/null
+++ b/sdk/lib/math/math_sources.gni
@@ -0,0 +1,13 @@
+# 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.
+
+math_sdk_sources = [
+  "math.dart",
+
+  # The above file needs to be first as it lists the parts below.
+  "jenkins_smi_hash.dart",
+  "point.dart",
+  "random.dart",
+  "rectangle.dart",
+]
diff --git a/sdk/lib/math/math_sources.gypi b/sdk/lib/math/math_sources.gypi
deleted file mode 100644
index c26d41c..0000000
--- a/sdk/lib/math/math_sources.gypi
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2012, 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.
-
-{
-  'sources': [
-    'math.dart',
-    # The above file needs to be first as it lists the parts below.
-    'jenkins_smi_hash.dart',
-    'point.dart',
-    'random.dart',
-    'rectangle.dart',
-  ],
-}
diff --git a/sdk/lib/mirrors/mirrors_sources.gni b/sdk/lib/mirrors/mirrors_sources.gni
new file mode 100644
index 0000000..e019c34
--- /dev/null
+++ b/sdk/lib/mirrors/mirrors_sources.gni
@@ -0,0 +1,8 @@
+# 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.
+
+mirrors_sdk_sources = [
+  "mirrors.dart",
+  # The above file needs to be first if additional parts are added to the lib.
+]
diff --git a/sdk/lib/mirrors/mirrors_sources.gypi b/sdk/lib/mirrors/mirrors_sources.gypi
deleted file mode 100644
index 8c97af5..0000000
--- a/sdk/lib/mirrors/mirrors_sources.gypi
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2012, 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.
-
-{
-  'sources': [
-    'mirrors.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-  ],
-}
diff --git a/sdk/lib/profiler/profiler_sources.gni b/sdk/lib/profiler/profiler_sources.gni
new file mode 100644
index 0000000..adbf447
--- /dev/null
+++ b/sdk/lib/profiler/profiler_sources.gni
@@ -0,0 +1,8 @@
+# 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.
+
+profiler_sdk_sources = [
+  "profiler.dart",
+  # The above file needs to be first if additional parts are added to the lib.
+]
diff --git a/sdk/lib/profiler/profiler_sources.gypi b/sdk/lib/profiler/profiler_sources.gypi
deleted file mode 100644
index 910d798..0000000
--- a/sdk/lib/profiler/profiler_sources.gypi
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2013, 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.
-
-{
-  'sources': [
-    'profiler.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-  ],
-}
diff --git a/sdk/lib/rules.gni b/sdk/lib/rules.gni
deleted file mode 100644
index fe51bbb..0000000
--- a/sdk/lib/rules.gni
+++ /dev/null
@@ -1,59 +0,0 @@
-# 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.
-
-default_dart_root = rebase_path("../..")
-
-# This build rule will copy the source for one Dart SDK library.
-#
-# Required arguments:
-#   sdk_lib_name
-#       The name of a Dart SDK library.
-#
-# Optional arguments:
-#   destination
-#       Base path to copy sources. Default value is "$root_gen_dir/dart_sdk".
-#
-#   dart_root
-#       Path to the Dart SDK source root. Default value is "../..".
-#
-# The sources will be copied into $root_gen_dir/dart_sdk/$sdk_lib_name/.
-#
-template("dart_sdk_lib_copy") {
-  assert(defined(invoker.sdk_lib_name))
-  if (defined(invoker.dart_root)) {
-    dart_root = rebase_path(invoker.dart_root)
-  } else {
-    dart_root = default_dart_root
-  }
-  if (defined(invoker.destination)) {
-    destination = invoker.destination
-  } else {
-    destination = "$root_gen_dir/dart_sdk"
-  }
-  dart_sdk_sdk_lib_path = rebase_path("sdk/lib", "", dart_root)
-  dart_sdk_tools_gypi_to_gn_path =
-      rebase_path("tools/gypi_to_gn.py", "", dart_root)
-
-  # The name of the SDK library being copied.
-  lib_name = invoker.sdk_lib_name
-
-  # The path to the libraries source directory.
-  lib_path = rebase_path(lib_name, "", dart_sdk_sdk_lib_path)
-
-  # The path to the sources gypi.
-  lib_sources_gypi = lib_name + "_sources.gypi"
-
-  # Get the contents of the gypi file.
-  sdk_lib_sources_gypi =
-      exec_script(dart_sdk_tools_gypi_to_gn_path,
-                  [ rebase_path(lib_sources_gypi, "", lib_path) ],
-                  "scope",
-                  [ rebase_path(lib_sources_gypi, "", lib_path) ])
-  copy(target_name) {
-    sources = rebase_path(sdk_lib_sources_gypi.sources, "", lib_path)
-    outputs = [
-      "$destination/$lib_name/{{source_file_part}}",
-    ]
-  }
-}
diff --git a/sdk/lib/typed_data/typed_data_sources.gni b/sdk/lib/typed_data/typed_data_sources.gni
new file mode 100644
index 0000000..daa50aa
--- /dev/null
+++ b/sdk/lib/typed_data/typed_data_sources.gni
@@ -0,0 +1,8 @@
+# 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.
+
+typed_data_sdk_sources = [
+  "typed_data.dart",
+  # The above file needs to be first if additional parts are added to the lib.
+]
diff --git a/sdk/lib/typed_data/typed_data_sources.gypi b/sdk/lib/typed_data/typed_data_sources.gypi
deleted file mode 100644
index 3cad00d..0000000
--- a/sdk/lib/typed_data/typed_data_sources.gypi
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2013, 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.
-
-{
-  'sources': [
-    'typed_data.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-  ],
-}
diff --git a/sdk/lib/vmservice/vmservice_sources.gni b/sdk/lib/vmservice/vmservice_sources.gni
new file mode 100644
index 0000000..b8cf5bf
--- /dev/null
+++ b/sdk/lib/vmservice/vmservice_sources.gni
@@ -0,0 +1,19 @@
+# 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.
+
+# Sources that make up the library "dart:_vmservice".
+vmservice_sdk_sources = [
+  "vmservice.dart",
+
+  # The above file needs to be first as it imports required libraries.
+  "asset.dart",
+  "client.dart",
+  "constants.dart",
+  "devfs.dart",
+  "running_isolate.dart",
+  "running_isolates.dart",
+  "message.dart",
+  "message_router.dart",
+  "named_lookup.dart",
+]
diff --git a/sdk/lib/vmservice/vmservice_sources.gypi b/sdk/lib/vmservice/vmservice_sources.gypi
deleted file mode 100644
index 41f33f6..0000000
--- a/sdk/lib/vmservice/vmservice_sources.gypi
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2015, 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.
-
-# Sources that make up the library "dart:_vmservice".
-
-{
-  'sources': [
-    'vmservice.dart',
-    # The above file needs to be first as it imports required libraries.
-    'asset.dart',
-    'client.dart',
-    'constants.dart',
-    'devfs.dart',
-    'running_isolate.dart',
-    'running_isolates.dart',
-    'message.dart',
-    'message_router.dart',
-    'named_lookup.dart',
-  ],
-}
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 8005da0..9c4f27c 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -2892,7 +2892,6 @@
 LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-slice_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError # Please triage this failure
@@ -3110,7 +3109,6 @@
 LayoutTests/fast/dom/Node/initial-values_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/NodeIterator/NodeIterator-basic_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/NodeList/nodelist-reachable_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/Range/13000_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/insertNode-empty-fragment-crash_t01: RuntimeError # Please triage this failure
@@ -3189,7 +3187,6 @@
 LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/importNode-unsupported-node-type_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/insert-span-into-long-text-bug-28245_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/insertBefore-refChild-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError # Please triage this failure
@@ -3279,7 +3276,6 @@
 LayoutTests/fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/shadow/title-element-in-shadow_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/subtree-modified-attributes_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/text-control-crash-on-select_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/vertical-scrollbar-when-dir-change_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError # Please triage this failure
@@ -3465,7 +3461,6 @@
 LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/forms/submit-form-with-dirname-attribute_t01: Pass, RuntimeError # Please triage this failure
-LayoutTests/fast/forms/text-control-select-blurred_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-maxlength_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-no-scroll-on-blur_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError # Please triage this failure
@@ -3628,7 +3623,6 @@
 LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/pre-wrap-trailing-tab_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/remove-zero-length-run_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/text/selection-exceptions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/sub-pixel/text-scaling-pixel_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError # Please triage this failure
@@ -3884,7 +3878,6 @@
 WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/mode_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formaction_t01: RuntimeError # Please triage this failure
-WebPlatformTest/html/semantics/forms/textfieldselection/selection-not-application-textarea_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: Skip # Times out. Please triage this failure
 WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError # Please triage this failure
@@ -4077,18 +4070,33 @@
 LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/drawingbuffer-test_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/Document/createElementNS-namespace-err_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/Element/setAttributeNS-namespace-err_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/forms/selection-start-end-readonly_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/media/media-query-list_t01: RuntimeError # Please triage this failure
+WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError # Please triage this failure
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == ff && $system == linux]
 LayoutTests/fast/canvas/webgl/*: Timeout, Pass # Issue 26725
-LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: Skip # Times out always
-LayoutTests/fast/canvas/webgl/texture-complete_t01: Skip # Times out sometimes
-LayoutTests/fast/canvas/webgl/texture-npot_t01: Skip # Times out sometimes
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-sub-image-2d-bad-args_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/texture-complete_t01: Skip # Times out sometimes
+LayoutTests/fast/canvas/webgl/texture-npot_t01: Skip # Times out sometimes
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-slice_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/Range/13000_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/insert-span-into-long-text-bug-28245_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/text-control-crash-on-select_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/forms/text-control-select-blurred_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/text/selection-exceptions_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Dartium JSInterop failure
+WebPlatformTest/html/semantics/forms/textfieldselection/selection-not-application-textarea_t01: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == safari ]
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
diff --git a/tests/compiler/dart2js/annotated_code_helper.dart b/tests/compiler/dart2js/annotated_code_helper.dart
index 3e57a05..47e59de 100644
--- a/tests/compiler/dart2js/annotated_code_helper.dart
+++ b/tests/compiler/dart2js/annotated_code_helper.dart
@@ -9,7 +9,7 @@
 const Pattern atBraceStart = '@{';
 const Pattern braceEnd = '}';
 
-final Pattern commentStart = new RegExp(r' */\*');
+final Pattern commentStart = new RegExp(r'/\*');
 final Pattern commentEnd = new RegExp(r'\*/ *');
 
 class Annotation {
diff --git a/tests/compiler/dart2js/class_set_test.dart b/tests/compiler/dart2js/class_set_test.dart
index 54caa73..02b439f 100644
--- a/tests/compiler/dart2js/class_set_test.dart
+++ b/tests/compiler/dart2js/class_set_test.dart
@@ -46,7 +46,7 @@
         new F();
         new G();
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
   ClosedWorld world = env.closedWorld;
 
   ClassElement A = env.getElement("A");
@@ -376,7 +376,7 @@
         new H();
         new I();
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
   ClosedWorld world = env.closedWorld;
 
   ClassElement A = env.getElement("A");
diff --git a/tests/compiler/dart2js/closure/closure_test.dart b/tests/compiler/dart2js/closure/closure_test.dart
index e1e320d..7447dc6 100644
--- a/tests/compiler/dart2js/closure/closure_test.dart
+++ b/tests/compiler/dart2js/closure/closure_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 'dart:io';
+import 'dart:io' hide Link;
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
@@ -14,18 +14,32 @@
 import 'package:compiler/src/kernel/kernel_backend_strategy.dart';
 import 'package:compiler/src/js_model/locals.dart';
 import 'package:compiler/src/tree/nodes.dart' as ast;
+import 'package:compiler/src/util/util.dart';
+import 'package:expect/expect.dart';
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
 import 'package:kernel/ast.dart' as ir;
 
-main() {
+main(List<String> args) {
+  bool verbose = args.contains('-v');
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     await for (FileSystemEntity entity in dataDir.list()) {
+      print('----------------------------------------------------------------');
       print('Checking ${entity.uri}');
+      print('----------------------------------------------------------------');
       String annotatedCode = await new File.fromUri(entity.uri).readAsString();
-      await checkCode(annotatedCode, computeClosureData, compileFromSource);
-      await checkCode(annotatedCode, computeKernelClosureData, compileFromDill);
+      print('--from source---------------------------------------------------');
+      await checkCode(annotatedCode, computeClosureData, compileFromSource,
+          verbose: verbose);
+      // TODO(johnnniwinther,efortuna): Enable the these tests for .dill.
+      if (['captured_variable.dart'].contains(entity.uri.pathSegments.last)) {
+        print('--skipped for dill--------------------------------------------');
+        continue;
+      }
+      print('--from dill-----------------------------------------------------');
+      await checkCode(annotatedCode, computeKernelClosureData, compileFromDill,
+          verbose: verbose);
     }
   });
 }
@@ -35,12 +49,14 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 void computeClosureData(Compiler compiler, MemberEntity _member,
-    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap) {
+    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap,
+    {bool verbose: false}) {
   MemberElement member = _member;
   ClosureDataLookup<ast.Node> closureDataLookup =
       compiler.backendStrategy.closureDataLookup as ClosureDataLookup<ast.Node>;
   new ClosureAstComputer(compiler.reporter, actualMap, sourceSpanMap,
-          member.resolvedAst, closureDataLookup)
+          member.resolvedAst, closureDataLookup,
+          verbose: verbose)
       .run();
 }
 
@@ -49,7 +65,8 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 void computeKernelClosureData(Compiler compiler, MemberEntity member,
-    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap) {
+    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap,
+    {bool verbose: false}) {
   KernelBackendStrategy backendStrategy = compiler.backendStrategy;
   KernelToElementMapForBuilding elementMap = backendStrategy.elementMap;
   GlobalLocalsMap localsMap = backendStrategy.globalLocalsMapForTesting;
@@ -58,30 +75,48 @@
   assert(definition.kind == MemberKind.regular,
       failedAt(member, "Unexpected member definition $definition"));
   new ClosureIrChecker(actualMap, sourceSpanMap, elementMap, member,
-          localsMap.getLocalsMap(member), closureDataLookup)
+          localsMap.getLocalsMap(member), closureDataLookup,
+          verbose: verbose)
       .run(definition.node);
 }
 
 /// Ast visitor for computing closure data.
-class ClosureAstComputer extends AbstractResolvedAstComputer {
+class ClosureAstComputer extends AbstractResolvedAstComputer
+    with ComputeValueMixin {
   final ClosureDataLookup<ast.Node> closureDataLookup;
-  final ClosureRepresentationInfo info;
+  final bool verbose;
 
   ClosureAstComputer(
       DiagnosticReporter reporter,
       Map<Id, String> actualMap,
       Map<Id, Spannable> spannableMap,
       ResolvedAst resolvedAst,
-      this.closureDataLookup)
-      : this.info =
-            closureDataLookup.getClosureRepresentationInfo(resolvedAst.element),
-        super(reporter, actualMap, spannableMap, resolvedAst);
+      this.closureDataLookup,
+      {this.verbose: false})
+      : super(reporter, actualMap, spannableMap, resolvedAst) {
+    push(resolvedAst.element);
+  }
+
+  visitFunctionExpression(ast.FunctionExpression node) {
+    Entity localFunction = resolvedAst.elements.getFunctionDefinition(node);
+    if (localFunction is LocalFunctionElement) {
+      push(localFunction);
+      super.visitFunctionExpression(node);
+      pop();
+    } else {
+      super.visitFunctionExpression(node);
+    }
+  }
 
   @override
   String computeNodeValue(ast.Node node, [AstElement element]) {
     if (element != null && element.isLocal) {
-      LocalElement local = element;
-      return computeLocalValue(info, local);
+      if (element.isFunction) {
+        return computeEntityValue(element);
+      } else {
+        LocalElement local = element;
+        return computeLocalValue(local);
+      }
     }
     // TODO(johnniwinther,efortuna): Collect data for other nodes?
     return null;
@@ -91,15 +126,16 @@
   String computeElementValue(AstElement element) {
     // TODO(johnniwinther,efortuna): Collect data for the member
     // (has thisLocal, has box, etc.).
-    return null;
+    return computeEntityValue(element);
   }
 }
 
 /// Kernel IR visitor for computing closure data.
-class ClosureIrChecker extends AbstractIrComputer {
+class ClosureIrChecker extends AbstractIrComputer
+    with ComputeValueMixin<ir.Node> {
   final ClosureDataLookup<ir.Node> closureDataLookup;
-  final ScopeInfo info;
   final KernelToLocalsMap _localsMap;
+  final bool verbose;
 
   ClosureIrChecker(
       Map<Id, String> actualMap,
@@ -107,15 +143,31 @@
       KernelToElementMapForBuilding elementMap,
       MemberEntity member,
       this._localsMap,
-      this.closureDataLookup)
-      : this.info = closureDataLookup.getScopeInfo(member),
-        super(actualMap, sourceSpanMap);
+      this.closureDataLookup,
+      {this.verbose: false})
+      : super(actualMap, sourceSpanMap) {
+    push(member);
+  }
+
+  visitFunctionExpression(ir.FunctionExpression node) {
+    Local localFunction = _localsMap.getLocalFunction(node);
+    push(localFunction);
+    super.visitFunctionExpression(node);
+    pop();
+  }
+
+  visitFunctionDeclaration(ir.FunctionDeclaration node) {
+    Local localFunction = _localsMap.getLocalFunction(node);
+    push(localFunction);
+    super.visitFunctionDeclaration(node);
+    pop();
+  }
 
   @override
   String computeNodeValue(ir.Node node) {
     if (node is ir.VariableDeclaration) {
       Local local = _localsMap.getLocalVariable(node);
-      return computeLocalValue(info, local);
+      return computeLocalValue(local);
     }
     // TODO(johnniwinther,efortuna): Collect data for other nodes?
     return null;
@@ -125,16 +177,150 @@
   String computeMemberValue(ir.Member member) {
     // TODO(johnniwinther,efortuna): Collect data for the member
     // (has thisLocal, has box, etc.).
-    return null;
+    return computeEntityValue(entity);
   }
 }
 
-/// Compute a string representation of the data stored for [local] in [info].
-String computeLocalValue(ScopeInfo info, Local local) {
-  StringBuffer sb = new StringBuffer();
-  if (info.localIsUsedInTryOrSync(local)) {
-    sb.write('inTry');
+abstract class ComputeValueMixin<T> {
+  bool get verbose;
+  ClosureDataLookup<T> get closureDataLookup;
+  Entity get entity => entityStack.head;
+  Link<Entity> entityStack = const Link<Entity>();
+  Link<ScopeInfo> scopeInfoStack = const Link<ScopeInfo>();
+  ScopeInfo get scopeInfo => scopeInfoStack.head;
+  CapturedScope capturedScope;
+  Link<ClosureRepresentationInfo> closureRepresentationInfoStack =
+      const Link<ClosureRepresentationInfo>();
+  ClosureRepresentationInfo get closureRepresentationInfo =>
+      closureRepresentationInfoStack.head;
+
+  void push(Entity entity) {
+    entityStack = entityStack.prepend(entity);
+    scopeInfoStack =
+        scopeInfoStack.prepend(closureDataLookup.getScopeInfo(entity));
+    if (entity is MemberEntity) {
+      capturedScope = closureDataLookup.getCapturedScope(entity);
+    }
+    closureRepresentationInfoStack = closureRepresentationInfoStack.prepend(
+        closureDataLookup.getClosureRepresentationInfoForTesting(entity));
+    dump(entity);
   }
-  // TODO(johnniwinther,efortuna): Add more info (captured, boxed etc.).
-  return sb.toString();
+
+  void pop() {
+    entityStack = entityStack.tail;
+    scopeInfoStack = scopeInfoStack.tail;
+    closureRepresentationInfoStack = closureRepresentationInfoStack.tail;
+  }
+
+  void dump(Entity entity) {
+    if (!verbose) return;
+
+    print('entity: $entity');
+    print(' scopeInfo (${scopeInfo.runtimeType})');
+    scopeInfo.forEachBoxedVariable((a, b) => print('  boxed1: $a->$b'));
+    print(' capturedScope (${capturedScope.runtimeType})');
+    capturedScope.forEachBoxedVariable((a, b) => print('  boxed2: $a->$b'));
+    print(
+        ' closureRepresentationInfo (${closureRepresentationInfo.runtimeType})');
+    closureRepresentationInfo
+        ?.forEachCapturedVariable((a, b) => print('  captured: $a->$b'));
+    closureRepresentationInfo
+        ?.forEachFreeVariable((a, b) => print('  free3: $a->$b'));
+    closureRepresentationInfo
+        ?.forEachBoxedVariable((a, b) => print('  boxed3: $a->$b'));
+  }
+
+  /// Compute a string representation of the data stored for [local] in [info].
+  String computeLocalValue(Local local) {
+    List<String> features = <String>[];
+    if (scopeInfo.localIsUsedInTryOrSync(local)) {
+      features.add('inTry');
+      // TODO(johnniwinther,efortuna): Should this be enabled and checked?
+      //Expect.isTrue(capturedScope.localIsUsedInTryOrSync(local));
+    } else {
+      //Expect.isFalse(capturedScope.localIsUsedInTryOrSync(local));
+    }
+    if (scopeInfo.isBoxed(local)) {
+      features.add('boxed');
+      Expect.isTrue(capturedScope.isBoxed(local));
+    } else {
+      Expect.isFalse(capturedScope.isBoxed(local));
+    }
+    if (capturedScope.context == local) {
+      features.add('local');
+    }
+    if (capturedScope is CapturedLoopScope) {
+      CapturedLoopScope loopScope = capturedScope;
+      if (loopScope.boxedLoopVariables.contains(local)) {
+        features.add('loop');
+      }
+    }
+    if (closureRepresentationInfo != null) {
+      if (closureRepresentationInfo.createdFieldEntities.contains(local)) {
+        features.add('field');
+      }
+      if (closureRepresentationInfo.isVariableBoxed(local)) {
+        features.add('variable-boxed');
+      }
+    }
+    // TODO(johnniwinther,efortuna): Add more info?
+    return (features.toList()..sort()).join(',');
+  }
+
+  String computeEntityValue(Entity entity) {
+    Map<String, String> features = <String, String>{};
+
+    void addLocals(String name, forEach(f(Local local, _))) {
+      List<String> names = <String>[];
+      forEach((Local local, _) {
+        if (local is BoxLocal) {
+          names.add('box');
+        } else {
+          names.add(local.name);
+        }
+      });
+      String value = names.isEmpty ? null : '[${(names..sort()).join(',')}]';
+      if (features.containsKey(name)) {
+        Expect.equals(
+            features[name], value, "Inconsistent values for $name on $entity.");
+      }
+      features[name] = value;
+    }
+
+    if (scopeInfo.thisLocal != null) {
+      features['hasThis'] = '';
+    }
+    addLocals('boxed', scopeInfo.forEachBoxedVariable);
+
+    if (entity is MemberEntity) {
+      if (capturedScope.requiresContextBox) {
+        features['requiresBox'] = '';
+      }
+      addLocals('boxed', capturedScope.forEachBoxedVariable);
+    }
+
+    if (closureRepresentationInfo != null) {
+      addLocals('boxed', closureRepresentationInfo.forEachBoxedVariable);
+      addLocals('captured', closureRepresentationInfo.forEachCapturedVariable);
+      addLocals('free', closureRepresentationInfo.forEachFreeVariable);
+    }
+
+    StringBuffer sb = new StringBuffer();
+    bool needsComma = false;
+    for (String name in features.keys.toList()..sort()) {
+      String value = features[name];
+      if (value != null) {
+        if (needsComma) {
+          sb.write(',');
+        }
+        sb.write(name);
+        if (value != '') {
+          sb.write('=');
+          sb.write(value);
+        }
+        needsComma = true;
+      }
+    }
+    return sb.toString();
+  }
 }
diff --git a/tests/compiler/dart2js/closure/data/captured_variable.dart b/tests/compiler/dart2js/closure/data/captured_variable.dart
new file mode 100644
index 0000000..e47acc5
--- /dev/null
+++ b/tests/compiler/dart2js/closure/data/captured_variable.dart
@@ -0,0 +1,43 @@
+// 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.
+
+/*readParameterInClosure:*/
+readParameterInClosure(/**/ parameter) {
+  /*captured=[parameter],free=[parameter]*/ func() => parameter;
+  return func;
+}
+
+/*writeParameterInClosure:boxed=[parameter],captured=[parameter],requiresBox*/
+writeParameterInClosure(/*boxed*/ parameter) {
+  /*boxed=[parameter],captured=[parameter],free=[box,parameter]*/ func() {
+    parameter = 42;
+  }
+
+  return func;
+}
+
+/*readLocalInClosure:*/
+readLocalInClosure(/**/ parameter) {
+  var /**/ local = parameter;
+  /*captured=[local],free=[local]*/ func() => local;
+  return func;
+}
+
+/*writeLocalInClosure:boxed=[local],captured=[local],requiresBox*/
+writeLocalInClosure(/**/ parameter) {
+  // ignore: UNUSED_LOCAL_VARIABLE
+  var /*boxed*/ local = parameter;
+  /*boxed=[local],captured=[local],free=[box,local]*/ func() {
+    local = 42;
+  }
+
+  return func;
+}
+
+main() {
+  readParameterInClosure(null);
+  writeParameterInClosure(null);
+  readLocalInClosure(null);
+  writeLocalInClosure(null);
+}
diff --git a/tests/compiler/dart2js/closure/data/parameter_in_try.dart b/tests/compiler/dart2js/closure/data/parameter_in_try.dart
index 5a0d862..bf4cb90 100644
--- a/tests/compiler/dart2js/closure/data/parameter_in_try.dart
+++ b/tests/compiler/dart2js/closure/data/parameter_in_try.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.
 
-readInFinally(/*inTry*/ parameter) {
+readParameterInFinally(/*inTry*/ parameter) {
   try {
     if (parameter) {
       throw '';
@@ -10,14 +10,34 @@
   } finally {}
 }
 
-writeInFinally(/*inTry*/ parameter) {
+writeParameterInFinally(/*inTry*/ parameter) {
   try {
     parameter = 42;
     throw '';
   } finally {}
 }
 
+readLocalInFinally(/**/ parameter) {
+  var /*inTry*/ local = parameter;
+  try {
+    if (local) {
+      throw '';
+    }
+  } finally {}
+}
+
+writeLocalInFinally(/**/ parameter) {
+  // ignore: UNUSED_LOCAL_VARIABLE
+  var /*inTry*/ local = parameter;
+  try {
+    local = 42;
+    throw '';
+  } finally {}
+}
+
 main() {
-  readInFinally(null);
-  writeInFinally(null);
+  readParameterInFinally(null);
+  writeParameterInFinally(null);
+  readLocalInFinally(null);
+  writeLocalInFinally(null);
 }
diff --git a/tests/compiler/dart2js/closure_tracer_28919_test.dart b/tests/compiler/dart2js/closure_tracer_28919_test.dart
index 2aed559..122ba8b 100644
--- a/tests/compiler/dart2js/closure_tracer_28919_test.dart
+++ b/tests/compiler/dart2js/closure_tracer_28919_test.dart
@@ -66,8 +66,8 @@
         var commonMasks = closedWorld.commonMasks;
 
         typeOf(String name) {
-          return typesInferrer
-              .getReturnTypeOfMember(findElement(compiler, name));
+          MemberElement member = findElement(compiler, name);
+          return typesInferrer.getReturnTypeOfMember(member);
         }
 
         checkType(String name, type) {
diff --git a/tests/compiler/dart2js/closure_tracer_test.dart b/tests/compiler/dart2js/closure_tracer_test.dart
index b39cae3..c9f519b 100644
--- a/tests/compiler/dart2js/closure_tracer_test.dart
+++ b/tests/compiler/dart2js/closure_tracer_test.dart
@@ -159,7 +159,7 @@
         var commonMasks = closedWorld.commonMasks;
 
         checkType(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           var mask = typesInferrer.getReturnTypeOfMember(element);
           Expect.equals(type.nullable(), simplify(mask, closedWorld), name);
         }
diff --git a/tests/compiler/dart2js/dill_loader_test.dart b/tests/compiler/dart2js/dill_loader_test.dart
index f6579f2..81b7c07 100644
--- a/tests/compiler/dart2js/dill_loader_test.dart
+++ b/tests/compiler/dart2js/dill_loader_test.dart
@@ -50,11 +50,9 @@
     var options = new CompilerOptions()
       ..target = new Dart2jsTarget(new TargetFlags())
       ..packagesFileUri = Uri.base.resolve('.packages')
-      ..compileSdk = true
       ..linkedDependencies = [platform]
       ..setExitCodeOnProblem = true
-      ..verify = true
-      ..sdkRoot = Uri.parse(sdkPath);
+      ..verify = true;
 
     List<int> kernelBinary =
         serializeProgram(await kernelForProgram(uri, options));
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence.dart b/tests/compiler/dart2js/equivalence/id_equivalence.dart
index 749a7b8..c746f6a 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence.dart
@@ -213,6 +213,10 @@
     } else if (node is ir.VariableDeclaration) {
       assert(node.fileOffset != ir.TreeNode.noOffset);
       return new NodeId(node.fileOffset);
+      // TODO(johnniwinther): Enable when function expressions have offsets.
+      /*} else if (node is ir.FunctionExpression) {
+      assert(node.fileOffset != ir.TreeNode.noOffset);
+      return new NodeId(node.fileOffset);*/
     } else if (node is ir.FunctionDeclaration) {
       assert(node.fileOffset != ir.TreeNode.noOffset);
       return new NodeId(node.fileOffset);
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 81de9b3..8aedb91 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -28,7 +28,8 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 typedef void ComputeMemberDataFunction(Compiler compiler, MemberEntity member,
-    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap);
+    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap,
+    {bool verbose});
 
 /// Compile [code] from .dart sources.
 Future<Compiler> compileFromSource(
@@ -44,12 +45,12 @@
 Future<Compiler> compileFromDill(
     AnnotatedCode code, Uri mainUri, List<String> options) async {
   Compiler compiler = await compileWithDill(
-      mainUri,
-      {'main.dart': code.sourceCode},
-      [Flags.disableTypeInference]..addAll(options),
+      entryPoint: mainUri,
+      memorySourceFiles: {'main.dart': code.sourceCode},
+      options: [Flags.disableTypeInference]..addAll(options),
       beforeRun: (Compiler compiler) {
-    compiler.stopAfterTypeInference = true;
-  });
+        compiler.stopAfterTypeInference = true;
+      });
   return compiler;
 }
 
@@ -61,7 +62,8 @@
     String annotatedCode,
     ComputeMemberDataFunction computeMemberData,
     CompileFunction compileFunction,
-    {List<String> options: const <String>[]}) async {
+    {List<String> options: const <String>[],
+    bool verbose: false}) async {
   AnnotatedCode code =
       new AnnotatedCode.fromText(annotatedCode, commentStart, commentEnd);
   Map<Id, String> expectedMap = computeExpectedMap(code);
@@ -76,12 +78,14 @@
     elementEnvironment.forEachClassMember(cls,
         (ClassEntity declarer, MemberEntity member) {
       if (cls == declarer) {
-        computeMemberData(compiler, member, actualMap, sourceSpanMap);
+        computeMemberData(compiler, member, actualMap, sourceSpanMap,
+            verbose: verbose);
       }
     });
   });
   elementEnvironment.forEachLibraryMember(mainLibrary, (MemberEntity member) {
-    computeMemberData(compiler, member, actualMap, sourceSpanMap);
+    computeMemberData(compiler, member, actualMap, sourceSpanMap,
+        verbose: verbose);
   });
   return new IdData(compiler, elementEnvironment, mainUri, expectedMap,
       actualMap, sourceSpanMap);
@@ -107,18 +111,27 @@
     String annotatedCode,
     ComputeMemberDataFunction computeMemberData,
     CompileFunction compileFunction,
-    {List<String> options: const <String>[]}) async {
+    {List<String> options: const <String>[],
+    bool verbose: false}) async {
   IdData data = await computeData(
       annotatedCode, computeMemberData, compileFunction,
-      options: options);
+      options: options, verbose: verbose);
 
   data.actualMap.forEach((Id id, String actual) {
-    String expected = data.expectedMap.remove(id);
-    if (actual != expected) {
-      reportHere(data.compiler.reporter, data.sourceSpanMap[id],
-          'expected:${expected},actual:${actual}');
+    if (!data.expectedMap.containsKey(id)) {
+      if (actual != '') {
+        reportHere(data.compiler.reporter, data.sourceSpanMap[id],
+            'Id $id not expected in ${data.expectedMap.keys}');
+      }
+      Expect.equals('', actual);
+    } else {
+      String expected = data.expectedMap.remove(id);
+      if (actual != expected) {
+        reportHere(data.compiler.reporter, data.sourceSpanMap[id],
+            'expected:${expected},actual:${actual}');
+      }
+      Expect.equals(expected, actual);
     }
-    Expect.equals(expected, actual);
   });
 
   data.expectedMap.forEach((Id id, String expected) {
@@ -321,4 +334,9 @@
     computeForNode(node);
     super.visitFunctionDeclaration(node);
   }
+
+  visitFunctionExpression(ir.FunctionExpression node) {
+    computeForNode(node);
+    super.visitFunctionExpression(node);
+  }
 }
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_test.dart b/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
index 3587393..e30be62 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
@@ -63,7 +63,8 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 void computeAstMemberData(Compiler compiler, MemberEntity _member,
-    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap) {
+    Map<Id, String> actualMap, Map<Id, SourceSpan> sourceSpanMap,
+    {bool verbose: false}) {
   MemberElement member = _member;
   ResolvedAst resolvedAst = member.resolvedAst;
   if (resolvedAst.kind != ResolvedAstKind.PARSED) return;
@@ -147,7 +148,8 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 void computeIrMemberData(Compiler compiler, MemberEntity member,
-    Map<Id, String> actualMap, Map<Id, Spannable> spannableMap) {
+    Map<Id, String> actualMap, Map<Id, Spannable> spannableMap,
+    {bool verbose: false}) {
   KernelBackendStrategy backendStrategy = compiler.backendStrategy;
   KernelToElementMapForBuilding elementMap = backendStrategy.elementMap;
   MemberDefinition definition = elementMap.getMemberDefinition(member);
@@ -167,6 +169,8 @@
       return computeLocalName(node.name);
     } else if (node is ir.FunctionDeclaration) {
       return computeLocalName(node.variable.name);
+    } else if (node is ir.FunctionExpression) {
+      return computeLocalName('');
     } else if (node is ir.MethodInvocation) {
       return computeDynamicInvokeName(node.name.name);
     } else if (node is ir.PropertyGet) {
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 27e8323..20e32e3 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -17,7 +17,8 @@
 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
 /// for the data origin.
 void computeMemberAstTypeMasks(Compiler compiler, MemberEntity _member,
-    Map<Id, String> actualMap, Map<Id, Spannable> spannableMap) {
+    Map<Id, String> actualMap, Map<Id, Spannable> spannableMap,
+    {bool verbose: false}) {
   MemberElement member = _member;
   ResolvedAst resolvedAst = member.resolvedAst;
   if (resolvedAst.kind != ResolvedAstKind.PARSED) return;
@@ -42,12 +43,14 @@
   String computeElementValue(AstElement element) {
     GlobalTypeInferenceElementResult elementResult;
     if (element.isParameter) {
-      elementResult = results.resultOfParameter(element);
+      ParameterElement parameter = element;
+      elementResult = results.resultOfParameter(parameter);
     } else if (element.isLocal) {
       LocalFunctionElement localFunction = element;
       elementResult = results.resultOfMember(localFunction.callMethod);
     } else {
-      elementResult = results.resultOfMember(element);
+      MemberElement member = element;
+      elementResult = results.resultOfMember(member);
     }
 
     TypeMask value =
diff --git a/tests/compiler/dart2js/instantiated_classes_test.dart b/tests/compiler/dart2js/instantiated_classes_test.dart
index f0b9158..1b9d1d0 100644
--- a/tests/compiler/dart2js/instantiated_classes_test.dart
+++ b/tests/compiler/dart2js/instantiated_classes_test.dart
@@ -62,7 +62,8 @@
   }
   mainSource.write('}');
   return TypeEnvironment
-      .create(source, mainSource: mainSource.toString(), useMockCompiler: true)
+      .create(source,
+          mainSource: mainSource.toString(), compileMode: CompileMode.mock)
       .then((dynamic env) {
     LibraryEntity mainLibrary =
         env.compiler.frontendStrategy.elementEnvironment.mainLibrary;
diff --git a/tests/compiler/dart2js/issue13354_test.dart b/tests/compiler/dart2js/issue13354_test.dart
index c4ee642..e1952b7 100644
--- a/tests/compiler/dart2js/issue13354_test.dart
+++ b/tests/compiler/dart2js/issue13354_test.dart
@@ -34,7 +34,7 @@
         var commonMasks = closedWorld.commonMasks;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           Expect.equals(
               type,
               simplify(
diff --git a/tests/compiler/dart2js/jsinterop/world_test.dart b/tests/compiler/dart2js/jsinterop/world_test.dart
index 5eff8e2..10f945f 100644
--- a/tests/compiler/dart2js/jsinterop/world_test.dart
+++ b/tests/compiler/dart2js/jsinterop/world_test.dart
@@ -6,7 +6,8 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/elements/elements.dart' show ClassElement;
+import 'package:compiler/src/common_elements.dart';
+import 'package:compiler/src/elements/entities.dart' show ClassEntity;
 import 'package:compiler/src/elements/names.dart';
 import 'package:compiler/src/universe/selector.dart';
 import 'package:compiler/src/world.dart';
@@ -14,11 +15,12 @@
 
 void main() {
   asyncTest(() async {
-    await testClasses();
+    await testClasses(CompileMode.memory);
+    await testClasses(CompileMode.dill);
   });
 }
 
-testClasses() async {
+testClasses(CompileMode compileMode) async {
   test(String mainSource,
       {List<String> directlyInstantiated: const <String>[],
       List<String> abstractlyInstantiated: const <String>[],
@@ -76,38 +78,40 @@
 import 'package:js/js.dart';
 
 $mainSource
-""", useMockCompiler: false);
-    Map<String, ClassElement> classEnvironment = <String, ClassElement>{};
+""", compileMode: compileMode);
+    Map<String, ClassEntity> classEnvironment = <String, ClassEntity>{};
 
-    ClassElement registerClass(ClassElement cls) {
+    ClassEntity registerClass(ClassEntity cls) {
       classEnvironment[cls.name] = cls;
       return cls;
     }
 
     ClosedWorld world = env.closedWorld;
-    ClassElement Object_ = registerClass(world.commonElements.objectClass);
-    ClassElement Interceptor =
+    ElementEnvironment elementEnvironment = world.elementEnvironment;
+    ClassEntity Object_ = registerClass(world.commonElements.objectClass);
+    ClassEntity Interceptor =
         registerClass(world.commonElements.jsInterceptorClass);
-    ClassElement JavaScriptObject =
+    ClassEntity JavaScriptObject =
         registerClass(world.commonElements.jsJavaScriptObjectClass);
-    ClassElement A = registerClass(env.getElement('A'));
-    ClassElement B = registerClass(env.getElement('B'));
-    ClassElement C = registerClass(env.getElement('C'));
-    ClassElement D = registerClass(env.getElement('D'));
-    ClassElement E = registerClass(env.getElement('E'));
-    ClassElement F = registerClass(env.getElement('F'));
+    ClassEntity A = registerClass(env.getClass('A'));
+    ClassEntity B = registerClass(env.getClass('B'));
+    ClassEntity C = registerClass(env.getClass('C'));
+    ClassEntity D = registerClass(env.getClass('D'));
+    ClassEntity E = registerClass(env.getClass('E'));
+    ClassEntity F = registerClass(env.getClass('F'));
 
     Selector nonExisting = new Selector.getter(const PublicName('nonExisting'));
 
-    Expect.equals(Interceptor.superclass, Object_);
-    Expect.equals(JavaScriptObject.superclass, Interceptor);
+    Expect.equals(elementEnvironment.getSuperClass(Interceptor), Object_);
+    Expect.equals(
+        elementEnvironment.getSuperClass(JavaScriptObject), Interceptor);
 
-    Expect.equals(A.superclass, JavaScriptObject);
-    Expect.equals(B.superclass, JavaScriptObject);
-    Expect.equals(C.superclass, JavaScriptObject);
-    Expect.equals(D.superclass, JavaScriptObject);
-    Expect.equals(E.superclass, Object_);
-    Expect.equals(F.superclass, Object_);
+    Expect.equals(elementEnvironment.getSuperClass(A), JavaScriptObject);
+    Expect.equals(elementEnvironment.getSuperClass(B), JavaScriptObject);
+    Expect.equals(elementEnvironment.getSuperClass(C), JavaScriptObject);
+    Expect.equals(elementEnvironment.getSuperClass(D), JavaScriptObject);
+    Expect.equals(elementEnvironment.getSuperClass(E), Object_);
+    Expect.equals(elementEnvironment.getSuperClass(F), Object_);
 
     Expect.isFalse(world.nativeData.isJsInteropClass(Object_));
     Expect.isTrue(world.nativeData.isJsInteropClass(A));
@@ -131,7 +135,7 @@
     Expect.equals('', world.nativeData.getJsInteropClassName(D));
 
     for (String name in classEnvironment.keys) {
-      ClassElement cls = classEnvironment[name];
+      ClassEntity cls = classEnvironment[name];
       bool isInstantiated = false;
       if (directlyInstantiated.contains(name)) {
         isInstantiated = true;
diff --git a/tests/compiler/dart2js/kernel/closed_world_from_dill_test.dart b/tests/compiler/dart2js/kernel/closed_world_from_dill_test.dart
index 1ccef1a..e9311743 100644
--- a/tests/compiler/dart2js/kernel/closed_world_from_dill_test.dart
+++ b/tests/compiler/dart2js/kernel/closed_world_from_dill_test.dart
@@ -139,7 +139,8 @@
   ClosedWorld closedWorld1 = compiler1.resolutionWorldBuilder.closeWorld();
 
   Compiler compiler2 = await compileWithDill(
-      entryPoint, const {}, [Flags.analyzeOnly, Flags.enableAssertMessage],
+      entryPoint: entryPoint,
+      options: [Flags.analyzeOnly, Flags.enableAssertMessage],
       printSteps: true);
 
   KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy;
diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
index 3e86858..b65f5b6 100644
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
@@ -77,6 +77,8 @@
 
 var toplevel;
 
+typedef Typedef();
+
 main() {
   foo();
   bar(true);
@@ -137,6 +139,8 @@
     return 400 + x;
   };
   x = f(x);
+  x = Object;
+  x = Typedef;
   return x;
 }
 typedef NoArg();
@@ -287,8 +291,10 @@
 
   OutputCollector collector2 = new OutputCollector();
   Compiler compiler2 = await compileWithDill(
-      entryPoint, const {}, <String>[]..addAll(commonOptions)..addAll(options),
-      printSteps: true, compilerOutput: collector2);
+      entryPoint: entryPoint,
+      options: <String>[]..addAll(commonOptions)..addAll(options),
+      printSteps: true,
+      compilerOutput: collector2);
 
   KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy;
   KernelToElementMap elementMap = frontendStrategy.elementMap;
diff --git a/tests/compiler/dart2js/kernel/compiler_helper.dart b/tests/compiler/dart2js/kernel/compiler_helper.dart
index 9f8980f..9ee008f 100644
--- a/tests/compiler/dart2js/kernel/compiler_helper.dart
+++ b/tests/compiler/dart2js/kernel/compiler_helper.dart
@@ -181,8 +181,11 @@
 }
 
 Future<Compiler> compileWithDill(
-    Uri entryPoint, Map<String, String> memorySourceFiles, List<String> options,
-    {bool printSteps: false,
+    {Uri entryPoint,
+    Map<String, String> memorySourceFiles: const <String, String>{},
+    List<String> options: const <String>[],
+    CompilerDiagnostics diagnosticHandler,
+    bool printSteps: false,
     CompilerOutput compilerOutput,
     void beforeRun(Compiler compiler)}) async {
   Uri dillFile =
@@ -194,6 +197,7 @@
   Compiler compiler = compilerFor(
       entryPoint: dillFile,
       options: [Flags.useKernel]..addAll(options),
+      diagnosticHandler: diagnosticHandler,
       outputProvider: compilerOutput);
   ElementResolutionWorldBuilder.useInstantiationMap = true;
   compiler.resolution.retainCachesForTesting = true;
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 9608e00..b27cacb 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -30,9 +30,6 @@
 const Map<String, String> SOURCE = const <String, String>{
   // Pretend this is a dart2js_native test to allow use of 'native' keyword.
   'sdk/tests/compiler/dart2js_native/main.dart': r'''
-@JS()
-library test;
-
 import 'dart:_foreign_helper' as foreign show JS;
 import 'dart:_foreign_helper' hide JS;
 import 'dart:_js_helper';
@@ -44,8 +41,8 @@
 import 'dart:math';
 import 'dart:typed_data';
 import 'dart:web_sql';
-import 'package:js/js.dart';
 import 'helper.dart';
+import 'jsinterop.dart';
 
 main() {
   testEmpty();
@@ -698,12 +695,20 @@
 testNamedMixinInstantiation() => new NamedMixin();
 testGenericMixinInstantiation() => new GenericSub<int, String>();
 testGenericNamedMixinInstantiation() => new GenericNamedMixin<int, String>();
+''',
+  'sdk/tests/compiler/dart2js_native/jsinterop.dart': '''
+@JS()
+library jsinterop;
+
+import 'package:js/js.dart';
 
 @JS()
 external int testJsInteropMethod();
 
 @JS()
 class JsInteropClass {
+  external JsInteropClass();
+
   @JS()
   external double method();
 }
diff --git a/tests/compiler/dart2js/kernel/mixin_test.dart b/tests/compiler/dart2js/kernel/mixin_test.dart
index ca56dc1..fa55271 100644
--- a/tests/compiler/dart2js/kernel/mixin_test.dart
+++ b/tests/compiler/dart2js/kernel/mixin_test.dart
@@ -116,7 +116,9 @@
     Compiler compiler1 = result.compiler;
 
     Compiler compiler2 = await compileWithDill(
-        entryPoint, {}, [Flags.analyzeOnly],
+        entryPoint: entryPoint,
+        memorySourceFiles: {},
+        options: [Flags.analyzeOnly],
         printSteps: true);
 
     ElementEnvironment env1 = compiler1.frontendStrategy.elementEnvironment;
diff --git a/tests/compiler/dart2js/list_tracer2_test.dart b/tests/compiler/dart2js/list_tracer2_test.dart
index 9f7f51e..3e1d17b 100644
--- a/tests/compiler/dart2js/list_tracer2_test.dart
+++ b/tests/compiler/dart2js/list_tracer2_test.dart
@@ -28,7 +28,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkType(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           ContainerTypeMask mask = typesInferrer.getTypeOfMember(element);
           Expect.equals(type, simplify(mask.elementType, closedWorld), name);
         }
diff --git a/tests/compiler/dart2js/list_tracer3_test.dart b/tests/compiler/dart2js/list_tracer3_test.dart
index 75eb142..c68ce62 100644
--- a/tests/compiler/dart2js/list_tracer3_test.dart
+++ b/tests/compiler/dart2js/list_tracer3_test.dart
@@ -30,7 +30,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkType(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           ContainerTypeMask mask = typesInferrer.getTypeOfMember(element);
           Expect.equals(type, simplify(mask.elementType, closedWorld), name);
         }
diff --git a/tests/compiler/dart2js/list_tracer_test.dart b/tests/compiler/dart2js/list_tracer_test.dart
index 52f5594..e448b57 100644
--- a/tests/compiler/dart2js/list_tracer_test.dart
+++ b/tests/compiler/dart2js/list_tracer_test.dart
@@ -203,7 +203,7 @@
         var commonMasks = closedWorld.commonMasks;
 
         checkType(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           ContainerTypeMask mask = typesInferrer.getTypeOfMember(element);
           if (nullify) type = type.nullable();
           Expect.equals(type, simplify(mask.elementType, closedWorld), name);
diff --git a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
index 422ad7f..3e082fd 100644
--- a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
+++ b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/world.dart' show ClosedWorld;
@@ -34,7 +35,7 @@
     ClosedWorld closedWorld = typesInferrer.closedWorld;
 
     checkType(String name, type, length) {
-      var element = findElement(compiler, name);
+      MemberElement element = findElement(compiler, name);
       TypeMask mask = typesInferrer.getTypeOfMember(element);
       Expect.isTrue(mask.isContainer);
       ContainerTypeMask container = mask;
diff --git a/tests/compiler/dart2js/map_tracer_const_test.dart b/tests/compiler/dart2js/map_tracer_const_test.dart
index e0b109d..d208996 100644
--- a/tests/compiler/dart2js/map_tracer_const_test.dart
+++ b/tests/compiler/dart2js/map_tracer_const_test.dart
@@ -36,7 +36,7 @@
         var typesInferrer = compiler.globalInference.typesInferrerInternal;
         var closedWorld = typesInferrer.closedWorld;
         var commonMasks = closedWorld.commonMasks;
-        var element = findElement(compiler, 'closure');
+        MemberElement element = findElement(compiler, 'closure');
         var mask = typesInferrer.getReturnTypeOfMember(element);
         Expect.equals(commonMasks.numType, simplify(mask, closedWorld));
       }));
diff --git a/tests/compiler/dart2js/map_tracer_keys_test.dart b/tests/compiler/dart2js/map_tracer_keys_test.dart
index 621466a..d5ee14f 100644
--- a/tests/compiler/dart2js/map_tracer_keys_test.dart
+++ b/tests/compiler/dart2js/map_tracer_keys_test.dart
@@ -59,10 +59,10 @@
   asyncTest(() => compiler.run(uri).then((_) {
         var typesInferrer = compiler.globalInference.typesInferrerInternal;
         var commonMasks = typesInferrer.closedWorld.commonMasks;
-        var aDoubleType =
-            typesInferrer.getTypeOfMember(findElement(compiler, 'aDouble'));
-        var aListType =
-            typesInferrer.getTypeOfMember(findElement(compiler, 'aList'));
+        MemberElement aDouble = findElement(compiler, 'aDouble');
+        var aDoubleType = typesInferrer.getTypeOfMember(aDouble);
+        MemberElement aList = findElement(compiler, 'aList');
+        var aListType = typesInferrer.getTypeOfMember(aList);
 
         Expect.equals(aDoubleType, commonMasks.doubleType);
         Expect.isTrue(aListType is ContainerTypeMask);
diff --git a/tests/compiler/dart2js/map_tracer_test.dart b/tests/compiler/dart2js/map_tracer_test.dart
index 833a3fb..399d5b0 100644
--- a/tests/compiler/dart2js/map_tracer_test.dart
+++ b/tests/compiler/dart2js/map_tracer_test.dart
@@ -207,7 +207,8 @@
   doTest('{aDouble : anInt}', "aDouble", "anInt");
 }
 
-void doTest(String allocation, [String keyElement, String valueElement]) {
+void doTest(String allocation,
+    [String keyElementName, String valueElementName]) {
   Uri uri = new Uri(scheme: 'source');
   var compiler = compilerFor(generateTest(allocation), uri,
       expectedErrors: 0, expectedWarnings: 1);
@@ -217,21 +218,21 @@
         var closedWorld = typesInferrer.closedWorld;
         var commonMasks = closedWorld.commonMasks;
         var emptyType = new TypeMask.nonNullEmpty();
-        var aKeyType =
-            typesInferrer.getTypeOfMember(findElement(compiler, 'aKey'));
-        if (keyElement != null) {
-          keyType =
-              typesInferrer.getTypeOfMember(findElement(compiler, keyElement));
+        MemberElement aKey = findElement(compiler, 'aKey');
+        var aKeyType = typesInferrer.getTypeOfMember(aKey);
+        if (keyElementName != null) {
+          MemberElement keyElement = findElement(compiler, keyElementName);
+          keyType = typesInferrer.getTypeOfMember(keyElement);
         }
-        if (valueElement != null) {
-          valueType = typesInferrer
-              .getTypeOfMember(findElement(compiler, valueElement));
+        if (valueElementName != null) {
+          MemberElement valueElement = findElement(compiler, valueElementName);
+          valueType = typesInferrer.getTypeOfMember(valueElement);
         }
         if (keyType == null) keyType = emptyType;
         if (valueType == null) valueType = emptyType;
 
         checkType(String name, keyType, valueType) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           MapTypeMask mask = typesInferrer.getTypeOfMember(element);
           Expect.equals(keyType, simplify(mask.keyType, closedWorld), name);
           Expect.equals(valueType, simplify(mask.valueType, closedWorld), name);
diff --git a/tests/compiler/dart2js/members_test.dart b/tests/compiler/dart2js/members_test.dart
index a08f7b6..301ad51 100644
--- a/tests/compiler/dart2js/members_test.dart
+++ b/tests/compiler/dart2js/members_test.dart
@@ -187,7 +187,7 @@
     class C<S> extends B<S> {}
     class D extends C<int> {}
     class E extends D {}
-    """, useMockCompiler: false).then((env) {
+    """, compileMode: CompileMode.memory).then((env) {
         ResolutionInterfaceType bool_ = env['bool'];
         ResolutionInterfaceType String_ = env['String'];
         ResolutionInterfaceType int_ = env['int'];
diff --git a/tests/compiler/dart2js/mock_libraries.dart b/tests/compiler/dart2js/mock_libraries.dart
index 0a22ad5..ec8bee7 100644
--- a/tests/compiler/dart2js/mock_libraries.dart
+++ b/tests/compiler/dart2js/mock_libraries.dart
@@ -99,7 +99,6 @@
         String toString() { return null; }
         noSuchMethod(im) { throw im; }
       }''',
-  'Resource': 'class Resource {}',
   'StackTrace': 'abstract class StackTrace {}',
   'String': 'class String implements Pattern {}',
   'Symbol': '''
diff --git a/tests/compiler/dart2js/needs_no_such_method_test.dart b/tests/compiler/dart2js/needs_no_such_method_test.dart
index 96199a8..93a005b 100644
--- a/tests/compiler/dart2js/needs_no_such_method_test.dart
+++ b/tests/compiler/dart2js/needs_no_such_method_test.dart
@@ -46,7 +46,7 @@
     testMode = '$instantiated';
 
     var env = await TypeEnvironment.create(CLASSES,
-        mainSource: main.toString(), useMockCompiler: false);
+        mainSource: main.toString(), compileMode: CompileMode.memory);
     foo = new Selector.call(const PublicName('foo'), CallStructure.NO_ARGS);
     bar = new Selector.call(const PublicName('bar'), CallStructure.NO_ARGS);
     baz = new Selector.call(const PublicName('baz'), CallStructure.NO_ARGS);
diff --git a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
index cbf16ec..c026c54 100644
--- a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
@@ -100,7 +100,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           Expect.equals(
               type,
               simplify(
diff --git a/tests/compiler/dart2js/simple_inferrer_callers_test.dart b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
index ac18525..6c3b15f 100644
--- a/tests/compiler/dart2js/simple_inferrer_callers_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
@@ -30,7 +30,7 @@
 
 // Create our own type inferrer to avoid clearing out the internal
 // data structures.
-class MyInferrer extends TypeGraphInferrer {
+class MyInferrer extends AstTypeGraphInferrer {
   MyInferrer(compiler, closedWorld, closedWorldRefiner)
       : super(compiler, closedWorld, closedWorldRefiner);
   clear() {}
diff --git a/tests/compiler/dart2js/simple_inferrer_closure_test.dart b/tests/compiler/dart2js/simple_inferrer_closure_test.dart
index 33dcb6f..570304c 100644
--- a/tests/compiler/dart2js/simple_inferrer_closure_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_closure_test.dart
@@ -122,7 +122,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           Expect.equals(
               type,
               simplify(
diff --git a/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
index 17edda3..200fb71 100644
--- a/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_const_closure2_test.dart
@@ -32,7 +32,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           dynamic returnType = typesInferrer.getReturnTypeOfMember(element);
           Expect.equals(type, returnType.simplify(compiler), name);
         }
diff --git a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart b/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
index 7194d5c..738a43d 100644
--- a/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_const_closure_test.dart
@@ -41,7 +41,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           dynamic returnType = typesInferrer.getReturnTypeOfMember(element);
           Expect.equals(type, returnType.simplify(compiler), name);
         }
diff --git a/tests/compiler/dart2js/simple_inferrer_global_field_closure_test.dart b/tests/compiler/dart2js/simple_inferrer_global_field_closure_test.dart
index 7a99da32..d81580f 100644
--- a/tests/compiler/dart2js/simple_inferrer_global_field_closure_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_global_field_closure_test.dart
@@ -41,7 +41,7 @@
         var closedWorld = typesInferrer.closedWorld;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           dynamic returnType = typesInferrer.getReturnTypeOfMember(element);
           Expect.equals(type, returnType.simplify(compiler), name);
         }
diff --git a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
index 8190af0..8abe812 100644
--- a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
@@ -162,7 +162,7 @@
 
 checkReturn(MockCompiler compiler, String name, type) {
   var typesInferrer = compiler.globalInference.typesInferrerInternal;
-  var element = findElement(compiler, name);
+  MemberElement element = findElement(compiler, name);
   Expect.equals(
       type,
       simplify(typesInferrer.getReturnTypeOfMember(element),
diff --git a/tests/compiler/dart2js/simple_inferrer_test.dart b/tests/compiler/dart2js/simple_inferrer_test.dart
index 2e83323..6a42b2f 100644
--- a/tests/compiler/dart2js/simple_inferrer_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_test.dart
@@ -732,7 +732,7 @@
         var commonMasks = closedWorld.commonMasks;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           Expect.equals(
               type,
               simplify(
diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
index 56e86dc..bb2c812 100644
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
@@ -172,7 +172,7 @@
         var commonMasks = closedWorld.commonMasks;
 
         checkReturn(String name, type) {
-          var element = findElement(compiler, name);
+          MemberElement element = findElement(compiler, name);
           Expect.equals(
               type,
               simplify(
diff --git a/tests/compiler/dart2js/subtypeset_test.dart b/tests/compiler/dart2js/subtypeset_test.dart
index c67049a..780d0ca 100644
--- a/tests/compiler/dart2js/subtypeset_test.dart
+++ b/tests/compiler/dart2js/subtypeset_test.dart
@@ -41,7 +41,7 @@
         new F();
         new G();
       }
-      """, useMockCompiler: false).then((env) {
+      """, compileMode: CompileMode.memory).then((env) {
         ClosedWorld world = env.closedWorld;
 
         ClassElement A = env.getElement("A");
diff --git a/tests/compiler/dart2js/trust_type_annotations_test.dart b/tests/compiler/dart2js/trust_type_annotations_test.dart
index 55514ab..a804f0e 100644
--- a/tests/compiler/dart2js/trust_type_annotations_test.dart
+++ b/tests/compiler/dart2js/trust_type_annotations_test.dart
@@ -56,13 +56,13 @@
         ClassElement classA = findElement(compiler, "A");
 
         checkReturn(String name, TypeMask type) {
-          var element = classA.lookupMember(name);
+          MemberElement element = classA.lookupMember(name);
           var mask = typesInferrer.getReturnTypeOfMember(element);
           Expect.isTrue(type.containsMask(mask, closedWorld));
         }
 
         checkType(String name, type) {
-          var element = classA.lookupMember(name);
+          MemberElement element = classA.lookupMember(name);
           Expect.isTrue(type.containsMask(
               typesInferrer.getTypeOfMember(element), closedWorld));
         }
diff --git a/tests/compiler/dart2js/type_inference6_test.dart b/tests/compiler/dart2js/type_inference6_test.dart
index 202a752..8be0c1d 100644
--- a/tests/compiler/dart2js/type_inference6_test.dart
+++ b/tests/compiler/dart2js/type_inference6_test.dart
@@ -27,7 +27,7 @@
     var typesInferrer = compiler.globalInference.typesInferrerInternal;
     var closedWorld = typesInferrer.closedWorld;
     var commonMasks = closedWorld.commonMasks;
-    var element = findElement(compiler, "foo");
+    MemberElement element = findElement(compiler, "foo");
     var mask = typesInferrer.getReturnTypeOfMember(element);
     Expect.equals(commonMasks.uint31Type, simplify(mask, closedWorld));
   });
diff --git a/tests/compiler/dart2js/type_inference7_test.dart b/tests/compiler/dart2js/type_inference7_test.dart
index 3530850..8875fb3 100644
--- a/tests/compiler/dart2js/type_inference7_test.dart
+++ b/tests/compiler/dart2js/type_inference7_test.dart
@@ -26,7 +26,7 @@
     var typesInferrer = compiler.globalInference.typesInferrerInternal;
     var closedWorld = typesInferrer.closedWorld;
     var commonMasks = closedWorld.commonMasks;
-    dynamic foo = findElement(compiler, "foo");
+    MethodElement foo = findElement(compiler, "foo");
     // Return type is null|bool.
     var mask = typesInferrer.getReturnTypeOfMember(foo);
     Expect.isTrue(mask.isNullable);
@@ -57,7 +57,7 @@
     var typesInferrer = compiler.globalInference.typesInferrerInternal;
     var closedWorld = typesInferrer.closedWorld;
     var commonMasks = closedWorld.commonMasks;
-    dynamic foo = findElement(compiler, "foo");
+    MethodElement foo = findElement(compiler, "foo");
     // Return type is null.
     var mask = typesInferrer.getReturnTypeOfMember(foo);
     Expect.isTrue(mask.isNullable);
diff --git a/tests/compiler/dart2js/type_inference8_test.dart b/tests/compiler/dart2js/type_inference8_test.dart
index e187635..1a77ca5 100644
--- a/tests/compiler/dart2js/type_inference8_test.dart
+++ b/tests/compiler/dart2js/type_inference8_test.dart
@@ -35,7 +35,7 @@
   return compiler.run(uri).then((_) {
     var typesInferrer = compiler.globalInference.typesInferrerInternal;
     var commonMasks = typesInferrer.closedWorld.commonMasks;
-    var element = findElement(compiler, "foo");
+    MemberElement element = findElement(compiler, "foo");
     var mask = typesInferrer.getReturnTypeOfMember(element);
     var falseType =
         new ValueTypeMask(commonMasks.boolType, new FalseConstantValue());
@@ -78,7 +78,7 @@
   return compiler.run(uri).then((_) {
     var typesInferrer = compiler.globalInference.typesInferrerInternal;
     var commonMasks = typesInferrer.closedWorld.commonMasks;
-    var element = findElement(compiler, "foo");
+    MemberElement element = findElement(compiler, "foo");
     var mask = typesInferrer.getReturnTypeOfMember(element);
     // Can't infer value for foo's return type, it could be either true or false
     Expect.identical(commonMasks.boolType, mask);
diff --git a/tests/compiler/dart2js/type_inference_switch_test.dart b/tests/compiler/dart2js/type_inference_switch_test.dart
index 56e468e..8b0b8e4 100644
--- a/tests/compiler/dart2js/type_inference_switch_test.dart
+++ b/tests/compiler/dart2js/type_inference_switch_test.dart
@@ -139,7 +139,7 @@
     var commonMasks = closedWorld.commonMasks;
 
     checkTypeOf(String name, TypeMask type) {
-      var element = findElement(compiler, name);
+      MemberElement element = findElement(compiler, name);
       var mask = typesInferrer.getReturnTypeOfMember(element);
       Expect.equals(type, simplify(mask, closedWorld));
     }
diff --git a/tests/compiler/dart2js/type_mask2_test.dart b/tests/compiler/dart2js/type_mask2_test.dart
index 524a400..5c6e159 100644
--- a/tests/compiler/dart2js/type_mask2_test.dart
+++ b/tests/compiler/dart2js/type_mask2_test.dart
@@ -100,7 +100,7 @@
         new D();
         new E();
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
 
   ClosedWorld closedWorld = env.closedWorld;
 
@@ -210,7 +210,7 @@
         '' is String;
       }
       """,
-      useMockCompiler: false);
+      compileMode: CompileMode.memory);
   ClosedWorld closedWorld = env.closedWorld;
 
   ClassElement Object_ = env.getElement("Object");
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index 8250f02..a90b3c8 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -6,31 +6,32 @@
 
 import 'dart:async';
 import 'package:expect/expect.dart';
-import 'compiler_helper.dart' as mock;
-import 'memory_compiler.dart' as memory;
 import 'package:compiler/src/common/resolution.dart';
 import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/elements/resolution_types.dart';
+import 'package:compiler/src/elements/types.dart';
 import 'package:compiler/src/compiler.dart' show Compiler;
+import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/elements/elements.dart'
-    show
-        Element,
-        MemberElement,
-        TypeDeclarationElement,
-        ClassElement,
-        LibraryElement;
+    show Element, MemberElement, ClassElement, LibraryElement, TypedefElement;
 import 'package:compiler/src/world.dart' show ClosedWorld;
+import 'compiler_helper.dart' as mock;
+import 'memory_compiler.dart' as memory;
+import 'kernel/compiler_helper.dart' as dill;
 
-GenericType instantiate(
-    TypeDeclarationElement element, List<ResolutionDartType> arguments) {
-  if (element.isClass) {
+DartType instantiate(Entity element, List<DartType> arguments) {
+  if (element is ClassElement) {
     return new ResolutionInterfaceType(element, arguments);
+  } else if (element is ClassEntity) {
+    return new InterfaceType(element, arguments);
   } else {
-    assert(element.isTypedef);
+    assert(element is TypedefElement);
     return new ResolutionTypedefType(element, arguments);
   }
 }
 
+enum CompileMode { mock, memory, dill }
+
 class TypeEnvironment {
   final Compiler compiler;
 
@@ -39,11 +40,12 @@
   Types get types => resolution.types;
 
   static Future<TypeEnvironment> create(String source,
-      {bool useMockCompiler: true,
+      {CompileMode compileMode: CompileMode.mock,
+      bool useDillCompiler: false,
       bool expectNoErrors: false,
       bool expectNoWarningsOrErrors: false,
       bool stopAfterTypeInference: false,
-      String mainSource}) {
+      String mainSource}) async {
     Uri uri;
     Compiler compiler;
     bool stopAfterTypeInference = mainSource != null;
@@ -55,37 +57,56 @@
       source = '$mainSource\n$source';
     }
     memory.DiagnosticCollector collector;
-    if (useMockCompiler) {
-      uri = new Uri(scheme: 'source');
-      mock.MockCompiler mockCompiler = mock.compilerFor(source, uri,
-          analyzeAll: !stopAfterTypeInference,
-          analyzeOnly: !stopAfterTypeInference);
-      mockCompiler.diagnosticHandler = mock.createHandler(mockCompiler, source);
-      collector = mockCompiler.diagnosticCollector;
-      compiler = mockCompiler;
-    } else {
+    if (compileMode == CompileMode.dill) {
       collector = new memory.DiagnosticCollector();
       uri = Uri.parse('memory:main.dart');
-      compiler = memory.compilerFor(
+      compiler = await dill.compileWithDill(
           entryPoint: uri,
           memorySourceFiles: {'main.dart': source},
           diagnosticHandler: collector,
           options: stopAfterTypeInference
-              ? []
-              : [Flags.analyzeAll, Flags.analyzeOnly]);
+              ? [Flags.disableTypeInference]
+              : [
+                  Flags.disableTypeInference,
+                  Flags.analyzeAll,
+                  Flags.analyzeOnly
+                ],
+          beforeRun: (Compiler compiler) {
+            compiler.stopAfterTypeInference = stopAfterTypeInference;
+          });
+    } else {
+      if (compileMode == CompileMode.mock) {
+        uri = new Uri(scheme: 'source');
+        mock.MockCompiler mockCompiler = mock.compilerFor(source, uri,
+            analyzeAll: !stopAfterTypeInference,
+            analyzeOnly: !stopAfterTypeInference);
+        mockCompiler.diagnosticHandler =
+            mock.createHandler(mockCompiler, source);
+        collector = mockCompiler.diagnosticCollector;
+        compiler = mockCompiler;
+      } else {
+        collector = new memory.DiagnosticCollector();
+        uri = Uri.parse('memory:main.dart');
+        compiler = memory.compilerFor(
+            entryPoint: uri,
+            memorySourceFiles: {'main.dart': source},
+            diagnosticHandler: collector,
+            options: stopAfterTypeInference
+                ? []
+                : [Flags.analyzeAll, Flags.analyzeOnly]);
+      }
+      compiler.stopAfterTypeInference = stopAfterTypeInference;
+      await compiler.run(uri);
     }
-    compiler.stopAfterTypeInference = stopAfterTypeInference;
-    return compiler.run(uri).then((_) {
-      if (expectNoErrors || expectNoWarningsOrErrors) {
-        var errors = collector.errors;
-        Expect.isTrue(errors.isEmpty, 'Unexpected errors: ${errors}');
-      }
-      if (expectNoWarningsOrErrors) {
-        var warnings = collector.warnings;
-        Expect.isTrue(warnings.isEmpty, 'Unexpected warnings: ${warnings}');
-      }
-      return new TypeEnvironment._(compiler);
-    });
+    if (expectNoErrors || expectNoWarningsOrErrors) {
+      var errors = collector.errors;
+      Expect.isTrue(errors.isEmpty, 'Unexpected errors: ${errors}');
+    }
+    if (expectNoWarningsOrErrors) {
+      var warnings = collector.warnings;
+      Expect.isTrue(warnings.isEmpty, 'Unexpected warnings: ${warnings}');
+    }
+    return new TypeEnvironment._(compiler);
   }
 
   TypeEnvironment._(Compiler this.compiler);
@@ -103,7 +124,17 @@
     return element;
   }
 
-  ClassElement getClass(String name) => getElement(name);
+  ClassEntity getClass(String name) {
+    LibraryEntity mainLibrary =
+        compiler.frontendStrategy.elementEnvironment.mainLibrary;
+    ClassEntity element = compiler.frontendStrategy.elementEnvironment
+        .lookupClass(mainLibrary, name);
+    Expect.isNotNull(element);
+    if (element is ClassElement) {
+      element.ensureResolved(compiler.resolution);
+    }
+    return element;
+  }
 
   ResolutionDartType getElementType(String name) {
     dynamic element = getElement(name);
diff --git a/tests/compiler/dart2js/union_type_test.dart b/tests/compiler/dart2js/union_type_test.dart
index 1c9ec4a..8f6259a 100644
--- a/tests/compiler/dart2js/union_type_test.dart
+++ b/tests/compiler/dart2js/union_type_test.dart
@@ -18,7 +18,7 @@
         new A();
         new B();
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
     ClosedWorld world = env.closedWorld;
     FlatTypeMask mask1 = new FlatTypeMask.exact(env.getClass('A'));
     FlatTypeMask mask2 = new FlatTypeMask.exact(env.getClass('B'));
diff --git a/tests/compiler/dart2js/world_test.dart b/tests/compiler/dart2js/world_test.dart
index efeed19..35020cb 100644
--- a/tests/compiler/dart2js/world_test.dart
+++ b/tests/compiler/dart2js/world_test.dart
@@ -47,7 +47,7 @@
         html.window;
         new html.Worker('');
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
   ClosedWorld closedWorld = env.closedWorld;
 
   ClassElement Object_ = env.getElement("Object");
@@ -233,7 +233,7 @@
         new G3();
         new H4();
       }
-      """, useMockCompiler: false);
+      """, compileMode: CompileMode.memory);
   ClosedWorld closedWorld = env.closedWorld;
 
   check(String name, {bool hasStrictSubtype, bool hasOnlySubclasses}) {
@@ -310,7 +310,7 @@
             ..getContext(''); // Creates CanvasRenderingContext2D
       }
       """,
-      useMockCompiler: false);
+      compileMode: CompileMode.memory);
   ClosedWorld closedWorld = env.closedWorld;
   LibraryElement dart_html =
       env.compiler.libraryLoader.lookupLibrary(Uris.dart_html);
@@ -532,7 +532,7 @@
         new J();
       }
       """,
-      useMockCompiler: false);
+      compileMode: CompileMode.memory);
   ClosedWorld closedWorld = env.closedWorld;
 
   ClassElement A = env.getElement("A");
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index abcd704..3625aaf 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -170,16 +170,12 @@
 [ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
 10216a_test: Crash
 10216b_test: Crash
-11673_test: Crash
-12320_test: Crash
 16400_test: Crash
 17856_test: Crash
 19191_test: Crash
 21166_test: Crash
-21579_test: Crash
 21666_test: Crash
 21724_test: Crash
-22487_test: Crash
 22776_test: Crash
 22868_test: Crash
 22917_test: Crash
@@ -187,12 +183,9 @@
 23404_test: Crash
 23432_test: Crash
 23432b_test: Crash # type 'KMethod' is not a subtype of type 'MemberElement' of 'member' where
-23804_test: Crash
 23828_test: Crash
 26243_test: Crash
-28749_test: Crash
 28919_test: Crash
-LayoutTests_fast_mediastream_getusermedia_t01_test/none: Crash
 assert_with_message_test: Crash
 async_stacktrace_test: Crash
 big_allocation_expression_test: Crash
@@ -240,6 +233,8 @@
 deferred/deferred_mirrors1_test: CompileTimeError
 deferred/deferred_mirrors2_test: Crash
 deferred/deferred_overlapping_test: CompileTimeError
+deferred/interface_type_variable_test: CompileTimeError
+deferred/uninstantiated_type_variable_test: CompileTimeError
 deferred_custom_loader_test: CompileTimeError
 deferred_fail_and_retry_test: CompileTimeError
 deferred_fail_and_retry_worker_test: CompileTimeError
@@ -323,18 +318,17 @@
 regress/4639_test: Crash
 regress/4740_test: Crash
 round_constant_folding_test: Crash
-runtime_type_int_test: Crash
 string_interpolation_dynamic_test: RuntimeError
 string_interpolation_test: RuntimeError
 super_constructor1_test: Crash
 switch_test/none: Crash
 this_phi_elimination_test: Crash
-timer_negative_test: Crash
+23404_test: RuntimeError
 timer_test: Crash
 truncation_errors_test: Crash
 type_argument_factory_crash_test: Crash
 type_argument_factory_nocrash_test: Crash
-type_constant_switch_test/01: Crash
+type_constant_switch_test/01: MissingCompileTimeError
 type_error_message_test: Crash
 unconditional_dartio_import_test: CompileTimeError
 useful_error_message_1_test: Crash
@@ -342,7 +336,6 @@
 [ $compiler == dart2js && $dart2js_with_kernel && $minified ]
 10216a_test: Crash # Assertion failure: Super constructor for k:constructor(B.) not found.
 10216b_test: Crash # Assertion failure: Super constructor for k:constructor(B.) not found.
-11673_test: Crash # UnimplementedError: KernelClosedWorldMixin.getAppliedMixin
 16400_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0
 17856_test: Crash # Assertion failure: Cannot find value local(Maps_mapToString_closure.call#first) in (local(Maps_mapToString_closure.call#k), local(Maps_mapToString_closure.call#v), local(Maps.mapToString#)) for j:closure_call(Maps_mapToString_closure.call).
 19191_test: Crash # NoSuchMethodError: Class 'KMethod' has no instance getter 'memberContext'.
@@ -407,6 +400,8 @@
 deferred/deferred_mirrors1_test: CompileTimeError
 deferred/deferred_mirrors2_test: Crash # UnimplementedError: KernelClosedWorldMixin.getAppliedMixin
 deferred/deferred_overlapping_test: CompileTimeError
+deferred/interface_type_variable_test: CompileTimeError
+deferred/uninstantiated_type_variable_test: CompileTimeError
 deferred_custom_loader_test: CompileTimeError
 deferred_fail_and_retry_test: CompileTimeError
 deferred_fail_and_retry_worker_test: CompileTimeError
diff --git a/tests/compiler/dart2js_extra/deferred/interface_type_variable_lib.dart b/tests/compiler/dart2js_extra/deferred/interface_type_variable_lib.dart
new file mode 100644
index 0000000..fb18b05
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/interface_type_variable_lib.dart
@@ -0,0 +1,15 @@
+// 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.
+
+class A {}
+
+class I<T> {}
+
+// C needs to include "N", otherwise checking for `is I<A>` will likely cause
+// problems
+class C extends A implements I<N> {}
+
+class N extends A {}
+
+doCheck(x) => x is I<A>;
diff --git a/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
new file mode 100644
index 0000000..df522df
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
@@ -0,0 +1,20 @@
+// 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 'package:expect/expect.dart';
+import 'interface_type_variable_lib.dart' deferred as lib;
+
+/// Regression test: if a type variable is used, but not instantiated, it still
+/// needs to be mapped to the deferred unit where it is used.
+///
+/// If not, we may include it in the main unit and may not see that the base
+/// class is not added to the main unit.
+main() {
+  lib.loadLibrary().then((_) {
+    lib.doCheck(dontInline(new lib.C()));
+  });
+}
+
+@NoInline()
+dontInline(x) => x;
diff --git a/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart
new file mode 100644
index 0000000..2af788d
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart
@@ -0,0 +1,26 @@
+// 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.
+
+// All of these types are considered instantiated because we create an instance
+// of [C].
+
+class A {}
+
+class Box<T> {
+  int value;
+}
+
+class B<T> extends A {
+  final box = new Box<T>();
+}
+
+class C extends B<N> {}
+
+// N is not instantiated, but used as a type argument in C and indirectly in a
+// Box<N>.
+// If we don't mark it as part of the output unit of C, we accidentally add it
+// to the main output unit. However, A is in the output unit of C so we fail
+// when trying to finalize the declaration of N while loading the main output
+// unit.
+class N extends A {}
diff --git a/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart
new file mode 100644
index 0000000..17f6045
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart
@@ -0,0 +1,20 @@
+// 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 'package:expect/expect.dart';
+import 'uninstantiated_type_variable_lib.dart' deferred as lib;
+
+/// Regression test: if a type variable is used, but not instantiated, it still
+/// needs to be mapped to the deferred unit where it is used.
+///
+/// If not, we may include it in the main unit and may not see that the base
+/// class is not added to the main unit.
+main() {
+  lib.loadLibrary().then((_) {
+    dontInline(new lib.C()).box.value;
+  });
+}
+
+@NoInline()
+dontInline(x) => x;
diff --git a/tests/compiler/dart2js_native/dart2js_native.status b/tests/compiler/dart2js_native/dart2js_native.status
index 934d1ec..31e735eb 100644
--- a/tests/compiler/dart2js_native/dart2js_native.status
+++ b/tests/compiler/dart2js_native/dart2js_native.status
@@ -156,7 +156,6 @@
 internal_library_test: Crash
 is_check_test: CompileTimeError
 issue9182_test: Crash
-js_constant_test: Crash
 jsobject_test: Crash
 load_elim_refinement_test: CompileTimeError
 mirror_intercepted_field_test: CompileTimeError
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index a8a8ace..268d1d9 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -9,16 +9,12 @@
 string_case_test/01: Fail # Bug 18061
 
 [ $compiler == dart2js && ! $dart2js_with_kernel ]
-int_parse_radix_test/01: Pass, Fail # JS implementations disagree on U+0085 being whitespace.
-int_parse_radix_test/02: Fail # No bigints.
-integer_to_radix_string_test: RuntimeError # issue 22045
 
 [ $runtime == safari || $runtime == safarimobilesim ]
 string_trimlr_test/02: RuntimeError # Uses Unicode 6.2.0 or earlier.
 
 [ $compiler == dart2js && ! $dart2js_with_kernel ]
 error_stack_trace1_test: RuntimeError # Issue 12399
-integer_to_string_test/01: RuntimeError # Issue 1533
 iterable_return_type_test/01: RuntimeError # Issue 20085
 iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
 
@@ -30,9 +26,7 @@
 *: Fail, Pass # TODO(ahe): Triage these tests.
 
 [ $compiler == dart2analyzer ]
-int_parse_radix_bad_handler_test: fail
 error_stack_trace_test: StaticWarning, OK # Test generates errors on purpose.
-iterable_element_at_test: StaticWarning, OK # Test generates errors on purpose.
 string_test: StaticWarning, OK # Test generates error on purpose.
 duration2_test: StaticWarning, OK # Test generates error on purpose.
 
@@ -55,10 +49,8 @@
 [ $mode == debug ]
 
 [ ($runtime == vm || $runtime == dart_precompiled) && $arch == simarmv5te ]
-int_parse_radix_test/*: Pass, Slow
 
 [ $compiler == precompiler ]
-int_parse_radix_test: Pass, Timeout # --no_intrinsify
 
 [ $compiler == precompiler || $compiler == app_jit ]
 file_resource_test: Skip # Resolve URI not supported yet in product mode.
@@ -108,21 +100,6 @@
 growable_list_test: Crash
 has_next_iterator_test: Crash
 hash_map2_test: Crash
-int_parse_radix_bad_handler_test: Crash
-int_parse_radix_test/01: Crash
-int_parse_radix_test/02: Crash
-int_parse_radix_test/none: Crash
-integer_to_radix_string_test: Crash
-integer_to_string_test/01: RuntimeError
-is_operator_basic_types_test: Crash
-iterable_contains2_test: Crash
-iterable_contains_test: Crash
-iterable_element_at_test: Crash
-iterable_empty_test: Crash
-iterable_expand_test: Crash
-iterable_first_test: Crash
-iterable_first_where_test: Crash
-iterable_fold_test: Crash
 iterable_generate_test/01: Crash
 iterable_generate_test/none: Crash
 iterable_join_test: Crash
diff --git a/tests/corelib/int_parse_radix_bad_handler_test.dart b/tests/corelib/int_parse_radix_bad_handler_test.dart
deleted file mode 100644
index 58009fa..0000000
--- a/tests/corelib/int_parse_radix_bad_handler_test.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-void main() {
-  // If handleError isn't an unary function, and it's called, it also throws
-  // (either TypeError in checked mode, or some failure in unchecked mode).
-
-  // These are compile time errors for strong mode.
-  Expect.throws(() => int.parse("9", radix: 8, onError: "not a function"));
-  Expect.throws(() => int.parse("9", radix: 8, onError: () => 42));
-  Expect.throws(() => int.parse("9", radix: 8, onError: (v1, v2) => 42));
-}
diff --git a/tests/corelib/int_parse_radix_test.dart b/tests/corelib/int_parse_radix_test.dart
deleted file mode 100644
index 0757b96..0000000
--- a/tests/corelib/int_parse_radix_test.dart
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-import "dart:math" show pow;
-
-void main() {
-  const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20"
-    "\x85" //   //# 01: ok
-      "\xa0";
-  const String whiteSpace = "$oneByteWhiteSpace\u1680"
-      "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a"
-      "\u2028\u2029\u202f\u205f\u3000\ufeff";
-
-  var digits = "0123456789abcdefghijklmnopqrstuvwxyz";
-  var zeros = "0" * 64;
-
-  for (int i = 0; i < whiteSpace.length; i++) {
-    var ws = whiteSpace[i];
-    Expect.equals(0, int.parse("${ws}0${ws}", radix: 2));
-  }
-
-  void testParse(int result, String radixString, int radix) {
-    var m = "$radixString/$radix->$result";
-    Expect.equals(
-        result, int.parse(radixString.toLowerCase(), radix: radix), m);
-    Expect.equals(
-        result, int.parse(radixString.toUpperCase(), radix: radix), m);
-    Expect.equals(result, int.parse(" $radixString", radix: radix), m);
-    Expect.equals(result, int.parse("$radixString ", radix: radix), m);
-    Expect.equals(result, int.parse(" $radixString ", radix: radix), m);
-    Expect.equals(result, int.parse("+$radixString", radix: radix), m);
-    Expect.equals(result, int.parse(" +$radixString", radix: radix), m);
-    Expect.equals(result, int.parse("+$radixString ", radix: radix), m);
-    Expect.equals(result, int.parse(" +$radixString ", radix: radix), m);
-    Expect.equals(-result, int.parse("-$radixString", radix: radix), m);
-    Expect.equals(-result, int.parse(" -$radixString", radix: radix), m);
-    Expect.equals(-result, int.parse("-$radixString ", radix: radix), m);
-    Expect.equals(-result, int.parse(" -$radixString ", radix: radix), m);
-    Expect.equals(
-        result,
-        int.parse("$oneByteWhiteSpace$radixString$oneByteWhiteSpace",
-            radix: radix),
-        m);
-    Expect.equals(
-        -result,
-        int.parse("$oneByteWhiteSpace-$radixString$oneByteWhiteSpace",
-            radix: radix),
-        m);
-    Expect.equals(result,
-        int.parse("$whiteSpace$radixString$whiteSpace", radix: radix), m);
-    Expect.equals(-result,
-        int.parse("$whiteSpace-$radixString$whiteSpace", radix: radix), m);
-
-    Expect.equals(result, int.parse("$zeros$radixString", radix: radix), m);
-    Expect.equals(result, int.parse("+$zeros$radixString", radix: radix), m);
-    Expect.equals(-result, int.parse("-$zeros$radixString", radix: radix), m);
-  }
-
-  for (int r = 2; r <= 36; r++) {
-    for (int i = 0; i <= r * r; i++) {
-      String radixString = i.toRadixString(r);
-      testParse(i, radixString, r);
-    }
-  }
-
-  for (int i = 2; i <= 36; i++) { //             //# 02: ok
-    // Test with bignums. //                     //# 02: continued
-    var digit = digits[i - 1]; //                //# 02: continued
-    testParse(pow(i, 64) - 1, digit * 64, i); // //# 02: continued
-    testParse(0, zeros, i); //                   //# 02: continued
-  } //                                           //# 02: continued
-
-  // Allow both upper- and lower-case letters.
-  Expect.equals(0xABCD, int.parse("ABCD", radix: 16));
-  Expect.equals(0xABCD, int.parse("abcd", radix: 16));
-  Expect.equals(15628859, int.parse("09azAZ", radix: 36));
-  // Big number.
-  Expect.equals(0x12345678123456781234567812345678, // //# 02: continued
-                int.parse("0x1234567812345678" //      //# 02: continued
-                          "1234567812345678")); //     //# 02: continued
-  // Allow whitespace before and after the number.
-  Expect.equals(1, int.parse(" 1", radix: 2));
-  Expect.equals(1, int.parse("1 ", radix: 2));
-  Expect.equals(1, int.parse(" 1 ", radix: 2));
-  Expect.equals(1, int.parse("\n1", radix: 2));
-  Expect.equals(1, int.parse("1\n", radix: 2));
-  Expect.equals(1, int.parse("\n1\n", radix: 2));
-  Expect.equals(1, int.parse("+1", radix: 2));
-
-  void testFails(String source, int radix) {
-    Expect.throws(() {
-      throw int.parse(source, radix: radix, onError: (s) {
-        throw "FAIL";
-      });
-    }, isFail, "$source/$radix");
-    Expect.equals(-999, int.parse(source, radix: radix, onError: (s) => -999));
-  }
-
-  for (int i = 2; i < 36; i++) {
-    var char = i.toRadixString(36);
-    testFails(char.toLowerCase(), i);
-    testFails(char.toUpperCase(), i);
-  }
-  testFails("", 2);
-  testFails("+ 1", 2); // No space between sign and digits.
-  testFails("- 1", 2); // No space between sign and digits.
-  testFails("0x", null);
-  for (int i = 2; i <= 33; i++) {
-    // No 0x specially allowed.
-    // At radix 34 and above, "x" is a valid digit.
-    testFails("0x10", i);
-  }
-
-  testBadTypes(var source, var radix) {
-    if (!typeAssertionsEnabled) {
-      // No promises on what error is thrown if the type doesn't match.
-      // Likely either ArgumentError or NoSuchMethodError.
-      Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0));
-      return;
-    }
-    // With type assertions enabled we can be more precise.
-    Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0),
-        (e) => e is TypeError || e is CastError);
-  }
-
-  testBadTypes(9, 10);
-  testBadTypes(true, 10);
-  testBadTypes("0", true);
-  testBadTypes("0", "10");
-
-  testBadArguments(String source, int radix) {
-    // If the types match, it should be an ArgumentError of some sort.
-    Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0),
-        (e) => e is ArgumentError);
-  }
-
-  testBadArguments("0", -1);
-  testBadArguments("0", 0);
-  testBadArguments("0", 1);
-  testBadArguments("0", 37);
-
-  // See also int_parse_radix_bad_handler_test.dart
-}
-
-bool isFail(e) => e == "FAIL";
diff --git a/tests/corelib/iterable_empty_test.dart b/tests/corelib/iterable_empty_test.dart
deleted file mode 100644
index 7922198..0000000
--- a/tests/corelib/iterable_empty_test.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart";
-
-main() {
-  testEmpty(name, it, [depth = 2]) {
-    Expect.isTrue(it.isEmpty, name);
-    Expect.isFalse(it.isNotEmpty, name);
-    Expect.equals(0, it.length, name);
-    Expect.isFalse(it.contains(null), name);
-    Expect.isFalse(it.any((x) => true), name);
-    Expect.isTrue(it.every((x) => false), name);
-    Expect.throws(() => it.first, (e) => e is StateError, name);
-    Expect.throws(() => it.last, (e) => e is StateError, name);
-    Expect.throws(() => it.single, (e) => e is StateError, name);
-    Expect.throws(() => it.elementAt(0), (e) => e is RangeError, name);
-    Expect.throws(() => it.reduce((a, b) => a), (e) => e is StateError, name);
-    Expect.throws(
-        () => it.singleWhere((_) => true), (e) => e is StateError, name);
-    Expect.equals(42, it.fold(42, (a, b) => "not 42"), name);
-    Expect.equals(42, it.firstWhere((v) => true, orElse: () => 42), name);
-    Expect.equals(42, it.lastWhere((v) => true, orElse: () => 42), name);
-    Expect.equals("", it.join("separator"), name);
-    Expect.equals("()", it.toString(), name);
-    Expect.listEquals([], it.toList(), name);
-    Expect.listEquals([], it.toList(growable: false), name);
-    Expect.listEquals([], it.toList(growable: true), name);
-    Expect.equals(0, it.toSet().length, name);
-    // Doesn't throw:
-    it.forEach((v) => throw v);
-    for (var v in it) {
-      throw v;
-    }
-    // Check that returned iterables are also empty.
-    if (depth > 0) {
-      testEmpty("$name-map", it.map((x) => x), depth - 1);
-      testEmpty("$name-where", it.where((x) => true), depth - 1);
-      testEmpty("$name-expand", it.expand((x) => [x]), depth - 1);
-      testEmpty("$name-skip", it.skip(1), depth - 1);
-      testEmpty("$name-take", it.take(2), depth - 1);
-      testEmpty("$name-skipWhile", it.skipWhile((v) => false), depth - 1);
-      testEmpty("$name-takeWhile", it.takeWhile((v) => true), depth - 1);
-    }
-  }
-
-  testType(name, it, [depth = 2]) {
-    Expect.isTrue(it is Iterable<int>, name);
-    Expect.isFalse(it is Iterable<String>, name);
-    if (depth > 0) {
-      testType("$name-where", it.where((_) => true), depth - 1);
-      testType("$name-skip", it.skip(1), depth - 1);
-      testType("$name-take", it.take(1), depth - 1);
-      testType("$name-skipWhile", it.skipWhile((_) => false), depth - 1);
-      testType("$name-takeWhile", it.takeWhile((_) => true), depth - 1);
-      testType("$name-toList", it.toList(), depth - 1);
-      testType("$name-toList", it.toList(growable: false), depth - 1);
-      testType("$name-toList", it.toList(growable: true), depth - 1);
-      testType("$name-toSet", it.toSet(), depth - 1);
-    }
-  }
-
-  test(name, it) {
-    testEmpty(name, it);
-    testType(name, it);
-  }
-
-  test("const", const Iterable<int>.empty());
-  test("new", new Iterable<int>.empty());
-}
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index 32dbf25..46e0ef21 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -19,6 +19,9 @@
 string_replace_static_test: MissingCompileTimeError
 string_static_test: MissingCompileTimeError
 
+[ (!$checked && $runtime == vm) || (!$checked && $compiler == dart2js) || $compiler == precompiler ]
+int_parse_radix_test/badTypes: RuntimeError # wrong exception returned
+
 [ !$strong && !$checked ]
 core_runtime_types_static_test: MissingCompileTimeError
 splay_tree_test/01: MissingCompileTimeError
@@ -27,6 +30,9 @@
 string_replace_static_test: MissingCompileTimeError
 string_static_test: MissingCompileTimeError
 
+[ $runtime == vm || $compiler == precompiler || $compiler == dart2js ]
+int_parse_radix_bad_handler_test: MissingCompileTimeError
+
 [ $compiler == dart2analyzer && !$strong ]
 symbol_reserved_word_test/05: MissingCompileTimeError # Issue 30245
 
@@ -65,6 +71,7 @@
 dynamic_nosuchmethod_test: SkipByDesign
 big_integer_huge_mul_vm_test: Pass, Timeout # --no_intrinsify
 regexp/stack-overflow_test: RuntimeError, OK # Smaller limit with irregex interpreter
+int_parse_radix_test: Pass, Timeout # --no_intrinsify
 
 [ $compiler == dart2js && $runtime != none && !$checked ]
 growable_list_test: RuntimeError # Concurrent modifications test always runs
@@ -144,7 +151,6 @@
 int_parse_with_limited_ints_test: Skip # dartdevc doesn't know about --limit-ints-to-64-bits
 typed_data_with_limited_ints_test: Skip # dartdevc doesn't know about --limit-ints-to-64-bits
 int_modulo_arith_test/none: RuntimeError # Issue 29921
-list_unmodifiable_test: RuntimeError # Issue 29921, strong mode cast failure
 
 [ ($compiler == dart2js || $compiler == dartdevc) && $runtime != none ]
 big_integer_arith_vm_test: RuntimeError # Issues 10245, 30170
@@ -163,13 +169,17 @@
 
 [ $compiler == dart2js && $runtime != none ]
 nan_infinity_test/01: RuntimeError
+integer_to_string_test/01: RuntimeError
 iterable_to_set_test: RuntimeError # is-checks do not implement strong mode type system
+int_parse_radix_test/01: RuntimeError
+int_parse_radix_test/02: RuntimeError
 
 [ $compiler == dart2js && $runtime == drt && $csp && $minified ]
 core_runtime_types_test: Pass, Fail # Issue 27913
 
 [ $compiler != dartdevc ]
 error_stack_trace_test/static: MissingCompileTimeError
+iterable_element_at_test/static: MissingCompileTimeError
 
 [ $compiler == dartdevc && $runtime != none ]
 error_stack_trace_test/nullThrown: RuntimeError # .stackTrace not present for exception caught from 'throw null;'
@@ -182,6 +192,12 @@
 core_runtime_types_test: RuntimeError # Issue 29921 - runtime cast failure
 string_fromcharcodes_test: RuntimeError # Issue 29921 - runtime cast failure
 uri_query_test: RuntimeError # Issue 29921 - runtime cast failure
+int_parse_radix_test/01: RuntimeError # Issue 29921
+int_parse_radix_test/02: RuntimeError # Issue 29921
+integer_to_radix_string_test: RuntimeError # Issue 29921
+integer_to_string_test/01: RuntimeError # Issue 29921
+iterable_fold_test/01: CompileTimeError # type inference problem
+iterable_fold_test/02: RuntimeError # different type inference problem
 
 [ $runtime == flutter ]
 apply3_test: CompileTimeError # mirrors not supported
@@ -290,8 +306,13 @@
 double_parse_test/02: Fail, OK
 unicode_test: Fail
 
+[ $runtime == ff && $system == windows ]
+unicode_test: Pass # When Linux FF updates to 55, remove the fail status from FF in the other status line for this file.
+string_case_test/01: Pass # When Linux FF updates to 55, remove the fail status from FF in the other status line for this file.
+
 [ ($runtime == vm || $runtime == dart_precompiled) && $arch == simarmv5te ]
 big_integer_parsed_mul_div_vm_test: Pass, SloW
+int_parse_radix_test/*: Pass, Slow
 
 [ $compiler == precompiler ]
 big_integer_parsed_mul_div_vm_test: Pass, Timeout # --no_intrinsify
@@ -315,6 +336,7 @@
 
 [ $compiler == dart2js ]
 hash_set_test/01: RuntimeError # Issue 11551
+integer_to_radix_string_test: RuntimeError # Issue 29921
 string_static_test: MissingCompileTimeError
 
 [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && $runtime != drt ]
@@ -423,7 +445,7 @@
 string_base_vm_static_test: MissingCompileTimeError
 
 [ $compiler == dart2js && ($runtime == ff || $runtime == jsshell) ]
-string_case_test/01: Fail, OK # Bug in Firefox.
+string_case_test/01: Fail, OK # Bug in Firefox. Change to jsshell fail only once linux updates to 55.
 regexp/UC16_test: RuntimeError
 
 [ $compiler == none && $runtime == drt ]
@@ -499,14 +521,40 @@
 int_modulo_arith_test/bignum: Crash
 int_modulo_arith_test/modPow: Crash
 int_modulo_arith_test/none: Crash
+int_parse_radix_bad_handler_test: Crash
+int_parse_radix_test/01: Crash
+int_parse_radix_test/02: Crash
+int_parse_radix_test/none: Crash
+integer_to_string_test/01: Crash
+double_ceil2_test: Crash # Assertion failure: Cannot find value local(unwrapException_closure.call#ex) in (local(unwrapException_closure.call#error), local(unwrapException#saveStackTrace), local(unwrapException_closure.call#thrownStackTrace)) for j:closure_call(unwrapException_closure.call).
+int_parse_radix_test/badTypes: Crash # 'file:///usr/local/google/home/sigmund/dart/git_all/sdk/pkg/compiler/lib/src/js_model/closure.dart': Failed assertion: line 185 pos 12: 'closure != null': Corresponding closure class not found for local(main_closure.call#). Closures found for (j:closure_call(Closure_fromTearOff_closure.call), local(Closure.fromTearOff#), j:closure_call(Maps_mapToString_closure.call), ..., j:closure_call(unwrapException_closure.call), local(unwrapException#saveStackTrace))
+integer_to_radix_string_test: Crash # Assertion failure: Cannot find value local(unwrapException_closure.call#ex) in (local(unwrapException_closure.call#error), local(unwrapException#saveStackTrace), local(unwrapException_closure.call#thrownStackTrace)) for j:closure_call(unwrapException_closure.call).
+is_operator_basic_types_test: Crash
+iterable_contains2_test: Crash
+iterable_contains_test: Crash
+iterable_element_at_test: Crash
+iterable_empty_test: Crash
+iterable_expand_test: Crash
+iterable_first_test: Crash
+iterable_first_where_test: Crash
+iterable_fold_test: Crash
+iterable_skip_while_test: Crash
 iterable_skip_while_test: Crash
 iterable_take_test: Crash
+iterable_take_test: Crash
+iterable_take_while_test: Crash
 iterable_take_while_test: Crash
 iterable_test: Crash
+iterable_test: Crash
+iterable_to_list_test/01: Crash
 iterable_to_list_test/01: Crash
 iterable_to_list_test/none: Crash
+iterable_to_list_test/none: Crash
+iterable_to_set_test: Crash
 iterable_to_set_test: Crash
 iterable_tostring_test: Crash
+iterable_tostring_test: Crash
+json_map_test: Crash
 json_map_test: Crash
 linked_hash_map_from_iterables_test: Crash
 linked_hash_map_test: Crash
@@ -534,7 +582,6 @@
 list_test/01: Crash
 list_test/none: Crash
 list_to_string2_test: Crash
-list_to_string_test: Crash
 list_unmodifiable_test: Crash
 main_test: Crash
 map_contains_key_test: Crash
@@ -595,8 +642,6 @@
 regexp/standalones_test: Crash
 regexp/unicode-handling_test: Crash
 regexp/unicodeCaseInsensitive_test: Crash
-regress_11099_test: Crash # type 'FunctionType' is not a subtype of type 'ResolutionFunctionType' of 'type' where
-safe_to_string_test: Crash # type 'InterfaceType' is not a subtype of type 'ResolutionDartType' of 'type' where
 set_containsAll_test: Crash
 set_contains_test: Crash
 set_intersection_test: Crash
@@ -654,7 +699,6 @@
 symbol_test/02: Crash
 symbol_test/03: Crash
 symbol_test/none: Crash
-type_hashcode_test: Crash
 unicode2_test: Crash
 uri_base_test: Crash
 uri_file_test: Crash
@@ -672,7 +716,6 @@
 
 [ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
 stopwatch_test: Crash
-type_hashcode_test: Crash
 map_contains_key_test: Crash
 map_index_test: Crash
 map_remove_test: Crash
@@ -777,6 +820,25 @@
 int_modulo_arith_test/bignum: Crash
 int_modulo_arith_test/modPow: Crash
 int_modulo_arith_test/none: Crash
+double_ceil2_test: Crash # Assertion failure: Cannot find value local(unwrapException_closure.call#ex) in (local(unwrapException_closure.call#error), local(unwrapException#saveStackTrace), local(unwrapException_closure.call#thrownStackTrace)) for j:closure_call(unwrapException_closure.call).
+int_parse_radix_bad_handler_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
+int_parse_radix_test/01: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
+int_parse_radix_test/02: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
+int_parse_radix_test/badTypes: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
+int_parse_radix_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
+integer_to_radix_string_test: Crash # Assertion failure: Cannot find value local(unwrapException_closure.call#ex) in (local(unwrapException_closure.call#error), local(unwrapException#saveStackTrace), local(unwrapException_closure.call#thrownStackTrace)) for j:closure_call(unwrapException_closure.call).
+is_operator_basic_types_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(CodeUnits.#E) in j:constructor(CodeUnits.).
+iterable_contains2_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
+iterable_contains_test: Crash # Assertion failure: Cannot find value local(test_closure.call#notInList) in (local(test_closure.call#list), local(test#testList), local(test_closure.call#i)) for j:closure_call(test_closure.call).
+iterable_element_at_test/none: Crash # Assertion failure: Cannot find value local(main_closure.call#set2) in (local(main#)) for j:closure_call(main_closure.call).
+iterable_element_at_test/static: Crash # Assertion failure: Cannot find value local(main_closure.call#set2) in (local(main#)) for j:closure_call(main_closure.call).
+iterable_empty_test: Crash # Assertion failure: Cannot find value local(main#testEmpty) in () for j:method(main).
+iterable_expand_test: Crash # UnimplementedError: KernelClosedWorldMixin.getAppliedMixin
+iterable_first_test: Crash # Assertion failure: Cannot find value local(main_closure.call#set2) in (local(main#)) for j:closure_call(main_closure.call).
+iterable_first_where_test: Crash # Assertion failure: Cannot find value local(main_closure.call#set2) in (local(main#)) for j:closure_call(main_closure.call).
+iterable_fold_test/01: Crash # Assertion failure: Super constructor for k:constructor(SplayTreeSet.) not found.
+iterable_fold_test/02: Crash # Assertion failure: Super constructor for k:constructor(SplayTreeSet.) not found.
+iterable_fold_test/none: Crash # Assertion failure: Super constructor for k:constructor(SplayTreeSet.) not found.
 iterable_skip_while_test: Crash # NoSuchMethodError: The getter 'enclosingClass' was called on null.
 iterable_take_test: Crash # Assertion failure: Cannot find value local(main_closure.call#set2) in (local(main#)) for j:closure_call(main_closure.call).
 iterable_take_while_test: Crash # NoSuchMethodError: The getter 'enclosingClass' was called on null.
@@ -812,7 +874,6 @@
 list_test/01: Crash
 list_test/none: Crash
 list_to_string2_test: Crash
-list_to_string_test: Crash
 list_unmodifiable_test: Crash
 main_test: Crash
 map_contains_key_test: Crash
@@ -972,3 +1033,19 @@
 [ $compiler == dart2js && ! $dart2js_with_kernel ]
 list_unmodifiable_test: Pass, RuntimeError # Issue 28712
 iterable_to_list_test/01: RuntimeError # Issue 26501
+
+[ $compiler == dart2analyzer ]
+int_parse_radix_bad_handler_test: MissingCompileTimeError
+iterable_element_at_test/static: Pass
+
+[ $compiler == dart2analyzer && $strong ]
+int_parse_radix_bad_handler_test: Pass
+
+[ $compiler == dart2analyzer && $strong && $checked ]
+iterable_fold_test/01: CompileTimeError
+
+[ $compiler == dart2analyzer && $checked && !$strong ]
+iterable_fold_test/01: Pass
+
+[ $compiler == dart2analyzer && $strong  && !$checked ]
+iterable_fold_test/01: CompileTimeError
diff --git a/tests/corelib_2/double_ceil2_test.dart b/tests/corelib_2/double_ceil2_test.dart
new file mode 100644
index 0000000..b82daec
--- /dev/null
+++ b/tests/corelib_2/double_ceil2_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2013, 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:expect/expect.dart';
+
+main() {
+  Expect.throws(() => double.INFINITY.ceil(), (e) => e is UnsupportedError);
+  Expect.throws(
+      () => double.NEGATIVE_INFINITY.ceil(), (e) => e is UnsupportedError);
+  Expect.throws(() => double.NAN.ceil(), (e) => e is UnsupportedError);
+}
diff --git a/tests/corelib_2/errors_test.dart b/tests/corelib_2/errors_test.dart
new file mode 100644
index 0000000..763b486
--- /dev/null
+++ b/tests/corelib_2/errors_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2015, 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:expect/expect.dart";
+
+// Test that error constructors do what they are documented as doing.
+
+main() {
+  Expect.equals("Invalid argument(s)", new ArgumentError().toString());
+  Expect.equals(
+      "Invalid argument(s): message", new ArgumentError("message").toString());
+  Expect.equals(
+      "Invalid argument: null", new ArgumentError.value(null).toString());
+  Expect.equals("Invalid argument: 42", new ArgumentError.value(42).toString());
+  Expect.equals(
+      "Invalid argument: \"bad\"", new ArgumentError.value("bad").toString());
+  Expect.equals("Invalid argument (foo): null",
+      new ArgumentError.value(null, "foo").toString());
+  Expect.equals("Invalid argument (foo): 42",
+      new ArgumentError.value(42, "foo").toString());
+  Expect.equals("Invalid argument (foo): message: 42",
+      new ArgumentError.value(42, "foo", "message").toString());
+  Expect.equals("Invalid argument: message: 42",
+      new ArgumentError.value(42, null, "message").toString());
+  Expect.equals("Invalid argument(s): Must not be null",
+      new ArgumentError.notNull().toString());
+  Expect.equals("Invalid argument(s) (foo): Must not be null",
+      new ArgumentError.notNull("foo").toString());
+
+  Expect.equals("RangeError", new RangeError(null).toString());
+  Expect.equals("RangeError: message", new RangeError("message").toString());
+  Expect.equals("RangeError: Value not in range: 42",
+      new RangeError.value(42).toString());
+  Expect.equals("RangeError (foo): Value not in range: 42",
+      new RangeError.value(42, "foo").toString());
+  Expect.equals("RangeError (foo): message: 42",
+      new RangeError.value(42, "foo", "message").toString());
+  Expect.equals("RangeError: message: 42",
+      new RangeError.value(42, null, "message").toString());
+
+  Expect.equals("RangeError: Invalid value: Not in range 2..9, inclusive: 42",
+      new RangeError.range(42, 2, 9).toString());
+  Expect.equals(
+      "RangeError (foo): Invalid value: Not in range 2..9, "
+      "inclusive: 42",
+      new RangeError.range(42, 2, 9, "foo").toString());
+  Expect.equals("RangeError (foo): message: Not in range 2..9, inclusive: 42",
+      new RangeError.range(42, 2, 9, "foo", "message").toString());
+  Expect.equals("RangeError: message: Not in range 2..9, inclusive: 42",
+      new RangeError.range(42, 2, 9, null, "message").toString());
+
+  Expect.equals(
+      "RangeError: Index out of range: "
+      "index should be less than 3: 42",
+      new RangeError.index(42, [1, 2, 3]).toString());
+  Expect.equals(
+      "RangeError (foo): Index out of range: "
+      "index should be less than 3: 42",
+      new RangeError.index(42, [1, 2, 3], "foo").toString());
+  Expect.equals(
+      "RangeError (foo): message: "
+      "index should be less than 3: 42",
+      new RangeError.index(42, [1, 2, 3], "foo", "message").toString());
+  Expect.equals(
+      "RangeError: message: "
+      "index should be less than 3: 42",
+      new RangeError.index(42, [1, 2, 3], null, "message").toString());
+  Expect.equals(
+      "RangeError (foo): message: "
+      "index should be less than 2: 42",
+      new RangeError.index(42, [1, 2, 3], "foo", "message", 2).toString());
+  Expect.equals(
+      "RangeError: Index out of range: "
+      "index must not be negative: -5",
+      new RangeError.index(-5, [1, 2, 3]).toString());
+}
diff --git a/tests/corelib_2/int_parse_radix_bad_handler_test.dart b/tests/corelib_2/int_parse_radix_bad_handler_test.dart
new file mode 100644
index 0000000..2c3b2be
--- /dev/null
+++ b/tests/corelib_2/int_parse_radix_bad_handler_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2012, 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:expect/expect.dart";
+
+void main() {
+  // These are compile time errors for Dart 2.0.
+  Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: "not a function"));
+  Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: () => 42));
+  Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: (v1, v2) => 42));
+}
diff --git a/tests/corelib_strong/int_parse_radix_test.dart b/tests/corelib_2/int_parse_radix_test.dart
similarity index 92%
rename from tests/corelib_strong/int_parse_radix_test.dart
rename to tests/corelib_2/int_parse_radix_test.dart
index eee845f..d61118f 100644
--- a/tests/corelib_strong/int_parse_radix_test.dart
+++ b/tests/corelib_2/int_parse_radix_test.dart
@@ -6,8 +6,6 @@
 import "dart:math" show pow;
 
 void main() {
-  bool checkedMode = false;
-  assert((checkedMode = true));
   const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20"
     "\x85" //# 01: ok
       "\xa0";
@@ -116,15 +114,8 @@
   }
 
   testBadTypes(var source, var radix) {
-    if (!checkedMode) {
-      // No promises on what error is thrown if the type doesn't match.
-      // Likely either ArgumentError or NoSuchMethodError.
-      Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0));
-      return;
-    }
-    // In checked mode, it's always a TypeError.
-    Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0),
-        (e) => e is TypeError || e is CastError);
+    Expect.throws(() => int.parse(source, radix: radix, onError: (s) => 0), //# badTypes: ok
+        (e) => e is TypeError); //# badTypes: ok
   }
 
   testBadTypes(9, 10);
diff --git a/tests/corelib/int_round_test.dart b/tests/corelib_2/int_round_test.dart
similarity index 100%
rename from tests/corelib/int_round_test.dart
rename to tests/corelib_2/int_round_test.dart
diff --git a/tests/corelib/int_round_to_double_test.dart b/tests/corelib_2/int_round_to_double_test.dart
similarity index 100%
rename from tests/corelib/int_round_to_double_test.dart
rename to tests/corelib_2/int_round_to_double_test.dart
diff --git a/tests/corelib/int_to_int_test.dart b/tests/corelib_2/int_to_int_test.dart
similarity index 100%
rename from tests/corelib/int_to_int_test.dart
rename to tests/corelib_2/int_to_int_test.dart
diff --git a/tests/corelib/int_truncate_test.dart b/tests/corelib_2/int_truncate_test.dart
similarity index 100%
rename from tests/corelib/int_truncate_test.dart
rename to tests/corelib_2/int_truncate_test.dart
diff --git a/tests/corelib/int_truncate_to_double_test.dart b/tests/corelib_2/int_truncate_to_double_test.dart
similarity index 100%
rename from tests/corelib/int_truncate_to_double_test.dart
rename to tests/corelib_2/int_truncate_to_double_test.dart
diff --git a/tests/corelib/integer_to_radix_string_test.dart b/tests/corelib_2/integer_to_radix_string_test.dart
similarity index 100%
rename from tests/corelib/integer_to_radix_string_test.dart
rename to tests/corelib_2/integer_to_radix_string_test.dart
diff --git a/tests/corelib/integer_to_string_test.dart b/tests/corelib_2/integer_to_string_test.dart
similarity index 100%
rename from tests/corelib/integer_to_string_test.dart
rename to tests/corelib_2/integer_to_string_test.dart
diff --git a/tests/corelib/is_operator_basic_types_test.dart b/tests/corelib_2/is_operator_basic_types_test.dart
similarity index 100%
rename from tests/corelib/is_operator_basic_types_test.dart
rename to tests/corelib_2/is_operator_basic_types_test.dart
diff --git a/tests/corelib/iterable_contains2_test.dart b/tests/corelib_2/iterable_contains2_test.dart
similarity index 100%
rename from tests/corelib/iterable_contains2_test.dart
rename to tests/corelib_2/iterable_contains2_test.dart
diff --git a/tests/corelib/iterable_contains_test.dart b/tests/corelib_2/iterable_contains_test.dart
similarity index 100%
rename from tests/corelib/iterable_contains_test.dart
rename to tests/corelib_2/iterable_contains_test.dart
diff --git a/tests/corelib/iterable_element_at_test.dart b/tests/corelib_2/iterable_element_at_test.dart
similarity index 83%
rename from tests/corelib/iterable_element_at_test.dart
rename to tests/corelib_2/iterable_element_at_test.dart
index 364e94a..b23085a 100644
--- a/tests/corelib/iterable_element_at_test.dart
+++ b/tests/corelib_2/iterable_element_at_test.dart
@@ -15,16 +15,14 @@
   Expect.equals(1, list1.elementAt(0));
   Expect.equals(2, list1.elementAt(1));
   Expect.equals(3, list1.elementAt(2));
-  Expect.throws(
-      () => list1.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
+  list1.elementAt("2"); //# static: compile-time error
   Expect.throws(() => list1.elementAt(-1), (e) => e is ArgumentError);
   Expect.throws(() => list1.elementAt(3), (e) => e is RangeError);
 
   Expect.equals(4, list2.elementAt(0));
   Expect.equals(5, list2.elementAt(1));
   Expect.equals(6, list2.elementAt(2));
-  Expect.throws(
-      () => list2.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
+  list2.elementAt("2"); //# static: compile-time error
   Expect.throws(() => list2.elementAt(-1), (e) => e is ArgumentError);
   Expect.throws(() => list2.elementAt(3), (e) => e is RangeError);
 
@@ -34,8 +32,7 @@
   Expect.throws(() => set1.elementAt(-1), (e) => e is ArgumentError);
   Expect.throws(() => set1.elementAt(3), (e) => e is RangeError);
 
-  Expect.throws(
-      () => set2.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
+  set2.elementAt("2"); //# static: compile-time error
   Expect.throws(() => set2.elementAt(-1), (e) => e is ArgumentError);
   Expect.throws(() => set2.elementAt(0), (e) => e is RangeError);
   Expect.throws(() => set2.elementAt(1), (e) => e is RangeError);
diff --git a/tests/corelib_strong/iterable_empty_test.dart b/tests/corelib_2/iterable_empty_test.dart
similarity index 100%
rename from tests/corelib_strong/iterable_empty_test.dart
rename to tests/corelib_2/iterable_empty_test.dart
diff --git a/tests/corelib/iterable_expand_test.dart b/tests/corelib_2/iterable_expand_test.dart
similarity index 100%
rename from tests/corelib/iterable_expand_test.dart
rename to tests/corelib_2/iterable_expand_test.dart
diff --git a/tests/corelib/iterable_first_test.dart b/tests/corelib_2/iterable_first_test.dart
similarity index 100%
rename from tests/corelib/iterable_first_test.dart
rename to tests/corelib_2/iterable_first_test.dart
diff --git a/tests/corelib/iterable_first_where_test.dart b/tests/corelib_2/iterable_first_where_test.dart
similarity index 100%
rename from tests/corelib/iterable_first_where_test.dart
rename to tests/corelib_2/iterable_first_where_test.dart
diff --git a/tests/corelib/iterable_fold_test.dart b/tests/corelib_2/iterable_fold_test.dart
similarity index 85%
rename from tests/corelib/iterable_fold_test.dart
rename to tests/corelib_2/iterable_fold_test.dart
index 49c1bd3..8108cf6 100644
--- a/tests/corelib/iterable_fold_test.dart
+++ b/tests/corelib_2/iterable_fold_test.dart
@@ -19,10 +19,10 @@
   operator []=(index, val) => list[index] = val;
 }
 
-id(x) => x;
+id (x) => x;
 
 main() {
-  for (var iterable in [
+  for (dynamic iterable in [
     const [1, 2, 3],
     [1, 2, 3],
     new List(3)
@@ -35,10 +35,10 @@
     new List.generate(3, (x) => x + 1),
     [0, 1, 2, 3].where((x) => x > 0),
     [0, 1, 2].map((x) => x + 1),
-    [
-      [1, 2],
-      [3]
-    ].expand(id),
+    [ //# 01: ok
+      [1, 2], //# 01: ok
+      [3] //# 01: ok
+    ].expand(id), //# 01: ok
     [3, 2, 1].reversed,
     [0, 1, 2, 3].skip(1),
     [1, 2, 3, 4].take(3),
@@ -93,7 +93,7 @@
     new List.generate(0, (x) => x + 1),
     [0, 1, 2, 3].where((x) => false),
     [].map((x) => x + 1),
-    [[], []].expand(id),
+    [[], []].expand(id), //# 01: ok
     [].reversed,
     [0, 1, 2, 3].skip(4),
     [1, 2, 3, 4].take(0),
@@ -113,7 +113,7 @@
   }
 
   // Singleton iterables are calling reduce function.
-  for (var iterable in [
+  for (dynamic iterable in [
     const [1],
     [1],
     new List(1)..[0] = 1,
@@ -123,18 +123,18 @@
     new List.generate(1, (x) => x + 1),
     [0, 1, 2, 3].where((x) => x == 1),
     [0].map((x) => x + 1),
-    [
-      [],
-      [1]
-    ].expand(id),
+    [ //# 01: ok
+      [], //# 01: ok
+      [1] //# 01: ok
+    ].expand(id), //# 01: ok
     [1].reversed,
     [0, 1].skip(1),
     [1, 2, 3, 4].take(1),
     new Uint8List(1)..[0] = 1,
     (new HashMap()..[1] = 0).keys,
-    (new HashMap()..[0] = 1).values,
+    (new HashMap()..[0] = 1).values, //# 02: ok
     (new SplayTreeMap()..[1] = 0).keys,
-    (new SplayTreeMap()..[0] = 1).values,
+    (new SplayTreeMap()..[0] = 1).values, //# 02: ok
     new HashSet()..add(1),
     new LinkedHashSet()..add(1),
     new SplayTreeSet()..add(1),
@@ -164,19 +164,19 @@
     map[4] = 4;
   }
 
-  testModification([1, 2, 3], add4, id);
-  testModification(new HashSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new LinkedHashSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new SplayTreeSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new MyList([1, 2, 3]), add4, id);
+  testModification([1, 2, 3], add4, id); //# 02: ok
+  testModification(new HashSet()..add(1)..add(2)..add(3), add4, id); //# 02: ok
+  testModification(new LinkedHashSet()..add(1)..add(2)..add(3), add4, id); //# 02: ok
+  testModification(new SplayTreeSet()..add(1)..add(2)..add(3), add4, id); //# 02: ok
+  testModification(new MyList([1, 2, 3]), add4, id); //# 02: ok
 
-  testModification([0, 1, 2, 3], add4, (x) => x.where((x) => x > 0));
-  testModification([0, 1, 2], add4, (x) => x.map((x) => x + 1));
-  testModification([
-    [1, 2],
-    [3]
-  ], add4, (x) => x.expand((x) => x));
-  testModification([3, 2, 1], add4, (x) => x.reversed);
+  testModification([0, 1, 2, 3], add4, (x) => x.where((x) => x > 0)); //# 02: ok
+  testModification([0, 1, 2], add4, (x) => x.map((x) => x + 1)); //# 02: ok
+  testModification([ //# 02: ok
+    [1, 2], //# 02: ok
+    [3] //# 02: ok
+  ], add4, (x) => x.expand((x) => x)); //# 02: ok
+  testModification([3, 2, 1], add4, (x) => x.reversed); //# 02: ok
   testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.keys);
   testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.values);
   var hashMap = new HashMap()
diff --git a/tests/corelib_2/list_unmodifiable_test.dart b/tests/corelib_2/list_unmodifiable_test.dart
index e6702fc..a57dd349 100644
--- a/tests/corelib_2/list_unmodifiable_test.dart
+++ b/tests/corelib_2/list_unmodifiable_test.dart
@@ -139,23 +139,25 @@
       list.fillRange(0, 1, null);
     });
 
-    success(opName, op(list)) {
-      var expect;
-      try {
-        expect = op(elements);
-      } catch (e) {
-        try {
-          op(list);
-        } catch (e2) {
-          Expect.equals(
-              e.runtimeType,
-              e2.runtimeType,
-              "$name :: $opName threw different exceptions: "
-              "${e.runtimeType} vs ${e2.runtimeType}");
-          return;
-        }
-        Expect.fail("$name-$opName didn't throw, expected: $e");
+    success(opName, op(List list), [bool throws = false]) {
+      if (throws) {
+        var e1, e2;
+        Expect.throws(() => op(elements), (e) {
+          e1 = e;
+          return true;
+        }, '$name :: $opName should throw for $elements');
+        Expect.throws(() => op(list), (e) {
+          e2 = e;
+          return true;
+        }, '$name :: $opName should throw for $list');
+        Expect.equals(
+            e1.runtimeType,
+            e2.runtimeType,
+            "$name :: $opName threw different errors for $elements and $list: "
+            "${e1.runtimeType} vs ${e2.runtimeType}");
+        return;
       }
+      var expect = op(elements);
       var actual = op(list);
       checkElements();
       if (expect is List) {
@@ -171,10 +173,10 @@
     success("indexOf", (l) => l.indexOf(null));
     success("lastIndexOf", (l) => l.lastIndexOf(null));
     success("contains", (l) => l.contains(2));
-    success("elementAt", (l) => l.elementAt[1]);
+    success("elementAt", (l) => l.elementAt(1), list.length < 2);
     success("reversed", (l) => l.reversed);
-    success("sublist0-1", (l) => l.sublist(0, 1));
-    success("getRange0-1", (l) => l.getRange(0, 1));
+    success("sublist0-1", (l) => l.sublist(0, 1), list.isEmpty);
+    success("getRange0-1", (l) => l.getRange(0, 1), list.isEmpty);
     success("asMap-keys", (l) => l.asMap().keys);
     success("asMap-values", (l) => l.asMap().values);
     success("where", (l) => l.where((x) => true));
@@ -184,17 +186,22 @@
     success("take", (l) => l.take(1));
     success("skipWhile", (l) => l.skipWhile((x) => false));
     success("takeWhile", (l) => l.takeWhile((x) => true));
-    success("first", (l) => l.first);
-    success("last", (l) => l.last);
-    success("single", (l) => l.single);
-    success("firstWhere", (l) => l.firstWhere((x) => true));
-    success("lastWhere", (l) => l.lastWhere((x) => true));
-    success("singleWhere", (l) => l.singleWhere((x) => true));
+    success("first", (l) => l.first, list.isEmpty);
+    success("last", (l) => l.last, list.isEmpty);
+    success("single", (l) => l.single, list.length != 1);
+    success("firstWhere", (l) => l.firstWhere((x) => true), list.isEmpty);
+    success("lastWhere", (l) => l.lastWhere((x) => true), list.isEmpty);
+    success("singleWhere", (l) => l.singleWhere((x) => true), list.length != 1);
     success("isEmpty", (l) => l.isEmpty);
     success("isNotEmpty", (l) => l.isNotEmpty);
     success("join", (l) => l.join("/"));
     success("fold", (l) => l.fold("--", (a, b) => "$a/$b"));
-    success("reduce", (l) => l.reduce((a, b) => a + b));
+    if (elements is List<num> && list is List<num>) {
+      success(
+          "reduce",
+          (l) => (l as List<num>).reduce((a, b) => (a + b).floor()),
+          list.isEmpty);
+    }
     success("every", (l) => l.every((x) => x == 0));
     success("any", (l) => l.any((x) => x == 2));
     success("toList", (l) => l.toList());
@@ -209,7 +216,8 @@
     Expect.isFalse(it.moveNext());
 
     if (elements is List<int> && list is List<int>) {
-      success("String.fromCharCodes", (l) => new String.fromCharCodes(l));
+      success("String.fromCharCodes",
+          (l) => new String.fromCharCodes(l as List<int>));
     }
   }
 }
diff --git a/tests/corelib_strong/corelib_strong.status b/tests/corelib_strong/corelib_strong.status
index 3fc0791..fcbb649 100644
--- a/tests/corelib_strong/corelib_strong.status
+++ b/tests/corelib_strong/corelib_strong.status
@@ -11,9 +11,6 @@
 duration2_test: Skip
 error_stack_trace_test: Skip
 http_resource_test: Skip
-iterable_contains2_test: Skip
-iterable_element_at_test: Skip
-iterable_fold_test: Skip
 iterable_mapping_test: Skip
 iterable_reduce_test: Skip
 linked_hash_map_from_iterable_test: Skip
@@ -23,14 +20,9 @@
 
 [ $compiler == dartdevc && $runtime != none ]
 hash_set_test/01: RuntimeError # Issue 29921
-int_parse_radix_test/01: RuntimeError # Issue 29921
-int_parse_radix_test/02: RuntimeError # Issue 29921
-integer_to_radix_string_test: RuntimeError # Issue 29921
-integer_to_string_test/01: RuntimeError # Issue 29921
 iterable_return_type_test/02: RuntimeError # Issue 29921
 regress_r21715_test: RuntimeError # Issue 29921
 string_operations_with_null_test: RuntimeError # Issue 29921
-
 from_environment_const_type_test/01: RuntimeError # Issue 29921
 from_environment_const_type_test/05: RuntimeError # Issue 29921
 from_environment_const_type_test/10: RuntimeError # Issue 29921
diff --git a/tests/corelib_strong/int_round_test.dart b/tests/corelib_strong/int_round_test.dart
deleted file mode 100644
index 0bd7ec6..0000000
--- a/tests/corelib_strong/int_round_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart';
-
-main() {
-  Expect.equals(0, 0.round());
-  Expect.equals(1, 1.round());
-  Expect.equals(0x1234, 0x1234.round());
-  Expect.equals(0x12345678, 0x12345678.round());
-  Expect.equals(0x123456789AB, 0x123456789AB.round());
-  Expect.equals(0x123456789ABCDEF, 0x123456789ABCDEF.round());
-  Expect.equals(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.round());
-  Expect.equals(-1, -1.round());
-  Expect.equals(-0x1234, -0x1234.round());
-  Expect.equals(-0x12345678, -0x12345678.round());
-  Expect.equals(-0x123456789AB, -0x123456789AB.round());
-  Expect.equals(-0x123456789ABCDEF, -0x123456789ABCDEF.round());
-  Expect.equals(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.round());
-
-  Expect.isTrue(0.round() is int);
-  Expect.isTrue(1.round() is int);
-  Expect.isTrue(0x1234.round() is int);
-  Expect.isTrue(0x12345678.round() is int);
-  Expect.isTrue(0x123456789AB.round() is int);
-  Expect.isTrue(0x123456789ABCDEF.round() is int);
-  Expect
-      .isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.round() is int);
-  Expect.isTrue(-1.round() is int);
-  Expect.isTrue(-0x1234.round() is int);
-  Expect.isTrue(-0x12345678.round() is int);
-  Expect.isTrue(-0x123456789AB.round() is int);
-  Expect.isTrue(-0x123456789ABCDEF.round() is int);
-  Expect.isTrue(
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.round() is int);
-}
diff --git a/tests/corelib_strong/int_round_to_double_test.dart b/tests/corelib_strong/int_round_to_double_test.dart
deleted file mode 100644
index 16cc95d..0000000
--- a/tests/corelib_strong/int_round_to_double_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart';
-
-main() {
-  Expect.equals(0.0, 0.roundToDouble());
-  Expect.equals(1.0, 1.roundToDouble());
-  Expect.equals(0x1234, 0x1234.roundToDouble());
-  Expect.equals(0x12345678, 0x12345678.roundToDouble());
-  Expect.equals(0x123456789AB, 0x123456789AB.roundToDouble());
-  Expect.equals(81985529216486900.0, 0x123456789ABCDEF.roundToDouble());
-  Expect.equals(2.7898229935051914e+55,
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.roundToDouble());
-  Expect.equals(-1.0, -1.roundToDouble());
-  Expect.equals(-0x1234, -0x1234.roundToDouble());
-  Expect.equals(-0x12345678, -0x12345678.roundToDouble());
-  Expect.equals(-0x123456789AB, -0x123456789AB.roundToDouble());
-  Expect.equals(-81985529216486900.0, -0x123456789ABCDEF.roundToDouble());
-  Expect.equals(-2.7898229935051914e+55,
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.roundToDouble());
-
-  Expect.isTrue(0.roundToDouble() is double);
-  Expect.isTrue(1.roundToDouble() is double);
-  Expect.isTrue(0x1234.roundToDouble() is double);
-  Expect.isTrue(0x12345678.roundToDouble() is double);
-  Expect.isTrue(0x123456789AB.roundToDouble() is double);
-  Expect.isTrue(0x123456789ABCDEF.roundToDouble() is double);
-  Expect.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
-      .roundToDouble() is double);
-  Expect.isTrue(-1.roundToDouble() is double);
-  Expect.isTrue(-0x1234.roundToDouble() is double);
-  Expect.isTrue(-0x12345678.roundToDouble() is double);
-  Expect.isTrue(-0x123456789AB.roundToDouble() is double);
-  Expect.isTrue(-0x123456789ABCDEF.roundToDouble() is double);
-  Expect.isTrue(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
-      .roundToDouble() is double);
-}
diff --git a/tests/corelib_strong/int_to_int_test.dart b/tests/corelib_strong/int_to_int_test.dart
deleted file mode 100644
index 51bd26d..0000000
--- a/tests/corelib_strong/int_to_int_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart';
-
-main() {
-  Expect.equals(0, 0.toInt());
-  Expect.equals(1, 1.toInt());
-  Expect.equals(0x1234, 0x1234.toInt());
-  Expect.equals(0x12345678, 0x12345678.toInt());
-  Expect.equals(0x123456789AB, 0x123456789AB.toInt());
-  Expect.equals(0x123456789ABCDEF, 0x123456789ABCDEF.toInt());
-  Expect.equals(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.toInt());
-  Expect.equals(-1, -1.toInt());
-  Expect.equals(-0x1234, -0x1234.toInt());
-  Expect.equals(-0x12345678, -0x12345678.toInt());
-  Expect.equals(-0x123456789AB, -0x123456789AB.toInt());
-  Expect.equals(-0x123456789ABCDEF, -0x123456789ABCDEF.toInt());
-  Expect.equals(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.toInt());
-
-  Expect.isTrue(0.toInt() is int);
-  Expect.isTrue(1.toInt() is int);
-  Expect.isTrue(0x1234.toInt() is int);
-  Expect.isTrue(0x12345678.toInt() is int);
-  Expect.isTrue(0x123456789AB.toInt() is int);
-  Expect.isTrue(0x123456789ABCDEF.toInt() is int);
-  Expect
-      .isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.toInt() is int);
-  Expect.isTrue(-1.toInt() is int);
-  Expect.isTrue(-0x1234.toInt() is int);
-  Expect.isTrue(-0x12345678.toInt() is int);
-  Expect.isTrue(-0x123456789AB.toInt() is int);
-  Expect.isTrue(-0x123456789ABCDEF.toInt() is int);
-  Expect.isTrue(
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.toInt() is int);
-}
diff --git a/tests/corelib_strong/int_truncate_test.dart b/tests/corelib_strong/int_truncate_test.dart
deleted file mode 100644
index 8dff5ad..0000000
--- a/tests/corelib_strong/int_truncate_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart';
-
-main() {
-  Expect.equals(0, 0.truncate());
-  Expect.equals(1, 1.truncate());
-  Expect.equals(0x1234, 0x1234.truncate());
-  Expect.equals(0x12345678, 0x12345678.truncate());
-  Expect.equals(0x123456789AB, 0x123456789AB.truncate());
-  Expect.equals(0x123456789ABCDEF, 0x123456789ABCDEF.truncate());
-  Expect.equals(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncate());
-  Expect.equals(-1, -1.truncate());
-  Expect.equals(-0x1234, -0x1234.truncate());
-  Expect.equals(-0x12345678, -0x12345678.truncate());
-  Expect.equals(-0x123456789AB, -0x123456789AB.truncate());
-  Expect.equals(-0x123456789ABCDEF, -0x123456789ABCDEF.truncate());
-  Expect.equals(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncate());
-
-  Expect.isTrue(0.truncate() is int);
-  Expect.isTrue(1.truncate() is int);
-  Expect.isTrue(0x1234.truncate() is int);
-  Expect.isTrue(0x12345678.truncate() is int);
-  Expect.isTrue(0x123456789AB.truncate() is int);
-  Expect.isTrue(0x123456789ABCDEF.truncate() is int);
-  Expect.isTrue(
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncate() is int);
-  Expect.isTrue(-1.truncate() is int);
-  Expect.isTrue(-0x1234.truncate() is int);
-  Expect.isTrue(-0x12345678.truncate() is int);
-  Expect.isTrue(-0x123456789AB.truncate() is int);
-  Expect.isTrue(-0x123456789ABCDEF.truncate() is int);
-  Expect.isTrue(
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncate() is int);
-}
diff --git a/tests/corelib_strong/int_truncate_to_double_test.dart b/tests/corelib_strong/int_truncate_to_double_test.dart
deleted file mode 100644
index 197e145..0000000
--- a/tests/corelib_strong/int_truncate_to_double_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart';
-
-main() {
-  Expect.equals(0.0, 0.truncateToDouble());
-  Expect.equals(1.0, 1.truncateToDouble());
-  Expect.equals(0x1234, 0x1234.truncateToDouble());
-  Expect.equals(0x12345678, 0x12345678.truncateToDouble());
-  Expect.equals(0x123456789AB, 0x123456789AB.truncateToDouble());
-  Expect.equals(81985529216486900.0, 0x123456789ABCDEF.truncateToDouble());
-  Expect.equals(2.7898229935051914e+55,
-      0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncateToDouble());
-  Expect.equals(-1.0, -1.truncateToDouble());
-  Expect.equals(-0x1234, -0x1234.truncateToDouble());
-  Expect.equals(-0x12345678, -0x12345678.truncateToDouble());
-  Expect.equals(-0x123456789AB, -0x123456789AB.truncateToDouble());
-  Expect.equals(-81985529216486900.0, -0x123456789ABCDEF.truncateToDouble());
-  Expect.equals(-2.7898229935051914e+55,
-      -0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.truncateToDouble());
-
-  Expect.isTrue(0.truncateToDouble() is double);
-  Expect.isTrue(1.truncateToDouble() is double);
-  Expect.isTrue(0x1234.truncateToDouble() is double);
-  Expect.isTrue(0x12345678.truncateToDouble() is double);
-  Expect.isTrue(0x123456789AB.truncateToDouble() is double);
-  Expect.isTrue(0x123456789ABCDEF.truncateToDouble() is double);
-  Expect.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
-      .truncateToDouble() is double);
-  Expect.isTrue(-1.truncateToDouble() is double);
-  Expect.isTrue(-0x1234.truncateToDouble() is double);
-  Expect.isTrue(-0x12345678.truncateToDouble() is double);
-  Expect.isTrue(-0x123456789AB.truncateToDouble() is double);
-  Expect.isTrue(-0x123456789ABCDEF.truncateToDouble() is double);
-  Expect.isTrue(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
-      .truncateToDouble() is double);
-}
diff --git a/tests/corelib_strong/integer_to_radix_string_test.dart b/tests/corelib_strong/integer_to_radix_string_test.dart
deleted file mode 100644
index 3b2fac8..0000000
--- a/tests/corelib_strong/integer_to_radix_string_test.dart
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-main() {
-  // Test that we accept radix 2 to 36 and that we use lower-case
-  // letters.
-  var expected = [
-    '0',
-    '1',
-    '2',
-    '3',
-    '4',
-    '5',
-    '6',
-    '7',
-    '8',
-    '9',
-    'a',
-    'b',
-    'c',
-    'd',
-    'e',
-    'f',
-    'g',
-    'h',
-    'i',
-    'j',
-    'k',
-    'l',
-    'm',
-    'n',
-    'o',
-    'p',
-    'q',
-    'r',
-    's',
-    't',
-    'u',
-    'v',
-    'w',
-    'x',
-    'y',
-    'z'
-  ];
-  for (var radix = 2; radix <= 36; radix++) {
-    for (var i = 0; i < radix; i++) {
-      Expect.equals(expected[i], i.toRadixString(radix));
-    }
-  }
-
-  var illegalRadices = [-1, 0, 1, 37];
-  for (var radix in illegalRadices) {
-    try {
-      42.toRadixString(radix);
-      Expect.fail("Exception expected");
-    } on ArgumentError catch (e) {
-      // Nothing to do.
-    }
-  }
-
-  // Try large numbers (regression test for issue 15316).
-  var bignums = [
-    0x80000000,
-    0x100000000,
-    0x10000000000000,
-    0x10000000000001, // 53 significant bits.
-    0x20000000000000,
-    0x20000000000002,
-    0x1000000000000000,
-    0x1000000000000100,
-    0x2000000000000000,
-    0x2000000000000200,
-    0x8000000000000000,
-    0x8000000000000800,
-    0x10000000000000000,
-    0x10000000000001000,
-    0x100000000000010000,
-    0x1000000000000100000,
-    0x10000000000001000000,
-    0x100000000000010000000,
-    0x1000000000000100000000,
-    0x10000000000001000000000,
-  ];
-  for (var bignum in bignums) {
-    for (int radix = 2; radix <= 36; radix++) {
-      String digits = bignum.toRadixString(radix);
-      int result = int.parse(digits, radix: radix);
-      Expect.equals(
-          bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix");
-    }
-  }
-}
diff --git a/tests/corelib_strong/integer_to_string_test.dart b/tests/corelib_strong/integer_to_string_test.dart
deleted file mode 100644
index 64a64b0..0000000
--- a/tests/corelib_strong/integer_to_string_test.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-main() {
-  /// Test that converting [value] to a string gives [expect].
-  /// Also test that `-value` gives `"-"+expect`.
-  test(int value, String expect) {
-    Expect.equals(expect, value.toString());
-    Expect.equals(expect, "$value");
-    Expect.equals(expect, (new StringBuffer()..write(value)).toString());
-    if (value == 0) return;
-    expect = "-$expect";
-    value = -value;
-    Expect.equals(expect, value.toString());
-    Expect.equals(expect, "$value");
-    Expect.equals(expect, (new StringBuffer()..write(value)).toString());
-  }
-
-  // Very simple tests.
-  test(0, "0");
-  test(1, "1");
-  test(2, "2");
-  test(5, "5");
-
-  // Binary special cases.
-
-  // ~2^30.
-  test(0x3fffffff, "1073741823");
-  test(0x40000000, "1073741824");
-  test(0x40000001, "1073741825");
-  // ~2^31.
-  test(0x7fffffff, "2147483647");
-  test(0x80000000, "2147483648");
-  test(0x80000001, "2147483649");
-  // ~2^32.
-  test(0xffffffff, "4294967295");
-  test(0x100000000, "4294967296");
-  test(0x100000001, "4294967297");
-
-  // ~2^51.
-  test(0x7ffffffffffff, "2251799813685247");
-  test(0x8000000000000, "2251799813685248");
-  test(0x8000000000001, "2251799813685249");
-  // ~2^52.
-  test(0xfffffffffffff, "4503599627370495");
-  test(0x10000000000000, "4503599627370496");
-  test(0x10000000000001, "4503599627370497");
-  // ~2^53.
-  test(0x1fffffffffffff, "9007199254740991");
-  test(0x20000000000000, "9007199254740992");
-  test(0x20000000000001, "9007199254740993"); //        //# 01: ok
-  // ~2^62.
-  test(0x3fffffffffffffff, "4611686018427387903"); //   //# 01: continued
-  test(0x4000000000000000, "4611686018427387904"); //   //# 01: continued
-  test(0x4000000000000001, "4611686018427387905"); //   //# 01: continued
-  // ~2^63.
-  test(0x7fffffffffffffff, "9223372036854775807"); //   //# 01: continued
-  test(0x8000000000000000, "9223372036854775808"); //   //# 01: continued
-  test(0x8000000000000001, "9223372036854775809"); //   //# 01: continued
-  // ~2^64.
-  test(0xffffffffffffffff, "18446744073709551615"); //  //# 01: continued
-  test(0x10000000000000000, "18446744073709551616"); // //# 01: continued
-  test(0x10000000000000001, "18446744073709551617"); // //# 01: continued
-  // Big bignum.
-  test(123456789012345678901234567890, //               //# 01: continued
-       "123456789012345678901234567890"); //            //# 01: continued
-
-  // Decimal special cases.
-
-  int number = 10;
-  // Numbers 99..99, 100...00, and 100..01 up to 23 digits.
-  for (int i = 1; i < 15; i++) {
-    // Works in dart2js up to 10^15.
-    test(number - 1, "9" * i);
-    test(number, "1" + "0" * i);
-    test(number + 1, "1" + "0" * (i - 1) + "1");
-    number *= 10;
-  }
-  // Fails to represent exactly in dart2js.
-  for (int i = 15; i < 22; i++) { //                    //# 01: continued
-    test(number - 1, "9" * i); //                       //# 01: continued
-    test(number, "1" + "0" * i); //                     //# 01: continued
-    test(number + 1, "1" + "0" * (i - 1) + "1"); //     //# 01: continued
-    number *= 10; //                                    //# 01: continued
-  } //                                                  //# 01: continued
-}
diff --git a/tests/corelib_strong/is_operator_basic_types_test.dart b/tests/corelib_strong/is_operator_basic_types_test.dart
deleted file mode 100644
index 772afb2..0000000
--- a/tests/corelib_strong/is_operator_basic_types_test.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test program for the "is" type test operator.
-
-import "package:expect/expect.dart";
-
-check(args) {
-  var list = args[0];
-  var string = args[1];
-  var nullObject = args[2];
-
-  Expect.isTrue(list is Object);
-  Expect.isTrue(list is List);
-  Expect.isTrue(list is Iterable);
-  Expect.isFalse(list is Comparable);
-  Expect.isFalse(list is Pattern);
-  Expect.isFalse(list is String);
-
-  Expect.isFalse(list is! List);
-  Expect.isFalse(list is! Iterable);
-  Expect.isTrue(list is! Comparable);
-  Expect.isTrue(list is! Pattern);
-  Expect.isTrue(list is! String);
-
-  Expect.isTrue(string is Object);
-  Expect.isFalse(string is List);
-  Expect.isFalse(string is Iterable);
-  Expect.isTrue(string is Comparable);
-  Expect.isTrue(string is Pattern);
-  Expect.isTrue(string is String);
-
-  Expect.isTrue(string is! List);
-  Expect.isTrue(string is! Iterable);
-  Expect.isFalse(string is! Comparable);
-  Expect.isFalse(string is! Pattern);
-  Expect.isFalse(string is! String);
-
-  Expect.isTrue(nullObject is Object);
-  Expect.isFalse(nullObject is List);
-  Expect.isFalse(nullObject is Iterable);
-  Expect.isFalse(nullObject is Comparable);
-  Expect.isFalse(nullObject is Pattern);
-  Expect.isFalse(nullObject is String);
-
-  Expect.isTrue(nullObject is! List);
-  Expect.isTrue(nullObject is! Iterable);
-  Expect.isTrue(nullObject is! Comparable);
-  Expect.isTrue(nullObject is! Pattern);
-  Expect.isTrue(nullObject is! String);
-}
-
-main() {
-  // Try to make it hard for an optimizing compiler to inline the
-  // tests.
-  check([[], 'string', null]);
-
-  // Try to make it even harder.
-  var string = new String.fromCharCodes([new DateTime.now().year % 100 + 1]);
-  check([string.codeUnits, string, null]);
-}
diff --git a/tests/corelib_strong/iterable_contains2_test.dart b/tests/corelib_strong/iterable_contains2_test.dart
deleted file mode 100644
index d4714c7..0000000
--- a/tests/corelib_strong/iterable_contains2_test.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Tests for the contains methods on lists.
-
-class A {
-  const A();
-}
-
-class B extends A {
-  const B();
-}
-
-main() {
-  var list = <B>[new B()];
-  var set = new Set<B>();
-  set.add(new B());
-  var iterable1 = list.map((x) => x);
-  var iterable2 = list.take(1);
-  var list2 = const <B>[const B()];
-  var iterable3 = list2.map((x) => x);
-  var iterable4 = list2.take(1);
-  var iterables = [
-    list,
-    set,
-    iterable1,
-    iterable2,
-    list2,
-    iterable3,
-    iterable4
-  ];
-  for (var iterable in iterables) {
-    Expect.isFalse(iterable.contains(new A()));
-  }
-}
diff --git a/tests/corelib_strong/iterable_contains_test.dart b/tests/corelib_strong/iterable_contains_test.dart
deleted file mode 100644
index 052298e..0000000
--- a/tests/corelib_strong/iterable_contains_test.dart
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Tests for the contains methods on lists.
-
-test(list, notInList) {
-  testList(list) {
-    for (int i = 0; i < list.length; i++) {
-      var elem = list[i];
-      Expect.isTrue(list.contains(list[i]), "$list.contains($elem)");
-    }
-    Expect.isFalse(list.contains(notInList), "!$list.contains($notInList)");
-  }
-
-  List fixedList = new List(list.length);
-  List growList = new List();
-  for (int i = 0; i < list.length; i++) {
-    fixedList[i] = list[i];
-    growList.add(list[i]);
-  }
-  testList(list);
-  testList(fixedList);
-  testList(growList);
-}
-
-class C {
-  const C();
-}
-
-class Niet {
-  bool operator ==(other) => false;
-}
-
-main() {
-  test(const <String>["a", "b", "c", null], "d");
-  test(const <int>[1, 2, 3, null], 0);
-  test(const <bool>[true, false], null);
-  test(const <C>[const C(), const C(), null], new C());
-  test(<C>[new C(), new C(), new C(), null], new C());
-  test(const <double>[0.0, 1.0, 5e-324, 1e+308, double.INFINITY], 2.0);
-  Expect.isTrue(const <double>[-0.0].contains(0.0));
-  Expect.isFalse(const <double>[double.NAN].contains(double.NAN));
-  var niet = new Niet();
-  Expect.isFalse([niet].contains(niet));
-}
diff --git a/tests/corelib_strong/iterable_element_at_test.dart b/tests/corelib_strong/iterable_element_at_test.dart
deleted file mode 100644
index 364e94a..0000000
--- a/tests/corelib_strong/iterable_element_at_test.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-main() {
-  List<int> list1 = <int>[1, 2, 3];
-  List<int> list2 = const <int>[4, 5, 6];
-  List<String> list3 = <String>[];
-  Set<int> set1 = new Set<int>();
-  set1..add(11)..add(12)..add(13);
-  Set set2 = new Set();
-
-  Expect.equals(1, list1.elementAt(0));
-  Expect.equals(2, list1.elementAt(1));
-  Expect.equals(3, list1.elementAt(2));
-  Expect.throws(
-      () => list1.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
-  Expect.throws(() => list1.elementAt(-1), (e) => e is ArgumentError);
-  Expect.throws(() => list1.elementAt(3), (e) => e is RangeError);
-
-  Expect.equals(4, list2.elementAt(0));
-  Expect.equals(5, list2.elementAt(1));
-  Expect.equals(6, list2.elementAt(2));
-  Expect.throws(
-      () => list2.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
-  Expect.throws(() => list2.elementAt(-1), (e) => e is ArgumentError);
-  Expect.throws(() => list2.elementAt(3), (e) => e is RangeError);
-
-  Expect.isTrue(set1.contains(set1.elementAt(0)));
-  Expect.isTrue(set1.contains(set1.elementAt(1)));
-  Expect.isTrue(set1.contains(set1.elementAt(2)));
-  Expect.throws(() => set1.elementAt(-1), (e) => e is ArgumentError);
-  Expect.throws(() => set1.elementAt(3), (e) => e is RangeError);
-
-  Expect.throws(
-      () => set2.elementAt("2"), (e) => e is ArgumentError || e is TypeError);
-  Expect.throws(() => set2.elementAt(-1), (e) => e is ArgumentError);
-  Expect.throws(() => set2.elementAt(0), (e) => e is RangeError);
-  Expect.throws(() => set2.elementAt(1), (e) => e is RangeError);
-}
diff --git a/tests/corelib_strong/iterable_expand_test.dart b/tests/corelib_strong/iterable_expand_test.dart
deleted file mode 100644
index a02787a..0000000
--- a/tests/corelib_strong/iterable_expand_test.dart
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart";
-import 'dart:collection';
-
-class MyList extends ListBase {
-  List list;
-  MyList(this.list);
-
-  get length => list.length;
-  set length(val) {
-    list.length = val;
-  }
-
-  operator [](index) => list[index];
-  operator []=(index, val) => list[index] = val;
-
-  String toString() => "[" + join(", ") + "]";
-}
-
-main() {
-  test(expectation, iterable) {
-    Expect.listEquals(expectation, iterable.toList());
-  }
-
-  // Function not called on empty iterable.
-  test(
-      [],
-      [].expand((x) {
-        throw "not called";
-      }));
-
-  // Creating the iterable doesn't call the function.
-  [1].expand((x) {
-    throw "not called";
-  });
-
-  test([1], [1].expand((x) => [x]));
-  test([1, 2, 3], [1, 2, 3].expand((x) => [x]));
-
-  test([], [1].expand((x) => []));
-  test([], [1, 2, 3].expand((x) => []));
-  test([2], [1, 2, 3].expand((x) => x == 2 ? [2] : []));
-
-  test([1, 1, 2, 2, 3, 3], [1, 2, 3].expand((x) => [x, x]));
-  test([1, 1, 2], [1, 2, 3].expand((x) => [x, x, x].skip(x)));
-
-  test([1], new MyList([1]).expand((x) => [x]));
-  test([1, 2, 3], new MyList([1, 2, 3]).expand((x) => [x]));
-
-  test([], new MyList([1]).expand((x) => []));
-  test([], new MyList([1, 2, 3]).expand((x) => []));
-  test([2], new MyList([1, 2, 3]).expand((x) => x == 2 ? [2] : []));
-
-  test([1, 1, 2, 2, 3, 3], new MyList([1, 2, 3]).expand((x) => [x, x]));
-  test([1, 1, 2], new MyList([1, 2, 3]).expand((x) => [x, x, x].skip(x)));
-
-  // if function throws, iteration is stopped.
-  Iterable iterable = [1, 2, 3].expand((x) {
-    if (x == 2) throw "FAIL";
-    return [x, x];
-  });
-  Iterator it = iterable.iterator;
-  Expect.isTrue(it.moveNext());
-  Expect.equals(1, it.current);
-  Expect.isTrue(it.moveNext());
-  Expect.equals(1, it.current);
-  Expect.throws(it.moveNext, (e) => e == "FAIL");
-  // After throwing, iteration is ended.
-  Expect.equals(null, it.current);
-  Expect.isFalse(it.moveNext());
-}
diff --git a/tests/corelib_strong/iterable_first_test.dart b/tests/corelib_strong/iterable_first_test.dart
deleted file mode 100644
index 8e3e7c8..0000000
--- a/tests/corelib_strong/iterable_first_test.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-main() {
-  List<int> list1 = <int>[1, 2, 3];
-  List<int> list2 = const <int>[4, 5];
-  List<String> list3 = <String>[];
-  Set<int> set1 = new Set<int>();
-  set1..add(11)..add(12)..add(13);
-  Set set2 = new Set();
-
-  Expect.equals(1, list1.first);
-  Expect.equals(4, list2.first);
-  Expect.throws(() => list3.first, (e) => e is StateError);
-
-  Expect.isTrue(set1.contains(set1.first));
-
-  Expect.throws(() => set2.first, (e) => e is StateError);
-}
diff --git a/tests/corelib_strong/iterable_first_where_test.dart b/tests/corelib_strong/iterable_first_where_test.dart
deleted file mode 100644
index 526b685..0000000
--- a/tests/corelib_strong/iterable_first_where_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart';
-
-main() {
-  List<int> list1 = <int>[1, 2, 3];
-  List<int> list2 = const <int>[4, 5];
-  List<String> list3 = <String>[];
-  Set<int> set1 = new Set<int>();
-  set1..add(11)..add(12)..add(13);
-  Set set2 = new Set();
-
-  Expect.equals(2, list1.firstWhere((x) => x.isEven));
-  Expect.equals(1, list1.firstWhere((x) => x.isOdd));
-  Expect.throws(() => list1.firstWhere((x) => x > 3), (e) => e is StateError);
-  Expect.equals(null, list1.firstWhere((x) => x > 3, orElse: () => null));
-  Expect.equals(499, list1.firstWhere((x) => x > 3, orElse: () => 499));
-
-  Expect.equals(4, list2.firstWhere((x) => x.isEven));
-  Expect.equals(5, list2.firstWhere((x) => x.isOdd));
-  Expect.throws(() => list2.firstWhere((x) => x == 0), (e) => e is StateError);
-  Expect.equals(null, list2.firstWhere((x) => false, orElse: () => null));
-  Expect.equals(499, list2.firstWhere((x) => false, orElse: () => 499));
-
-  Expect.throws(() => list3.firstWhere((x) => x == 0), (e) => e is StateError);
-  Expect.throws(() => list3.firstWhere((x) => true), (e) => e is StateError);
-  Expect.equals(null, list3.firstWhere((x) => true, orElse: () => null));
-  Expect.equals("str", list3.firstWhere((x) => false, orElse: () => "str"));
-
-  Expect.equals(12, set1.firstWhere((x) => x.isEven));
-  var odd = set1.firstWhere((x) => x.isOdd);
-  Expect.isTrue(odd == 11 || odd == 13);
-  Expect.throws(() => set1.firstWhere((x) => false), (e) => e is StateError);
-  Expect.equals(null, set1.firstWhere((x) => false, orElse: () => null));
-  Expect.equals(499, set1.firstWhere((x) => false, orElse: () => 499));
-
-  Expect.throws(() => set2.firstWhere((x) => false), (e) => e is StateError);
-  Expect.throws(() => set2.firstWhere((x) => true), (e) => e is StateError);
-  Expect.equals(null, set2.firstWhere((x) => true, orElse: () => null));
-  Expect.equals(499, set2.firstWhere((x) => false, orElse: () => 499));
-}
diff --git a/tests/corelib_strong/iterable_fold_test.dart b/tests/corelib_strong/iterable_fold_test.dart
deleted file mode 100644
index 49c1bd3..0000000
--- a/tests/corelib_strong/iterable_fold_test.dart
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2014, 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:expect/expect.dart";
-import 'dart:collection';
-import 'dart:typed_data';
-
-class MyList extends ListBase {
-  List list;
-  MyList(this.list);
-
-  get length => list.length;
-  set length(val) {
-    list.length = val;
-  }
-
-  operator [](index) => list[index];
-  operator []=(index, val) => list[index] = val;
-}
-
-id(x) => x;
-
-main() {
-  for (var iterable in [
-    const [1, 2, 3],
-    [1, 2, 3],
-    new List(3)
-      ..[0] = 1
-      ..[1] = 2
-      ..[2] = 3,
-    {1: 1, 2: 2, 3: 3}.keys,
-    {1: 1, 2: 2, 3: 3}.values,
-    new Iterable.generate(3, (x) => x + 1),
-    new List.generate(3, (x) => x + 1),
-    [0, 1, 2, 3].where((x) => x > 0),
-    [0, 1, 2].map((x) => x + 1),
-    [
-      [1, 2],
-      [3]
-    ].expand(id),
-    [3, 2, 1].reversed,
-    [0, 1, 2, 3].skip(1),
-    [1, 2, 3, 4].take(3),
-    new Uint8List(3)
-      ..[0] = 1
-      ..[1] = 2
-      ..[2] = 3,
-    (new HashMap()
-          ..[1] = 1
-          ..[2] = 2
-          ..[3] = 3)
-        .keys,
-    (new HashMap()
-          ..[1] = 1
-          ..[2] = 2
-          ..[3] = 3)
-        .values,
-    (new SplayTreeMap()
-          ..[1] = 0
-          ..[2] = 0
-          ..[3] = 0)
-        .keys,
-    (new SplayTreeMap()
-          ..[0] = 1
-          ..[1] = 2
-          ..[2] = 3)
-        .values,
-    new HashSet()..add(1)..add(2)..add(3),
-    new LinkedHashSet()..add(1)..add(2)..add(3),
-    new SplayTreeSet()..add(1)..add(2)..add(3),
-    "\x01\x02\x03".codeUnits,
-    "\x01\x02\x03".runes,
-    new MyList([1, 2, 3]),
-  ]) {
-    int callCount = 0;
-    var result = iterable.fold(0, (x, y) {
-      callCount++;
-      return x + y;
-    });
-    Expect.equals(6, result, "${iterable.runtimeType}");
-    Expect.equals(3, callCount);
-  }
-
-  // Empty iterables are allowed.
-  for (var iterable in [
-    const [],
-    [],
-    new List(0),
-    {}.keys,
-    {}.values,
-    new Iterable.generate(0, (x) => x + 1),
-    new List.generate(0, (x) => x + 1),
-    [0, 1, 2, 3].where((x) => false),
-    [].map((x) => x + 1),
-    [[], []].expand(id),
-    [].reversed,
-    [0, 1, 2, 3].skip(4),
-    [1, 2, 3, 4].take(0),
-    new Uint8List(0),
-    (new HashMap()).keys,
-    (new HashMap()).values,
-    (new SplayTreeMap()).keys,
-    (new SplayTreeMap()).values,
-    new HashSet(),
-    new LinkedHashSet(),
-    new SplayTreeSet(),
-    "".codeUnits,
-    "".runes,
-    new MyList([]),
-  ]) {
-    Expect.equals(42, iterable.fold(42, (x, y) => throw "Unreachable"));
-  }
-
-  // Singleton iterables are calling reduce function.
-  for (var iterable in [
-    const [1],
-    [1],
-    new List(1)..[0] = 1,
-    {1: 1}.keys,
-    {1: 1}.values,
-    new Iterable.generate(1, (x) => x + 1),
-    new List.generate(1, (x) => x + 1),
-    [0, 1, 2, 3].where((x) => x == 1),
-    [0].map((x) => x + 1),
-    [
-      [],
-      [1]
-    ].expand(id),
-    [1].reversed,
-    [0, 1].skip(1),
-    [1, 2, 3, 4].take(1),
-    new Uint8List(1)..[0] = 1,
-    (new HashMap()..[1] = 0).keys,
-    (new HashMap()..[0] = 1).values,
-    (new SplayTreeMap()..[1] = 0).keys,
-    (new SplayTreeMap()..[0] = 1).values,
-    new HashSet()..add(1),
-    new LinkedHashSet()..add(1),
-    new SplayTreeSet()..add(1),
-    "\x01".codeUnits,
-    "\x01".runes,
-    new MyList([1]),
-  ]) {
-    Expect.equals(43, iterable.fold(42, (x, y) => x + y));
-  }
-
-  // Concurrent modifications not allowed.
-  testModification(base, modify, transform) {
-    var iterable = transform(base);
-    Expect.throws(() {
-      iterable.fold(0, (x, y) {
-        modify(base);
-        return x + y;
-      });
-    }, (e) => e is ConcurrentModificationError);
-  }
-
-  void add4(collection) {
-    collection.add(4);
-  }
-
-  void put4(map) {
-    map[4] = 4;
-  }
-
-  testModification([1, 2, 3], add4, id);
-  testModification(new HashSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new LinkedHashSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new SplayTreeSet()..add(1)..add(2)..add(3), add4, id);
-  testModification(new MyList([1, 2, 3]), add4, id);
-
-  testModification([0, 1, 2, 3], add4, (x) => x.where((x) => x > 0));
-  testModification([0, 1, 2], add4, (x) => x.map((x) => x + 1));
-  testModification([
-    [1, 2],
-    [3]
-  ], add4, (x) => x.expand((x) => x));
-  testModification([3, 2, 1], add4, (x) => x.reversed);
-  testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.keys);
-  testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.values);
-  var hashMap = new HashMap()
-    ..[1] = 1
-    ..[2] = 2
-    ..[3] = 3;
-  testModification(hashMap, put4, (x) => x.keys);
-  hashMap = new HashMap()
-    ..[1] = 1
-    ..[2] = 2
-    ..[3] = 3;
-  testModification(hashMap, put4, (x) => x.values);
-  var splayMap = new SplayTreeMap()
-    ..[1] = 1
-    ..[2] = 2
-    ..[3] = 3;
-  testModification(splayMap, put4, (x) => x.keys);
-  splayMap = new SplayTreeMap()
-    ..[1] = 1
-    ..[2] = 2
-    ..[3] = 3;
-  testModification(splayMap, put4, (x) => x.values);
-}
diff --git a/tests/language/class_literal_test.dart b/tests/language/class_literal_test.dart
deleted file mode 100644
index aa10945..0000000
--- a/tests/language/class_literal_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-
-// Test class literal expressions.
-
-class Class {
-  static fisk() => 42;
-}
-
-foo(x) {}
-
-main() {
-  Expect.equals(42, Class.fisk());
-  Expect.equals(null, foo(Class.fisk()));
-
-  // Verify references to a class literal are allowed.
-  Class;
-  var x = Class;
-  foo(Class);
-  Expect.isFalse(Class == null);
-
-  // Verify that dereferencing a class literal is a runtime error.
-  Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); //# 01: static type warning
-  Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); //# 02: static type warning
-  Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); //# 03: static type warning
-  Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); //# 04: static type warning
-  Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); //# 05: static type warning
-  Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); //# 06: static type warning
-  Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); //# 07: static type warning
-  Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); //# 08: static type warning
-  Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); //# 09: static type warning
-  Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); //# 10: static type warning
-  Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); //# 11: static type warning
-  Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); //# 12: static type warning
-  Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); //# 13: static type warning
-  Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); //# 14: static type warning
-  Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); //# 15: static type warning
-  Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); //# 16: static type warning
-  Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); //# 17: static type warning
-  Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); //# 18: static type warning
-  Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); //# 19: static type warning
-  Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); //# 20: static type warning
-  Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); //# 21: static type warning
-  Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); //# 22: static type warning
-  Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); //# 23: static type warning
-  Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); //# 24: static type warning
-
-  // Verify that a class literal isn't a string literal.
-  Expect.notEquals(Class, "Class");
-
-  // Verify toString() works for class literals.
-  Expect.isTrue((Class).toString() is String);
-  var y = Class;
-  Expect.isTrue(y.toString() is String);
-
-  Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); //# 25: static type warning
-}
diff --git a/tests/language/class_override_test.dart b/tests/language/class_override_test.dart
deleted file mode 100644
index 011e64a..0000000
--- a/tests/language/class_override_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012, 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.
-
-// It is a static warning if a method m1 overrides a method m2 and has a
-// different number of required parameters.
-
-class A {
-  foo() {}
-}
-
-class B extends A {
-  foo(a) {} // //# 00: static type warning
-}
-
-main() {
-  B instance = new B();
-  try {
-    instance.foo();
-  } on NoSuchMethodError catch (error) { // //# 00: continued
-  } finally {}
-  print("Success");
-}
diff --git a/tests/language/closure_in_field_initializer_test.dart b/tests/language/closure_in_field_initializer_test.dart
deleted file mode 100644
index b193180..0000000
--- a/tests/language/closure_in_field_initializer_test.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart";
-
-class Foo {
-  var closures = {'a': (x, y) => x + y};
-}
-
-main() {
-  var closures = new Foo().closures;
-  Expect.equals(6, closures['a'](4, 2));
-}
diff --git a/tests/language/closure_type_test.dart b/tests/language/closure_type_test.dart
deleted file mode 100644
index 09d6c97..0000000
--- a/tests/language/closure_type_test.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Dart test for a closure result type test that cannot be eliminated at compile
-// time.
-
-library closure_type_test;
-
-import "package:expect/expect.dart";
-import 'dart:math' as math;
-
-class Math {
-  static
-  int // //# 01: static type warning
-      sqrt(x) => math.sqrt(x);
-}
-
-isCheckedMode() {
-  try {
-    var i = 1;
-    String s = i;
-    return false;
-  } catch (e) {
-    return true;
-  }
-}
-
-void test(int func(int value), int value) {
-  bool got_type_error = false;
-  try {
-    // Because of function subtyping rules, the static return type of a closure
-    // call cannot be relied upon for static type analysis. For example, a
-    // function returning dynamic (function 'root') can be assigned to a closure
-    // variable declared to return int (closure 'func') and may actually return
-    // a double at run-time.
-    // Therefore, eliminating the run-time type check would be wrong.
-    int x = func(value);
-    Expect.equals(value, x * x);
-  } on TypeError catch (error) {
-    got_type_error = true;
-  }
-  // Type error expected in checked mode only.
-  Expect.isTrue(got_type_error == isCheckedMode());
-}
-
-root(x) => Math.sqrt(x);
-
-main() => test(root, 4);
diff --git a/tests/language/closure_with_super_field_test.dart b/tests/language/closure_with_super_field_test.dart
deleted file mode 100644
index 603c0f6..0000000
--- a/tests/language/closure_with_super_field_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-class A {
-  int a;
-  A() : a = 42;
-}
-
-class B extends A {
-  int get a => 54;
-  returnSuper() => super.a;
-  returnSuperInClosure() => () => super.a;
-}
-
-main() {
-  B b = new B();
-  Expect.equals(54, b.a);
-  Expect.equals(42, b.returnSuper());
-  Expect.equals(42, b.returnSuperInClosure()());
-}
diff --git a/tests/language/language.status b/tests/language/language.status
index 4f0ea9e..5918aa1 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -71,7 +71,6 @@
 generic_methods_generic_function_parameter_test: Pass # Issue 25869
 
 [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == flutter) ]
-class_keyword_test/02: MissingCompileTimeError # Issue 13627
 unicode_bom_test: Fail # Issue 16067
 vm/debug_break_enabled_vm_test/01: Crash, OK # Expected to hit breakpoint.
 
@@ -247,7 +246,6 @@
 vm/causal_async_exception_stack_test: RuntimeError
 vm/causal_async_exception_stack2_test: RuntimeError
 # TODO(zra): Investigate
-closure_cycles_test: Pass, Crash
 vm/math_vm_test: Crash
 
 [$compiler == dart2analyzer]
@@ -349,7 +347,6 @@
 wrong_number_type_arguments_test/02: CompileTimeError
 wrong_number_type_arguments_test/01: CompileTimeError
 is_malformed_type_test/97: CompileTimeError
-class_keyword_test/02: CompileTimeError
 is_malformed_type_test/98: CompileTimeError
 is_malformed_type_test/99: CompileTimeError
 is_malformed_type_test/95: CompileTimeError
@@ -444,7 +441,6 @@
 vm/debug_break_enabled_vm_test/01: CompileTimeError
 vm/debug_break_enabled_vm_test/none: CompileTimeError
 generic_function_typedef2_test/04: CompileTimeError
-class_override_test/00: CompileTimeError
 const_types_test/01: CompileTimeError
 const_types_test/02: CompileTimeError
 const_types_test/03: CompileTimeError
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index 5de8636..100b966 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -15,7 +15,6 @@
 regress_29481_test: Crash # Issue 29755
 
 # Runtime negative test. No static errors or warnings.
-closure_call_wrong_argument_count_negative_test: skip
 
 deep_nesting1_negative_test: CompileTimeError # Issue 25558
 deep_nesting2_negative_test: CompileTimeError # Issue 25558
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index fae7d18..3d40c17 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -155,7 +155,6 @@
 type_variable_bounds2_test/04: Fail # Issue 12702
 type_variable_bounds2_test/06: Pass # Issue 12702 (pass for the wrong reasons).
 type_variable_bounds3_test/00: Fail # Issue 12702
-closure_type_test: Fail # Issue 12745
 malbounded_redirecting_factory_test/02: Fail # Issue 12825
 malbounded_redirecting_factory_test/03: Fail # Issue 12825
 malbounded_redirecting_factory2_test/02: Fail # Issue 12825
@@ -586,69 +585,6 @@
 checked_setter_test: Crash
 class_cycle_test/02: MissingCompileTimeError
 class_cycle_test/03: MissingCompileTimeError
-class_literal_test/01: Crash
-class_literal_test/02: Crash
-class_literal_test/03: Crash
-class_literal_test/04: Crash
-class_literal_test/05: Crash
-class_literal_test/06: Crash
-class_literal_test/07: Crash
-class_literal_test/08: Crash
-class_literal_test/09: Crash
-class_literal_test/10: Crash
-class_literal_test/11: Crash
-class_literal_test/12: Crash
-class_literal_test/13: Crash
-class_literal_test/14: Crash
-class_literal_test/15: Crash
-class_literal_test/16: Crash
-class_literal_test/17: Crash
-class_literal_test/18: Crash
-class_literal_test/19: Crash
-class_literal_test/20: Crash
-class_literal_test/21: Crash
-class_literal_test/22: Crash
-class_literal_test/23: Crash
-class_literal_test/24: Crash
-class_literal_test/25: Crash
-class_literal_test/none: Crash
-class_override_test/00: Crash
-class_syntax2_test: Crash
-class_test: Crash
-classes_static_method_clash_test: Crash
-closure2_test: Crash
-closure3_test: Crash
-closure4_test: Crash
-closure5_test: Crash
-closure6_test: Crash
-closure7_test: Crash
-closure8_test: Crash
-closure_break1_test: Crash
-closure_break2_test: Crash
-closure_break_test: Crash
-closure_cycles_test: Crash
-closure_in_constructor_test: Crash
-closure_in_field_initializer_test: Crash
-closure_in_initializer2_test: Crash
-closure_in_initializer_test: Crash
-closure_internals_test: Crash
-closure_parameter_types_test: Crash
-closure_self_reference_test: Crash
-closure_shared_state_test: Crash
-closure_test: Crash
-closure_type_test/01: Crash
-closure_type_test/none: Crash
-closure_type_variable_test: Crash
-closure_type_variables_test: Crash
-closure_variable_shadow_test: Crash
-closure_with_super_field_test: Crash
-closure_with_super_send_test: Crash
-closures_initializer2_test: Crash
-closures_initializer_test: Crash
-closures_with_complex_params_test: Crash
-code_after_try_is_executed_test/01: Crash
-code_after_try_is_executed_test/none: Crash
-compile_time_constant10_test/none: Crash
 compile_time_constant_a_test: Crash
 compile_time_constant_b_test: Crash
 compile_time_constant_c_test/02: Crash
@@ -725,7 +661,6 @@
 constructor5_test: Crash
 constructor6_test: Crash
 constructor8_test: Crash
-constructor_call_as_function_test/01: Crash
 constructor_duplicate_final_test/01: Crash
 constructor_duplicate_final_test/02: Crash
 constructor_duplicate_final_test/03: Crash
@@ -806,7 +741,6 @@
 deopt_inlined_function_test: Crash
 div_by_zero_test: Crash
 div_with_power_of_two2_test: Crash
-div_with_power_of_two_test: Crash
 double_int_to_string_test: RuntimeError
 double_to_string_as_exponential2_test: Crash
 double_to_string_as_fixed2_test: Crash
@@ -818,7 +752,6 @@
 duplicate_implements_test/04: MissingCompileTimeError
 dynamic_prefix_core_test/01: RuntimeError
 dynamic_prefix_core_test/none: RuntimeError
-dynamic_test: Crash
 efficient_length_warning_test: Crash
 emit_const_fields_test: Crash
 empty_block_case_test: Crash
@@ -849,8 +782,7 @@
 export_main_test: CompileTimeError
 external_test/10: Crash
 external_test/13: Crash
-external_test/20: MissingRuntimeError
-f_bounded_equality_test: Crash
+external_test/20: Crash
 f_bounded_quantification5_test: Crash
 f_bounded_quantification_test/01: Crash
 f_bounded_quantification_test/02: Crash
@@ -887,8 +819,6 @@
 final_super_field_set_test/01: Crash
 final_syntax_test/09: Crash
 final_used_in_try_test: Crash
-first_class_types_constants_test: Crash
-first_class_types_libraries_test: Crash
 first_class_types_literals_test/01: Crash
 first_class_types_literals_test/02: Crash
 first_class_types_literals_test/03: Crash
@@ -903,12 +833,6 @@
 first_class_types_literals_test/12: Crash
 first_class_types_literals_test/none: Crash
 first_class_types_test: Crash
-fixed_type_variable_test/01: Crash
-fixed_type_variable_test/02: Crash
-fixed_type_variable_test/03: Crash
-fixed_type_variable_test/04: Crash
-fixed_type_variable_test/05: Crash
-fixed_type_variable_test/06: Crash
 flatten_test/01: Crash
 flatten_test/02: Crash
 flatten_test/03: Crash
@@ -933,9 +857,9 @@
 function_literals2_test: Crash
 function_literals_test: Crash
 function_malformed_result_type_test: Crash
-function_propagation_test: RuntimeError
-function_subtype0_test: Crash
+function_propagation_test: Crash
 function_subtype2_test: Crash
+function_subtype3_test: Crash
 function_subtype_bound_closure0_test: Crash
 function_subtype_bound_closure1_test: Crash
 function_subtype_bound_closure2_test: Crash
@@ -945,6 +869,9 @@
 function_subtype_bound_closure5a_test: Crash
 function_subtype_bound_closure6_test: Crash
 function_subtype_bound_closure7_test: Crash
+function_subtype_call0_test: Crash
+function_subtype_call1_test: Crash
+function_subtype_call2_test: Crash
 function_subtype_cast0_test: Crash
 function_subtype_cast1_test: Crash
 function_subtype_cast2_test: Crash
@@ -952,7 +879,6 @@
 function_subtype_checked0_test: Crash
 function_subtype_closure0_test: Crash
 function_subtype_closure1_test: Crash
-function_subtype_factory0_test: Crash
 function_subtype_factory1_test: Crash
 function_subtype_inline0_test: Crash
 function_subtype_inline1_test: Crash
@@ -963,19 +889,9 @@
 function_subtype_local3_test: Crash
 function_subtype_local4_test: Crash
 function_subtype_local5_test: Crash
-function_subtype_named1_test: Crash
-function_subtype_not0_test: Crash
 function_subtype_not1_test: Crash
-function_subtype_not2_test: Crash
 function_subtype_not3_test: Crash
-function_subtype_optional1_test: Crash
 function_subtype_setter0_test: Crash
-function_subtype_simple0_test: Crash
-function_subtype_simple1_test: Crash
-function_subtype_simple2_test: Crash
-function_subtype_top_level0_test: Crash
-function_subtype_top_level1_test: Crash
-function_subtype_typearg0_test: Crash
 function_subtype_typearg1_test: Crash
 function_subtype_typearg2_test: Crash
 function_subtype_typearg3_test: Crash
@@ -999,7 +915,6 @@
 generic_constructor_mixin2_test: Crash
 generic_constructor_mixin3_test: Crash
 generic_constructor_mixin_test: Crash
-generic_creation_test: Crash
 generic_field_mixin2_test: Crash
 generic_field_mixin3_test: Crash
 generic_field_mixin4_test: Crash # Issue 18651
@@ -1007,7 +922,6 @@
 generic_field_mixin6_test/01: Crash
 generic_field_mixin_test: Crash
 generic_function_typedef2_test/04: Crash
-generic_function_typedef2_test/none: Crash
 generic_function_typedef_test: Crash
 generic_functions_test: Crash
 generic_instanceof_test: Crash
@@ -1015,7 +929,6 @@
 generic_local_functions_test: Crash
 generic_method_types_test/01: Crash
 generic_method_types_test/02: Crash
-generic_method_types_test/03: Crash
 generic_methods_generic_function_parameter_test: Crash
 generic_methods_new_test: Crash
 generic_methods_test: Crash
@@ -1040,7 +953,6 @@
 getter_override_test/02: MissingCompileTimeError
 hash_map_null_key_foreach_test: Crash
 identical_closure2_test: Crash
-identical_closure_test: Crash
 identical_const_test/05: Crash
 identical_const_test/06: Crash
 identical_const_test/07: Crash
@@ -1055,7 +967,6 @@
 if_null_assignment_behavior_test/12: Crash
 if_null_assignment_behavior_test/13: Crash
 if_null_assignment_behavior_test/14: Crash
-if_null_assignment_behavior_test/15: Crash
 if_null_assignment_static_test/01: Crash
 if_null_assignment_static_test/02: Crash
 if_null_assignment_static_test/03: Crash
@@ -1178,16 +1089,13 @@
 issue10783_test: Crash
 issue11724_test: Crash
 issue12284_test: Crash
-issue13179_test: Crash
 issue13474_test: Crash
 issue1363_test: Crash
-issue13673_test: Crash
 issue14014_2_test: Crash
 issue14014_3_test: Crash
 issue14014_test: Crash
 issue14242_test: Crash
 issue15720_test: Crash
-issue18628_1_test/01: Crash
 issue20476_test: Crash
 issue21079_test: Crash
 issue21159_test: Crash
@@ -1257,7 +1165,6 @@
 list_test: Crash
 list_tracer_call_last_test: Crash
 list_tracer_in_map_test: Crash
-list_tracer_return_from_tearoff_closure_test: Crash
 local_function2_test: Crash
 local_function3_test: Crash
 local_function_test: Crash
@@ -1279,7 +1186,6 @@
 main_test/45: Crash
 malbounded_type_cast2_test: Crash
 malbounded_type_cast_test: Crash
-malbounded_type_literal_test: Crash
 malbounded_type_test2_test: Crash
 malformed2_test/00: Crash
 malformed_test/01: Crash
@@ -1315,11 +1221,9 @@
 method_override8_test/00: Crash
 method_override8_test/01: MissingCompileTimeError
 method_override_test: Crash
-methods_as_constants2_test: Crash
 methods_as_constants_test: Crash
 minify_closure_variable_collision_test: Crash
 mint_arithmetic_test: RuntimeError
-mint_compares_test: Crash
 missing_const_constructor_test/01: Crash
 missing_const_constructor_test/none: Crash
 mixin_black_listed_test/02: Crash
@@ -1349,7 +1253,6 @@
 mixin_illegal_super_use_test/09: Crash
 mixin_illegal_super_use_test/10: Crash
 mixin_illegal_super_use_test/11: Crash
-mixin_illegal_super_use_test/none: Crash
 mixin_illegal_superclass_test/01: MissingCompileTimeError
 mixin_illegal_superclass_test/02: MissingCompileTimeError
 mixin_illegal_superclass_test/03: MissingCompileTimeError
@@ -1380,7 +1283,6 @@
 mixin_illegal_superclass_test/28: Crash
 mixin_illegal_superclass_test/29: MissingCompileTimeError
 mixin_illegal_superclass_test/30: Crash
-mixin_implements_test: Crash
 mixin_issue10216_2_test: Crash
 mixin_issue10216_test: Crash
 mixin_lib_extends_field_test: Crash
@@ -1421,11 +1323,9 @@
 mixin_of_mixin_test/22: CompileTimeError
 mixin_of_mixin_test/none: CompileTimeError
 mixin_only_for_rti_test: Crash
-mixin_override_regression_test: Crash
 mixin_prefix_test: Crash
 mixin_proto_test: Crash
 mixin_regress_11398_test: Crash
-mixin_regress_13688_test: Crash
 mixin_super_2_test: CompileTimeError
 mixin_super_bound2_test/01: CompileTimeError
 mixin_super_bound2_test/none: CompileTimeError
@@ -1465,7 +1365,6 @@
 mixin_supertype_subclass_test/04: CompileTimeError
 mixin_supertype_subclass_test/05: CompileTimeError
 mixin_supertype_subclass_test/none: CompileTimeError
-mixin_this_use_test: Crash
 mixin_type_parameter3_test: Crash
 mixin_type_parameter4_test: Crash
 mixin_type_parameter5_test: Crash
@@ -1525,36 +1424,11 @@
 not_enough_positional_arguments_test/01: Crash
 not_enough_positional_arguments_test/02: Crash
 not_enough_positional_arguments_test/05: Crash
-null2_test: Crash
 null_access_error_test: Crash
 null_bottom_test/03: Crash
 null_bottom_test/none: Crash
 null_inline_test: Crash
 null_is_bottom_test/16: Crash
-null_is_bottom_test/17: Crash
-null_is_bottom_test/18: Crash
-null_is_bottom_test/19: Crash
-null_is_bottom_test/20: Crash
-null_is_bottom_test/21: Crash
-null_is_bottom_test/22: Crash
-null_is_bottom_test/23: Crash
-null_is_bottom_test/24: Crash
-null_is_bottom_test/25: Crash
-null_is_bottom_test/26: Crash
-null_is_bottom_test/27: Crash
-null_is_bottom_test/28: Crash
-null_is_bottom_test/29: Crash
-null_is_bottom_test/30: Crash
-null_is_bottom_test/31: Crash
-null_is_bottom_test/32: Crash
-null_is_bottom_test/33: Crash
-null_is_bottom_test/34: Crash
-null_is_bottom_test/35: Crash
-null_is_bottom_test/36: Crash
-null_is_bottom_test/37: Crash
-null_is_bottom_test/38: Crash
-null_is_bottom_test/39: Crash
-null_is_bottom_test/40: Crash
 null_no_such_method_test: Crash
 null_test/02: Crash
 null_test/03: Crash
@@ -1600,10 +1474,8 @@
 positional_parameters_type_test/01: Crash
 positional_parameters_type_test/02: Crash
 positional_parameters_type_test/none: Crash
-prefix14_test: Crash
 prefix15_test: Crash
 prefix16_test: Crash
-prefix21_test: Crash
 private3_test: Crash
 private4_test: Crash
 private_access_test/01: Crash
@@ -1633,9 +1505,7 @@
 proxy_test/04: Crash
 proxy_test/05: Crash
 proxy_test/06: Crash
-pure_function2_test: Crash
 range_analysis2_test: Crash
-range_analysis_test: Crash
 redirecting_constructor_initializer_test: RuntimeError
 redirecting_factory_default_values_test/01: MissingCompileTimeError
 redirecting_factory_default_values_test/02: MissingCompileTimeError
@@ -1650,7 +1520,6 @@
 regress_12561_test: Crash
 regress_12615_test: Crash
 regress_13494_test: Crash
-regress_14105_test: Crash
 regress_17382_test: Crash
 regress_18435_test: Crash
 regress_18535_test: Crash
@@ -1664,8 +1533,6 @@
 regress_22445_test: Crash
 regress_22579_test: Crash
 regress_22666_test: Crash
-regress_22700_test: Crash
-regress_22719_test: Crash
 regress_22728_test: Crash
 regress_22777_test: Crash
 regress_22822_test: Crash
@@ -1698,7 +1565,6 @@
 regress_26543_3_test: Crash
 regress_26668_test: Crash
 regress_26948_test: Crash
-regress_27164_test: Crash
 regress_27572_test: Crash
 regress_27617_test/1: Crash
 regress_27659_test: Crash
@@ -1709,12 +1575,10 @@
 regress_29349_test: CompileTimeError
 regress_29949_test: Crash
 regress_30121_test: Crash
-reify_typevar_test: Crash
 rethrow_test: Crash
 return_type_test: Crash
 rewrite_implicit_this_test/01: Crash
 runtime_type_function_test: Crash
-runtime_type_test: Crash
 savannah_test: Crash
 scoped_variables_try_catch_test: Crash
 setter_declaration2_negative_test: Crash
@@ -1732,7 +1596,6 @@
 stacktrace_rethrow_nonerror_test: Crash
 stacktrace_test: Crash
 statement_test: Crash
-static_closure_identical_test: Crash
 static_const_field_test: Crash
 static_field_test/01: Crash
 static_field_test/02: Crash
@@ -1745,7 +1608,6 @@
 static_getter_no_setter2_test/none: Crash
 static_getter_no_setter3_test/01: Crash
 static_getter_no_setter3_test/none: Crash
-static_implicit_closure_test: Crash
 static_initializer_type_error_test: Crash
 static_setter_get_test/01: Crash
 string_charcode_test: Crash
@@ -1753,8 +1615,6 @@
 string_interpolate_null_test: Crash
 string_interpolation_and_buffer_test: Crash
 string_interpolation_newline_test: Crash
-string_interpolation_test/01: Crash
-string_interpolation_test/none: Crash
 string_join_test: RuntimeError
 string_literals_test: Crash
 string_no_operator_test: Crash
@@ -1841,7 +1701,6 @@
 top_level_getter_no_setter1_test/none: Crash
 top_level_getter_no_setter2_test/01: Crash
 top_level_getter_no_setter2_test/none: Crash
-top_level_in_initializer_test: Crash
 transitive_private_library_access_test: Crash
 truncdiv_test: Crash
 try_catch2_test: Crash
@@ -1864,14 +1723,10 @@
 try_finally_regress_25654_test: Crash
 type_argument_in_super_type_test: Crash
 type_argument_substitution_test: Crash
-type_check_const_function_typedef2_test/00: Crash
-type_check_const_function_typedef2_test/none: Crash
-type_check_const_function_typedef_test: Crash
 type_check_test: Crash
 type_checks_in_factory_method_test: Crash
 type_error_test: Crash
 type_literal_prefix_call_test/00: Crash
-type_parameter_literal_test: Crash
 type_parameter_test/01: Crash
 type_parameter_test/02: Crash
 type_parameter_test/03: Crash
@@ -1896,21 +1751,6 @@
 type_promotion_closure_test/15: Crash
 type_promotion_closure_test/16: Crash
 type_promotion_closure_test/none: Crash
-type_promotion_functions_test/01: Crash
-type_promotion_functions_test/02: Crash
-type_promotion_functions_test/03: Crash
-type_promotion_functions_test/04: Crash
-type_promotion_functions_test/05: Crash
-type_promotion_functions_test/06: Crash
-type_promotion_functions_test/07: Crash
-type_promotion_functions_test/08: Crash
-type_promotion_functions_test/09: Crash
-type_promotion_functions_test/10: Crash
-type_promotion_functions_test/11: Crash
-type_promotion_functions_test/12: Crash
-type_promotion_functions_test/13: Crash
-type_promotion_functions_test/14: Crash
-type_promotion_functions_test/none: Crash
 type_propagation2_test: Crash
 type_propagation_assert_assignable_test: Crash
 type_propagation_in_for_update_test: Crash
@@ -1935,10 +1775,18 @@
 type_variable_initializer_test: Crash
 type_variable_nested_test: Crash
 type_variable_scope2_test: Crash
-type_variable_typedef_test: Crash
 typecheck_multifield_declaration_test: Crash
 typedef_is_test: Crash
-typedef_uses_test: Crash # type 'FunctionType' is not a subtype of type 'ResolutionFunctionType' of 'type' where
+identical_closure2_test: RuntimeError
+mixin_illegal_super_use_test/01: MissingCompileTimeError
+mixin_illegal_super_use_test/10: MissingCompileTimeError
+mixin_illegal_super_use_test/11: MissingCompileTimeError
+mixin_issue10216_2_test: RuntimeError
+mixin_mixin2_test: RuntimeError
+mixin_mixin3_test: RuntimeError
+mixin_mixin4_test: RuntimeError
+mixin_mixin7_test: RuntimeError
+mixin_mixin_test: RuntimeError
 typevariable_substitution2_test/02: Crash
 unresolved_default_constructor_test/01: Crash
 value_range2_test: Crash
@@ -2067,68 +1915,6 @@
 checked_setter_test: Crash
 class_cycle_test/02: MissingCompileTimeError
 class_cycle_test/03: MissingCompileTimeError
-class_literal_test/01: Crash
-class_literal_test/02: Crash
-class_literal_test/03: Crash
-class_literal_test/04: Crash
-class_literal_test/05: Crash
-class_literal_test/06: Crash
-class_literal_test/07: Crash
-class_literal_test/08: Crash
-class_literal_test/09: Crash
-class_literal_test/10: Crash
-class_literal_test/11: Crash
-class_literal_test/12: Crash
-class_literal_test/13: Crash
-class_literal_test/14: Crash
-class_literal_test/15: Crash
-class_literal_test/16: Crash
-class_literal_test/17: Crash
-class_literal_test/18: Crash
-class_literal_test/19: Crash
-class_literal_test/20: Crash
-class_literal_test/21: Crash
-class_literal_test/22: Crash
-class_literal_test/23: Crash
-class_literal_test/24: Crash
-class_literal_test/25: Crash
-class_override_test/00: Crash
-class_syntax2_test: Crash
-class_test: Crash
-classes_static_method_clash_test: Crash
-closure2_test: Crash
-closure3_test: Crash
-closure4_test: Crash
-closure5_test: Crash
-closure6_test: Crash
-closure7_test: Crash
-closure8_test: Crash
-closure_break1_test: Crash
-closure_break2_test: Crash
-closure_break_test: Crash
-closure_cycles_test: Crash
-closure_in_constructor_test: Crash
-closure_in_field_initializer_test: Crash
-closure_in_initializer2_test: Crash
-closure_in_initializer_test: Crash
-closure_internals_test: Crash
-closure_parameter_types_test: Crash
-closure_self_reference_test: Crash
-closure_shared_state_test: Crash
-closure_test: Crash
-closure_type_test/01: Crash
-closure_type_test/none: Crash
-closure_type_variable_test: Crash
-closure_type_variables_test: Crash
-closure_variable_shadow_test: Crash
-closure_with_super_field_test: Crash
-closure_with_super_send_test: Crash
-closures_initializer2_test: Crash
-closures_initializer_test: Crash
-closures_with_complex_params_test: Crash
-code_after_try_is_executed_test/01: Crash
-code_after_try_is_executed_test/none: Crash
-compile_time_constant10_test/none: Crash
 compile_time_constant_a_test: Crash
 compile_time_constant_b_test: Crash
 compile_time_constant_c_test/02: Crash
@@ -2300,7 +2086,6 @@
 duplicate_implements_test/04: MissingCompileTimeError
 dynamic_prefix_core_test/01: RuntimeError
 dynamic_prefix_core_test/none: RuntimeError
-dynamic_test: Crash
 efficient_length_warning_test: Crash
 emit_const_fields_test: Crash
 empty_block_case_test: Crash
@@ -2315,6 +2100,7 @@
 enum_test: Crash
 equality_test: Crash
 error_stacktrace_test: Crash
+evaluation_redirecting_constructor_test: Crash
 example_constructor_test: Crash
 exception_identity_test: Crash
 exception_in_increment_test: Crash
@@ -2330,7 +2116,7 @@
 export_main_test: CompileTimeError
 external_test/10: Crash
 external_test/13: Crash
-external_test/20: MissingRuntimeError
+external_test/20: Crash
 f_bounded_quantification4_test: RuntimeError
 f_bounded_quantification5_test: Crash
 f_bounded_quantification_test/01: Crash
@@ -2368,7 +2154,6 @@
 final_super_field_set_test/01: Crash
 final_syntax_test/09: Crash
 final_used_in_try_test: Crash
-first_class_types_constants_test: Crash
 first_class_types_literals_test/01: Crash
 first_class_types_literals_test/02: Crash
 first_class_types_literals_test/03: Crash
@@ -2591,6 +2376,7 @@
 inferrer_constructor5_test/01: Crash
 inferrer_constructor_test: Crash
 inferrer_synthesized_constructor_test: Crash
+inferrer_synthesized_super_constructor_test: Crash
 inferrer_this_access_test: Crash
 infinite_switch_label_test: Crash
 infinity_test: RuntimeError
@@ -2633,7 +2419,9 @@
 issue12284_test: Crash
 issue13474_test: Crash
 issue1363_test: Crash
+issue14014_2_test: Crash
 issue14014_3_test: Crash
+issue14014_test: Crash
 issue14242_test: Crash
 issue15720_test: Crash
 issue20476_test: Crash
@@ -2641,6 +2429,7 @@
 issue21159_test: Crash
 issue22800_test: Crash
 issue23244_test: Crash
+issue4295001_test: Crash
 issue9602_test: Crash
 issue9664_test: Crash
 issue9939_test: Crash
@@ -2787,7 +2576,6 @@
 mixin_illegal_super_use_test/09: Crash
 mixin_illegal_super_use_test/10: Crash
 mixin_illegal_super_use_test/11: Crash
-mixin_illegal_super_use_test/none: Crash
 mixin_illegal_superclass_test/01: MissingCompileTimeError
 mixin_illegal_superclass_test/02: MissingCompileTimeError
 mixin_illegal_superclass_test/03: MissingCompileTimeError
@@ -2818,7 +2606,6 @@
 mixin_illegal_superclass_test/28: Crash
 mixin_illegal_superclass_test/29: MissingCompileTimeError
 mixin_illegal_superclass_test/30: Crash
-mixin_implements_test: Crash
 mixin_issue10216_2_test: Crash
 mixin_issue10216_test: Crash
 mixin_lib_extends_field_test: Crash
@@ -2859,11 +2646,9 @@
 mixin_of_mixin_test/22: CompileTimeError
 mixin_of_mixin_test/none: CompileTimeError
 mixin_only_for_rti_test: Crash
-mixin_override_regression_test: Crash
 mixin_prefix_test: Crash
 mixin_proto_test: Crash
 mixin_regress_11398_test: Crash
-mixin_regress_13688_test: Crash
 mixin_super_2_test: CompileTimeError
 mixin_super_bound2_test/01: CompileTimeError
 mixin_super_bound2_test/none: CompileTimeError
@@ -2903,7 +2688,6 @@
 mixin_supertype_subclass_test/04: CompileTimeError
 mixin_supertype_subclass_test/05: CompileTimeError
 mixin_supertype_subclass_test/none: CompileTimeError
-mixin_this_use_test: Crash
 mixin_type_parameter3_test: Crash
 mixin_type_parameter5_test: Crash
 mixin_type_parameter6_test: Crash
@@ -3071,7 +2855,15 @@
 regress_22445_test: Crash
 regress_22579_test: Crash
 regress_22666_test: Crash
-regress_22719_test: Crash
+mixin_illegal_super_use_test/01: MissingCompileTimeError
+mixin_illegal_super_use_test/10: MissingCompileTimeError
+mixin_illegal_super_use_test/11: MissingCompileTimeError
+mixin_issue10216_2_test: RuntimeError
+mixin_mixin2_test: RuntimeError
+mixin_mixin3_test: RuntimeError
+mixin_mixin4_test: RuntimeError
+mixin_mixin7_test: RuntimeError
+mixin_mixin_test: RuntimeError
 regress_22728_test: Crash
 regress_22777_test: Crash
 regress_22822_test: Crash
diff --git a/tests/language/class_keyword_test.dart b/tests/language_2/class_keyword_test.dart
similarity index 100%
rename from tests/language/class_keyword_test.dart
rename to tests/language_2/class_keyword_test.dart
diff --git a/tests/language_2/class_literal_static_test.dart b/tests/language_2/class_literal_static_test.dart
new file mode 100644
index 0000000..8d86d6c
--- /dev/null
+++ b/tests/language_2/class_literal_static_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Test class literal expressions.
+
+class Class {
+  static fisk() => 42;
+}
+
+foo(x) {}
+
+main() {
+  // Verify that dereferencing a class literal is a compile-time error.
+  Class(); //# 01: compile-time error
+  Class[0]; //# 02: compile-time error
+  var x = Class(); //# 03: compile-time error
+  var y = Class[0]; //# 04: compile-time error
+  var z = Class[0].field; //# 05: compile-time error
+  var w = Class[0].method(); //# 06: compile-time error
+  foo(Class()); //# 07: compile-time error
+  foo(Class[0]); //# 08: compile-time error
+  foo(Class[0].field); //# 09: compile-time error
+  foo(Class[0].method()); //# 10: compile-time error
+  Class[0] = 91; //# 11: compile-time error
+  Class++; //# 12: compile-time error
+  ++Class; //# 13: compile-time error
+  Class[0] += 3; //# 14: compile-time error
+  ++Class[0]; //# 15: compile-time error
+  Class[0]++; //# 16: compile-time error
+  Class.method(); //# 17: compile-time error
+  Class.field; //# 18: compile-time error
+  var p = Class.method(); //# 19: compile-time error
+  var q = Class.field; //# 20: compile-time error
+  foo(Class.method()); //# 21: compile-time error
+  foo(Class.field); //# 22: compile-time error
+  Class / 3; //# 23: compile-time error
+  Class += 3; //# 24: compile-time error
+  Class.toString(); //# 25: compile-time error
+}
diff --git a/tests/language_2/class_literal_test.dart b/tests/language_2/class_literal_test.dart
new file mode 100644
index 0000000..8ce3560
--- /dev/null
+++ b/tests/language_2/class_literal_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Test class literal expressions.
+
+class Class {
+  static fisk() => 42;
+}
+
+foo(x) {}
+
+main() {
+  Expect.equals(42, Class.fisk());
+  Expect.equals(null, foo(Class.fisk()));
+
+  // Verify references to a class literal are allowed.
+  Class;
+  foo(Class);
+  Expect.isFalse(Class == null);
+  dynamic x = Class;
+
+  // Verify that dereferencing a class literal is a runtime error.
+  Expect.throws(() { x(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var y = x[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var y = x[0].field; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var y = x[0].method(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x()); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x[0]); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x[0].field); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x[0].method()); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x[0] = 91; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x++; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { ++x; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x[0] += 3; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { ++x[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x[0]++; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x.method(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x.field; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var y = x.method(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var y = x.field; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x.method()); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(x.field); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x / 3; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { x += 3; }, (e) => e is NoSuchMethodError);
+
+  // Verify that a class literal isn't a string literal.
+  Expect.notEquals(Class, "Class");
+
+  // Verify toString() works for class literals.
+  Expect.isTrue((Class).toString() is String);
+  Expect.isTrue(x.toString() is String);
+}
diff --git a/tests/language_2/class_override_test.dart b/tests/language_2/class_override_test.dart
new file mode 100644
index 0000000..41ec7ad
--- /dev/null
+++ b/tests/language_2/class_override_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2012, 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.
+
+// It is a static compile time error if a method m1 overrides a method m2 and has a
+// different number of required parameters.
+
+class A {
+  foo() {}
+}
+
+class B extends A {
+  /*@compile-error=unspecified*/ foo(a) {} 
+}
+
+main() {
+  new B().foo(42);
+}
diff --git a/tests/language/class_syntax2_test.dart b/tests/language_2/class_syntax2_test.dart
similarity index 100%
rename from tests/language/class_syntax2_test.dart
rename to tests/language_2/class_syntax2_test.dart
diff --git a/tests/language/class_syntax_test.dart b/tests/language_2/class_syntax_test.dart
similarity index 100%
rename from tests/language/class_syntax_test.dart
rename to tests/language_2/class_syntax_test.dart
diff --git a/tests/language/class_test.dart b/tests/language_2/class_test.dart
similarity index 100%
rename from tests/language/class_test.dart
rename to tests/language_2/class_test.dart
diff --git a/tests/language/classes_static_method_clash_test.dart b/tests/language_2/classes_static_method_clash_test.dart
similarity index 100%
rename from tests/language/classes_static_method_clash_test.dart
rename to tests/language_2/classes_static_method_clash_test.dart
diff --git a/tests/language/closure2_test.dart b/tests/language_2/closure2_test.dart
similarity index 100%
rename from tests/language/closure2_test.dart
rename to tests/language_2/closure2_test.dart
diff --git a/tests/language/closure3_test.dart b/tests/language_2/closure3_test.dart
similarity index 100%
rename from tests/language/closure3_test.dart
rename to tests/language_2/closure3_test.dart
diff --git a/tests/language/closure4_test.dart b/tests/language_2/closure4_test.dart
similarity index 100%
rename from tests/language/closure4_test.dart
rename to tests/language_2/closure4_test.dart
diff --git a/tests/language/closure5_test.dart b/tests/language_2/closure5_test.dart
similarity index 100%
rename from tests/language/closure5_test.dart
rename to tests/language_2/closure5_test.dart
diff --git a/tests/language/closure6_test.dart b/tests/language_2/closure6_test.dart
similarity index 100%
rename from tests/language/closure6_test.dart
rename to tests/language_2/closure6_test.dart
diff --git a/tests/language/closure7_test.dart b/tests/language_2/closure7_test.dart
similarity index 100%
rename from tests/language/closure7_test.dart
rename to tests/language_2/closure7_test.dart
diff --git a/tests/language/closure8_test.dart b/tests/language_2/closure8_test.dart
similarity index 100%
rename from tests/language/closure8_test.dart
rename to tests/language_2/closure8_test.dart
diff --git a/tests/language/closure_break1_test.dart b/tests/language_2/closure_break1_test.dart
similarity index 100%
rename from tests/language/closure_break1_test.dart
rename to tests/language_2/closure_break1_test.dart
diff --git a/tests/language/closure_break2_test.dart b/tests/language_2/closure_break2_test.dart
similarity index 100%
rename from tests/language/closure_break2_test.dart
rename to tests/language_2/closure_break2_test.dart
diff --git a/tests/language/closure_break_test.dart b/tests/language_2/closure_break_test.dart
similarity index 100%
rename from tests/language/closure_break_test.dart
rename to tests/language_2/closure_break_test.dart
diff --git a/tests/language/closure_call_wrong_argument_count_negative_test.dart b/tests/language_2/closure_call_wrong_argument_count_negative_test.dart
similarity index 100%
rename from tests/language/closure_call_wrong_argument_count_negative_test.dart
rename to tests/language_2/closure_call_wrong_argument_count_negative_test.dart
diff --git a/tests/language/closure_cycles_test.dart b/tests/language_2/closure_cycles_test.dart
similarity index 100%
rename from tests/language/closure_cycles_test.dart
rename to tests/language_2/closure_cycles_test.dart
diff --git a/tests/language/closure_in_constructor_test.dart b/tests/language_2/closure_in_constructor_test.dart
similarity index 100%
rename from tests/language/closure_in_constructor_test.dart
rename to tests/language_2/closure_in_constructor_test.dart
diff --git a/tests/language_strong/closure_in_field_initializer_test.dart b/tests/language_2/closure_in_field_initializer_test.dart
similarity index 100%
rename from tests/language_strong/closure_in_field_initializer_test.dart
rename to tests/language_2/closure_in_field_initializer_test.dart
diff --git a/tests/language/closure_in_initializer2_test.dart b/tests/language_2/closure_in_initializer2_test.dart
similarity index 100%
rename from tests/language/closure_in_initializer2_test.dart
rename to tests/language_2/closure_in_initializer2_test.dart
diff --git a/tests/language/closure_in_initializer_test.dart b/tests/language_2/closure_in_initializer_test.dart
similarity index 93%
rename from tests/language/closure_in_initializer_test.dart
rename to tests/language_2/closure_in_initializer_test.dart
index aad2e5e..3556649 100644
--- a/tests/language/closure_in_initializer_test.dart
+++ b/tests/language_2/closure_in_initializer_test.dart
@@ -24,12 +24,12 @@
 class C extends A {
   var h;
   C(a)
-      : super(42),
-        h = (() => ++a);
+      : h = (() => ++a),
+        super(42);
 }
 
 main() {
-  var a = new A(1);
+  dynamic a = new A(1);
   Expect.equals(46, a.f());
   Expect.equals(5, a.g());
   Expect.equals(47, a.f());
diff --git a/tests/language/closure_internals_test.dart b/tests/language_2/closure_internals_test.dart
similarity index 62%
rename from tests/language/closure_internals_test.dart
rename to tests/language_2/closure_internals_test.dart
index 587be33..61e5b2b 100644
--- a/tests/language/closure_internals_test.dart
+++ b/tests/language_2/closure_internals_test.dart
@@ -10,7 +10,7 @@
 
 main() {
   var f = new C().foo;
-  Expect.throws(() => f.target, (e) => e is NoSuchMethodError);
-  Expect.throws(() => f.self, (e) => e is NoSuchMethodError);
-  Expect.throws(() => f.receiver, (e) => e is NoSuchMethodError);
+  var target = f.target; //# 01: compile-time error
+  var self = f.self; //# 02: compile-time error
+  var receiver = f.receiver; //# 03: compile-time error
 }
diff --git a/tests/language/closure_parameter_types_test.dart b/tests/language_2/closure_parameter_types_test.dart
similarity index 100%
rename from tests/language/closure_parameter_types_test.dart
rename to tests/language_2/closure_parameter_types_test.dart
diff --git a/tests/language/closure_self_reference_test.dart b/tests/language_2/closure_self_reference_test.dart
similarity index 100%
rename from tests/language/closure_self_reference_test.dart
rename to tests/language_2/closure_self_reference_test.dart
diff --git a/tests/language/closure_shared_state_test.dart b/tests/language_2/closure_shared_state_test.dart
similarity index 100%
rename from tests/language/closure_shared_state_test.dart
rename to tests/language_2/closure_shared_state_test.dart
diff --git a/tests/language/closure_side_effect_test.dart b/tests/language_2/closure_side_effect_test.dart
similarity index 100%
rename from tests/language/closure_side_effect_test.dart
rename to tests/language_2/closure_side_effect_test.dart
diff --git a/tests/language/closure_test.dart b/tests/language_2/closure_test.dart
similarity index 100%
rename from tests/language/closure_test.dart
rename to tests/language_2/closure_test.dart
diff --git a/tests/language_2/closure_type_test.dart b/tests/language_2/closure_type_test.dart
new file mode 100644
index 0000000..c388b32
--- /dev/null
+++ b/tests/language_2/closure_type_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Dart test for a closure result type test that cannot be eliminated at compile
+// time.
+
+import "package:expect/expect.dart";
+
+void test(A func(String value), String value) {
+  Expect.throws(() {
+      B x = func(value);
+  }, (e) => e is TypeError);
+}
+
+
+class A {
+}
+
+class B extends A {
+}
+
+class C {
+  static A a(String x) => new A();
+}
+
+A aclosure(String x) => C.a(x);
+A bclosure() => new A(); 
+
+main() {
+  test(aclosure, "foo");
+  test((bar) => bclosure(), "baz");
+} 
diff --git a/tests/language/closure_type_variable_test.dart b/tests/language_2/closure_type_variable_test.dart
similarity index 100%
rename from tests/language/closure_type_variable_test.dart
rename to tests/language_2/closure_type_variable_test.dart
diff --git a/tests/language/closure_type_variables_test.dart b/tests/language_2/closure_type_variables_test.dart
similarity index 100%
rename from tests/language/closure_type_variables_test.dart
rename to tests/language_2/closure_type_variables_test.dart
diff --git a/tests/language/closure_variable_shadow_test.dart b/tests/language_2/closure_variable_shadow_test.dart
similarity index 100%
rename from tests/language/closure_variable_shadow_test.dart
rename to tests/language_2/closure_variable_shadow_test.dart
diff --git a/tests/language_strong/closure_with_super_field_test.dart b/tests/language_2/closure_with_super_field_test.dart
similarity index 100%
rename from tests/language_strong/closure_with_super_field_test.dart
rename to tests/language_2/closure_with_super_field_test.dart
diff --git a/tests/language/closure_with_super_send_test.dart b/tests/language_2/closure_with_super_send_test.dart
similarity index 100%
rename from tests/language/closure_with_super_send_test.dart
rename to tests/language_2/closure_with_super_send_test.dart
diff --git a/tests/language/closures_initializer2_test.dart b/tests/language_2/closures_initializer2_test.dart
similarity index 100%
rename from tests/language/closures_initializer2_test.dart
rename to tests/language_2/closures_initializer2_test.dart
diff --git a/tests/language/closures_initializer_test.dart b/tests/language_2/closures_initializer_test.dart
similarity index 100%
rename from tests/language/closures_initializer_test.dart
rename to tests/language_2/closures_initializer_test.dart
diff --git a/tests/language/closures_with_complex_params_test.dart b/tests/language_2/closures_with_complex_params_test.dart
similarity index 100%
rename from tests/language/closures_with_complex_params_test.dart
rename to tests/language_2/closures_with_complex_params_test.dart
diff --git a/tests/language/code_after_try_is_executed_test.dart b/tests/language_2/code_after_try_is_executed_test.dart
similarity index 100%
rename from tests/language/code_after_try_is_executed_test.dart
rename to tests/language_2/code_after_try_is_executed_test.dart
diff --git a/tests/language/code_motion_crash_test.dart b/tests/language_2/code_motion_crash_test.dart
similarity index 100%
rename from tests/language/code_motion_crash_test.dart
rename to tests/language_2/code_motion_crash_test.dart
diff --git a/tests/language/comparison_test.dart b/tests/language_2/comparison_test.dart
similarity index 100%
rename from tests/language/comparison_test.dart
rename to tests/language_2/comparison_test.dart
diff --git a/tests/language/compile_time_constant10_test.dart b/tests/language_2/compile_time_constant10_test.dart
similarity index 100%
rename from tests/language/compile_time_constant10_test.dart
rename to tests/language_2/compile_time_constant10_test.dart
diff --git a/tests/language/compile_time_constant11_test.dart b/tests/language_2/compile_time_constant11_test.dart
similarity index 100%
rename from tests/language/compile_time_constant11_test.dart
rename to tests/language_2/compile_time_constant11_test.dart
diff --git a/tests/language/compile_time_constant12_test.dart b/tests/language_2/compile_time_constant12_test.dart
similarity index 100%
rename from tests/language/compile_time_constant12_test.dart
rename to tests/language_2/compile_time_constant12_test.dart
diff --git a/tests/language/compile_time_constant13_test.dart b/tests/language_2/compile_time_constant13_test.dart
similarity index 100%
rename from tests/language/compile_time_constant13_test.dart
rename to tests/language_2/compile_time_constant13_test.dart
diff --git a/tests/language/compile_time_constant2_test.dart b/tests/language_2/compile_time_constant2_test.dart
similarity index 100%
rename from tests/language/compile_time_constant2_test.dart
rename to tests/language_2/compile_time_constant2_test.dart
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index eacb119..1210ed2 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -17,3 +17,14 @@
 cha_deopt1_test: Crash # Requires deferred libraries
 cha_deopt2_test: Crash # Requires deferred libraries
 cha_deopt3_test: Crash # Requires deferred libraries
+
+[ ! $checked && ! $strong ]
+closure_type_test: RuntimeError
+
+[ ! $strong ]
+class_literal_static_test: MissingCompileTimeError # Requires strong mode
+class_literal_static_test/none: Pass
+class_override_test: MissingCompileTimeError # Requires strong mode
+closure_internals_test/01: MissingCompileTimeError # Requires strong mode
+closure_internals_test/02: MissingCompileTimeError # Requires strong mode
+closure_internals_test/03: MissingCompileTimeError # Requires strong mode
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 3d38d0d..053bcac 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -145,6 +145,7 @@
 body_less_constructor_wrong_arg_negative_test: CompileTimeError # Issue 18695
 built_in_identifier_prefix_test: CompileTimeError
 cascade_test/none: fail # Issue 11577
+closure_call_wrong_argument_count_negative_test: skip
 
 [ $strong && $compiler == dart2analyzer ]
 accessor_conflict_export2_test: CompileTimeError # Issue 25626
@@ -171,6 +172,7 @@
 cast_test/04: MissingCompileTimeError
 cast_test/05: MissingCompileTimeError
 generic_methods_generic_function_result_test/01: MissingCompileTimeError # Issue #30207
+closure_type_test: Pass
 
 [ $compiler == dart2analyzer && $runtime == none ]
 assertion_initializer_const_error2_test/none: CompileTimeError
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index 94bab09..3042d2d 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -136,6 +136,9 @@
 assertion_test: RuntimeError
 regress_30339_test: RuntimeError # Issue 26429
 
+[ $compiler == dart2js && $runtime == drt && $checked ]
+regress_30339_test: RuntimeError # Issue 30393
+
 [ $compiler == dart2js && $runtime == jsshell && $checked ]
 assertion_test: RuntimeError
 
@@ -289,7 +292,6 @@
 call_constructor_on_unresolvable_class_test/07: Crash
 call_function2_test: Crash # Assertion failure: Cannot find value local(Maps_mapToString_closure.call#first) in (local(Maps_mapToString_closure.call#k), local(Maps_mapToString_closure.call#v), local(Maps.mapToString#)) for j:closure_call(Maps_mapToString_closure.call).
 call_function_apply_test: Crash
-call_function_test: Crash # type 'FunctionType' is not a subtype of type 'ResolutionFunctionType' of 'type' where
 call_nonexistent_constructor_test/01: Crash
 call_nonexistent_constructor_test/02: Crash
 call_nonexistent_static_test/01: Crash
@@ -323,6 +325,56 @@
 cha_deopt1_test: CompileTimeError
 cha_deopt2_test: CompileTimeError
 cha_deopt3_test: CompileTimeError
+class_literal_test/01: Crash
+class_literal_test/02: Crash
+class_literal_test/03: Crash
+class_literal_test/04: Crash
+class_literal_test/05: Crash
+class_literal_test/06: Crash
+class_literal_test/07: Crash
+class_literal_test/08: Crash
+class_literal_test/09: Crash
+class_literal_test/10: Crash
+class_literal_test/11: Crash
+class_literal_test/12: Crash
+class_literal_test/13: Crash
+class_literal_test/14: Crash
+class_literal_test/15: Crash
+class_literal_test/16: Crash
+class_literal_test/17: Crash
+class_literal_test/18: Crash
+class_literal_test/19: Crash
+class_literal_test/20: Crash
+class_literal_test/21: Crash
+class_literal_test/22: Crash
+class_literal_test/23: Crash
+class_literal_test/24: Crash
+class_literal_test/25: Crash
+class_literal_test/none: Crash
+class_literal_test: Crash # Assertion failure: Cannot find value local(main_closure.call#x) in (local(main#)) for j:closure_call(main_closure.call).
+class_override_test/00: Crash
+class_syntax2_test: Crash
+class_test: Crash
+classes_static_method_clash_test: Crash
+closure2_test: Crash
+closure3_test: Crash
+closure4_test: Crash
+closure5_test: Crash
+closure6_test: Crash
+closure7_test: Crash
+closure8_test: Crash
+closure_break1_test: Crash
+closure_break2_test: Crash
+closure_break_test: Crash
+closure_cycles_test: Crash
+closure_in_constructor_test: Crash
+closure_in_field_initializer_test: Crash
+closure_in_initializer2_test: Crash
+closure_in_initializer_test: Crash
+closure_internals_test: Crash
+closure_parameter_types_test: Crash
+closure_self_reference_test: Crash
+closure_shared_state_test: Crash
 function_type/function_type0_test: Crash
 function_type/function_type10_test: Crash
 function_type/function_type11_test: Crash
@@ -423,6 +475,7 @@
 function_type/function_type98_test: Crash
 function_type/function_type99_test: Crash
 function_type/function_type9_test: Crash
+regress_30339_test: Crash
 
 [ $compiler == dart2js && $dart2js_with_kernel && $minified ]
 aborting_switch_case_test: Crash
@@ -610,6 +663,55 @@
 cha_deopt1_test: CompileTimeError
 cha_deopt2_test: CompileTimeError
 cha_deopt3_test: CompileTimeError
+class_literal_test/01: Crash
+class_literal_test/02: Crash
+class_literal_test/03: Crash
+class_literal_test/04: Crash
+class_literal_test/05: Crash
+class_literal_test/06: Crash
+class_literal_test/07: Crash
+class_literal_test/08: Crash
+class_literal_test/09: Crash
+class_literal_test/10: Crash
+class_literal_test/11: Crash
+class_literal_test/12: Crash
+class_literal_test/13: Crash
+class_literal_test/14: Crash
+class_literal_test/15: Crash
+class_literal_test/16: Crash
+class_literal_test/17: Crash
+class_literal_test/18: Crash
+class_literal_test/19: Crash
+class_literal_test/20: Crash
+class_literal_test/21: Crash
+class_literal_test/22: Crash
+class_literal_test/23: Crash
+class_literal_test/24: Crash
+class_literal_test/25: Crash
+class_literal_test: Crash # Assertion failure: Cannot find value local(main_closure.call#x) in (local(main#)) for j:closure_call(main_closure.call).
+class_override_test/00: Crash
+class_syntax2_test: Crash
+class_test: Crash
+classes_static_method_clash_test: Crash
+closure2_test: Crash
+closure3_test: Crash
+closure4_test: Crash
+closure5_test: Crash
+closure6_test: Crash
+closure7_test: Crash
+closure8_test: Crash
+closure_break1_test: Crash
+closure_break2_test: Crash
+closure_break_test: Crash
+closure_cycles_test: Crash
+closure_in_constructor_test: Crash
+closure_in_field_initializer_test: Crash
+closure_in_initializer2_test: Crash
+closure_in_initializer_test: Crash
+closure_internals_test: Crash
+closure_parameter_types_test: Crash
+closure_self_reference_test: Crash
+closure_shared_state_test: Crash
 function_type/function_type0_test: Crash
 function_type/function_type10_test: Crash
 function_type/function_type11_test: Crash
@@ -710,6 +812,7 @@
 function_type/function_type98_test: Crash
 function_type/function_type99_test: Crash
 function_type/function_type9_test: Crash
+regress_30339_test: Crash
 
 [ $compiler == dart2js && ! $dart2js_with_kernel && $runtime != none ]
 async_star_cancel_while_paused_test: RuntimeError # Issue 22853
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index b4bd0e3..62ec0bf 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -46,3 +46,4 @@
 canonical_const_test: RuntimeError # Ints and doubles are unified.
 function_type/function_type50_test: RuntimeError # Issue 29920
 function_type/function_type58_test: RuntimeError # Issue 29920
+compile_time_constant10_test/none: RuntimeError 
\ No newline at end of file
diff --git a/tests/language_2/language_2_flutter.status b/tests/language_2/language_2_flutter.status
index bfc4d3c..b9c010d 100644
--- a/tests/language_2/language_2_flutter.status
+++ b/tests/language_2/language_2_flutter.status
@@ -17,6 +17,8 @@
 call_constructor_on_unresolvable_class_test/03: CompileTimeError
 call_constructor_on_unresolvable_class_test/02: CompileTimeError
 call_constructor_on_unresolvable_class_test/07: CompileTimeError
+class_keyword_test/02: CompileTimeError
+class_override_test/00: CompileTimeError
 
 # The VM doesn't enforce that potentially const expressions are actually
 # const expressions when the constructor is called with `const`.
diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status
index 4beb0ce..222160c 100644
--- a/tests/language_2/language_2_precompiled.status
+++ b/tests/language_2/language_2_precompiled.status
@@ -123,3 +123,6 @@
 [ $runtime == dart_precompiled ]
 async_star_cancel_while_paused_test: RuntimeError
 async_star_pause_test: Fail, OK
+
+[ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == flutter) ]
+class_keyword_test/02: MissingCompileTimeError # Issue 13627
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index 1dbd2e6..6d02496 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -95,3 +95,6 @@
 assertion_initializer_const_error2_test/cc02: MissingCompileTimeError
 assertion_initializer_const_error_test/01: MissingCompileTimeError
 assertion_initializer_const_function_error_test/01: MissingCompileTimeError
+
+[$runtime == vm && $compiler == none && $system == fuchsia]
+closure_cycles_test: Pass, Crash
diff --git a/tests/language_strong/class_keyword_test.dart b/tests/language_strong/class_keyword_test.dart
deleted file mode 100644
index fc296ed..0000000
--- a/tests/language_strong/class_keyword_test.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test that "class" cannot be used as identifier.
-
-class foo {}
-
-void main() {
-  int class = 10; //# 01: compile-time error
-  print("$class"); //# 02: compile-time error
-}
diff --git a/tests/language_strong/class_literal_test.dart b/tests/language_strong/class_literal_test.dart
deleted file mode 100644
index aa10945..0000000
--- a/tests/language_strong/class_literal_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-
-// Test class literal expressions.
-
-class Class {
-  static fisk() => 42;
-}
-
-foo(x) {}
-
-main() {
-  Expect.equals(42, Class.fisk());
-  Expect.equals(null, foo(Class.fisk()));
-
-  // Verify references to a class literal are allowed.
-  Class;
-  var x = Class;
-  foo(Class);
-  Expect.isFalse(Class == null);
-
-  // Verify that dereferencing a class literal is a runtime error.
-  Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); //# 01: static type warning
-  Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); //# 02: static type warning
-  Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); //# 03: static type warning
-  Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); //# 04: static type warning
-  Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); //# 05: static type warning
-  Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); //# 06: static type warning
-  Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); //# 07: static type warning
-  Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); //# 08: static type warning
-  Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); //# 09: static type warning
-  Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); //# 10: static type warning
-  Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); //# 11: static type warning
-  Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); //# 12: static type warning
-  Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); //# 13: static type warning
-  Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); //# 14: static type warning
-  Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); //# 15: static type warning
-  Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); //# 16: static type warning
-  Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); //# 17: static type warning
-  Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); //# 18: static type warning
-  Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); //# 19: static type warning
-  Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); //# 20: static type warning
-  Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); //# 21: static type warning
-  Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); //# 22: static type warning
-  Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); //# 23: static type warning
-  Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); //# 24: static type warning
-
-  // Verify that a class literal isn't a string literal.
-  Expect.notEquals(Class, "Class");
-
-  // Verify toString() works for class literals.
-  Expect.isTrue((Class).toString() is String);
-  var y = Class;
-  Expect.isTrue(y.toString() is String);
-
-  Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); //# 25: static type warning
-}
diff --git a/tests/language_strong/class_override_test.dart b/tests/language_strong/class_override_test.dart
deleted file mode 100644
index 011e64a..0000000
--- a/tests/language_strong/class_override_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012, 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.
-
-// It is a static warning if a method m1 overrides a method m2 and has a
-// different number of required parameters.
-
-class A {
-  foo() {}
-}
-
-class B extends A {
-  foo(a) {} // //# 00: static type warning
-}
-
-main() {
-  B instance = new B();
-  try {
-    instance.foo();
-  } on NoSuchMethodError catch (error) { // //# 00: continued
-  } finally {}
-  print("Success");
-}
diff --git a/tests/language_strong/class_syntax2_test.dart b/tests/language_strong/class_syntax2_test.dart
deleted file mode 100644
index e884c23..0000000
--- a/tests/language_strong/class_syntax2_test.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2013, 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.
-
-// Regression test for dart2js bug http://dartbug.com/11570.
-
-import 'package:expect/expect.dart';
-
-void main() {
-  var c = new Cool(true);
-  Expect.stringEquals('{}', '${c.thing}');
-
-  c = new Cool(false);
-  Expect.stringEquals('[]', '${c.thing}');
-
-  c = new Cool.alt(true);
-  Expect.stringEquals('{}', '${c.thing}');
-
-  c = new Cool.alt(false);
-  Expect.stringEquals('[]', '${c.thing}');
-}
-
-class Cool {
-  final thing;
-
-  Cool(bool option) : thing = option ? <String, String>{} : <String>[];
-  Cool.alt(bool option) : thing = !option ? <String>[] : <String, String>{};
-}
diff --git a/tests/language_strong/class_syntax_test.dart b/tests/language_strong/class_syntax_test.dart
deleted file mode 100644
index ea43138..0000000
--- a/tests/language_strong/class_syntax_test.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-main() {
-  new ClassSyntaxTest();
-}
-
-class ClassSyntaxTest {
-  /* //# 01: compile-time error
-}
-*/ //# 01: continued
diff --git a/tests/language_strong/class_test.dart b/tests/language_strong/class_test.dart
deleted file mode 100644
index 0436393..0000000
--- a/tests/language_strong/class_test.dart
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Tests basic classes and methods.
-class ClassTest {
-  ClassTest() {}
-
-  static testMain() {
-    var test = new ClassTest();
-    test.testSuperCalls();
-    test.testVirtualCalls();
-    test.testStaticCalls();
-    test.testInheritedField();
-    test.testMemberRefInClosure();
-    test.testFactory();
-    test.testNamedConstructors();
-    test.testDefaultImplementation();
-    test.testFunctionParameter((int a) {
-      return a;
-    });
-  }
-
-  testFunctionParameter(int func(int a)) {
-    Expect.equals(1, func(1));
-  }
-
-  testSuperCalls() {
-    var sub = new Sub();
-    Expect.equals(43, sub.methodX());
-    Expect.equals(84, sub.methodK());
-  }
-
-  testVirtualCalls() {
-    var sub = new Sub();
-    Expect.equals(41, sub.method2());
-    Expect.equals(41, sub.method3());
-  }
-
-  testStaticCalls() {
-    var sub = new Sub();
-    Expect.equals(-42, Sub.method4());
-    Expect.equals(-41, sub.method5());
-  }
-
-  testInheritedField() {
-    var sub = new Sub();
-    Expect.equals(42, sub.method6());
-  }
-
-  testMemberRefInClosure() {
-    var sub = new Sub();
-    Expect.equals(1, sub.closureRef());
-    Expect.equals(2, sub.closureRef());
-    // Make sure it is actually on the object, not the global 'this'.
-    sub = new Sub();
-    Expect.equals(1, sub.closureRef());
-    Expect.equals(2, sub.closureRef());
-  }
-
-  testFactory() {
-    var sup = new Sup.named();
-    Expect.equals(43, sup.methodX());
-    Expect.equals(84, sup.methodK());
-  }
-
-  testNamedConstructors() {
-    var sup = new Sup.fromInt(4);
-    Expect.equals(4, sup.methodX());
-    Expect.equals(0, sup.methodK());
-  }
-
-  testDefaultImplementation() {
-    var x = new Inter(4);
-    Expect.equals(4, x.methodX());
-    Expect.equals(8, x.methodK());
-
-    x = new Inter.fromInt(4);
-    Expect.equals(4, x.methodX());
-    Expect.equals(0, x.methodK());
-
-    x = new Inter.named();
-    Expect.equals(43, x.methodX());
-    Expect.equals(84, x.methodK());
-
-    x = new Inter.factory();
-    Expect.equals(43, x.methodX());
-    Expect.equals(84, x.methodK());
-  }
-}
-
-abstract class Inter {
-  factory Inter.named() = Sup.named;
-  factory Inter.fromInt(int x) = Sup.fromInt;
-  factory Inter(int x) = Sup;
-  factory Inter.factory() = Sup.factory;
-  int methodX();
-  int methodK();
-  int x_;
-}
-
-class Sup implements Inter {
-  int x_;
-  int k_;
-
-  factory Sup.named() {
-    return new Sub();
-  }
-
-  factory Sup.factory() {
-    return new Sub();
-  }
-
-  Sup.fromInt(int x) {
-    x_ = x;
-    k_ = 0;
-  }
-
-  int methodX() {
-    return x_;
-  }
-
-  int methodK() {
-    return k_;
-  }
-
-  Sup(int x) : this.x_ = x {
-    k_ = x * 2;
-  }
-
-  int method2() {
-    return x_ - 1;
-  }
-}
-
-class Sub extends Sup {
-  int y_;
-
-  // Override
-  int methodX() {
-    return super.methodX() + 1;
-  }
-
-  int method3() {
-    return method2();
-  }
-
-  static int method4() {
-    return -42;
-  }
-
-  int method5() {
-    return method4() + 1;
-  }
-
-  int method6() {
-    return x_ + y_;
-  }
-
-  int closureRef() {
-    var f = () {
-      y_ += 1;
-      return y_;
-    };
-    return f();
-  }
-
-  Sub() : super(42) {
-    y_ = 0;
-  }
-}
-
-main() {
-  ClassTest.testMain();
-}
diff --git a/tests/language_strong/classes_static_method_clash_test.dart b/tests/language_strong/classes_static_method_clash_test.dart
deleted file mode 100644
index 985a0c8..0000000
--- a/tests/language_strong/classes_static_method_clash_test.dart
+++ /dev/null
@@ -1,8167 +0,0 @@
-// Copyright (c) 2015, 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:expect/expect.dart";
-
-// This methods needs a stub method (because it is used in Function.apply, where
-// we can't see all possible uses).
-// The stub-method(s) must not clash with other global names (like classes).
-foo({a: 499}) => a;
-
-bar(f) {
-  return f();
-  return null;
-}
-
-int confuse(x) {
-  if (new DateTime.now().millisecondsSinceEpoch == 42) confuse(x + 1);
-  return x;
-}
-
-main() {
-  Expect.equals(42, Function.apply(foo, [], {#a: 42}));
-  Expect.equals(499, Function.apply(foo, [], null));
-  print(objects[confuse(0)]);
-}
-
-/*
-The following code has been generated with the following script:
-
-get chars sync* {
-  for (int i = "a".codeUnitAt(0); i <= "z".codeUnitAt(0); i++) {
-    yield new String.fromCharCodes([i]);
-  }
-  for (int i = "A".codeUnitAt(0); i <= "Z".codeUnitAt(0); i++) {
-    yield new String.fromCharCodes([i]);
-  }
-}
-
-main() {
-  StringBuffer classes = new StringBuffer();
-  print("var objects = [");
-  for (String c1 in chars) {
-    for (String c2 in chars) {
-      print("  new C$c1$c2(),");
-      classes.writeln("class C$c1$c2{}");
-    }
-  }
-  print("];");
-  print(classes.toString());
-}
-*/
-
-var objects = [
-  new Caa(),
-  new Cab(),
-  new Cac(),
-  new Cad(),
-  new Cae(),
-  new Caf(),
-  new Cag(),
-  new Cah(),
-  new Cai(),
-  new Caj(),
-  new Cak(),
-  new Cal(),
-  new Cam(),
-  new Can(),
-  new Cao(),
-  new Cap(),
-  new Caq(),
-  new Car(),
-  new Cas(),
-  new Cat(),
-  new Cau(),
-  new Cav(),
-  new Caw(),
-  new Cax(),
-  new Cay(),
-  new Caz(),
-  new CaA(),
-  new CaB(),
-  new CaC(),
-  new CaD(),
-  new CaE(),
-  new CaF(),
-  new CaG(),
-  new CaH(),
-  new CaI(),
-  new CaJ(),
-  new CaK(),
-  new CaL(),
-  new CaM(),
-  new CaN(),
-  new CaO(),
-  new CaP(),
-  new CaQ(),
-  new CaR(),
-  new CaS(),
-  new CaT(),
-  new CaU(),
-  new CaV(),
-  new CaW(),
-  new CaX(),
-  new CaY(),
-  new CaZ(),
-  new Cba(),
-  new Cbb(),
-  new Cbc(),
-  new Cbd(),
-  new Cbe(),
-  new Cbf(),
-  new Cbg(),
-  new Cbh(),
-  new Cbi(),
-  new Cbj(),
-  new Cbk(),
-  new Cbl(),
-  new Cbm(),
-  new Cbn(),
-  new Cbo(),
-  new Cbp(),
-  new Cbq(),
-  new Cbr(),
-  new Cbs(),
-  new Cbt(),
-  new Cbu(),
-  new Cbv(),
-  new Cbw(),
-  new Cbx(),
-  new Cby(),
-  new Cbz(),
-  new CbA(),
-  new CbB(),
-  new CbC(),
-  new CbD(),
-  new CbE(),
-  new CbF(),
-  new CbG(),
-  new CbH(),
-  new CbI(),
-  new CbJ(),
-  new CbK(),
-  new CbL(),
-  new CbM(),
-  new CbN(),
-  new CbO(),
-  new CbP(),
-  new CbQ(),
-  new CbR(),
-  new CbS(),
-  new CbT(),
-  new CbU(),
-  new CbV(),
-  new CbW(),
-  new CbX(),
-  new CbY(),
-  new CbZ(),
-  new Cca(),
-  new Ccb(),
-  new Ccc(),
-  new Ccd(),
-  new Cce(),
-  new Ccf(),
-  new Ccg(),
-  new Cch(),
-  new Cci(),
-  new Ccj(),
-  new Cck(),
-  new Ccl(),
-  new Ccm(),
-  new Ccn(),
-  new Cco(),
-  new Ccp(),
-  new Ccq(),
-  new Ccr(),
-  new Ccs(),
-  new Cct(),
-  new Ccu(),
-  new Ccv(),
-  new Ccw(),
-  new Ccx(),
-  new Ccy(),
-  new Ccz(),
-  new CcA(),
-  new CcB(),
-  new CcC(),
-  new CcD(),
-  new CcE(),
-  new CcF(),
-  new CcG(),
-  new CcH(),
-  new CcI(),
-  new CcJ(),
-  new CcK(),
-  new CcL(),
-  new CcM(),
-  new CcN(),
-  new CcO(),
-  new CcP(),
-  new CcQ(),
-  new CcR(),
-  new CcS(),
-  new CcT(),
-  new CcU(),
-  new CcV(),
-  new CcW(),
-  new CcX(),
-  new CcY(),
-  new CcZ(),
-  new Cda(),
-  new Cdb(),
-  new Cdc(),
-  new Cdd(),
-  new Cde(),
-  new Cdf(),
-  new Cdg(),
-  new Cdh(),
-  new Cdi(),
-  new Cdj(),
-  new Cdk(),
-  new Cdl(),
-  new Cdm(),
-  new Cdn(),
-  new Cdo(),
-  new Cdp(),
-  new Cdq(),
-  new Cdr(),
-  new Cds(),
-  new Cdt(),
-  new Cdu(),
-  new Cdv(),
-  new Cdw(),
-  new Cdx(),
-  new Cdy(),
-  new Cdz(),
-  new CdA(),
-  new CdB(),
-  new CdC(),
-  new CdD(),
-  new CdE(),
-  new CdF(),
-  new CdG(),
-  new CdH(),
-  new CdI(),
-  new CdJ(),
-  new CdK(),
-  new CdL(),
-  new CdM(),
-  new CdN(),
-  new CdO(),
-  new CdP(),
-  new CdQ(),
-  new CdR(),
-  new CdS(),
-  new CdT(),
-  new CdU(),
-  new CdV(),
-  new CdW(),
-  new CdX(),
-  new CdY(),
-  new CdZ(),
-  new Cea(),
-  new Ceb(),
-  new Cec(),
-  new Ced(),
-  new Cee(),
-  new Cef(),
-  new Ceg(),
-  new Ceh(),
-  new Cei(),
-  new Cej(),
-  new Cek(),
-  new Cel(),
-  new Cem(),
-  new Cen(),
-  new Ceo(),
-  new Cep(),
-  new Ceq(),
-  new Cer(),
-  new Ces(),
-  new Cet(),
-  new Ceu(),
-  new Cev(),
-  new Cew(),
-  new Cex(),
-  new Cey(),
-  new Cez(),
-  new CeA(),
-  new CeB(),
-  new CeC(),
-  new CeD(),
-  new CeE(),
-  new CeF(),
-  new CeG(),
-  new CeH(),
-  new CeI(),
-  new CeJ(),
-  new CeK(),
-  new CeL(),
-  new CeM(),
-  new CeN(),
-  new CeO(),
-  new CeP(),
-  new CeQ(),
-  new CeR(),
-  new CeS(),
-  new CeT(),
-  new CeU(),
-  new CeV(),
-  new CeW(),
-  new CeX(),
-  new CeY(),
-  new CeZ(),
-  new Cfa(),
-  new Cfb(),
-  new Cfc(),
-  new Cfd(),
-  new Cfe(),
-  new Cff(),
-  new Cfg(),
-  new Cfh(),
-  new Cfi(),
-  new Cfj(),
-  new Cfk(),
-  new Cfl(),
-  new Cfm(),
-  new Cfn(),
-  new Cfo(),
-  new Cfp(),
-  new Cfq(),
-  new Cfr(),
-  new Cfs(),
-  new Cft(),
-  new Cfu(),
-  new Cfv(),
-  new Cfw(),
-  new Cfx(),
-  new Cfy(),
-  new Cfz(),
-  new CfA(),
-  new CfB(),
-  new CfC(),
-  new CfD(),
-  new CfE(),
-  new CfF(),
-  new CfG(),
-  new CfH(),
-  new CfI(),
-  new CfJ(),
-  new CfK(),
-  new CfL(),
-  new CfM(),
-  new CfN(),
-  new CfO(),
-  new CfP(),
-  new CfQ(),
-  new CfR(),
-  new CfS(),
-  new CfT(),
-  new CfU(),
-  new CfV(),
-  new CfW(),
-  new CfX(),
-  new CfY(),
-  new CfZ(),
-  new Cga(),
-  new Cgb(),
-  new Cgc(),
-  new Cgd(),
-  new Cge(),
-  new Cgf(),
-  new Cgg(),
-  new Cgh(),
-  new Cgi(),
-  new Cgj(),
-  new Cgk(),
-  new Cgl(),
-  new Cgm(),
-  new Cgn(),
-  new Cgo(),
-  new Cgp(),
-  new Cgq(),
-  new Cgr(),
-  new Cgs(),
-  new Cgt(),
-  new Cgu(),
-  new Cgv(),
-  new Cgw(),
-  new Cgx(),
-  new Cgy(),
-  new Cgz(),
-  new CgA(),
-  new CgB(),
-  new CgC(),
-  new CgD(),
-  new CgE(),
-  new CgF(),
-  new CgG(),
-  new CgH(),
-  new CgI(),
-  new CgJ(),
-  new CgK(),
-  new CgL(),
-  new CgM(),
-  new CgN(),
-  new CgO(),
-  new CgP(),
-  new CgQ(),
-  new CgR(),
-  new CgS(),
-  new CgT(),
-  new CgU(),
-  new CgV(),
-  new CgW(),
-  new CgX(),
-  new CgY(),
-  new CgZ(),
-  new Cha(),
-  new Chb(),
-  new Chc(),
-  new Chd(),
-  new Che(),
-  new Chf(),
-  new Chg(),
-  new Chh(),
-  new Chi(),
-  new Chj(),
-  new Chk(),
-  new Chl(),
-  new Chm(),
-  new Chn(),
-  new Cho(),
-  new Chp(),
-  new Chq(),
-  new Chr(),
-  new Chs(),
-  new Cht(),
-  new Chu(),
-  new Chv(),
-  new Chw(),
-  new Chx(),
-  new Chy(),
-  new Chz(),
-  new ChA(),
-  new ChB(),
-  new ChC(),
-  new ChD(),
-  new ChE(),
-  new ChF(),
-  new ChG(),
-  new ChH(),
-  new ChI(),
-  new ChJ(),
-  new ChK(),
-  new ChL(),
-  new ChM(),
-  new ChN(),
-  new ChO(),
-  new ChP(),
-  new ChQ(),
-  new ChR(),
-  new ChS(),
-  new ChT(),
-  new ChU(),
-  new ChV(),
-  new ChW(),
-  new ChX(),
-  new ChY(),
-  new ChZ(),
-  new Cia(),
-  new Cib(),
-  new Cic(),
-  new Cid(),
-  new Cie(),
-  new Cif(),
-  new Cig(),
-  new Cih(),
-  new Cii(),
-  new Cij(),
-  new Cik(),
-  new Cil(),
-  new Cim(),
-  new Cin(),
-  new Cio(),
-  new Cip(),
-  new Ciq(),
-  new Cir(),
-  new Cis(),
-  new Cit(),
-  new Ciu(),
-  new Civ(),
-  new Ciw(),
-  new Cix(),
-  new Ciy(),
-  new Ciz(),
-  new CiA(),
-  new CiB(),
-  new CiC(),
-  new CiD(),
-  new CiE(),
-  new CiF(),
-  new CiG(),
-  new CiH(),
-  new CiI(),
-  new CiJ(),
-  new CiK(),
-  new CiL(),
-  new CiM(),
-  new CiN(),
-  new CiO(),
-  new CiP(),
-  new CiQ(),
-  new CiR(),
-  new CiS(),
-  new CiT(),
-  new CiU(),
-  new CiV(),
-  new CiW(),
-  new CiX(),
-  new CiY(),
-  new CiZ(),
-  new Cja(),
-  new Cjb(),
-  new Cjc(),
-  new Cjd(),
-  new Cje(),
-  new Cjf(),
-  new Cjg(),
-  new Cjh(),
-  new Cji(),
-  new Cjj(),
-  new Cjk(),
-  new Cjl(),
-  new Cjm(),
-  new Cjn(),
-  new Cjo(),
-  new Cjp(),
-  new Cjq(),
-  new Cjr(),
-  new Cjs(),
-  new Cjt(),
-  new Cju(),
-  new Cjv(),
-  new Cjw(),
-  new Cjx(),
-  new Cjy(),
-  new Cjz(),
-  new CjA(),
-  new CjB(),
-  new CjC(),
-  new CjD(),
-  new CjE(),
-  new CjF(),
-  new CjG(),
-  new CjH(),
-  new CjI(),
-  new CjJ(),
-  new CjK(),
-  new CjL(),
-  new CjM(),
-  new CjN(),
-  new CjO(),
-  new CjP(),
-  new CjQ(),
-  new CjR(),
-  new CjS(),
-  new CjT(),
-  new CjU(),
-  new CjV(),
-  new CjW(),
-  new CjX(),
-  new CjY(),
-  new CjZ(),
-  new Cka(),
-  new Ckb(),
-  new Ckc(),
-  new Ckd(),
-  new Cke(),
-  new Ckf(),
-  new Ckg(),
-  new Ckh(),
-  new Cki(),
-  new Ckj(),
-  new Ckk(),
-  new Ckl(),
-  new Ckm(),
-  new Ckn(),
-  new Cko(),
-  new Ckp(),
-  new Ckq(),
-  new Ckr(),
-  new Cks(),
-  new Ckt(),
-  new Cku(),
-  new Ckv(),
-  new Ckw(),
-  new Ckx(),
-  new Cky(),
-  new Ckz(),
-  new CkA(),
-  new CkB(),
-  new CkC(),
-  new CkD(),
-  new CkE(),
-  new CkF(),
-  new CkG(),
-  new CkH(),
-  new CkI(),
-  new CkJ(),
-  new CkK(),
-  new CkL(),
-  new CkM(),
-  new CkN(),
-  new CkO(),
-  new CkP(),
-  new CkQ(),
-  new CkR(),
-  new CkS(),
-  new CkT(),
-  new CkU(),
-  new CkV(),
-  new CkW(),
-  new CkX(),
-  new CkY(),
-  new CkZ(),
-  new Cla(),
-  new Clb(),
-  new Clc(),
-  new Cld(),
-  new Cle(),
-  new Clf(),
-  new Clg(),
-  new Clh(),
-  new Cli(),
-  new Clj(),
-  new Clk(),
-  new Cll(),
-  new Clm(),
-  new Cln(),
-  new Clo(),
-  new Clp(),
-  new Clq(),
-  new Clr(),
-  new Cls(),
-  new Clt(),
-  new Clu(),
-  new Clv(),
-  new Clw(),
-  new Clx(),
-  new Cly(),
-  new Clz(),
-  new ClA(),
-  new ClB(),
-  new ClC(),
-  new ClD(),
-  new ClE(),
-  new ClF(),
-  new ClG(),
-  new ClH(),
-  new ClI(),
-  new ClJ(),
-  new ClK(),
-  new ClL(),
-  new ClM(),
-  new ClN(),
-  new ClO(),
-  new ClP(),
-  new ClQ(),
-  new ClR(),
-  new ClS(),
-  new ClT(),
-  new ClU(),
-  new ClV(),
-  new ClW(),
-  new ClX(),
-  new ClY(),
-  new ClZ(),
-  new Cma(),
-  new Cmb(),
-  new Cmc(),
-  new Cmd(),
-  new Cme(),
-  new Cmf(),
-  new Cmg(),
-  new Cmh(),
-  new Cmi(),
-  new Cmj(),
-  new Cmk(),
-  new Cml(),
-  new Cmm(),
-  new Cmn(),
-  new Cmo(),
-  new Cmp(),
-  new Cmq(),
-  new Cmr(),
-  new Cms(),
-  new Cmt(),
-  new Cmu(),
-  new Cmv(),
-  new Cmw(),
-  new Cmx(),
-  new Cmy(),
-  new Cmz(),
-  new CmA(),
-  new CmB(),
-  new CmC(),
-  new CmD(),
-  new CmE(),
-  new CmF(),
-  new CmG(),
-  new CmH(),
-  new CmI(),
-  new CmJ(),
-  new CmK(),
-  new CmL(),
-  new CmM(),
-  new CmN(),
-  new CmO(),
-  new CmP(),
-  new CmQ(),
-  new CmR(),
-  new CmS(),
-  new CmT(),
-  new CmU(),
-  new CmV(),
-  new CmW(),
-  new CmX(),
-  new CmY(),
-  new CmZ(),
-  new Cna(),
-  new Cnb(),
-  new Cnc(),
-  new Cnd(),
-  new Cne(),
-  new Cnf(),
-  new Cng(),
-  new Cnh(),
-  new Cni(),
-  new Cnj(),
-  new Cnk(),
-  new Cnl(),
-  new Cnm(),
-  new Cnn(),
-  new Cno(),
-  new Cnp(),
-  new Cnq(),
-  new Cnr(),
-  new Cns(),
-  new Cnt(),
-  new Cnu(),
-  new Cnv(),
-  new Cnw(),
-  new Cnx(),
-  new Cny(),
-  new Cnz(),
-  new CnA(),
-  new CnB(),
-  new CnC(),
-  new CnD(),
-  new CnE(),
-  new CnF(),
-  new CnG(),
-  new CnH(),
-  new CnI(),
-  new CnJ(),
-  new CnK(),
-  new CnL(),
-  new CnM(),
-  new CnN(),
-  new CnO(),
-  new CnP(),
-  new CnQ(),
-  new CnR(),
-  new CnS(),
-  new CnT(),
-  new CnU(),
-  new CnV(),
-  new CnW(),
-  new CnX(),
-  new CnY(),
-  new CnZ(),
-  new Coa(),
-  new Cob(),
-  new Coc(),
-  new Cod(),
-  new Coe(),
-  new Cof(),
-  new Cog(),
-  new Coh(),
-  new Coi(),
-  new Coj(),
-  new Cok(),
-  new Col(),
-  new Com(),
-  new Con(),
-  new Coo(),
-  new Cop(),
-  new Coq(),
-  new Cor(),
-  new Cos(),
-  new Cot(),
-  new Cou(),
-  new Cov(),
-  new Cow(),
-  new Cox(),
-  new Coy(),
-  new Coz(),
-  new CoA(),
-  new CoB(),
-  new CoC(),
-  new CoD(),
-  new CoE(),
-  new CoF(),
-  new CoG(),
-  new CoH(),
-  new CoI(),
-  new CoJ(),
-  new CoK(),
-  new CoL(),
-  new CoM(),
-  new CoN(),
-  new CoO(),
-  new CoP(),
-  new CoQ(),
-  new CoR(),
-  new CoS(),
-  new CoT(),
-  new CoU(),
-  new CoV(),
-  new CoW(),
-  new CoX(),
-  new CoY(),
-  new CoZ(),
-  new Cpa(),
-  new Cpb(),
-  new Cpc(),
-  new Cpd(),
-  new Cpe(),
-  new Cpf(),
-  new Cpg(),
-  new Cph(),
-  new Cpi(),
-  new Cpj(),
-  new Cpk(),
-  new Cpl(),
-  new Cpm(),
-  new Cpn(),
-  new Cpo(),
-  new Cpp(),
-  new Cpq(),
-  new Cpr(),
-  new Cps(),
-  new Cpt(),
-  new Cpu(),
-  new Cpv(),
-  new Cpw(),
-  new Cpx(),
-  new Cpy(),
-  new Cpz(),
-  new CpA(),
-  new CpB(),
-  new CpC(),
-  new CpD(),
-  new CpE(),
-  new CpF(),
-  new CpG(),
-  new CpH(),
-  new CpI(),
-  new CpJ(),
-  new CpK(),
-  new CpL(),
-  new CpM(),
-  new CpN(),
-  new CpO(),
-  new CpP(),
-  new CpQ(),
-  new CpR(),
-  new CpS(),
-  new CpT(),
-  new CpU(),
-  new CpV(),
-  new CpW(),
-  new CpX(),
-  new CpY(),
-  new CpZ(),
-  new Cqa(),
-  new Cqb(),
-  new Cqc(),
-  new Cqd(),
-  new Cqe(),
-  new Cqf(),
-  new Cqg(),
-  new Cqh(),
-  new Cqi(),
-  new Cqj(),
-  new Cqk(),
-  new Cql(),
-  new Cqm(),
-  new Cqn(),
-  new Cqo(),
-  new Cqp(),
-  new Cqq(),
-  new Cqr(),
-  new Cqs(),
-  new Cqt(),
-  new Cqu(),
-  new Cqv(),
-  new Cqw(),
-  new Cqx(),
-  new Cqy(),
-  new Cqz(),
-  new CqA(),
-  new CqB(),
-  new CqC(),
-  new CqD(),
-  new CqE(),
-  new CqF(),
-  new CqG(),
-  new CqH(),
-  new CqI(),
-  new CqJ(),
-  new CqK(),
-  new CqL(),
-  new CqM(),
-  new CqN(),
-  new CqO(),
-  new CqP(),
-  new CqQ(),
-  new CqR(),
-  new CqS(),
-  new CqT(),
-  new CqU(),
-  new CqV(),
-  new CqW(),
-  new CqX(),
-  new CqY(),
-  new CqZ(),
-  new Cra(),
-  new Crb(),
-  new Crc(),
-  new Crd(),
-  new Cre(),
-  new Crf(),
-  new Crg(),
-  new Crh(),
-  new Cri(),
-  new Crj(),
-  new Crk(),
-  new Crl(),
-  new Crm(),
-  new Crn(),
-  new Cro(),
-  new Crp(),
-  new Crq(),
-  new Crr(),
-  new Crs(),
-  new Crt(),
-  new Cru(),
-  new Crv(),
-  new Crw(),
-  new Crx(),
-  new Cry(),
-  new Crz(),
-  new CrA(),
-  new CrB(),
-  new CrC(),
-  new CrD(),
-  new CrE(),
-  new CrF(),
-  new CrG(),
-  new CrH(),
-  new CrI(),
-  new CrJ(),
-  new CrK(),
-  new CrL(),
-  new CrM(),
-  new CrN(),
-  new CrO(),
-  new CrP(),
-  new CrQ(),
-  new CrR(),
-  new CrS(),
-  new CrT(),
-  new CrU(),
-  new CrV(),
-  new CrW(),
-  new CrX(),
-  new CrY(),
-  new CrZ(),
-  new Csa(),
-  new Csb(),
-  new Csc(),
-  new Csd(),
-  new Cse(),
-  new Csf(),
-  new Csg(),
-  new Csh(),
-  new Csi(),
-  new Csj(),
-  new Csk(),
-  new Csl(),
-  new Csm(),
-  new Csn(),
-  new Cso(),
-  new Csp(),
-  new Csq(),
-  new Csr(),
-  new Css(),
-  new Cst(),
-  new Csu(),
-  new Csv(),
-  new Csw(),
-  new Csx(),
-  new Csy(),
-  new Csz(),
-  new CsA(),
-  new CsB(),
-  new CsC(),
-  new CsD(),
-  new CsE(),
-  new CsF(),
-  new CsG(),
-  new CsH(),
-  new CsI(),
-  new CsJ(),
-  new CsK(),
-  new CsL(),
-  new CsM(),
-  new CsN(),
-  new CsO(),
-  new CsP(),
-  new CsQ(),
-  new CsR(),
-  new CsS(),
-  new CsT(),
-  new CsU(),
-  new CsV(),
-  new CsW(),
-  new CsX(),
-  new CsY(),
-  new CsZ(),
-  new Cta(),
-  new Ctb(),
-  new Ctc(),
-  new Ctd(),
-  new Cte(),
-  new Ctf(),
-  new Ctg(),
-  new Cth(),
-  new Cti(),
-  new Ctj(),
-  new Ctk(),
-  new Ctl(),
-  new Ctm(),
-  new Ctn(),
-  new Cto(),
-  new Ctp(),
-  new Ctq(),
-  new Ctr(),
-  new Cts(),
-  new Ctt(),
-  new Ctu(),
-  new Ctv(),
-  new Ctw(),
-  new Ctx(),
-  new Cty(),
-  new Ctz(),
-  new CtA(),
-  new CtB(),
-  new CtC(),
-  new CtD(),
-  new CtE(),
-  new CtF(),
-  new CtG(),
-  new CtH(),
-  new CtI(),
-  new CtJ(),
-  new CtK(),
-  new CtL(),
-  new CtM(),
-  new CtN(),
-  new CtO(),
-  new CtP(),
-  new CtQ(),
-  new CtR(),
-  new CtS(),
-  new CtT(),
-  new CtU(),
-  new CtV(),
-  new CtW(),
-  new CtX(),
-  new CtY(),
-  new CtZ(),
-  new Cua(),
-  new Cub(),
-  new Cuc(),
-  new Cud(),
-  new Cue(),
-  new Cuf(),
-  new Cug(),
-  new Cuh(),
-  new Cui(),
-  new Cuj(),
-  new Cuk(),
-  new Cul(),
-  new Cum(),
-  new Cun(),
-  new Cuo(),
-  new Cup(),
-  new Cuq(),
-  new Cur(),
-  new Cus(),
-  new Cut(),
-  new Cuu(),
-  new Cuv(),
-  new Cuw(),
-  new Cux(),
-  new Cuy(),
-  new Cuz(),
-  new CuA(),
-  new CuB(),
-  new CuC(),
-  new CuD(),
-  new CuE(),
-  new CuF(),
-  new CuG(),
-  new CuH(),
-  new CuI(),
-  new CuJ(),
-  new CuK(),
-  new CuL(),
-  new CuM(),
-  new CuN(),
-  new CuO(),
-  new CuP(),
-  new CuQ(),
-  new CuR(),
-  new CuS(),
-  new CuT(),
-  new CuU(),
-  new CuV(),
-  new CuW(),
-  new CuX(),
-  new CuY(),
-  new CuZ(),
-  new Cva(),
-  new Cvb(),
-  new Cvc(),
-  new Cvd(),
-  new Cve(),
-  new Cvf(),
-  new Cvg(),
-  new Cvh(),
-  new Cvi(),
-  new Cvj(),
-  new Cvk(),
-  new Cvl(),
-  new Cvm(),
-  new Cvn(),
-  new Cvo(),
-  new Cvp(),
-  new Cvq(),
-  new Cvr(),
-  new Cvs(),
-  new Cvt(),
-  new Cvu(),
-  new Cvv(),
-  new Cvw(),
-  new Cvx(),
-  new Cvy(),
-  new Cvz(),
-  new CvA(),
-  new CvB(),
-  new CvC(),
-  new CvD(),
-  new CvE(),
-  new CvF(),
-  new CvG(),
-  new CvH(),
-  new CvI(),
-  new CvJ(),
-  new CvK(),
-  new CvL(),
-  new CvM(),
-  new CvN(),
-  new CvO(),
-  new CvP(),
-  new CvQ(),
-  new CvR(),
-  new CvS(),
-  new CvT(),
-  new CvU(),
-  new CvV(),
-  new CvW(),
-  new CvX(),
-  new CvY(),
-  new CvZ(),
-  new Cwa(),
-  new Cwb(),
-  new Cwc(),
-  new Cwd(),
-  new Cwe(),
-  new Cwf(),
-  new Cwg(),
-  new Cwh(),
-  new Cwi(),
-  new Cwj(),
-  new Cwk(),
-  new Cwl(),
-  new Cwm(),
-  new Cwn(),
-  new Cwo(),
-  new Cwp(),
-  new Cwq(),
-  new Cwr(),
-  new Cws(),
-  new Cwt(),
-  new Cwu(),
-  new Cwv(),
-  new Cww(),
-  new Cwx(),
-  new Cwy(),
-  new Cwz(),
-  new CwA(),
-  new CwB(),
-  new CwC(),
-  new CwD(),
-  new CwE(),
-  new CwF(),
-  new CwG(),
-  new CwH(),
-  new CwI(),
-  new CwJ(),
-  new CwK(),
-  new CwL(),
-  new CwM(),
-  new CwN(),
-  new CwO(),
-  new CwP(),
-  new CwQ(),
-  new CwR(),
-  new CwS(),
-  new CwT(),
-  new CwU(),
-  new CwV(),
-  new CwW(),
-  new CwX(),
-  new CwY(),
-  new CwZ(),
-  new Cxa(),
-  new Cxb(),
-  new Cxc(),
-  new Cxd(),
-  new Cxe(),
-  new Cxf(),
-  new Cxg(),
-  new Cxh(),
-  new Cxi(),
-  new Cxj(),
-  new Cxk(),
-  new Cxl(),
-  new Cxm(),
-  new Cxn(),
-  new Cxo(),
-  new Cxp(),
-  new Cxq(),
-  new Cxr(),
-  new Cxs(),
-  new Cxt(),
-  new Cxu(),
-  new Cxv(),
-  new Cxw(),
-  new Cxx(),
-  new Cxy(),
-  new Cxz(),
-  new CxA(),
-  new CxB(),
-  new CxC(),
-  new CxD(),
-  new CxE(),
-  new CxF(),
-  new CxG(),
-  new CxH(),
-  new CxI(),
-  new CxJ(),
-  new CxK(),
-  new CxL(),
-  new CxM(),
-  new CxN(),
-  new CxO(),
-  new CxP(),
-  new CxQ(),
-  new CxR(),
-  new CxS(),
-  new CxT(),
-  new CxU(),
-  new CxV(),
-  new CxW(),
-  new CxX(),
-  new CxY(),
-  new CxZ(),
-  new Cya(),
-  new Cyb(),
-  new Cyc(),
-  new Cyd(),
-  new Cye(),
-  new Cyf(),
-  new Cyg(),
-  new Cyh(),
-  new Cyi(),
-  new Cyj(),
-  new Cyk(),
-  new Cyl(),
-  new Cym(),
-  new Cyn(),
-  new Cyo(),
-  new Cyp(),
-  new Cyq(),
-  new Cyr(),
-  new Cys(),
-  new Cyt(),
-  new Cyu(),
-  new Cyv(),
-  new Cyw(),
-  new Cyx(),
-  new Cyy(),
-  new Cyz(),
-  new CyA(),
-  new CyB(),
-  new CyC(),
-  new CyD(),
-  new CyE(),
-  new CyF(),
-  new CyG(),
-  new CyH(),
-  new CyI(),
-  new CyJ(),
-  new CyK(),
-  new CyL(),
-  new CyM(),
-  new CyN(),
-  new CyO(),
-  new CyP(),
-  new CyQ(),
-  new CyR(),
-  new CyS(),
-  new CyT(),
-  new CyU(),
-  new CyV(),
-  new CyW(),
-  new CyX(),
-  new CyY(),
-  new CyZ(),
-  new Cza(),
-  new Czb(),
-  new Czc(),
-  new Czd(),
-  new Cze(),
-  new Czf(),
-  new Czg(),
-  new Czh(),
-  new Czi(),
-  new Czj(),
-  new Czk(),
-  new Czl(),
-  new Czm(),
-  new Czn(),
-  new Czo(),
-  new Czp(),
-  new Czq(),
-  new Czr(),
-  new Czs(),
-  new Czt(),
-  new Czu(),
-  new Czv(),
-  new Czw(),
-  new Czx(),
-  new Czy(),
-  new Czz(),
-  new CzA(),
-  new CzB(),
-  new CzC(),
-  new CzD(),
-  new CzE(),
-  new CzF(),
-  new CzG(),
-  new CzH(),
-  new CzI(),
-  new CzJ(),
-  new CzK(),
-  new CzL(),
-  new CzM(),
-  new CzN(),
-  new CzO(),
-  new CzP(),
-  new CzQ(),
-  new CzR(),
-  new CzS(),
-  new CzT(),
-  new CzU(),
-  new CzV(),
-  new CzW(),
-  new CzX(),
-  new CzY(),
-  new CzZ(),
-  new CAa(),
-  new CAb(),
-  new CAc(),
-  new CAd(),
-  new CAe(),
-  new CAf(),
-  new CAg(),
-  new CAh(),
-  new CAi(),
-  new CAj(),
-  new CAk(),
-  new CAl(),
-  new CAm(),
-  new CAn(),
-  new CAo(),
-  new CAp(),
-  new CAq(),
-  new CAr(),
-  new CAs(),
-  new CAt(),
-  new CAu(),
-  new CAv(),
-  new CAw(),
-  new CAx(),
-  new CAy(),
-  new CAz(),
-  new CAA(),
-  new CAB(),
-  new CAC(),
-  new CAD(),
-  new CAE(),
-  new CAF(),
-  new CAG(),
-  new CAH(),
-  new CAI(),
-  new CAJ(),
-  new CAK(),
-  new CAL(),
-  new CAM(),
-  new CAN(),
-  new CAO(),
-  new CAP(),
-  new CAQ(),
-  new CAR(),
-  new CAS(),
-  new CAT(),
-  new CAU(),
-  new CAV(),
-  new CAW(),
-  new CAX(),
-  new CAY(),
-  new CAZ(),
-  new CBa(),
-  new CBb(),
-  new CBc(),
-  new CBd(),
-  new CBe(),
-  new CBf(),
-  new CBg(),
-  new CBh(),
-  new CBi(),
-  new CBj(),
-  new CBk(),
-  new CBl(),
-  new CBm(),
-  new CBn(),
-  new CBo(),
-  new CBp(),
-  new CBq(),
-  new CBr(),
-  new CBs(),
-  new CBt(),
-  new CBu(),
-  new CBv(),
-  new CBw(),
-  new CBx(),
-  new CBy(),
-  new CBz(),
-  new CBA(),
-  new CBB(),
-  new CBC(),
-  new CBD(),
-  new CBE(),
-  new CBF(),
-  new CBG(),
-  new CBH(),
-  new CBI(),
-  new CBJ(),
-  new CBK(),
-  new CBL(),
-  new CBM(),
-  new CBN(),
-  new CBO(),
-  new CBP(),
-  new CBQ(),
-  new CBR(),
-  new CBS(),
-  new CBT(),
-  new CBU(),
-  new CBV(),
-  new CBW(),
-  new CBX(),
-  new CBY(),
-  new CBZ(),
-  new CCa(),
-  new CCb(),
-  new CCc(),
-  new CCd(),
-  new CCe(),
-  new CCf(),
-  new CCg(),
-  new CCh(),
-  new CCi(),
-  new CCj(),
-  new CCk(),
-  new CCl(),
-  new CCm(),
-  new CCn(),
-  new CCo(),
-  new CCp(),
-  new CCq(),
-  new CCr(),
-  new CCs(),
-  new CCt(),
-  new CCu(),
-  new CCv(),
-  new CCw(),
-  new CCx(),
-  new CCy(),
-  new CCz(),
-  new CCA(),
-  new CCB(),
-  new CCC(),
-  new CCD(),
-  new CCE(),
-  new CCF(),
-  new CCG(),
-  new CCH(),
-  new CCI(),
-  new CCJ(),
-  new CCK(),
-  new CCL(),
-  new CCM(),
-  new CCN(),
-  new CCO(),
-  new CCP(),
-  new CCQ(),
-  new CCR(),
-  new CCS(),
-  new CCT(),
-  new CCU(),
-  new CCV(),
-  new CCW(),
-  new CCX(),
-  new CCY(),
-  new CCZ(),
-  new CDa(),
-  new CDb(),
-  new CDc(),
-  new CDd(),
-  new CDe(),
-  new CDf(),
-  new CDg(),
-  new CDh(),
-  new CDi(),
-  new CDj(),
-  new CDk(),
-  new CDl(),
-  new CDm(),
-  new CDn(),
-  new CDo(),
-  new CDp(),
-  new CDq(),
-  new CDr(),
-  new CDs(),
-  new CDt(),
-  new CDu(),
-  new CDv(),
-  new CDw(),
-  new CDx(),
-  new CDy(),
-  new CDz(),
-  new CDA(),
-  new CDB(),
-  new CDC(),
-  new CDD(),
-  new CDE(),
-  new CDF(),
-  new CDG(),
-  new CDH(),
-  new CDI(),
-  new CDJ(),
-  new CDK(),
-  new CDL(),
-  new CDM(),
-  new CDN(),
-  new CDO(),
-  new CDP(),
-  new CDQ(),
-  new CDR(),
-  new CDS(),
-  new CDT(),
-  new CDU(),
-  new CDV(),
-  new CDW(),
-  new CDX(),
-  new CDY(),
-  new CDZ(),
-  new CEa(),
-  new CEb(),
-  new CEc(),
-  new CEd(),
-  new CEe(),
-  new CEf(),
-  new CEg(),
-  new CEh(),
-  new CEi(),
-  new CEj(),
-  new CEk(),
-  new CEl(),
-  new CEm(),
-  new CEn(),
-  new CEo(),
-  new CEp(),
-  new CEq(),
-  new CEr(),
-  new CEs(),
-  new CEt(),
-  new CEu(),
-  new CEv(),
-  new CEw(),
-  new CEx(),
-  new CEy(),
-  new CEz(),
-  new CEA(),
-  new CEB(),
-  new CEC(),
-  new CED(),
-  new CEE(),
-  new CEF(),
-  new CEG(),
-  new CEH(),
-  new CEI(),
-  new CEJ(),
-  new CEK(),
-  new CEL(),
-  new CEM(),
-  new CEN(),
-  new CEO(),
-  new CEP(),
-  new CEQ(),
-  new CER(),
-  new CES(),
-  new CET(),
-  new CEU(),
-  new CEV(),
-  new CEW(),
-  new CEX(),
-  new CEY(),
-  new CEZ(),
-  new CFa(),
-  new CFb(),
-  new CFc(),
-  new CFd(),
-  new CFe(),
-  new CFf(),
-  new CFg(),
-  new CFh(),
-  new CFi(),
-  new CFj(),
-  new CFk(),
-  new CFl(),
-  new CFm(),
-  new CFn(),
-  new CFo(),
-  new CFp(),
-  new CFq(),
-  new CFr(),
-  new CFs(),
-  new CFt(),
-  new CFu(),
-  new CFv(),
-  new CFw(),
-  new CFx(),
-  new CFy(),
-  new CFz(),
-  new CFA(),
-  new CFB(),
-  new CFC(),
-  new CFD(),
-  new CFE(),
-  new CFF(),
-  new CFG(),
-  new CFH(),
-  new CFI(),
-  new CFJ(),
-  new CFK(),
-  new CFL(),
-  new CFM(),
-  new CFN(),
-  new CFO(),
-  new CFP(),
-  new CFQ(),
-  new CFR(),
-  new CFS(),
-  new CFT(),
-  new CFU(),
-  new CFV(),
-  new CFW(),
-  new CFX(),
-  new CFY(),
-  new CFZ(),
-  new CGa(),
-  new CGb(),
-  new CGc(),
-  new CGd(),
-  new CGe(),
-  new CGf(),
-  new CGg(),
-  new CGh(),
-  new CGi(),
-  new CGj(),
-  new CGk(),
-  new CGl(),
-  new CGm(),
-  new CGn(),
-  new CGo(),
-  new CGp(),
-  new CGq(),
-  new CGr(),
-  new CGs(),
-  new CGt(),
-  new CGu(),
-  new CGv(),
-  new CGw(),
-  new CGx(),
-  new CGy(),
-  new CGz(),
-  new CGA(),
-  new CGB(),
-  new CGC(),
-  new CGD(),
-  new CGE(),
-  new CGF(),
-  new CGG(),
-  new CGH(),
-  new CGI(),
-  new CGJ(),
-  new CGK(),
-  new CGL(),
-  new CGM(),
-  new CGN(),
-  new CGO(),
-  new CGP(),
-  new CGQ(),
-  new CGR(),
-  new CGS(),
-  new CGT(),
-  new CGU(),
-  new CGV(),
-  new CGW(),
-  new CGX(),
-  new CGY(),
-  new CGZ(),
-  new CHa(),
-  new CHb(),
-  new CHc(),
-  new CHd(),
-  new CHe(),
-  new CHf(),
-  new CHg(),
-  new CHh(),
-  new CHi(),
-  new CHj(),
-  new CHk(),
-  new CHl(),
-  new CHm(),
-  new CHn(),
-  new CHo(),
-  new CHp(),
-  new CHq(),
-  new CHr(),
-  new CHs(),
-  new CHt(),
-  new CHu(),
-  new CHv(),
-  new CHw(),
-  new CHx(),
-  new CHy(),
-  new CHz(),
-  new CHA(),
-  new CHB(),
-  new CHC(),
-  new CHD(),
-  new CHE(),
-  new CHF(),
-  new CHG(),
-  new CHH(),
-  new CHI(),
-  new CHJ(),
-  new CHK(),
-  new CHL(),
-  new CHM(),
-  new CHN(),
-  new CHO(),
-  new CHP(),
-  new CHQ(),
-  new CHR(),
-  new CHS(),
-  new CHT(),
-  new CHU(),
-  new CHV(),
-  new CHW(),
-  new CHX(),
-  new CHY(),
-  new CHZ(),
-  new CIa(),
-  new CIb(),
-  new CIc(),
-  new CId(),
-  new CIe(),
-  new CIf(),
-  new CIg(),
-  new CIh(),
-  new CIi(),
-  new CIj(),
-  new CIk(),
-  new CIl(),
-  new CIm(),
-  new CIn(),
-  new CIo(),
-  new CIp(),
-  new CIq(),
-  new CIr(),
-  new CIs(),
-  new CIt(),
-  new CIu(),
-  new CIv(),
-  new CIw(),
-  new CIx(),
-  new CIy(),
-  new CIz(),
-  new CIA(),
-  new CIB(),
-  new CIC(),
-  new CID(),
-  new CIE(),
-  new CIF(),
-  new CIG(),
-  new CIH(),
-  new CII(),
-  new CIJ(),
-  new CIK(),
-  new CIL(),
-  new CIM(),
-  new CIN(),
-  new CIO(),
-  new CIP(),
-  new CIQ(),
-  new CIR(),
-  new CIS(),
-  new CIT(),
-  new CIU(),
-  new CIV(),
-  new CIW(),
-  new CIX(),
-  new CIY(),
-  new CIZ(),
-  new CJa(),
-  new CJb(),
-  new CJc(),
-  new CJd(),
-  new CJe(),
-  new CJf(),
-  new CJg(),
-  new CJh(),
-  new CJi(),
-  new CJj(),
-  new CJk(),
-  new CJl(),
-  new CJm(),
-  new CJn(),
-  new CJo(),
-  new CJp(),
-  new CJq(),
-  new CJr(),
-  new CJs(),
-  new CJt(),
-  new CJu(),
-  new CJv(),
-  new CJw(),
-  new CJx(),
-  new CJy(),
-  new CJz(),
-  new CJA(),
-  new CJB(),
-  new CJC(),
-  new CJD(),
-  new CJE(),
-  new CJF(),
-  new CJG(),
-  new CJH(),
-  new CJI(),
-  new CJJ(),
-  new CJK(),
-  new CJL(),
-  new CJM(),
-  new CJN(),
-  new CJO(),
-  new CJP(),
-  new CJQ(),
-  new CJR(),
-  new CJS(),
-  new CJT(),
-  new CJU(),
-  new CJV(),
-  new CJW(),
-  new CJX(),
-  new CJY(),
-  new CJZ(),
-  new CKa(),
-  new CKb(),
-  new CKc(),
-  new CKd(),
-  new CKe(),
-  new CKf(),
-  new CKg(),
-  new CKh(),
-  new CKi(),
-  new CKj(),
-  new CKk(),
-  new CKl(),
-  new CKm(),
-  new CKn(),
-  new CKo(),
-  new CKp(),
-  new CKq(),
-  new CKr(),
-  new CKs(),
-  new CKt(),
-  new CKu(),
-  new CKv(),
-  new CKw(),
-  new CKx(),
-  new CKy(),
-  new CKz(),
-  new CKA(),
-  new CKB(),
-  new CKC(),
-  new CKD(),
-  new CKE(),
-  new CKF(),
-  new CKG(),
-  new CKH(),
-  new CKI(),
-  new CKJ(),
-  new CKK(),
-  new CKL(),
-  new CKM(),
-  new CKN(),
-  new CKO(),
-  new CKP(),
-  new CKQ(),
-  new CKR(),
-  new CKS(),
-  new CKT(),
-  new CKU(),
-  new CKV(),
-  new CKW(),
-  new CKX(),
-  new CKY(),
-  new CKZ(),
-  new CLa(),
-  new CLb(),
-  new CLc(),
-  new CLd(),
-  new CLe(),
-  new CLf(),
-  new CLg(),
-  new CLh(),
-  new CLi(),
-  new CLj(),
-  new CLk(),
-  new CLl(),
-  new CLm(),
-  new CLn(),
-  new CLo(),
-  new CLp(),
-  new CLq(),
-  new CLr(),
-  new CLs(),
-  new CLt(),
-  new CLu(),
-  new CLv(),
-  new CLw(),
-  new CLx(),
-  new CLy(),
-  new CLz(),
-  new CLA(),
-  new CLB(),
-  new CLC(),
-  new CLD(),
-  new CLE(),
-  new CLF(),
-  new CLG(),
-  new CLH(),
-  new CLI(),
-  new CLJ(),
-  new CLK(),
-  new CLL(),
-  new CLM(),
-  new CLN(),
-  new CLO(),
-  new CLP(),
-  new CLQ(),
-  new CLR(),
-  new CLS(),
-  new CLT(),
-  new CLU(),
-  new CLV(),
-  new CLW(),
-  new CLX(),
-  new CLY(),
-  new CLZ(),
-  new CMa(),
-  new CMb(),
-  new CMc(),
-  new CMd(),
-  new CMe(),
-  new CMf(),
-  new CMg(),
-  new CMh(),
-  new CMi(),
-  new CMj(),
-  new CMk(),
-  new CMl(),
-  new CMm(),
-  new CMn(),
-  new CMo(),
-  new CMp(),
-  new CMq(),
-  new CMr(),
-  new CMs(),
-  new CMt(),
-  new CMu(),
-  new CMv(),
-  new CMw(),
-  new CMx(),
-  new CMy(),
-  new CMz(),
-  new CMA(),
-  new CMB(),
-  new CMC(),
-  new CMD(),
-  new CME(),
-  new CMF(),
-  new CMG(),
-  new CMH(),
-  new CMI(),
-  new CMJ(),
-  new CMK(),
-  new CML(),
-  new CMM(),
-  new CMN(),
-  new CMO(),
-  new CMP(),
-  new CMQ(),
-  new CMR(),
-  new CMS(),
-  new CMT(),
-  new CMU(),
-  new CMV(),
-  new CMW(),
-  new CMX(),
-  new CMY(),
-  new CMZ(),
-  new CNa(),
-  new CNb(),
-  new CNc(),
-  new CNd(),
-  new CNe(),
-  new CNf(),
-  new CNg(),
-  new CNh(),
-  new CNi(),
-  new CNj(),
-  new CNk(),
-  new CNl(),
-  new CNm(),
-  new CNn(),
-  new CNo(),
-  new CNp(),
-  new CNq(),
-  new CNr(),
-  new CNs(),
-  new CNt(),
-  new CNu(),
-  new CNv(),
-  new CNw(),
-  new CNx(),
-  new CNy(),
-  new CNz(),
-  new CNA(),
-  new CNB(),
-  new CNC(),
-  new CND(),
-  new CNE(),
-  new CNF(),
-  new CNG(),
-  new CNH(),
-  new CNI(),
-  new CNJ(),
-  new CNK(),
-  new CNL(),
-  new CNM(),
-  new CNN(),
-  new CNO(),
-  new CNP(),
-  new CNQ(),
-  new CNR(),
-  new CNS(),
-  new CNT(),
-  new CNU(),
-  new CNV(),
-  new CNW(),
-  new CNX(),
-  new CNY(),
-  new CNZ(),
-  new COa(),
-  new COb(),
-  new COc(),
-  new COd(),
-  new COe(),
-  new COf(),
-  new COg(),
-  new COh(),
-  new COi(),
-  new COj(),
-  new COk(),
-  new COl(),
-  new COm(),
-  new COn(),
-  new COo(),
-  new COp(),
-  new COq(),
-  new COr(),
-  new COs(),
-  new COt(),
-  new COu(),
-  new COv(),
-  new COw(),
-  new COx(),
-  new COy(),
-  new COz(),
-  new COA(),
-  new COB(),
-  new COC(),
-  new COD(),
-  new COE(),
-  new COF(),
-  new COG(),
-  new COH(),
-  new COI(),
-  new COJ(),
-  new COK(),
-  new COL(),
-  new COM(),
-  new CON(),
-  new COO(),
-  new COP(),
-  new COQ(),
-  new COR(),
-  new COS(),
-  new COT(),
-  new COU(),
-  new COV(),
-  new COW(),
-  new COX(),
-  new COY(),
-  new COZ(),
-  new CPa(),
-  new CPb(),
-  new CPc(),
-  new CPd(),
-  new CPe(),
-  new CPf(),
-  new CPg(),
-  new CPh(),
-  new CPi(),
-  new CPj(),
-  new CPk(),
-  new CPl(),
-  new CPm(),
-  new CPn(),
-  new CPo(),
-  new CPp(),
-  new CPq(),
-  new CPr(),
-  new CPs(),
-  new CPt(),
-  new CPu(),
-  new CPv(),
-  new CPw(),
-  new CPx(),
-  new CPy(),
-  new CPz(),
-  new CPA(),
-  new CPB(),
-  new CPC(),
-  new CPD(),
-  new CPE(),
-  new CPF(),
-  new CPG(),
-  new CPH(),
-  new CPI(),
-  new CPJ(),
-  new CPK(),
-  new CPL(),
-  new CPM(),
-  new CPN(),
-  new CPO(),
-  new CPP(),
-  new CPQ(),
-  new CPR(),
-  new CPS(),
-  new CPT(),
-  new CPU(),
-  new CPV(),
-  new CPW(),
-  new CPX(),
-  new CPY(),
-  new CPZ(),
-  new CQa(),
-  new CQb(),
-  new CQc(),
-  new CQd(),
-  new CQe(),
-  new CQf(),
-  new CQg(),
-  new CQh(),
-  new CQi(),
-  new CQj(),
-  new CQk(),
-  new CQl(),
-  new CQm(),
-  new CQn(),
-  new CQo(),
-  new CQp(),
-  new CQq(),
-  new CQr(),
-  new CQs(),
-  new CQt(),
-  new CQu(),
-  new CQv(),
-  new CQw(),
-  new CQx(),
-  new CQy(),
-  new CQz(),
-  new CQA(),
-  new CQB(),
-  new CQC(),
-  new CQD(),
-  new CQE(),
-  new CQF(),
-  new CQG(),
-  new CQH(),
-  new CQI(),
-  new CQJ(),
-  new CQK(),
-  new CQL(),
-  new CQM(),
-  new CQN(),
-  new CQO(),
-  new CQP(),
-  new CQQ(),
-  new CQR(),
-  new CQS(),
-  new CQT(),
-  new CQU(),
-  new CQV(),
-  new CQW(),
-  new CQX(),
-  new CQY(),
-  new CQZ(),
-  new CRa(),
-  new CRb(),
-  new CRc(),
-  new CRd(),
-  new CRe(),
-  new CRf(),
-  new CRg(),
-  new CRh(),
-  new CRi(),
-  new CRj(),
-  new CRk(),
-  new CRl(),
-  new CRm(),
-  new CRn(),
-  new CRo(),
-  new CRp(),
-  new CRq(),
-  new CRr(),
-  new CRs(),
-  new CRt(),
-  new CRu(),
-  new CRv(),
-  new CRw(),
-  new CRx(),
-  new CRy(),
-  new CRz(),
-  new CRA(),
-  new CRB(),
-  new CRC(),
-  new CRD(),
-  new CRE(),
-  new CRF(),
-  new CRG(),
-  new CRH(),
-  new CRI(),
-  new CRJ(),
-  new CRK(),
-  new CRL(),
-  new CRM(),
-  new CRN(),
-  new CRO(),
-  new CRP(),
-  new CRQ(),
-  new CRR(),
-  new CRS(),
-  new CRT(),
-  new CRU(),
-  new CRV(),
-  new CRW(),
-  new CRX(),
-  new CRY(),
-  new CRZ(),
-  new CSa(),
-  new CSb(),
-  new CSc(),
-  new CSd(),
-  new CSe(),
-  new CSf(),
-  new CSg(),
-  new CSh(),
-  new CSi(),
-  new CSj(),
-  new CSk(),
-  new CSl(),
-  new CSm(),
-  new CSn(),
-  new CSo(),
-  new CSp(),
-  new CSq(),
-  new CSr(),
-  new CSs(),
-  new CSt(),
-  new CSu(),
-  new CSv(),
-  new CSw(),
-  new CSx(),
-  new CSy(),
-  new CSz(),
-  new CSA(),
-  new CSB(),
-  new CSC(),
-  new CSD(),
-  new CSE(),
-  new CSF(),
-  new CSG(),
-  new CSH(),
-  new CSI(),
-  new CSJ(),
-  new CSK(),
-  new CSL(),
-  new CSM(),
-  new CSN(),
-  new CSO(),
-  new CSP(),
-  new CSQ(),
-  new CSR(),
-  new CSS(),
-  new CST(),
-  new CSU(),
-  new CSV(),
-  new CSW(),
-  new CSX(),
-  new CSY(),
-  new CSZ(),
-  new CTa(),
-  new CTb(),
-  new CTc(),
-  new CTd(),
-  new CTe(),
-  new CTf(),
-  new CTg(),
-  new CTh(),
-  new CTi(),
-  new CTj(),
-  new CTk(),
-  new CTl(),
-  new CTm(),
-  new CTn(),
-  new CTo(),
-  new CTp(),
-  new CTq(),
-  new CTr(),
-  new CTs(),
-  new CTt(),
-  new CTu(),
-  new CTv(),
-  new CTw(),
-  new CTx(),
-  new CTy(),
-  new CTz(),
-  new CTA(),
-  new CTB(),
-  new CTC(),
-  new CTD(),
-  new CTE(),
-  new CTF(),
-  new CTG(),
-  new CTH(),
-  new CTI(),
-  new CTJ(),
-  new CTK(),
-  new CTL(),
-  new CTM(),
-  new CTN(),
-  new CTO(),
-  new CTP(),
-  new CTQ(),
-  new CTR(),
-  new CTS(),
-  new CTT(),
-  new CTU(),
-  new CTV(),
-  new CTW(),
-  new CTX(),
-  new CTY(),
-  new CTZ(),
-  new CUa(),
-  new CUb(),
-  new CUc(),
-  new CUd(),
-  new CUe(),
-  new CUf(),
-  new CUg(),
-  new CUh(),
-  new CUi(),
-  new CUj(),
-  new CUk(),
-  new CUl(),
-  new CUm(),
-  new CUn(),
-  new CUo(),
-  new CUp(),
-  new CUq(),
-  new CUr(),
-  new CUs(),
-  new CUt(),
-  new CUu(),
-  new CUv(),
-  new CUw(),
-  new CUx(),
-  new CUy(),
-  new CUz(),
-  new CUA(),
-  new CUB(),
-  new CUC(),
-  new CUD(),
-  new CUE(),
-  new CUF(),
-  new CUG(),
-  new CUH(),
-  new CUI(),
-  new CUJ(),
-  new CUK(),
-  new CUL(),
-  new CUM(),
-  new CUN(),
-  new CUO(),
-  new CUP(),
-  new CUQ(),
-  new CUR(),
-  new CUS(),
-  new CUT(),
-  new CUU(),
-  new CUV(),
-  new CUW(),
-  new CUX(),
-  new CUY(),
-  new CUZ(),
-  new CVa(),
-  new CVb(),
-  new CVc(),
-  new CVd(),
-  new CVe(),
-  new CVf(),
-  new CVg(),
-  new CVh(),
-  new CVi(),
-  new CVj(),
-  new CVk(),
-  new CVl(),
-  new CVm(),
-  new CVn(),
-  new CVo(),
-  new CVp(),
-  new CVq(),
-  new CVr(),
-  new CVs(),
-  new CVt(),
-  new CVu(),
-  new CVv(),
-  new CVw(),
-  new CVx(),
-  new CVy(),
-  new CVz(),
-  new CVA(),
-  new CVB(),
-  new CVC(),
-  new CVD(),
-  new CVE(),
-  new CVF(),
-  new CVG(),
-  new CVH(),
-  new CVI(),
-  new CVJ(),
-  new CVK(),
-  new CVL(),
-  new CVM(),
-  new CVN(),
-  new CVO(),
-  new CVP(),
-  new CVQ(),
-  new CVR(),
-  new CVS(),
-  new CVT(),
-  new CVU(),
-  new CVV(),
-  new CVW(),
-  new CVX(),
-  new CVY(),
-  new CVZ(),
-  new CWa(),
-  new CWb(),
-  new CWc(),
-  new CWd(),
-  new CWe(),
-  new CWf(),
-  new CWg(),
-  new CWh(),
-  new CWi(),
-  new CWj(),
-  new CWk(),
-  new CWl(),
-  new CWm(),
-  new CWn(),
-  new CWo(),
-  new CWp(),
-  new CWq(),
-  new CWr(),
-  new CWs(),
-  new CWt(),
-  new CWu(),
-  new CWv(),
-  new CWw(),
-  new CWx(),
-  new CWy(),
-  new CWz(),
-  new CWA(),
-  new CWB(),
-  new CWC(),
-  new CWD(),
-  new CWE(),
-  new CWF(),
-  new CWG(),
-  new CWH(),
-  new CWI(),
-  new CWJ(),
-  new CWK(),
-  new CWL(),
-  new CWM(),
-  new CWN(),
-  new CWO(),
-  new CWP(),
-  new CWQ(),
-  new CWR(),
-  new CWS(),
-  new CWT(),
-  new CWU(),
-  new CWV(),
-  new CWW(),
-  new CWX(),
-  new CWY(),
-  new CWZ(),
-  new CXa(),
-  new CXb(),
-  new CXc(),
-  new CXd(),
-  new CXe(),
-  new CXf(),
-  new CXg(),
-  new CXh(),
-  new CXi(),
-  new CXj(),
-  new CXk(),
-  new CXl(),
-  new CXm(),
-  new CXn(),
-  new CXo(),
-  new CXp(),
-  new CXq(),
-  new CXr(),
-  new CXs(),
-  new CXt(),
-  new CXu(),
-  new CXv(),
-  new CXw(),
-  new CXx(),
-  new CXy(),
-  new CXz(),
-  new CXA(),
-  new CXB(),
-  new CXC(),
-  new CXD(),
-  new CXE(),
-  new CXF(),
-  new CXG(),
-  new CXH(),
-  new CXI(),
-  new CXJ(),
-  new CXK(),
-  new CXL(),
-  new CXM(),
-  new CXN(),
-  new CXO(),
-  new CXP(),
-  new CXQ(),
-  new CXR(),
-  new CXS(),
-  new CXT(),
-  new CXU(),
-  new CXV(),
-  new CXW(),
-  new CXX(),
-  new CXY(),
-  new CXZ(),
-  new CYa(),
-  new CYb(),
-  new CYc(),
-  new CYd(),
-  new CYe(),
-  new CYf(),
-  new CYg(),
-  new CYh(),
-  new CYi(),
-  new CYj(),
-  new CYk(),
-  new CYl(),
-  new CYm(),
-  new CYn(),
-  new CYo(),
-  new CYp(),
-  new CYq(),
-  new CYr(),
-  new CYs(),
-  new CYt(),
-  new CYu(),
-  new CYv(),
-  new CYw(),
-  new CYx(),
-  new CYy(),
-  new CYz(),
-  new CYA(),
-  new CYB(),
-  new CYC(),
-  new CYD(),
-  new CYE(),
-  new CYF(),
-  new CYG(),
-  new CYH(),
-  new CYI(),
-  new CYJ(),
-  new CYK(),
-  new CYL(),
-  new CYM(),
-  new CYN(),
-  new CYO(),
-  new CYP(),
-  new CYQ(),
-  new CYR(),
-  new CYS(),
-  new CYT(),
-  new CYU(),
-  new CYV(),
-  new CYW(),
-  new CYX(),
-  new CYY(),
-  new CYZ(),
-  new CZa(),
-  new CZb(),
-  new CZc(),
-  new CZd(),
-  new CZe(),
-  new CZf(),
-  new CZg(),
-  new CZh(),
-  new CZi(),
-  new CZj(),
-  new CZk(),
-  new CZl(),
-  new CZm(),
-  new CZn(),
-  new CZo(),
-  new CZp(),
-  new CZq(),
-  new CZr(),
-  new CZs(),
-  new CZt(),
-  new CZu(),
-  new CZv(),
-  new CZw(),
-  new CZx(),
-  new CZy(),
-  new CZz(),
-  new CZA(),
-  new CZB(),
-  new CZC(),
-  new CZD(),
-  new CZE(),
-  new CZF(),
-  new CZG(),
-  new CZH(),
-  new CZI(),
-  new CZJ(),
-  new CZK(),
-  new CZL(),
-  new CZM(),
-  new CZN(),
-  new CZO(),
-  new CZP(),
-  new CZQ(),
-  new CZR(),
-  new CZS(),
-  new CZT(),
-  new CZU(),
-  new CZV(),
-  new CZW(),
-  new CZX(),
-  new CZY(),
-  new CZZ(),
-];
-
-class Caa {}
-
-class Cab {}
-
-class Cac {}
-
-class Cad {}
-
-class Cae {}
-
-class Caf {}
-
-class Cag {}
-
-class Cah {}
-
-class Cai {}
-
-class Caj {}
-
-class Cak {}
-
-class Cal {}
-
-class Cam {}
-
-class Can {}
-
-class Cao {}
-
-class Cap {}
-
-class Caq {}
-
-class Car {}
-
-class Cas {}
-
-class Cat {}
-
-class Cau {}
-
-class Cav {}
-
-class Caw {}
-
-class Cax {}
-
-class Cay {}
-
-class Caz {}
-
-class CaA {}
-
-class CaB {}
-
-class CaC {}
-
-class CaD {}
-
-class CaE {}
-
-class CaF {}
-
-class CaG {}
-
-class CaH {}
-
-class CaI {}
-
-class CaJ {}
-
-class CaK {}
-
-class CaL {}
-
-class CaM {}
-
-class CaN {}
-
-class CaO {}
-
-class CaP {}
-
-class CaQ {}
-
-class CaR {}
-
-class CaS {}
-
-class CaT {}
-
-class CaU {}
-
-class CaV {}
-
-class CaW {}
-
-class CaX {}
-
-class CaY {}
-
-class CaZ {}
-
-class Cba {}
-
-class Cbb {}
-
-class Cbc {}
-
-class Cbd {}
-
-class Cbe {}
-
-class Cbf {}
-
-class Cbg {}
-
-class Cbh {}
-
-class Cbi {}
-
-class Cbj {}
-
-class Cbk {}
-
-class Cbl {}
-
-class Cbm {}
-
-class Cbn {}
-
-class Cbo {}
-
-class Cbp {}
-
-class Cbq {}
-
-class Cbr {}
-
-class Cbs {}
-
-class Cbt {}
-
-class Cbu {}
-
-class Cbv {}
-
-class Cbw {}
-
-class Cbx {}
-
-class Cby {}
-
-class Cbz {}
-
-class CbA {}
-
-class CbB {}
-
-class CbC {}
-
-class CbD {}
-
-class CbE {}
-
-class CbF {}
-
-class CbG {}
-
-class CbH {}
-
-class CbI {}
-
-class CbJ {}
-
-class CbK {}
-
-class CbL {}
-
-class CbM {}
-
-class CbN {}
-
-class CbO {}
-
-class CbP {}
-
-class CbQ {}
-
-class CbR {}
-
-class CbS {}
-
-class CbT {}
-
-class CbU {}
-
-class CbV {}
-
-class CbW {}
-
-class CbX {}
-
-class CbY {}
-
-class CbZ {}
-
-class Cca {}
-
-class Ccb {}
-
-class Ccc {}
-
-class Ccd {}
-
-class Cce {}
-
-class Ccf {}
-
-class Ccg {}
-
-class Cch {}
-
-class Cci {}
-
-class Ccj {}
-
-class Cck {}
-
-class Ccl {}
-
-class Ccm {}
-
-class Ccn {}
-
-class Cco {}
-
-class Ccp {}
-
-class Ccq {}
-
-class Ccr {}
-
-class Ccs {}
-
-class Cct {}
-
-class Ccu {}
-
-class Ccv {}
-
-class Ccw {}
-
-class Ccx {}
-
-class Ccy {}
-
-class Ccz {}
-
-class CcA {}
-
-class CcB {}
-
-class CcC {}
-
-class CcD {}
-
-class CcE {}
-
-class CcF {}
-
-class CcG {}
-
-class CcH {}
-
-class CcI {}
-
-class CcJ {}
-
-class CcK {}
-
-class CcL {}
-
-class CcM {}
-
-class CcN {}
-
-class CcO {}
-
-class CcP {}
-
-class CcQ {}
-
-class CcR {}
-
-class CcS {}
-
-class CcT {}
-
-class CcU {}
-
-class CcV {}
-
-class CcW {}
-
-class CcX {}
-
-class CcY {}
-
-class CcZ {}
-
-class Cda {}
-
-class Cdb {}
-
-class Cdc {}
-
-class Cdd {}
-
-class Cde {}
-
-class Cdf {}
-
-class Cdg {}
-
-class Cdh {}
-
-class Cdi {}
-
-class Cdj {}
-
-class Cdk {}
-
-class Cdl {}
-
-class Cdm {}
-
-class Cdn {}
-
-class Cdo {}
-
-class Cdp {}
-
-class Cdq {}
-
-class Cdr {}
-
-class Cds {}
-
-class Cdt {}
-
-class Cdu {}
-
-class Cdv {}
-
-class Cdw {}
-
-class Cdx {}
-
-class Cdy {}
-
-class Cdz {}
-
-class CdA {}
-
-class CdB {}
-
-class CdC {}
-
-class CdD {}
-
-class CdE {}
-
-class CdF {}
-
-class CdG {}
-
-class CdH {}
-
-class CdI {}
-
-class CdJ {}
-
-class CdK {}
-
-class CdL {}
-
-class CdM {}
-
-class CdN {}
-
-class CdO {}
-
-class CdP {}
-
-class CdQ {}
-
-class CdR {}
-
-class CdS {}
-
-class CdT {}
-
-class CdU {}
-
-class CdV {}
-
-class CdW {}
-
-class CdX {}
-
-class CdY {}
-
-class CdZ {}
-
-class Cea {}
-
-class Ceb {}
-
-class Cec {}
-
-class Ced {}
-
-class Cee {}
-
-class Cef {}
-
-class Ceg {}
-
-class Ceh {}
-
-class Cei {}
-
-class Cej {}
-
-class Cek {}
-
-class Cel {}
-
-class Cem {}
-
-class Cen {}
-
-class Ceo {}
-
-class Cep {}
-
-class Ceq {}
-
-class Cer {}
-
-class Ces {}
-
-class Cet {}
-
-class Ceu {}
-
-class Cev {}
-
-class Cew {}
-
-class Cex {}
-
-class Cey {}
-
-class Cez {}
-
-class CeA {}
-
-class CeB {}
-
-class CeC {}
-
-class CeD {}
-
-class CeE {}
-
-class CeF {}
-
-class CeG {}
-
-class CeH {}
-
-class CeI {}
-
-class CeJ {}
-
-class CeK {}
-
-class CeL {}
-
-class CeM {}
-
-class CeN {}
-
-class CeO {}
-
-class CeP {}
-
-class CeQ {}
-
-class CeR {}
-
-class CeS {}
-
-class CeT {}
-
-class CeU {}
-
-class CeV {}
-
-class CeW {}
-
-class CeX {}
-
-class CeY {}
-
-class CeZ {}
-
-class Cfa {}
-
-class Cfb {}
-
-class Cfc {}
-
-class Cfd {}
-
-class Cfe {}
-
-class Cff {}
-
-class Cfg {}
-
-class Cfh {}
-
-class Cfi {}
-
-class Cfj {}
-
-class Cfk {}
-
-class Cfl {}
-
-class Cfm {}
-
-class Cfn {}
-
-class Cfo {}
-
-class Cfp {}
-
-class Cfq {}
-
-class Cfr {}
-
-class Cfs {}
-
-class Cft {}
-
-class Cfu {}
-
-class Cfv {}
-
-class Cfw {}
-
-class Cfx {}
-
-class Cfy {}
-
-class Cfz {}
-
-class CfA {}
-
-class CfB {}
-
-class CfC {}
-
-class CfD {}
-
-class CfE {}
-
-class CfF {}
-
-class CfG {}
-
-class CfH {}
-
-class CfI {}
-
-class CfJ {}
-
-class CfK {}
-
-class CfL {}
-
-class CfM {}
-
-class CfN {}
-
-class CfO {}
-
-class CfP {}
-
-class CfQ {}
-
-class CfR {}
-
-class CfS {}
-
-class CfT {}
-
-class CfU {}
-
-class CfV {}
-
-class CfW {}
-
-class CfX {}
-
-class CfY {}
-
-class CfZ {}
-
-class Cga {}
-
-class Cgb {}
-
-class Cgc {}
-
-class Cgd {}
-
-class Cge {}
-
-class Cgf {}
-
-class Cgg {}
-
-class Cgh {}
-
-class Cgi {}
-
-class Cgj {}
-
-class Cgk {}
-
-class Cgl {}
-
-class Cgm {}
-
-class Cgn {}
-
-class Cgo {}
-
-class Cgp {}
-
-class Cgq {}
-
-class Cgr {}
-
-class Cgs {}
-
-class Cgt {}
-
-class Cgu {}
-
-class Cgv {}
-
-class Cgw {}
-
-class Cgx {}
-
-class Cgy {}
-
-class Cgz {}
-
-class CgA {}
-
-class CgB {}
-
-class CgC {}
-
-class CgD {}
-
-class CgE {}
-
-class CgF {}
-
-class CgG {}
-
-class CgH {}
-
-class CgI {}
-
-class CgJ {}
-
-class CgK {}
-
-class CgL {}
-
-class CgM {}
-
-class CgN {}
-
-class CgO {}
-
-class CgP {}
-
-class CgQ {}
-
-class CgR {}
-
-class CgS {}
-
-class CgT {}
-
-class CgU {}
-
-class CgV {}
-
-class CgW {}
-
-class CgX {}
-
-class CgY {}
-
-class CgZ {}
-
-class Cha {}
-
-class Chb {}
-
-class Chc {}
-
-class Chd {}
-
-class Che {}
-
-class Chf {}
-
-class Chg {}
-
-class Chh {}
-
-class Chi {}
-
-class Chj {}
-
-class Chk {}
-
-class Chl {}
-
-class Chm {}
-
-class Chn {}
-
-class Cho {}
-
-class Chp {}
-
-class Chq {}
-
-class Chr {}
-
-class Chs {}
-
-class Cht {}
-
-class Chu {}
-
-class Chv {}
-
-class Chw {}
-
-class Chx {}
-
-class Chy {}
-
-class Chz {}
-
-class ChA {}
-
-class ChB {}
-
-class ChC {}
-
-class ChD {}
-
-class ChE {}
-
-class ChF {}
-
-class ChG {}
-
-class ChH {}
-
-class ChI {}
-
-class ChJ {}
-
-class ChK {}
-
-class ChL {}
-
-class ChM {}
-
-class ChN {}
-
-class ChO {}
-
-class ChP {}
-
-class ChQ {}
-
-class ChR {}
-
-class ChS {}
-
-class ChT {}
-
-class ChU {}
-
-class ChV {}
-
-class ChW {}
-
-class ChX {}
-
-class ChY {}
-
-class ChZ {}
-
-class Cia {}
-
-class Cib {}
-
-class Cic {}
-
-class Cid {}
-
-class Cie {}
-
-class Cif {}
-
-class Cig {}
-
-class Cih {}
-
-class Cii {}
-
-class Cij {}
-
-class Cik {}
-
-class Cil {}
-
-class Cim {}
-
-class Cin {}
-
-class Cio {}
-
-class Cip {}
-
-class Ciq {}
-
-class Cir {}
-
-class Cis {}
-
-class Cit {}
-
-class Ciu {}
-
-class Civ {}
-
-class Ciw {}
-
-class Cix {}
-
-class Ciy {}
-
-class Ciz {}
-
-class CiA {}
-
-class CiB {}
-
-class CiC {}
-
-class CiD {}
-
-class CiE {}
-
-class CiF {}
-
-class CiG {}
-
-class CiH {}
-
-class CiI {}
-
-class CiJ {}
-
-class CiK {}
-
-class CiL {}
-
-class CiM {}
-
-class CiN {}
-
-class CiO {}
-
-class CiP {}
-
-class CiQ {}
-
-class CiR {}
-
-class CiS {}
-
-class CiT {}
-
-class CiU {}
-
-class CiV {}
-
-class CiW {}
-
-class CiX {}
-
-class CiY {}
-
-class CiZ {}
-
-class Cja {}
-
-class Cjb {}
-
-class Cjc {}
-
-class Cjd {}
-
-class Cje {}
-
-class Cjf {}
-
-class Cjg {}
-
-class Cjh {}
-
-class Cji {}
-
-class Cjj {}
-
-class Cjk {}
-
-class Cjl {}
-
-class Cjm {}
-
-class Cjn {}
-
-class Cjo {}
-
-class Cjp {}
-
-class Cjq {}
-
-class Cjr {}
-
-class Cjs {}
-
-class Cjt {}
-
-class Cju {}
-
-class Cjv {}
-
-class Cjw {}
-
-class Cjx {}
-
-class Cjy {}
-
-class Cjz {}
-
-class CjA {}
-
-class CjB {}
-
-class CjC {}
-
-class CjD {}
-
-class CjE {}
-
-class CjF {}
-
-class CjG {}
-
-class CjH {}
-
-class CjI {}
-
-class CjJ {}
-
-class CjK {}
-
-class CjL {}
-
-class CjM {}
-
-class CjN {}
-
-class CjO {}
-
-class CjP {}
-
-class CjQ {}
-
-class CjR {}
-
-class CjS {}
-
-class CjT {}
-
-class CjU {}
-
-class CjV {}
-
-class CjW {}
-
-class CjX {}
-
-class CjY {}
-
-class CjZ {}
-
-class Cka {}
-
-class Ckb {}
-
-class Ckc {}
-
-class Ckd {}
-
-class Cke {}
-
-class Ckf {}
-
-class Ckg {}
-
-class Ckh {}
-
-class Cki {}
-
-class Ckj {}
-
-class Ckk {}
-
-class Ckl {}
-
-class Ckm {}
-
-class Ckn {}
-
-class Cko {}
-
-class Ckp {}
-
-class Ckq {}
-
-class Ckr {}
-
-class Cks {}
-
-class Ckt {}
-
-class Cku {}
-
-class Ckv {}
-
-class Ckw {}
-
-class Ckx {}
-
-class Cky {}
-
-class Ckz {}
-
-class CkA {}
-
-class CkB {}
-
-class CkC {}
-
-class CkD {}
-
-class CkE {}
-
-class CkF {}
-
-class CkG {}
-
-class CkH {}
-
-class CkI {}
-
-class CkJ {}
-
-class CkK {}
-
-class CkL {}
-
-class CkM {}
-
-class CkN {}
-
-class CkO {}
-
-class CkP {}
-
-class CkQ {}
-
-class CkR {}
-
-class CkS {}
-
-class CkT {}
-
-class CkU {}
-
-class CkV {}
-
-class CkW {}
-
-class CkX {}
-
-class CkY {}
-
-class CkZ {}
-
-class Cla {}
-
-class Clb {}
-
-class Clc {}
-
-class Cld {}
-
-class Cle {}
-
-class Clf {}
-
-class Clg {}
-
-class Clh {}
-
-class Cli {}
-
-class Clj {}
-
-class Clk {}
-
-class Cll {}
-
-class Clm {}
-
-class Cln {}
-
-class Clo {}
-
-class Clp {}
-
-class Clq {}
-
-class Clr {}
-
-class Cls {}
-
-class Clt {}
-
-class Clu {}
-
-class Clv {}
-
-class Clw {}
-
-class Clx {}
-
-class Cly {}
-
-class Clz {}
-
-class ClA {}
-
-class ClB {}
-
-class ClC {}
-
-class ClD {}
-
-class ClE {}
-
-class ClF {}
-
-class ClG {}
-
-class ClH {}
-
-class ClI {}
-
-class ClJ {}
-
-class ClK {}
-
-class ClL {}
-
-class ClM {}
-
-class ClN {}
-
-class ClO {}
-
-class ClP {}
-
-class ClQ {}
-
-class ClR {}
-
-class ClS {}
-
-class ClT {}
-
-class ClU {}
-
-class ClV {}
-
-class ClW {}
-
-class ClX {}
-
-class ClY {}
-
-class ClZ {}
-
-class Cma {}
-
-class Cmb {}
-
-class Cmc {}
-
-class Cmd {}
-
-class Cme {}
-
-class Cmf {}
-
-class Cmg {}
-
-class Cmh {}
-
-class Cmi {}
-
-class Cmj {}
-
-class Cmk {}
-
-class Cml {}
-
-class Cmm {}
-
-class Cmn {}
-
-class Cmo {}
-
-class Cmp {}
-
-class Cmq {}
-
-class Cmr {}
-
-class Cms {}
-
-class Cmt {}
-
-class Cmu {}
-
-class Cmv {}
-
-class Cmw {}
-
-class Cmx {}
-
-class Cmy {}
-
-class Cmz {}
-
-class CmA {}
-
-class CmB {}
-
-class CmC {}
-
-class CmD {}
-
-class CmE {}
-
-class CmF {}
-
-class CmG {}
-
-class CmH {}
-
-class CmI {}
-
-class CmJ {}
-
-class CmK {}
-
-class CmL {}
-
-class CmM {}
-
-class CmN {}
-
-class CmO {}
-
-class CmP {}
-
-class CmQ {}
-
-class CmR {}
-
-class CmS {}
-
-class CmT {}
-
-class CmU {}
-
-class CmV {}
-
-class CmW {}
-
-class CmX {}
-
-class CmY {}
-
-class CmZ {}
-
-class Cna {}
-
-class Cnb {}
-
-class Cnc {}
-
-class Cnd {}
-
-class Cne {}
-
-class Cnf {}
-
-class Cng {}
-
-class Cnh {}
-
-class Cni {}
-
-class Cnj {}
-
-class Cnk {}
-
-class Cnl {}
-
-class Cnm {}
-
-class Cnn {}
-
-class Cno {}
-
-class Cnp {}
-
-class Cnq {}
-
-class Cnr {}
-
-class Cns {}
-
-class Cnt {}
-
-class Cnu {}
-
-class Cnv {}
-
-class Cnw {}
-
-class Cnx {}
-
-class Cny {}
-
-class Cnz {}
-
-class CnA {}
-
-class CnB {}
-
-class CnC {}
-
-class CnD {}
-
-class CnE {}
-
-class CnF {}
-
-class CnG {}
-
-class CnH {}
-
-class CnI {}
-
-class CnJ {}
-
-class CnK {}
-
-class CnL {}
-
-class CnM {}
-
-class CnN {}
-
-class CnO {}
-
-class CnP {}
-
-class CnQ {}
-
-class CnR {}
-
-class CnS {}
-
-class CnT {}
-
-class CnU {}
-
-class CnV {}
-
-class CnW {}
-
-class CnX {}
-
-class CnY {}
-
-class CnZ {}
-
-class Coa {}
-
-class Cob {}
-
-class Coc {}
-
-class Cod {}
-
-class Coe {}
-
-class Cof {}
-
-class Cog {}
-
-class Coh {}
-
-class Coi {}
-
-class Coj {}
-
-class Cok {}
-
-class Col {}
-
-class Com {}
-
-class Con {}
-
-class Coo {}
-
-class Cop {}
-
-class Coq {}
-
-class Cor {}
-
-class Cos {}
-
-class Cot {}
-
-class Cou {}
-
-class Cov {}
-
-class Cow {}
-
-class Cox {}
-
-class Coy {}
-
-class Coz {}
-
-class CoA {}
-
-class CoB {}
-
-class CoC {}
-
-class CoD {}
-
-class CoE {}
-
-class CoF {}
-
-class CoG {}
-
-class CoH {}
-
-class CoI {}
-
-class CoJ {}
-
-class CoK {}
-
-class CoL {}
-
-class CoM {}
-
-class CoN {}
-
-class CoO {}
-
-class CoP {}
-
-class CoQ {}
-
-class CoR {}
-
-class CoS {}
-
-class CoT {}
-
-class CoU {}
-
-class CoV {}
-
-class CoW {}
-
-class CoX {}
-
-class CoY {}
-
-class CoZ {}
-
-class Cpa {}
-
-class Cpb {}
-
-class Cpc {}
-
-class Cpd {}
-
-class Cpe {}
-
-class Cpf {}
-
-class Cpg {}
-
-class Cph {}
-
-class Cpi {}
-
-class Cpj {}
-
-class Cpk {}
-
-class Cpl {}
-
-class Cpm {}
-
-class Cpn {}
-
-class Cpo {}
-
-class Cpp {}
-
-class Cpq {}
-
-class Cpr {}
-
-class Cps {}
-
-class Cpt {}
-
-class Cpu {}
-
-class Cpv {}
-
-class Cpw {}
-
-class Cpx {}
-
-class Cpy {}
-
-class Cpz {}
-
-class CpA {}
-
-class CpB {}
-
-class CpC {}
-
-class CpD {}
-
-class CpE {}
-
-class CpF {}
-
-class CpG {}
-
-class CpH {}
-
-class CpI {}
-
-class CpJ {}
-
-class CpK {}
-
-class CpL {}
-
-class CpM {}
-
-class CpN {}
-
-class CpO {}
-
-class CpP {}
-
-class CpQ {}
-
-class CpR {}
-
-class CpS {}
-
-class CpT {}
-
-class CpU {}
-
-class CpV {}
-
-class CpW {}
-
-class CpX {}
-
-class CpY {}
-
-class CpZ {}
-
-class Cqa {}
-
-class Cqb {}
-
-class Cqc {}
-
-class Cqd {}
-
-class Cqe {}
-
-class Cqf {}
-
-class Cqg {}
-
-class Cqh {}
-
-class Cqi {}
-
-class Cqj {}
-
-class Cqk {}
-
-class Cql {}
-
-class Cqm {}
-
-class Cqn {}
-
-class Cqo {}
-
-class Cqp {}
-
-class Cqq {}
-
-class Cqr {}
-
-class Cqs {}
-
-class Cqt {}
-
-class Cqu {}
-
-class Cqv {}
-
-class Cqw {}
-
-class Cqx {}
-
-class Cqy {}
-
-class Cqz {}
-
-class CqA {}
-
-class CqB {}
-
-class CqC {}
-
-class CqD {}
-
-class CqE {}
-
-class CqF {}
-
-class CqG {}
-
-class CqH {}
-
-class CqI {}
-
-class CqJ {}
-
-class CqK {}
-
-class CqL {}
-
-class CqM {}
-
-class CqN {}
-
-class CqO {}
-
-class CqP {}
-
-class CqQ {}
-
-class CqR {}
-
-class CqS {}
-
-class CqT {}
-
-class CqU {}
-
-class CqV {}
-
-class CqW {}
-
-class CqX {}
-
-class CqY {}
-
-class CqZ {}
-
-class Cra {}
-
-class Crb {}
-
-class Crc {}
-
-class Crd {}
-
-class Cre {}
-
-class Crf {}
-
-class Crg {}
-
-class Crh {}
-
-class Cri {}
-
-class Crj {}
-
-class Crk {}
-
-class Crl {}
-
-class Crm {}
-
-class Crn {}
-
-class Cro {}
-
-class Crp {}
-
-class Crq {}
-
-class Crr {}
-
-class Crs {}
-
-class Crt {}
-
-class Cru {}
-
-class Crv {}
-
-class Crw {}
-
-class Crx {}
-
-class Cry {}
-
-class Crz {}
-
-class CrA {}
-
-class CrB {}
-
-class CrC {}
-
-class CrD {}
-
-class CrE {}
-
-class CrF {}
-
-class CrG {}
-
-class CrH {}
-
-class CrI {}
-
-class CrJ {}
-
-class CrK {}
-
-class CrL {}
-
-class CrM {}
-
-class CrN {}
-
-class CrO {}
-
-class CrP {}
-
-class CrQ {}
-
-class CrR {}
-
-class CrS {}
-
-class CrT {}
-
-class CrU {}
-
-class CrV {}
-
-class CrW {}
-
-class CrX {}
-
-class CrY {}
-
-class CrZ {}
-
-class Csa {}
-
-class Csb {}
-
-class Csc {}
-
-class Csd {}
-
-class Cse {}
-
-class Csf {}
-
-class Csg {}
-
-class Csh {}
-
-class Csi {}
-
-class Csj {}
-
-class Csk {}
-
-class Csl {}
-
-class Csm {}
-
-class Csn {}
-
-class Cso {}
-
-class Csp {}
-
-class Csq {}
-
-class Csr {}
-
-class Css {}
-
-class Cst {}
-
-class Csu {}
-
-class Csv {}
-
-class Csw {}
-
-class Csx {}
-
-class Csy {}
-
-class Csz {}
-
-class CsA {}
-
-class CsB {}
-
-class CsC {}
-
-class CsD {}
-
-class CsE {}
-
-class CsF {}
-
-class CsG {}
-
-class CsH {}
-
-class CsI {}
-
-class CsJ {}
-
-class CsK {}
-
-class CsL {}
-
-class CsM {}
-
-class CsN {}
-
-class CsO {}
-
-class CsP {}
-
-class CsQ {}
-
-class CsR {}
-
-class CsS {}
-
-class CsT {}
-
-class CsU {}
-
-class CsV {}
-
-class CsW {}
-
-class CsX {}
-
-class CsY {}
-
-class CsZ {}
-
-class Cta {}
-
-class Ctb {}
-
-class Ctc {}
-
-class Ctd {}
-
-class Cte {}
-
-class Ctf {}
-
-class Ctg {}
-
-class Cth {}
-
-class Cti {}
-
-class Ctj {}
-
-class Ctk {}
-
-class Ctl {}
-
-class Ctm {}
-
-class Ctn {}
-
-class Cto {}
-
-class Ctp {}
-
-class Ctq {}
-
-class Ctr {}
-
-class Cts {}
-
-class Ctt {}
-
-class Ctu {}
-
-class Ctv {}
-
-class Ctw {}
-
-class Ctx {}
-
-class Cty {}
-
-class Ctz {}
-
-class CtA {}
-
-class CtB {}
-
-class CtC {}
-
-class CtD {}
-
-class CtE {}
-
-class CtF {}
-
-class CtG {}
-
-class CtH {}
-
-class CtI {}
-
-class CtJ {}
-
-class CtK {}
-
-class CtL {}
-
-class CtM {}
-
-class CtN {}
-
-class CtO {}
-
-class CtP {}
-
-class CtQ {}
-
-class CtR {}
-
-class CtS {}
-
-class CtT {}
-
-class CtU {}
-
-class CtV {}
-
-class CtW {}
-
-class CtX {}
-
-class CtY {}
-
-class CtZ {}
-
-class Cua {}
-
-class Cub {}
-
-class Cuc {}
-
-class Cud {}
-
-class Cue {}
-
-class Cuf {}
-
-class Cug {}
-
-class Cuh {}
-
-class Cui {}
-
-class Cuj {}
-
-class Cuk {}
-
-class Cul {}
-
-class Cum {}
-
-class Cun {}
-
-class Cuo {}
-
-class Cup {}
-
-class Cuq {}
-
-class Cur {}
-
-class Cus {}
-
-class Cut {}
-
-class Cuu {}
-
-class Cuv {}
-
-class Cuw {}
-
-class Cux {}
-
-class Cuy {}
-
-class Cuz {}
-
-class CuA {}
-
-class CuB {}
-
-class CuC {}
-
-class CuD {}
-
-class CuE {}
-
-class CuF {}
-
-class CuG {}
-
-class CuH {}
-
-class CuI {}
-
-class CuJ {}
-
-class CuK {}
-
-class CuL {}
-
-class CuM {}
-
-class CuN {}
-
-class CuO {}
-
-class CuP {}
-
-class CuQ {}
-
-class CuR {}
-
-class CuS {}
-
-class CuT {}
-
-class CuU {}
-
-class CuV {}
-
-class CuW {}
-
-class CuX {}
-
-class CuY {}
-
-class CuZ {}
-
-class Cva {}
-
-class Cvb {}
-
-class Cvc {}
-
-class Cvd {}
-
-class Cve {}
-
-class Cvf {}
-
-class Cvg {}
-
-class Cvh {}
-
-class Cvi {}
-
-class Cvj {}
-
-class Cvk {}
-
-class Cvl {}
-
-class Cvm {}
-
-class Cvn {}
-
-class Cvo {}
-
-class Cvp {}
-
-class Cvq {}
-
-class Cvr {}
-
-class Cvs {}
-
-class Cvt {}
-
-class Cvu {}
-
-class Cvv {}
-
-class Cvw {}
-
-class Cvx {}
-
-class Cvy {}
-
-class Cvz {}
-
-class CvA {}
-
-class CvB {}
-
-class CvC {}
-
-class CvD {}
-
-class CvE {}
-
-class CvF {}
-
-class CvG {}
-
-class CvH {}
-
-class CvI {}
-
-class CvJ {}
-
-class CvK {}
-
-class CvL {}
-
-class CvM {}
-
-class CvN {}
-
-class CvO {}
-
-class CvP {}
-
-class CvQ {}
-
-class CvR {}
-
-class CvS {}
-
-class CvT {}
-
-class CvU {}
-
-class CvV {}
-
-class CvW {}
-
-class CvX {}
-
-class CvY {}
-
-class CvZ {}
-
-class Cwa {}
-
-class Cwb {}
-
-class Cwc {}
-
-class Cwd {}
-
-class Cwe {}
-
-class Cwf {}
-
-class Cwg {}
-
-class Cwh {}
-
-class Cwi {}
-
-class Cwj {}
-
-class Cwk {}
-
-class Cwl {}
-
-class Cwm {}
-
-class Cwn {}
-
-class Cwo {}
-
-class Cwp {}
-
-class Cwq {}
-
-class Cwr {}
-
-class Cws {}
-
-class Cwt {}
-
-class Cwu {}
-
-class Cwv {}
-
-class Cww {}
-
-class Cwx {}
-
-class Cwy {}
-
-class Cwz {}
-
-class CwA {}
-
-class CwB {}
-
-class CwC {}
-
-class CwD {}
-
-class CwE {}
-
-class CwF {}
-
-class CwG {}
-
-class CwH {}
-
-class CwI {}
-
-class CwJ {}
-
-class CwK {}
-
-class CwL {}
-
-class CwM {}
-
-class CwN {}
-
-class CwO {}
-
-class CwP {}
-
-class CwQ {}
-
-class CwR {}
-
-class CwS {}
-
-class CwT {}
-
-class CwU {}
-
-class CwV {}
-
-class CwW {}
-
-class CwX {}
-
-class CwY {}
-
-class CwZ {}
-
-class Cxa {}
-
-class Cxb {}
-
-class Cxc {}
-
-class Cxd {}
-
-class Cxe {}
-
-class Cxf {}
-
-class Cxg {}
-
-class Cxh {}
-
-class Cxi {}
-
-class Cxj {}
-
-class Cxk {}
-
-class Cxl {}
-
-class Cxm {}
-
-class Cxn {}
-
-class Cxo {}
-
-class Cxp {}
-
-class Cxq {}
-
-class Cxr {}
-
-class Cxs {}
-
-class Cxt {}
-
-class Cxu {}
-
-class Cxv {}
-
-class Cxw {}
-
-class Cxx {}
-
-class Cxy {}
-
-class Cxz {}
-
-class CxA {}
-
-class CxB {}
-
-class CxC {}
-
-class CxD {}
-
-class CxE {}
-
-class CxF {}
-
-class CxG {}
-
-class CxH {}
-
-class CxI {}
-
-class CxJ {}
-
-class CxK {}
-
-class CxL {}
-
-class CxM {}
-
-class CxN {}
-
-class CxO {}
-
-class CxP {}
-
-class CxQ {}
-
-class CxR {}
-
-class CxS {}
-
-class CxT {}
-
-class CxU {}
-
-class CxV {}
-
-class CxW {}
-
-class CxX {}
-
-class CxY {}
-
-class CxZ {}
-
-class Cya {}
-
-class Cyb {}
-
-class Cyc {}
-
-class Cyd {}
-
-class Cye {}
-
-class Cyf {}
-
-class Cyg {}
-
-class Cyh {}
-
-class Cyi {}
-
-class Cyj {}
-
-class Cyk {}
-
-class Cyl {}
-
-class Cym {}
-
-class Cyn {}
-
-class Cyo {}
-
-class Cyp {}
-
-class Cyq {}
-
-class Cyr {}
-
-class Cys {}
-
-class Cyt {}
-
-class Cyu {}
-
-class Cyv {}
-
-class Cyw {}
-
-class Cyx {}
-
-class Cyy {}
-
-class Cyz {}
-
-class CyA {}
-
-class CyB {}
-
-class CyC {}
-
-class CyD {}
-
-class CyE {}
-
-class CyF {}
-
-class CyG {}
-
-class CyH {}
-
-class CyI {}
-
-class CyJ {}
-
-class CyK {}
-
-class CyL {}
-
-class CyM {}
-
-class CyN {}
-
-class CyO {}
-
-class CyP {}
-
-class CyQ {}
-
-class CyR {}
-
-class CyS {}
-
-class CyT {}
-
-class CyU {}
-
-class CyV {}
-
-class CyW {}
-
-class CyX {}
-
-class CyY {}
-
-class CyZ {}
-
-class Cza {}
-
-class Czb {}
-
-class Czc {}
-
-class Czd {}
-
-class Cze {}
-
-class Czf {}
-
-class Czg {}
-
-class Czh {}
-
-class Czi {}
-
-class Czj {}
-
-class Czk {}
-
-class Czl {}
-
-class Czm {}
-
-class Czn {}
-
-class Czo {}
-
-class Czp {}
-
-class Czq {}
-
-class Czr {}
-
-class Czs {}
-
-class Czt {}
-
-class Czu {}
-
-class Czv {}
-
-class Czw {}
-
-class Czx {}
-
-class Czy {}
-
-class Czz {}
-
-class CzA {}
-
-class CzB {}
-
-class CzC {}
-
-class CzD {}
-
-class CzE {}
-
-class CzF {}
-
-class CzG {}
-
-class CzH {}
-
-class CzI {}
-
-class CzJ {}
-
-class CzK {}
-
-class CzL {}
-
-class CzM {}
-
-class CzN {}
-
-class CzO {}
-
-class CzP {}
-
-class CzQ {}
-
-class CzR {}
-
-class CzS {}
-
-class CzT {}
-
-class CzU {}
-
-class CzV {}
-
-class CzW {}
-
-class CzX {}
-
-class CzY {}
-
-class CzZ {}
-
-class CAa {}
-
-class CAb {}
-
-class CAc {}
-
-class CAd {}
-
-class CAe {}
-
-class CAf {}
-
-class CAg {}
-
-class CAh {}
-
-class CAi {}
-
-class CAj {}
-
-class CAk {}
-
-class CAl {}
-
-class CAm {}
-
-class CAn {}
-
-class CAo {}
-
-class CAp {}
-
-class CAq {}
-
-class CAr {}
-
-class CAs {}
-
-class CAt {}
-
-class CAu {}
-
-class CAv {}
-
-class CAw {}
-
-class CAx {}
-
-class CAy {}
-
-class CAz {}
-
-class CAA {}
-
-class CAB {}
-
-class CAC {}
-
-class CAD {}
-
-class CAE {}
-
-class CAF {}
-
-class CAG {}
-
-class CAH {}
-
-class CAI {}
-
-class CAJ {}
-
-class CAK {}
-
-class CAL {}
-
-class CAM {}
-
-class CAN {}
-
-class CAO {}
-
-class CAP {}
-
-class CAQ {}
-
-class CAR {}
-
-class CAS {}
-
-class CAT {}
-
-class CAU {}
-
-class CAV {}
-
-class CAW {}
-
-class CAX {}
-
-class CAY {}
-
-class CAZ {}
-
-class CBa {}
-
-class CBb {}
-
-class CBc {}
-
-class CBd {}
-
-class CBe {}
-
-class CBf {}
-
-class CBg {}
-
-class CBh {}
-
-class CBi {}
-
-class CBj {}
-
-class CBk {}
-
-class CBl {}
-
-class CBm {}
-
-class CBn {}
-
-class CBo {}
-
-class CBp {}
-
-class CBq {}
-
-class CBr {}
-
-class CBs {}
-
-class CBt {}
-
-class CBu {}
-
-class CBv {}
-
-class CBw {}
-
-class CBx {}
-
-class CBy {}
-
-class CBz {}
-
-class CBA {}
-
-class CBB {}
-
-class CBC {}
-
-class CBD {}
-
-class CBE {}
-
-class CBF {}
-
-class CBG {}
-
-class CBH {}
-
-class CBI {}
-
-class CBJ {}
-
-class CBK {}
-
-class CBL {}
-
-class CBM {}
-
-class CBN {}
-
-class CBO {}
-
-class CBP {}
-
-class CBQ {}
-
-class CBR {}
-
-class CBS {}
-
-class CBT {}
-
-class CBU {}
-
-class CBV {}
-
-class CBW {}
-
-class CBX {}
-
-class CBY {}
-
-class CBZ {}
-
-class CCa {}
-
-class CCb {}
-
-class CCc {}
-
-class CCd {}
-
-class CCe {}
-
-class CCf {}
-
-class CCg {}
-
-class CCh {}
-
-class CCi {}
-
-class CCj {}
-
-class CCk {}
-
-class CCl {}
-
-class CCm {}
-
-class CCn {}
-
-class CCo {}
-
-class CCp {}
-
-class CCq {}
-
-class CCr {}
-
-class CCs {}
-
-class CCt {}
-
-class CCu {}
-
-class CCv {}
-
-class CCw {}
-
-class CCx {}
-
-class CCy {}
-
-class CCz {}
-
-class CCA {}
-
-class CCB {}
-
-class CCC {}
-
-class CCD {}
-
-class CCE {}
-
-class CCF {}
-
-class CCG {}
-
-class CCH {}
-
-class CCI {}
-
-class CCJ {}
-
-class CCK {}
-
-class CCL {}
-
-class CCM {}
-
-class CCN {}
-
-class CCO {}
-
-class CCP {}
-
-class CCQ {}
-
-class CCR {}
-
-class CCS {}
-
-class CCT {}
-
-class CCU {}
-
-class CCV {}
-
-class CCW {}
-
-class CCX {}
-
-class CCY {}
-
-class CCZ {}
-
-class CDa {}
-
-class CDb {}
-
-class CDc {}
-
-class CDd {}
-
-class CDe {}
-
-class CDf {}
-
-class CDg {}
-
-class CDh {}
-
-class CDi {}
-
-class CDj {}
-
-class CDk {}
-
-class CDl {}
-
-class CDm {}
-
-class CDn {}
-
-class CDo {}
-
-class CDp {}
-
-class CDq {}
-
-class CDr {}
-
-class CDs {}
-
-class CDt {}
-
-class CDu {}
-
-class CDv {}
-
-class CDw {}
-
-class CDx {}
-
-class CDy {}
-
-class CDz {}
-
-class CDA {}
-
-class CDB {}
-
-class CDC {}
-
-class CDD {}
-
-class CDE {}
-
-class CDF {}
-
-class CDG {}
-
-class CDH {}
-
-class CDI {}
-
-class CDJ {}
-
-class CDK {}
-
-class CDL {}
-
-class CDM {}
-
-class CDN {}
-
-class CDO {}
-
-class CDP {}
-
-class CDQ {}
-
-class CDR {}
-
-class CDS {}
-
-class CDT {}
-
-class CDU {}
-
-class CDV {}
-
-class CDW {}
-
-class CDX {}
-
-class CDY {}
-
-class CDZ {}
-
-class CEa {}
-
-class CEb {}
-
-class CEc {}
-
-class CEd {}
-
-class CEe {}
-
-class CEf {}
-
-class CEg {}
-
-class CEh {}
-
-class CEi {}
-
-class CEj {}
-
-class CEk {}
-
-class CEl {}
-
-class CEm {}
-
-class CEn {}
-
-class CEo {}
-
-class CEp {}
-
-class CEq {}
-
-class CEr {}
-
-class CEs {}
-
-class CEt {}
-
-class CEu {}
-
-class CEv {}
-
-class CEw {}
-
-class CEx {}
-
-class CEy {}
-
-class CEz {}
-
-class CEA {}
-
-class CEB {}
-
-class CEC {}
-
-class CED {}
-
-class CEE {}
-
-class CEF {}
-
-class CEG {}
-
-class CEH {}
-
-class CEI {}
-
-class CEJ {}
-
-class CEK {}
-
-class CEL {}
-
-class CEM {}
-
-class CEN {}
-
-class CEO {}
-
-class CEP {}
-
-class CEQ {}
-
-class CER {}
-
-class CES {}
-
-class CET {}
-
-class CEU {}
-
-class CEV {}
-
-class CEW {}
-
-class CEX {}
-
-class CEY {}
-
-class CEZ {}
-
-class CFa {}
-
-class CFb {}
-
-class CFc {}
-
-class CFd {}
-
-class CFe {}
-
-class CFf {}
-
-class CFg {}
-
-class CFh {}
-
-class CFi {}
-
-class CFj {}
-
-class CFk {}
-
-class CFl {}
-
-class CFm {}
-
-class CFn {}
-
-class CFo {}
-
-class CFp {}
-
-class CFq {}
-
-class CFr {}
-
-class CFs {}
-
-class CFt {}
-
-class CFu {}
-
-class CFv {}
-
-class CFw {}
-
-class CFx {}
-
-class CFy {}
-
-class CFz {}
-
-class CFA {}
-
-class CFB {}
-
-class CFC {}
-
-class CFD {}
-
-class CFE {}
-
-class CFF {}
-
-class CFG {}
-
-class CFH {}
-
-class CFI {}
-
-class CFJ {}
-
-class CFK {}
-
-class CFL {}
-
-class CFM {}
-
-class CFN {}
-
-class CFO {}
-
-class CFP {}
-
-class CFQ {}
-
-class CFR {}
-
-class CFS {}
-
-class CFT {}
-
-class CFU {}
-
-class CFV {}
-
-class CFW {}
-
-class CFX {}
-
-class CFY {}
-
-class CFZ {}
-
-class CGa {}
-
-class CGb {}
-
-class CGc {}
-
-class CGd {}
-
-class CGe {}
-
-class CGf {}
-
-class CGg {}
-
-class CGh {}
-
-class CGi {}
-
-class CGj {}
-
-class CGk {}
-
-class CGl {}
-
-class CGm {}
-
-class CGn {}
-
-class CGo {}
-
-class CGp {}
-
-class CGq {}
-
-class CGr {}
-
-class CGs {}
-
-class CGt {}
-
-class CGu {}
-
-class CGv {}
-
-class CGw {}
-
-class CGx {}
-
-class CGy {}
-
-class CGz {}
-
-class CGA {}
-
-class CGB {}
-
-class CGC {}
-
-class CGD {}
-
-class CGE {}
-
-class CGF {}
-
-class CGG {}
-
-class CGH {}
-
-class CGI {}
-
-class CGJ {}
-
-class CGK {}
-
-class CGL {}
-
-class CGM {}
-
-class CGN {}
-
-class CGO {}
-
-class CGP {}
-
-class CGQ {}
-
-class CGR {}
-
-class CGS {}
-
-class CGT {}
-
-class CGU {}
-
-class CGV {}
-
-class CGW {}
-
-class CGX {}
-
-class CGY {}
-
-class CGZ {}
-
-class CHa {}
-
-class CHb {}
-
-class CHc {}
-
-class CHd {}
-
-class CHe {}
-
-class CHf {}
-
-class CHg {}
-
-class CHh {}
-
-class CHi {}
-
-class CHj {}
-
-class CHk {}
-
-class CHl {}
-
-class CHm {}
-
-class CHn {}
-
-class CHo {}
-
-class CHp {}
-
-class CHq {}
-
-class CHr {}
-
-class CHs {}
-
-class CHt {}
-
-class CHu {}
-
-class CHv {}
-
-class CHw {}
-
-class CHx {}
-
-class CHy {}
-
-class CHz {}
-
-class CHA {}
-
-class CHB {}
-
-class CHC {}
-
-class CHD {}
-
-class CHE {}
-
-class CHF {}
-
-class CHG {}
-
-class CHH {}
-
-class CHI {}
-
-class CHJ {}
-
-class CHK {}
-
-class CHL {}
-
-class CHM {}
-
-class CHN {}
-
-class CHO {}
-
-class CHP {}
-
-class CHQ {}
-
-class CHR {}
-
-class CHS {}
-
-class CHT {}
-
-class CHU {}
-
-class CHV {}
-
-class CHW {}
-
-class CHX {}
-
-class CHY {}
-
-class CHZ {}
-
-class CIa {}
-
-class CIb {}
-
-class CIc {}
-
-class CId {}
-
-class CIe {}
-
-class CIf {}
-
-class CIg {}
-
-class CIh {}
-
-class CIi {}
-
-class CIj {}
-
-class CIk {}
-
-class CIl {}
-
-class CIm {}
-
-class CIn {}
-
-class CIo {}
-
-class CIp {}
-
-class CIq {}
-
-class CIr {}
-
-class CIs {}
-
-class CIt {}
-
-class CIu {}
-
-class CIv {}
-
-class CIw {}
-
-class CIx {}
-
-class CIy {}
-
-class CIz {}
-
-class CIA {}
-
-class CIB {}
-
-class CIC {}
-
-class CID {}
-
-class CIE {}
-
-class CIF {}
-
-class CIG {}
-
-class CIH {}
-
-class CII {}
-
-class CIJ {}
-
-class CIK {}
-
-class CIL {}
-
-class CIM {}
-
-class CIN {}
-
-class CIO {}
-
-class CIP {}
-
-class CIQ {}
-
-class CIR {}
-
-class CIS {}
-
-class CIT {}
-
-class CIU {}
-
-class CIV {}
-
-class CIW {}
-
-class CIX {}
-
-class CIY {}
-
-class CIZ {}
-
-class CJa {}
-
-class CJb {}
-
-class CJc {}
-
-class CJd {}
-
-class CJe {}
-
-class CJf {}
-
-class CJg {}
-
-class CJh {}
-
-class CJi {}
-
-class CJj {}
-
-class CJk {}
-
-class CJl {}
-
-class CJm {}
-
-class CJn {}
-
-class CJo {}
-
-class CJp {}
-
-class CJq {}
-
-class CJr {}
-
-class CJs {}
-
-class CJt {}
-
-class CJu {}
-
-class CJv {}
-
-class CJw {}
-
-class CJx {}
-
-class CJy {}
-
-class CJz {}
-
-class CJA {}
-
-class CJB {}
-
-class CJC {}
-
-class CJD {}
-
-class CJE {}
-
-class CJF {}
-
-class CJG {}
-
-class CJH {}
-
-class CJI {}
-
-class CJJ {}
-
-class CJK {}
-
-class CJL {}
-
-class CJM {}
-
-class CJN {}
-
-class CJO {}
-
-class CJP {}
-
-class CJQ {}
-
-class CJR {}
-
-class CJS {}
-
-class CJT {}
-
-class CJU {}
-
-class CJV {}
-
-class CJW {}
-
-class CJX {}
-
-class CJY {}
-
-class CJZ {}
-
-class CKa {}
-
-class CKb {}
-
-class CKc {}
-
-class CKd {}
-
-class CKe {}
-
-class CKf {}
-
-class CKg {}
-
-class CKh {}
-
-class CKi {}
-
-class CKj {}
-
-class CKk {}
-
-class CKl {}
-
-class CKm {}
-
-class CKn {}
-
-class CKo {}
-
-class CKp {}
-
-class CKq {}
-
-class CKr {}
-
-class CKs {}
-
-class CKt {}
-
-class CKu {}
-
-class CKv {}
-
-class CKw {}
-
-class CKx {}
-
-class CKy {}
-
-class CKz {}
-
-class CKA {}
-
-class CKB {}
-
-class CKC {}
-
-class CKD {}
-
-class CKE {}
-
-class CKF {}
-
-class CKG {}
-
-class CKH {}
-
-class CKI {}
-
-class CKJ {}
-
-class CKK {}
-
-class CKL {}
-
-class CKM {}
-
-class CKN {}
-
-class CKO {}
-
-class CKP {}
-
-class CKQ {}
-
-class CKR {}
-
-class CKS {}
-
-class CKT {}
-
-class CKU {}
-
-class CKV {}
-
-class CKW {}
-
-class CKX {}
-
-class CKY {}
-
-class CKZ {}
-
-class CLa {}
-
-class CLb {}
-
-class CLc {}
-
-class CLd {}
-
-class CLe {}
-
-class CLf {}
-
-class CLg {}
-
-class CLh {}
-
-class CLi {}
-
-class CLj {}
-
-class CLk {}
-
-class CLl {}
-
-class CLm {}
-
-class CLn {}
-
-class CLo {}
-
-class CLp {}
-
-class CLq {}
-
-class CLr {}
-
-class CLs {}
-
-class CLt {}
-
-class CLu {}
-
-class CLv {}
-
-class CLw {}
-
-class CLx {}
-
-class CLy {}
-
-class CLz {}
-
-class CLA {}
-
-class CLB {}
-
-class CLC {}
-
-class CLD {}
-
-class CLE {}
-
-class CLF {}
-
-class CLG {}
-
-class CLH {}
-
-class CLI {}
-
-class CLJ {}
-
-class CLK {}
-
-class CLL {}
-
-class CLM {}
-
-class CLN {}
-
-class CLO {}
-
-class CLP {}
-
-class CLQ {}
-
-class CLR {}
-
-class CLS {}
-
-class CLT {}
-
-class CLU {}
-
-class CLV {}
-
-class CLW {}
-
-class CLX {}
-
-class CLY {}
-
-class CLZ {}
-
-class CMa {}
-
-class CMb {}
-
-class CMc {}
-
-class CMd {}
-
-class CMe {}
-
-class CMf {}
-
-class CMg {}
-
-class CMh {}
-
-class CMi {}
-
-class CMj {}
-
-class CMk {}
-
-class CMl {}
-
-class CMm {}
-
-class CMn {}
-
-class CMo {}
-
-class CMp {}
-
-class CMq {}
-
-class CMr {}
-
-class CMs {}
-
-class CMt {}
-
-class CMu {}
-
-class CMv {}
-
-class CMw {}
-
-class CMx {}
-
-class CMy {}
-
-class CMz {}
-
-class CMA {}
-
-class CMB {}
-
-class CMC {}
-
-class CMD {}
-
-class CME {}
-
-class CMF {}
-
-class CMG {}
-
-class CMH {}
-
-class CMI {}
-
-class CMJ {}
-
-class CMK {}
-
-class CML {}
-
-class CMM {}
-
-class CMN {}
-
-class CMO {}
-
-class CMP {}
-
-class CMQ {}
-
-class CMR {}
-
-class CMS {}
-
-class CMT {}
-
-class CMU {}
-
-class CMV {}
-
-class CMW {}
-
-class CMX {}
-
-class CMY {}
-
-class CMZ {}
-
-class CNa {}
-
-class CNb {}
-
-class CNc {}
-
-class CNd {}
-
-class CNe {}
-
-class CNf {}
-
-class CNg {}
-
-class CNh {}
-
-class CNi {}
-
-class CNj {}
-
-class CNk {}
-
-class CNl {}
-
-class CNm {}
-
-class CNn {}
-
-class CNo {}
-
-class CNp {}
-
-class CNq {}
-
-class CNr {}
-
-class CNs {}
-
-class CNt {}
-
-class CNu {}
-
-class CNv {}
-
-class CNw {}
-
-class CNx {}
-
-class CNy {}
-
-class CNz {}
-
-class CNA {}
-
-class CNB {}
-
-class CNC {}
-
-class CND {}
-
-class CNE {}
-
-class CNF {}
-
-class CNG {}
-
-class CNH {}
-
-class CNI {}
-
-class CNJ {}
-
-class CNK {}
-
-class CNL {}
-
-class CNM {}
-
-class CNN {}
-
-class CNO {}
-
-class CNP {}
-
-class CNQ {}
-
-class CNR {}
-
-class CNS {}
-
-class CNT {}
-
-class CNU {}
-
-class CNV {}
-
-class CNW {}
-
-class CNX {}
-
-class CNY {}
-
-class CNZ {}
-
-class COa {}
-
-class COb {}
-
-class COc {}
-
-class COd {}
-
-class COe {}
-
-class COf {}
-
-class COg {}
-
-class COh {}
-
-class COi {}
-
-class COj {}
-
-class COk {}
-
-class COl {}
-
-class COm {}
-
-class COn {}
-
-class COo {}
-
-class COp {}
-
-class COq {}
-
-class COr {}
-
-class COs {}
-
-class COt {}
-
-class COu {}
-
-class COv {}
-
-class COw {}
-
-class COx {}
-
-class COy {}
-
-class COz {}
-
-class COA {}
-
-class COB {}
-
-class COC {}
-
-class COD {}
-
-class COE {}
-
-class COF {}
-
-class COG {}
-
-class COH {}
-
-class COI {}
-
-class COJ {}
-
-class COK {}
-
-class COL {}
-
-class COM {}
-
-class CON {}
-
-class COO {}
-
-class COP {}
-
-class COQ {}
-
-class COR {}
-
-class COS {}
-
-class COT {}
-
-class COU {}
-
-class COV {}
-
-class COW {}
-
-class COX {}
-
-class COY {}
-
-class COZ {}
-
-class CPa {}
-
-class CPb {}
-
-class CPc {}
-
-class CPd {}
-
-class CPe {}
-
-class CPf {}
-
-class CPg {}
-
-class CPh {}
-
-class CPi {}
-
-class CPj {}
-
-class CPk {}
-
-class CPl {}
-
-class CPm {}
-
-class CPn {}
-
-class CPo {}
-
-class CPp {}
-
-class CPq {}
-
-class CPr {}
-
-class CPs {}
-
-class CPt {}
-
-class CPu {}
-
-class CPv {}
-
-class CPw {}
-
-class CPx {}
-
-class CPy {}
-
-class CPz {}
-
-class CPA {}
-
-class CPB {}
-
-class CPC {}
-
-class CPD {}
-
-class CPE {}
-
-class CPF {}
-
-class CPG {}
-
-class CPH {}
-
-class CPI {}
-
-class CPJ {}
-
-class CPK {}
-
-class CPL {}
-
-class CPM {}
-
-class CPN {}
-
-class CPO {}
-
-class CPP {}
-
-class CPQ {}
-
-class CPR {}
-
-class CPS {}
-
-class CPT {}
-
-class CPU {}
-
-class CPV {}
-
-class CPW {}
-
-class CPX {}
-
-class CPY {}
-
-class CPZ {}
-
-class CQa {}
-
-class CQb {}
-
-class CQc {}
-
-class CQd {}
-
-class CQe {}
-
-class CQf {}
-
-class CQg {}
-
-class CQh {}
-
-class CQi {}
-
-class CQj {}
-
-class CQk {}
-
-class CQl {}
-
-class CQm {}
-
-class CQn {}
-
-class CQo {}
-
-class CQp {}
-
-class CQq {}
-
-class CQr {}
-
-class CQs {}
-
-class CQt {}
-
-class CQu {}
-
-class CQv {}
-
-class CQw {}
-
-class CQx {}
-
-class CQy {}
-
-class CQz {}
-
-class CQA {}
-
-class CQB {}
-
-class CQC {}
-
-class CQD {}
-
-class CQE {}
-
-class CQF {}
-
-class CQG {}
-
-class CQH {}
-
-class CQI {}
-
-class CQJ {}
-
-class CQK {}
-
-class CQL {}
-
-class CQM {}
-
-class CQN {}
-
-class CQO {}
-
-class CQP {}
-
-class CQQ {}
-
-class CQR {}
-
-class CQS {}
-
-class CQT {}
-
-class CQU {}
-
-class CQV {}
-
-class CQW {}
-
-class CQX {}
-
-class CQY {}
-
-class CQZ {}
-
-class CRa {}
-
-class CRb {}
-
-class CRc {}
-
-class CRd {}
-
-class CRe {}
-
-class CRf {}
-
-class CRg {}
-
-class CRh {}
-
-class CRi {}
-
-class CRj {}
-
-class CRk {}
-
-class CRl {}
-
-class CRm {}
-
-class CRn {}
-
-class CRo {}
-
-class CRp {}
-
-class CRq {}
-
-class CRr {}
-
-class CRs {}
-
-class CRt {}
-
-class CRu {}
-
-class CRv {}
-
-class CRw {}
-
-class CRx {}
-
-class CRy {}
-
-class CRz {}
-
-class CRA {}
-
-class CRB {}
-
-class CRC {}
-
-class CRD {}
-
-class CRE {}
-
-class CRF {}
-
-class CRG {}
-
-class CRH {}
-
-class CRI {}
-
-class CRJ {}
-
-class CRK {}
-
-class CRL {}
-
-class CRM {}
-
-class CRN {}
-
-class CRO {}
-
-class CRP {}
-
-class CRQ {}
-
-class CRR {}
-
-class CRS {}
-
-class CRT {}
-
-class CRU {}
-
-class CRV {}
-
-class CRW {}
-
-class CRX {}
-
-class CRY {}
-
-class CRZ {}
-
-class CSa {}
-
-class CSb {}
-
-class CSc {}
-
-class CSd {}
-
-class CSe {}
-
-class CSf {}
-
-class CSg {}
-
-class CSh {}
-
-class CSi {}
-
-class CSj {}
-
-class CSk {}
-
-class CSl {}
-
-class CSm {}
-
-class CSn {}
-
-class CSo {}
-
-class CSp {}
-
-class CSq {}
-
-class CSr {}
-
-class CSs {}
-
-class CSt {}
-
-class CSu {}
-
-class CSv {}
-
-class CSw {}
-
-class CSx {}
-
-class CSy {}
-
-class CSz {}
-
-class CSA {}
-
-class CSB {}
-
-class CSC {}
-
-class CSD {}
-
-class CSE {}
-
-class CSF {}
-
-class CSG {}
-
-class CSH {}
-
-class CSI {}
-
-class CSJ {}
-
-class CSK {}
-
-class CSL {}
-
-class CSM {}
-
-class CSN {}
-
-class CSO {}
-
-class CSP {}
-
-class CSQ {}
-
-class CSR {}
-
-class CSS {}
-
-class CST {}
-
-class CSU {}
-
-class CSV {}
-
-class CSW {}
-
-class CSX {}
-
-class CSY {}
-
-class CSZ {}
-
-class CTa {}
-
-class CTb {}
-
-class CTc {}
-
-class CTd {}
-
-class CTe {}
-
-class CTf {}
-
-class CTg {}
-
-class CTh {}
-
-class CTi {}
-
-class CTj {}
-
-class CTk {}
-
-class CTl {}
-
-class CTm {}
-
-class CTn {}
-
-class CTo {}
-
-class CTp {}
-
-class CTq {}
-
-class CTr {}
-
-class CTs {}
-
-class CTt {}
-
-class CTu {}
-
-class CTv {}
-
-class CTw {}
-
-class CTx {}
-
-class CTy {}
-
-class CTz {}
-
-class CTA {}
-
-class CTB {}
-
-class CTC {}
-
-class CTD {}
-
-class CTE {}
-
-class CTF {}
-
-class CTG {}
-
-class CTH {}
-
-class CTI {}
-
-class CTJ {}
-
-class CTK {}
-
-class CTL {}
-
-class CTM {}
-
-class CTN {}
-
-class CTO {}
-
-class CTP {}
-
-class CTQ {}
-
-class CTR {}
-
-class CTS {}
-
-class CTT {}
-
-class CTU {}
-
-class CTV {}
-
-class CTW {}
-
-class CTX {}
-
-class CTY {}
-
-class CTZ {}
-
-class CUa {}
-
-class CUb {}
-
-class CUc {}
-
-class CUd {}
-
-class CUe {}
-
-class CUf {}
-
-class CUg {}
-
-class CUh {}
-
-class CUi {}
-
-class CUj {}
-
-class CUk {}
-
-class CUl {}
-
-class CUm {}
-
-class CUn {}
-
-class CUo {}
-
-class CUp {}
-
-class CUq {}
-
-class CUr {}
-
-class CUs {}
-
-class CUt {}
-
-class CUu {}
-
-class CUv {}
-
-class CUw {}
-
-class CUx {}
-
-class CUy {}
-
-class CUz {}
-
-class CUA {}
-
-class CUB {}
-
-class CUC {}
-
-class CUD {}
-
-class CUE {}
-
-class CUF {}
-
-class CUG {}
-
-class CUH {}
-
-class CUI {}
-
-class CUJ {}
-
-class CUK {}
-
-class CUL {}
-
-class CUM {}
-
-class CUN {}
-
-class CUO {}
-
-class CUP {}
-
-class CUQ {}
-
-class CUR {}
-
-class CUS {}
-
-class CUT {}
-
-class CUU {}
-
-class CUV {}
-
-class CUW {}
-
-class CUX {}
-
-class CUY {}
-
-class CUZ {}
-
-class CVa {}
-
-class CVb {}
-
-class CVc {}
-
-class CVd {}
-
-class CVe {}
-
-class CVf {}
-
-class CVg {}
-
-class CVh {}
-
-class CVi {}
-
-class CVj {}
-
-class CVk {}
-
-class CVl {}
-
-class CVm {}
-
-class CVn {}
-
-class CVo {}
-
-class CVp {}
-
-class CVq {}
-
-class CVr {}
-
-class CVs {}
-
-class CVt {}
-
-class CVu {}
-
-class CVv {}
-
-class CVw {}
-
-class CVx {}
-
-class CVy {}
-
-class CVz {}
-
-class CVA {}
-
-class CVB {}
-
-class CVC {}
-
-class CVD {}
-
-class CVE {}
-
-class CVF {}
-
-class CVG {}
-
-class CVH {}
-
-class CVI {}
-
-class CVJ {}
-
-class CVK {}
-
-class CVL {}
-
-class CVM {}
-
-class CVN {}
-
-class CVO {}
-
-class CVP {}
-
-class CVQ {}
-
-class CVR {}
-
-class CVS {}
-
-class CVT {}
-
-class CVU {}
-
-class CVV {}
-
-class CVW {}
-
-class CVX {}
-
-class CVY {}
-
-class CVZ {}
-
-class CWa {}
-
-class CWb {}
-
-class CWc {}
-
-class CWd {}
-
-class CWe {}
-
-class CWf {}
-
-class CWg {}
-
-class CWh {}
-
-class CWi {}
-
-class CWj {}
-
-class CWk {}
-
-class CWl {}
-
-class CWm {}
-
-class CWn {}
-
-class CWo {}
-
-class CWp {}
-
-class CWq {}
-
-class CWr {}
-
-class CWs {}
-
-class CWt {}
-
-class CWu {}
-
-class CWv {}
-
-class CWw {}
-
-class CWx {}
-
-class CWy {}
-
-class CWz {}
-
-class CWA {}
-
-class CWB {}
-
-class CWC {}
-
-class CWD {}
-
-class CWE {}
-
-class CWF {}
-
-class CWG {}
-
-class CWH {}
-
-class CWI {}
-
-class CWJ {}
-
-class CWK {}
-
-class CWL {}
-
-class CWM {}
-
-class CWN {}
-
-class CWO {}
-
-class CWP {}
-
-class CWQ {}
-
-class CWR {}
-
-class CWS {}
-
-class CWT {}
-
-class CWU {}
-
-class CWV {}
-
-class CWW {}
-
-class CWX {}
-
-class CWY {}
-
-class CWZ {}
-
-class CXa {}
-
-class CXb {}
-
-class CXc {}
-
-class CXd {}
-
-class CXe {}
-
-class CXf {}
-
-class CXg {}
-
-class CXh {}
-
-class CXi {}
-
-class CXj {}
-
-class CXk {}
-
-class CXl {}
-
-class CXm {}
-
-class CXn {}
-
-class CXo {}
-
-class CXp {}
-
-class CXq {}
-
-class CXr {}
-
-class CXs {}
-
-class CXt {}
-
-class CXu {}
-
-class CXv {}
-
-class CXw {}
-
-class CXx {}
-
-class CXy {}
-
-class CXz {}
-
-class CXA {}
-
-class CXB {}
-
-class CXC {}
-
-class CXD {}
-
-class CXE {}
-
-class CXF {}
-
-class CXG {}
-
-class CXH {}
-
-class CXI {}
-
-class CXJ {}
-
-class CXK {}
-
-class CXL {}
-
-class CXM {}
-
-class CXN {}
-
-class CXO {}
-
-class CXP {}
-
-class CXQ {}
-
-class CXR {}
-
-class CXS {}
-
-class CXT {}
-
-class CXU {}
-
-class CXV {}
-
-class CXW {}
-
-class CXX {}
-
-class CXY {}
-
-class CXZ {}
-
-class CYa {}
-
-class CYb {}
-
-class CYc {}
-
-class CYd {}
-
-class CYe {}
-
-class CYf {}
-
-class CYg {}
-
-class CYh {}
-
-class CYi {}
-
-class CYj {}
-
-class CYk {}
-
-class CYl {}
-
-class CYm {}
-
-class CYn {}
-
-class CYo {}
-
-class CYp {}
-
-class CYq {}
-
-class CYr {}
-
-class CYs {}
-
-class CYt {}
-
-class CYu {}
-
-class CYv {}
-
-class CYw {}
-
-class CYx {}
-
-class CYy {}
-
-class CYz {}
-
-class CYA {}
-
-class CYB {}
-
-class CYC {}
-
-class CYD {}
-
-class CYE {}
-
-class CYF {}
-
-class CYG {}
-
-class CYH {}
-
-class CYI {}
-
-class CYJ {}
-
-class CYK {}
-
-class CYL {}
-
-class CYM {}
-
-class CYN {}
-
-class CYO {}
-
-class CYP {}
-
-class CYQ {}
-
-class CYR {}
-
-class CYS {}
-
-class CYT {}
-
-class CYU {}
-
-class CYV {}
-
-class CYW {}
-
-class CYX {}
-
-class CYY {}
-
-class CYZ {}
-
-class CZa {}
-
-class CZb {}
-
-class CZc {}
-
-class CZd {}
-
-class CZe {}
-
-class CZf {}
-
-class CZg {}
-
-class CZh {}
-
-class CZi {}
-
-class CZj {}
-
-class CZk {}
-
-class CZl {}
-
-class CZm {}
-
-class CZn {}
-
-class CZo {}
-
-class CZp {}
-
-class CZq {}
-
-class CZr {}
-
-class CZs {}
-
-class CZt {}
-
-class CZu {}
-
-class CZv {}
-
-class CZw {}
-
-class CZx {}
-
-class CZy {}
-
-class CZz {}
-
-class CZA {}
-
-class CZB {}
-
-class CZC {}
-
-class CZD {}
-
-class CZE {}
-
-class CZF {}
-
-class CZG {}
-
-class CZH {}
-
-class CZI {}
-
-class CZJ {}
-
-class CZK {}
-
-class CZL {}
-
-class CZM {}
-
-class CZN {}
-
-class CZO {}
-
-class CZP {}
-
-class CZQ {}
-
-class CZR {}
-
-class CZS {}
-
-class CZT {}
-
-class CZU {}
-
-class CZV {}
-
-class CZW {}
-
-class CZX {}
-
-class CZY {}
-
-class CZZ {}
diff --git a/tests/language_strong/closure2_test.dart b/tests/language_strong/closure2_test.dart
deleted file mode 100644
index bf3cf01..0000000
--- a/tests/language_strong/closure2_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for closures.
-
-import "package:expect/expect.dart";
-
-bounce(fn) {
-  return fn();
-}
-
-demo(s) {
-  var i, a = bounce(() => s);
-  return a;
-}
-
-main() {
-  Expect.equals("Bounce!", demo("Bounce!"));
-}
diff --git a/tests/language_strong/closure3_test.dart b/tests/language_strong/closure3_test.dart
deleted file mode 100644
index f8053c4..0000000
--- a/tests/language_strong/closure3_test.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test that a NoSuchMethodError is thrown even when an expression
-// seems to be free of side-effects.
-
-test(x, y) {
-  (() {
-    x - y;
-  })();
-}
-
-main() {
-  Expect.throws(() {
-    test(null, 2);
-  }, (e) => e is NoSuchMethodError);
-}
diff --git a/tests/language_strong/closure4_test.dart b/tests/language_strong/closure4_test.dart
deleted file mode 100644
index 5445b7d..0000000
--- a/tests/language_strong/closure4_test.dart
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Dart2js failed when a declared function was captured inside itself.
-
-foo(f) => f(499);
-
-main() {
-  fun(x) {
-    if (x < 3) {
-      return foo((x) => fun(x));
-    } else {
-      return x;
-    }
-  }
-
-  Expect.equals(499, fun(499));
-}
diff --git a/tests/language_strong/closure5_test.dart b/tests/language_strong/closure5_test.dart
deleted file mode 100644
index bf698b6..0000000
--- a/tests/language_strong/closure5_test.dart
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Dart2js failed when a declared function was captured inside itself.
-
-foo(f) => f(499);
-
-main() {
-  fun(x) {
-    if (x < 3) {
-      return foo((x) => fun(x));
-    } else {
-      return x;
-    }
-  }
-
-  Expect.equals(499, foo((x) => fun(x)));
-}
diff --git a/tests/language_strong/closure6_test.dart b/tests/language_strong/closure6_test.dart
deleted file mode 100644
index ea37454..0000000
--- a/tests/language_strong/closure6_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test that captured final variables are correctly mangled.
-
-class A {
-  foo() {
-    length() => 400;
-    final box_0 = 28;
-    var x = 29;
-    var f = () => length() + box_0 + x + bar();
-    return f();
-  }
-
-  bar() => 42;
-}
-
-main() {
-  Expect.equals(499, new A().foo());
-}
diff --git a/tests/language_strong/closure7_test.dart b/tests/language_strong/closure7_test.dart
deleted file mode 100644
index 91b8f7b..0000000
--- a/tests/language_strong/closure7_test.dart
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test that implicitly bound closures work correctly
-
-class A {
-  foo() => 499;
-  fooo() => 4999; // Implicit closure class can be shared with foo.
-  bar(x, {y: 8, z: 10}) => "1 $x $y $z";
-  gee(x, {y: 9, z: 11}) => "2 $x $y $z"; // Must not be shared with "bar".
-  toto(x, {y: 8, z: 10}) => "3 $x $y $z"; // Could be shared with "bar".
-
-  fisk(x, {y: 8, zz: 10}) => "4 $x $y $zz";
-  titi(x, {y: 8, zz: 77}) => "5 $x $y $zz"; // Could be shared with "fisk",
-  // because default-val is never used.
-}
-
-class B {
-  // All implicit closures of B can be shared with their equivalent functions
-  // of A.
-  foo() => 4990;
-  fooo() => 49990;
-  bar(x, {y: 8, z: 10}) => "1B $x $y $z";
-  gee(x, {y: 9, z: 11}) => "2B $x $y $z";
-  toto(x, {y: 8, z: 10}) => "3B $x $y $z";
-  fisk(x, {y: 8, zz: 10}) => "4B $x $y $zz";
-  titi(x, {y: 8, zz: 77}) => "5B $x $y $zz";
-}
-
-tearOffFoo(o) => o.foo;
-tearOffFooo(o) => o.fooo;
-tearOffBar(o) => o.bar;
-tearOffGee(o) => o.gee;
-tearOffToto(o) => o.toto;
-tearOffFisk(o) => o.fisk;
-tearOffTiti(o) => o.titi;
-
-main() {
-  var a = new A();
-  var b = new B();
-  Expect.equals(499, tearOffFoo(a)());
-  Expect.equals(4990, tearOffFoo(b)());
-  Expect.equals(4999, tearOffFooo(a)());
-  Expect.equals(49990, tearOffFooo(b)());
-
-  var barA = tearOffBar(a);
-  var barB = tearOffBar(b);
-  var geeA = tearOffGee(a);
-  var geeB = tearOffGee(b);
-  var totoA = tearOffToto(a);
-  var totoB = tearOffToto(b);
-  Expect.equals("1 33 8 10", barA(33));
-  Expect.equals("1B 33 8 10", barB(33));
-  Expect.equals("2 33 9 11", geeA(33));
-  Expect.equals("2B 33 9 11", geeB(33));
-  Expect.equals("3 33 8 10", totoA(33));
-  Expect.equals("3B 33 8 10", totoB(33));
-
-  Expect.equals("1 35 8 10", barA(35));
-  Expect.equals("1B 35 8 10", barB(35));
-  Expect.equals("2 35 9 11", geeA(35));
-  Expect.equals("2B 35 9 11", geeB(35));
-  Expect.equals("3 35 8 10", totoA(35));
-  Expect.equals("3B 35 8 10", totoB(35));
-
-  Expect.equals("1 35 8 77", barA(35, z: 77));
-  Expect.equals("1B 35 8 77", barB(35, z: 77));
-  Expect.equals("2 35 9 77", geeA(35, z: 77));
-  Expect.equals("2B 35 9 77", geeB(35, z: 77));
-  Expect.equals("3 35 8 77", totoA(35, z: 77));
-  Expect.equals("3B 35 8 77", totoB(35, z: 77));
-
-  Expect.equals("1 35 8 77", barA(35, z: 77));
-  Expect.equals("1B 35 8 77", barB(35, z: 77));
-  Expect.equals("2 35 9 77", geeA(35, z: 77));
-  Expect.equals("2B 35 9 77", geeB(35, z: 77));
-  Expect.equals("3 35 8 77", totoA(35, z: 77));
-  Expect.equals("3B 35 8 77", totoB(35, z: 77));
-
-  var fiskA = tearOffFisk(a);
-  var fiskB = tearOffFisk(b);
-  var titiA = tearOffTiti(a);
-  var titiB = tearOffTiti(b);
-
-  Expect.equals("4 311 8 987", fiskA(311, zz: 987));
-  Expect.equals("4B 311 8 987", fiskB(311, zz: 987));
-  Expect.equals("5 311 8 987", titiA(311, zz: 987));
-  Expect.equals("5B 311 8 987", titiB(311, zz: 987));
-
-  Expect.equals("4 311 765 987", fiskA(311, y: 765, zz: 987));
-  Expect.equals("4B 311 765 987", fiskB(311, y: 765, zz: 987));
-  Expect.equals("5 311 765 987", titiA(311, y: 765, zz: 987));
-  Expect.equals("5B 311 765 987", titiB(311, y: 765, zz: 987));
-}
diff --git a/tests/language_strong/closure8_test.dart b/tests/language_strong/closure8_test.dart
deleted file mode 100644
index 211c722..0000000
--- a/tests/language_strong/closure8_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Regression test for issue 6353.
-
-class A<E> {}
-
-class C<E> extends A<E> {
-  forEach(callback(E element)) {}
-}
-
-class D<E> {
-  lala(E element) {}
-}
-
-main() {
-  var c = new C<int>();
-  c.forEach(new D<int>().lala);
-}
diff --git a/tests/language_strong/closure_break1_test.dart b/tests/language_strong/closure_break1_test.dart
deleted file mode 100644
index 8522fae..0000000
--- a/tests/language_strong/closure_break1_test.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for closures.
-
-import "package:expect/expect.dart";
-
-class ClosureBreak1 {
-  ClosureBreak1(this.field);
-  int field;
-}
-
-class ClosureBreak1Test {
-  static testMain() {
-    var o1 = new ClosureBreak1(3);
-    String newstr = "abcdefgh";
-    foo() {
-      o1.field++;
-      Expect.equals(8, newstr.length);
-    }
-
-    bool loop = true;
-    L:
-    while (loop) {
-      String newstr1 = "abcd";
-      var o2 = new ClosureBreak1(3);
-      foo1() {
-        o2.field++;
-        Expect.equals(4, newstr1.length);
-      }
-
-      Expect.equals(4, newstr1.length);
-      while (loop) {
-        int newint = 0;
-        var o3 = new ClosureBreak1(3);
-        foo2() {
-          o3.field++;
-          Expect.equals(0, newint);
-        }
-
-        foo2();
-        break L;
-      }
-    }
-    foo();
-    Expect.equals(4, o1.field);
-  }
-}
-
-main() {
-  ClosureBreak1Test.testMain();
-}
diff --git a/tests/language_strong/closure_break2_test.dart b/tests/language_strong/closure_break2_test.dart
deleted file mode 100644
index 5742620..0000000
--- a/tests/language_strong/closure_break2_test.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for closures.
-
-import "package:expect/expect.dart";
-
-class ClosureBreak2 {
-  ClosureBreak2(this.field);
-  int field;
-}
-
-class ClosureBreak2Test {
-  static testMain() {
-    var o1 = new ClosureBreak2(3);
-    String newstr = "abcdefgh";
-    foo() {
-      o1.field++;
-      Expect.equals(8, newstr.length);
-    }
-
-    bool loop = true;
-    L:
-    while (loop) {
-      String newstr1 = "abcd";
-      Expect.equals(4, newstr1.length);
-      while (loop) {
-        int newint = 0;
-        Expect.equals(4, newstr1.length);
-        break L;
-      }
-    }
-    foo();
-    Expect.equals(4, o1.field);
-  }
-}
-
-main() {
-  ClosureBreak2Test.testMain();
-}
diff --git a/tests/language_strong/closure_break_test.dart b/tests/language_strong/closure_break_test.dart
deleted file mode 100644
index ae99035..0000000
--- a/tests/language_strong/closure_break_test.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for closures.
-
-import "package:expect/expect.dart";
-
-class ClosureBreak {
-  ClosureBreak(this.field);
-  int field;
-}
-
-class ClosureBreakTest {
-  static testMain() {
-    var o1 = new ClosureBreak(3);
-    String newstr = "abcdefgh";
-    foo() {
-      o1.field++;
-      Expect.equals(8, newstr.length);
-    }
-
-    bool loop = true;
-    L1:
-    while (loop) {
-      String newstr1 = "abcd";
-      var o2 = new ClosureBreak(3);
-      foo1() {
-        o2.field++;
-        Expect.equals(4, newstr1.length);
-      }
-
-      Expect.equals(4, newstr1.length);
-      L2:
-      while (loop) {
-        int newint = 0;
-        var o3 = new ClosureBreak(3);
-        foo2() {
-          o3.field++;
-          Expect.equals(0, newint);
-        }
-
-        foo2();
-        break L2;
-      }
-      foo1();
-      Expect.equals(4, newstr1.length);
-      break L1;
-    }
-    foo();
-    Expect.equals(4, o1.field);
-  }
-}
-
-main() {
-  ClosureBreakTest.testMain();
-}
diff --git a/tests/language_strong/closure_call_wrong_argument_count_negative_test.dart b/tests/language_strong/closure_call_wrong_argument_count_negative_test.dart
deleted file mode 100644
index fe1c77c..0000000
--- a/tests/language_strong/closure_call_wrong_argument_count_negative_test.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Test mismatch in argument counts.
-
-class ClosureCallWrongArgumentCountNegativeTest {
-  static int melke(var f) {
-    return f(1, 2, 3);
-  }
-
-  static void testMain() {
-    kuh(int a, int b) {
-      return a + b;
-    }
-
-    melke(kuh);
-  }
-}
-
-main() {
-  ClosureCallWrongArgumentCountNegativeTest.testMain();
-}
diff --git a/tests/language_strong/closure_cycles_test.dart b/tests/language_strong/closure_cycles_test.dart
deleted file mode 100644
index e66a391..0000000
--- a/tests/language_strong/closure_cycles_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Based on dartbug.com/7681
-// Verify that context chains do not lead to unintended memory being held.
-
-library closure_cycles_test;
-
-import "dart:async";
-
-class X {
-  Function onX;
-  X() {
-    Timer.run(() => onX(new Y()));
-  }
-}
-
-class Y {
-  Function onY;
-  var heavyMemory;
-  static var count = 0;
-  Y() {
-    // Consume large amounts of memory per iteration to fail/succeed quicker.
-    heavyMemory = new List(10 * 1024 * 1024);
-    // Terminate the test if we allocated enough memory without running out.
-    if (count++ > 100) return;
-    Timer.run(() => onY());
-  }
-}
-
-void doIt() {
-  var x = new X();
-  x.onX = (y) {
-    y.onY = () {
-      y; // Capturing y can lead to endless context chains!
-      doIt();
-    };
-  };
-}
-
-void main() {
-  doIt();
-}
diff --git a/tests/language_strong/closure_in_constructor_test.dart b/tests/language_strong/closure_in_constructor_test.dart
deleted file mode 100644
index 66ee970..0000000
--- a/tests/language_strong/closure_in_constructor_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-class A<T> {
-  var closure;
-
-  factory A.factory() => new A(() => new List<T>());
-
-  A([this.closure]) {
-    if (closure == null) {
-      closure = () => new List<T>();
-    }
-  }
-}
-
-main() {
-  Expect.isTrue((new A.factory()).closure() is List);
-  Expect.isTrue((new A()).closure() is List);
-  Expect.isTrue((new A<int>.factory()).closure() is List<int>);
-  Expect.isTrue((new A<int>()).closure() is List<int>);
-  Expect.isFalse((new A<int>.factory()).closure() is List<String>);
-  Expect.isFalse((new A<int>()).closure() is List<String>);
-}
diff --git a/tests/language_strong/closure_in_initializer2_test.dart b/tests/language_strong/closure_in_initializer2_test.dart
deleted file mode 100644
index a782c64..0000000
--- a/tests/language_strong/closure_in_initializer2_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test that a parameter used in a closure is properly boxed.
-
-import "package:expect/expect.dart";
-
-abstract class S {
-  S() {
-    Expect.equals(2, this.f());
-  }
-
-  get f;
-}
-
-class A extends S {
-  var f;
-  A(a) : f = (() => ++a) {
-    Expect.equals(a, 2);
-  }
-}
-
-main() {
-  var a = new A(1);
-  Expect.equals(a.f(), 3);
-}
diff --git a/tests/language_strong/closure_in_initializer_test.dart b/tests/language_strong/closure_in_initializer_test.dart
deleted file mode 100644
index aad2e5e..0000000
--- a/tests/language_strong/closure_in_initializer_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test that a parameter used in two different closures defined in a
-// constructor initializer, is properly boxed.
-
-import "package:expect/expect.dart";
-
-class A {
-  var f;
-  var g;
-  A(a)
-      : f = (() => 42 + a),
-        g = (() => ++a) {
-    a = 4;
-  }
-}
-
-class B extends A {
-  B() : super(42);
-}
-
-class C extends A {
-  var h;
-  C(a)
-      : super(42),
-        h = (() => ++a);
-}
-
-main() {
-  var a = new A(1);
-  Expect.equals(46, a.f());
-  Expect.equals(5, a.g());
-  Expect.equals(47, a.f());
-
-  a = new B();
-  Expect.equals(46, a.f());
-  Expect.equals(5, a.g());
-  Expect.equals(47, a.f());
-
-  a = new C(0);
-  Expect.equals(46, a.f());
-  Expect.equals(5, a.g());
-  Expect.equals(47, a.f());
-  Expect.equals(1, a.h());
-  Expect.equals(2, a.h());
-  Expect.equals(47, a.f());
-  Expect.equals(6, a.g());
-  Expect.equals(48, a.f());
-}
diff --git a/tests/language_strong/closure_internals_test.dart b/tests/language_strong/closure_internals_test.dart
deleted file mode 100644
index 587be33..0000000
--- a/tests/language_strong/closure_internals_test.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart";
-
-class C {
-  foo() => 123;
-}
-
-main() {
-  var f = new C().foo;
-  Expect.throws(() => f.target, (e) => e is NoSuchMethodError);
-  Expect.throws(() => f.self, (e) => e is NoSuchMethodError);
-  Expect.throws(() => f.receiver, (e) => e is NoSuchMethodError);
-}
diff --git a/tests/language_strong/closure_parameter_types_test.dart b/tests/language_strong/closure_parameter_types_test.dart
deleted file mode 100644
index 3fa1521..0000000
--- a/tests/language_strong/closure_parameter_types_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Regression test for dart2js, where the optimizer was too aggressive
-// about parameter types of closures.
-
-class A {
-  Function f;
-  A(this.f);
-  _do() => f(1);
-}
-
-main() {
-  int invokeCount = 0;
-  closure(a) {
-    if (invokeCount++ == 1) {
-      Expect.isTrue(a is int);
-    }
-  }
-
-  closure('s');
-  new A(closure)._do();
-  Expect.equals(2, invokeCount);
-}
diff --git a/tests/language_strong/closure_self_reference_test.dart b/tests/language_strong/closure_self_reference_test.dart
deleted file mode 100644
index a47b1bf..0000000
--- a/tests/language_strong/closure_self_reference_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2014, 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:expect/expect.dart';
-
-// Tests a self-reference of a closure inside a try/catch.
-// Dart2js must not try to box the closure-reference.
-
-main() {
-  var counter = 0;
-  inner(value) {
-    if (value == 0) return 0;
-    try {
-      return inner(value - 1);
-    } finally {
-      counter++;
-    }
-  }
-
-  Expect.equals(0, inner(199));
-  Expect.equals(199, counter);
-}
diff --git a/tests/language_strong/closure_shared_state_test.dart b/tests/language_strong/closure_shared_state_test.dart
deleted file mode 100644
index 85c9908..0000000
--- a/tests/language_strong/closure_shared_state_test.dart
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-
-// Tests for closures sharing mutable bindings.
-
-var f;
-var g;
-
-setupPlain() {
-  int j = 1000;
-  // Two closures sharing variable 'j'; j initially is 1000.
-  f = (int x) {
-    var q = j;
-    j = x;
-    return q;
-  };
-  g = (int x) {
-    var q = j;
-    j = x;
-    return q;
-  };
-}
-
-setupLoop() {
-  for (int i = 0; i < 2; i++) {
-    int j = i * 1000; // The last stored closure has j initially 1000.
-    // Two closures sharing variable 'j'.
-    f = (int x) {
-      var q = j;
-      j = x;
-      return q;
-    };
-    g = (int x) {
-      var q = j;
-      j = x;
-      return q;
-    };
-  }
-}
-
-setupNestedLoop() {
-  for (int outer = 0; outer < 2; outer++) {
-    int j = outer * 1000;
-    for (int i = 0; i < 2; i++) {
-      // Two closures sharing variable 'j' in a loop at different nesting.
-      f = (int x) {
-        var q = j;
-        j = x;
-        return q;
-      };
-      g = (int x) {
-        var q = j;
-        j = x;
-        return q;
-      };
-    }
-  }
-}
-
-test(setup) {
-  setup();
-  Expect.equals(1000, f(100));
-  Expect.equals(100, f(200));
-  Expect.equals(200, f(300));
-  Expect.equals(300, g(400));
-  Expect.equals(400, g(500));
-}
-
-main() {
-  test(setupPlain);
-  test(setupLoop);
-  test(setupNestedLoop);
-}
diff --git a/tests/language_strong/closure_side_effect_test.dart b/tests/language_strong/closure_side_effect_test.dart
deleted file mode 100644
index 95fb941..0000000
--- a/tests/language_strong/closure_side_effect_test.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2013, 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:expect/expect.dart";
-
-var b;
-var a = () {
-  b = 42;
-};
-
-var c = [new C()];
-
-class C {
-  nonInlinable1() {
-    a();
-  }
-
-  nonInlinable2() {
-    var a = () {
-      b = 42;
-    };
-    a();
-  }
-}
-
-testClosureInStaticField() {
-  var temp = c[0];
-  Expect.isNull(b);
-  temp.nonInlinable1();
-  Expect.equals(42, b);
-  b = null;
-}
-
-testLocalClosure() {
-  var temp = c[0];
-  Expect.isNull(b);
-  temp.nonInlinable2();
-  Expect.equals(42, b);
-}
-
-main() {
-  testClosureInStaticField();
-  testLocalClosure();
-}
diff --git a/tests/language_strong/closure_test.dart b/tests/language_strong/closure_test.dart
deleted file mode 100644
index 9dc3a90..0000000
--- a/tests/language_strong/closure_test.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for closures.
-
-import "package:expect/expect.dart";
-
-class A {
-  var field;
-  A(this.field) {}
-}
-
-class ClosureTest {
-  static testMain() {
-    var o = new A(3);
-    foo() => o.field++;
-    Expect.equals(3, foo());
-    Expect.equals(4, o.field);
-  }
-}
-
-main() {
-  ClosureTest.testMain();
-}
diff --git a/tests/language_strong/closure_type_test.dart b/tests/language_strong/closure_type_test.dart
deleted file mode 100644
index 09d6c97..0000000
--- a/tests/language_strong/closure_type_test.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Dart test for a closure result type test that cannot be eliminated at compile
-// time.
-
-library closure_type_test;
-
-import "package:expect/expect.dart";
-import 'dart:math' as math;
-
-class Math {
-  static
-  int // //# 01: static type warning
-      sqrt(x) => math.sqrt(x);
-}
-
-isCheckedMode() {
-  try {
-    var i = 1;
-    String s = i;
-    return false;
-  } catch (e) {
-    return true;
-  }
-}
-
-void test(int func(int value), int value) {
-  bool got_type_error = false;
-  try {
-    // Because of function subtyping rules, the static return type of a closure
-    // call cannot be relied upon for static type analysis. For example, a
-    // function returning dynamic (function 'root') can be assigned to a closure
-    // variable declared to return int (closure 'func') and may actually return
-    // a double at run-time.
-    // Therefore, eliminating the run-time type check would be wrong.
-    int x = func(value);
-    Expect.equals(value, x * x);
-  } on TypeError catch (error) {
-    got_type_error = true;
-  }
-  // Type error expected in checked mode only.
-  Expect.isTrue(got_type_error == isCheckedMode());
-}
-
-root(x) => Math.sqrt(x);
-
-main() => test(root, 4);
diff --git a/tests/language_strong/closure_type_variable_test.dart b/tests/language_strong/closure_type_variable_test.dart
deleted file mode 100644
index 2ed61c2..0000000
--- a/tests/language_strong/closure_type_variable_test.dart
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test that the type argument is available inside a closure.
-
-import "package:expect/expect.dart";
-
-class A<T> {
-  foo() {
-    bar() => T;
-    return bar();
-  }
-}
-
-main() {
-  Expect.equals(new A<int>().foo(), int);
-}
diff --git a/tests/language_strong/closure_type_variables_test.dart b/tests/language_strong/closure_type_variables_test.dart
deleted file mode 100644
index 9c39a70..0000000
--- a/tests/language_strong/closure_type_variables_test.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test that type variables are available in closures.
-
-class A<T> {
-  A();
-
-  A.bar() {
-    g() {
-      new A<T>();
-    }
-
-    g();
-  }
-
-  foo() {
-    g() {
-      return new A<T>();
-    }
-
-    return g();
-  }
-}
-
-main() {
-  Expect.isTrue(new A<int>().foo() is A<int>);
-  Expect.isTrue(new A<int>.bar().foo() is A<int>);
-}
diff --git a/tests/language_strong/closure_variable_shadow_test.dart b/tests/language_strong/closure_variable_shadow_test.dart
deleted file mode 100644
index 4b1edb4..0000000
--- a/tests/language_strong/closure_variable_shadow_test.dart
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2014, 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:expect/expect.dart";
-
-// The intermediate variable 'y' must either be preserved
-// or parameters must be renamed.
-
-foo(x) {
-  var y = x;
-  bar(x) {
-    return y - x;
-  }
-
-  return bar;
-}
-
-main() {
-  Expect.equals(-10, foo(10)(20));
-}
diff --git a/tests/language_strong/closure_with_super_send_test.dart b/tests/language_strong/closure_with_super_send_test.dart
deleted file mode 100644
index bcaae49..0000000
--- a/tests/language_strong/closure_with_super_send_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test a closurized super send.
-
-class Super {
-  m() => "super";
-}
-
-class Sub extends Super {
-  m() => "sub";
-
-  test() {
-    var x;
-    [0].forEach((e) => x = super.m());
-    return x;
-  }
-}
-
-main() {
-  Expect.equals("super", new Sub().test());
-  Expect.equals("super", new Super().m());
-  Expect.equals("sub", new Sub().m());
-}
diff --git a/tests/language_strong/closures_initializer2_test.dart b/tests/language_strong/closures_initializer2_test.dart
deleted file mode 100644
index 337639b..0000000
--- a/tests/language_strong/closures_initializer2_test.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2013, 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 A<T> {
-  var t;
-  A() : t = (() => T);
-}
-
-expect(result, expected) {
-  if (result != expected) {
-    throw 'Expected $expected, got $result';
-  }
-}
-
-main() {
-  for (var i = 0; i < int.parse("1"); i++) {
-    expect(new A<int>().t() is Type, true);
-  }
-}
diff --git a/tests/language_strong/closures_initializer_test.dart b/tests/language_strong/closures_initializer_test.dart
deleted file mode 100644
index 1a2f1273..0000000
--- a/tests/language_strong/closures_initializer_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2013, 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 A<T> {
-  var t;
-  A() : t = (() => new List<T>());
-}
-
-class B<T> {
-  var t;
-  B() : t = (() => T);
-}
-
-expect(result, expected) {
-  if (result != expected) {
-    throw 'Expected $expected, got $result';
-  }
-}
-
-main() {
-  expect(new A<int>().t() is List<int>, true);
-  expect(new A<String>().t() is List<int>, false);
-  expect(new B<int>().t() is Type, true);
-  expect(new B<int>().t(), int);
-}
diff --git a/tests/language_strong/closures_with_complex_params_test.dart b/tests/language_strong/closures_with_complex_params_test.dart
deleted file mode 100644
index c3c65ee..0000000
--- a/tests/language_strong/closures_with_complex_params_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-
-// Tests for parsing closures with complex parameter types.
-
-main() {
-  test1();
-  test2();
-  test3();
-}
-
-class Pair<A, B> {
-  final A fst;
-  final B snd;
-  Pair(A this.fst, B this.snd);
-}
-
-test1() {
-  // Closures with nested parameterized types.
-  var cdar1 = (Pair<int, Pair<int, int>> pr) => pr.snd.fst;
-  var cdar2 = (Pair<int, Pair<int, int>> pr) => pr.snd.fst;
-
-  var e = new Pair<int, Pair<int, int>>(100, new Pair<int, int>(200, 300));
-
-  Expect.equals(200, cdar1(e));
-  Expect.equals(200, cdar2(e));
-}
-
-test2() {
-  // Closures with nested parameterized types in optional position
-  var cdar1 = ([Pair<int, Pair<int, int>> pr = null]) => pr.snd.fst;
-  var cdar2 = ([Pair<int, Pair<int, int>> pr = null]) => pr.snd.fst;
-
-  var e = new Pair<int, Pair<int, int>>(100, new Pair<int, int>(200, 300));
-
-  Expect.equals(200, cdar1(e));
-  Expect.equals(200, cdar2(e));
-}
-
-test3() {
-  // Closures with nested parameterized types.
-  var f1 = (Pair<int, Pair<int, int>> pr) => pr.snd.fst + 1;
-  var f2 = (Pair<int, Pair<int, int>> pr) => pr.snd.fst + 2;
-
-  // Closures with function type with nested parameterized types.
-  var ap1 = (f(Pair<int, Pair<int, int>> pr1), Pair<int, Pair<int, int>> pr) =>
-      f(pr) * 10;
-  var ap2 = (f(Pair<int, Pair<int, int>> pr1), Pair<int, Pair<int, int>> pr) =>
-      f(pr) * 100;
-
-  var e = new Pair<int, Pair<int, int>>(100, new Pair<int, int>(200, 300));
-
-  Expect.equals(2010, ap1(f1, e));
-  Expect.equals(2020, ap1(f2, e));
-  Expect.equals(20100, ap2(f1, e));
-  Expect.equals(20200, ap2(f2, e));
-}
diff --git a/tests/language_strong/code_after_try_is_executed_test.dart b/tests/language_strong/code_after_try_is_executed_test.dart
deleted file mode 100644
index 57ffd84..0000000
--- a/tests/language_strong/code_after_try_is_executed_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Test that the runtime still runs the code after a try/catch. The
-// test cannot use Expect.throws, because Expect.throws uses the same
-// pattern.
-
-import "package:expect/expect.dart";
-
-main() {
-  var exception;
-  try {
-    throw 'foo';
-  } on String catch (ex) {
-    exception = ex;
-  }
-  Expect.isTrue(exception is String);
-  throw 'foo'; //# 01: runtime error
-}
diff --git a/tests/language_strong/code_motion_crash_test.dart b/tests/language_strong/code_motion_crash_test.dart
deleted file mode 100644
index f0d30b8..0000000
--- a/tests/language_strong/code_motion_crash_test.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2013, 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.
-
-// Regression test for dart2js that used to crash during the
-// [SsaCodeMotion] phase on this code.
-
-class A {
-  final finalField;
-  var field = 2;
-  foo() {
-    new A().field = 42;
-  }
-
-  A._() : finalField = 42;
-  A() : finalField = [new A._(), new B(), new Object()][1];
-}
-
-class B {
-  foo() {}
-  bar() {}
-}
-
-main() {
-  var a = new A();
-  // Create a new block for SsaCodeMotion: the phase will want to move
-  // field access on [a] to this block.
-  if (true) {
-    var b = a.finalField;
-    var d = a.field;
-    b.bar();
-
-    // [c] gets GVN'ed with [b]. As a consequence, the type propagator
-    // that runs after GVN sees that [c] can only be a [B] because of
-    // the call to [bar].
-    var c = a.finalField;
-    c.foo();
-
-    // [e] does not get GVN'ed because the GVN phase sees [c.foo()] as
-    // having side effects.
-    var e = a.field;
-    if (d + e != 4) throw 'Test failed';
-  }
-}
diff --git a/tests/language_strong/comparison_test.dart b/tests/language_strong/comparison_test.dart
deleted file mode 100644
index 59d7005..0000000
--- a/tests/language_strong/comparison_test.dart
+++ /dev/null
@@ -1,325 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test program for testing comparison operators.
-
-import "package:expect/expect.dart";
-
-class Helper {
-  static bool STRICT_EQ(a, b) {
-    return identical(a, b);
-  }
-
-  static bool STRICT_NE(a, b) {
-    return !identical(a, b);
-  }
-
-  static bool EQ(a, b) {
-    return a == b;
-  }
-
-  static bool NE(a, b) {
-    return a != b;
-  }
-
-  static bool LT(a, b) {
-    return a < b;
-  }
-
-  static bool LE(a, b) {
-    return a <= b;
-  }
-
-  static bool GT(a, b) {
-    return a > b;
-  }
-
-  static bool GE(a, b) {
-    return a >= b;
-  }
-}
-
-class A {
-  var b;
-
-  A(x) : b = x {}
-}
-
-class ComparisonTest {
-  static testMain() {
-    var a = new A(0);
-    var b = new A(1);
-    Expect.isTrue(Helper.STRICT_EQ(a, a));
-    Expect.isFalse(Helper.STRICT_EQ(a, b));
-    Expect.isFalse(Helper.STRICT_EQ(b, a));
-    Expect.isTrue(Helper.STRICT_EQ(b, b));
-
-    Expect.isFalse(Helper.STRICT_NE(a, a));
-    Expect.isTrue(Helper.STRICT_NE(a, b));
-    Expect.isTrue(Helper.STRICT_NE(b, a));
-    Expect.isFalse(Helper.STRICT_NE(b, b));
-
-    Expect.isTrue(Helper.STRICT_EQ(false, false));
-    Expect.isFalse(Helper.STRICT_EQ(false, true));
-    Expect.isFalse(Helper.STRICT_EQ(true, false));
-    Expect.isTrue(Helper.STRICT_EQ(true, true));
-
-    Expect.isFalse(Helper.STRICT_NE(false, false));
-    Expect.isTrue(Helper.STRICT_NE(false, true));
-    Expect.isTrue(Helper.STRICT_NE(true, false));
-    Expect.isFalse(Helper.STRICT_NE(true, true));
-
-    Expect.isTrue(Helper.STRICT_EQ(false, false));
-    Expect.isFalse(Helper.STRICT_EQ(false, true));
-    Expect.isFalse(Helper.STRICT_EQ(true, false));
-    Expect.isTrue(Helper.STRICT_EQ(true, true));
-
-    Expect.isFalse(Helper.STRICT_NE(false, false));
-    Expect.isTrue(Helper.STRICT_NE(false, true));
-    Expect.isTrue(Helper.STRICT_NE(true, false));
-    Expect.isFalse(Helper.STRICT_NE(true, true));
-
-    Expect.isTrue(Helper.EQ(false, false));
-    Expect.isFalse(Helper.EQ(false, true));
-    Expect.isFalse(Helper.EQ(true, false));
-    Expect.isTrue(Helper.EQ(true, true));
-
-    Expect.isFalse(Helper.NE(false, false));
-    Expect.isTrue(Helper.NE(false, true));
-    Expect.isTrue(Helper.NE(true, false));
-    Expect.isFalse(Helper.NE(true, true));
-
-    Expect.isTrue(Helper.STRICT_EQ(-1, -1));
-    Expect.isTrue(Helper.STRICT_EQ(0, 0));
-    Expect.isTrue(Helper.STRICT_EQ(1, 1));
-    Expect.isFalse(Helper.STRICT_EQ(-1, 0));
-    Expect.isFalse(Helper.STRICT_EQ(-1, 1));
-    Expect.isFalse(Helper.STRICT_EQ(0, 1));
-
-    Expect.isFalse(Helper.STRICT_NE(-1, -1));
-    Expect.isFalse(Helper.STRICT_NE(0, 0));
-    Expect.isFalse(Helper.STRICT_NE(1, 1));
-    Expect.isTrue(Helper.STRICT_NE(-1, 0));
-    Expect.isTrue(Helper.STRICT_NE(-1, 1));
-    Expect.isTrue(Helper.STRICT_NE(0, 1));
-
-    Expect.isTrue(Helper.EQ(-1, -1));
-    Expect.isTrue(Helper.EQ(0, 0));
-    Expect.isTrue(Helper.EQ(1, 1));
-    Expect.isFalse(Helper.EQ(-1, 0));
-    Expect.isFalse(Helper.EQ(-1, 1));
-    Expect.isFalse(Helper.EQ(0, 1));
-
-    Expect.isFalse(Helper.NE(-1, -1));
-    Expect.isFalse(Helper.NE(0, 0));
-    Expect.isFalse(Helper.NE(1, 1));
-    Expect.isTrue(Helper.NE(-1, 0));
-    Expect.isTrue(Helper.NE(-1, 1));
-    Expect.isTrue(Helper.NE(0, 1));
-
-    Expect.isFalse(Helper.LT(-1, -1));
-    Expect.isFalse(Helper.LT(0, 0));
-    Expect.isFalse(Helper.LT(1, 1));
-    Expect.isTrue(Helper.LT(-1, 0));
-    Expect.isTrue(Helper.LT(-1, 1));
-    Expect.isTrue(Helper.LT(0, 1));
-    Expect.isFalse(Helper.LT(0, -1));
-    Expect.isFalse(Helper.LT(1, -1));
-    Expect.isFalse(Helper.LT(1, 0));
-
-    Expect.isTrue(Helper.LE(-1, -1));
-    Expect.isTrue(Helper.LE(0, 0));
-    Expect.isTrue(Helper.LE(1, 1));
-    Expect.isTrue(Helper.LE(-1, 0));
-    Expect.isTrue(Helper.LE(-1, 1));
-    Expect.isTrue(Helper.LE(0, 1));
-    Expect.isFalse(Helper.LE(0, -1));
-    Expect.isFalse(Helper.LE(1, -1));
-    Expect.isFalse(Helper.LE(1, 0));
-
-    Expect.isFalse(Helper.GT(-1, -1));
-    Expect.isFalse(Helper.GT(0, 0));
-    Expect.isFalse(Helper.GT(1, 1));
-    Expect.isFalse(Helper.GT(-1, 0));
-    Expect.isFalse(Helper.GT(-1, 1));
-    Expect.isFalse(Helper.GT(0, 1));
-    Expect.isTrue(Helper.GT(0, -1));
-    Expect.isTrue(Helper.GT(1, -1));
-    Expect.isTrue(Helper.GT(1, 0));
-
-    Expect.isTrue(Helper.GE(-1, -1));
-    Expect.isTrue(Helper.GE(0, 0));
-    Expect.isTrue(Helper.GE(1, 1));
-    Expect.isFalse(Helper.GE(-1, 0));
-    Expect.isFalse(Helper.GE(-1, 1));
-    Expect.isFalse(Helper.GE(0, 1));
-    Expect.isTrue(Helper.GE(0, -1));
-    Expect.isTrue(Helper.GE(1, -1));
-    Expect.isTrue(Helper.GE(1, 0));
-
-    Expect.isTrue(Helper.STRICT_EQ(-1.0, -1.0));
-    Expect.isTrue(Helper.STRICT_EQ(0.0, 0.0));
-    Expect.isTrue(Helper.STRICT_EQ(1.0, 1.0));
-    Expect.isFalse(Helper.STRICT_EQ(-1.0, 0.0));
-    Expect.isFalse(Helper.STRICT_EQ(-1.0, 1.0));
-    Expect.isFalse(Helper.STRICT_EQ(0.0, 1.0));
-
-    Expect.isFalse(Helper.STRICT_NE(-1.0, -1.0));
-    Expect.isFalse(Helper.STRICT_NE(0.0, 0.0));
-    Expect.isFalse(Helper.STRICT_NE(1.0, 1.0));
-    Expect.isTrue(Helper.STRICT_NE(-1.0, 0.0));
-    Expect.isTrue(Helper.STRICT_NE(-1.0, 1.0));
-    Expect.isTrue(Helper.STRICT_NE(0.0, 1.0));
-
-    Expect.isTrue(Helper.EQ(-1.0, -1.0));
-    Expect.isTrue(Helper.EQ(0.0, 0.0));
-    Expect.isTrue(Helper.EQ(1.0, 1.0));
-    Expect.isFalse(Helper.EQ(-1.0, 0.0));
-    Expect.isFalse(Helper.EQ(-1.0, 1.0));
-    Expect.isFalse(Helper.EQ(0.0, 1.0));
-
-    Expect.isFalse(Helper.NE(-1.0, -1.0));
-    Expect.isFalse(Helper.NE(0.0, 0.0));
-    Expect.isFalse(Helper.NE(1.0, 1.0));
-    Expect.isTrue(Helper.NE(-1.0, 0.0));
-    Expect.isTrue(Helper.NE(-1.0, 1.0));
-    Expect.isTrue(Helper.NE(0.0, 1.0));
-
-    Expect.isFalse(Helper.LT(-1.0, -1.0));
-    Expect.isFalse(Helper.LT(0.0, 0.0));
-    Expect.isFalse(Helper.LT(1.0, 1.0));
-    Expect.isTrue(Helper.LT(-1.0, 0.0));
-    Expect.isTrue(Helper.LT(-1.0, 1.0));
-    Expect.isTrue(Helper.LT(0.0, 1.0));
-    Expect.isFalse(Helper.LT(0.0, -1.0));
-    Expect.isFalse(Helper.LT(1.0, -1.0));
-    Expect.isFalse(Helper.LT(1.0, 0.0));
-
-    Expect.isTrue(Helper.LE(-1.0, -1.0));
-    Expect.isTrue(Helper.LE(0.0, 0.0));
-    Expect.isTrue(Helper.LE(1.0, 1.0));
-    Expect.isTrue(Helper.LE(-1.0, 0.0));
-    Expect.isTrue(Helper.LE(-1.0, 1.0));
-    Expect.isTrue(Helper.LE(0.0, 1.0));
-    Expect.isFalse(Helper.LE(0.0, -1.0));
-    Expect.isFalse(Helper.LE(1.0, -1.0));
-    Expect.isFalse(Helper.LE(1.0, 0.0));
-
-    Expect.isFalse(Helper.GT(-1.0, -1.0));
-    Expect.isFalse(Helper.GT(0.0, 0.0));
-    Expect.isFalse(Helper.GT(1.0, 1.0));
-    Expect.isFalse(Helper.GT(-1.0, 0.0));
-    Expect.isFalse(Helper.GT(-1.0, 1.0));
-    Expect.isFalse(Helper.GT(0.0, 1.0));
-    Expect.isTrue(Helper.GT(0.0, -1.0));
-    Expect.isTrue(Helper.GT(1.0, -1.0));
-    Expect.isTrue(Helper.GT(1.0, 0.0));
-
-    Expect.isTrue(Helper.GE(-1.0, -1.0));
-    Expect.isTrue(Helper.GE(0.0, 0.0));
-    Expect.isTrue(Helper.GE(1.0, 1.0));
-    Expect.isFalse(Helper.GE(-1.0, 0.0));
-    Expect.isFalse(Helper.GE(-1.0, 1.0));
-    Expect.isFalse(Helper.GE(0.0, 1.0));
-    Expect.isTrue(Helper.GE(0.0, -1.0));
-    Expect.isTrue(Helper.GE(1.0, -1.0));
-    Expect.isTrue(Helper.GE(1.0, 0.0));
-
-    Expect.isTrue(Helper.EQ(null, null));
-    Expect.isFalse(Helper.EQ(null, "Str"));
-    Expect.isTrue(Helper.NE(null, 2));
-    Expect.isFalse(Helper.NE(null, null));
-
-    Expect.isTrue(Helper.STRICT_EQ(null, null));
-    Expect.isFalse(Helper.STRICT_EQ(null, "Str"));
-    Expect.isTrue(Helper.STRICT_NE(null, 2));
-    Expect.isFalse(Helper.STRICT_NE(null, null));
-
-    Expect.isFalse(Helper.GT(1, 1.2));
-    Expect.isTrue(Helper.GT(3, 1.2));
-    Expect.isTrue(Helper.GT(2.0, 1));
-    Expect.isFalse(Helper.GT(3.1, 4));
-
-    Expect.isFalse(Helper.GE(1, 1.2));
-    Expect.isTrue(Helper.GE(3, 1.2));
-    Expect.isTrue(Helper.GE(2.0, 1));
-    Expect.isFalse(Helper.GE(3.1, 4));
-    Expect.isTrue(Helper.GE(2.0, 2));
-    Expect.isTrue(Helper.GE(2, 2.0));
-
-    Expect.isTrue(Helper.LT(1, 1.2));
-    Expect.isFalse(Helper.LT(3, 1.2));
-    Expect.isFalse(Helper.LT(2.0, 1));
-    Expect.isTrue(Helper.LT(3.1, 4));
-
-    Expect.isTrue(Helper.LE(1, 1.2));
-    Expect.isFalse(Helper.LE(3, 1.2));
-    Expect.isFalse(Helper.LE(2.0, 1));
-    Expect.isTrue(Helper.LE(3.1, 4));
-    Expect.isTrue(Helper.LE(2.0, 2));
-    Expect.isTrue(Helper.LE(2, 2.0));
-
-    // Bignums.
-    Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000006));
-    Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000005));
-    Expect.isFalse(Helper.LE(0xF00000000006, 0xF00000000005));
-    Expect.isTrue(Helper.LE(12, 0xF00000000005));
-    Expect.isTrue(Helper.LE(12.2, 0xF00000000005));
-
-    Expect.isTrue(Helper.EQ(4294967295, 4.294967295e9));
-    Expect.isTrue(Helper.EQ(4.294967295e9, 4294967295));
-    Expect.isFalse(Helper.EQ(4.294967295e9, 42));
-    Expect.isFalse(Helper.EQ(42, 4.294967295e9));
-    Expect.isFalse(Helper.EQ(4294967295, 42));
-    Expect.isFalse(Helper.EQ(42, 4294967295));
-
-    // Fractions & mixed
-    Expect.isTrue(Helper.EQ(1.0, 1));
-    Expect.isTrue(Helper.EQ(1.0, 1));
-    Expect.isTrue(Helper.EQ(1, 1.0));
-    Expect.isTrue(Helper.EQ(1, 1.0));
-    Expect.isTrue(Helper.EQ(1.1, 1.1));
-    Expect.isTrue(Helper.EQ(1.1, 1.1));
-    Expect.isTrue(Helper.EQ(1.1, 1.1));
-
-    Expect.isFalse(Helper.GT(1, 1.2));
-    Expect.isTrue(Helper.GT(1.2, 1));
-    Expect.isTrue(Helper.GT(1.2, 1.1));
-    Expect.isTrue(Helper.GT(1.2, 1.1));
-    Expect.isTrue(Helper.GT(1.2, 1.1));
-
-    Expect.isTrue(Helper.LT(1, 1.2));
-    Expect.isFalse(Helper.LT(1.2, 1));
-    Expect.isFalse(Helper.LT(1.2, 1.1));
-    Expect.isFalse(Helper.LT(1.2, 1.1));
-    Expect.isFalse(Helper.LT(1.2, 1.1));
-
-    Expect.isFalse(Helper.GE(1.1, 1.2));
-    Expect.isFalse(Helper.GE(1.1, 1.2));
-    Expect.isTrue(Helper.GE(1.2, 1.2));
-    Expect.isTrue(Helper.GE(1.2, 1.2));
-
-    // With non-number classes.
-    Expect.isFalse(Helper.EQ(1, "eeny"));
-    Expect.isFalse(Helper.EQ("meeny", 1));
-    Expect.isFalse(Helper.EQ(1.1, "miny"));
-    Expect.isFalse(Helper.EQ("moe", 1.1));
-    Expect.isFalse(Helper.EQ(1.1, "catch"));
-    Expect.isFalse(Helper.EQ("the", 1.1));
-
-    // With null.
-    Expect.isFalse(Helper.EQ(1, null));
-    Expect.isFalse(Helper.EQ(null, 1));
-    Expect.isFalse(Helper.EQ(1.1, null));
-    Expect.isFalse(Helper.EQ(null, 1.1));
-    Expect.isFalse(Helper.EQ(1.1, null));
-    Expect.isFalse(Helper.EQ(null, 1.1));
-
-    // TODO(srdjan): Clarify behaviour of greater/less comparisons
-    // between numbers and non-numbers.
-  }
-}
-
-main() {
-  ComparisonTest.testMain();
-}
diff --git a/tests/language_strong/compile_time_constant10_test.dart b/tests/language_strong/compile_time_constant10_test.dart
deleted file mode 100644
index 387d4eb..0000000
--- a/tests/language_strong/compile_time_constant10_test.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-// Test that 'identical(a,b)' is a compile-time constant.
-
-class C {
-  final x;
-  const C(this.x);
-  static f3() {}
-  static f4() {}
-}
-
-const i1 = 1;
-const i2 = 2;
-const d1 = 1.5;
-const d2 = 2.5;
-const b1 = true;
-const b2 = false;
-const s1 = "1";
-const s2 = "2";
-const l1 = const [1, 2];
-const l2 = const [2, 3];
-const m1 = const {"x": 1};
-const m2 = const {"x": 2};
-const c1 = const C(1);
-const c2 = const C(2);
-f1() {}
-f2() {}
-const id = identical;
-
-class CT {
-  final x1;
-  final x2;
-  final bool id;
-  const CT(var x1, var x2)
-      : this.x1 = x1,
-        this.x2 = x2,
-        this.id = identical(x1, x2);
-  void test(void expect(a, b), name) {
-    expect(id, "$name: identical($x1,$x2)");
-  }
-}
-
-const trueTests = const [
-  const CT(2 - 1, i1),
-  const CT(1 + 1, i2),
-  const CT(2.5 - 1.0, d1),
-  const CT(1.5 + 1.0, d2),
-  const CT(false || true, b1),
-  const CT(true && false, b2),
-  const CT('$i1', s1),
-  const CT('$i2', s2),
-  const CT(const [i1, 2], l1),
-  const CT(const [i2, 3], l2),
-  const CT(const {"x": i1}, m1),
-  const CT(const {"x": i2}, m2),
-  const CT(const C(i1), c1),
-  const CT(const C(i2), c2),
-  const CT(f1, f1),
-  const CT(f2, f2),
-  const CT(C.f3, C.f3),
-  const CT(C.f4, C.f4),
-  const CT(id, identical),
-];
-
-const falseTests = const [
-  const CT(i1, i2),
-  const CT(d1, d2),
-  const CT(b1, b2),
-  const CT(s1, s2),
-  const CT(l1, l2),
-  const CT(m1, m2),
-  const CT(c1, c2),
-  const CT(f1, f2),
-  const CT(i1, d1),
-  const CT(d1, b1),
-  const CT(b1, s1),
-  const CT(s1, l1),
-  const CT(l1, m1),
-  const CT(m1, c1),
-  const CT(c1, f1),
-  const CT(f1, C.f3),
-  const CT(C.f3, identical),
-  const CT(identical, i1),
-];
-
-// Not a constant if it's not written 'identical'.
-const idtest = id(i1, i2); // //# 01: compile-time error
-
-// Not a constant if aliased? (Current interpretation, waiting for
-// confirmation).
-class T { //                                    //# 02: compile-time error
-  static const identical = id; //               //# 02: continued
-  static const idtest2 = identical(i1, i2); //  //# 02: continued
-} //                                            //# 02: continued
-
-main() {
-  for (int i = 0; i < trueTests.length; i++) {
-    trueTests[i].test(Expect.isTrue, "true[$i]");
-  }
-  for (int i = 0; i < falseTests.length; i++) {
-    falseTests[i].test(Expect.isFalse, "false[$i]");
-  }
-
-  var x = idtest; // //# 01: continued
-  var x = T.idtest2; // //# 02: continued
-}
diff --git a/tests/language_strong/compile_time_constant11_test.dart b/tests/language_strong/compile_time_constant11_test.dart
deleted file mode 100644
index 67ff3fe..0000000
--- a/tests/language_strong/compile_time_constant11_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2012, 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.
-
-// Check that conditional expression can be a compile-time constant.
-
-import "package:expect/expect.dart";
-
-const C1 = true;
-const C2 = false;
-
-const nephew = C1 ? C2 ? "Tick" : "Trick" : "Track";
-
-main() {
-  const a = true ? 5 : 10;
-  const b = C2 ? "Track" : C1 ? "Trick" : "Tick";
-
-  Expect.equals(5, a);
-  Expect.equals("Trick", nephew);
-  Expect.equals(nephew, b);
-  Expect.identical(nephew, b);
-  var s = const Symbol(nephew);
-  var msg = "Donald is $nephew's uncle.";
-  Expect.equals("Donald is Trick's uncle.", msg);
-}
diff --git a/tests/language_strong/compile_time_constant12_test.dart b/tests/language_strong/compile_time_constant12_test.dart
deleted file mode 100644
index 0acf8b0..0000000
--- a/tests/language_strong/compile_time_constant12_test.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012, 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.
-
-const String s = "foo";
-const int i = s.length;
-const int l = "foo".length + 1;
-
-use(x) => x;
-
-main() {
-  use(s);
-  use(i);
-  use(l);
-}
diff --git a/tests/language_strong/compile_time_constant13_test.dart b/tests/language_strong/compile_time_constant13_test.dart
deleted file mode 100644
index 970e805..0000000
--- a/tests/language_strong/compile_time_constant13_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014, 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 A {
-  final x; //      //# 01: ok
-  /// 02: compile-time error
-  var x; //        //# 03: compile-time error
-  get x => null; //# 04: compile-time error
-  set x(v) {} //   //# 05: compile-time error
-
-  const A()
-    : x = 'foo' // //# 01: continued
-    : x = 'foo' // //# 02: continued
-    : x = 'foo' // //# 03: continued
-    : x = 'foo' // //# 04: continued
-    : x = 'foo' // //# 05: continued
-  ;
-}
-
-use(x) => x;
-
-A a = const A();
-
-main() {
-  use(a);
-}
diff --git a/tests/language_strong/compile_time_constant2_test.dart b/tests/language_strong/compile_time_constant2_test.dart
deleted file mode 100644
index 132a93b..0000000
--- a/tests/language_strong/compile_time_constant2_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
-
-const x = 19;
-const y = 3;
-const z = -5;
-const g1 = x + y;
-const g2 = x * y;
-const g3 = x / y;
-const g4 = x ~/ y;
-const g5 = x << y;
-const g6 = x >> y;
-const g7 = ~z;
-const g8 = -x;
-const g9 = x < y;
-const g10 = x <= y;
-const g11 = x <= x;
-const g12 = x > y;
-const g13 = x >= y;
-const g14 = x >= x;
-const g15 = x == y;
-const g16 = x == x;
-const g17 = x != y;
-const g18 = x != x;
-const g19 = x | y;
-const g20 = x & y;
-const g21 = x ^ y;
-const g22 = g1 + g2 + g4 + g5 + g6 + g7 + g8;
-const g23 = x % y;
-
-main() {
-  Expect.equals(22, g1);
-  Expect.equals(57, g2);
-  Expect.equals(6.333333333333333333333333333, g3);
-  Expect.equals(6, g4);
-  Expect.equals(152, g5);
-  Expect.equals(2, g6);
-  Expect.equals(4, g7);
-  Expect.equals(-19, g8);
-  Expect.equals(false, g9);
-  Expect.equals(false, g10);
-  Expect.equals(true, g11);
-  Expect.equals(true, g12);
-  Expect.equals(true, g13);
-  Expect.equals(true, g14);
-  Expect.equals(false, g15);
-  Expect.equals(true, g16);
-  Expect.equals(true, g17);
-  Expect.equals(false, g18);
-  Expect.equals(19, g19);
-  Expect.equals(3, g20);
-  Expect.equals(16, g21);
-  Expect.equals(224, g22);
-  Expect.equals(1, g23);
-}
diff --git a/tests/language_strong/covariant_subtyping_test.dart b/tests/language_strong/covariant_subtyping_test.dart
index d7ffbc5..552f0b5 100644
--- a/tests/language_strong/covariant_subtyping_test.dart
+++ b/tests/language_strong/covariant_subtyping_test.dart
@@ -93,6 +93,15 @@
   Expect.equals(cObj.getT(), 42);
 }
 
+testTearoffReturningFunctionType() {
+  FnChecks<int> cInt = new FnChecks<int>();
+  FnChecks<Object> cObj = cInt;
+
+  Expect.throws(
+      () => cObj.setterForT, isTypeError, 'unsound tear-off throws at runtime');
+  Expect.equals(cInt.setterForT, cInt.setterForT, 'sound tear-off works');
+}
+
 testFieldOfFunctionType() {
   FnChecks<Object> c = new FnChecks<String>()..f = (String b) {};
   Expect.throws(() {
@@ -217,6 +226,7 @@
   testPrivateFields();
   testClassBounds();
   testReturnOfFunctionType();
+  testTearoffReturningFunctionType();
   testFieldOfFunctionType();
   testFieldOfGenericFunctionType();
   testMixinApplication();
diff --git a/tests/language_strong/language_strong.status b/tests/language_strong/language_strong.status
index 829b993..ac9e525 100644
--- a/tests/language_strong/language_strong.status
+++ b/tests/language_strong/language_strong.status
@@ -30,16 +30,6 @@
 checked_setter_test: Skip
 class_cycle2_test: Skip
 class_cycle_test: Skip
-class_keyword_test: Skip
-class_literal_test: Skip
-class_override_test: Skip
-class_syntax_test: Skip
-closure_in_initializer_test: Skip
-closure_internals_test: Skip
-closure_type_test: Skip
-closure_with_super_field_test: Skip
-compile_time_constant10_test: Skip
-compile_time_constant13_test: Skip
 compile_time_constant_arguments_test: Skip
 compile_time_constant_c_test: Skip
 compile_time_constant_checked2_test: Skip
diff --git a/tests/language_strong/language_strong_kernel.status b/tests/language_strong/language_strong_kernel.status
index a58631c..8507f92 100644
--- a/tests/language_strong/language_strong_kernel.status
+++ b/tests/language_strong/language_strong_kernel.status
@@ -16,9 +16,6 @@
 asyncstar_yield_test: Timeout
 asyncstar_yieldstar_test: Timeout
 await_in_cascade_test: RuntimeError
-closure_type_variable_test: RuntimeError
-closures_initializer_test: RuntimeError
-compile_time_constant12_test: Crash
 conditional_import_string_test: DartkCompileTimeError
 conditional_import_test: DartkCompileTimeError
 const_evaluation_test/01: RuntimeError
diff --git a/tests/standalone/io/secure_unauthorized_test.dart b/tests/standalone/io/secure_unauthorized_test.dart
index 2b0e986..7f4285c 100644
--- a/tests/standalone/io/secure_unauthorized_test.dart
+++ b/tests/standalone/io/secure_unauthorized_test.dart
@@ -4,7 +4,6 @@
 
 // OtherResources=certificates/untrusted_server_chain.pem
 // OtherResources=certificates/untrusted_server_key.pem
-// OtherResources=certificates/untrusted_server_chain.pem
 // OtherResources=certificates/trusted_certs.pem
 // OtherResources=secure_unauthorized_client.dart
 
diff --git a/third_party/tcmalloc/BUILD.gn b/third_party/tcmalloc/BUILD.gn
index c1b9f10..42073e2 100644
--- a/third_party/tcmalloc/BUILD.gn
+++ b/third_party/tcmalloc/BUILD.gn
@@ -2,6 +2,8 @@
 # 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("tcmalloc_sources.gni")
+
 config("internal_config") {
   visibility = [ ":*" ]  # Only targets in this file can depend on this.
   cflags = [
@@ -62,11 +64,6 @@
   ]
 }
 
-tcmalloc_sources_list = exec_script("../../tools/gypi_to_gn.py",
-                                    [ rebase_path("tcmalloc_sources.gypi") ],
-                                    "scope",
-                                    [ "tcmalloc_sources.gypi" ])
-
 source_set("tcmalloc") {
   configs -= [ "//build/config/compiler:chromium_code" ]
   configs += [ ":internal_config" ]
@@ -128,5 +125,5 @@
                                   "gperftools/src/profiler.cc",
                                 ])
 
-  sources = tcmalloc_sources_list.sources
+  sources = tcmalloc_sources
 }
diff --git a/third_party/tcmalloc/tcmalloc_sources.gni b/third_party/tcmalloc/tcmalloc_sources.gni
new file mode 100644
index 0000000..cb5992a
--- /dev/null
+++ b/third_party/tcmalloc/tcmalloc_sources.gni
@@ -0,0 +1,155 @@
+# 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.
+
+tcmalloc_sources = [
+  # gperftools/src/
+  "gperftools/src/addressmap-inl.h",
+  "gperftools/src/central_freelist.cc",
+  "gperftools/src/central_freelist.h",
+  "gperftools/src/common.cc",
+  "gperftools/src/common.h",
+  "gperftools/src/config_for_unittests.h",
+  "gperftools/src/debugallocation.cc",
+  "gperftools/src/emergency_malloc.cc",
+  "gperftools/src/emergency_malloc_for_stacktrace.cc",
+  "gperftools/src/emergency_malloc.h",
+  "gperftools/src/fake_stacktrace_scope.cc",
+  "gperftools/src/getenv_safe.h",
+  "gperftools/src/getpc.h",
+  "gperftools/src/heap-checker-bcad.cc",
+  "gperftools/src/heap-checker.cc",
+  "gperftools/src/heap-profiler.cc",
+  "gperftools/src/heap-profile-stats.h",
+  "gperftools/src/heap-profile-table.cc",
+  "gperftools/src/heap-profile-table.h",
+  "gperftools/src/internal_logging.cc",
+  "gperftools/src/internal_logging.h",
+  "gperftools/src/libc_override_gcc_and_weak.h",
+  "gperftools/src/libc_override_glibc.h",
+  "gperftools/src/libc_override.h",
+  "gperftools/src/libc_override_osx.h",
+  "gperftools/src/libc_override_redefine.h",
+  "gperftools/src/linked_list.h",
+  "gperftools/src/malloc_extension.cc",
+  "gperftools/src/malloc_hook.cc",
+  "gperftools/src/malloc_hook-inl.h",
+  "gperftools/src/malloc_hook_mmap_freebsd.h",
+  "gperftools/src/malloc_hook_mmap_linux.h",
+  "gperftools/src/maybe_emergency_malloc.h",
+  "gperftools/src/maybe_threads.cc",
+  "gperftools/src/maybe_threads.h",
+  "gperftools/src/memfs_malloc.cc",
+  "gperftools/src/memory_region_map.cc",
+  "gperftools/src/memory_region_map.h",
+  "gperftools/src/packed-cache-inl.h",
+  "gperftools/src/page_heap_allocator.h",
+  "gperftools/src/page_heap.cc",
+  "gperftools/src/page_heap.h",
+  "gperftools/src/pagemap.h",
+  "gperftools/src/profiledata.cc",
+  "gperftools/src/profiledata.h",
+  "gperftools/src/profile-handler.cc",
+  "gperftools/src/profile-handler.h",
+  "gperftools/src/profiler.cc",
+  "gperftools/src/raw_printer.cc",
+  "gperftools/src/raw_printer.h",
+  "gperftools/src/sampler.cc",
+  "gperftools/src/sampler.h",
+  "gperftools/src/span.cc",
+  "gperftools/src/span.h",
+  "gperftools/src/stacktrace_arm-inl.h",
+  "gperftools/src/stacktrace.cc",
+  "gperftools/src/stacktrace_generic-inl.h",
+  "gperftools/src/stacktrace_impl_setup-inl.h",
+  "gperftools/src/stacktrace_instrument-inl.h",
+  "gperftools/src/stacktrace_libgcc-inl.h",
+  "gperftools/src/stacktrace_libunwind-inl.h",
+  "gperftools/src/stacktrace_powerpc-darwin-inl.h",
+  "gperftools/src/stacktrace_powerpc-inl.h",
+  "gperftools/src/stacktrace_powerpc-linux-inl.h",
+  "gperftools/src/stack_trace_table.cc",
+  "gperftools/src/stack_trace_table.h",
+  "gperftools/src/stacktrace_win32-inl.h",
+  "gperftools/src/stacktrace_x86-inl.h",
+  "gperftools/src/static_vars.cc",
+  "gperftools/src/static_vars.h",
+  "gperftools/src/symbolize.cc",
+  "gperftools/src/symbolize.h",
+  "gperftools/src/system-alloc.cc",
+  "gperftools/src/system-alloc.h",
+  "gperftools/src/tcmalloc.cc",
+  "gperftools/src/tcmalloc_guard.h",
+  "gperftools/src/tcmalloc.h",
+  "gperftools/src/thread_cache.cc",
+  "gperftools/src/thread_cache.h",
+
+  # gperftools/src/base/
+  "gperftools/src/base/arm_instruction_set_select.h",
+  "gperftools/src/base/atomicops.h",
+  "gperftools/src/base/atomicops-internals-arm-generic.h",
+  "gperftools/src/base/atomicops-internals-arm-v6plus.h",
+  "gperftools/src/base/atomicops-internals-gcc.h",
+  "gperftools/src/base/atomicops-internals-linuxppc.h",
+  "gperftools/src/base/atomicops-internals-macosx.h",
+  "gperftools/src/base/atomicops-internals-mips.h",
+  "gperftools/src/base/atomicops-internals-windows.h",
+  "gperftools/src/base/atomicops-internals-x86.cc",
+  "gperftools/src/base/atomicops-internals-x86.h",
+  "gperftools/src/base/basictypes.h",
+  "gperftools/src/base/commandlineflags.h",
+  # This C files is compiled into a separate target.
+  # "gperftools/src/base/dynamic_annotations.c",
+  # "gperftools/src/base/dynamic_annotations.h",
+  "gperftools/src/base/elfcore.h",
+  "gperftools/src/base/elf_mem_image.cc",
+  "gperftools/src/base/elf_mem_image.h",
+  "gperftools/src/base/googleinit.h",
+  "gperftools/src/base/linux_syscall_support.h",
+  "gperftools/src/base/linuxthreads.cc",
+  "gperftools/src/base/linuxthreads.h",
+  "gperftools/src/base/logging.cc",
+  "gperftools/src/base/logging.h",
+  "gperftools/src/base/low_level_alloc.cc",
+  "gperftools/src/base/low_level_alloc.h",
+  "gperftools/src/base/simple_mutex.h",
+  "gperftools/src/base/spinlock.cc",
+  "gperftools/src/base/spinlock.h",
+  "gperftools/src/base/spinlock_internal.cc",
+  "gperftools/src/base/spinlock_internal.h",
+  "gperftools/src/base/spinlock_linux-inl.h",
+  "gperftools/src/base/spinlock_posix-inl.h",
+  "gperftools/src/base/spinlock_win32-inl.h",
+  "gperftools/src/base/stl_allocator.h",
+  "gperftools/src/base/sysinfo.cc",
+  "gperftools/src/base/sysinfo.h",
+  "gperftools/src/base/thread_annotations.h",
+  "gperftools/src/base/thread_lister.c",
+  "gperftools/src/base/thread_lister.h",
+  "gperftools/src/base/vdso_support.cc",
+  "gperftools/src/base/vdso_support.h",
+
+  # gperftools/src/google/
+  "gperftools/src/google/heap-checker.h",
+  "gperftools/src/google/heap-profiler.h",
+  "gperftools/src/google/malloc_extension_c.h",
+  "gperftools/src/google/malloc_extension.h",
+  "gperftools/src/google/malloc_hook_c.h",
+  "gperftools/src/google/malloc_hook.h",
+  "gperftools/src/google/profiler.h",
+  "gperftools/src/google/stacktrace.h",
+  "gperftools/src/google/tcmalloc.h",
+
+  # gperftools/src/gperftools/
+  "gperftools/src/gperftools/heap-checker.h",
+  "gperftools/src/gperftools/heap-profiler.h",
+  "gperftools/src/gperftools/malloc_extension_c.h",
+  "gperftools/src/gperftools/malloc_extension.h",
+  "gperftools/src/gperftools/malloc_hook_c.h",
+  "gperftools/src/gperftools/malloc_hook.h",
+  "gperftools/src/gperftools/profiler.h",
+  "gperftools/src/gperftools/stacktrace.h",
+
+  # gperftools/src/third_party/
+  "gperftools/src/third_party/valgrind.h",
+]
diff --git a/third_party/tcmalloc/tcmalloc_sources.gypi b/third_party/tcmalloc/tcmalloc_sources.gypi
deleted file mode 100644
index d8c4d98..0000000
--- a/third_party/tcmalloc/tcmalloc_sources.gypi
+++ /dev/null
@@ -1,157 +0,0 @@
-# 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.
-
-{
-  'sources': [
-    # gperftools/src/
-    'gperftools/src/addressmap-inl.h',
-    'gperftools/src/central_freelist.cc',
-    'gperftools/src/central_freelist.h',
-    'gperftools/src/common.cc',
-    'gperftools/src/common.h',
-    'gperftools/src/config_for_unittests.h',
-    'gperftools/src/debugallocation.cc',
-    'gperftools/src/emergency_malloc.cc',
-    'gperftools/src/emergency_malloc_for_stacktrace.cc',
-    'gperftools/src/emergency_malloc.h',
-    'gperftools/src/fake_stacktrace_scope.cc',
-    'gperftools/src/getenv_safe.h',
-    'gperftools/src/getpc.h',
-    'gperftools/src/heap-checker-bcad.cc',
-    'gperftools/src/heap-checker.cc',
-    'gperftools/src/heap-profiler.cc',
-    'gperftools/src/heap-profile-stats.h',
-    'gperftools/src/heap-profile-table.cc',
-    'gperftools/src/heap-profile-table.h',
-    'gperftools/src/internal_logging.cc',
-    'gperftools/src/internal_logging.h',
-    'gperftools/src/libc_override_gcc_and_weak.h',
-    'gperftools/src/libc_override_glibc.h',
-    'gperftools/src/libc_override.h',
-    'gperftools/src/libc_override_osx.h',
-    'gperftools/src/libc_override_redefine.h',
-    'gperftools/src/linked_list.h',
-    'gperftools/src/malloc_extension.cc',
-    'gperftools/src/malloc_hook.cc',
-    'gperftools/src/malloc_hook-inl.h',
-    'gperftools/src/malloc_hook_mmap_freebsd.h',
-    'gperftools/src/malloc_hook_mmap_linux.h',
-    'gperftools/src/maybe_emergency_malloc.h',
-    'gperftools/src/maybe_threads.cc',
-    'gperftools/src/maybe_threads.h',
-    'gperftools/src/memfs_malloc.cc',
-    'gperftools/src/memory_region_map.cc',
-    'gperftools/src/memory_region_map.h',
-    'gperftools/src/packed-cache-inl.h',
-    'gperftools/src/page_heap_allocator.h',
-    'gperftools/src/page_heap.cc',
-    'gperftools/src/page_heap.h',
-    'gperftools/src/pagemap.h',
-    'gperftools/src/profiledata.cc',
-    'gperftools/src/profiledata.h',
-    'gperftools/src/profile-handler.cc',
-    'gperftools/src/profile-handler.h',
-    'gperftools/src/profiler.cc',
-    'gperftools/src/raw_printer.cc',
-    'gperftools/src/raw_printer.h',
-    'gperftools/src/sampler.cc',
-    'gperftools/src/sampler.h',
-    'gperftools/src/span.cc',
-    'gperftools/src/span.h',
-    'gperftools/src/stacktrace_arm-inl.h',
-    'gperftools/src/stacktrace.cc',
-    'gperftools/src/stacktrace_generic-inl.h',
-    'gperftools/src/stacktrace_impl_setup-inl.h',
-    'gperftools/src/stacktrace_instrument-inl.h',
-    'gperftools/src/stacktrace_libgcc-inl.h',
-    'gperftools/src/stacktrace_libunwind-inl.h',
-    'gperftools/src/stacktrace_powerpc-darwin-inl.h',
-    'gperftools/src/stacktrace_powerpc-inl.h',
-    'gperftools/src/stacktrace_powerpc-linux-inl.h',
-    'gperftools/src/stack_trace_table.cc',
-    'gperftools/src/stack_trace_table.h',
-    'gperftools/src/stacktrace_win32-inl.h',
-    'gperftools/src/stacktrace_x86-inl.h',
-    'gperftools/src/static_vars.cc',
-    'gperftools/src/static_vars.h',
-    'gperftools/src/symbolize.cc',
-    'gperftools/src/symbolize.h',
-    'gperftools/src/system-alloc.cc',
-    'gperftools/src/system-alloc.h',
-    'gperftools/src/tcmalloc.cc',
-    'gperftools/src/tcmalloc_guard.h',
-    'gperftools/src/tcmalloc.h',
-    'gperftools/src/thread_cache.cc',
-    'gperftools/src/thread_cache.h',
-
-    # gperftools/src/base/
-    'gperftools/src/base/arm_instruction_set_select.h',
-    'gperftools/src/base/atomicops.h',
-    'gperftools/src/base/atomicops-internals-arm-generic.h',
-    'gperftools/src/base/atomicops-internals-arm-v6plus.h',
-    'gperftools/src/base/atomicops-internals-gcc.h',
-    'gperftools/src/base/atomicops-internals-linuxppc.h',
-    'gperftools/src/base/atomicops-internals-macosx.h',
-    'gperftools/src/base/atomicops-internals-mips.h',
-    'gperftools/src/base/atomicops-internals-windows.h',
-    'gperftools/src/base/atomicops-internals-x86.cc',
-    'gperftools/src/base/atomicops-internals-x86.h',
-    'gperftools/src/base/basictypes.h',
-    'gperftools/src/base/commandlineflags.h',
-    # This C files is compiled into a separate target.
-    # 'gperftools/src/base/dynamic_annotations.c',
-    # 'gperftools/src/base/dynamic_annotations.h',
-    'gperftools/src/base/elfcore.h',
-    'gperftools/src/base/elf_mem_image.cc',
-    'gperftools/src/base/elf_mem_image.h',
-    'gperftools/src/base/googleinit.h',
-    'gperftools/src/base/linux_syscall_support.h',
-    'gperftools/src/base/linuxthreads.cc',
-    'gperftools/src/base/linuxthreads.h',
-    'gperftools/src/base/logging.cc',
-    'gperftools/src/base/logging.h',
-    'gperftools/src/base/low_level_alloc.cc',
-    'gperftools/src/base/low_level_alloc.h',
-    'gperftools/src/base/simple_mutex.h',
-    'gperftools/src/base/spinlock.cc',
-    'gperftools/src/base/spinlock.h',
-    'gperftools/src/base/spinlock_internal.cc',
-    'gperftools/src/base/spinlock_internal.h',
-    'gperftools/src/base/spinlock_linux-inl.h',
-    'gperftools/src/base/spinlock_posix-inl.h',
-    'gperftools/src/base/spinlock_win32-inl.h',
-    'gperftools/src/base/stl_allocator.h',
-    'gperftools/src/base/sysinfo.cc',
-    'gperftools/src/base/sysinfo.h',
-    'gperftools/src/base/thread_annotations.h',
-    'gperftools/src/base/thread_lister.c',
-    'gperftools/src/base/thread_lister.h',
-    'gperftools/src/base/vdso_support.cc',
-    'gperftools/src/base/vdso_support.h',
-
-    # gperftools/src/google/
-    'gperftools/src/google/heap-checker.h',
-    'gperftools/src/google/heap-profiler.h',
-    'gperftools/src/google/malloc_extension_c.h',
-    'gperftools/src/google/malloc_extension.h',
-    'gperftools/src/google/malloc_hook_c.h',
-    'gperftools/src/google/malloc_hook.h',
-    'gperftools/src/google/profiler.h',
-    'gperftools/src/google/stacktrace.h',
-    'gperftools/src/google/tcmalloc.h',
-
-    # gperftools/src/gperftools/
-    'gperftools/src/gperftools/heap-checker.h',
-    'gperftools/src/gperftools/heap-profiler.h',
-    'gperftools/src/gperftools/malloc_extension_c.h',
-    'gperftools/src/gperftools/malloc_extension.h',
-    'gperftools/src/gperftools/malloc_hook_c.h',
-    'gperftools/src/gperftools/malloc_hook.h',
-    'gperftools/src/gperftools/profiler.h',
-    'gperftools/src/gperftools/stacktrace.h',
-
-    # gperftools/src/third_party/
-    'gperftools/src/third_party/valgrind.h',
-  ],
-}
diff --git a/tools/VERSION b/tools/VERSION
index 376535c..afa7c36 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 1
 MINOR 25
 PATCH 0
-PRERELEASE 10
+PRERELEASE 11
 PRERELEASE_PATCH 0
diff --git a/tools/android_link.py b/tools/android_link.py
deleted file mode 100755
index 5de6d45..0000000
--- a/tools/android_link.py
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 The Dart Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This script performs the final link step for Android NDK executables.
-Usage:
-./android_link {arm,arm64,ia32} {executable,library,shared_library}
-               {host,target} [linker args]
-"""
-
-import os
-import subprocess
-import sys
-
-# Figure out where we are.
-SCRIPT_DIR = os.path.dirname(sys.argv[0])
-DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
-THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party')
-
-
-def CheckDirExists(path, docstring):
-  if not os.path.isdir(path):
-    raise Exception('Could not find %s directory %s'
-          % (docstring, path))
-
-
-def execute(args):
-  process = subprocess.Popen(args)
-  process.wait()
-  return process.returncode
-
-
-def main():
-  if len(sys.argv) < 5:
-    raise Exception(sys.argv[0] + " failed: not enough arguments")
-
-  # gyp puts -shared first in a shared_library link. Remove it.
-  if sys.argv[1] == '-shared':
-    sys.argv.remove('-shared')
-
-  # Grab the command line arguments.
-  target_arch = sys.argv[1]
-  link_type = sys.argv[2]
-  link_target = sys.argv[3]
-  link_args = sys.argv[4:]
-
-  # Check arguments.
-  if target_arch not in ['arm', 'arm64', 'ia32', 'x64', 'simdbc', 'simdbc64']:
-    raise Exception(sys.argv[0] +
-        " first argument must be 'arm', 'arm64', 'ia32', 'x64', "
-        "'simdbc', or 'simdbc64'")
-  if link_type not in ['executable', 'library', 'shared_library']:
-    raise Exception(sys.argv[0] +
-                    " second argument must be 'executable' or 'library'")
-  if link_target not in ['host', 'target']:
-    raise Exception(sys.argv[0] + " third argument must be 'host' or 'target'")
-
-  # TODO(zra): Figure out how to link a shared library with the NDK
-  # cross-compilers. For now, we disable it by generating empty files
-  # for the results. We disable it here to avoid inspecting the OS type in
-  # the gyp files.
-  if link_type == 'shared_library':
-    print "NOT linking shared library for Android."
-    o_index = link_args.index('-o')
-    output = os.path.join(DART_ROOT, link_args[o_index + 1])
-    open(output, 'a').close()
-    sys.exit(0)
-
-  # Set up path to the Android NDK.
-  CheckDirExists(THIRD_PARTY_ROOT, 'third party tools')
-  android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools')
-  CheckDirExists(android_tools, 'Android tools')
-  android_ndk_root = os.path.join(android_tools, 'ndk')
-  CheckDirExists(android_ndk_root, 'Android NDK')
-
-  # Set up the directory of the Android NDK cross-compiler toolchain.
-  toolchain_arch = 'arm-linux-androideabi-4.9'
-  if target_arch == 'arm64' or target_arch == "simdbc64":
-    toolchain_arch = 'aarch64-linux-android-4.9'
-  if target_arch == 'ia32':
-    toolchain_arch = 'x86-4.9'
-  if target_arch == 'x64':
-    toolchain_arch = 'x86_64-4.9'
-  toolchain_dir = 'linux-x86_64'
-  android_toolchain = os.path.join(android_ndk_root,
-      'toolchains', toolchain_arch,
-      'prebuilt', toolchain_dir, 'bin')
-  CheckDirExists(android_toolchain, 'Android toolchain')
-
-  # Set up the path to the linker executable.
-  android_linker = os.path.join(android_toolchain, 'arm-linux-androideabi-g++')
-  if target_arch == 'arm64' or target_arch == "simdbc64":
-    android_linker = os.path.join(
-        android_toolchain, 'aarch64-linux-android-c++')
-  if target_arch == 'ia32':
-    android_linker = os.path.join(android_toolchain, 'i686-linux-android-g++')
-  if target_arch == 'x64':
-    android_linker = os.path.join(android_toolchain, 'x86_64-linux-android-g++')
-
-  # Grab the path to libgcc.a, which we must explicitly add to the link,
-  # by invoking the cross-compiler with the -print-libgcc-file-name flag.
-  android_gcc = os.path.join(android_toolchain, 'arm-linux-androideabi-gcc')
-  if target_arch == 'arm64' or target_arch == "simdbc64":
-    android_gcc = os.path.join(android_toolchain, 'aarch64-linux-android-gcc')
-  if target_arch == 'ia32':
-    android_gcc = os.path.join(android_toolchain, 'i686-linux-android-gcc')
-  if target_arch == 'x64':
-    android_gcc = os.path.join(android_toolchain, 'x86_64-linux-android-gcc')
-  android_libgcc = subprocess.check_output(
-      [android_gcc, '-print-libgcc-file-name']).strip()
-
-  # Set up the path to the system root directory, which is where we'll find the
-  # Android specific system includes and libraries.
-  android_ndk_sysroot = os.path.join(android_ndk_root,
-      'platforms', 'android-14', 'arch-arm')
-  libdir = 'lib'
-  if target_arch == 'arm64' or target_arch == "simdbc64":
-    android_ndk_sysroot = os.path.join(android_ndk_root,
-      'platforms', 'android-21', 'arch-arm64')
-  if target_arch == 'ia32':
-    android_ndk_sysroot = os.path.join(android_ndk_root,
-        'platforms', 'android-14', 'arch-x86')
-  if target_arch == 'x64':
-    android_ndk_sysroot = os.path.join(android_ndk_root,
-        'platforms', 'android-21', 'arch-x86_64')
-    libdir = 'lib64'
-  CheckDirExists(android_ndk_sysroot, 'Android sysroot')
-  android_ndk_lib = os.path.join(android_ndk_sysroot, 'usr', libdir)
-  crtend_android = os.path.join(android_ndk_lib, 'crtend_android.o')
-
-  if link_target == 'target':
-    # We meddle with the android link command line here because gyp does not
-    # allow configurations to modify link_settings, or set variables.
-
-    # Add and remove libraries as listed in configurations_android.gypi
-    libs_to_rm = ['-lrt', '-lpthread',]
-    libs_to_add = ['-lstlport_static', android_libgcc, '-lc', '-ldl',
-                   '-lstdc++', '-lm',]
-
-    # Add crtend_android to end if we are linking an executable.
-    if link_type == 'executable':
-      libs_to_add.extend(['-llog', '-lz', crtend_android])
-
-    # Filter out -l libs and add the right Android ones.
-    link_args = [i for i in link_args if i not in libs_to_rm]
-    link_args.extend(libs_to_add)
-
-    # Filter out tcmalloc.
-    link_args = [i for i in link_args if "tcmalloc" not in i]
-
-    link_args.insert(0, android_linker)
-  else:
-    link_args.extend(['-ldl', '-lrt'])
-    link_args.insert(0, 'g++')
-
-  sys.exit(execute(link_args))
-
-if __name__ == '__main__':
-  main()
diff --git a/tools/bots/ddc_tests.py b/tools/bots/ddc_tests.py
index 54f989a..405d25a 100644
--- a/tools/bots/ddc_tests.py
+++ b/tools/bots/ddc_tests.py
@@ -39,7 +39,7 @@
       bot.RunProcess([
         'xvfb-run', sys.executable, './tools/test.py', '--strong', '-mrelease',
         '-cdartdevc', '-rchrome', '-ax64', '--report', '--time', '--checked',
-        'language_2', 'corelib_2', 'language_strong'])
+        '--progress=buildbot'] + TARGETS )
     else:
       info = bot.BuildInfo('dartdevc', 'chrome', 'release', system,
           arch='x64', checked=True)
diff --git a/tools/build.py b/tools/build.py
index 0c780f3..df5c045 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -3,614 +3,12 @@
 # Copyright (c) 2012, 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 optparse
-import os
-import re
-import shutil
-import subprocess
+# This script simply forwards to tools/ninja.py. It is retained simply to avoid
+# breaking various workflows.
+
+import ninja
 import sys
-import time
-import utils
-
-HOST_OS = utils.GuessOS()
-HOST_ARCH = utils.GuessArchitecture()
-HOST_CPUS = utils.GuessCpus()
-SCRIPT_DIR = os.path.dirname(sys.argv[0])
-DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
-THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party')
-
-arm_cc_error = """
-Couldn't find the arm cross compiler.
-To make sure that you have the arm cross compilation tools installed, run:
-
-$ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh
-OR
-$ svn co http://src.chromium.org/chrome/trunk/src/build; cd build
-Then,
-$ chmod u+x install-build-deps.sh
-$ ./install-build-deps.sh --arm --no-chromeos-fonts
-"""
-DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr/bin'
-
-usage = """\
-usage: %%prog [options] [targets]
-
-This script runs 'make' in the *current* directory. So, run it from
-the Dart repo root,
-
-  %s ,
-
-unless you really intend to use a non-default Makefile.""" % DART_ROOT
-
-DART_USE_GYP = "DART_USE_GYP"
-
-
-def use_gyp():
-  return DART_USE_GYP in os.environ
-
-
-def BuildOptions():
-  result = optparse.OptionParser(usage=usage)
-  result.add_option("-m", "--mode",
-      help='Build variants (comma-separated).',
-      metavar='[all,debug,release,product]',
-      default='debug')
-  result.add_option("-v", "--verbose",
-      help='Verbose output.',
-      default=False, action="store_true")
-  result.add_option("-a", "--arch",
-      help='Target architectures (comma-separated).',
-      metavar='[all,ia32,x64,simarm,arm,simarmv6,armv6,simarmv5te,armv5te,'
-              'simarm64,arm64,simdbc,armsimdbc]',
-      default=utils.GuessArchitecture())
-  result.add_option("--os",
-    help='Target OSs (comma-separated).',
-    metavar='[all,host,android]',
-    default='host')
-  result.add_option("-t", "--toolchain",
-    help='Cross-compiler toolchain path',
-    default=None)
-  result.add_option("-j",
-      help='The number of parallel jobs to run.',
-      metavar=HOST_CPUS,
-      default=str(HOST_CPUS))
-  (vs_directory, vs_executable) = utils.GuessVisualStudioPath()
-  result.add_option("--devenv",
-      help='Path containing devenv.com on Windows',
-      default=vs_directory)
-  result.add_option("--executable",
-      help='Name of the devenv.com/msbuild executable on Windows (varies for '
-           'different versions of Visual Studio)',
-      default=vs_executable)
-  result.add_option("--gyp",
-      help='Build with gyp.',
-      default=use_gyp(),
-      action='store_true')
-  return result
-
-
-def ProcessOsOption(os_name):
-  if os_name == 'host':
-    return HOST_OS
-  return os_name
-
-
-def ProcessOptions(options, args):
-  if options.arch == 'all':
-    options.arch = 'ia32,x64,simarm,simarm64,simdbc64'
-  if options.mode == 'all':
-    options.mode = 'debug,release,product'
-  if options.os == 'all':
-    options.os = 'host,android'
-  options.mode = options.mode.split(',')
-  options.arch = options.arch.split(',')
-  options.os = options.os.split(',')
-  if not options.gyp and options.toolchain != None:
-    print "The --toolchain flag is only supported by the gyp build."
-    print "When using the GN build, set the toolchain and sysroot using gn.py."
-    return False
-  for mode in options.mode:
-    if not mode in ['debug', 'release', 'product']:
-      print "Unknown mode %s" % mode
-      return False
-  for arch in options.arch:
-    archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv6', 'armv6',
-             'simarmv5te', 'armv5te', 'simarm64', 'arm64',
-             'simdbc', 'simdbc64', 'armsimdbc', 'armsimdbc64']
-    if not arch in archs:
-      print "Unknown arch %s" % arch
-      return False
-  options.os = [ProcessOsOption(os_name) for os_name in options.os]
-  for os_name in options.os:
-    if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']:
-      print "Unknown os %s" % os_name
-      return False
-    if os_name != HOST_OS:
-      if os_name != 'android':
-        print "Unsupported target os %s" % os_name
-        return False
-      if not HOST_OS in ['linux', 'macos']:
-        print ("Cross-compilation to %s is not supported on host os %s."
-               % (os_name, HOST_OS))
-        return False
-      if not arch in ['ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64',
-                      'simdbc', 'simdbc64']:
-        print ("Cross-compilation to %s is not supported for architecture %s."
-               % (os_name, arch))
-        return False
-      # We have not yet tweaked the v8 dart build to work with the Android
-      # NDK/SDK, so don't try to build it.
-      if not args:
-        print "For android builds you must specify a target, such as 'runtime'."
-        return False
-  return True
-
-
-def GetToolchainPrefix(target_os, arch, options):
-  if options.toolchain != None:
-    return options.toolchain
-
-  if target_os == 'android':
-    android_toolchain = GetAndroidToolchainDir(HOST_OS, arch)
-    if arch == 'arm' or arch == 'simdbc':
-      return os.path.join(android_toolchain, 'arm-linux-androideabi')
-    if arch == 'arm64' or arch == 'simdbc64':
-      return os.path.join(android_toolchain, 'aarch64-linux-android')
-    if arch == 'ia32':
-      return os.path.join(android_toolchain, 'i686-linux-android')
-    if arch == 'x64':
-      return os.path.join(android_toolchain, 'x86_64-linux-android')
-
-  # If no cross compiler is specified, only try to figure one out on Linux.
-  if not HOST_OS in ['linux']:
-    raise Exception('Unless --toolchain is used cross-building is only '
-                    'supported on Linux.')
-
-  # For ARM Linux, by default use the Linux distribution's cross-compiler.
-  if arch == 'arm' or arch == 'armsimdbc':
-    # To use a non-hf compiler, specify on the command line with --toolchain.
-    return (DEFAULT_ARM_CROSS_COMPILER_PATH + "/arm-linux-gnueabihf")
-  if arch == 'arm64':
-    return (DEFAULT_ARM_CROSS_COMPILER_PATH + "/aarch64-linux-gnu")
-
-  return None
-
-
-def SetTools(arch, target_os, options):
-  toolsOverride = None
-
-  toolchainprefix = GetToolchainPrefix(target_os, arch, options)
-
-  # Override the Android toolchain's linker to handle some complexity in the
-  # linker arguments that gyp has trouble with.
-  linker = ""
-  if target_os == 'android':
-    linker = os.path.join(DART_ROOT, 'tools', 'android_link.py')
-  elif toolchainprefix:
-    linker = toolchainprefix + "-g++"
-
-  if toolchainprefix:
-    toolsOverride = {
-      "CC.target"  :  toolchainprefix + "-gcc",
-      "CXX.target" :  toolchainprefix + "-g++",
-      "AR.target"  :  toolchainprefix + "-ar",
-      "LINK.target":  linker,
-      "NM.target"  :  toolchainprefix + "-nm",
-    }
-  return toolsOverride
-
-
-def CheckDirExists(path, docstring):
-  if not os.path.isdir(path):
-    raise Exception('Could not find %s directory %s'
-          % (docstring, path))
-
-
-def GetAndroidToolchainDir(host_os, target_arch):
-  global THIRD_PARTY_ROOT
-  if host_os not in ['linux']:
-    raise Exception('Unsupported host os %s' % host_os)
-  if target_arch not in ['ia32', 'x64', 'arm', 'arm64', 'simdbc', 'simdbc64']:
-    raise Exception('Unsupported target architecture %s' % target_arch)
-
-  # Set up path to the Android NDK.
-  CheckDirExists(THIRD_PARTY_ROOT, 'third party tools')
-  android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools')
-  CheckDirExists(android_tools, 'Android tools')
-  android_ndk_root = os.path.join(android_tools, 'ndk')
-  CheckDirExists(android_ndk_root, 'Android NDK')
-
-  # Set up the directory of the Android NDK cross-compiler toolchain.
-  toolchain_arch = 'arm-linux-androideabi-4.9'
-  if target_arch == 'arm64' or target_arch == 'simdbc64':
-    toolchain_arch = 'aarch64-linux-android-4.9'
-  if target_arch == 'ia32':
-    toolchain_arch = 'x86-4.9'
-  if target_arch == 'x64':
-    toolchain_arch = 'x86_64-4.9'
-  toolchain_dir = 'linux-x86_64'
-  android_toolchain = os.path.join(android_ndk_root,
-      'toolchains', toolchain_arch,
-      'prebuilt', toolchain_dir, 'bin')
-  CheckDirExists(android_toolchain, 'Android toolchain')
-
-  return android_toolchain
-
-
-def Execute(args):
-  process = subprocess.Popen(args)
-  process.wait()
-  if process.returncode != 0:
-    raise Exception(args[0] + " failed")
-
-
-def CurrentDirectoryBaseName():
-  """Returns the name of the current directory"""
-  return os.path.relpath(os.curdir, start=os.pardir)
-
-
-def FilterEmptyXcodebuildSections(process):
-  """
-  Filter output from xcodebuild so empty sections are less verbose.
-
-  The output from xcodebuild looks like this:
-
-Build settings from command line:
-    SYMROOT = .../xcodebuild
-
-=== BUILD TARGET samples OF PROJECT dart WITH CONFIGURATION ...
-
-Check dependencies
-
-=== BUILD AGGREGATE TARGET upload_sdk OF PROJECT dart WITH CONFIGURATION ...
-
-Check dependencies
-
-PhaseScriptExecution "Action \"upload_sdk_py\"" xcodebuild/dart.build/...
-    cd ...
-    /bin/sh -c .../xcodebuild/dart.build/ReleaseIA32/upload_sdk.build/...
-
-
-** BUILD SUCCEEDED **
-
-  """
-
-  def is_empty_chunk(input):
-    empty_chunk = ['', 'Check dependencies', '']
-    return not input or (len(input) == 4 and input[1:] == empty_chunk)
-
-  def unbuffered(callable):
-    # Use iter to disable buffering in for-in.
-    return iter(callable, '')
-
-  section = None
-  chunk = []
-  # Is stdout a terminal which supports colors?
-  is_fancy_tty = False
-  clr_eol = None
-  if sys.stdout.isatty():
-    term = os.getenv('TERM', 'dumb')
-    # The capability "clr_eol" means clear the line from cursor to end
-    # of line.  See man pages for tput and terminfo.
-    try:
-      with open('/dev/null', 'a') as dev_null:
-        clr_eol = subprocess.check_output(['tput', '-T' + term, 'el'],
-                                          stderr=dev_null)
-      if clr_eol:
-        is_fancy_tty = True
-    except subprocess.CalledProcessError:
-      is_fancy_tty = False
-    except AttributeError:
-      is_fancy_tty = False
-  pattern = re.compile(r'=== BUILD.* TARGET (.*) OF PROJECT (.*) WITH ' +
-                       r'CONFIGURATION (.*) ===')
-  has_interesting_info = False
-  for line in unbuffered(process.stdout.readline):
-    line = line.rstrip()
-    if line.startswith('=== BUILD ') or line.startswith('** BUILD '):
-      has_interesting_info = False
-      section = line
-      if is_fancy_tty:
-        match = re.match(pattern, section)
-        if match:
-          section = '%s/%s/%s' % (
-            match.group(3), match.group(2), match.group(1))
-        # Truncate to avoid extending beyond 80 columns.
-        section = section[:80]
-        # If stdout is a terminal, emit "progress" information.  The
-        # progress information is the first line of the current chunk.
-        # After printing the line, move the cursor back to the
-        # beginning of the line.  This has two effects: First, if the
-        # chunk isn't empty, the first line will be overwritten
-        # (avoiding duplication).  Second, the next segment line will
-        # overwrite it too avoid long scrollback.  clr_eol ensures
-        # that there is no trailing garbage when a shorter line
-        # overwrites a longer line.
-        print '%s%s\r' % (clr_eol, section),
-      chunk = []
-    if not section or has_interesting_info:
-      print line
-    else:
-      length = len(chunk)
-      if length == 2 and line != 'Check dependencies':
-        has_interesting_info = True
-      elif (length == 1 or length == 3) and line:
-        has_interesting_info = True
-      elif length > 3:
-        has_interesting_info = True
-      if has_interesting_info:
-        print '\n'.join(chunk)
-        chunk = []
-      else:
-        chunk.append(line)
-  if not is_empty_chunk(chunk):
-    print '\n'.join(chunk)
-
-
-def NotifyBuildDone(build_config, success, start):
-  if not success:
-    print "BUILD FAILED"
-
-  sys.stdout.flush()
-
-  # Display a notification if build time exceeded DART_BUILD_NOTIFICATION_DELAY.
-  notification_delay = float(
-    os.getenv('DART_BUILD_NOTIFICATION_DELAY', sys.float_info.max))
-  if (time.time() - start) < notification_delay:
-    return
-
-  if success:
-    message = 'Build succeeded.'
-  else:
-    message = 'Build failed.'
-  title = build_config
-
-  command = None
-  if HOST_OS == 'macos':
-    # Use AppleScript to display a UI non-modal notification.
-    script = 'display notification  "%s" with title "%s" sound name "Glass"' % (
-      message, title)
-    command = "osascript -e '%s' &" % script
-  elif HOST_OS == 'linux':
-    if success:
-      icon = 'dialog-information'
-    else:
-      icon = 'dialog-error'
-    command = "notify-send -i '%s' '%s' '%s' &" % (icon, message, title)
-  elif HOST_OS == 'win32':
-    if success:
-      icon = 'info'
-    else:
-      icon = 'error'
-    command = ("powershell -command \""
-      "[reflection.assembly]::loadwithpartialname('System.Windows.Forms')"
-        "| Out-Null;"
-      "[reflection.assembly]::loadwithpartialname('System.Drawing')"
-        "| Out-Null;"
-      "$n = new-object system.windows.forms.notifyicon;"
-      "$n.icon = [system.drawing.systemicons]::information;"
-      "$n.visible = $true;"
-      "$n.showballoontip(%d, '%s', '%s', "
-      "[system.windows.forms.tooltipicon]::%s);\"") % (
-        5000, # Notification stays on for this many milliseconds
-        message, title, icon)
-
-  if command:
-    # Ignore return code, if this command fails, it doesn't matter.
-    os.system(command)
-
-
-def RunGN(target_os, mode, arch):
-  gn_os = 'host' if target_os == HOST_OS else target_os
-  gn_command = [
-    'python',
-    os.path.join(DART_ROOT, 'tools', 'gn.py'),
-    '-m', mode,
-    '-a', arch,
-    '--os', gn_os,
-    '-v',
-  ]
-  process = subprocess.Popen(gn_command)
-  process.wait()
-  if process.returncode != 0:
-    print ("Tried to run GN, but it failed. Try running it manually: \n\t$ " +
-           ' '.join(gn_command))
-
-
-def ShouldRunGN(out_dir):
-  return (not os.path.exists(out_dir) or
-          not os.path.isfile(os.path.join(out_dir, 'args.gn')))
-
-
-def UseGoma(out_dir):
-  args_gn = os.path.join(out_dir, 'args.gn')
-  return 'use_goma = true' in open(args_gn, 'r').read()
-
-
-# Try to start goma, but don't bail out if we can't. Instead print an error
-# message, and let the build fail with its own error messages as well.
-def EnsureGomaStarted(out_dir):
-  args_gn_path = os.path.join(out_dir, 'args.gn')
-  goma_dir = None
-  with open(args_gn_path, 'r') as fp:
-    for line in fp:
-      if 'goma_dir' in line:
-        words = line.split()
-        goma_dir = words[2][1:-1]  # goma_dir = "/path/to/goma"
-  if not goma_dir:
-    print 'Could not find goma for ' + out_dir
-    return False
-  if not os.path.exists(goma_dir) or not os.path.isdir(goma_dir):
-    print 'Could not find goma at ' + goma_dir
-    return False
-  goma_ctl = os.path.join(goma_dir, 'goma_ctl.py')
-  goma_ctl_command = [
-    'python',
-    goma_ctl,
-    'ensure_start',
-  ]
-  process = subprocess.Popen(goma_ctl_command)
-  process.wait()
-  if process.returncode != 0:
-    print ("Tried to run goma_ctl.py, but it failed. Try running it manually: "
-           + "\n\t" + ' '.join(goma_ctl_command))
-    return False
-  return True
-
-
-
-def BuildNinjaCommand(options, target, target_os, mode, arch):
-  out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os)
-  if ShouldRunGN(out_dir):
-    RunGN(target_os, mode, arch)
-  command = ['ninja', '-C', out_dir]
-  if options.verbose:
-    command += ['-v']
-  if UseGoma(out_dir):
-    if EnsureGomaStarted(out_dir):
-      command += ['-j1000']
-    else:
-      # If we couldn't ensure that goma is started, let the build start, but
-      # slowly so we can see any helpful error messages that pop out.
-      command += ['-j1']
-  command += [target]
-  return command
-
-
-filter_xcodebuild_output = False
-def BuildOneConfig(options, target, target_os, mode, arch):
-  global filter_xcodebuild_output
-  start_time = time.time()
-  args = []
-  build_config = utils.GetBuildConf(mode, arch, target_os)
-  if not options.gyp:
-    args = BuildNinjaCommand(options, target, target_os, mode, arch)
-  else:
-    os.environ['DART_BUILD_MODE'] = mode
-    if HOST_OS == 'macos':
-      filter_xcodebuild_output = True
-      project_file = 'dart.xcodeproj'
-      if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
-        project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName()
-      if target == 'all':
-        target = 'All'
-      args = ['xcodebuild',
-              '-project',
-              project_file,
-              '-target',
-              target,
-              '-configuration',
-              build_config,
-              'SYMROOT=%s' % os.path.abspath('xcodebuild')
-              ]
-    elif HOST_OS == 'win32':
-      project_file = 'dart.sln'
-      if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
-        project_file = 'dart-%s.sln' % CurrentDirectoryBaseName()
-      # Select a platform suffix to pass to devenv.
-      if arch == 'ia32':
-        platform_suffix = 'Win32'
-      elif arch == 'x64':
-        platform_suffix = 'x64'
-      else:
-        print 'Unsupported arch for MSVC build: %s' % arch
-        return 1
-      config_name = '%s|%s' % (build_config, platform_suffix)
-      if target == 'all':
-        args = [options.devenv + os.sep + options.executable,
-                '/build',
-                config_name,
-                project_file
-               ]
-      else:
-        args = [options.devenv + os.sep + options.executable,
-                '/build',
-                config_name,
-                '/project',
-                target,
-                project_file
-               ]
-    else:
-      make = 'make'
-      if HOST_OS == 'freebsd':
-        make = 'gmake'
-        # work around lack of flock
-        os.environ['LINK'] = '$(CXX)'
-      args = [make,
-              '-j',
-              options.j,
-              'BUILDTYPE=' + build_config,
-              ]
-      if target_os != HOST_OS:
-        args += ['builddir_name=' + utils.GetBuildDir(HOST_OS)]
-      if options.verbose:
-        args += ['V=1']
-
-      args += [target]
-
-    toolsOverride = None
-    if override_tools:
-      toolsOverride = SetTools(arch, target_os, options)
-    if toolsOverride:
-      for k, v in toolsOverride.iteritems():
-        args.append(  k + "=" + v)
-        if options.verbose:
-          print k + " = " + v
-      if not os.path.isfile(toolsOverride['CC.target']):
-        if arch == 'arm':
-          print arm_cc_error
-        else:
-          print "Couldn't find compiler: %s" % toolsOverride['CC.target']
-        return 1
-
-  print ' '.join(args)
-  process = None
-  if filter_xcodebuild_output:
-    process = subprocess.Popen(args,
-                               stdin=None,
-                               bufsize=1, # Line buffered.
-                               stdout=subprocess.PIPE,
-                               stderr=subprocess.STDOUT)
-    FilterEmptyXcodebuildSections(process)
-  else:
-    process = subprocess.Popen(args, stdin=None)
-  process.wait()
-  if process.returncode != 0:
-    NotifyBuildDone(build_config, success=False, start=start_time)
-    return 1
-  else:
-    NotifyBuildDone(build_config, success=True, start=start_time)
-
-  return 0
-
-
-def Main():
-  utils.ConfigureJava()
-  # Parse the options.
-  parser = BuildOptions()
-  (options, args) = parser.parse_args()
-  if not ProcessOptions(options, args):
-    parser.print_help()
-    return 1
-  # Determine which targets to build. By default we build the "all" target.
-  if len(args) == 0:
-    targets = ['all']
-  else:
-    targets = args
-
-  # Build all targets for each requested configuration.
-  for target in targets:
-    for target_os in options.os:
-      for mode in options.mode:
-        for arch in options.arch:
-          if BuildOneConfig(options, target, target_os,
-                            mode, arch) != 0:
-            return 1
-
-  return 0
-
 
 if __name__ == '__main__':
-  sys.exit(Main())
+  sys.exit(ninja.Main())
diff --git a/tools/copy_tree.py b/tools/copy_tree.py
index 6e52471..893fcc1 100755
--- a/tools/copy_tree.py
+++ b/tools/copy_tree.py
@@ -4,6 +4,7 @@
 # BSD-style license that can be found in the LICENSE file.
 
 import argparse
+import gn_helpers
 import os
 import re
 import shutil
@@ -14,43 +15,57 @@
   parser = argparse.ArgumentParser(
       description='A script to copy a file tree somewhere')
 
-  parser.add_argument('--dry-run', '-d',
-      dest='dryrun',
-      default=False,
-      action='store_true',
-      help='Print the paths of the source files, but do not copy anything.')
   parser.add_argument('--exclude_patterns', '-e',
       type=str,
       help='Patterns to exclude [passed to shutil.copytree]')
   parser.add_argument('--from', '-f',
       dest="copy_from",
       type=str,
-      required=True,
       help='Source directory')
+  parser.add_argument('--gn', '-g',
+      dest='gn',
+      default=False,
+      action='store_true',
+      help='Output for GN for multiple sources, but do not copy anything.')
+  parser.add_argument('gn_paths',
+      metavar='name path ignore_pattern',
+      type=str,
+      nargs='*',
+      default=None,
+      help='When --gn is given, the specification of source paths to list.')
   parser.add_argument('--to', '-t',
       type=str,
-      required=True,
       help='Destination directory')
 
   return parser.parse_args(args)
 
 
 def ValidateArgs(args):
-  if not os.path.isdir(args.copy_from):
+  if args.gn:
+    if args.exclude_patterns or args.copy_from or args.to:
+      print "--gn mode does not accept other switches"
+      return False
+    if not args.gn_paths:
+      print "--gn mode requires a list of source specifications"
+      return False
+    return True
+  if not args.copy_from or not os.path.isdir(args.copy_from):
     print "--from argument must refer to a directory"
     return False
+  if not args.to:
+    print "--to is required"
+    return False
   return True
 
 
-def CopyTree(src, dst, dryrun=False, symlinks=False, ignore=None):
+def CopyTree(src, dst, ignore=None):
   names = os.listdir(src)
   if ignore is not None:
     ignored_names = ignore(src, names)
   else:
     ignored_names = set()
 
-  if not dryrun:
-    os.makedirs(dst)
+  os.makedirs(dst)
   errors = []
   for name in names:
     if name in ignored_names:
@@ -59,12 +74,9 @@
     dstname = os.path.join(dst, name)
     try:
       if os.path.isdir(srcname):
-        CopyTree(srcname, dstname, dryrun, symlinks, ignore)
+        CopyTree(srcname, dstname, ignore)
       else:
-        if dryrun:
-          print srcname
-        else:
-          shutil.copy(srcname, dstname)
+        shutil.copy(srcname, dstname)
     except (IOError, os.error) as why:
       errors.append((srcname, dstname, str(why)))
     # catch the Error from the recursive CopyTree so that we can
@@ -72,8 +84,7 @@
     except Error as err:
       errors.extend(err.args[0])
   try:
-    if not dryrun:
-      shutil.copystat(src, dst)
+    shutil.copystat(src, dst)
   except WindowsError:
     # can't copy file access times on Windows
     pass
@@ -83,19 +94,62 @@
     raise Error(errors)
 
 
+def ListTree(src, ignore=None):
+  names = os.listdir(src)
+  if ignore is not None:
+    ignored_names = ignore(src, names)
+  else:
+    ignored_names = set()
+
+  srcnames = []
+  for name in names:
+    if name in ignored_names:
+      continue
+    srcname = os.path.join(src, name)
+    if os.path.isdir(srcname):
+      srcnames.extend(ListTree(srcname, ignore))
+    else:
+      srcnames.append(srcname)
+  return srcnames
+
+
+# source_dirs is organized such that sources_dirs[n] is the path for the source
+# directory, and source_dirs[n+1] is a list of ignore patterns.
+def SourcesToGN(source_dirs):
+  if len(source_dirs) % 2 != 0:
+    print "--gn list length should be a multiple of 2."
+    return False
+  data = []
+  for i in xrange(0, len(source_dirs), 2):
+    path = source_dirs[i]
+    ignores = source_dirs[i + 1]
+    if ignores in ["{}"]:
+      sources = ListTree(path)
+    else:
+      patterns = ignores.split(',')
+      sources = ListTree(path, ignore=shutil.ignore_patterns(*patterns))
+    data.append(sources)
+  scope_data = {"sources": data}
+  print gn_helpers.ToGNString(scope_data)
+  return True
+
+
 def Main(argv):
   args = ParseArgs(argv)
   if not ValidateArgs(args):
     return -1
 
-  if os.path.exists(args.to) and not args.dryrun:
+  if args.gn:
+    SourcesToGN(args.gn_paths)
+    return 0
+
+  if os.path.exists(args.to):
     shutil.rmtree(args.to)
   if args.exclude_patterns == None:
-    CopyTree(args.copy_from, args.to, dryrun=args.dryrun)
+    CopyTree(args.copy_from, args.to)
   else:
     patterns = args.exclude_patterns.split(',')
-    CopyTree(args.copy_from, args.to, dryrun=args.dryrun,
-             ignore=shutil.ignore_patterns(*patterns))
+    CopyTree(args.copy_from, args.to, ignore=shutil.ignore_patterns(*patterns))
   return 0
 
 
diff --git a/tools/gardening/bin/compare_failures.dart b/tools/gardening/bin/compare_failures.dart
index f679775..b5d08aa 100644
--- a/tools/gardening/bin/compare_failures.dart
+++ b/tools/gardening/bin/compare_failures.dart
@@ -9,7 +9,7 @@
 import 'dart:io';
 
 import 'package:args/args.dart';
-import 'package:gardening/src/client.dart';
+import 'package:gardening/src/bot.dart';
 import 'package:gardening/src/compare_failures_impl.dart';
 import 'package:gardening/src/util.dart';
 
@@ -41,9 +41,7 @@
     exit(1);
   }
 
-  BuildbotClient client = argResults['logdog']
-      ? new LogdogBuildbotClient()
-      : new HttpBuildbotClient();
-  await mainInternal(client, argResults.rest, runCount: runCount);
-  client.close();
+  Bot bot = new Bot(logdog: argResults['logdog']);
+  await mainInternal(bot, argResults.rest, runCount: runCount);
+  bot.close();
 }
diff --git a/tools/gardening/bin/current_summary.dart b/tools/gardening/bin/current_summary.dart
index ff9520d..da3261b 100644
--- a/tools/gardening/bin/current_summary.dart
+++ b/tools/gardening/bin/current_summary.dart
@@ -57,8 +57,6 @@
       log('Skipping group $group');
       continue;
     }
-    // TODO(johnniwinther): Support reading a partially completed shard from
-    // http, i.e. always use build number `-1`.
     List<BuildUri> uriList = group.createUris(bot.mostRecentBuildNumber);
     if (uriList.isEmpty) continue;
     print('Fetching "${uriList.first}" + ${uriList.length - 1} more ...');
diff --git a/tools/gardening/lib/src/bot.dart b/tools/gardening/lib/src/bot.dart
index 9d0af66..d8893f9 100644
--- a/tools/gardening/lib/src/bot.dart
+++ b/tools/gardening/lib/src/bot.dart
@@ -10,16 +10,16 @@
 import 'util.dart';
 
 class Bot {
-  final bool usesLogdog;
   final BuildbotClient _client;
 
   /// Instantiates a Bot.
   ///
   /// Bots must be [close]d when they aren't needed anymore.
   Bot({bool logdog = false})
-      : usesLogdog = logdog,
-        _client =
-            logdog ? new LogdogBuildbotClient() : new HttpBuildbotClient();
+      : this.internal(
+            logdog ? new LogdogBuildbotClient() : new HttpBuildbotClient());
+
+  Bot.internal(this._client);
 
   int get mostRecentBuildNumber => _client.mostRecentBuildNumber;
 
@@ -40,6 +40,9 @@
     return _client.readResult(buildUri);
   }
 
+  /// Maximum number of [BuildResult]s read concurrently by [readResults].
+  static const maxParallel = 20;
+
   /// Reads the build results of all given uris.
   ///
   /// Returns a list of the results. If a uri couldn't be read, then the entry
@@ -47,7 +50,6 @@
   Future<List<BuildResult>> readResults(List<BuildUri> buildUris) async {
     var result = <BuildResult>[];
     int i = 0;
-    const maxParallel = 20;
     while (i < buildUris.length) {
       var end = i + maxParallel;
       if (end > buildUris.length) end = buildUris.length;
@@ -60,7 +62,7 @@
         }
         return result;
       })));
-      i = end + 1;
+      i = end;
     }
     return result;
   }
diff --git a/tools/gardening/lib/src/buildbot_loading.dart b/tools/gardening/lib/src/buildbot_loading.dart
index 6767bd0..93bd62c 100644
--- a/tools/gardening/lib/src/buildbot_loading.dart
+++ b/tools/gardening/lib/src/buildbot_loading.dart
@@ -33,11 +33,12 @@
 
 /// Fetches test data for [buildUri] through the buildbot stdio.
 Future<BuildResult> readBuildResultFromHttp(
-    HttpClient client, BuildUri buildUri) {
+    HttpClient client, BuildUri buildUri,
+    [Duration timeout]) {
   Future<String> read() async {
     Uri uri = buildUri.toUri();
     log('Reading buildbot results: $uri');
-    return readUriAsText(client, uri);
+    return readUriAsText(client, uri, timeout);
   }
 
   return _readBuildResult(buildUri, read);
diff --git a/tools/gardening/lib/src/client.dart b/tools/gardening/lib/src/client.dart
index f73a50d..0257f5c 100644
--- a/tools/gardening/lib/src/client.dart
+++ b/tools/gardening/lib/src/client.dart
@@ -28,16 +28,39 @@
 
   @override
   Future<BuildResult> readResult(BuildUri buildUri) async {
-    try {
-      return await readBuildResultFromHttp(_client, buildUri);
-    } on HttpException {
-      return null;
-    } on SocketException {
-      return null;
+    Duration timeout;
+    if (buildUri.buildNumber < 0) {
+      timeout = new Duration(seconds: 1);
+    }
+
+    void skipToPreviousBuildNumber() {
+      BuildUri prevBuildUri = buildUri.prev();
+      log('Skip build number on ${buildUri} -> ${prevBuildUri.buildNumber}');
+      buildUri = buildUri.prev();
+    }
+
+    while (true) {
+      try {
+        return await readBuildResultFromHttp(_client, buildUri, timeout);
+      } on TimeoutException {
+        if (timeout != null) {
+          skipToPreviousBuildNumber();
+          continue;
+        }
+        return null;
+      } on HttpException {
+        if (timeout != null) {
+          skipToPreviousBuildNumber();
+          continue;
+        }
+        return null;
+      } on SocketException {
+        return null;
+      }
     }
   }
 
-  int get mostRecentBuildNumber => -2;
+  int get mostRecentBuildNumber => -1;
 
   @override
   void close() {
diff --git a/tools/gardening/lib/src/compare_failures_impl.dart b/tools/gardening/lib/src/compare_failures_impl.dart
index 407fd37..6104fba 100644
--- a/tools/gardening/lib/src/compare_failures_impl.dart
+++ b/tools/gardening/lib/src/compare_failures_impl.dart
@@ -8,26 +8,25 @@
 
 import 'dart:async';
 
+import 'package:gardening/src/bot.dart';
 import 'package:gardening/src/buildbot_structures.dart';
 import 'package:gardening/src/buildbot_data.dart';
-import 'package:gardening/src/client.dart';
 import 'package:gardening/src/util.dart';
 
-Future mainInternal(BuildbotClient client, List<String> args,
-    {int runCount: 10}) async {
+Future mainInternal(Bot bot, List<String> args, {int runCount: 10}) async {
   printBuildResultsSummary(
-      await loadBuildResults(client, args, runCount: runCount), args);
+      await loadBuildResults(bot, args, runCount: runCount), args);
 }
 
 /// Loads [BuildResult]s for the [runCount] last builds for the build(s) in
 /// [args]. [args] can be a list of [BuildGroup] names or a list of log uris.
 Future<Map<BuildUri, List<BuildResult>>> loadBuildResults(
-    BuildbotClient client, List<String> args,
+    Bot bot, List<String> args,
     {int runCount: 10}) async {
   List<BuildUri> buildUriList = <BuildUri>[];
   for (BuildGroup buildGroup in buildGroups) {
     if (args.contains(buildGroup.groupName)) {
-      buildUriList.addAll(buildGroup.createUris(client.mostRecentBuildNumber));
+      buildUriList.addAll(buildGroup.createUris(bot.mostRecentBuildNumber));
     }
   }
   if (buildUriList.isEmpty) {
@@ -35,14 +34,21 @@
       buildUriList.add(new BuildUri.fromUrl(url));
     }
   }
-  Map<BuildUri, List<BuildResult>> buildResults =
+  Map<BuildUri, List<BuildResult>> pastResultsMap =
       <BuildUri, List<BuildResult>>{};
-  for (BuildUri buildUri in buildUriList) {
-    List<BuildResult> results =
-        await readBuildResults(client, buildUri, runCount);
-    buildResults[buildUri] = results;
+  List<BuildResult> buildResults = await bot.readResults(buildUriList);
+  if (buildResults.length != buildUriList.length) {
+    print('Result mismatch: Pulled ${buildUriList.length} uris, '
+        'received ${buildResults.length} results.');
   }
-  return buildResults;
+  for (int index = 0; index < buildResults.length; index++) {
+    BuildUri buildUri = buildUriList[index];
+    BuildResult buildResult = buildResults[index];
+    List<BuildResult> results =
+        await readPastResults(bot, buildUri, buildResult, runCount);
+    pastResultsMap[buildUri] = results;
+  }
+  return pastResultsMap;
 }
 
 /// Prints summaries for the [buildResults].
@@ -64,11 +70,11 @@
       if (LOG || emptySummaries.length < 3) {
         if (emptySummaries.length == 1) {
           sb.writeln('No errors found for build bot:');
-          sb.write(emptySummaries.single.buildUri);
+          sb.write(emptySummaries.single.name);
         } else {
           sb.writeln('No errors found for any of these build bots:');
           for (Summary summary in emptySummaries) {
-            sb.writeln('${summary.buildUri}');
+            sb.writeln('${summary.name}');
           }
         }
       } else {
@@ -86,7 +92,7 @@
       if (LOG || emptySummaries.length < 3) {
         sb.writeln('No errors found for the remaining build bots:');
         for (Summary summary in emptySummaries) {
-          sb.writeln('${summary.buildUri}');
+          sb.writeln('${summary.name}');
         }
       } else {
         sb.write(
@@ -99,17 +105,17 @@
 
 /// Creates a [BuildResult] for [buildUri] and, if it contains failures, the
 /// [BuildResult]s for the previous [runCount] builds.
-Future<List<BuildResult>> readBuildResults(
-    BuildbotClient client, BuildUri buildUri, int runCount) async {
+Future<List<BuildResult>> readPastResults(
+    Bot bot, BuildUri buildUri, BuildResult summary, int runCount) async {
   List<BuildResult> summaries = <BuildResult>[];
-  BuildResult summary = await client.readResult(buildUri);
+  if (summary == null) {
+    print('No result found for $buildUri');
+    return summaries;
+  }
   summaries.add(summary);
   if (summary.hasFailures) {
-    for (int i = 0; i < runCount; i++) {
-      buildUri = summary.buildUri.prev();
-      summary = await client.readResult(buildUri);
-      summaries.add(summary);
-    }
+    summaries.addAll(await bot.readHistoricResults(summary.buildUri.prev(),
+        previousCount: runCount - 1));
   }
   return summaries;
 }
@@ -145,7 +151,7 @@
               timing.step.stepName] = timing;
         }
       }
-      sb.write('Timeouts for ${buildUri} :\n');
+      sb.write('Timeouts for ${name} :\n');
       map.forEach(
           (TestConfiguration id, Map<int, Map<String, Timing>> timings) {
         if (!timeoutIds.contains(id)) return;
@@ -178,7 +184,7 @@
               failure.uri.buildNumber] = failure;
         }
       }
-      sb.write('Errors for ${buildUri} :\n');
+      sb.write('Errors for ${name} :\n');
       // TODO(johnniwinther): Improve comparison of non-timeouts.
       map.forEach((TestConfiguration id, Map<int, TestFailure> failures) {
         if (!errorIds.contains(id)) return;
@@ -202,7 +208,13 @@
       });
     }
     if (timeoutIds.isEmpty && errorIds.isEmpty) {
-      sb.write('No errors found for ${buildUri}');
+      sb.write('No errors found for ${name}');
     }
   }
+
+  String get name => results.isNotEmpty
+      // Use the first result as name since it most likely has an absolute build
+      // number.
+      ? results.first.buildUri.toString()
+      : buildUri.toString();
 }
diff --git a/tools/gardening/lib/src/util.dart b/tools/gardening/lib/src/util.dart
index 51b50c1..ba80e6e 100644
--- a/tools/gardening/lib/src/util.dart
+++ b/tools/gardening/lib/src/util.dart
@@ -65,14 +65,19 @@
 }
 
 /// Reads the content of [uri] as text.
-Future<String> readUriAsText(HttpClient client, Uri uri) async {
+Future<String> readUriAsText(
+    HttpClient client, Uri uri, Duration timeout) async {
   HttpClientRequest request = await client.getUrl(uri);
   HttpClientResponse response = await request.close();
   if (response.statusCode != 200) {
     response.drain();
     throw new HttpException(uri, response.statusCode);
   }
-  return response.transform(UTF8.decoder).join();
+  if (timeout != null) {
+    return response.timeout(timeout).transform(UTF8.decoder).join();
+  } else {
+    return response.transform(UTF8.decoder).join();
+  }
 }
 
 ArgParser createArgParser() {
diff --git a/tools/gardening/test/bot_test.dart b/tools/gardening/test/bot_test.dart
new file mode 100644
index 0000000..43bb243
--- /dev/null
+++ b/tools/gardening/test/bot_test.dart
@@ -0,0 +1,20 @@
+// 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 'package:expect/expect.dart';
+import 'package:gardening/src/bot.dart';
+import 'package:gardening/src/buildbot_data.dart';
+import 'package:gardening/src/buildbot_structures.dart';
+import 'test_client.dart';
+
+main() async {
+  Bot bot = new Bot.internal(new DummyClient());
+  List<BuildUri> buildUriList = buildGroups
+      .firstWhere((g) => g.groupName == 'dart2js-linux')
+      .createUris(bot.mostRecentBuildNumber);
+  Expect.isTrue(buildUriList.length > Bot.maxParallel);
+  List<BuildResult> buildResults = await bot.readResults(buildUriList);
+  Expect.equals(buildUriList.length, buildResults.length);
+  bot.close();
+}
diff --git a/tools/gardening/test/compare_failures_test.dart b/tools/gardening/test/compare_failures_test.dart
index 39f5532..a9a80c5 100644
--- a/tools/gardening/test/compare_failures_test.dart
+++ b/tools/gardening/test/compare_failures_test.dart
@@ -10,6 +10,7 @@
 
 import 'package:args/args.dart';
 import 'package:expect/expect.dart';
+import 'package:gardening/src/bot.dart';
 import 'package:gardening/src/buildbot_structures.dart';
 import 'package:gardening/src/client.dart';
 import 'package:gardening/src/compare_failures_impl.dart';
@@ -32,14 +33,15 @@
   BuildbotClient client = argResults['logdog']
       ? new LogdogBuildbotClient()
       : new HttpBuildbotClient();
-  await runGroupTest(client, 'vm-kernel');
-  client.close();
+  Bot bot = new Bot.internal(client);
+  await runGroupTest(bot, 'vm-kernel');
+  bot.close();
 }
 
-Future runGroupTest(BuildbotClient client, String testGroup) async {
+Future runGroupTest(Bot bot, String testGroup) async {
   print('Testing group compare-failures: $testGroup runCount=1');
   Map<BuildUri, List<BuildResult>> buildResults =
-      await loadBuildResults(client, [testGroup], runCount: 1);
+      await loadBuildResults(bot, [testGroup], runCount: 1);
   print('- checking results for ${buildResults.keys}');
   buildResults.forEach((BuildUri buildUri, List<BuildResult> results) {
     Expect.isTrue(buildUri.buildNumber < 0,
@@ -66,9 +68,10 @@
   BuildbotClient client = argResults['logdog']
       ? new LogdogBuildbotClient()
       : new TestClient(force: force);
+  Bot bot = new Bot.internal(client);
 
   await runSingleTest(
-      client,
+      bot,
       'https://build.chromium.org/p/client.dart/builders/'
       'vm-kernel-linux-debug-x64-be/builds/1884/steps/'
       'vm%20tests/logs/stdio',
@@ -84,7 +87,7 @@
         },
       });
 
-  client.close();
+  bot.close();
 }
 
 testSingleResults(
@@ -106,11 +109,11 @@
   });
 }
 
-Future runSingleTest(BuildbotClient client, String testUri, int runCount,
+Future runSingleTest(Bot bot, String testUri, int runCount,
     Map<int, Map<String, String>> expectedResult) async {
   print('Testing single compare-failures: $testUri runCount=$runCount');
   Map<BuildUri, List<BuildResult>> buildResults =
-      await loadBuildResults(client, [testUri], runCount: runCount);
+      await loadBuildResults(bot, [testUri], runCount: runCount);
   print('- checking results for ${buildResults.keys}');
   if (LOG) {
     printBuildResultsSummary(buildResults, [testUri]);
diff --git a/tools/gardening/test/test_client.dart b/tools/gardening/test/test_client.dart
index d84cbb1..2426b29 100644
--- a/tools/gardening/test/test_client.dart
+++ b/tools/gardening/test/test_client.dart
@@ -63,3 +63,17 @@
   @override
   int get mostRecentBuildNumber => -1;
 }
+
+class DummyClient implements BuildbotClient {
+  @override
+  Future<BuildResult> readResult(BuildUri buildUri) {
+    return new Future.value(
+        new BuildResult(buildUri, 1, const [], const [], const []));
+  }
+
+  @override
+  void close() {}
+
+  @override
+  int get mostRecentBuildNumber => -1;
+}
diff --git a/tools/gypi_to_gn.py b/tools/gypi_to_gn.py
deleted file mode 100755
index 7cb1190..0000000
--- a/tools/gypi_to_gn.py
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Converts given gypi files to a python scope and writes the result to stdout.
-
-It is assumed that the files contain a toplevel dictionary, and this script
-will return that dictionary as a GN "scope" (see example below). This script
-does not know anything about GYP and it will not expand variables or execute
-conditions.
-
-It will strip conditions blocks.
-
-A variables block at the top level will be flattened so that the variables
-appear in the root dictionary. This way they can be returned to the GN code.
-
-Say your_file.gypi looked like this:
-  {
-     'sources': [ 'a.cc', 'b.cc' ],
-     'defines': [ 'ENABLE_DOOM_MELON' ],
-  }
-
-You would call it like this:
-  gypi_files = [ "your_file.gypi", "your_other_file.gypi" ]
-  gypi_values = exec_script("//build/gypi_to_gn.py",
-                            [ rebase_path(gypi_files) ],
-                            "scope",
-                            [ gypi_files ])
-
-Notes:
- - The rebase_path call converts the gypi file from being relative to the
-   current build file to being system absolute for calling the script, which
-   will have a different current directory than this file.
-
- - The "scope" parameter tells GN to interpret the result as a series of GN
-   variable assignments.
-
- - The last file argument to exec_script tells GN that the given file is a
-   dependency of the build so Ninja can automatically re-run GN if the file
-   changes.
-
-Read the values into a target like this:
-  component("mycomponent") {
-    sources = gypi_values.your_file_sources
-    defines = gypi_values.your_file_defines
-  }
-
-Sometimes your .gypi file will include paths relative to a different
-directory than the current .gn file. In this case, you can rebase them to
-be relative to the current directory.
-  sources = rebase_path(gypi_values.your_files_sources, ".",
-                        "//path/gypi/input/values/are/relative/to")
-
-This script will tolerate a 'variables' in the toplevel dictionary or not. If
-the toplevel dictionary just contains one item called 'variables', it will be
-collapsed away and the result will be the contents of that dictinoary. Some
-.gypi files are written with or without this, depending on how they expect to
-be embedded into a .gyp file.
-
-This script also has the ability to replace certain substrings in the input.
-Generally this is used to emulate GYP variable expansion. If you passed the
-argument "--replace=<(foo)=bar" then all instances of "<(foo)" in strings in
-the input will be replaced with "bar":
-
-  gypi_values = exec_script("//build/gypi_to_gn.py",
-                            [ rebase_path("your_file.gypi"),
-                              "--replace=<(foo)=bar"],
-                            "scope",
-                            [ "your_file.gypi" ])
-
-"""
-
-import gn_helpers
-from optparse import OptionParser
-import sys
-import os.path
-
-def LoadPythonDictionary(path):
-  file_string = open(path).read()
-  try:
-    file_data = eval(file_string, {'__builtins__': None}, None)
-  except SyntaxError, e:
-    e.filename = path
-    raise
-  except Exception, e:
-    raise Exception("Unexpected error while reading %s: %s" % (path, str(e)))
-
-  assert isinstance(file_data, dict), "%s does not eval to a dictionary" % path
-
-  # Flatten any variables to the top level.
-  if 'variables' in file_data:
-    file_data.update(file_data['variables'])
-    del file_data['variables']
-
-  # Strip any conditions.
-  if 'conditions' in file_data:
-    del file_data['conditions']
-  if 'target_conditions' in file_data:
-    del file_data['target_conditions']
-
-  # Strip targets in the toplevel, since some files define these and we can't
-  # slurp them in.
-  if 'targets' in file_data:
-    del file_data['targets']
-
-  return file_data
-
-
-def KeepOnly(values, filters):
-  """Recursively filters out strings not ending in "f" from "values"""
-
-  if isinstance(values, list):
-    return [v for v in values if v.endswith(tuple(filters))]
-
-  if isinstance(values, dict):
-    result = {}
-    for key, value in values.items():
-      new_key = KeepOnly(key, filters)
-      new_value = KeepOnly(value, filters)
-      result[new_key] = new_value
-    return result
-
-  return values
-
-def main():
-  parser = OptionParser()
-  parser.add_option("-k", "--keep_only", default = [], action="append",
-    help="Keeps only files ending with the listed strings.")
-  parser.add_option("--prefix", action="store_true",
-    help="Prefix variables with base name")
-  (options, args) = parser.parse_args()
-
-  if len(args) < 1:
-    raise Exception("Need at least one .gypi file to read.")
-
-  data = {}
-
-  for gypi in args:
-    gypi_data = LoadPythonDictionary(gypi)
-
-    if options.keep_only != []:
-      gypi_data = KeepOnly(gypi_data, options.keep_only)
-
-    # Sometimes .gypi files use the GYP syntax with percents at the end of the
-    # variable name (to indicate not to overwrite a previously-defined value):
-    #   'foo%': 'bar',
-    # Convert these to regular variables.
-    for key in gypi_data:
-      if len(key) > 1 and key[len(key) - 1] == '%':
-        gypi_data[key[:-1]] = gypi_data[key]
-        del gypi_data[key]
-    gypi_name = os.path.basename(gypi)[:-len(".gypi")]
-    for key in gypi_data:
-      if options.prefix:
-        # Prefix all variables from this gypi file with the name to disambiguate
-        data[gypi_name + "_" + key] = gypi_data[key]
-      elif key in data:
-        for entry in gypi_data[key]:
-            data[key].append(entry)
-      else:
-        data[key] = gypi_data[key]
-
-  print gn_helpers.ToGNString(data)
-
-if __name__ == '__main__':
-  try:
-    main()
-  except Exception, e:
-    print str(e)
-    sys.exit(1)
diff --git a/tools/migration/bin/run_tests.dart b/tools/migration/bin/run_tests.dart
index 5e0bfb0..99b1a45 100644
--- a/tools/migration/bin/run_tests.dart
+++ b/tools/migration/bin/run_tests.dart
@@ -25,6 +25,7 @@
 const precompiled = "--runtime=dart_precompiled";
 const noRuntime = "--runtime=none";
 const vm = "--runtime=vm";
+const d8 = "--runtime=d8";
 const jsshell = "--runtime=jsshell";
 
 const checked = "--checked";
@@ -54,8 +55,10 @@
   // dart2js-jsshell?
   "analyzer": [analyzer, noRuntime, useSdk],
   "analyzer-checked": [analyzer, noRuntime, checked, useSdk],
-  "analyzer-strong": [analyzer, noRuntime, checked, strong, useSdk],
+  "analyzer-checked-strong": [analyzer, noRuntime, checked, strong, useSdk],
+  "analyzer-strong": [analyzer, noRuntime, strong, useSdk],
   "dart2js": [dart2js, chrome, useSdk, dart2jsBatch],
+  "dart2js-d8-checked": [dart2js, d8, checked, fastStartup, useSdk, dart2jsBatch],
   "dart2js-jsshell": [dart2js, jsshell, fastStartup, useSdk, dart2jsBatch],
   // TODO(rnystrom): Is it worth running dart2js on Firefox too?
   "dartdevc": [dartdevc, chrome, useSdk, strong],
@@ -87,7 +90,13 @@
     return;
   }
 
-  if (argResults.rest.length != 2) {
+  var remainingArgs = []..addAll(argResults.rest);
+
+  if (remainingArgs.length == 1) {
+    remainingArgs.add(remainingArgs.first);
+  }
+
+  if (remainingArgs.length != 2) {
     usage(argParser);
     exit(1);
   }
@@ -98,8 +107,8 @@
 
   var tests = scanTests();
 
-  var startIndex = findFork(tests, argResults.rest[0]);
-  var endIndex = findFork(tests, argResults.rest[1]);
+  var startIndex = findFork(tests, remainingArgs[0]);
+  var endIndex = findFork(tests, remainingArgs[1]);
 
   if (startIndex == null || endIndex == null) exit(1);
 
@@ -180,7 +189,7 @@
 
 void usage(ArgParser parser) {
   print("Usage: dart run_tests.dart [--build] [--configs=...] "
-      "<first file> <last file>");
+      "<first file> [last file]");
   print("\n");
   print("Example:");
   print("\n");
diff --git a/tools/ninja.py b/tools/ninja.py
index e334564..a158891 100755
--- a/tools/ninja.py
+++ b/tools/ninja.py
@@ -20,12 +20,8 @@
 usage = """\
 usage: %%prog [options] [targets]
 
-This script runs 'make' in the *current* directory. So, run it from
-the Dart repo root,
-
-  %s ,
-
-unless you really intend to use a non-default Makefile.""" % DART_ROOT
+This script invokes ninja to build Dart.
+"""
 
 
 def BuildOptions():
diff --git a/tools/process_gypis.py b/tools/process_gypis.py
deleted file mode 100755
index b74ce2c..0000000
--- a/tools/process_gypis.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python
-# Copyright 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 gn_helpers
-import os.path
-import sys
-
-# Given a list of dart package names read in the set of runtime and sdk library
-# sources into variables in a gn scope.
-
-
-def LoadPythonDictionary(path):
-  file_string = open(path).read()
-  try:
-    file_data = eval(file_string, {'__builtins__': None}, None)
-  except SyntaxError, e:
-    e.filename = path
-    raise
-  except Exception, e:
-    raise Exception('Unexpected error while reading %s: %s' %
-                    (path, str(e)))
-
-  assert isinstance(
-    file_data, dict), '%s does not eval to a dictionary' % path
-  return file_data
-
-
-def main():
-  dart_root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-  runtime_dir = os.path.join(dart_root_dir, 'runtime')
-  runtime_lib_dir = os.path.join(runtime_dir, 'lib')
-  sdk_lib_dir = os.path.join(dart_root_dir, 'sdk', 'lib')
-  libs = sys.argv[1:]
-  data = {}
-  data['allsources'] = []
-
-  for lib in libs:
-    runtime_path = os.path.join(runtime_lib_dir, lib + '_sources.gypi')
-    sdk_path = os.path.join(sdk_lib_dir, lib, lib + '_sources.gypi')
-    runtime_dict = LoadPythonDictionary(runtime_path)
-    for source in runtime_dict['sources']:
-      data['allsources'].append(source)
-    data[lib + '_runtime_sources'] = runtime_dict['sources']
-    sdk_dict = LoadPythonDictionary(sdk_path)
-    data[lib + '_sdk_sources'] = sdk_dict['sources']
-
-  vm_sources_path = os.path.join(runtime_dir, 'vm', 'vm_sources.gypi')
-  vm_sources_dict = LoadPythonDictionary(vm_sources_path)
-  data['vm_sources'] = vm_sources_dict['sources']
-
-  platform_sources_base = os.path.join(runtime_dir, 'platform', 'platform_')
-  platform_headers_dict = LoadPythonDictionary(
-      platform_sources_base + 'headers.gypi')
-  platform_sources_dict = LoadPythonDictionary(
-      platform_sources_base + 'sources.gypi')
-  data['platform_sources'] = platform_headers_dict[
-      'sources'] + platform_sources_dict['sources']
-
-  bin_io_sources_path = os.path.join(runtime_dir, 'bin', 'io_sources.gypi')
-  bin_io_sources_dict = LoadPythonDictionary(bin_io_sources_path)
-  data['bin_io_sources'] = bin_io_sources_dict['sources']
-
-  print gn_helpers.ToGNString(data)
-  return 0
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index f2d8319..41de026 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -32,6 +32,11 @@
   if (defined(invoker.inputs)) {
     extra_inputs += invoker.inputs
   }
+  if (defined(invoker.dot_packages)) {
+    dot_packages = invoker.dot_packages
+  } else {
+    dot_packages = rebase_path("$_dart_root/.packages")
+  }
   compiled_action(target_name) {
     tool = "$_dart_root/runtime/bin:dart"
     deps = extra_deps + [ "$_dart_root/pkg:pkg_files_stamp" ]
@@ -46,7 +51,6 @@
       output,
     ]
 
-    dot_packages = rebase_path("$_dart_root/.packages")
     abs_output = rebase_path(output)
     main_file = rebase_path(main_dart)
 
diff --git a/utils/kernel-service/kernel-service.dart b/utils/kernel-service/kernel-service.dart
index 92cb34e..5115b9a 100644
--- a/utils/kernel-service/kernel-service.dart
+++ b/utils/kernel-service/kernel-service.dart
@@ -27,6 +27,7 @@
 
 import 'package:front_end/file_system.dart';
 import 'package:front_end/front_end.dart';
+import 'package:front_end/incremental_kernel_generator.dart';
 import 'package:front_end/memory_file_system.dart';
 import 'package:front_end/physical_file_system.dart';
 import 'package:front_end/src/fasta/kernel/utils.dart';
@@ -38,6 +39,119 @@
 const bool verbose = const bool.fromEnvironment('DFE_VERBOSE');
 const bool strongMode = const bool.fromEnvironment('DFE_STRONG_MODE');
 
+abstract class Compiler {
+  final FileSystem fileSystem;
+  final List<String> errors = new List<String>();
+
+  CompilerOptions options;
+
+  Compiler(this.fileSystem) {
+    Uri packagesUri = (Platform.packageConfig != null)
+        ? Uri.parse(Platform.packageConfig)
+        : null;
+
+    Uri sdkSummary = Uri.base
+        .resolveUri(new Uri.file(Platform.resolvedExecutable))
+        .resolveUri(new Uri.directory("patched_sdk"))
+        // TODO(sigmund): use outline.dill when the mixin transformer is
+        // modular.
+        .resolve('platform.dill');
+
+    if (verbose) {
+      print("DFE: Platform.packageConfig: ${Platform.packageConfig}");
+      print("DFE: packagesUri: ${packagesUri}");
+      print("DFE: Platform.resolvedExecutable: ${Platform.resolvedExecutable}");
+      print("DFE: sdkSummary: ${sdkSummary}");
+    }
+
+    options = new CompilerOptions()
+      ..strongMode = strongMode
+      ..fileSystem = fileSystem
+      ..target = new VmFastaTarget(new TargetFlags(strongMode: strongMode))
+      ..packagesFileUri = packagesUri
+      ..sdkSummary = sdkSummary
+      ..verbose = verbose
+      ..throwOnErrors = false
+      ..reportMessages = true
+      ..onError = (CompilationMessage e) {
+        if (e.severity == Severity.error) {
+          // TODO(sigmund): support emitting code with errors as long as they
+          // are handled in the generated code (issue #30194).
+          errors.add(e.message);
+        }
+      };
+  }
+
+  Future<Program> compile(Uri script);
+}
+
+class IncrementalCompiler extends Compiler {
+  IncrementalKernelGenerator generator;
+
+  IncrementalCompiler(FileSystem fileSystem) : super(fileSystem);
+
+  @override
+  Future<Program> compile(Uri script) async {
+    if (generator == null) {
+      generator = await IncrementalKernelGenerator.newInstance(options, script);
+    }
+    DeltaProgram deltaProgram = await generator.computeDelta();
+    // TODO(aam): Accepting/rejecting should be done based on VM response.
+    generator.acceptLastDelta();
+    return deltaProgram.newProgram;
+  }
+
+  void invalidate(Uri uri) {
+    generator.invalidate(uri);
+  }
+}
+
+class SingleShotCompiler extends Compiler {
+  final bool requireMain;
+
+  SingleShotCompiler(FileSystem fileSystem, this.requireMain)
+      : super(fileSystem);
+
+  @override
+  Future<Program> compile(Uri script) async {
+    return requireMain
+        ? kernelForProgram(script, options)
+        : kernelForBuildUnit([script], options..chaseDependencies = true);
+  }
+}
+
+final Map<int, Compiler> isolateCompilers = new Map<int, Compiler>();
+
+Future<Compiler> lookupOrBuildNewIncrementalCompiler(
+    int isolateId, List sourceFiles) async {
+  IncrementalCompiler compiler;
+  if (isolateCompilers.containsKey(isolateId)) {
+    compiler = isolateCompilers[isolateId];
+    final HybridFileSystem fileSystem = compiler.fileSystem;
+    if (sourceFiles != null) {
+      for (int i = 0; i < sourceFiles.length ~/ 2; i++) {
+        Uri uri = Uri.parse(sourceFiles[i * 2]);
+        fileSystem.memory
+            .entityForUri(uri)
+            .writeAsBytesSync(sourceFiles[i * 2 + 1]);
+        compiler.invalidate(uri);
+      }
+    }
+  } else {
+    final FileSystem fileSystem = sourceFiles == null
+        ? PhysicalFileSystem.instance
+        : _buildFileSystem(sourceFiles);
+
+    // TODO(aam): IncrementalCompiler instance created below have to be
+    // destroyed when corresponding isolate is shut down. To achieve that kernel
+    // isolate needs to receive a message indicating that particular
+    // isolate was shut down. Message should be handled here in this script.
+    compiler = new IncrementalCompiler(fileSystem);
+    isolateCompilers[isolateId] = compiler;
+  }
+  return compiler;
+}
+
 // Process a request from the runtime. See KernelIsolate::CompileToKernel in
 // kernel_isolate.cc and Loader::SendKernelRequest in loader.cc.
 Future _processLoadRequest(request) async {
@@ -47,66 +161,44 @@
   final SendPort port = request[1];
   final String inputFileUri = request[2];
   final Uri script = Uri.base.resolve(inputFileUri);
+  final bool incremental = request[3];
 
-  FileSystem fileSystem = PhysicalFileSystem.instance;
-  bool requireMain = true;
+  final List sourceFiles = request.length > 5 ? request[5] : null;
 
-  if (request.length > 3) {
-    fileSystem = _buildFileSystem(request[3]);
-    requireMain = false;
+  Compiler compiler;
+  // TODO(aam): There should be no need to have an option to choose
+  // one compiler or another. We should always use an incremental
+  // compiler as its functionality is a super set of the other one. We need to
+  // watch the performance though.
+  if (incremental) {
+    final int isolateId = request[4];
+    compiler =
+        await lookupOrBuildNewIncrementalCompiler(isolateId, sourceFiles);
+  } else {
+    final FileSystem fileSystem = sourceFiles == null
+        ? PhysicalFileSystem.instance
+        : _buildFileSystem(sourceFiles);
+    compiler = new SingleShotCompiler(
+        fileSystem, sourceFiles == null /* requireMain */);
   }
 
-  Uri packagesUri = (Platform.packageConfig != null)
-      ? Uri.parse(Platform.packageConfig)
-      : null;
-
-  Uri sdkSummary = Uri.base
-      .resolveUri(new Uri.file(Platform.resolvedExecutable))
-      .resolveUri(new Uri.directory("patched_sdk"))
-      // TODO(sigmund): use outline.dill when the mixin transformer is modular.
-      .resolve('platform.dill');
-
-  if (verbose) {
-    print("DFE: scriptUri: ${script}");
-    print("DFE: Platform.packageConfig: ${Platform.packageConfig}");
-    print("DFE: packagesUri: ${packagesUri}");
-    print("DFE: Platform.resolvedExecutable: ${Platform.resolvedExecutable}");
-    print("DFE: sdkSummary: ${sdkSummary}");
-  }
-
-  var errors = <String>[];
-  var options = new CompilerOptions()
-    ..strongMode = strongMode
-    ..fileSystem = fileSystem
-    ..target = new VmFastaTarget(new TargetFlags(strongMode: strongMode))
-    ..packagesFileUri = packagesUri
-    ..sdkSummary = sdkSummary
-    ..verbose = verbose
-    ..throwOnErrors = false
-    ..reportMessages = true
-    ..onError = (CompilationMessage e) {
-      if (e.severity == Severity.error) {
-        // TODO(sigmund): support emitting code with errors as long as they are
-        // handled in the generated code (issue #30194).
-        errors.add(e.message);
-      }
-    };
-
   CompilationResult result;
   try {
-    Program program = requireMain
-        ? await kernelForProgram(script, options)
-        : await kernelForBuildUnit([script], options..chaseDependencies = true);
+    if (verbose) {
+      print("DFE: scriptUri: ${script}");
+    }
 
-    if (errors.isNotEmpty) {
+    Program program = await compiler.compile(script);
+
+    if (compiler.errors.isNotEmpty) {
       // TODO(sigmund): the compiler prints errors to the console, so we
       // shouldn't print those messages again here.
-      result = new CompilationResult.errors(errors);
+      result = new CompilationResult.errors(compiler.errors);
     } else {
       // We serialize the program excluding platform.dill because the VM has
       // these sources built-in. Everything loaded as a summary in
       // [kernelForProgram] is marked `external`, so we can use that bit to
-      // decide what to excluce.
+      // decide what to exclude.
       // TODO(sigmund): remove the following line (Issue #30111)
       program.libraries.forEach((e) => e.isExternal = false);
       result = new CompilationResult.ok(
@@ -166,7 +258,13 @@
       throw "Unexpected response: $response";
     }
   };
-  var request = [tag, responsePort.sendPort, scriptUri];
+  var request = [
+    tag,
+    responsePort.sendPort,
+    scriptUri,
+    1 /* isolateId chosen randomly */,
+    false /* incremental */
+  ];
   _processLoadRequest(request);
 }