Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Apr 19, 2024

Since data and elem segments cannot be imported or exported, there is no way to
access them from the secondary module, so functions that need to refer to them
cannot be split out.

Fixes #6512.

Since data and elem segments cannot be imported or exported, there is no way to
access them from the secondary module, so functions that need to refer to them
cannot be split out.

Fixes #6512.
@tlively tlively requested a review from kripken April 19, 2024 03:17
Copy link
Member Author

tlively commented Apr 19, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tlively and the rest of your teammates on Graphite Graphite

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Another option might be to export from the primary module methods that do a drop etc., and call those from the secondary module. If these operations are common we might want to do that, but I'm not sure if they are?

@tlively
Copy link
Member Author

tlively commented Apr 22, 2024

That's a good idea, too. Another possibility I thought of was to do an analysis to see if the segment could be moved (rather than copied) to the secondary module. I think these instructions are rare so far, so it's not worth doing anything complicated, but if e.g. array.new_data becomes common at some point, it might be worth improving this. I'll add a TODO.

@tlively tlively enabled auto-merge (squash) April 23, 2024 02:36
@tlively tlively merged commit e50a2ba into main Apr 23, 2024
@tlively tlively deleted the wasm-split-segments branch April 23, 2024 02:59
@gkdn gkdn mentioned this pull request Aug 31, 2024
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.

wasm-split: WasmBinaryWriter::getDataSegmentIndex assertion related to DataDrop

3 participants