mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 18:47:55 +00:00
[dart2wasm] Skip synthetic mixin class names in type name list
Reduces optimized binary size (with names section) of devtools from 10,322,431 to 10,153,197 bytes (-1.6%). Change-Id: Ife9f803846a054cfbe3910008dc62d51d7a2c7bd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340564 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
This commit is contained in:
parent
6b42951a94
commit
2f1506822c
|
@ -209,8 +209,12 @@ class Types {
|
||||||
// class ID. If we ever change that logic, we will need to change this code.
|
// class ID. If we ever change that logic, we will need to change this code.
|
||||||
List<String> typeNames = [];
|
List<String> typeNames = [];
|
||||||
for (ClassInfo classInfo in translator.classes) {
|
for (ClassInfo classInfo in translator.classes) {
|
||||||
String className = classInfo.cls?.name ?? '';
|
Class? cls = classInfo.cls;
|
||||||
typeNames.add(className);
|
if (cls == null || cls.isAnonymousMixin) {
|
||||||
|
typeNames.add("");
|
||||||
|
} else {
|
||||||
|
typeNames.add(cls.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return typeNames;
|
return typeNames;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue