-
Notifications
You must be signed in to change notification settings - Fork 30k
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
tools: refactor snapshot builder #38902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: indexes
→ indices
(while both are correct, the latter is preferred for technical use).
Hopefully I've updated all references to isolate_data_indexes
and NodeMainInstance::GetIsolateDataIndices
🤞🏻
Edit: I just realized that you didn't add this code, you moved it from a different file. Scrap these suggestions if they'll cause any more complications than meets the untrained eye viewing this PR ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing: for stringstreams that you only need write to, it's better to use ostringstream
.
These need to be updated to src/node.cc:1113: indexes = NodeMainInstance::GetIsolateDataIndexes();
src/node_main_instance.h:70: static const std::vector<size_t>* GetIsolateDataIndexes();
src/node_snapshot_stub.cc:13:const std::vector<size_t>* NodeMainInstance::GetIsolateDataIndexes() { |
If you don't want to do all that in this PR, I'd be happy to open a new PR correct the naming, @joyeecheung. |
7d8d5f9
to
73528a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the spamming...this is the last one 😛
73528a6
to
fa2bcbc
Compare
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.
fa2bcbc
to
6cb0e58
Compare
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: #38902 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Landed in 30e8b5e |
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: #38902 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
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: #38902 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Doesn't land cleanly on v14.x-staging. Blocked on at least #37114. |
This patch:
later when generating custom snapshots from an entry point accepted
by the node binary.
for a snapshot blob, including both the V8 data and the Node.js
data.