You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement import.source() dynamic expression for source phase imports
Add parsing, compilation, and runtime support for import.source(specifier)
which returns a Promise that resolves with the module namespace object.
This follows the same architecture as import() and import.defer():
parser recognizes the syntax, compiler emits a helper call, and the VM
dispatches to host_source_import_promise at runtime.
- Add Expr::SourceImport AST node and parser handling
- Add INTERNAL_SOURCE_IMPORT_HELPER compiler constant
- Add host_source_import_promise VM method (loads module, resolves with namespace)
- Reject new import.source(...) with SyntaxError
- Update feature probes to verify module loading works
- Remove dead code: parse_simple_module_namespace, resolve_import_specifier_path
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments