Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
src: simplify embedder entry point execution.#51557
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: simplify embedder entry point execution. #51557
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Jan 24, 2024
Review requested:
|
nodejs-github-bot commented Jan 24, 2024
joyeecheung commented Jan 31, 2024
@nodejs/startup @nodejs/cpp-reviewers Can I get some reviews please? Thanks! |
nodejs-github-bot commented Feb 1, 2024
nodejs-github-bot commented Feb 2, 2024
nodejs-github-bot commented Feb 2, 2024
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes.
b6a6a81 to 4a6c71eComparenodejs-github-bot commented Feb 16, 2024
nodejs-github-bot commented Feb 16, 2024
nodejs-github-bot commented Feb 17, 2024
nodejs-github-bot commented Feb 20, 2024
nodejs-github-bot commented Feb 20, 2024
nodejs-github-bot commented Feb 20, 2024
nodejs-github-bot commented Feb 21, 2024
| return scope.EscapeMaybe(StartExecution(env, entry)); | ||
| env->performance_state()->Mark( | ||
| performance::NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); |
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.
I think this can still be marked in JS with markBootstrapComplete, similar to other entry points.
joyeecheungFeb 21, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
The other entry points don't take callbacks. I think it's less convoluted to mark this right before we invoke the callback, otherwise it's quite difficult to wrap your head around things going back and forth between C++ and JS for these entry points that take callbacks (that's what I feel whenever I looked at these two, and I even reviewed the original changes).
nodejs-github-bot commented Feb 21, 2024
nodejs-github-bot commented Feb 22, 2024
nodejs-github-bot commented Feb 22, 2024
nodejs-github-bot commented Feb 22, 2024
nodejs-github-bot commented Feb 23, 2024
Landed in f29d2b7 |
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: #51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: #51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: #51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: #51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: #51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set `PauseOnNextJavascriptStatement()` for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes. PR-URL: nodejs#51557 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Previously we wrapped the embedder entry point callback into a binding and then invoke the binding from JS land which was a bit convoluted. Now we just call it directly from C++. The main scripts that needed to tail call the embedder callback now return the arguments in an array so that the C++ land can extract the arguments and pass them to the callback. We also set
PauseOnNextJavascriptStatement()for --inspect-brk and mark the bootstrap complete milestone directly in C++ for these execution modes.