From 7bac21ac2353fa92725a42e4e6040ee3c0ce6615 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 2 Oct 2018 19:33:29 +0200 Subject: ccgtypes: improve internal documentation --- compiler/ccgtypes.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 3c7a0d26e..56a4704f9 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -855,8 +855,10 @@ proc getTypeDesc(m: BModule, typ: PType): Rope = result = getTypeDescAux(m, typ, check) type - TClosureTypeKind = enum - clHalf, clHalfWithEnv, clFull + TClosureTypeKind = enum ## In C closures are mapped to 3 different things. + clHalf, ## fn(args) type without the trailing 'void* env' parameter + clHalfWithEnv, ## fn(args, void* env) type with trailing 'void* env' parameter + clFull ## struct {fn(args, void* env), env} proc getClosureType(m: BModule, t: PType, kind: TClosureTypeKind): Rope = assert t.kind == tyProc -- cgit 1.4.1-2-gfad0