Index: dart/sdk/lib/_internal/lib/js_rti.dart |
diff --git a/dart/sdk/lib/_internal/lib/js_rti.dart b/dart/sdk/lib/_internal/lib/js_rti.dart |
index aea2fc30d2ab498754937cc20582f9bba5d7ad6f..e4f62fdc3e55e665ea6bd7719cc1c3458f525f4b 100644 |
--- a/dart/sdk/lib/_internal/lib/js_rti.dart |
+++ b/dart/sdk/lib/_internal/lib/js_rti.dart |
@@ -161,6 +161,7 @@ String runtimeTypeToString(var type) { |
} else if (type is int) { |
return type.toString(); |
} else { |
+ // TODO(ahe): Handle function types, and be sure to always return a string. |
return null; |
} |
} |
@@ -326,6 +327,7 @@ bool areSubtypes(var s, var t) { |
return true; |
} |
+// TODO(ahe): Remove this. |
Object functionSubtypeCast(Object object, String signatureName, |
String contextName, var context, |
var typeArguments) { |
@@ -339,6 +341,7 @@ Object functionSubtypeCast(Object object, String signatureName, |
return object; |
} |
+// TODO(ahe): Remove this. |
Object assertFunctionSubtype(Object object, String signatureName, |
String contextName, var context, |
var typeArguments) { |
@@ -358,6 +361,7 @@ Object assertFunctionSubtype(Object object, String signatureName, |
* object in which the runtime values of these can be found or [typeArguments] |
* contains these values as a list of runtime type information. |
*/ |
+// TODO(ahe): Remove this. |
bool checkFunctionSubtype(var target, String signatureName, |
String contextName, var context, |
var typeArguments) { |
@@ -500,11 +504,11 @@ bool isSubtype(var s, var t) { |
var typeOfT = isJsArray(t) ? getIndex(t, 0) : t; |
// Check for a subtyping flag. |
var name = runtimeTypeToString(typeOfT); |
- var test = '${JS_OPERATOR_IS_PREFIX()}${name}'; |
- if (hasNoField(typeOfS, test)) return false; |
// Get the necessary substitution of the type arguments, if there is one. |
var substitution; |
if (isNotIdentical(typeOfT, typeOfS)) { |
+ var test = '${JS_OPERATOR_IS_PREFIX()}${name}'; |
+ if (hasNoField(typeOfS, test)) return false; |
var field = '${JS_OPERATOR_AS_PREFIX()}${runtimeTypeToString(typeOfT)}'; |
substitution = getField(typeOfS, field); |
} |