Version 0.1.5.0

svn merge -r 13622:13640 https://dart.googlecode.com/svn/branches/bleeding_edge
trunk

git-svn-id: http://dart.googlecode.com/svn/trunk@13641 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index fe032d9..c15a3ed 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -435,13 +435,16 @@
 
   // TODO(karlklose,floitsch): move this to the javascript backend.
   /** Enable the 'JS' helper for a library if needed. */
-  void maybeEnableJSHelper(library) {
+  void maybeEnableJSHelper(LibraryElement library) {
     String libraryName = library.uri.toString();
     if (library.entryCompilationUnit.script.name.contains(
             'dart/tests/compiler/dart2js_native')
         || libraryName == 'dart:isolate'
         || libraryName == 'dart:math'
         || libraryName == 'dart:html') {
+      if (libraryName == 'dart:html') {
+        importHelperLibrary(library);
+      }
       library.addToScope(findHelper(const SourceString('JS')), this);
       Element jsIndexingBehaviorInterface =
           findHelper(const SourceString('JavaScriptIndexingBehavior'));
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index e5cdd97..1901457 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -655,9 +655,21 @@
   // instead of noteOn.
   void start(num when, [num grainOffset, num grainDuration]) {
     if (JS('bool', '!!#.start', this)) {
-      JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
+      if (?grainDuration) {
+        JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
+      } else if (?grainOffset) {
+        JS('void', '#.start(#, #)', this, when, grainOffset);
+      } else {
+        JS('void', '#.start(#)', this, when);
+      }
     } else {
-      JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
+      if (?grainDuration) {
+        JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
+      } else if (?grainOffset) {
+        JS('void', '#.noteOn(#, #)', this, when, grainOffset);
+      } else {
+        JS('void', '#.noteOn(#)', this, when);
+      }
     }
   }
 
diff --git a/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate b/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
index 7860541..c12866a 100644
--- a/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
+++ b/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
@@ -8,9 +8,21 @@
   // instead of noteOn.
   void start(num when, [num grainOffset, num grainDuration]) {
     if (JS('bool', '!!#.start', this)) {
-      JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
+      if (?grainDuration) {
+        JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration);
+      } else if (?grainOffset) {
+        JS('void', '#.start(#, #)', this, when, grainOffset);
+      } else {
+        JS('void', '#.start(#)', this, when);
+      }
     } else {
-      JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
+      if (?grainDuration) {
+        JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration);
+      } else if (?grainOffset) {
+        JS('void', '#.noteOn(#, #)', this, when, grainOffset);
+      } else {
+        JS('void', '#.noteOn(#)', this, when);
+      }
     }
   }
 
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 895e2f1..683e724 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -339,7 +339,8 @@
 
   TypeMirror resolve(MirrorSystem mirrors) {
     if (libraryName == null) {
-      if (typeName == 'Dynamic') {
+      // TODO(turnidge): Remove support for 'Dynamic'.
+      if ((typeName == 'dynamic') || (typeName == 'Dynamic')) {
         return mirrors.dynamicType;
       } else if (typeName == 'void') {
         return mirrors.voidType;
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index aace6ca..c94fe02c 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -632,19 +632,19 @@
     if (super_type.IsBeingFinalized()) {
       // This type references itself via its type arguments. This is legal, but
       // we must avoid endless recursion. We therefore map the innermost
-      // super type to Dynamic.
+      // super type to dynamic.
       // Note that a direct self-reference via the super class chain is illegal
       // and reported as an error earlier.
       // Such legal self-references occur with F-bounded quantification.
       // Example 1: class Derived extends Base<Derived>.
       // The type 'Derived' forms a cycle by pointing to itself via its
       // flattened type argument vector: Derived[Base[Derived[Base[...]]]]
-      // We break the cycle as follows: Derived[Base[Derived[Dynamic]]]
+      // We break the cycle as follows: Derived[Base[Derived[dynamic]]]
       // Example 2: class Derived extends Base<Middle<Derived>> results in
-      // Derived[Base[Middle[Derived[Dynamic]]]]
+      // Derived[Base[Middle[Derived[dynamic]]]]
       // Example 3: class Derived<T> extends Base<Derived<T>> results in
-      // Derived[Base[Derived[Dynamic]], T].
-      ASSERT(super_type_args.IsNull());  // Same as a vector of Dynamic.
+      // Derived[Base[Derived[dynamic]], T].
+      ASSERT(super_type_args.IsNull());  // Same as a vector of dynamic.
     } else {
       super_type ^= FinalizeType(cls, super_type, finalization);
       cls.set_super_type(super_type);
@@ -754,7 +754,7 @@
                       "type '%s' has malformed type argument",
                       type_name.ToCString());
         }
-        // In production mode, malformed type arguments are mapped to Dynamic.
+        // In production mode, malformed type arguments are mapped to dynamic.
         // In checked mode, a type with malformed type arguments is malformed.
         if (FLAG_enable_type_checks || FLAG_error_on_malformed_type) {
           const Error& error = Error::Handle(type_argument.malformed_error());
@@ -925,7 +925,7 @@
   // interface.
   ResolveType(cls, type, kCanonicalize);
   type = FinalizeType(cls, type, kCanonicalize);
-  // In production mode, a malformed result type is mapped to Dynamic.
+  // In production mode, a malformed result type is mapped to dynamic.
   if (!FLAG_enable_type_checks && type.IsMalformed()) {
     type = Type::DynamicType();
   }
@@ -936,7 +936,7 @@
     type = function.ParameterTypeAt(i);
     ResolveType(cls, type, kCanonicalize);
     type = FinalizeType(cls, type, kCanonicalize);
-    // In production mode, a malformed parameter type is mapped to Dynamic.
+    // In production mode, a malformed parameter type is mapped to dynamic.
     if (!FLAG_enable_type_checks && type.IsMalformed()) {
       type = Type::DynamicType();
     }
@@ -1384,7 +1384,7 @@
                   String::Handle(interface_class.Name()).ToCString());
     }
     // Verify that unless cls belongs to core lib, it cannot extend or implement
-    // any of bool, num, int, double, String, Function, Dynamic.
+    // any of bool, num, int, double, String, Function, dynamic.
     // The exception is signature classes, which are compiler generated and
     // represent a function type, therefore implementing the Function interface.
     if (!cls_belongs_to_core_lib) {
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index e3cecbd..8ed32db 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -29,7 +29,7 @@
  public:
   // Modes for type resolution and finalization. The ordering is relevant.
   enum FinalizationKind {
-    kIgnore,                   // Type is ignored and replaced by Dynamic.
+    kIgnore,                   // Type is ignored and replaced by dynamic.
     kDoNotResolve,             // Type resolution is postponed.
     kTryResolve,               // Type resolution is attempted.
     kFinalize,                 // Type resolution and type finalization are
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 0b8cdd4..ef99695 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -2661,7 +2661,7 @@
     const Class& cls = Class::Cast(obj);
     const Array& func_array = Array::Handle(cls.functions());
 
-    // Some special types like 'Dynamic' have a null functions list.
+    // Some special types like 'dynamic' have a null functions list.
     if (!func_array.IsNull()) {
       for (intptr_t i = 0; i < func_array.Length(); ++i) {
         func ^= func_array.At(i);
@@ -2916,7 +2916,7 @@
 
   if (func.kind() == RawFunction::kConstructor) {
     // Special case the return type for constructors.  Inside the vm
-    // we mark them as returning Dynamic, but for the purposes of
+    // we mark them as returning dynamic, but for the purposes of
     // reflection, they return the type of the class being
     // constructed.
     return Api::NewHandle(isolate, func.Owner());
@@ -3001,9 +3001,9 @@
     const Class& cls = Class::Cast(obj);
     const Array& field_array = Array::Handle(cls.fields());
 
-    // Some special types like 'Dynamic' have a null fields list.
+    // Some special types like 'dynamic' have a null fields list.
     //
-    // TODO(turnidge): Fix 'Dynamic' so that it does not have a null
+    // TODO(turnidge): Fix 'dynamic' so that it does not have a null
     // fields list.  This will have to wait until the empty array is
     // allocated in the vm isolate.
     if (!field_array.IsNull()) {
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 80ac1cd..6997b753 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -4675,7 +4675,7 @@
   if (FLAG_enable_type_checks) {
     EXPECT_STREQ("int", cls_name_cstr);
   } else {
-    EXPECT_STREQ("Dynamic", cls_name_cstr);
+    EXPECT_STREQ("dynamic", cls_name_cstr);
   }
 }
 
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 8b584bc..92250f2 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -541,7 +541,7 @@
 
 
 // Returns true if the type check can be skipped, for example, if the
-// destination type is Dynamic or if the compile type of the value is a subtype
+// destination type is dynamic or if the compile type of the value is a subtype
 // of the destination type.
 bool EffectGraphVisitor::CanSkipTypeCheck(intptr_t token_pos,
                                           Value* value,
@@ -556,7 +556,7 @@
     return false;
   }
 
-  // Any type is more specific than the Dynamic type and than the Object type.
+  // Any type is more specific than the dynamic type and than the Object type.
   if (dst_type.IsDynamicType() || dst_type.IsObjectType()) {
     return true;
   }
@@ -829,7 +829,7 @@
     const Class& cls = Class::Handle(literal_value.clazz());
     ConstantInstr* result = NULL;
     if (cls.IsNullClass()) {
-      // A null object is only an instance of Object and Dynamic, which has
+      // A null object is only an instance of Object and dynamic, which has
       // already been checked above (if the type is instantiated). So we can
       // return false here if the instance is null (and if the type is
       // instantiated).
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index b5ce752..1dd972f 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -133,7 +133,7 @@
       type_arguments.IsRaw(type_arguments.Length());
   if (is_raw_type) {
     const Register kClassIdReg = ECX;
-    // Dynamic type argument, check only classes.
+    // dynamic type argument, check only classes.
     // List is a very common case.
     __ LoadClassId(kClassIdReg, kInstanceReg);
     if (!type_class.is_interface()) {
@@ -146,7 +146,7 @@
     return GenerateSubtype1TestCacheLookup(
         token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
   }
-  // If one type argument only, check if type argument is Object or Dynamic.
+  // If one type argument only, check if type argument is Object or dynamic.
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument = AbstractType::ZoneHandle(
         type_arguments.TypeAt(0));
@@ -307,7 +307,7 @@
     // Load instantiator (or null) and instantiator type arguments on stack.
     __ movl(EDX, Address(ESP, 0));  // Get instantiator type arguments.
     // EDX: instantiator type arguments.
-    // Check if type argument is Dynamic.
+    // Check if type argument is dynamic.
     __ cmpl(EDX, raw_null);
     __ j(EQUAL, is_instance_lbl);
     // Can handle only type arguments that are instances of TypeArguments.
@@ -453,13 +453,13 @@
   // If type is instantiated and non-parameterized, we can inline code
   // checking whether the tested instance is a Smi.
   if (type.IsInstantiated()) {
-    // A null object is only an instance of Object and Dynamic, which has
+    // A null object is only an instance of Object and dynamic, which has
     // already been checked above (if the type is instantiated). So we can
     // return false here if the instance is null (and if the type is
     // instantiated).
     // We can only inline this null check if the type is instantiated at compile
     // time, since an uninstantiated type at compile time could be Object or
-    // Dynamic at run time.
+    // dynamic at run time.
     __ cmpl(EAX, raw_null);
     __ j(EQUAL, &is_not_instance);
   }
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 0c9e1aa..849a405 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -133,7 +133,7 @@
       type_arguments.IsRaw(type_arguments.Length());
   if (is_raw_type) {
     const Register kClassIdReg = R10;
-    // Dynamic type argument, check only classes.
+    // dynamic type argument, check only classes.
     // List is a very common case.
     __ LoadClassId(kClassIdReg, kInstanceReg);
     if (!type_class.is_interface()) {
@@ -146,7 +146,7 @@
     return GenerateSubtype1TestCacheLookup(
         token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
   }
-  // If one type argument only, check if type argument is Object or Dynamic.
+  // If one type argument only, check if type argument is Object or dynamic.
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument = AbstractType::ZoneHandle(
         type_arguments.TypeAt(0));
@@ -307,7 +307,7 @@
     // Load instantiator (or null) and instantiator type arguments on stack.
     __ movq(RDX, Address(RSP, 0));  // Get instantiator type arguments.
     // RDX: instantiator type arguments.
-    // Check if type argument is Dynamic.
+    // Check if type argument is dynamic.
     __ cmpq(RDX, raw_null);
     __ j(EQUAL, is_instance_lbl);
     // Can handle only type arguments that are instances of TypeArguments.
@@ -453,13 +453,13 @@
   // If type is instantiated and non-parameterized, we can inline code
   // checking whether the tested instance is a Smi.
   if (type.IsInstantiated()) {
-    // A null object is only an instance of Object and Dynamic, which has
+    // A null object is only an instance of Object and dynamic, which has
     // already been checked above (if the type is instantiated). So we can
     // return false here if the instance is null (and if the type is
     // instantiated).
     // We can only inline this null check if the type is instantiated at compile
     // time, since an uninstantiated type at compile time could be Object or
-    // Dynamic at run time.
+    // dynamic at run time.
     __ cmpq(RAX, raw_null);
     __ j(EQUAL, &is_not_instance);
   }
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index cfc1e5d..904cf2a 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -377,7 +377,7 @@
     return true;
   }
 
-  // The Null type is only a subtype of Object and of Dynamic.
+  // The Null type is only a subtype of Object and of dynamic.
   // Functions that do not explicitly return a value, implicitly return null,
   // except generative constructors, which return the object being constructed.
   // It is therefore acceptable for void functions to return null.
@@ -965,14 +965,14 @@
 RawAbstractType* ClosureCallInstr::CompileType() const {
   // Because of function subtyping rules, the declared return type of a closure
   // call cannot be relied upon for compile type analysis. For example, a
-  // function returning Dynamic can be assigned to a closure variable declared
+  // function returning dynamic can be assigned to a closure variable declared
   // to return int and may actually return a double at run-time.
   return Type::DynamicType();
 }
 
 
 RawAbstractType* InstanceCallInstr::CompileType() const {
-  // TODO(regis): Return a more specific type than Dynamic for recognized
+  // TODO(regis): Return a more specific type than dynamic for recognized
   // combinations of receiver type and method name.
   return Type::DynamicType();
 }
@@ -1125,7 +1125,7 @@
 
 RawAbstractType* LoadFieldInstr::CompileType() const {
   // Type may be null if the field is a VM field, e.g. context parent.
-  // Keep it as null for debug purposes and do not return Dynamic in production
+  // Keep it as null for debug purposes and do not return dynamic in production
   // mode, since misuse of the type would remain undetected.
   if (type().IsNull()) {
     return AbstractType::null();
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 3930c7c..0e9d611 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1207,7 +1207,7 @@
   // 'instantiator_reg' is the instantiator AbstractTypeArguments object
   // (or null).
   // If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments.
   Label type_arguments_instantiated;
   const intptr_t len = type_arguments().Length();
@@ -1270,7 +1270,7 @@
   // instantiator_reg is the instantiator type argument vector, i.e. an
   // AbstractTypeArguments object (or null).
   // If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments.
   Label type_arguments_instantiated;
   const intptr_t len = type_arguments().Length();
@@ -1326,7 +1326,7 @@
 
   // instantiator_reg is the instantiator AbstractTypeArguments object
   // (or null).  If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments and do not pass the instantiator.
   Label done;
   const intptr_t len = type_arguments().Length();
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index c373780..fe61e98 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -1161,7 +1161,7 @@
   // 'instantiator_reg' is the instantiator AbstractTypeArguments object
   // (or null).
   // If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments.
   Label type_arguments_instantiated;
   const intptr_t len = type_arguments().Length();
@@ -1222,7 +1222,7 @@
   // instantiator_reg is the instantiator type argument vector, i.e. an
   // AbstractTypeArguments object (or null).
   // If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments.
   Label type_arguments_instantiated;
   const intptr_t len = type_arguments().Length();
@@ -1276,7 +1276,7 @@
 
   // instantiator_reg is the instantiator AbstractTypeArguments object
   // (or null).  If the instantiator is null and if the type argument vector
-  // instantiated from null becomes a vector of Dynamic, then use null as
+  // instantiated from null becomes a vector of dynamic, then use null as
   // the type arguments and do not pass the instantiator.
   Label done;
   const intptr_t len = type_arguments().Length();
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 2c2e8d3..7760a93 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -208,7 +208,7 @@
     // EBX: Type arguments of array.
     __ cmpl(EBX, raw_null);
     __ j(EQUAL, &checked_ok, Assembler::kNearJump);
-    // Check if it's Dynamic.
+    // Check if it's dynamic.
     // For now handle only TypeArguments and bail out if InstantiatedTypeArgs.
     __ CompareClassId(EBX, kTypeArgumentsCid, EAX);
     __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index e7bf8b4..df2b538 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -339,7 +339,7 @@
 static void AddFunctionsFromClass(const Class& cls,
                                   GrowableArray<const Function*>* functions) {
   const Array& class_functions = Array::Handle(cls.functions());
-  // Class 'Dynamic' is allocated/initialized in a special way, leaving
+  // Class 'dynamic' is allocated/initialized in a special way, leaving
   // the functions field NULL instead of empty.
   const int func_len = class_functions.IsNull() ? 0 : class_functions.Length();
   for (int j = 0; j < func_len; j++) {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index bf300c7..9c2d491 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -882,7 +882,7 @@
   type = Type::NewNonParameterizedType(cls);
   object_store->set_void_type(type);
 
-  // The class 'Dynamic' is registered in the class dictionary because its name
+  // The class 'dynamic' is registered in the class dictionary because its name
   // is a built-in identifier, rather than a reserved keyword. Its name is not
   // heap allocated, because the class resides in the VM isolate.
   // The corresponding type, the "unknown type", is stored in the object store.
@@ -2010,7 +2010,7 @@
     Error* malformed_error) const {
   ASSERT(!IsVoidClass());
   // Check for DynamicType.
-  // Each occurrence of DynamicType in type T is interpreted as the Dynamic
+  // Each occurrence of DynamicType in type T is interpreted as the dynamic
   // type, a supertype of all types.
   if (other.IsDynamicClass()) {
     return true;
@@ -2588,7 +2588,7 @@
     ASSERT(!type.IsNull());
     if (!type.HasResolvedTypeClass()) {
       if (raw_instantiated && type.IsTypeParameter()) {
-        // An uninstantiated type parameter is equivalent to Dynamic.
+        // An uninstantiated type parameter is equivalent to dynamic.
         continue;
       }
       ASSERT((!raw_instantiated && type.IsTypeParameter()) ||
@@ -8045,12 +8045,12 @@
     if (other.IsVoidType()) {
       return true;
     }
-    // Otherwise, null is only an instance of Object and of Dynamic.
+    // Otherwise, null is only an instance of Object and of dynamic.
     // It is not necessary to fully instantiate the other type for this test.
     Class& other_class = Class::Handle();
     if (other.IsTypeParameter()) {
       if (other_instantiator.IsNull()) {
-        return true;  // Other type is uninstantiated, i.e. Dynamic.
+        return true;  // Other type is uninstantiated, i.e. dynamic.
       }
       const TypeParameter& other_type_param = TypeParameter::Cast(other);
       const AbstractType& instantiated_other = AbstractType::Handle(
@@ -8091,7 +8091,7 @@
   // allocation of a new AbstractType by inlining the code.
   if (other.IsTypeParameter()) {
     if (other_instantiator.IsNull()) {
-      // An uninstantiated type parameter is equivalent to Dynamic.
+      // An uninstantiated type parameter is equivalent to dynamic.
       return true;
     }
     const TypeParameter& other_type_param = TypeParameter::Cast(other);
@@ -8321,12 +8321,12 @@
     if (num_type_params > num_args) {
       first_type_param_index = 0;
       if (!IsFinalized() || IsBeingFinalized() || IsMalformed()) {
-        // Most probably a malformed type. Do not fill up with "Dynamic",
+        // Most probably a malformed type. Do not fill up with "dynamic",
         // but use actual vector.
         num_type_params = num_args;
       } else {
         ASSERT(num_args == 0);  // Type is raw.
-        // No need to fill up with "Dynamic".
+        // No need to fill up with "dynamic".
         num_type_params = 0;
       }
     } else {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8413fc6..5bfa0e0 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -387,7 +387,7 @@
 
   static RawClass* class_class_;  // Class of the Class vm object.
   static RawClass* null_class_;  // Class of the null object.
-  static RawClass* dynamic_class_;  // Class of the 'Dynamic' type.
+  static RawClass* dynamic_class_;  // Class of the 'dynamic' type.
   static RawClass* void_class_;  // Class of the 'void' type.
   static RawClass* unresolved_class_class_;  // Class of UnresolvedClass.
   // Class of the TypeArguments vm object.
@@ -575,7 +575,7 @@
   // Check if this class represents the class of null.
   bool IsNullClass() const { return id() == kNullCid; }
 
-  // Check if this class represents the 'Dynamic' class.
+  // Check if this class represents the 'dynamic' class.
   bool IsDynamicClass() const { return id() == kDynamicCid; }
 
   // Check if this class represents the 'void' class.
@@ -846,12 +846,12 @@
   // Do not canonicalize InstantiatedTypeArguments or NULL objects
   virtual RawAbstractTypeArguments* Canonicalize() const { return this->raw(); }
 
-  // The name of this type argument vector, e.g. "<T, Dynamic, List<T>, Smi>".
+  // The name of this type argument vector, e.g. "<T, dynamic, List<T>, Smi>".
   virtual RawString* Name() const {
     return SubvectorName(0, Length(), kInternalName);
   }
 
-  // The name of this type argument vector, e.g. "<T, Dynamic, List<T>, int>".
+  // The name of this type argument vector, e.g. "<T, dynamic, List<T>, int>".
   // Names of internal classes are mapped to their public interfaces.
   virtual RawString* UserVisibleName() const {
     return SubvectorName(0, Length(), kUserVisibleName);
@@ -917,7 +917,7 @@
                 Error* malformed_error) const;
 
   // Return the internal or public name of a subvector of this type argument
-  // vector, e.g. "<T, Dynamic, List<T>, int>".
+  // vector, e.g. "<T, dynamic, List<T>, int>".
   RawString* SubvectorName(intptr_t from_index,
                            intptr_t len,
                            NameVisibility name_visibility) const;
@@ -3089,7 +3089,7 @@
   // type.
   RawString* ClassName() const;
 
-  // Check if this type represents the 'Dynamic' type.
+  // Check if this type represents the 'dynamic' type.
   bool IsDynamicType() const {
     return HasResolvedTypeClass() && (type_class() == Object::dynamic_class());
   }
@@ -3218,7 +3218,7 @@
   // The type of the literal 'null'.
   static RawType* NullType();
 
-  // The 'Dynamic' type.
+  // The 'dynamic' type.
   static RawType* DynamicType();
 
   // The 'void' type.
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 7ca4b02..4208eec 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -31,6 +31,8 @@
 DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings.");
 DEFINE_FLAG(bool, warn_legacy_map_literal, false,
             "Warning on legacy map literal syntax (single type argument)");
+DEFINE_FLAG(bool, warn_legacy_dynamic, false,
+            "Warning on legacy type Dynamic)");
 
 static void CheckedModeHandler(bool value) {
   FLAG_enable_asserts = value;
@@ -1014,7 +1016,7 @@
   } else if (CurrentToken() == Token::kVAR) {
     ConsumeToken();
     var_seen = true;
-    // The parameter type is the 'Dynamic' type.
+    // The parameter type is the 'dynamic' type.
     parameter.type = &Type::ZoneHandle(Type::DynamicType());
   }
   if (CurrentToken() == Token::kTHIS) {
@@ -2872,7 +2874,7 @@
     }
     ConsumeToken();
     member.has_var = true;
-    // The member type is the 'Dynamic' type.
+    // The member type is the 'dynamic' type.
     member.type = &Type::ZoneHandle(Type::DynamicType());
   } else if (CurrentToken() == Token::kFACTORY) {
     ConsumeToken();
@@ -2996,7 +2998,7 @@
       ErrorMsg("'(' expected");
     }
     // The grammar allows a return type, so member.type is not always NULL here.
-    // If no return type is specified, the return type of the setter is Dynamic.
+    // If no return type is specified, the return type of the setter is dynamic.
     if (member.type == NULL) {
       member.type = &Type::ZoneHandle(Type::DynamicType());
     }
@@ -3673,7 +3675,7 @@
       if (malformed_error->IsNull() && type.IsMalformed()) {
         *malformed_error = type.malformed_error();
       }
-      // Map a malformed type argument to Dynamic, so that malformed types with
+      // Map a malformed type argument to dynamic, so that malformed types with
       // a resolved type class are handled properly in production mode.
       if (type.IsMalformed()) {
         ASSERT(finalization != ClassFinalizer::kCanonicalizeWellFormed);
@@ -5163,7 +5165,7 @@
   bool have_type = false;
   if (CurrentToken() == Token::kCONST) {
     ConsumeToken();
-    have_type = true;  // Type is Dynamic.
+    have_type = true;  // Type is dynamic.
   }
   if (IsIdentifier()) {  // Type or variable name.
     Token::Kind follower = LookaheadToken(1);
@@ -6078,7 +6080,7 @@
       exception_param.var = ExpectIdentifier("identifier expected");
       if (CurrentToken() == Token::kCOMMA) {
         ConsumeToken();
-        // TODO(hausner): Make implicit type be StackTrace, not Dynamic.
+        // TODO(hausner): Make implicit type be StackTrace, not dynamic.
         stack_trace_param.type =
             &AbstractType::ZoneHandle(Type::DynamicType());
         stack_trace_param.token_pos = TokenPos();
@@ -6587,7 +6589,9 @@
     ErrorMsg("%s", msg);
   }
   String* ident = CurrentLiteral();
-  if (ident->Equals("Dynamic")) {
+  // TODO(hausner): Remove check for 'Dynamic' once support for upper-case
+  // type dynamic is gone.
+  if (ident->Equals("Dynamic") || ident->Equals("dynamic")) {
     ErrorMsg("%s", msg);
   }
   ConsumeToken();
@@ -8372,6 +8376,16 @@
     SkipQualIdent();
   } else {
     ParseQualIdent(&type_name);
+    // TODO(hausner): Remove this once support for legacy type 'Dynamic'
+    // is removed.
+    if ((type_name.lib_prefix == NULL) && type_name.ident->Equals("Dynamic")) {
+      if (FLAG_warn_legacy_dynamic) {
+        Warning(type_name.ident_pos,
+                "legacy type 'Dynamic' found; auto-converting to 'dynamic'");
+      }
+      // Replace with lower-case 'dynamic'.
+      *type_name.ident ^= Symbols::Dynamic();
+    }
     // An identifier cannot be resolved in a local scope when top level parsing.
     if (!is_top_level_ &&
         (type_name.lib_prefix == NULL) &&
@@ -8400,7 +8414,7 @@
   }
   AbstractType& type = AbstractType::Handle(
       Type::New(type_class, type_arguments, type_name.ident_pos));
-  // In production mode, malformed type arguments are mapped to Dynamic.
+  // In production mode, malformed type arguments are mapped to dynamic.
   // In checked mode, a type with malformed type arguments is malformed.
   if (FLAG_enable_type_checks && !malformed_error.IsNull()) {
     Type& parameterized_type = Type::Handle();
@@ -8451,7 +8465,7 @@
 
   AbstractType& element_type = Type::ZoneHandle(Type::DynamicType());
   // If no type argument vector is provided, leave it as null, which is
-  // equivalent to using Dynamic as the type argument for the element type.
+  // equivalent to using dynamic as the type argument for the element type.
   if (!type_arguments.IsNull()) {
     ASSERT(type_arguments.Length() > 0);
     // List literals take a single type argument.
@@ -8621,7 +8635,7 @@
   AbstractTypeArguments& map_type_arguments =
       AbstractTypeArguments::ZoneHandle(type_arguments.raw());
   // If no type argument vector is provided, leave it as null, which is
-  // equivalent to using Dynamic as the type argument for the value type.
+  // equivalent to using dynamic as the type argument for the value type.
   if (!map_type_arguments.IsNull()) {
     ASSERT(map_type_arguments.Length() > 0);
     // Map literals take two type arguments.
@@ -8658,7 +8672,7 @@
   ASSERT(map_type_arguments.IsNull() || (map_type_arguments.Length() == 2));
   map_type_arguments ^= map_type_arguments.Canonicalize();
 
-  // The kv_pair array is temporary and of element type Dynamic. It is passed
+  // The kv_pair array is temporary and of element type dynamic. It is passed
   // to the factory to initialize a properly typed map.
   ArrayNode* kv_pairs =
       new ArrayNode(TokenPos(), Type::ZoneHandle(Type::ListInterface()));
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 89f3c7b..070da5a 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -117,7 +117,7 @@
 #undef DEFINE_OBJECT_KIND
 
   // The following entries do not describe a predefined class, but instead
-  // are class indexes for pre-allocated instance (Null, Dynamic and Void).
+  // are class indexes for pre-allocated instance (Null, dynamic and Void).
   kNullCid,
   kDynamicCid,
   kVoidCid,
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index b08deef..85dab77 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -61,7 +61,7 @@
   V(Source, "source")                                                          \
   V(Class, "Class")                                                            \
   V(Null, "Null")                                                              \
-  V(Dynamic, "Dynamic")                                                        \
+  V(Dynamic, "dynamic")                                                        \
   V(Void, "void")                                                              \
   V(UnresolvedClass, "UnresolvedClass")                                        \
   V(Type, "_Type")                                                             \
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 9042a0a..2b70819 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -163,10 +163,10 @@
 Language/10_Expressions/27_Assignable_Expressions_A01_t06: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/27_Assignable_Expressions_A01_t08: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/27_Assignable_Expressions_A01_t09: Fail # TODO(vm-team): Please triage this failure.
+Language/10_Expressions/28_Identifier_Reference_A06_t13: Fail, OK # co19 issue 257
 Language/10_Expressions/28_Identifier_Reference_A04_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/28_Identifier_Reference_A04_t03: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/28_Identifier_Reference_A04_t06: Fail # TODO(vm-team): Please triage this failure.
-Language/10_Expressions/28_Identifier_Reference_A06_t16: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/28_Identifier_Reference_A07_t04: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/29_Type_Test_A01_t02: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/29_Type_Test_A01_t04: Fail # TODO(vm-team): Please triage this failure.
@@ -233,7 +233,6 @@
 Language/07_Classes/07_Classes_A03_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/09_Function_Expressions_A03_t02: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/09_Function_Expressions_A04_t02: Fail # TODO(vm-team): Please triage this failure.
-Language/10_Expressions/09_Function_Expressions_A05_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/10_Expressions/11_Instance_Creation/1_New_A13_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Imports_A03_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/14_Types/7_Type_Void_A04_t02: Fail # TODO(vm-team): Please triage this failure.
diff --git a/tests/corelib/null_test.dart b/tests/corelib/null_test.dart
index 83e82f9..7879ac5 100644
--- a/tests/corelib/null_test.dart
+++ b/tests/corelib/null_test.dart
@@ -8,7 +8,7 @@
   var x;
 
   Expect.isTrue(x is Object);
-  Expect.isTrue(x is Dynamic);
+  Expect.isTrue(x is dynamic);
   Expect.isTrue(x is! String);
   Expect.isTrue(x is! int);
 
diff --git a/tests/language/black_listed_test.dart b/tests/language/black_listed_test.dart
index c14baa7..9e83b0e 100644
--- a/tests/language/black_listed_test.dart
+++ b/tests/language/black_listed_test.dart
@@ -42,9 +42,9 @@
   MyFunctionInterface();                                    /// 12: continued
 }                                                           /// 12: continued
 
-// Dynamic.
-class MyDynamic implements Dynamic {}                      /// 13: compile-time error
-interface MyDynamicInterface extends Dynamic default F {   /// 14: compile-time error
+// dynamic.
+class MyDynamic implements dynamic {}                      /// 13: compile-time error
+interface MyDynamicInterface extends dynamic default F {   /// 14: compile-time error
   MyDynamicInterface();                                    /// 14: continued
 }                                                          /// 14: continued
 
diff --git a/tests/language/cast2_test.dart b/tests/language/cast2_test.dart
index 1ddf873..397ac45 100644
--- a/tests/language/cast2_test.dart
+++ b/tests/language/cast2_test.dart
@@ -17,7 +17,7 @@
   Object oc = new C();
   Object od = new D();
 
-  (oc as Dynamic).bar;  /// 01: runtime error
+  (oc as dynamic).bar;  /// 01: runtime error
 }
 
 
diff --git a/tests/language/cast_test.dart b/tests/language/cast_test.dart
index b73d3c6..6b8eaba 100644
--- a/tests/language/cast_test.dart
+++ b/tests/language/cast_test.dart
@@ -42,12 +42,12 @@
   (on as Object).toString();
   (oc as Object).toString();
   (od as Object).toString();
-  (on as Dynamic).toString();
-  (on as Dynamic).foo;  /// 07: runtime error
-  (oc as Dynamic).foo;
-  (od as Dynamic).foo;
-  (oc as Dynamic).bar;  /// 08: runtime error
-  (od as Dynamic).bar;
+  (on as dynamic).toString();
+  (on as dynamic).foo;  /// 07: runtime error
+  (oc as dynamic).foo;
+  (od as dynamic).foo;
+  (oc as dynamic).bar;  /// 08: runtime error
+  (od as dynamic).bar;
   C c = oc as C;
   c = od as C;
   c = oc;
@@ -57,13 +57,13 @@
 
   (ol as List)[0];
   (ol as List<int>)[0];
-  (ol as Dynamic)[0];
+  (ol as dynamic)[0];
   (ol as String).length;  /// 12: runtime error
   int x = (ol as List<int>)[0];
   (ol as List<int>)[0] = (oi as int);
 
   (os as String).length;
-  (os as Dynamic).length;
+  (os as dynamic).length;
   (oi as String).length;  /// 13: runtime error
   (os as List).length;  /// 14: runtime error
 
diff --git a/tests/language/closure_type_test.dart b/tests/language/closure_type_test.dart
index a3e53e1..13b2ed9 100644
--- a/tests/language/closure_type_test.dart
+++ b/tests/language/closure_type_test.dart
@@ -27,7 +27,7 @@
   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
+    // 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.
diff --git a/tests/language/dynamic_test.dart b/tests/language/dynamic_test.dart
index 924ccbd..eb7160a 100644
--- a/tests/language/dynamic_test.dart
+++ b/tests/language/dynamic_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.
 //
-// Dart test program testing the use of 'Dynamic' in generic types.
+// Dart test program testing the use of 'dynamic' in generic types.
 // @static-clean
 
 interface Iface<K,V> {
@@ -11,39 +11,39 @@
 class M1<K, V> implements Iface<K, V> {
 }
 
-class M2<K> implements Iface<K, Dynamic> {
+class M2<K> implements Iface<K, dynamic> {
 }
 
-class M3 implements Iface<String, Dynamic> {
+class M3 implements Iface<String, dynamic> {
 }
 
-typedef Dynamic F1<T>(Dynamic x, T y);
+typedef dynamic F1<T>(dynamic x, T y);
 
 class HasFieldDynamic {
-  HasFieldDynamic() : Dynamic = "Dynamic" { }
-  var Dynamic;  // Field named Dynamic is allowed.
+  HasFieldDynamic() : dynamic = "dynamic" { }
+  var dynamic;  // Field named dynamic is allowed.
 }
 
 class HasMethodDynamic {
-  Dynamic() => "Dynamic";  // Method named Dynamic is allowed.
+  dynamic() => "dynamic";  // Method named dynamic is allowed.
 }
 
 main() {
-  M1<Dynamic, Dynamic> m1 = new M1<Dynamic, Dynamic>();
-  Expect.isTrue(m1 is Iface<Dynamic, num>);
-  Expect.isTrue(m1 is Iface<String, Dynamic>);
+  M1<dynamic, dynamic> m1 = new M1<dynamic, dynamic>();
+  Expect.isTrue(m1 is Iface<dynamic, num>);
+  Expect.isTrue(m1 is Iface<String, dynamic>);
   Expect.isTrue(m1 is Iface<String, num>);
   Expect.isTrue(m1 is Iface<num, String>);
 
-  M2<Dynamic> m2 = new M2<Dynamic>();
-  Expect.isTrue(m2 is Iface<Dynamic, num>);
-  Expect.isTrue(m2 is Iface<String, Dynamic>);
+  M2<dynamic> m2 = new M2<dynamic>();
+  Expect.isTrue(m2 is Iface<dynamic, num>);
+  Expect.isTrue(m2 is Iface<String, dynamic>);
   Expect.isTrue(m2 is Iface<String, num>);
   Expect.isTrue(m2 is Iface<num, String>);
 
   M3 m3 = new M3();
-  Expect.isTrue(m3 is Iface<Dynamic, num>);
-  Expect.isTrue(m3 is Iface<String, Dynamic>);
+  Expect.isTrue(m3 is Iface<dynamic, num>);
+  Expect.isTrue(m3 is Iface<String, dynamic>);
   Expect.isTrue(m3 is Iface<String, num>);
   Expect.isTrue(m3 is !Iface<num, String>);
 
@@ -51,13 +51,13 @@
   Expect.isTrue(f1 is F1<int>);
 
   HasFieldDynamic has_field = new HasFieldDynamic();
-  Expect.equals("Dynamic", has_field.Dynamic);
+  Expect.equals("dynamic", has_field.dynamic);
 
   HasMethodDynamic has_method = new HasMethodDynamic();
-  Expect.equals("Dynamic", has_method.Dynamic());
+  Expect.equals("dynamic", has_method.dynamic());
 
   {
-    int Dynamic = 0;  // Local variable named Dynamic is allowed.
-    Expect.equals(0, Dynamic);
+    int dynamic = 0;  // Local variable named dynamic is allowed.
+    Expect.equals(0, dynamic);
   }
 }
diff --git a/tests/language/factory2_negative_test.dart b/tests/language/factory2_negative_test.dart
index 7183ccb..c63a1ca 100644
--- a/tests/language/factory2_negative_test.dart
+++ b/tests/language/factory2_negative_test.dart
@@ -15,5 +15,5 @@
 }
 
 main() {
-  var a = new Link.create();  // Equivalent to new Link<Dynamic>.create().
+  var a = new Link.create();  // Equivalent to new Link<dynamic>.create().
 }
diff --git a/tests/language/factory_redirection_test.dart b/tests/language/factory_redirection_test.dart
index eb8b59c..8491bdd 100644
--- a/tests/language/factory_redirection_test.dart
+++ b/tests/language/factory_redirection_test.dart
@@ -13,7 +13,7 @@
 
   factory A.test01() = T;  /// 01: runtime error
 
-  factory A.test02() = Dynamic;  /// 02: runtime error
+  factory A.test02() = dynamic;  /// 02: runtime error
 
   factory A.test03() = Undefined;  /// 03: runtime error
 
diff --git a/tests/language/generic_instanceof2_test.dart b/tests/language/generic_instanceof2_test.dart
index bb67688..bb4d45f 100644
--- a/tests/language/generic_instanceof2_test.dart
+++ b/tests/language/generic_instanceof2_test.dart
@@ -38,7 +38,7 @@
   var foo_raw = new Foo();
   Expect.isTrue(foo_raw is Foo<int, num>);
   Expect.isTrue(foo_raw is Foo<int, String>);
-  // foo_raw.FooString() returns a Foo<Dynamic, String>
+  // foo_raw.FooString() returns a Foo<dynamic, String>
   Expect.isTrue(foo_raw.FooString() is !Foo<int, num>);
   Expect.isTrue(foo_raw.FooString() is Foo<int, String>);
 
@@ -52,7 +52,7 @@
   var moo_raw = new Moo();
   Expect.isTrue(moo_raw is Moo<int, num>);
   Expect.isTrue(moo_raw is Moo<int, String>);
-  // moo_raw.MooString() returns a Moo<Dynamic, String>
+  // moo_raw.MooString() returns a Moo<dynamic, String>
   Expect.isTrue(moo_raw.MooString() is !Moo<int, num>);
   Expect.isTrue(moo_raw.MooString() is Moo<int, String>);
 }
diff --git a/tests/language/generic_test.dart b/tests/language/generic_test.dart
index 59cba41..6b4236e 100644
--- a/tests/language/generic_test.dart
+++ b/tests/language/generic_test.dart
@@ -47,7 +47,7 @@
     D d = new D();
     Expect.equals(true, d.caa_.b_ is B<AA>);
     Expect.equals(true, d.caa_.b_.isT(const AA()));
-    C c = new C(const AA());  // c is of raw type C, T in C<T> is Dynamic.
+    C c = new C(const AA());  // c is of raw type C, T in C<T> is dynamic.
     Expect.equals(true, c.b_ is B);
     Expect.equals(true, c.b_ is B<AA>);
     Expect.equals(true, c.b_.isT(const AA()));
diff --git a/tests/language/generics2_test.dart b/tests/language/generics2_test.dart
index 943b68e..0a28a2f 100644
--- a/tests/language/generics2_test.dart
+++ b/tests/language/generics2_test.dart
@@ -7,7 +7,7 @@
 
 class A<E> { }
 
-class Pair<P, Q> extends A /* i.e. extends A<Dynamic> */ {
+class Pair<P, Q> extends A /* i.e. extends A<dynamic> */ {
   final P fst;
   final Q snd;
   Pair(this.fst, this.snd);
diff --git a/tests/language/import_core_prefix_test.dart b/tests/language/import_core_prefix_test.dart
index d22bbad..782fdf1 100644
--- a/tests/language/import_core_prefix_test.dart
+++ b/tests/language/import_core_prefix_test.dart
@@ -11,5 +11,5 @@
   mycore.bool boolval = false;
   mycore.int variable = 10;
   mycore.num value = 10;
-  mycore.Dynamic d = null;
+  mycore.dynamic d = null;
 }
diff --git a/tests/language/instanceof3_test.dart b/tests/language/instanceof3_test.dart
index e69eb65..4921a181 100644
--- a/tests/language/instanceof3_test.dart
+++ b/tests/language/instanceof3_test.dart
@@ -65,7 +65,7 @@
     bool got_type_error = false;
     var x = new List();
     try {
-      Expect.isTrue(x is List<UndeclaredType>);  // x is a List<Dynamic>.
+      Expect.isTrue(x is List<UndeclaredType>);  // x is a List<dynamic>.
     } on TypeError catch (error) {
       got_type_error = true;
     }
diff --git a/tests/language/language.status b/tests/language/language.status
index 3f2bad9..4768cab 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -87,6 +87,8 @@
 compile_time_constant_checked3_test/06: Fail, OK
 
 [ $compiler == dartc ]
+black_listed_test/13: Fail # Illegal use of 'dynamic'
+black_listed_test/14: Fail # Illegal use of 'dynamic'
 implicit_this_test/none: Fail # should not warn about allocating SubAbstract2
 metadata_test: Fail
 get_set_syntax_test/none: Fail # does not accept getter/setter with no method body
diff --git a/tests/language/prefix16_test.dart b/tests/language/prefix16_test.dart
index 15cea97..b32b82a 100644
--- a/tests/language/prefix16_test.dart
+++ b/tests/language/prefix16_test.dart
@@ -37,7 +37,7 @@
   {
     bool got_type_error = false;
     try {
-      // In production mode, malformed myFunc is mapped to (Dynamic) => Dynamic.
+      // In production mode, malformed myFunc is mapped to (dynamic) => dynamic.
       Expect.isTrue(((int x) => x) is myFunc);
     } on TypeError catch (error) {
       got_type_error = true;
diff --git a/tests/language/pseudo_kw_illegal_test.dart b/tests/language/pseudo_kw_illegal_test.dart
index 13c042c..5a113a3 100644
--- a/tests/language/pseudo_kw_illegal_test.dart
+++ b/tests/language/pseudo_kw_illegal_test.dart
@@ -6,7 +6,7 @@
 // Pseudo keywords are not allowed to be used as class names.
 class abstract { }    /// 01: compile-time error
 class assert { }      /// 02: compile-time error
-class Dynamic { }     /// 04: compile-time error
+class dynamic { }     /// 04: compile-time error
 class factory { }     /// 05: compile-time error
 class get { }         /// 06: compile-time error
 class implements { }  /// 07: compile-time error
diff --git a/tests/language/pseudo_kw_test.dart b/tests/language/pseudo_kw_test.dart
index 2b764cd..2c9614d 100644
--- a/tests/language/pseudo_kw_test.dart
+++ b/tests/language/pseudo_kw_test.dart
@@ -13,7 +13,7 @@
     var abstract = 0;
     var as = 0;
     var call = 0;
-    var Dynamic = 0;
+    var dynamic = 0;
     var factory = 0;
     var get = 0;
     var implements = 0;
diff --git a/tests/language/setter3_test.dart b/tests/language/setter3_test.dart
index e21ca8c..3253a6e 100644
--- a/tests/language/setter3_test.dart
+++ b/tests/language/setter3_test.dart
@@ -9,7 +9,7 @@
 class A {
   set foo(x) {}
   void set bar(x) {}
-  Dynamic set baz(x) {} /// 01: static type warning
+  dynamic set baz(x) {} /// 01: static type warning
   bool set bob(x) {} /// 02: static type warning
 }
 
diff --git a/tests/language/type_cast_vm_test.dart b/tests/language/type_cast_vm_test.dart
index d95742a..22e3437 100644
--- a/tests/language/type_cast_vm_test.dart
+++ b/tests/language/type_cast_vm_test.dart
@@ -132,7 +132,7 @@
     } on TypeError catch (error) {
       result = 1;
       Expect.equals("int", error.dstType);
-      Expect.equals("() => Dynamic", error.srcType);
+      Expect.equals("() => dynamic", error.srcType);
       Expect.equals("type cast", error.dstName);
       int pos = error.url.lastIndexOf("/", error.url.length);
       if (pos == -1) {
diff --git a/tests/language/type_vm_test.dart b/tests/language/type_vm_test.dart
index d98a181..7b525a1 100644
--- a/tests/language/type_vm_test.dart
+++ b/tests/language/type_vm_test.dart
@@ -124,7 +124,7 @@
     } on TypeError catch (error) {
       result = 1;
       Expect.equals("int", error.dstType);
-      Expect.equals("() => Dynamic", error.srcType);
+      Expect.equals("() => dynamic", error.srcType);
       Expect.equals("i", error.dstName);
       int pos = error.url.lastIndexOf("/", error.url.length);
       if (pos == -1) {
diff --git a/tools/VERSION b/tools/VERSION
index 53e2662..83c6875 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 1
-BUILD 4
-PATCH 1
+BUILD 5
+PATCH 0
diff --git a/utils/compiler/buildbot.py b/utils/compiler/buildbot.py
index cee9ce3..a66d6b0 100644
--- a/utils/compiler/buildbot.py
+++ b/utils/compiler/buildbot.py
@@ -296,7 +296,7 @@
 
   return 0
 
-def _DeleteFirefoxProfiles(directory):
+def _DeleteTempWebdriverProfiles(directory):
   """Find all the firefox profiles in a particular directory and delete them."""
   for f in os.listdir(directory):
     item = os.path.join(directory, f)
@@ -324,12 +324,12 @@
   if system == 'win7':
     shutil.rmtree('C:\\Users\\chrome-bot\\AppData\\Local\\Temp',
         ignore_errors=True)
-  elif browser == 'ff':
+  elif browser == 'ff' or 'opera':
     # Note: the buildbots run as root, so we can do this without requiring a
     # password. The command won't actually work on regular machines without
     # root permissions.
-    _DeleteFirefoxProfiles('/tmp')
-    _DeleteFirefoxProfiles('/var/tmp')
+    _DeleteTempWebdriverProfiles('/tmp')
+    _DeleteTempWebdriverProfiles('/var/tmp')
 
 def ClobberBuilder(mode):
   """ Clobber the builder before we do the build.