Compare commits

...

1 Commits

Author SHA1 Message Date
Henrik Böving
71c43a1f11 perf: inline IsUTF8FirstByte 2026-01-02 10:58:08 +00:00

View File

@@ -1396,6 +1396,7 @@ scalar value.
public def IsUTF8FirstByte (c : UInt8) : Prop :=
c &&& 0x80 = 0 c &&& 0xe0 = 0xc0 c &&& 0xf0 = 0xe0 c &&& 0xf8 = 0xf0
@[inline]
public instance {c : UInt8} : Decidable c.IsUTF8FirstByte :=
inferInstanceAs <| Decidable (c &&& 0x80 = 0 c &&& 0xe0 = 0xc0 c &&& 0xf0 = 0xe0 c &&& 0xf8 = 0xf0)