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

Zig AstGen changes, unnecessary use of 'var' #1605

Merged
merged 8 commits into from
Nov 21, 2023

Conversation

llogick
Copy link
Member

@llogick llogick commented Nov 16, 2023

This can be merged as-is, or we can wait and see if I missed changing a var to const somewhere.

@llogick llogick force-pushed the nullptrdevs/var-never-mutated branch from d7403cb to d811e00 Compare November 16, 2023 21:35
@Techatrix
Copy link
Member

Our dependencies will also need to be updated:

@llogick
Copy link
Member Author

llogick commented Nov 16, 2023

* [binned_allocator.zig](https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904) How am I supposed to edit/fix/PR a gist?

That gist has changed hands as many times as it's been updated, you have the choice of converting in to a repo.

@Techatrix
Copy link
Member

Techatrix commented Nov 16, 2023

@SuperAuguste Can I create this as a new repository in zigtools?

@SuperAuguste
Copy link
Member

SuperAuguste commented Nov 17, 2023

sure @Techatrix! tbh I don't believe there's a lot of external interest in using the binned allocator so you could also just plop it in a file in the zls repo :P

@Techatrix
Copy link
Member

I guess that would also work. I though there were other project that also used the binned allocator but sourcegraph search couldn't find any.

@nullptrdevs Would you mind If I added the binned allocator in your PR directly?

@llogick
Copy link
Member Author

llogick commented Nov 17, 2023

@nullptrdevs Would you mind If I added the binned allocator in your PR directly?

Go ahead, and always feel free to make changes/push commits to any of my PRs ! I always push --force-with-lease whenever I remember to :)

Techatrix and others added 3 commits November 17, 2023 01:51
- fix data race when allocating with thread safety
- remove workarounds for ziglang/zig#14705
- correct unnecessary uses of 'var'

Note that the BSD Zero Clause License has been removed
from binned_allocator.zig
Co-authored-by: Ian Johnson <ian@ianjohnson.dev>
Copy link
Member

@SuperAuguste SuperAuguste left a comment

Choose a reason for hiding this comment

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

LGTM; took it for a spin on ZLS for a bit and didn't encounter any crashes or anything :) (every PR I merge without fuzzing reminds me that I should really finish that code :/)

@SuperAuguste SuperAuguste merged commit 6b05cb6 into master Nov 21, 2023
8 checks passed
@SuperAuguste SuperAuguste deleted the nullptrdevs/var-never-mutated branch November 21, 2023 06:18
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.

4 participants