Skip to content

Use a Dynarray instead of a hashtable for the preprocessor locations - #1650

Merged
WardBrian merged 2 commits into
masterfrom
preprocessor-sidetable-cleanup
Jul 28, 2026
Merged

Use a Dynarray instead of a hashtable for the preprocessor locations#1650
WardBrian merged 2 commits into
masterfrom
preprocessor-sidetable-cleanup

Conversation

@WardBrian

Copy link
Copy Markdown
Member

This hashtable only ever had keys that were numeric and growing, which means it was essentially just a growable array in a language without good support for those. Now that the standard library has a Dynarray module, we can use that and save on some storage

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian
WardBrian requested a review from nhuurre July 27, 2026 19:30
@WardBrian WardBrian added the cleanup Code simplification or clean-up label Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.52%. Comparing base (39b9a75) to head (504585d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1650   +/-   ##
=======================================
  Coverage   91.51%   91.52%           
=======================================
  Files          67       67           
  Lines        9975     9981    +6     
=======================================
+ Hits         9129     9135    +6     
  Misses        846      846           
Files with missing lines Coverage Δ
src/core/Core.ml 100.00% <ø> (ø)
src/frontend/Preprocessor.ml 98.75% <100.00%> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/frontend/Preprocessor.ml Outdated
Comment thread src/frontend/Preprocessor.ml Outdated
@WardBrian
WardBrian requested a review from nhuurre July 28, 2026 13:50
@WardBrian
WardBrian merged commit 84df636 into master Jul 28, 2026
3 checks passed
@WardBrian
WardBrian deleted the preprocessor-sidetable-cleanup branch July 28, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code simplification or clean-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants