| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 type_graph_inferrer; | 5 library type_graph_inferrer; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return inferrer.getCallersOf(element); | 144 return inferrer.getCallersOf(element); |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool isMemberCalledOnce(MemberElement element) { | 147 bool isMemberCalledOnce(MemberElement element) { |
| 148 if (compiler.disableTypeInference) return false; | 148 if (compiler.disableTypeInference) return false; |
| 149 MemberTypeInformation info = | 149 MemberTypeInformation info = |
| 150 inferrer.types.getInferredTypeOfMember(element); | 150 inferrer.types.getInferredTypeOfMember(element); |
| 151 return info.isCalledOnce(); | 151 return info.isCalledOnce(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool isParameterCalledOnce(ParameterElement element) { | |
| 155 if (compiler.disableTypeInference) return false; | |
| 156 MemberTypeInformation info = | |
| 157 inferrer.types.getInferredTypeOfParameter(element); | |
| 158 return info.isCalledOnce(); | |
| 159 } | |
| 160 | |
| 161 void clear() { | 154 void clear() { |
| 162 inferrer.clear(); | 155 inferrer.clear(); |
| 163 } | 156 } |
| 164 } | 157 } |
| OLD | NEW |