summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-22 12:03:29 +0200
committerGitHub <noreply@github.com>2016-08-22 12:03:29 +0200
commit3fc95ce69e787b988f2f47adb035eabf082822ca (patch)
tree1bdb82785f3c8a4581a0b18704805df67c20b886
parentada7282896999f5b78cc3929dcd174989ad3508f (diff)
parent4e40d90f6f78a517e5354b96cbcb31465a19ff04 (diff)
downloadNim-3fc95ce69e787b988f2f47adb035eabf082822ca.tar.gz
Merge pull request #4634 from mbaulch/clarify_abstract_typedesc_roles
Add comments to clarify the roles of abstractX and typedescX types.
-rw-r--r--compiler/types.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/types.nim b/compiler/types.nim
index ff60730f0..312e36ae5 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -48,6 +48,8 @@ proc isOrdinalType*(t: PType): bool
 proc enumHasHoles*(t: PType): bool
 
 const
+  # TODO: Remove tyTypeDesc from each abstractX and (where necessary)
+  # replace with typedescX
   abstractPtrs* = {tyVar, tyPtr, tyRef, tyGenericInst, tyDistinct, tyOrdinal,
                    tyConst, tyMutable, tyTypeDesc}
   abstractVar* = {tyVar, tyGenericInst, tyDistinct, tyOrdinal,
@@ -61,6 +63,7 @@ const
 
   skipPtrs* = {tyVar, tyPtr, tyRef, tyGenericInst, tyConst, tyMutable,
                tyTypeDesc}
+  # typedescX is used if we're sure tyTypeDesc should be included (or skipped)
   typedescPtrs* = abstractPtrs + {tyTypeDesc}
   typedescInst* = abstractInst + {tyTypeDesc}