diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-12-19 01:06:38 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-12-19 01:06:38 +0200 |
commit | 027f30610e44633b661befcca1b5dd39e9eaa283 (patch) | |
tree | 45841cac06bf79c512b050791697ce68b36b58ed /compiler/vmgen.nim | |
parent | 7120491d055c04d838d9539fdf0c42003637ec2d (diff) | |
download | Nim-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.nim | 6 |
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) |