diff options
Diffstat (limited to '')
-rw-r--r-- | src/sourcemap/sourcemap.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sourcemap/sourcemap.zig b/src/sourcemap/sourcemap.zig index 178422848..c090397b3 100644 --- a/src/sourcemap/sourcemap.zig +++ b/src/sourcemap/sourcemap.zig @@ -933,7 +933,10 @@ pub const LineOffsetTable = struct { continue; } - var owned = columns_for_non_ascii.toOwnedSlice() catch unreachable; + // We don't call .toOwnedSlice() because it is expensive to + // reallocate the array AND when inside an Arena, it's + // hideously expensive + var owned = columns_for_non_ascii.items; if (stack_fallback.fixed_buffer_allocator.ownsSlice(std.mem.sliceAsBytes(owned))) { owned = allocator.dupe(i32, owned) catch unreachable; } |