Remove Str.fromUtf8Range

Seamless slices make this obsolete!
This commit is contained in:
Richard Feldman 2024-02-16 20:00:07 -05:00
parent 74e58d3d51
commit 37b154df4f
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
15 changed files with 94 additions and 219 deletions

View file

@ -225,15 +225,13 @@ impl<'a> LowLevelCall<'a> {
}
StrFromInt => self.num_to_str(backend),
StrFromFloat => self.num_to_str(backend),
StrFromUtf8Range => {
StrFromUtf8 => {
/*
Low-level op returns a struct with all the data for both Ok and Err.
Roc AST wrapper converts this to a tag union, with app-dependent tag IDs.
output: *FromUtf8Result i32
arg: RocList i32
start i64
count i64
update_mode: UpdateMode i32
*/
@ -245,7 +243,7 @@ impl<'a> LowLevelCall<'a> {
&WasmLayout::new(backend.layout_interner, self.ret_layout),
);
backend.code_builder.i32_const(UPDATE_MODE_IMMUTABLE);
backend.call_host_fn_after_loading_args(bitcode::STR_FROM_UTF8_RANGE);
backend.call_host_fn_after_loading_args(bitcode::STR_FROM_UTF8);
}
StrTrimStart => self.load_args_and_call_zig(backend, bitcode::STR_TRIM_START),
StrTrimEnd => self.load_args_and_call_zig(backend, bitcode::STR_TRIM_END),