aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-07 22:12:19 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-07 22:12:19 -0700
commit60fc80d4c4602b11398f0332490136e8d216dab3 (patch)
tree10a4b42080ae5332fc82dbeb625e54c7e14c2400
parent6362414d65b69cd01624e84d08eca654fc8cb101 (diff)
downloadbun-60fc80d4c4602b11398f0332490136e8d216dab3.tar.gz
bun-60fc80d4c4602b11398f0332490136e8d216dab3.tar.zst
bun-60fc80d4c4602b11398f0332490136e8d216dab3.zip
Workaround crash
https://github.com/ziglang/zig/issues/15204
-rw-r--r--src/bundler/bundle_v2.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index 77904edd7..4650f9e75 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -1858,12 +1858,12 @@ const LinkerGraph = struct {
stable_source_indices[source_index.get()] = Index.source(i);
}
- const file = comptime LinkerGraph.File{};
+ const file = LinkerGraph.File{};
// TODO: verify this outputs efficient code
std.mem.set(
@TypeOf(file.distance_from_entry_point),
files.items(.distance_from_entry_point),
- comptime file.distance_from_entry_point,
+ file.distance_from_entry_point,
);
this.stable_source_indices = @ptrCast([]const u32, stable_source_indices);
}
@@ -7522,7 +7522,9 @@ pub const Chunk = struct {
/// equidistant to an entry point, then break the tie by sorting on the
/// stable source index derived from the DFS over all entry points.
pub fn sort(a: []Order) void {
- std.sort.sort(Order, a, Order{}, lessThan);
+ // https://github.com/ziglang/zig/issues/15204
+ // Possibly switch to std.sort.sort when this is fixed
+ std.sort.insertionSort(Order, a, Order{}, lessThan);
}
};