Files
node/lib
Joyee Cheung 10099bb3f7 src: refactor embedded entrypoint loading
This patch:

1. Refactor the routines used to compile and run an embedder
  entrypoint. In JS land special handling for SEA is done
  directly in main/embedding.js instead of clobbering the CJS
  loader. Add warnings to remind users that currently the
  require() in SEA bundled scripts only supports loading builtins.
2. Don't use the bundled SEA code cache when compiling CJS
  loaded from disk, since in that case we are certainly not
  compiling the code bundled into the SEA. Use a is_sea_main
  flag in CompileFunctionForCJSLoader() (which replaces an unused
  argument) to pass this into the C++ land - the code cache is
  still read directly from C++ to avoid the overhead of
  ArrayBuffer creation.
3. Move SEA loading code into
  MaybeLoadSingleExecutableApplication() which calls
  LoadEnvironment() with its own StartExecutionCallback().
  This avoids more hidden switches in StartExecution() and
  make them explicit. Also add some TODOs about how to support
  ESM in embedded applications.
4. Add more comments

PR-URL: https://github.com/nodejs/node/pull/53573
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-05 19:58:35 +00:00
..
2023-06-24 15:52:38 +00:00
2024-07-04 11:04:37 +00:00
2024-01-12 16:09:48 +00:00
2023-06-12 00:00:46 +00:00
2023-11-11 16:25:08 +00:00
2024-06-23 06:08:59 +00:00
2024-02-02 15:25:34 +01:00
2024-03-20 17:27:29 +00:00
2024-05-30 09:07:17 -04:00
2024-06-07 15:51:44 +00:00
2024-07-04 16:19:36 +00:00
2024-05-02 12:54:46 +00:00