-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
performancewasm-proposal:component-modelIssues related to the WebAssembly Component Model proposalIssues related to the WebAssembly Component Model proposalwasmtimeIssues about wasmtime that don't fall into another labelIssues about wasmtime that don't fall into another label
Description
After #12234, we will emit inline constants for immutable+defined globals, but we cannot do the same for immutable+imported without
- an analysis (similar to our known imported function analysis) to find the globals that the satisfy that import
- checking that the import is always satisfied with a global of the same value
- checking that the module is not exported (which would allow instantiating it in host code with a global of a different value)
One possible future extension (not for this PR of course) would be to do something similar to the inliner to record that, even for imported globals, if the definition is in-wasm itself then we can also use the constant value. (e.g. dynamic-linking-using modules in components have this use case a lot)
Originally posted by @alexcrichton in #12234 (comment)
Metadata
Metadata
Assignees
Labels
performancewasm-proposal:component-modelIssues related to the WebAssembly Component Model proposalIssues related to the WebAssembly Component Model proposalwasmtimeIssues about wasmtime that don't fall into another labelIssues about wasmtime that don't fall into another label