summary refs log tree commit diff stats
path: root/compiler/vmgen.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-12-19 01:06:38 +0200
committerZahary Karadjov <zahary@gmail.com>2013-12-19 01:06:38 +0200
commit027f30610e44633b661befcca1b5dd39e9eaa283 (patch)
tree45841cac06bf79c512b050791697ce68b36b58ed /compiler/vmgen.nim
parent7120491d055c04d838d9539fdf0c42003637ec2d (diff)
downloadNim-027f30610e44633b661befcca1b5dd39e9eaa283.tar.gz
static params: expr[T] is now static[T]
This introduces tyStatic and successfully bootstraps and handles
few simple test cases.  Static params within macros are no longer
treated as PNimrodNodes - they are now equivalent to constants
of the designated type.
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r--compiler/vmgen.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 84d82e117..f5ea24aa2 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -777,7 +777,7 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest) =
 
 const
   atomicTypes = {tyBool, tyChar,
-    tyExpr, tyStmt, tyTypeDesc,
+    tyExpr, tyStmt, tyTypeDesc, tyStatic,
     tyEnum,
     tyOrdinal,
     tyRange,
@@ -937,8 +937,8 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode =
     result = newNodeIT(nkUIntLit, info, t)
   of tyFloat..tyFloat128: 
     result = newNodeIt(nkFloatLit, info, t)
-  of tyVar, tyPointer, tyPtr, tyCString, tySequence, tyString, tyExpr, 
-     tyStmt, tyTypeDesc, tyProc, tyRef:
+  of tyVar, tyPointer, tyPtr, tyCString, tySequence, tyString, tyExpr,
+     tyStmt, tyTypeDesc, tyStatic, tyProc, tyRef:
     result = newNodeIT(nkNilLit, info, t)
   of tyObject: 
     result = newNodeIT(nkPar, info, t)