summaryrefslogtreecommitdiff
path: root/tools/snapshot
AgeCommit message (Collapse)Author
2019-09-01tools: fix mksnapshot blob wrong freeing operatorDavid Carlier
PR-URL: https://github.com/nodejs/node/pull/29384 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-08-19tools: make code cache and snapshot deterministicBen Noordhuis
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: https://github.com/nodejs/node/issues/29108 PR-URL: https://github.com/nodejs/node/pull/29142 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-12src, tools: replace raw ptr with smart ptrGauthamBanasandra
NodeMainInstance::Create will now returrn an instance of NodeMainInstance in a unique_ptr. PR-URL: https://github.com/nodejs/node/pull/28577 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-28tools: remove unused using declarationsDaniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/28422 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-17tools: assert that the snapshot can be rehashed in node_mksnapshotJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/28181 Refs: https://github.com/nodejs/node/pull/27365 Refs: https://github.com/nodejs/node/issues/17058 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-26src: move DiagnosticFilename inlines into a -inl.hSam Roberts
DiagnosticFilename's constructor default values use inlines from env-inl.h, causing the many users of node_internals.h to include env-inl.h, even if they never use DiagnosticFilename. PR-URL: https://github.com/nodejs/node/pull/27839 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-23src: remove env-inl.h from header filesSam Roberts
Inline headers should only be included into the .cc files that use them. PR-URL: https://github.com/nodejs/node/pull/27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-23src: use std::vector<size_t> instead of IndexArrayJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/27321 Refs: https://github.com/nodejs/node/issues/17058 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-23src: enable context snapshot after running per-context scriptsJoyee Cheung
At build time, snapshot the context after running per-context scripts in the main instance, and in the final build, deserialize the context in the main instance. This provides a ~5% in the misc/startup benchmark when the instance is launched within a process that runs test/fixtures/semicolon.js. PR-URL: https://github.com/nodejs/node/pull/27321 Refs: https://github.com/nodejs/node/issues/17058 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-23tools: implement node_mksnapshotJoyee Cheung
Implements a node_mksnapshot target that generates a snapshot blob from a Node.js main instance's isolate, and serializes the data blob with other additional data into a C++ file that can be embedded into the Node.js binary. PR-URL: https://github.com/nodejs/node/pull/27321 Refs: https://github.com/nodejs/node/issues/17058 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>