node/lib/internal/vm
Joyee Cheung d6b57f6629
module: centralize SourceTextModule compilation for builtin loader
This refactors the code that compiles SourceTextModule for the
built-in ESM loader to use a common routine so that it's easier
to customize cache handling for the ESM loader. In addition
this introduces a common symbol for import.meta and import()
so that we don't need to create additional closures as handlers,
since we can get all the information we need from the V8 callback
already. This should reduce the memory footprint of ESM as well.

PR-URL: https://github.com/nodejs/node/pull/52291
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-04-03 23:31:48 +00:00
..
module.js module: centralize SourceTextModule compilation for builtin loader 2024-04-03 23:31:48 +00:00