-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
bootstrap: include bootstrapped Environment in builtin snapshot #32984
Commits on Jul 14, 2020
-
src: split the main context initialization from Environemnt ctor
So that it's possible to create an Environment not yet attached to any V8 context. We'll use this to deserialize the V8 context before attaching an Environment to it.
Configuration menu - View commit details
-
Copy full SHA for 84d26e5 - Browse repository at this point
Copy the full SHA 84d26e5View commit details -
src: add an ExternalReferenceRegistry class
Add an ExternalReferenceRegistry class for registering static external references. To register the external JS to C++ references created in a binding (e.g. when a FunctionTemplate is created): - Add the binding name (same as the id used for `internalBinding()` and `NODE_MODULE_CONTEXT_AWARE_INTERNAL`) to `EXTERNAL_REFERENCE_BINDING_LIST` in `src/node_external_reference.h`. - In the file where the binding is implemented, create a registration function to register the static C++ references (e.g. the C++ functions in `v8::FunctionCallback` associated with the function templates), like this: ```c++ void RegisterExternalReferences( ExternalReferenceRegistry* registry) { registry->Register(cpp_func_1); } ``` - At the end of the file where `NODE_MODULE_CONTEXT_AWARE_INTERNAL` is also usually called, register the registration function with ``` NODE_MODULE_EXTERNAL_REFERENCE(binding_name, RegisterExternalReferences); ```
Configuration menu - View commit details
-
Copy full SHA for 5eed671 - Browse repository at this point
Copy the full SHA 5eed671View commit details -
tools: enable Node.js command line flags in node_mksnapshot
Pass the flags down to node_mksnapshot so that we can use them when generating the snapshot (e.g. to debug or enable V8 flags)
Configuration menu - View commit details
-
Copy full SHA for ae47366 - Browse repository at this point
Copy the full SHA ae47366View commit details -
src: snapshot Environment upon instantiation
This includes the initial Environment (without running bootstrap scripts) into the builtin snapshot
Configuration menu - View commit details
-
Copy full SHA for d275cb2 - Browse repository at this point
Copy the full SHA d275cb2View commit details -
src: make code cache test work with snapshots
Keep track of snapshotted modules in JS land, and move bootstrap switches into StartExecution() so that they are not included into part of the environment-independent bootstrap process.
Configuration menu - View commit details
-
Copy full SHA for aa3fabe - Browse repository at this point
Copy the full SHA aa3fabeView commit details -
This runs `lib/internal/bootstrap/loaders.js` before creating the builtin snapshot and deserialize the loaders from the snapshot in deserialization mode.
Configuration menu - View commit details
-
Copy full SHA for 7fb9589 - Browse repository at this point
Copy the full SHA 7fb9589View commit details -
src: reset zero fill toggle at pre-execution
The connection between the JS land zero fill toggle and the C++ one in the NodeArrayBufferAllocator gets lost if the toggle is deserialized from the snapshot, because V8 owns the underlying memory of this toggle. This resets the connection at pre-execution.
Configuration menu - View commit details
-
Copy full SHA for ea44464 - Browse repository at this point
Copy the full SHA ea44464View commit details -
bootstrap: build fast APIs in pre-execution
Fast APIs need to work with ArrayBuffers which we need to rebuild connections to after deserializing them from the snapshot. For now, postpone their creation until pre-execution to simplify the process.
Configuration menu - View commit details
-
Copy full SHA for c7007ca - Browse repository at this point
Copy the full SHA c7007caView commit details -
lib: initialize instance members in class constructors
Since V8 snapshot does not currently support instance member initialization, initialize them in ordianry class constructors for now so that these classes can be included in the snapshot. This may be reverted once https://bugs.chromium.org/p/v8/issues/detail?id=10704 is fixed and backported.
Configuration menu - View commit details
-
Copy full SHA for 16f7545 - Browse repository at this point
Copy the full SHA 16f7545View commit details -
This runs `lib/internal/bootstrap/node.js` before creating the builtin snapshot and deserialize the loaders from the snapshot in deserialization mode.
Configuration menu - View commit details
-
Copy full SHA for 720abb8 - Browse repository at this point
Copy the full SHA 720abb8View commit details
Commits on Jul 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 393f653 - Browse repository at this point
Copy the full SHA 393f653View commit details -
Configuration menu - View commit details
-
Copy full SHA for f85cf42 - Browse repository at this point
Copy the full SHA f85cf42View commit details
Commits on Jul 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8c9260c - Browse repository at this point
Copy the full SHA 8c9260cView commit details