Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Unified Diff: sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart

Issue 12211112: Start work on a non-complete type inferrer. Currently only analyzes return types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart (revision 18311)
+++ sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart (working copy)
@@ -391,7 +391,7 @@
* A task which conservatively infers a [ConcreteType] for each sub expression
* of the program. The entry point is [analyzeMain].
*/
-class ConcreteTypesInferrer {
+class ConcreteTypesInferrer extends TypesInferrer {
static final bool LOG_FAILURES = true;
final String name = "Type inferrer";
@@ -686,12 +686,15 @@
/**
* Get the inferred concrete type of [node].
*/
- ConcreteType getConcreteTypeOfNode(Node node) => inferredTypes[node];
+ ConcreteType getConcreteTypeOfNode(Element owner, Node node) {
+ return inferredTypes[node];
+ }
/**
- * Get the inferred concrete type of [parameter].
+ * Get the inferred concrete type of [element].
*/
- ConcreteType getConcreteTypeOfParameter(VariableElement parameter) {
+ ConcreteType getConcreteTypeOfElement(Element element) {
+ if (!element.isParameter()) return null;
return inferredParameterTypes[parameter];
}

Powered by Google App Engine
This is Rietveld 408576698