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

Side by Side Diff: pkg/kernel/lib/transformations/treeshaker.dart

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Update binary.md file to include Vector AST nodes Created 3 years, 9 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) 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 4
5 library kernel.tree_shaker; 5 library kernel.tree_shaker;
6 6
7 import '../ast.dart'; 7 import '../ast.dart';
8 import '../class_hierarchy.dart'; 8 import '../class_hierarchy.dart';
9 import '../core_types.dart'; 9 import '../core_types.dart';
10 import '../type_environment.dart'; 10 import '../type_environment.dart';
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1026
1027 visitInvalidType(InvalidType node) {} 1027 visitInvalidType(InvalidType node) {}
1028 1028
1029 visitDynamicType(DynamicType node) { 1029 visitDynamicType(DynamicType node) {
1030 // TODO(asgerf): Find a suitable model for untyped externals, e.g. track 1030 // TODO(asgerf): Find a suitable model for untyped externals, e.g. track
1031 // them to the first type boundary. 1031 // them to the first type boundary.
1032 } 1032 }
1033 1033
1034 visitVoidType(VoidType node) {} 1034 visitVoidType(VoidType node) {}
1035 1035
1036 visitVectorType(VectorType node) {}
1037
1036 visitInterfaceType(InterfaceType node) { 1038 visitInterfaceType(InterfaceType node) {
1037 if (isCovariant) { 1039 if (isCovariant) {
1038 shaker._addInstantiatedExternalSubclass(node.classNode); 1040 shaker._addInstantiatedExternalSubclass(node.classNode);
1039 } 1041 }
1040 if (isContravariant) { 1042 if (isContravariant) {
1041 shaker._addEscapedClass(node.classNode); 1043 shaker._addEscapedClass(node.classNode);
1042 } 1044 }
1043 for (int i = 0; i < node.typeArguments.length; ++i) { 1045 for (int i = 0; i < node.typeArguments.length; ++i) {
1044 DartType typeArgument = node.typeArguments[i]; 1046 DartType typeArgument = node.typeArguments[i];
1045 // In practice we don't get much out of analyzing variance here, so 1047 // In practice we don't get much out of analyzing variance here, so
(...skipping 30 matching lines...) Expand all
1076 classNode == coreTypes.futureClass || 1078 classNode == coreTypes.futureClass ||
1077 classNode == coreTypes.streamClass || 1079 classNode == coreTypes.streamClass ||
1078 classNode == coreTypes.listClass || 1080 classNode == coreTypes.listClass ||
1079 classNode == coreTypes.mapClass; 1081 classNode == coreTypes.mapClass;
1080 } 1082 }
1081 } 1083 }
1082 1084
1083 /// Exception that is thrown to stop the tree shaking analysis when a use 1085 /// Exception that is thrown to stop the tree shaking analysis when a use
1084 /// of `dart:mirrors` is found. 1086 /// of `dart:mirrors` is found.
1085 class _UsingMirrorsException {} 1087 class _UsingMirrorsException {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698