[Serialization][wasm] Preserve wasm import metadata for SIL serialization#87250
Merged
MaxDesiatov merged 1 commit intoswiftlang:mainfrom Feb 23, 2026
Merged
Conversation
Member
Author
|
@swift-ci smoke test |
059701f to
a506f1d
Compare
Member
Author
|
@swift-ci smoke test |
a506f1d to
ed2ea75
Compare
Member
Author
|
@swift-ci smoke test |
Member
Author
|
@swift-ci smoke test macOS Platform |
Member
Author
|
@swift-ci smoke test Windows Platform |
Member
Author
|
@swift-ci smoke test macOS Platform |
Contributor
|
@kateinoigakukun would you mind creating an issue that tracks this at https://github.com/swiftlang/swift/issues? If you plan to cherry-pick this for 6.3 the issue will be required anyway, but also desirable for |
This was referenced Feb 18, 2026
Member
Author
|
Opened a cherry-pick PR against 6.3 #87335 |
eeckstein
reviewed
Feb 19, 2026
| break; | ||
| case ExtraStringFlavor::WasmImportModule: | ||
| WasmImportModule = blobData; | ||
| if (!WasmImportField.empty()) |
Contributor
There was a problem hiding this comment.
Can it be that only one of these two attributes is set and the other is empty? Then you wouldn't set the non-empty attribute at all.
Member
Author
There was a problem hiding this comment.
Good point! Yes, one of them can be empty. Added tests to cover such cases.
…tion Serialize/deserialize wasm import module/name for SIL serialization so inlined decls keep their import names. Otherwise, inlining a function with `@_extern(wasm)` would lose the import name and cause IRGen to emit an import from the default module "env".
ed2ea75 to
d5d577d
Compare
Member
Author
|
@swift-ci smoke test |
DougGregor
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serialize/deserialize wasm import module/name for SIL serialization so inlined decls keep their import names. Otherwise, inlining a function with
@_extern(wasm)would lose the import name and cause IRGen to emit an import from the default module "env".Related links: swiftwasm/JavaScriptKit#631 swiftwasm/JavaScriptKit#628
Resolves #87320