Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/types/types.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/types/types.dart (revision 19427) |
| +++ sdk/lib/_internal/compiler/implementation/types/types.dart (working copy) |
| @@ -25,6 +25,7 @@ |
| */ |
| abstract class TypesInferrer { |
| analyzeMain(Element element); |
| + getConcreteReturnTypeOfElement(Element element); |
| getConcreteTypeOfElement(Element element); |
| getConcreteTypeOfNode(Element owner, Node node); |
| } |
| @@ -103,6 +104,17 @@ |
| }); |
| } |
| + ConcreteType getGuaranteedReturnTypeOfElement(Element element) { |
| + return measure(() { |
| + if (typesInferrer != null) { |
| + ConcreteType guaranteedType = typesInferrer |
|
kasperl
2013/03/05 08:26:44
Can you move typesInferrer to the next line too?
ngeoffray
2013/03/05 09:02:31
Done.
|
| + .getConcreteReturnTypeOfElement(element); |
| + if (guaranteedType != null) return guaranteedType; |
| + } |
| + return null; |
| + }); |
| + } |
| + |
| /** |
| * Return the (inferred) guaranteed concrete type of [node] or null. |
| * [node] must be an AST node of [owner]. |