This commit is contained in:
nub31
2025-07-02 23:44:59 +02:00
parent ae534a7a54
commit 9f40d8a9c9
2 changed files with 2 additions and 8 deletions

View File

@@ -8,11 +8,7 @@ struct Human
export func main(args: []cstring): i64 export func main(args: []cstring): i64
{ {
let x: cstring c::puts("john")
x = "john"
c::puts(x)
return 0 return 0
} }

View File

@@ -1297,9 +1297,6 @@ public static class QBEGenerator
foreach (var parameter in funcCall.Parameters) foreach (var parameter in funcCall.Parameters)
{ {
var result = EmitUnwrap(EmitExpression(parameter));
var copy = EmitCopy(parameter.Type, result);
var qbeType = parameter.Type switch var qbeType = parameter.Type switch
{ {
NubArrayType => "l", NubArrayType => "l",
@@ -1326,6 +1323,7 @@ public static class QBEGenerator
_ => throw new NotSupportedException($"'{parameter.Type}' type cannot be used in function calls") _ => throw new NotSupportedException($"'{parameter.Type}' type cannot be used in function calls")
}; };
var copy = EmitCopy(parameter.Type, EmitUnwrap(EmitExpression(parameter)));
parameterStrings.Add($"{qbeType} {copy}"); parameterStrings.Add($"{qbeType} {copy}");
} }