mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Support variable ptr sizes in string refcount
This commit is contained in:
parent
a2069a88db
commit
b02b25f41d
1 changed files with 4 additions and 4 deletions
|
@ -521,10 +521,10 @@ fn build_inc_str_help<'a, 'ctx, 'env>(
|
|||
.unwrap()
|
||||
.into_int_value();
|
||||
|
||||
let bitmask = ctx.i64_type().const_int(isize::MIN as u64, false);
|
||||
let bitmask = refcount_1(ctx, env.ptr_bytes);
|
||||
let is_small = builder.build_int_compare(
|
||||
IntPredicate::NE,
|
||||
ctx.i64_type().const_zero(),
|
||||
ptr_int(ctx, env.ptr_bytes).const_zero(),
|
||||
builder.build_and(len, bitmask, "is_small"),
|
||||
"is_small_comparison",
|
||||
);
|
||||
|
@ -618,10 +618,10 @@ fn build_dec_str_help<'a, 'ctx, 'env>(
|
|||
.unwrap()
|
||||
.into_int_value();
|
||||
|
||||
let bitmask = ctx.i64_type().const_int(isize::MIN as u64, false);
|
||||
let bitmask = refcount_1(ctx, env.ptr_bytes);
|
||||
let is_small = builder.build_int_compare(
|
||||
IntPredicate::NE,
|
||||
ctx.i64_type().const_zero(),
|
||||
ptr_int(ctx, env.ptr_bytes).const_zero(),
|
||||
builder.build_and(len, bitmask, "is_small"),
|
||||
"is_small_comparison",
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue