diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart index d8c78e12bdb..6de72055ccc 100644 --- a/runtime/lib/mirrors_impl.dart +++ b/runtime/lib/mirrors_impl.dart @@ -56,7 +56,7 @@ class _LocalMirrorSystemImpl implements MirrorSystem { if (_dynamicType == null) { _dynamicType = new _LocalClassMirrorImpl( - null, 'Dynamic', false, null, null, [], null, + null, 'dynamic', false, null, null, [], null, const {}, const {}, const {}); } return _dynamicType; @@ -340,8 +340,7 @@ class _LazyTypeMirror { TypeMirror resolve(MirrorSystem mirrors) { if (libraryName == null) { - // TODO(turnidge): Remove support for 'Dynamic'. - if ((typeName == 'dynamic') || (typeName == 'Dynamic')) { + if (typeName == 'dynamic') { return mirrors.dynamicType; } else if (typeName == 'void') { return mirrors.voidType; @@ -385,7 +384,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl } } else { // The owner of a ClassMirror is null in certain odd cases, like - // 'void', 'Dynamic' and function type mirrors. + // 'void', 'dynamic' and function type mirrors. _qualifiedName = simpleName; } return _qualifiedName; diff --git a/runtime/tests/vm/dart/isolate_mirror_local_test.dart b/runtime/tests/vm/dart/isolate_mirror_local_test.dart index 94eaa3fa8a2..5d2e6874d52 100644 --- a/runtime/tests/vm/dart/isolate_mirror_local_test.dart +++ b/runtime/tests/vm/dart/isolate_mirror_local_test.dart @@ -270,7 +270,7 @@ void testRootLibraryMirror(LibraryMirror lib_mirror) { variable = cls_mirror.members['value']; Expect.isTrue(variable is VariableMirror); - Expect.equals('value type(Dynamic) final', buildVariableString(variable)); + Expect.equals('value type(dynamic) final', buildVariableString(variable)); // Test type variable mirrors. var type_var = generic_cls_mirror.members['method'].returnType; @@ -331,7 +331,7 @@ void testMirrorSystem(MirrorSystem mirrors) { testRootLibraryMirror(mirrors.isolate.rootLibrary); testLibrariesMap(mirrors.libraries); Expect.equals('void', mirrors.voidType.simpleName); - Expect.equals('Dynamic', mirrors.dynamicType.simpleName); + Expect.equals('dynamic', mirrors.dynamicType.simpleName); testDone('testMirrorSystem'); } diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart index 539e7b49baf..f33154dc95d 100644 --- a/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart +++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart @@ -1224,7 +1224,7 @@ class _Deserializer { deserialize(x) { if (isPrimitive(x)) return x; - // TODO(floitsch): this should be new HashMap() + // TODO(floitsch): this should be new HashMap() _deserialized = new HashMap(); return _deserializeHelper(x); } diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart index f9a3af7c6ad..1db4e07bc91 100644 --- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart +++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart @@ -934,7 +934,7 @@ jsPropertyAccess(var jsObject, String property) { getFallThroughError() => const FallThroughErrorImplementation(); /** - * Represents the type Dynamic. The compiler treats this specially. + * Represents the type dynamic. The compiler treats this specially. */ abstract class Dynamic_ { } diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart index 5985ca83ee7..f9409837c98 100644 --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart @@ -1409,10 +1409,6 @@ class TypeResolver { String stringValue = typeName.source.stringValue; if (identical(stringValue, 'void')) { return compiler.types.voidType.element; - } else if (identical(stringValue, 'Dynamic')) { - // TODO(aprelev@gmail.com): Remove deprecated Dynamic keyword support. - compiler.onDeprecatedFeature(typeName, 'Dynamic'); - return compiler.dynamicClass; } else if (identical(stringValue, 'dynamic')) { return compiler.dynamicClass; } else { diff --git a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart index 5f7c700f12c..f232595bacc 100644 --- a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart +++ b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart @@ -430,7 +430,7 @@ class SimpleTypesInferrer extends TypesInferrer { } /** - * Returns the return type of [element]. Returns [:Dynamic:] if + * Returns the return type of [element]. Returns [:dynamic:] if * [element] has not been analyzed yet. */ TypeMask returnTypeOfElement(Element element) { @@ -447,7 +447,7 @@ class SimpleTypesInferrer extends TypesInferrer { } /** - * Returns the type of [element]. Returns [:Dynamic:] if + * Returns the type of [element]. Returns [:dynamic:] if * [element] has not been analyzed yet. */ TypeMask typeOfElement(Element element) { @@ -974,7 +974,7 @@ class SimpleTypeInferrerVisitor extends ResolvedVisitor { Selector getterSelector = elements.getGetterSelectorInComplexSendSet(node); - Selector operatorSelector = + Selector operatorSelector = elements.getOperatorSelectorInComplexSendSet(node); Selector setterSelector = elements.getSelector(node); @@ -984,7 +984,7 @@ class SimpleTypeInferrerVisitor extends ResolvedVisitor { TypeMask receiverType = element != null ? inferrer.dynamicType : visit(node.receiver); - + TypeMask rhsType = isIncrementOrDecrement ? inferrer.intType : node.isIndex @@ -1095,7 +1095,7 @@ class SimpleTypeInferrerVisitor extends ResolvedVisitor { } else { analyzeArguments(node.arguments); // Closure call on a getter. We don't have function types yet, - // so we just return [:Dynamic:]. + // so we just return [:dynamic:]. return inferrer.dynamicType; } } diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart index 26579b43088..2610c3d9a8a 100644 --- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart +++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart @@ -1671,7 +1671,7 @@ class Dartdoc { annotateType(ContainerMirror enclosingType, TypeMirror type, [String paramName = null]) { - // Don't bother explicitly displaying Dynamic. + // Don't bother explicitly displaying dynamic. if (type.isDynamic) { if (paramName != null) write(paramName); return; @@ -1701,7 +1701,7 @@ class Dartdoc { return; } if (type.isDynamic) { - // Do not generate links for Dynamic. + // Do not generate links for dynamic. write('dynamic'); return; } diff --git a/tests/compiler/dart2js/mirrors_test.dart b/tests/compiler/dart2js/mirrors_test.dart index 20c3f35e59a..f32e36e8ea1 100644 --- a/tests/compiler/dart2js/mirrors_test.dart +++ b/tests/compiler/dart2js/mirrors_test.dart @@ -110,7 +110,7 @@ void testFoo(MirrorSystem system, LibraryMirror helperLibrary, "Unexpected library returned from type"); Expect.isFalse(fooClass.isObject, "Class is Object"); - Expect.isFalse(fooClass.isDynamic, "Class is Dynamic"); + Expect.isFalse(fooClass.isDynamic, "Class is dynamic"); Expect.isFalse(fooClass.isVoid, "Class is void"); Expect.isFalse(fooClass.isTypeVariable, "Class is a type variable"); Expect.isFalse(fooClass.isTypedef, "Class is a typedef"); @@ -437,7 +437,7 @@ void testBar(MirrorSystem system, LibraryMirror helperLibrary, "Unexpected library returned from type"); Expect.isFalse(barClass.isObject, "Interface is Object"); - Expect.isFalse(barClass.isDynamic, "Interface is Dynamic"); + Expect.isFalse(barClass.isDynamic, "Interface is dynamic"); Expect.isFalse(barClass.isVoid, "Interface is void"); Expect.isFalse(barClass.isTypeVariable, "Interface is a type variable"); Expect.isFalse(barClass.isTypedef, "Interface is a typedef"); @@ -531,7 +531,7 @@ void testBaz(MirrorSystem system, LibraryMirror helperLibrary, "Unexpected library returned from type"); Expect.isFalse(bazClass.isObject, "Class is Object"); - Expect.isFalse(bazClass.isDynamic, "Class is Dynamic"); + Expect.isFalse(bazClass.isDynamic, "Class is dynamic"); Expect.isFalse(bazClass.isVoid, "Class is void"); Expect.isFalse(bazClass.isTypeVariable, "Class is a type variable"); Expect.isFalse(bazClass.isTypedef, "Class is a typedef"); @@ -642,12 +642,12 @@ void testBaz(MirrorSystem system, LibraryMirror helperLibrary, var dynamicType = method1.returnType; Expect.isNotNull(dynamicType, "Return type was null"); - Expect.isFalse(dynamicType.isObject, "Dynamic is Object"); - Expect.isTrue(dynamicType.isDynamic, "Dynamic is not Dynamic"); - Expect.isFalse(dynamicType.isVoid, "Dynamic is void"); - Expect.isFalse(dynamicType.isTypeVariable, "Dynamic is a type variable"); - Expect.isFalse(dynamicType.isTypedef, "Dynamic is a typedef"); - Expect.isFalse(dynamicType.isFunction, "Dynamic is a function"); + Expect.isFalse(dynamicType.isObject, "dynamic is Object"); + Expect.isTrue(dynamicType.isDynamic, "dynamic is not dynamic"); + Expect.isFalse(dynamicType.isVoid, "dynamic is void"); + Expect.isFalse(dynamicType.isTypeVariable, "dynamic is a type variable"); + Expect.isFalse(dynamicType.isTypedef, "dynamic is a typedef"); + Expect.isFalse(dynamicType.isFunction, "dynamic is a function"); var method1Parameters = method1.parameters; Expect.isNotNull(method1Parameters, "Method parameters is null"); @@ -697,7 +697,7 @@ void testBaz(MirrorSystem system, LibraryMirror helperLibrary, var voidType = method2.returnType; Expect.isNotNull(voidType, "Return type was null"); Expect.isFalse(voidType.isObject, "void is Object"); - Expect.isFalse(voidType.isDynamic, "void is Dynamic"); + Expect.isFalse(voidType.isDynamic, "void is dynamic"); Expect.isTrue(voidType.isVoid, "void is not void"); Expect.isFalse(voidType.isTypeVariable, "void is a type variable"); Expect.isFalse(voidType.isTypedef, "void is a typedef"); @@ -811,7 +811,7 @@ void testBaz(MirrorSystem system, LibraryMirror helperLibrary, Expect.stringEquals("mirrors_helper.Func", funcTypedef.qualifiedName, "Unexpected simpleName"); Expect.isFalse(funcTypedef.isObject, "Typedef is Object"); - Expect.isFalse(funcTypedef.isDynamic, "Typedef is Dynamic"); + Expect.isFalse(funcTypedef.isDynamic, "Typedef is dynamic"); Expect.isFalse(funcTypedef.isVoid, "Typedef is void"); Expect.isFalse(funcTypedef.isTypeVariable, "Typedef is a type variable"); Expect.isTrue(funcTypedef.isTypedef, "Typedef is not a typedef"); diff --git a/tests/corelib/collection_test.dart b/tests/corelib/collection_test.dart index 64dfe2b65ea..8ef81f7a042 100644 --- a/tests/corelib/collection_test.dart +++ b/tests/corelib/collection_test.dart @@ -31,10 +31,10 @@ main() { } new CollectionTest(fixedList); - // Dynamic size list. + // Growable list. new CollectionTest(new List.from(TEST_ELEMENTS)); - // Dynamic size set. + // Set. new CollectionTest(new Set.from(TEST_ELEMENTS)); // Queue. diff --git a/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.textmate b/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.textmate index d04d533a71c..adfc7fce9bd 100644 --- a/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.textmate +++ b/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.textmate @@ -112,7 +112,7 @@ match = '\b(static|final|const)\b'; }, { name = 'storage.type.primitive.dart'; - match = '\b(?:void|bool|num|int|double|Dynamic|var|String)\b'; + match = '\b(?:void|bool|num|int|double|dynamic|var|String)\b'; }, ); }; diff --git a/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.tmLanguage b/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.tmLanguage index 2d6304a6fa1..61727e2a710 100644 --- a/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.tmLanguage +++ b/tools/utils/textmate/Dart.tmbundle/Syntaxes/Dart.tmLanguage @@ -268,7 +268,7 @@ match - \b(?:void|bool|num|int|double|Dynamic|var|String)\b + \b(?:void|bool|num|int|double|dynamic|var|String)\b name storage.type.primitive.dart diff --git a/utils/template/htmltree.dart b/utils/template/htmltree.dart index 16db0a9f22e..2d08b02bc65 100644 --- a/utils/template/htmltree.dart +++ b/utils/template/htmltree.dart @@ -361,10 +361,10 @@ class TreePrinter implements TreeVisitor { void visitTemplateDocument(TemplateDocument node) { output.heading('Content', node.span); output.depth++; - // TODO(terry): Ugly use of 'as Dynamic' instead of children[0] to + // TODO(terry): Ugly use of 'as dynamic' instead of children[0] to // surpress warning. assert(node.children.length == 1 && - (node.children as Dynamic)[0].tagTokenId == -1); + (node.children as dynamic)[0].tagTokenId == -1); output.writeNodeList("document", node.children); output.depth--; }