feat(bundler): implement enum inlining / more constant folding (#12144)

Co-authored-by: paperdave <paperdave@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
dave caruso
2024-07-03 04:23:17 -07:00
committed by GitHub
parent b9fba61153
commit 688ddbda74
56 changed files with 2741 additions and 1960 deletions

View File

@@ -200,11 +200,6 @@ pub inline fn isNPMPackageName(target: string) bool {
return !scoped or slash_index > 0 and slash_index + 1 < target.len;
}
pub inline fn indexAny(in: anytype, target: string) ?usize {
for (in, 0..) |str, i| if (indexOf(str, target) != null) return i;
return null;
}
pub inline fn indexAnyComptime(target: string, comptime chars: string) ?usize {
for (target, 0..) |parent, i| {
inline for (chars) |char| {