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

Unified Diff: dart/sdk/lib/_internal/lib/js_rti.dart

Issue 57773002: Repro for OOM bug in test.dart (applies to r29345). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_helper.dart ('k') | dart/type_variable_function_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_helper.dart ('k') | dart/type_variable_function_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698