Remove references to capital-D-Dynamic.
Review URL: https://codereview.chromium.org//12615002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19687 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -1224,7 +1224,7 @@ class _Deserializer {
|
||||
|
||||
deserialize(x) {
|
||||
if (isPrimitive(x)) return x;
|
||||
// TODO(floitsch): this should be new HashMap<int, var|Dynamic>()
|
||||
// TODO(floitsch): this should be new HashMap<int, dynamic>()
|
||||
_deserialized = new HashMap();
|
||||
return _deserializeHelper(x);
|
||||
}
|
||||
|
||||
@@ -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_ {
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<TypeMask> {
|
||||
|
||||
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> {
|
||||
TypeMask receiverType = element != null
|
||||
? inferrer.dynamicType
|
||||
: visit(node.receiver);
|
||||
|
||||
|
||||
TypeMask rhsType = isIncrementOrDecrement
|
||||
? inferrer.intType
|
||||
: node.isIndex
|
||||
@@ -1095,7 +1095,7 @@ class SimpleTypeInferrerVisitor extends ResolvedVisitor<TypeMask> {
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?:void|bool|num|int|double|Dynamic|var|String)\b</string>
|
||||
<string>\b(?:void|bool|num|int|double|dynamic|var|String)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.primitive.dart</string>
|
||||
</dict>
|
||||
|
||||
@@ -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--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user