Skip to content

Commit

Permalink
add custom version of binned_allocator
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Techatrix committed Nov 17, 2023
1 parent d811e00 commit 5a31c50
Show file tree
Hide file tree
Showing 6 changed files with 528 additions and 16 deletions.
2 changes: 0 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub fn build(b: *std.build.Builder) !void {
const exe_options_module = exe_options.createModule();
const known_folders_module = b.dependency("known_folders", .{}).module("known-folders");
const diffz_module = b.dependency("diffz", .{}).module("diffz");
const binned_allocator_module = b.dependency("binned_allocator", .{}).module("binned_allocator");

const exe = b.addExecutable(.{
.name = "zls",
Expand All @@ -111,7 +110,6 @@ pub fn build(b: *std.build.Builder) !void {
exe.addModule("build_options", exe_options_module);
exe.addModule("known-folders", known_folders_module);
exe.addModule("diffz", diffz_module);
exe.addModule("binned_allocator", binned_allocator_module);

if (enable_tracy) {
const client_cpp = "src/tracy/public/TracyClient.cpp";
Expand Down
5 changes: 0 additions & 5 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
.url = "https://github.com/ziglibs/diffz/archive/90353d401c59e2ca5ed0abe5444c29ad3d7489aa.tar.gz",
.hash = "122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864",
},
.binned_allocator = .{
// upstream: https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904
.url = "https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904/archive/6c3321e0969ff2463f8335da5601986cf2108690.tar.gz",
.hash = "1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5",
},
},
.paths = .{""},
}
7 changes: 0 additions & 7 deletions deps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
{ linkFarm, fetchzip }:

linkFarm "zig-packages" [
{
name = "1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5";
path = fetchzip {
url = "https://gist.github.com/antlilja/8372900fcc09e38d7b0b6bbaddad3904/archive/6c3321e0969ff2463f8335da5601986cf2108690.tar.gz";
hash = "sha256-m/kr4kmkG2rLkAj5YwvM0HmXTd+chAiQHzYK6ozpWlw=";
};
}
{
name = "122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864";
path = fetchzip {
Expand Down
Loading

0 comments on commit 5a31c50

Please sign in to comment.