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:compiler/src/common.dart'; | 5 import 'package:compiler/src/common.dart'; |
6 import 'package:compiler/src/compiler.dart'; | 6 import 'package:compiler/src/compiler.dart'; |
7 import 'package:compiler/src/elements/elements.dart'; | 7 import 'package:compiler/src/elements/elements.dart'; |
8 import 'package:compiler/src/elements/entities.dart'; | 8 import 'package:compiler/src/elements/entities.dart'; |
9 import 'package:compiler/src/tree/nodes.dart'; | 9 import 'package:compiler/src/tree/nodes.dart'; |
10 import 'package:compiler/src/types/types.dart'; | 10 import 'package:compiler/src/types/types.dart'; |
11 | 11 |
12 import '../equivalence/id_equivalence.dart'; | 12 import '../equivalence/id_equivalence.dart'; |
13 import '../equivalence/id_equivalence_helper.dart'; | |
14 | 13 |
15 /// Compute type inference data for [_member] as a [MemberElement]. | 14 /// Compute type inference data for [_member] as a [MemberElement]. |
16 /// | 15 /// |
17 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans | 16 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans |
18 /// for the data origin. | 17 /// for the data origin. |
19 void computeMemberAstTypeMasks( | 18 void computeMemberAstTypeMasks( |
20 Compiler compiler, MemberEntity _member, Map<Id, ActualData> actualMap, | 19 Compiler compiler, MemberEntity _member, Map<Id, ActualData> actualMap, |
21 {bool verbose: false}) { | 20 {bool verbose: false}) { |
22 MemberElement member = _member; | 21 MemberElement member = _member; |
23 ResolvedAst resolvedAst = member.resolvedAst; | 22 ResolvedAst resolvedAst = member.resolvedAst; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 String computeNodeValue(Node node, [AstElement element]) { | 61 String computeNodeValue(Node node, [AstElement element]) { |
63 if (node is Send) { | 62 if (node is Send) { |
64 TypeMask value = result.typeOfSend(node); | 63 TypeMask value = result.typeOfSend(node); |
65 return value != null ? '$value' : null; | 64 return value != null ? '$value' : null; |
66 } else if (element != null && element.isLocal) { | 65 } else if (element != null && element.isLocal) { |
67 return computeElementValue(element); | 66 return computeElementValue(element); |
68 } | 67 } |
69 return null; | 68 return null; |
70 } | 69 } |
71 } | 70 } |
OLD | NEW |