| 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 #library('types'); | 5 #library('types'); |
| 6 | 6 |
| 7 #import('../leg.dart'); | 7 #import('../leg.dart'); |
| 8 #import('../tree/tree.dart'); | 8 #import('../tree/tree.dart'); |
| 9 #import('../elements/elements.dart'); | 9 #import('../elements/elements.dart'); |
| 10 #import('../util/util.dart'); | 10 #import('../util/util.dart'); |
| 11 #import('../scanner/scannerlib.dart'); | 11 #import('../scanner/scannerlib.dart'); |
| 12 #import('../universe/universe.dart'); | |
| 13 | 12 |
| 14 #source('concrete_types_inferrer.dart'); | 13 #source('concrete_types_inferrer.dart'); |
| 15 | 14 |
| 16 /** | 15 /** |
| 17 * The types task infers guaranteed types globally. | 16 * The types task infers guaranteed types globally. |
| 18 */ | 17 */ |
| 19 class TypesTask extends CompilerTask { | 18 class TypesTask extends CompilerTask { |
| 20 final String name = 'Type inference'; | 19 final String name = 'Type inference'; |
| 21 final Set<Element> untypedElements; | 20 final Set<Element> untypedElements; |
| 22 final Map<Element, Link<Element>> typedSends; | 21 final Map<Element, Link<Element>> typedSends; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 * [:null:] if it gives up. | 241 * [:null:] if it gives up. |
| 243 */ | 242 */ |
| 244 Element computeLub(Element a, Element b) { | 243 Element computeLub(Element a, Element b) { |
| 245 // Fast common case, but also simple initial implementation. | 244 // Fast common case, but also simple initial implementation. |
| 246 if (a === b) return a; | 245 if (a === b) return a; |
| 247 | 246 |
| 248 // TODO(ahe): Improve the following "computation"... | 247 // TODO(ahe): Improve the following "computation"... |
| 249 return null; | 248 return null; |
| 250 } | 249 } |
| 251 } | 250 } |
| OLD | NEW |