Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Dec 8, 2025

To do this, refactor the table scanning code out of Directize into TableUtils. Then
when we see a CallIndirect in RemoveUnusedModuleElements, we no longer
automatically assume it could call anything whose reference was taken: if we see
the table is not modified, then only the table's known contents might be called.

That is, before: CallIndirect implied we could call anything of that type, in that
table. But also, we assumed other things might be written into the table at
runtime, so anything whose reference was taken was callable. After: We know
which tables do not have new entries written into them.

@kripken
Copy link
Member Author

kripken commented Dec 9, 2025

Measuring on Dart, I see a small benefit here. Probably it is small as other devirtualization etc. mechanisms already handle most things.

@kripken kripken requested a review from tlively December 9, 2025 23:52
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.

1 participant