OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.typechecker; | 5 library dart2js.typechecker; |
6 | 6 |
| 7 import 'common/tasks.dart' show |
| 8 CompilerTask; |
| 9 import 'compiler.dart' show |
| 10 Compiler, |
| 11 isPrivateName; |
7 import 'constants/expressions.dart'; | 12 import 'constants/expressions.dart'; |
8 import 'constants/values.dart'; | 13 import 'constants/values.dart'; |
9 import 'core_types.dart'; | 14 import 'core_types.dart'; |
10 import 'dart2jslib.dart' show | |
11 Compiler, | |
12 CompilerTask, | |
13 invariant, | |
14 isPrivateName; | |
15 import 'dart_types.dart'; | 15 import 'dart_types.dart'; |
| 16 import 'diagnostics/invariant.dart' show |
| 17 invariant; |
| 18 import 'diagnostics/spannable.dart' show |
| 19 Spannable; |
16 import 'elements/elements.dart' show | 20 import 'elements/elements.dart' show |
17 AbstractFieldElement, | 21 AbstractFieldElement, |
18 AstElement, | 22 AstElement, |
19 AsyncMarker, | 23 AsyncMarker, |
20 ClassElement, | 24 ClassElement, |
21 ConstructorElement, | 25 ConstructorElement, |
22 Element, | 26 Element, |
23 Elements, | 27 Elements, |
24 EnumClassElement, | 28 EnumClassElement, |
25 ExecutableElement, | 29 ExecutableElement, |
(...skipping 15 matching lines...) Expand all Loading... |
41 TypedefElement, | 45 TypedefElement, |
42 VariableElement; | 46 VariableElement; |
43 import 'messages.dart'; | 47 import 'messages.dart'; |
44 import 'resolution/resolution.dart' show | 48 import 'resolution/resolution.dart' show |
45 TreeElements; | 49 TreeElements; |
46 import 'resolution/class_members.dart' show | 50 import 'resolution/class_members.dart' show |
47 MembersCreator; | 51 MembersCreator; |
48 import 'tree/tree.dart'; | 52 import 'tree/tree.dart'; |
49 import 'util/util.dart' show | 53 import 'util/util.dart' show |
50 Link, | 54 Link, |
51 LinkBuilder, | 55 LinkBuilder; |
52 Spannable; | |
53 import '../compiler_new.dart' as api; | 56 import '../compiler_new.dart' as api; |
54 | 57 |
55 class TypeCheckerTask extends CompilerTask { | 58 class TypeCheckerTask extends CompilerTask { |
56 TypeCheckerTask(Compiler compiler) : super(compiler); | 59 TypeCheckerTask(Compiler compiler) : super(compiler); |
57 String get name => "Type checker"; | 60 String get name => "Type checker"; |
58 | 61 |
59 void check(AstElement element) { | 62 void check(AstElement element) { |
60 if (element.isClass) return; | 63 if (element.isClass) return; |
61 if (element.isTypedef) return; | 64 if (element.isTypedef) return; |
62 ResolvedAst resolvedAst = element.resolvedAst; | 65 ResolvedAst resolvedAst = element.resolvedAst; |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 | 1923 |
1921 visitTypedef(Typedef node) { | 1924 visitTypedef(Typedef node) { |
1922 // Do not typecheck [Typedef] nodes. | 1925 // Do not typecheck [Typedef] nodes. |
1923 } | 1926 } |
1924 | 1927 |
1925 visitNode(Node node) { | 1928 visitNode(Node node) { |
1926 compiler.internalError(node, | 1929 compiler.internalError(node, |
1927 'Unexpected node ${node.getObjectDescription()} in the type checker.'); | 1930 'Unexpected node ${node.getObjectDescription()} in the type checker.'); |
1928 } | 1931 } |
1929 } | 1932 } |
OLD | NEW |