OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
6 | 6 |
7 import '../closure.dart'; | 7 import '../closure.dart'; |
8 import '../compiler.dart'; | 8 import '../compiler.dart'; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/entities.dart'; | 10 import '../elements/entities.dart'; |
11 import '../kernel/kernel.dart'; | 11 import '../kernel/kernel.dart'; |
12 import '../ssa/kernel_ast_adapter.dart'; | 12 import '../ssa/kernel_ast_adapter.dart'; |
13 import '../tree/tree.dart' as ast; | 13 import '../tree/tree.dart' as ast; |
14 import '../types/types.dart' show TypeMask; | |
15 import '../universe/side_effects.dart' show SideEffects; | 14 import '../universe/side_effects.dart' show SideEffects; |
16 import 'inferrer_engine.dart'; | 15 import 'inferrer_engine.dart'; |
17 import 'locals_handler.dart'; | 16 import 'locals_handler.dart'; |
18 import 'type_graph_nodes.dart'; | 17 import 'type_graph_nodes.dart'; |
19 import 'type_system.dart'; | 18 import 'type_system.dart'; |
20 | 19 |
21 /// [KernelTypeGraphBuilder] constructs a type-inference graph for a particular | 20 /// [KernelTypeGraphBuilder] constructs a type-inference graph for a particular |
22 /// element. | 21 /// element. |
23 /// | 22 /// |
24 /// Calling [run] will start the work of visiting the body of the code to | 23 /// Calling [run] will start the work of visiting the body of the code to |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 : types.simplifyPhi(null, null, elementType); | 162 : types.simplifyPhi(null, null, elementType); |
164 TypeInformation containerType = | 163 TypeInformation containerType = |
165 listLiteral.isConst ? types.constListType : types.growableListType; | 164 listLiteral.isConst ? types.constListType : types.growableListType; |
166 // TODO(efortuna): Change signature of allocateList and the rest of | 165 // TODO(efortuna): Change signature of allocateList and the rest of |
167 // type_system to deal with Kernel elements. | 166 // type_system to deal with Kernel elements. |
168 return types.allocateList(containerType, astAdapter.getNode(listLiteral), | 167 return types.allocateList(containerType, astAdapter.getNode(listLiteral), |
169 outermostElement, elementType, length); | 168 outermostElement, elementType, length); |
170 }); | 169 }); |
171 } | 170 } |
172 } | 171 } |
OLD | NEW |