Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ pub const NameMinifier = struct {
head: std.ArrayList(u8),
tail: std.ArrayList(u8),

pub const default_head = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
pub const default_tail = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";
// Characters ordered by frequency of use in JavaScript code for better gzip compression
pub const default_head: [54]u8 align(64) = "etnriaoscludfpmhg_vybxSCwTEDOkAjMNPFILRzBVHUWGKqJYXZQ$".*;
pub const default_tail: [64]u8 align(64) = "etnriaoscludfpmhg_vybxSCwTEDOkAjMNPFILRzBVHUWGKqJYXZQ$1024368579".*;

pub fn init(allocator: std.mem.Allocator) NameMinifier {
return .{
Expand Down
1 change: 1 addition & 0 deletions src/renamer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ pub const ExportRenamer = struct {
pub fn clearRetainingCapacity(this: *ExportRenamer) void {
this.used.clearRetainingCapacity();
this.string_buffer.reset();
this.count = 0;
}

pub fn deinit(this: *ExportRenamer) void {
Expand Down