mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
perf(semantic): reduce AstNodeId to u32 (#4264)
`AstNodeId` was a `usize`. This seems excessive. Parser has a limit on size of a JS file of 4 GiB. While it is *possible* for a JS file of that size to create an AST with more than `1 << 32` (~4 billion) AST nodes, that would be insanely large. So make `AstNodeId` `u32` instead.
This commit is contained in:
parent
23743dbd59
commit
8fad7dbac3
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ use bitflags::bitflags;
|
|||
use oxc_index::define_index_type;
|
||||
|
||||
define_index_type! {
|
||||
pub struct AstNodeId = usize;
|
||||
pub struct AstNodeId = u32;
|
||||
}
|
||||
|
||||
impl AstNodeId {
|
||||
|
|
|
|||
Loading…
Reference in a new issue