aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-15 20:08:40 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-15 20:08:40 -0700
commitcf2e81b03662c4b1a227d1bc9560a91826ef20e6 (patch)
tree0dc03cb97af1eb0615b8bb491696247962a81b73 /src/string_immutable.zig
parent0baa3b511e28cfb124f712e12d8f93474e6ce6fa (diff)
parentbf2732599cc7e45f320f75b38672c1a1fc3d5583 (diff)
downloadbun-cf2e81b03662c4b1a227d1bc9560a91826ef20e6.tar.gz
bun-cf2e81b03662c4b1a227d1bc9560a91826ef20e6.tar.zst
bun-cf2e81b03662c4b1a227d1bc9560a91826ef20e6.zip
Merge branch 'jarred/gen'
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index bbdea59cf..c9168d336 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -388,6 +388,14 @@ inline fn eqlComptimeCheckLen(self: string, comptime alt: anytype, comptime chec
const second = comptime std.mem.readIntNative(u64, alt[8..16]);
return ((comptime !check_len) or self.len == alt.len) and first == std.mem.readIntNative(u64, self[0..8]) and second == std.mem.readIntNative(u64, self[8..16]);
},
+ 17 => {
+ const first = comptime std.mem.readIntNative(u64, alt[0..8]);
+ const second = comptime std.mem.readIntNative(u64, alt[8..16]);
+ return ((comptime !check_len) or self.len == alt.len) and
+ first == std.mem.readIntNative(u64, self[0..8]) and second ==
+ std.mem.readIntNative(u64, self[8..16]) and
+ alt[16] == self[16];
+ },
23 => {
const first = comptime std.mem.readIntNative(u64, alt[0..8]);
const second = comptime std.mem.readIntNative(u64, alt[8..15]);