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

Improve internal string allocation methods #398

Merged
merged 3 commits into from
May 10, 2024

Commits on May 7, 2024

  1. Improve internal string allocation methods

    String values are allocated as temporary or final results. This commit
    attempts to improve the consistency and performance of this step.
    
    - define `JS_NewString` as an inline function to allow simple expansion
      of `strlen()` for string literals
    - document string contents constraints regarding UTF-8 encoding.
    - rename `js_new_string8` as `js_new_string8_len`. takes `const char *`.
    - new inline function `js_new_string8` takes `const char *`, computes
      string length with `strlen` and calls `js_new_string8_len`. No overhead
      for string literals
    - use internal string allocation functions where appropriate, remove overhead
    chqrlie committed May 7, 2024
    Configuration menu
    Copy the full SHA
    24b07bd View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    e15f75d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d2866d View commit details
    Browse the repository at this point in the history