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

refactor: make static strings use easier #526

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

bartlomieju
Copy link
Member

Just a bit of a cleanup.

) -> v8::Local<'s, v8::String> {
v8::String::new_external_onebyte_static(scope, str_).unwrap()
}

pub static DENO: &[u8] = b"Deno";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something we should consider (in the future): Aapo added OneByteConst strings that can be const, and do a bit of the v8 string setup at compile time. These strings would be ideal for that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #527

Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice cleanup

@bartlomieju bartlomieju merged commit a76aea6 into denoland:main Jan 31, 2024
13 checks passed
@bartlomieju bartlomieju deleted the static_str branch January 31, 2024 23:22
Digifox03 added a commit to Digifox03/deno_core that referenced this pull request Feb 2, 2024
commit 8c3dc51
Author: Alessandro Cosentino <alessandro@alecsn.it>
Date:   Fri Feb 2 00:17:01 2024 +0100

    refactor: encapsulate source map logic in SourceMapper (denoland#532)

    This is necessary for denoland#530

commit 2c0302b
Author: denobot <33910674+denobot@users.noreply.github.com>
Date:   Fri Feb 2 02:01:48 2024 +0900

    0.257.0 (denoland#535)

    Bumped versions for 0.257.0

    Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>

commit 2d546ea
Author: Matt Mastracci <matthew@mastracci.com>
Date:   Thu Feb 1 09:09:23 2024 -0700

    chore: deno fmt the repo (denoland#534)

    We need to enforce `deno fmt` on a few other files, but let's at least
    format them for now.

commit 5f908ba
Author: Bartek Iwańczuk <biwanczuk@gmail.com>
Date:   Thu Feb 1 04:14:41 2024 +0100

    refactor: Synthetic module gets instantiated on creation (denoland#529)

    Closes denoland#517

commit 012a280
Author: Bartek Iwańczuk <biwanczuk@gmail.com>
Date:   Thu Feb 1 01:21:00 2024 +0100

    feat: Add bindings to analyse WASM modules (denoland#528)

    This commit adds "CustomModuleEvaluationCtx" struct that is passed to
    "CustomModuleEvaluationCb" and allows to analyze contents of WASM
    modules.

    Specifically we add the ability to analyze imports and exports of WASM
    modules that can be used to build up support for WASM imports.

commit a76aea6
Author: Bartek Iwańczuk <biwanczuk@gmail.com>
Date:   Thu Feb 1 00:08:07 2024 +0100

    refactor: make static strings use easier (denoland#526)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants