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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 111283006: Revert "Compute correct constructor type for synthesized mixin constructors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../../compiler.dart' as api; 8 import '../../compiler.dart' as api;
9 import '../tree/tree.dart'; 9 import '../tree/tree.dart';
10 import '../util/util.dart'; 10 import '../util/util.dart';
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 } 1511 }
1512 assert(!isRedirectingFactory || internalRedirectionTarget != null); 1512 assert(!isRedirectingFactory || internalRedirectionTarget != null);
1513 return isRedirectingFactory ? internalRedirectionTarget : this; 1513 return isRedirectingFactory ? internalRedirectionTarget : this;
1514 } 1514 }
1515 1515
1516 InterfaceType computeTargetType(InterfaceType newType) { 1516 InterfaceType computeTargetType(InterfaceType newType) {
1517 if (!isRedirectingFactory) return newType; 1517 if (!isRedirectingFactory) return newType;
1518 assert(invariant(this, redirectionTargetType != null, 1518 assert(invariant(this, redirectionTargetType != null,
1519 message: 'Redirection target type has not yet been computed for ' 1519 message: 'Redirection target type has not yet been computed for '
1520 '$this.')); 1520 '$this.'));
1521 return redirectionTargetType.substByContext(newType); 1521 return redirectionTargetType.subst(newType.typeArguments,
1522 newType.element.typeVariables);
1522 } 1523 }
1523 1524
1524 /** 1525 /**
1525 * Applies a patch function to this function. The patch function's body 1526 * Applies a patch function to this function. The patch function's body
1526 * is used as replacement when parsing this function's body. 1527 * is used as replacement when parsing this function's body.
1527 * This method must not be called after the function has been parsed, 1528 * This method must not be called after the function has been parsed,
1528 * and it must be called at most once. 1529 * and it must be called at most once.
1529 */ 1530 */
1530 void setPatch(FunctionElement patchElement) { 1531 void setPatch(FunctionElement patchElement) {
1531 // Sanity checks. The caller must check these things before calling. 1532 // Sanity checks. The caller must check these things before calling.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 if (functionSignature != null) return functionSignature; 1664 if (functionSignature != null) return functionSignature;
1664 if (isDefaultConstructor) { 1665 if (isDefaultConstructor) {
1665 return functionSignature = new FunctionSignatureX( 1666 return functionSignature = new FunctionSignatureX(
1666 const Link<Element>(), const Link<Element>(), 0, 0, false, 1667 const Link<Element>(), const Link<Element>(), 0, 0, false,
1667 getEnclosingClass().thisType); 1668 getEnclosingClass().thisType);
1668 } 1669 }
1669 if (superMember.isErroneous()) { 1670 if (superMember.isErroneous()) {
1670 return functionSignature = compiler.objectClass.localLookup('') 1671 return functionSignature = compiler.objectClass.localLookup('')
1671 .computeSignature(compiler); 1672 .computeSignature(compiler);
1672 } 1673 }
1673 // TODO(johnniwinther): Ensure that the function signature (and with it the
1674 // function type) substitutes type variables correctly.
1675 return functionSignature = superMember.computeSignature(compiler); 1674 return functionSignature = superMember.computeSignature(compiler);
1676 } 1675 }
1677 1676
1678 get declaration => this; 1677 get declaration => this;
1679 get implementation => this; 1678 get implementation => this;
1680 get defaultImplementation => this; 1679 get defaultImplementation => this;
1681 1680
1682 accept(ElementVisitor visitor) { 1681 accept(ElementVisitor visitor) {
1683 return visitor.visitFunctionElement(this); 1682 return visitor.visitFunctionElement(this);
1684 } 1683 }
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 2440
2442 MetadataAnnotation ensureResolved(Compiler compiler) { 2441 MetadataAnnotation ensureResolved(Compiler compiler) {
2443 if (resolutionState == STATE_NOT_STARTED) { 2442 if (resolutionState == STATE_NOT_STARTED) {
2444 compiler.resolver.resolveMetadataAnnotation(this); 2443 compiler.resolver.resolveMetadataAnnotation(this);
2445 } 2444 }
2446 return this; 2445 return this;
2447 } 2446 }
2448 2447
2449 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2448 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2450 } 2449 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698