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

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

Issue 1286993004: Split resolution into several libraries. (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 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 part of resolution; 5 library dart2js.resolution.signatures;
6
7 import '../compiler.dart' show
8 Compiler,
9 isPrivateName;
10 import '../dart_types.dart';
11 import '../diagnostics/invariant.dart' show
12 invariant;
13 import '../diagnostics/messages.dart' show
14 MessageKind;
15 import '../elements/elements.dart';
16 import '../elements/modelx.dart' show
17 ErroneousFieldElementX,
18 ErroneousInitializingFormalElementX,
19 FormalElementX,
20 FunctionElementX,
21 FunctionSignatureX,
22 InitializingFormalElementX,
23 LocalParameterElementX;
24 import '../tree/tree.dart';
25 import '../util/util.dart' show
26 Link,
27 LinkBuilder;
28
29 import 'members.dart' show
30 ResolverVisitor;
31 import 'registry.dart' show
32 ResolutionRegistry;
33 import 'resolution_common.dart' show
34 MappingVisitor;
35 import 'scope.dart' show
36 Scope;
6 37
7 /** 38 /**
8 * [SignatureResolver] resolves function signatures. 39 * [SignatureResolver] resolves function signatures.
9 */ 40 */
10 class SignatureResolver extends MappingVisitor<FormalElementX> { 41 class SignatureResolver extends MappingVisitor<FormalElementX> {
11 final ResolverVisitor resolver; 42 final ResolverVisitor resolver;
12 final FunctionTypedElement enclosingElement; 43 final FunctionTypedElement enclosingElement;
13 final Scope scope; 44 final Scope scope;
14 final MessageKind defaultValuesError; 45 final MessageKind defaultValuesError;
15 final bool createRealParameters; 46 final bool createRealParameters;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 433
403 DartType resolveReturnType(TypeAnnotation annotation) { 434 DartType resolveReturnType(TypeAnnotation annotation) {
404 if (annotation == null) return const DynamicType(); 435 if (annotation == null) return const DynamicType();
405 DartType result = resolver.resolveTypeAnnotation(annotation); 436 DartType result = resolver.resolveTypeAnnotation(annotation);
406 if (result == null) { 437 if (result == null) {
407 return const DynamicType(); 438 return const DynamicType();
408 } 439 }
409 return result; 440 return result;
410 } 441 }
411 } 442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698