add more Num.bytesTo* functions

This commit is contained in:
Brendan Hansknecht 2023-03-12 01:52:56 -08:00
parent 785da377c8
commit e6964536b2
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
12 changed files with 308 additions and 60 deletions

View file

@ -1051,6 +1051,8 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
| NumCountOneBits => arena.alloc_slice_copy(&[irrelevant]),
NumBytesToU16 => arena.alloc_slice_copy(&[borrowed, irrelevant]),
NumBytesToU32 => arena.alloc_slice_copy(&[borrowed, irrelevant]),
NumBytesToU64 => arena.alloc_slice_copy(&[borrowed, irrelevant]),
NumBytesToU128 => arena.alloc_slice_copy(&[borrowed, irrelevant]),
StrStartsWith | StrEndsWith => arena.alloc_slice_copy(&[borrowed, borrowed]),
StrStartsWithScalar => arena.alloc_slice_copy(&[borrowed, irrelevant]),
StrFromUtf8Range => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),

View file

@ -120,6 +120,8 @@ enum FirstOrder {
NumShiftRightBy,
NumBytesToU16,
NumBytesToU32,
NumBytesToU64,
NumBytesToU128,
NumShiftRightZfBy,
NumIntCast,
NumFloatCast,