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

Change ByteIdx in the lexer/parser to u32 #27

Open
adamchristiansen opened this issue Jan 31, 2025 · 0 comments
Open

Change ByteIdx in the lexer/parser to u32 #27

adamchristiansen opened this issue Jan 31, 2025 · 0 comments
Labels
Triage Needs to be reviewed and categorized

Comments

@adamchristiansen
Copy link
Member

Currently the ByteIdx into source files is a usize, which is unnecessarily large on 64-bit systems. This leads to a lot of wasted space in the AST when tracking source spans, since the upper 32 bits is never used (unless there is a source file >4 GB...). Switching to u32 will be more compact and still be able to represent any reasonable source file.

@adamchristiansen adamchristiansen moved this to Ready in Parser Jan 31, 2025
@adamchristiansen adamchristiansen self-assigned this Jan 31, 2025
@adamchristiansen adamchristiansen closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
@github-project-automation github-project-automation bot moved this from Ready to Done in Parser Feb 14, 2025
@adamchristiansen adamchristiansen moved this from Done to Ready in Parser Feb 16, 2025
@adamchristiansen adamchristiansen added the Triage Needs to be reviewed and categorized label Feb 23, 2025
@adamchristiansen adamchristiansen removed their assignment Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage Needs to be reviewed and categorized
Projects
Status: Ready
Development

No branches or pull requests

1 participant