mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
make Str.fromUtf8 in-place
This commit is contained in:
parent
9e97a09a87
commit
018348bd83
6 changed files with 49 additions and 14 deletions
|
@ -17,13 +17,13 @@ use morphic_lib::UpdateMode;
|
|||
use roc_builtins::bitcode;
|
||||
use roc_mono::layout::{Builtin, Layout, LayoutIds};
|
||||
|
||||
fn pass_update_mode<'a, 'ctx, 'env>(
|
||||
pub fn pass_update_mode<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
update_mode: UpdateMode,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
match update_mode {
|
||||
UpdateMode::Immutable => env.context.bool_type().const_zero().into(),
|
||||
UpdateMode::InPlace => env.context.bool_type().const_int(1, false).into(),
|
||||
UpdateMode::Immutable => env.context.i8_type().const_zero().into(),
|
||||
UpdateMode::InPlace => env.context.i8_type().const_int(1, false).into(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue