Fix RefC identity functions memory management

This commit is contained in:
Robert Wright 2021-05-17 11:39:46 +01:00 committed by G. Allais
parent 2a957a38d9
commit 978d86f28d
2 changed files with 5 additions and 5 deletions

View File

@ -208,7 +208,7 @@ cOp StrIndex [x, i] = "strIndex(" ++ x ++ ", " ++ i ++ ")"
cOp StrCons [x, y] = "strCons(" ++ x ++ ", " ++ y ++ ")"
cOp StrAppend [x, y] = "strAppend(" ++ x ++ ", " ++ y ++ ")"
cOp StrSubstr [x, y, z] = "strSubstr(" ++ x ++ ", " ++ y ++ ", " ++ z ++ ")"
cOp BelieveMe [_, _, x] = x
cOp BelieveMe [_, _, x] = "newReference(" ++ x ++ ")"
cOp Crash [_, msg] = "idris2_crash(" ++ msg ++ ");"
cOp fn args = plainOp (show fn) (toList args)

View File

@ -22,7 +22,7 @@ Value *cast_i32_to_Bits16(Value *input)
}
Value *cast_i32_to_Bits32(Value *input)
{
return input;
return newReference(input);
}
Value *cast_i32_to_Bits64(Value *input)
{
@ -97,7 +97,7 @@ Value *cast_i64_to_Bits32(Value *input)
Value *cast_i64_to_Bits64(Value *input)
{
return input;
return newReference(input);
}
Value *cast_i64_to_i32(Value *input)
@ -535,7 +535,7 @@ Value *cast_Bits32_to_Bits64(Value *input)
}
Value *cast_Bits32_to_i32(Value *input)
{
return input;
return newReference(input);
}
Value *cast_Bits32_to_i64(Value *input)
{
@ -617,7 +617,7 @@ Value *cast_Bits64_to_i32(Value *input)
}
Value *cast_Bits64_to_i64(Value *input)
{
return input;
return newReference(input);
}
Value *cast_Bits64_to_double(Value *input)
{