mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
[WIP] Setup rust side to call Str.fromUtf8
This commit is contained in:
parent
d7ba522155
commit
815f633a58
14 changed files with 371 additions and 18 deletions
|
@ -4,7 +4,7 @@ use crate::llvm::build_list::{
|
|||
list_reverse, list_set, list_single, list_sum, list_walk, list_walk_backwards,
|
||||
};
|
||||
use crate::llvm::build_str::{
|
||||
str_concat, str_count_graphemes, str_ends_with, str_from_int, str_join_with,
|
||||
str_concat, str_count_graphemes, str_ends_with, str_from_int, str_from_utf8, str_join_with
|
||||
str_number_of_bytes, str_split, str_starts_with, CHAR_LAYOUT,
|
||||
};
|
||||
use crate::llvm::compare::{build_eq, build_neq};
|
||||
|
@ -3512,6 +3512,12 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
|
||||
str_from_int(env, scope, args[0])
|
||||
}
|
||||
StrFromUtf8 => {
|
||||
// Str.fromInt : Int -> Str
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
||||
str_from_utf8(env, scope, args[0])
|
||||
}
|
||||
StrSplit => {
|
||||
// Str.split : Str, Str -> List Str
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue