Skip to content
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

src: use NativeModuleLoader to compile all the bootstrappers #24775

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Dec 1, 2018
@joyeecheung
Copy link
Member Author

joyeecheung commented Dec 1, 2018

cc @addaleax @jasnell @devsnek

Since the top-level indentation in the two bootstrappers are now eliminated, this patch would be easier to review with https://github.com/nodejs/node/pull/24775/files?w=1 (with the whitespace-only changes stripped)

CI: https://ci.nodejs.org/job/node-test-pull-request/19124/

@joyeecheung joyeecheung added backport-requested-v10.x process Issues and PRs related to the process subsystem. labels Dec 1, 2018
@joyeecheung
Copy link
Member Author

joyeecheung commented Dec 2, 2018

@joyeecheung
Copy link
Member Author

@addaleax @jasnell @devsnek @nodejs/process Can I have some reviews please? Thanks!

@joyeecheung joyeecheung added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 3, 2018
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.
@joyeecheung
Copy link
Member Author

joyeecheung commented Dec 3, 2018

@joyeecheung
Copy link
Member Author

Landed in edcb950, thanks!

@joyeecheung joyeecheung closed this Dec 3, 2018
joyeecheung added a commit that referenced this pull request Dec 3, 2018
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

PR-URL: #24775
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BridgeAR
Copy link
Member

BridgeAR commented Dec 5, 2018

This does not land cleanly on v11.x (it seems like it relies on the console changes which did not land cleanly and it is likely that they apply fine as soon as they got backported). Please open a backport or change the label accordingly.

@BridgeAR
Copy link
Member

This does not land cleanly or near cleanly even after applying the recent console commits :/.

@joyeecheung could you please have another look? There are a couple of PRs from you which still need backports but I do not know which is the first one to backport and if there's maybe a semver-major PR which should be backported without breaking changes similar to the console one.

@joyeecheung
Copy link
Member Author

@BridgeAR I think this does not apply cleanly mostly because there are out-of-order commits backported to v11.x-staging before this one is backported. I'll try reverting those first before doing a clean backport

@joyeecheung
Copy link
Member Author

joyeecheung commented Jan 11, 2019

This could land cleanlier on v11.x-staging after

  1. Reverting these out-of-order commits first, in this order

e97acf7 lib: expose all type checks from the internal types module
c168672 inspector: move process.binding to internalBinding
617bfe4 lib: remove internalBinding('config').pendingDeprecation
55d185f os: move process.binding('os') to internalBinding
0cde1a4 lib: remove unused NativeModule/NativeModule wraps
88a5449 src,lib: make process.binding('config') internal
1ec4f8d lib: remove duplicated noop function

  1. Cherry-pick fs: make process.binding('fs') internal #22478

There will still be a small conflict in src/node.cc which I suspect is caused by the out-of-order cherry-pick of 56b2a7274c inspector: split the HostPort being used and the one parsed from CLI but simply reverting that could trigger some other bigger conflicts.

joyeecheung added a commit to joyeecheung/node that referenced this pull request Jan 11, 2019
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

PR-URL: nodejs#24775
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
addaleax pushed a commit that referenced this pull request Jan 14, 2019
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

PR-URL: #24775
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>

Backport-PR-URL: #25446
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

PR-URL: nodejs#24775
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
This patch moves all the bootstrapper compilation to use
NativeModuleLoader::CompileAndCall(). With this we no longer
need to mess with the error decoration and handling any more -
there is no point in handling the JS error occurred during bootstrapping
by ourselves, we should just crash or let the VM handle it.

PR-URL: nodejs#24775
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>

Backport-PR-URL: nodejs#25446
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants