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

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

Issue 1391193002: Make computeSignature private to modelx. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart2js.resolution.signatures; 5 library dart2js.resolution.signatures;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../diagnostics/diagnostic_listener.dart' show 10 import '../diagnostics/diagnostic_listener.dart' show
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 } 120 }
121 121
122 void computeParameterType(FormalElementX element, 122 void computeParameterType(FormalElementX element,
123 [VariableElement fieldElement]) { 123 [VariableElement fieldElement]) {
124 void computeFunctionType(FunctionExpression functionExpression) { 124 void computeFunctionType(FunctionExpression functionExpression) {
125 FunctionSignature functionSignature = SignatureResolver.analyze( 125 FunctionSignature functionSignature = SignatureResolver.analyze(
126 compiler, functionExpression.parameters, 126 compiler, functionExpression.parameters,
127 functionExpression.returnType, element, registry, 127 functionExpression.returnType, element, registry,
128 defaultValuesError: MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT); 128 defaultValuesError: MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT);
129 element.functionSignatureCache = functionSignature; 129 element.functionSignature = functionSignature;
130 element.typeCache = functionSignature.type;
131 } 130 }
132 131
133 if (currentDefinitions.type != null) { 132 if (currentDefinitions.type != null) {
134 element.typeCache = resolveTypeAnnotation(currentDefinitions.type); 133 element.typeCache = resolveTypeAnnotation(currentDefinitions.type);
135 } else { 134 } else {
136 // Is node.definitions exactly one FunctionExpression? 135 // Is node.definitions exactly one FunctionExpression?
137 Link<Node> link = currentDefinitions.definitions.nodes; 136 Link<Node> link = currentDefinitions.definitions.nodes;
138 assert(invariant(currentDefinitions, !link.isEmpty)); 137 assert(invariant(currentDefinitions, !link.isEmpty));
139 assert(invariant(currentDefinitions, link.tail.isEmpty)); 138 assert(invariant(currentDefinitions, link.tail.isEmpty));
140 if (link.head.asFunctionExpression() != null) { 139 if (link.head.asFunctionExpression() != null) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 442
444 DartType resolveReturnType(TypeAnnotation annotation) { 443 DartType resolveReturnType(TypeAnnotation annotation) {
445 if (annotation == null) return const DynamicType(); 444 if (annotation == null) return const DynamicType();
446 DartType result = resolver.resolveTypeAnnotation(annotation); 445 DartType result = resolver.resolveTypeAnnotation(annotation);
447 if (result == null) { 446 if (result == null) {
448 return const DynamicType(); 447 return const DynamicType();
449 } 448 }
450 return result; 449 return result;
451 } 450 }
452 } 451 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/compiler/dart2js/call_site_simple_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698