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'; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 ? new FieldInitializationScope(types) | 61 ? new FieldInitializationScope(types) |
62 : null; | 62 : null; |
63 locals = | 63 locals = |
64 new LocalsHandler(inferrer, types, compiler.options, node, fieldScope); | 64 new LocalsHandler(inferrer, types, compiler.options, node, fieldScope); |
65 } | 65 } |
66 | 66 |
67 factory KernelTypeGraphBuilder(Element element, ResolvedAst resolvedAst, | 67 factory KernelTypeGraphBuilder(Element element, ResolvedAst resolvedAst, |
68 Compiler compiler, InferrerEngine inferrer, | 68 Compiler compiler, InferrerEngine inferrer, |
69 [LocalsHandler handler]) { | 69 [LocalsHandler handler]) { |
70 var adapter = _createKernelAdapter(compiler, resolvedAst); | 70 var adapter = _createKernelAdapter(compiler, resolvedAst); |
71 var node = adapter.getInitialKernelNode(element); | 71 var node = adapter.getMemberNode(element); |
72 return new KernelTypeGraphBuilder.internal( | 72 return new KernelTypeGraphBuilder.internal( |
73 element, | 73 element, |
74 resolvedAst, | 74 resolvedAst, |
75 element.outermostEnclosingMemberOrTopLevel.implementation, | 75 element.outermostEnclosingMemberOrTopLevel.implementation, |
76 inferrer, | 76 inferrer, |
77 compiler, | 77 compiler, |
78 handler, | 78 handler, |
79 adapter, | 79 adapter, |
80 node); | 80 node); |
81 } | 81 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 : types.simplifyPhi(null, null, elementType); | 162 : types.simplifyPhi(null, null, elementType); |
163 TypeInformation containerType = | 163 TypeInformation containerType = |
164 listLiteral.isConst ? types.constListType : types.growableListType; | 164 listLiteral.isConst ? types.constListType : types.growableListType; |
165 // TODO(efortuna): Change signature of allocateList and the rest of | 165 // TODO(efortuna): Change signature of allocateList and the rest of |
166 // type_system to deal with Kernel elements. | 166 // type_system to deal with Kernel elements. |
167 return types.allocateList(containerType, astAdapter.getNode(listLiteral), | 167 return types.allocateList(containerType, astAdapter.getNode(listLiteral), |
168 outermostElement, elementType, length); | 168 outermostElement, elementType, length); |
169 }); | 169 }); |
170 } | 170 } |
171 } | 171 } |
OLD | NEW |