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

sea: add support for V8 bytecode-only caching #48191

Merged
merged 27 commits into from
Jul 26, 2023

Commits on Jul 21, 2023

  1. sea: add support for V8 bytecode-only caching

    Refs: nodejs/single-executable#73
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    18e0a49 View commit details
    Browse the repository at this point in the history
  2. src: use std::nullopt instead of {}

    It expresses the intent in a clearer way.
    
    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    184e9e6 View commit details
    Browse the repository at this point in the history
  3. src: pass parameters vector by a pointer

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    51cf8c1 View commit details
    Browse the repository at this point in the history
  4. sea: pass code cache data as an external buffer to JS

    Otherwise, we were unnecessarily creating an additional copy.
    
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ae48e90 View commit details
    Browse the repository at this point in the history
  5. sea: fix entry point file name

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    145335b View commit details
    Browse the repository at this point in the history
  6. src: use MaybeLocal<Function>() instead of {}

    It's clearer.
    
    Refs: https://github.com/nodejs/node/pull/48191/files#r1209513784
    
    Co-authored-by: James M Snell <jasnell@gmail.com>
    RaisinTen and jasnell committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f855bd5 View commit details
    Browse the repository at this point in the history
  7. src: use DataView instead of Buffer for code cache

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f549743 View commit details
    Browse the repository at this point in the history
  8. sea: warn if code cache is rejected

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    81f896f View commit details
    Browse the repository at this point in the history
  9. fixup! sea: warn if code cache is rejected

    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    4210887 View commit details
    Browse the repository at this point in the history
  10. src: add TODO for supporting import()

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e8aa501 View commit details
    Browse the repository at this point in the history
  11. src: return result of CompileFunction directly

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    b5b2d78 View commit details
    Browse the repository at this point in the history
  12. sea: make code caching optional

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    5cd337f View commit details
    Browse the repository at this point in the history
  13. src: pass length to v8::String::NewFromUtf8() for std::string_views

    Otherwise, V8 won't be able to detect the length for non-null-terminated
    strings.
    
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    27b9a6c View commit details
    Browse the repository at this point in the history
  14. test: adjust line numbers in test/fixtures/errors/force_colors.snapshot

    So that `./node test/parallel/test-node-output-errors.mjs` passes.
    
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c62e892 View commit details
    Browse the repository at this point in the history
  15. src: use kNoCompileOptions instead of kEagerCompile

    Refs: nodejs#48671
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    1f8f86b View commit details
    Browse the repository at this point in the history
  16. Apply suggestions from code review

    Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
    RaisinTen and joyeecheung committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6589352 View commit details
    Browse the repository at this point in the history
  17. src: pass only the context to CompileFunction

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9fe2f4d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4020a9f View commit details
    Browse the repository at this point in the history
  19. src: fix conflicts

    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    72ed49f View commit details
    Browse the repository at this point in the history
  20. doc: run -> compile

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    86d3407 View commit details
    Browse the repository at this point in the history
  21. doc: add note about import() not working

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    fc9509b View commit details
    Browse the repository at this point in the history
  22. sea: call getCodePath() only when isSea() is true

    Refs: nodejs#48191 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    80dbcbf View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    b1792b5 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    2a2d12e View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    80cd1ff View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    d44aa0d View commit details
    Browse the repository at this point in the history
  27. test: fix test/parallel/test-node-output-errors.mjs error

    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    91bf2df View commit details
    Browse the repository at this point in the history