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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart

Issue 78873007: Support type argument substitution on unnamed mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years 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 | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
index 9d9a89b3d2d6f10006559f594d83367db75f683e..28b6e8e7f3377742725d1edb3ee2a60ea724f0e9 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
@@ -336,8 +336,14 @@ class ClassEmitter extends CodeEmitterHelper {
String reflectionName = task.getReflectionName(classElement, className);
if (reflectionName != null) {
+ reflectionName = '+$reflectionName';
+ } else if (classElement.isUnnamedMixinApplication &&
+ backend.isNeededForReflection(classElement)) {
+ reflectionName = '-$className';
+ }
+ if (reflectionName != null) {
if (!backend.isNeededForReflection(classElement)) {
- enclosingBuilder.addProperty("+$reflectionName", js.number(0));
+ enclosingBuilder.addProperty("$reflectionName", js.number(0));
} else {
List<int> types = new List<int>();
if (classElement.supertype != null) {
@@ -346,7 +352,7 @@ class ClassEmitter extends CodeEmitterHelper {
for (DartType interface in classElement.interfaces) {
types.add(task.metadataEmitter.reifyType(interface));
}
- enclosingBuilder.addProperty("+$reflectionName",
+ enclosingBuilder.addProperty("$reflectionName",
new jsAst.ArrayInitializer.from(types.map((typeNumber) =>
js.number(typeNumber))));
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698