Uh oh!
There was an error while loading. Please reload this page.
src: simplify embedder entry point execution. - #51557
Merged
Merged
Conversation
nodejs-github-bot
commented
Jan 24, 2024
Collaborator
Review requested:
|
nodejs-github-bot
commented
Jan 24, 2024
Collaborator
joyeecheung
commented
Jan 31, 2024
MemberAuthor
@nodejs/startup @nodejs/cpp-reviewers Can I get some reviews please? Thanks! |
lemire
approved these changes
Jan 31, 2024
nodejs-github-bot
commented
Feb 1, 2024
Collaborator
nodejs-github-bot
commented
Feb 2, 2024
Collaborator
nodejs-github-bot
commented
Feb 2, 2024
Collaborator
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.
joyeecheungforce-pushed
the
embedder-entrypoint
branch
from
February 16, 2024 18:12
b6a6a81 to
4a6c71eComparenodejs-github-bot
commented
Feb 16, 2024
Collaborator
nodejs-github-bot
commented
Feb 16, 2024
Collaborator
nodejs-github-bot
commented
Feb 17, 2024
Collaborator
nodejs-github-bot
commented
Feb 20, 2024
Collaborator
nodejs-github-bot
commented
Feb 20, 2024
Collaborator
nodejs-github-bot
commented
Feb 20, 2024
Collaborator
nodejs-github-bot
commented
Feb 21, 2024
Collaborator
| return scope.EscapeMaybe(StartExecution(env, entry)); | ||
| env->performance_state()->Mark( | ||
| performance::NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); |
Member
There was a problem hiding this comment.
I think this can still be marked in JS with markBootstrapComplete, similar to other entry points.
MemberAuthor
There was a problem hiding this comment.
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
Collaborator
legendecas
approved these changes
Feb 22, 2024
nodejs-github-bot
commented
Feb 22, 2024
Collaborator
nodejs-github-bot
commented
Feb 22, 2024
Collaborator
nodejs-github-bot
commented
Feb 22, 2024
Collaborator
nodejs-github-bot
commented
Feb 23, 2024
Collaborator
Landed in f29d2b7 |
marco-ippolito pushed a commit
that referenced
this pull request
Feb 26, 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. PR-URL: #51557 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
marco-ippolito pushed a commit
that referenced
this pull request
Feb 27, 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. PR-URL: #51557 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
richardlau pushed a commit
that referenced
this pull request
Mar 25, 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. PR-URL: #51557 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.