-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[CP] [dart2wasm] Pass source maps to wasm-opt when optimizing #56423
Copy link
Copy link
Closed
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.cherry-pick-approvedLabel for approved cherrypick requestLabel for approved cherrypick requestcherry-pick-mergedCherry-pick has been merged to the stable or beta branch.Cherry-pick has been merged to the stable or beta branch.cherry-pick-reviewIssue that need cherry pick triage to approveIssue that need cherry pick triage to approve
Metadata
Metadata
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.cherry-pick-approvedLabel for approved cherrypick requestLabel for approved cherrypick requestcherry-pick-mergedCherry-pick has been merged to the stable or beta branch.Cherry-pick has been merged to the stable or beta branch.cherry-pick-reviewIssue that need cherry pick triage to approveIssue that need cherry pick triage to approve
Type
Fields
Give feedbackNo fields configured for issues without a type.
Commit(s) to merge
1b1740e
075c443
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/379782
Issue Description
dart2wasm currently does not pass the generated source map to wasm-opt when optimizing with wasm-opt.
As a result the source map becomes invalid when the optimizations are enabled (i.e. always when
-O0is not used).What is the fix
With this commit we pass the source map file to wasm-opt, which then updates it as it transforms the code.
Why cherry-pick
Source map support in dart2wasm was cherry-picked to stable in #56239, but they are useless when optimizations are enabled.
Risk
Assuming good test coverage of wasm-opt, I don't expect this change to break anything.
Issue link(s)
We don't have a GitHub issue for this issue.
Extra Info
No response