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

vm: include vm context in the embedded snapshot #44252

Closed
wants to merge 4 commits into from

Commits on Aug 19, 2022

  1. vm: make ContextifyContext template context-independent

    Instead of creating an object template for every ContextifyContext,
    we now create one object template that can be reused by all
    contexts. The native pointer can be obtained through an embdder
    pointer field in the creation context of the receiver in the
    interceptors, because the interceptors are only meant to be invoked
    on the global object of the contextified contexts. This makes
    the ContextifyContext template context-independent and therefore
    snapshotable.
    joyeecheung committed Aug 19, 2022
    Copy the full SHA
    c0f1430 View commit details
    Browse the repository at this point in the history
  2. vm: include vm context in the embedded snapshot

    Include a minimally initialized contextify context in the embedded
    snapshot. This paves the way for user-land vm context snapshots.
    joyeecheung committed Aug 19, 2022
    Copy the full SHA
    f60d687 View commit details
    Browse the repository at this point in the history
  3. vm: avoid unnecessary property getter interceptor calls

    Access to the global object from within a vm context is intercepted
    so it's slow, therefore we should try to avoid unnecessary access
    to it during the initialization of vm contexts.
    
    - Remove the Atomics.wake deletion as V8 now does not install it
      anymore.
    - Move the Intl.v8BreakIterator deletion into the snapshot.
    - Do not query the Object prototype if --disable-proto is not set.
    
    This should speed up the creation of vm contexts by about ~12%.
    joyeecheung committed Aug 19, 2022
    Copy the full SHA
    c507be8 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    79578c5 View commit details
    Browse the repository at this point in the history