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

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: 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
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 8cc5e3a8e118632e1ef74656f15ecaf26c6aa5be..66ce51afe450009ea12a5860e303fdfdf00b87db 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
@@ -354,8 +354,14 @@ class ClassEmitter extends CodeEmitterHelper {
buffer.write(jsAst.prettyPrint(builder.toObjectInitializer(), compiler));
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)) {
- buffer.write(',$n$n"+$reflectionName": 0');
+ buffer.write(',$n$n"$reflectionName": 0');
} else {
List<int> types = <int>[];
if (classElement.supertype != null) {
@@ -365,7 +371,7 @@ class ClassEmitter extends CodeEmitterHelper {
for (DartType interface in classElement.interfaces) {
types.add(task.metadataEmitter.reifyType(interface));
}
- buffer.write(',$n$n"+$reflectionName": $types');
+ buffer.write(',$n$n"$reflectionName": $types');
}
}
}

Powered by Google App Engine
This is Rietveld 408576698