mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[dart2wasm] Use the vm's mixin deduplication pass in dart2wasm
It reduces FluteCounter * 2.5% in unoptimized mode * 0.8% in optimzed mode (and similar when gzip'ed) Change-Id: If4852d66e8c214754f68e4d134960e8b622d20fd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354023 Reviewed-by: Ömer Ağacan <omersa@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
c625797f8a
commit
c05738f04f
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,8 @@ import 'package:vm/kernel_front_end.dart' show writeDepfile;
|
|||
|
||||
import 'package:vm/transformations/type_flow/transformer.dart' as globalTypeFlow
|
||||
show transformComponent;
|
||||
import 'package:vm/transformations/mixin_deduplication.dart'
|
||||
as mixin_deduplication show transformComponent;
|
||||
|
||||
import 'package:dart2wasm/compiler_options.dart' as compiler;
|
||||
import 'package:dart2wasm/js/runtime_generator.dart' as js;
|
||||
|
@ -123,6 +125,8 @@ Future<CompilerOutput?> compileToModule(compiler.WasmCompilerOptions options,
|
|||
writeComponentToText(component, path: options.dumpKernelBeforeTfa!);
|
||||
}
|
||||
|
||||
mixin_deduplication.transformComponent(component);
|
||||
|
||||
globalTypeFlow.transformComponent(target, coreTypes, component,
|
||||
treeShakeSignatures: true,
|
||||
treeShakeWriteOnlyFields: true,
|
||||
|
|
Loading…
Reference in a new issue