Add todo
This commit is contained in:
@@ -95,7 +95,7 @@ public class QBEGenerator
|
|||||||
%size =l loadl %array
|
%size =l loadl %array
|
||||||
ret %size
|
ret %size
|
||||||
}
|
}
|
||||||
|
|
||||||
""");
|
""");
|
||||||
|
|
||||||
_writer.Comment("========== Referenced structs ==========");
|
_writer.Comment("========== Referenced structs ==========");
|
||||||
@@ -355,6 +355,8 @@ public class QBEGenerator
|
|||||||
|
|
||||||
private void EmitStructType(StructTypeNode structType)
|
private void EmitStructType(StructTypeNode structType)
|
||||||
{
|
{
|
||||||
|
// todo(nub31): qbe expects structs to be declared in order. We must Check the dependencies of the struct to see if a type need to be declared before this one
|
||||||
|
// qbe allows multiple declarations of the same struct, but we should keep track and only emit an new one if necessary
|
||||||
_writer.Write($"type {StructTypeName(structType.Module, structType.Name)} = {{ ");
|
_writer.Write($"type {StructTypeName(structType.Module, structType.Name)} = {{ ");
|
||||||
|
|
||||||
foreach (var field in structType.Fields)
|
foreach (var field in structType.Fields)
|
||||||
|
|||||||
Reference in New Issue
Block a user