Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Dec 31, 2025

Add an ImportResolver interface with some implementations to handle the spec interpreter and ctor-eval

  • Removes coupling of imported names from the module they come from. This will allows us to provide special imports like the spec test module better which have some 'magic' e.g. for printing functions which can't be implemented in Wasm (globals remain the same because they still come from a real module which is better).
  • Removes pointer chasing logic when resolving imported globals in both cases.
  • Also allows us to relax ctor-eval and allow programs that import globals to be optimized more (as long as they don't try to evaluate imports) Try allowing globals to be imported in ctor eval #8168
  • Fixes Segfault in ctor-eval when an imported global isn't used #8167

@stevenfontanella stevenfontanella changed the title [WIP] Refactorings to global imports Add ImportResolver interface and use it for global imports Jan 2, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review January 2, 2026 05:56
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.

Segfault in ctor-eval when an imported global isn't used

2 participants