...
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user