Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: refactor embedded entrypoint loading #53573

Merged
merged 2 commits into from
Jul 5, 2024

Commits on Jun 24, 2024

  1. 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
    joyeecheung committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    1dfd431 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    5091b3f View commit details
    Browse the repository at this point in the history