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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2108673002: Effective type can be malformed. (Closed) Base URL: sso://user/ahe/dart-sdk@vm_patch_files
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution, Parsing; 8 import '../common/resolution.dart' show Resolution, Parsing;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/constant_constructors.dart'; 10 import '../constants/constant_constructors.dart';
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 assert(!isRedirectingFactory || effectiveTargetInternal != null); 2220 assert(!isRedirectingFactory || effectiveTargetInternal != null);
2221 if (isRedirectingFactory) { 2221 if (isRedirectingFactory) {
2222 return effectiveTargetInternal; 2222 return effectiveTargetInternal;
2223 } 2223 }
2224 if (isPatched) { 2224 if (isPatched) {
2225 return effectiveTargetInternal ?? this; 2225 return effectiveTargetInternal ?? this;
2226 } 2226 }
2227 return this; 2227 return this;
2228 } 2228 }
2229 2229
2230 InterfaceType get effectiveTargetType { 2230 DartType get effectiveTargetType {
2231 assert(invariant(this, _effectiveTargetType != null, 2231 assert(invariant(this, _effectiveTargetType != null,
2232 message: 'Effective target type has not yet been computed for $this.')); 2232 message: 'Effective target type has not yet been computed for $this.'));
2233 return _effectiveTargetType; 2233 return _effectiveTargetType;
2234 } 2234 }
2235 2235
2236 InterfaceType computeEffectiveTargetType(InterfaceType newType) { 2236 DartType computeEffectiveTargetType(InterfaceType newType) {
2237 if (!isRedirectingFactory) return newType; 2237 if (!isRedirectingFactory) return newType;
2238 return effectiveTargetType.substByContext(newType); 2238 return effectiveTargetType.substByContext(newType);
2239 } 2239 }
2240 2240
2241 bool get isEffectiveTargetMalformed { 2241 bool get isEffectiveTargetMalformed {
2242 if (!isRedirectingFactory) return false; 2242 if (!isRedirectingFactory) return false;
2243 assert(invariant(this, _isEffectiveTargetMalformed != null, 2243 assert(invariant(this, _isEffectiveTargetMalformed != null,
2244 message: 'Malformedness has not yet been computed for $this.')); 2244 message: 'Malformedness has not yet been computed for $this.'));
2245 return _isEffectiveTargetMalformed == true; 2245 return _isEffectiveTargetMalformed == true;
2246 } 2246 }
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 3127
3128 bool get hasResolvedAst { 3128 bool get hasResolvedAst {
3129 return definingElement.hasNode && definingElement.hasTreeElements; 3129 return definingElement.hasNode && definingElement.hasTreeElements;
3130 } 3130 }
3131 3131
3132 ResolvedAst get resolvedAst { 3132 ResolvedAst get resolvedAst {
3133 return new ResolvedAst( 3133 return new ResolvedAst(
3134 declaration, definingElement.node, definingElement.treeElements); 3134 declaration, definingElement.node, definingElement.treeElements);
3135 } 3135 }
3136 } 3136 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698