| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /// This library defined `uses`. A `use` is a single impact of the world, for | 5 /// This library defined `uses`. A `use` is a single impact of the world, for |
| 6 /// instance an invocation of a top level function or a call to the `foo()` | 6 /// instance an invocation of a top level function or a call to the `foo()` |
| 7 /// method on an unknown class. | 7 /// method on an unknown class. |
| 8 library dart2js.universe.use; | 8 library dart2js.universe.use; |
| 9 | 9 |
| 10 import '../closure.dart' show BoxFieldElement; | 10 import '../closure.dart' show BoxFieldElement; |
| 11 import '../common.dart'; | 11 import '../common.dart'; |
| 12 import '../dart_types.dart'; | 12 import '../dart_types.dart'; |
| 13 import '../elements/elements.dart'; | 13 import '../elements/elements.dart'; |
| 14 import '../util/util.dart' show Hashing; |
| 14 import '../world.dart' show ClassWorld; | 15 import '../world.dart' show ClassWorld; |
| 15 import '../util/util.dart' show Hashing; | |
| 16 | |
| 17 import 'call_structure.dart' show CallStructure; | 16 import 'call_structure.dart' show CallStructure; |
| 18 import 'selector.dart' show Selector; | 17 import 'selector.dart' show Selector; |
| 19 import 'universe.dart' show ReceiverConstraint; | 18 import 'universe.dart' show ReceiverConstraint; |
| 20 | 19 |
| 21 enum DynamicUseKind { INVOKE, GET, SET, } | 20 enum DynamicUseKind { INVOKE, GET, SET, } |
| 22 | 21 |
| 23 /// The use of a dynamic property. [selector] defined the name and kind of the | 22 /// The use of a dynamic property. [selector] defined the name and kind of the |
| 24 /// property and [mask] defines the known constraint for the object on which | 23 /// property and [mask] defines the known constraint for the object on which |
| 25 /// the property is accessed. | 24 /// the property is accessed. |
| 26 class DynamicUse { | 25 class DynamicUse { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 301 } |
| 303 | 302 |
| 304 bool operator ==(other) { | 303 bool operator ==(other) { |
| 305 if (identical(this, other)) return true; | 304 if (identical(this, other)) return true; |
| 306 if (other is! TypeUse) return false; | 305 if (other is! TypeUse) return false; |
| 307 return type == other.type && kind == other.kind; | 306 return type == other.type && kind == other.kind; |
| 308 } | 307 } |
| 309 | 308 |
| 310 String toString() => 'TypeUse($type,$kind)'; | 309 String toString() => 'TypeUse($type,$kind)'; |
| 311 } | 310 } |
| OLD | NEW |