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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart

Issue 2516483002: fix #27336, ddc with recursive generic class type args (Closed)
Patch Set: Created 4 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 | « pkg/dev_compiler/test/codegen/language/recursive_generic_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
index 1c778719df1ab84ff1059e6b4a0bdfb62c059c85..1899f9683287243af62a52c22f6e2ba48bf4e8a3 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -97,7 +97,7 @@ flattenFutures(builder) => JS(
})()''');
/// Memoize a generic type constructor function.
-generic(typeConstructor) => JS(
+generic(typeConstructor, [setBaseClass]) => JS(
'',
'''(() => {
let length = $typeConstructor.length;
@@ -128,10 +128,12 @@ generic(typeConstructor) => JS(
value[$_typeArguments] = args;
value[$_originalDeclaration] = makeGenericType;
}
+ map.set(arg, value);
+ if ($setBaseClass) $setBaseClass(value);
} else {
value = new Map();
+ map.set(arg, value);
}
- map.set(arg, value);
}
}
return value;
« no previous file with comments | « pkg/dev_compiler/test/codegen/language/recursive_generic_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698