mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
remove bitcast in Str.fromFloat
This commit is contained in:
parent
49ca8f3e86
commit
411a265024
2 changed files with 4 additions and 9 deletions
|
@ -281,11 +281,8 @@ pub fn str_from_float<'a, 'ctx, 'env>(
|
|||
int_symbol: Symbol,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let float = load_symbol(scope, &int_symbol);
|
||||
let int = env
|
||||
.builder
|
||||
.build_bitcast(float, env.context.i64_type(), "to_bits");
|
||||
|
||||
let zig_result = call_bitcode_fn(env, &[int], &bitcode::STR_FROM_FLOAT).into_struct_value();
|
||||
let zig_result = call_bitcode_fn(env, &[float], &bitcode::STR_FROM_FLOAT).into_struct_value();
|
||||
|
||||
zig_str_to_struct(env, zig_result).into()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue