[WIP] src: introduce node_bootstrap and node_process#20879
[WIP] src: introduce node_bootstrap and node_process#20879jasnell wants to merge 3 commits intonodejs:masterfrom
Conversation
This continues the reorganization of node.cc by splitting the implementations of most process object functions and properties out to a separate node_process.cc and creates a separate temporary bootstrapper object used during Node.js bootstrap to avoid the need for deleting/overwriting process properties set during bootstrap.
Various cleanups within SetupProcessObject to improve readability
targos
left a comment
There was a problem hiding this comment.
JS changes LGTM.
Rubber stamp LGTM on C++ changes, assuming it's mostly cut and paste.
Big +1 on reducing the number of lines in node.cc!
|
Can we do this in smaller chunks, more slowly? Landing a patch this size is going to be a major source of conflicts, and not just with things like #20876… |
|
Yeah, splitting it up is possible but will take awhile longer. I'd like to get agreement on this path before staring to do that. :) |
|
@addaleax ... before I start splitting this up, can I ask you to give me a better sense for how it should be split up so the effort will have the least dramatic impact on what you're working on with the Workers stuff. |
|
Starting to break things up a bit: #20917 |
|
@jasnell Yes, that smaller PR looks better with regard to conflicts :) In general, the easiest thing to check for how much "conflict potential" there is would be applying on PRs on top of the other… taking it in small chunks is definitely the right approach here |
Furthering the cause of breaking node.cc up into smaller, more manageable chunks.
This does two main things:
Adds a new bootstrapper object that is used only during bootstrap to avoid having to delete and overwrite properties on
processduring bootstrapMoves most of the
processfunction and property definitions tonode_process.ccfor better isolation.Functionality is the same, tho there are some code cleanups along the way. This should be semver-patch.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes