node/lib/internal/bootstrap
Chengzhong Wu 6277058e43
vm: sync-ify SourceTextModule linkage
Split `module.link(linker)` into two synchronous step
`sourceTextModule.linkRequests()` and
`sourceTextModule.instantiate()`. This allows creating vm modules and
resolving the dependencies in a complete synchronous procedure.

This also makes `syntheticModule.link()` redundant. The link step for a
SyntheticModule is no-op and is already taken care in the constructor
by initializing the binding slots with the given export names.

PR-URL: https://github.com/nodejs/node/pull/59000
Backport-PR-URL: https://github.com/nodejs/node/pull/60152
Refs: https://github.com/nodejs/node/issues/37648
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-10-11 22:51:07 +02:00
..
switches worker: flush stdout and stderr on exit 2025-02-03 20:09:55 +01:00
web src: port defineLazyProperties to native code 2025-04-17 10:50:59 -03:00
node.js process: add threadCpuUsage 2025-08-25 17:02:49 +02:00
realm.js vm: sync-ify SourceTextModule linkage 2025-10-11 22:51:07 +02:00
shadow_realm.js module: bootstrap module loaders in shadow realm 2023-11-13 22:09:47 +08:00