Commit Graph

3 Commits (2b657ccfb3fdf861ad029e0358ba1f02dad07009)

Author SHA1 Message Date
Joyee Cheung bfb4ca8e94
bootstrap: use SnapshotData to pass snapshot data around
Instead of passing the snapshot blob, the per-isolate data
indices and the EnvSerializeInfo separately, use the aggregate
type Snapshot to carry these around, and refactor
NodeMainInstance so that it owns the v8::Isolate::CreateParams
when it owns its isolate. This also gets rid of the owns_isolate_
and deserialize_mode_ booleans in NodeMainInstance since
NodeMainInstance can compute these by just checking if it has
pointers to the CreateParams or the SnapshotData.

PR-URL: https://github.com/nodejs/node/pull/42360
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-23 20:20:14 +08:00
Joyee Cheung 30e8b5e2a2
tools: refactor snapshot builder
This patch:

- Moves the snapshot building code to src/ so that we can reuse it
  later when generating custom snapshots from an entry point accepted
  by the node binary.
- Create a SnapshotData struct that incorporates all the data useful
  for a snapshot blob, including both the V8 data and the Node.js
  data.

PR-URL: https://github.com/nodejs/node/pull/38902
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2021-06-10 14:17:49 +08:00
Joyee Cheung 3a4d916ea7
doc: add documentation about node_mksnapshot and mkcodecache
PR-URL: https://github.com/nodejs/node/pull/30773
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-12-05 18:57:33 +08:00