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: compile native modules and their code cache in C++ #24221

Closed
wants to merge 3 commits into from

Commits on Nov 13, 2018

  1. src: compile native modules and their code cache in C++

    This patch refactors out a part of NativeModule.prototype.compile
    (in JS land) into a C++ NativeModule class, this enables a
    couple of possibilities:
    
    1. By moving the code to the C++ land, we have more opportunity
      to specialize the compilation process of the native modules
      (e.g. compilation options, code cache) that is orthogonal to
      how user land modules are compiled
    2. We can reuse the code to compile bootstrappers and context
      fixers and enable them to be compiled with the code cache later,
      since they are not loaded by NativeModule in the JS land their
      caching must be done in C++.
    3. Since there is no need to pass the static data to JS for
      compilation anymore, this enables us to use
      (std::map<std::string, const char*>) in the generated
      node_code_cache.cc and node_javascript.cc later, and scope
      every actual access to the source of native modules to a
      std::map lookup instead of a lookup on a v8::Object in
      dictionary mode.
    
    This patch also refactor the code cache generator and tests
    a bit and trace the `withCodeCache` and `withoutCodeCache`
    in a Set instead of an Array, and makes sure that all the cachable
    builtins are tested.
    joyeecheung committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    56fb2ab View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2018

  1. Configuration menu
    Copy the full SHA
    7f8e120 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7b7706 View commit details
    Browse the repository at this point in the history