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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1165363004: Remove computeSignature from FunctionElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/elements/elements.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 964cb741f3ed68b3d23340319d8c771fd1c40845..6ea3bb0348ab96aa4d497b4a79b9b1aaf2ece015 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2142,6 +2142,7 @@ class SynthesizedConstructorElementX extends ConstructorElementX {
Modifiers.EMPTY,
enclosing) {
typeCache = new FunctionType.synthesized(enclosingClass.thisType);
+ functionSignatureCache = new FunctionSignatureX(type: type);
}
FunctionExpression parseNode(DiagnosticListener listener) => null;
@@ -2166,18 +2167,16 @@ class SynthesizedConstructorElementX extends ConstructorElementX {
FunctionSignature computeSignature(compiler) {
if (functionSignatureCache != null) return functionSignatureCache;
- if (isDefaultConstructor) {
- return functionSignatureCache = new FunctionSignatureX(
- type: type);
- }
if (definingConstructor.isErroneous) {
return functionSignatureCache =
compiler.objectClass.localLookup('').computeSignature(compiler);
}
// TODO(johnniwinther): Ensure that the function signature (and with it the
// function type) substitutes type variables correctly.
- return functionSignatureCache =
- definingConstructor.computeSignature(compiler);
+ definingConstructor.computeType(compiler);
+ functionSignatureCache = definingConstructor.functionSignature;
+ typeCache = definingConstructor.type;
+ return functionSignatureCache;
}
accept(ElementVisitor visitor, arg) {
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698