Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 794933004: Remove tracking of factories used with type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update test expectation. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 3276 matching lines...) Expand 10 before | Expand all | Expand 10 after
3287 } 3287 }
3288 3288
3289 InterfaceType type = registry.getType(node); 3289 InterfaceType type = registry.getType(node);
3290 if (node.isConst && type.containsTypeVariables) { 3290 if (node.isConst && type.containsTypeVariables) {
3291 compiler.reportError(node.send.selector, 3291 compiler.reportError(node.send.selector,
3292 MessageKind.TYPE_VARIABLE_IN_CONSTANT); 3292 MessageKind.TYPE_VARIABLE_IN_CONSTANT);
3293 } 3293 }
3294 // TODO(johniwinther): Avoid registration of `type` in face of redirecting 3294 // TODO(johniwinther): Avoid registration of `type` in face of redirecting
3295 // factory constructors. 3295 // factory constructors.
3296 registry.registerInstantiatedType(type); 3296 registry.registerInstantiatedType(type);
3297 if (constructor.isFactoryConstructor && !type.typeArguments.isEmpty) {
3298 registry.registerFactoryWithTypeArguments();
3299 }
3300 if (constructor.isGenerativeConstructor && cls.isAbstract) { 3297 if (constructor.isGenerativeConstructor && cls.isAbstract) {
3301 warning(node, MessageKind.ABSTRACT_CLASS_INSTANTIATION); 3298 warning(node, MessageKind.ABSTRACT_CLASS_INSTANTIATION);
3302 registry.registerAbstractClassInstantiation(); 3299 registry.registerAbstractClassInstantiation();
3303 } 3300 }
3304 3301
3305 if (isSymbolConstructor) { 3302 if (isSymbolConstructor) {
3306 if (node.isConst) { 3303 if (node.isConst) {
3307 Node argumentNode = node.send.arguments.head; 3304 Node argumentNode = node.send.arguments.head;
3308 ConstantExpression constant = 3305 ConstantExpression constant =
3309 compiler.resolver.constantCompiler.compileNode( 3306 compiler.resolver.constantCompiler.compileNode(
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
5032 } 5029 }
5033 5030
5034 /// The result for the resolution of the `assert` method. 5031 /// The result for the resolution of the `assert` method.
5035 class AssertResult implements ResolutionResult { 5032 class AssertResult implements ResolutionResult {
5036 const AssertResult(); 5033 const AssertResult();
5037 5034
5038 Element get element => null; 5035 Element get element => null;
5039 5036
5040 String toString() => 'AssertResult()'; 5037 String toString() => 'AssertResult()';
5041 } 5038 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/runtime_types.dart ('k') | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698