summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-10-02 19:33:29 +0200
committerAraq <rumpf_a@web.de>2018-10-02 19:33:29 +0200
commit7bac21ac2353fa92725a42e4e6040ee3c0ce6615 (patch)
treea945095b7f522db91ede1aa19fe0a3c338fe7132 /compiler
parentc2de135905bce2cf040cd8d4e9adc9d844de555a (diff)
downloadNim-7bac21ac2353fa92725a42e4e6040ee3c0ce6615.tar.gz
ccgtypes: improve internal documentation
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim6
1 files changed, 4 insertions, 2 deletions
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