Skip to content

[wasm-split] Move some code (NFC)#8815

Merged
aheejin merged 1 commit into
WebAssembly:mainfrom
aheejin:wasm_split_move_code
Jun 8, 2026
Merged

[wasm-split] Move some code (NFC)#8815
aheejin merged 1 commit into
WebAssembly:mainfrom
aheejin:wasm_split_move_code

Conversation

@aheejin

@aheejin aheejin commented Jun 8, 2026

Copy link
Copy Markdown
Member

This just moves some code to make future diff tidier. This makes walkSegments a lambda function within shareImportableItems because it is only used within that function, and this adds the dispatch table and segments to the primary's used list within getUsedNames rather than outside.

This just moves some code to make future diff tidier. This makes
`walkSegments` a lambda function within `shareImportableItems` because
it is only used within that function, and this adds the dispatch table
and segments to the primary's used list within `getUsedNames` rather
than outside.
@aheejin aheejin requested a review from tlively June 8, 2026 21:44
@aheejin aheejin requested a review from a team as a code owner June 8, 2026 21:44
auto walkSegments = [](auto& walker, Module* module) {
walker.setModule(module);
for (auto& curr : module->elementSegments) {
if (curr->offset) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a TODO to walk the segment's init expression as well. (init segment support was added after this code was originally written, IIRC.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean #8405? It's in tables, not segments. I'll just do that as a follow-up.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, tables. Sounds good 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aheejin aheejin merged commit 8ba5b2e into WebAssembly:main Jun 8, 2026
16 checks passed
@aheejin aheejin deleted the wasm_split_move_code branch June 8, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants