Skip to content

Commit 4f43f78

Browse files
fishythefishCommit Queue
authored andcommitted
[dart2wasm] Add export name minification to _WasmImporter.
Change-Id: Iaddd056a10b0a9d315ffac120a36d9722dbacccc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446991 Reviewed-by: Jackson Gardner <[email protected]> Commit-Queue: Mayank Patke <[email protected]>
1 parent 58f700c commit 4f43f78

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/dart2wasm/lib/exports.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class ExportNamer {
5656
/// The `exportDynamic___` methods add relevant associations to the above
5757
/// mappings and add the given exportable to the Wasm exports of the specified
5858
/// module under the computed export name.
59+
///
60+
/// For deferred imports, the [export] method is sufficient.
5961
class Exporter {
6062
final ExportNamer _namer;
6163
final MainModuleMetadata _mainModuleMetadata;

pkg/dart2wasm/lib/translator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,8 @@ abstract class _WasmImporter<T extends w.Exportable> {
26602660
if (key.enclosingModule == module) return key;
26612661

26622662
final innerMap = _map.putIfAbsent(key, () {
2663-
key.enclosingModule.exports.export('$_exportPrefix${_map.length}', key);
2663+
_translator.exporter
2664+
.export(key.enclosingModule, '$_exportPrefix${_map.length}', key);
26642665
return {};
26652666
});
26662667
return innerMap.putIfAbsent(module, () {

0 commit comments

Comments
 (0)