<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_main_instance.h, branch devsnek-patch-1</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>src: snapshot Environment upon instantiation</title>
<updated>2020-07-18T03:15:57+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-21T04:47:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1faf6f459f220bb67866f12b30626ef7856876ee'/>
<id>1faf6f459f220bb67866f12b30626ef7856876ee</id>
<content type='text'>
This includes the initial Environment (without running bootstrap
scripts) into the builtin snapshot

PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This includes the initial Environment (without running bootstrap
scripts) into the builtin snapshot

PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add an ExternalReferenceRegistry class</title>
<updated>2020-07-18T03:02:58+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-20T13:35:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=ef9964f4c183f062ca25337984a542895590141d'/>
<id>ef9964f4c183f062ca25337984a542895590141d</id>
<content type='text'>
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-&gt;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);
  ```

PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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-&gt;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);
  ```

PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: align worker and main thread code with embedder API</title>
<updated>2020-03-21T09:57:20+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-11-11T14:24:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a9fb51f9be570001accfce8a057e885827655a2f'/>
<id>a9fb51f9be570001accfce8a057e885827655a2f</id>
<content type='text'>
This addresses some long-standing TODOs by Joyee and me about
making the embedder API more powerful and us less reliant on
internal APIs for creating the main thread and Workers.

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses some long-standing TODOs by Joyee and me about
making the embedder API more powerful and us less reliant on
internal APIs for creating the main thread and Workers.

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: make `FreeEnvironment()` perform all necessary cleanup</title>
<updated>2020-03-21T09:57:08+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-11-10T19:47:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d7bc5816a5d88e18d7ede081042d87f48a2bc54b'/>
<id>d7bc5816a5d88e18d7ede081042d87f48a2bc54b</id>
<content type='text'>
Make the calls `stop_sub_worker_contexts()`, `RunCleanup()`
part of the public API for easier embedding.

(Note that calling `RunAtExit()` is idempotent because the
at-exit callback queue is cleared after each call.)

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the calls `stop_sub_worker_contexts()`, `RunCleanup()`
part of the public API for easier embedding.

(Note that calling `RunAtExit()` is idempotent because the
at-exit callback queue is cleared after each call.)

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src, tools: replace raw ptr with smart ptr</title>
<updated>2019-07-13T04:59:36+00:00</updated>
<author>
<name>GauthamBanasandra</name>
<email>gautham.bangalore@gmail.com</email>
</author>
<published>2019-07-06T13:54:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=cf929c04b082f0d1d980772d343f056ea4fd7359'/>
<id>cf929c04b082f0d1d980772d343f056ea4fd7359</id>
<content type='text'>
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 &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix typos</title>
<updated>2019-05-09T04:31:02+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-05-06T13:58:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=3b48ce6ccfb39b72a446fad06b56d29dabe09b05'/>
<id>3b48ce6ccfb39b72a446fad06b56d29dabe09b05</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/27580
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/27580
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: make deleted function public in node_main_instance.h</title>
<updated>2019-05-06T03:26:32+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-05-01T05:25:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=64a25b8417a00b425208381753b485b4f1e1618e'/>
<id>64a25b8417a00b425208381753b485b4f1e1618e</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/27509
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/27509
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: use std::vector&lt;size_t&gt; instead of IndexArray</title>
<updated>2019-04-23T03:26:09+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-21T12:03:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d5d9c349d3f0ff268f8dc2cc31812581bbe2815e'/>
<id>d5d9c349d3f0ff268f8dc2cc31812581bbe2815e</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: enable context snapshot after running per-context scripts</title>
<updated>2019-04-23T03:26:07+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-20T09:18:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=eb23b176d8c7122af6add5ee38f87044288d3d39'/>
<id>eb23b176d8c7122af6add5ee38f87044288d3d39</id>
<content type='text'>
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 &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: enable snapshot with per-isolate data</title>
<updated>2019-04-23T03:26:04+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-18T14:09:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=bf5dadeef07250763948765e9902edd2ecee5448'/>
<id>bf5dadeef07250763948765e9902edd2ecee5448</id>
<content type='text'>
Enable serializing the isolate from an isolate snapshot generated
by node_mksnapshot with per-isolate data.

PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable serializing the isolate from an isolate snapshot generated
by node_mksnapshot with per-isolate data.

PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
</feed>
