mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
Part of #1880 `Token` size is reduced from 32 to 16 bytes by changing the previous token value `Option<&'a str>` to a u32 index handle. It would be nice if this handle is eliminated entirely because the normal case for a string is always `&source_text[token.span.start.token.span.end]` Unfortunately, JavaScript allows escaped characters to appear in identifiers, strings and templates. These strings need to be unescaped for equality checks, i.e. `"\a" === "a"`. This leads us to adding a `escaped_strings[]` vec for storing these unescaped and allocated strings. Performance regression for adding this vec should be minimal because escaped strings are rare. Background Reading: * https://floooh.github.io/2018/06/17/handles-vs-pointers.html |
||
|---|---|---|
| .. | ||
| oxc | ||
| oxc_allocator | ||
| oxc_ast | ||
| oxc_cli | ||
| oxc_codegen | ||
| oxc_diagnostics | ||
| oxc_formatter | ||
| oxc_index | ||
| oxc_js_regex | ||
| oxc_language_server | ||
| oxc_linter | ||
| oxc_linter_plugin | ||
| oxc_macros | ||
| oxc_minifier | ||
| oxc_parser | ||
| oxc_prettier | ||
| oxc_query | ||
| oxc_semantic | ||
| oxc_span | ||
| oxc_syntax | ||
| oxc_transformer | ||
| oxc_type_synthesis | ||
| oxc_wasm | ||