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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 1308153007: Revert "Prepare for computation of NewStructure in Resolution." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index e47a5c4eb5652def078b44630b7c474b7d41dd2a..16aa1a2f704e39a5db01677e6b8aa288577b951f 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -49,8 +49,7 @@ import 'operators.dart';
import 'send_structure.dart';
import 'constructors.dart' show
- ConstructorResolver,
- ConstructorResult;
+ ConstructorResolver;
import 'label_scope.dart' show
StatementScope;
import 'registry.dart' show
@@ -3637,7 +3636,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
bool isConstConstructor = constructor.isConst;
bool isValidAsConstant = isConstConstructor;
ConstructorElement redirectionTarget = resolveRedirectingFactory(
- node, inConstContext: isConstConstructor).element;
+ node, inConstContext: isConstConstructor);
constructor.immediateRedirectionTarget = redirectionTarget;
Node constructorReference = node.constructorReference;
@@ -3815,7 +3814,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
ResolutionResult visitNewExpression(NewExpression node) {
bool isValidAsConstant = true;
- ConstructorElement constructor = resolveConstructor(node).element;
+ FunctionElement constructor = resolveConstructor(node);
final bool isSymbolConstructor = constructor == compiler.symbolConstructor;
final bool isMirrorsUsedConstant =
node.isConst && (constructor == compiler.mirrorsUsedConstructor);
@@ -3857,6 +3856,8 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
// factory constructors.
registry.registerInstantiatedType(type);
if (constructor.isGenerativeConstructor && cls.isAbstract) {
+ warning(node, MessageKind.ABSTRACT_CLASS_INSTANTIATION);
+ registry.registerAbstractClassInstantiation();
isValidAsConstant = false;
}
@@ -3992,15 +3993,14 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
* Note: this function may return an ErroneousFunctionElement instead of
* [:null:], if there is no corresponding constructor, class or library.
*/
- ConstructorResult resolveConstructor(NewExpression node) {
- return node.accept(new ConstructorResolver(
- compiler, this, inConstContext: node.isConst));
+ ConstructorElement resolveConstructor(NewExpression node) {
+ return node.accept(new ConstructorResolver(compiler, this));
}
- ConstructorResult resolveRedirectingFactory(RedirectingFactoryBody node,
+ ConstructorElement resolveRedirectingFactory(RedirectingFactoryBody node,
{bool inConstContext: false}) {
- return node.accept(new ConstructorResolver(
- compiler, this, inConstContext: inConstContext));
+ return node.accept(new ConstructorResolver(compiler, this,
+ inConstContext: inConstContext));
}
DartType resolveTypeAnnotation(TypeAnnotation node,
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698