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

another intern pool rewrite #1594

Merged
merged 30 commits into from
Dec 24, 2023
Merged

another intern pool rewrite #1594

merged 30 commits into from
Dec 24, 2023

Conversation

Techatrix
Copy link
Member

@Techatrix Techatrix commented Nov 10, 2023

some work I did on the InternPool from my sema branch.

I decided to do some more changes.

  • don't store pointers in the InternPool
  • degibberish function for types (bonus)
  • make the InternPool thread safe
  • remove/replace encoding.zig
    - [ ] improve storage of container types nah, I will do this another time

I am gonna have so much fun, rebasing my sema branch. (︶︹︶)

@Techatrix Techatrix marked this pull request as draft November 13, 2023 20:52
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from 31e5ca0 to d81c8a8 Compare November 22, 2023 23:18
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 154 lines in your changes are missing coverage. Please review.

Comparison is base (adaeabb) 76.65% compared to head (7162c33) 76.16%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/ComptimeInterpreter.zig 33.07% 85 Missing ⚠️
src/analyser/completions.zig 62.88% 36 Missing ⚠️
src/analyser/string_pool.zig 83.80% 17 Missing ⚠️
src/analysis.zig 21.42% 11 Missing ⚠️
src/analyser/degibberish.zig 96.35% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1594      +/-   ##
==========================================
- Coverage   76.65%   76.16%   -0.49%     
==========================================
  Files          33       34       +1     
  Lines        9093     9977     +884     
==========================================
+ Hits         6970     7599     +629     
- Misses       2123     2378     +255     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Techatrix Techatrix force-pushed the techatrix/intern-pool branch 2 times, most recently from 04dc75d to 3a6a1cc Compare November 27, 2023 23:22
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from 3a6a1cc to 46a4e96 Compare December 3, 2023 00:49
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from 46a4e96 to e72a244 Compare December 17, 2023 03:46
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from e72a244 to 1b9dd50 Compare December 19, 2023 00:29
ErrorBuilder:
- new `unified` option
- new `file_name_visibility` option
- new `removeUnusedFiles` function
- formatting functions have been rewritten from scratch
- tests coverage

offsets.zig:
- new `offsets.multilineLocAtIndex` function (and wrappers)
- new `StringPool`
- most functions now operate on `InternPool.Index` instead of `ÌnternPool.Key`
- many new helper functions
Don't worry, it is still going to crash easily (just like ZLS in general)
We may use this in the future to explain types to new Zig users.
- more doc comments
- compute string hash before acquiring lock
- add safety check for calling deinit while holding lock
- add stringToSliceLock
- add stringToSlice
- remove StringPool.String.empty
- remove hashString
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from 9cabd2c to 8391e8f Compare December 20, 2023 07:31
covered:
- primitives
- optionals
- pointers
- arrays
@Techatrix Techatrix marked this pull request as ready for review December 21, 2023 00:44
@Techatrix Techatrix marked this pull request as draft December 21, 2023 00:46
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch 5 times, most recently from f63109a to ac3db8d Compare December 21, 2023 02:55
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch 4 times, most recently from dfaf542 to 7e39ce5 Compare December 21, 2023 05:48
@Techatrix Techatrix force-pushed the techatrix/intern-pool branch from 7e39ce5 to 7162c33 Compare December 23, 2023 03:43
@Techatrix Techatrix marked this pull request as ready for review December 23, 2023 03:46
Copy link
Contributor

@llogick llogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genius

@Techatrix Techatrix merged commit 43a905c into master Dec 24, 2023
8 of 10 checks passed
@Techatrix Techatrix deleted the techatrix/intern-pool branch February 10, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants