oxc/crates
overlookmotel e123be0a00
fix(parser): correct MAX_LEN for 32-bit systems (#2204)
Maximum length of source parser can accept is limited on 32-bit systems
to `isize::MAX` (i.e. `i32::MAX` not `u32::MAX`) because Rust [limits
the size of
allocations](https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.from_size_align)
to `isize::MAX`.

This PR takes that constraint into account when calculating
`Parser::MAX_LEN`.

It also speeds up the `overlong_source` test so it runs in under 500ms
(previously it took ~4 secs on a M1 Macbook Pro).
2024-01-29 21:45:45 +08:00
..
oxc Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
oxc_allocator docs(allocator): document behaviour of Box 2024-01-29 21:34:45 +08:00
oxc_ast refactor(semantic): checking label in ContinueStatement based on LabelBuilder (#2202) 2024-01-29 18:24:42 +08:00
oxc_cli feat(cli): add --version (#2182) 2024-01-26 19:13:17 +08:00
oxc_codegen fix(codegen): print necessary spaces for ExportAllDeclaration (#2190) 2024-01-29 01:05:09 +08:00
oxc_diagnostics refactor: move all miette usages to oxc_diagnostics 2024-01-28 16:52:16 +08:00
oxc_index Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
oxc_js_regex Initialize JS Regex crates and def AST. (#1500) 2023-11-23 00:22:17 +08:00
oxc_language_server chore(deps): update cargo (#2191) 2024-01-29 11:38:47 +08:00
oxc_linter feat(linter): implement @next/next/no-before-interactive-script-outsi… (#2203) 2024-01-29 21:01:50 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier feat(codegen): move string test to codegen (#2150) 2024-01-23 23:49:36 +08:00
oxc_parser fix(parser): correct MAX_LEN for 32-bit systems (#2204) 2024-01-29 21:45:45 +08:00
oxc_prettier fix(codegen): print Directive original string (#2157) 2024-01-25 15:24:05 +08:00
oxc_semantic refactor(semantic): checking label in ContinueStatement based on LabelBuilder (#2202) 2024-01-29 18:24:42 +08:00
oxc_span Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
oxc_syntax refactor(syntax): don't re-export unicode_id_start 2024-01-23 11:05:17 +08:00
oxc_transformer feat(transformer/decorators): support transform member decorators (#2171) 2024-01-26 10:14:19 +08:00
oxc_wasm refactor(linter): perfect the scope linter (#2092) 2024-01-20 10:46:35 +08:00