Str.startsWith, str.endsWith and friends

This commit is contained in:
Folkert 2023-02-10 20:18:20 +01:00
parent 8df8c19ae2
commit eb48f01f63
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
8 changed files with 98 additions and 54 deletions

View file

@ -791,6 +791,34 @@ trait Backend<'a> {
arg_layouts,
ret_layout,
),
LowLevel::StrStartsWith => self.build_fn_call(
sym,
bitcode::STR_STARTS_WITH.to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::StrStartsWithScalar => self.build_fn_call(
sym,
bitcode::STR_STARTS_WITH_SCALAR.to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::StrEndsWith => self.build_fn_call(
sym,
bitcode::STR_ENDS_WITH.to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::StrCountGraphemes => self.build_fn_call(
sym,
bitcode::STR_COUNT_GRAPEHEME_CLUSTERS.to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::PtrCast => {
debug_assert_eq!(
1,