OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.type_checker; | 4 library kernel.type_checker; |
5 | 5 |
6 import 'ast.dart'; | 6 import 'ast.dart'; |
7 import 'class_hierarchy.dart'; | 7 import 'class_hierarchy.dart'; |
8 import 'core_types.dart'; | 8 import 'core_types.dart'; |
9 import 'type_algebra.dart'; | 9 import 'type_algebra.dart'; |
10 import 'type_environment.dart'; | 10 import 'type_environment.dart'; |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 DartType visitLoadLibrary(LoadLibrary node) { | 683 DartType visitLoadLibrary(LoadLibrary node) { |
684 return environment.futureType(const DynamicType()); | 684 return environment.futureType(const DynamicType()); |
685 } | 685 } |
686 | 686 |
687 @override | 687 @override |
688 DartType visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) { | 688 DartType visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) { |
689 return environment.objectType; | 689 return environment.objectType; |
690 } | 690 } |
691 | 691 |
692 @override | 692 @override |
| 693 DartType visitVectorGet(VectorGet node) { |
| 694 return const DynamicType(); |
| 695 } |
| 696 |
| 697 @override |
| 698 visitVectorSet(VectorSet node) { |
| 699 return node.value.getStaticType(environment); |
| 700 } |
| 701 |
| 702 @override |
| 703 visitVectorCopy(VectorCopy node) { |
| 704 return node.getStaticType(environment); |
| 705 } |
| 706 |
| 707 @override |
| 708 DartType visitVectorCreation(VectorCreation node) { |
| 709 return node.getStaticType(environment); |
| 710 } |
| 711 |
| 712 @override |
693 visitAssertStatement(AssertStatement node) { | 713 visitAssertStatement(AssertStatement node) { |
694 visitExpression(node.condition); | 714 visitExpression(node.condition); |
695 if (node.message != null) { | 715 if (node.message != null) { |
696 visitExpression(node.message); | 716 visitExpression(node.message); |
697 } | 717 } |
698 } | 718 } |
699 | 719 |
700 @override | 720 @override |
701 visitBlock(Block node) { | 721 visitBlock(Block node) { |
702 node.statements.forEach(visitStatement); | 722 node.statements.forEach(visitStatement); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 } | 922 } |
903 | 923 |
904 @override | 924 @override |
905 visitLocalInitializer(LocalInitializer node) { | 925 visitLocalInitializer(LocalInitializer node) { |
906 visitVariableDeclaration(node.variable); | 926 visitVariableDeclaration(node.variable); |
907 } | 927 } |
908 | 928 |
909 @override | 929 @override |
910 visitInvalidInitializer(InvalidInitializer node) {} | 930 visitInvalidInitializer(InvalidInitializer node) {} |
911 } | 931 } |
OLD | NEW |