mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
some varargs handling
This commit is contained in:
@@ -180,6 +180,9 @@ proc addNominalType*(tree: var TypeGraph; kind: NirTypeKind; name: string) =
|
||||
assert kind in {ObjectTy, UnionTy}
|
||||
tree.nodes.add TypeNode(x: toX(kind, tree.names.getOrIncl(name)))
|
||||
|
||||
proc addVarargs*(tree: var TypeGraph) =
|
||||
tree.nodes.add TypeNode(x: toX(VarargsTy, 0'u32))
|
||||
|
||||
proc getFloat128Type*(tree: var TypeGraph): TypeId =
|
||||
result = TypeId tree.nodes.len
|
||||
tree.nodes.add TypeNode(x: toX(FloatTy, 128'u32))
|
||||
|
||||
@@ -101,6 +101,8 @@ proc procToIr(c: var Context; t: PType): TypeId =
|
||||
# XXX Add Calling convention here!
|
||||
for i in 0..<t.len:
|
||||
c.g.addType fieldTypes[i]
|
||||
if tfVarargs in t.flags:
|
||||
c.g.addVarargs()
|
||||
result = sealType(c.g, obj)
|
||||
|
||||
proc nativeInt(c: Context): TypeId =
|
||||
|
||||
Reference in New Issue
Block a user