| 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, IterableBase; | 7 import 'dart:collection' show Queue, IterableBase; |
| 8 | 8 |
| 9 import '../compiler.dart' |
| 10 show Compiler; |
| 9 import '../constants/values.dart'; | 11 import '../constants/values.dart'; |
| 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir | 12 import '../cps_ir/cps_ir_nodes.dart' as cps_ir |
| 11 show Node; | 13 show Node; |
| 12 import '../dart_types.dart' | 14 import '../dart_types.dart' |
| 13 show DartType, | 15 show DartType, |
| 14 FunctionType, | 16 FunctionType, |
| 15 InterfaceType, | 17 InterfaceType, |
| 16 TypeKind; | 18 TypeKind; |
| 17 import '../dart2jslib.dart' | 19 import '../diagnostics/invariant.dart' |
| 18 show ClassWorld, | 20 show invariant; |
| 19 Compiler, | 21 import '../diagnostics/spannable.dart' |
| 20 Constant, | 22 show Spannable; |
| 21 FunctionConstant, | |
| 22 invariant, | |
| 23 TreeElementMapping; | |
| 24 import '../elements/elements.dart'; | 23 import '../elements/elements.dart'; |
| 25 import '../native/native.dart' as native; | 24 import '../native/native.dart' as native; |
| 26 import '../resolution/resolution.dart' | 25 import '../resolution/resolution.dart' |
| 27 show TreeElementMapping; | 26 show TreeElementMapping; |
| 28 import '../tree/tree.dart' as ast | 27 import '../tree/tree.dart' as ast |
| 29 show DartString, | 28 show DartString, |
| 30 Node, | 29 Node, |
| 31 Send, | 30 Send, |
| 32 SendSet, | 31 SendSet, |
| 33 TryStatement; | 32 TryStatement; |
| 34 import '../types/types.dart' | 33 import '../types/types.dart' |
| 35 show ContainerTypeMask, | 34 show ContainerTypeMask, |
| 36 DictionaryTypeMask, | 35 DictionaryTypeMask, |
| 37 MapTypeMask, | 36 MapTypeMask, |
| 38 TypeMask, | 37 TypeMask, |
| 39 TypesInferrer, | 38 TypesInferrer, |
| 40 ValueTypeMask; | 39 ValueTypeMask; |
| 41 import '../types/constants.dart' | 40 import '../types/constants.dart' |
| 42 show computeTypeMask; | 41 show computeTypeMask; |
| 43 import '../universe/universe.dart' | 42 import '../universe/universe.dart' |
| 44 show Selector, | 43 show Selector, |
| 45 SideEffects, | 44 SideEffects, |
| 46 TypedSelector; | 45 TypedSelector; |
| 47 import '../util/util.dart' | 46 import '../util/util.dart' |
| 48 show ImmutableEmptySet, | 47 show ImmutableEmptySet, |
| 49 Setlet, | 48 Setlet; |
| 50 Spannable; | |
| 51 import '../js_backend/js_backend.dart' show Annotations, JavaScriptBackend; | 49 import '../js_backend/js_backend.dart' show Annotations, JavaScriptBackend; |
| 52 import '../world.dart' show ClassWorld; | 50 import '../world.dart' show ClassWorld; |
| 53 | 51 |
| 54 import 'inferrer_visitor.dart' | 52 import 'inferrer_visitor.dart' |
| 55 show ArgumentsTypes, | 53 show ArgumentsTypes, |
| 56 TypeSystem; | 54 TypeSystem; |
| 57 import 'simple_types_inferrer.dart'; | 55 import 'simple_types_inferrer.dart'; |
| 58 | 56 |
| 59 part 'closure_tracer.dart'; | 57 part 'closure_tracer.dart'; |
| 60 part 'list_tracer.dart'; | 58 part 'list_tracer.dart'; |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 bool isCalledOnce(Element element) { | 1367 bool isCalledOnce(Element element) { |
| 1370 if (compiler.disableTypeInference) return false; | 1368 if (compiler.disableTypeInference) return false; |
| 1371 MemberTypeInformation info = inferrer.types.getInferredTypeOf(element); | 1369 MemberTypeInformation info = inferrer.types.getInferredTypeOf(element); |
| 1372 return info.isCalledOnce(); | 1370 return info.isCalledOnce(); |
| 1373 } | 1371 } |
| 1374 | 1372 |
| 1375 void clear() { | 1373 void clear() { |
| 1376 inferrer.clear(); | 1374 inferrer.clear(); |
| 1377 } | 1375 } |
| 1378 } | 1376 } |
| OLD | NEW |