diff options
author | Araq <rumpf_a@web.de> | 2013-10-16 16:41:24 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-10-16 16:41:24 +0200 |
commit | 3d18053370580916d190c98540a2e3d0ff66f9c3 (patch) | |
tree | 262c33dc378a2d812a455bad831e7cfd6bf174f1 /compiler/vmdef.nim | |
parent | 6a9baf3fd7842027a30ee4856d40841610dccc13 (diff) | |
download | Nim-3d18053370580916d190c98540a2e3d0ff66f9c3.tar.gz |
some complex macros work
Diffstat (limited to 'compiler/vmdef.nim')
-rw-r--r-- | compiler/vmdef.nim | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim index bc6824d3b..fabce58d7 100644 --- a/compiler/vmdef.nim +++ b/compiler/vmdef.nim @@ -129,6 +129,20 @@ type label*: PSym fixups*: seq[TPosition] + TEvalMode* = enum ## reason for evaluation + emRepl, ## evaluate because in REPL mode + emConst, ## evaluate for 'const' according to spec + emOptimize, ## evaluate for optimization purposes (same as + ## emConst?) + emStatic ## evaluate for enforced compile time eval + ## ('static' context) + + TSandboxFlag* = enum ## what the evaluation engine should allow + allowCast, ## allow unsafe language feature: 'cast' + allowFFI, ## allow the FFI + allowInfiniteLoops ## allow endless loops + TSandboxFlags* = set[TSandboxFlag] + TSlotKind* = enum # We try to re-use slots in a smart way to # minimize allocations; however the VM supports arbitrary # temporary slot usage. This is required for the parameter @@ -160,25 +174,11 @@ type prc*: PProc module*: PSym callsite*: PNode + mode*: TEvalMode TPosition* = distinct int PEvalContext* = PCtx - - TEvalMode* = enum ## reason for evaluation - emRepl, ## evaluate because in REPL mode - emConst, ## evaluate for 'const' according to spec - emOptimize, ## evaluate for optimization purposes (same as - ## emConst?) - emStatic ## evaluate for enforced compile time eval - ## ('static' context) - - TSandboxFlag* = enum ## what the evaluation engine should allow - allowCast, ## allow unsafe language feature: 'cast' - allowFFI, ## allow the FFI - allowInfiniteLoops ## allow endless loops - TSandboxFlags* = set[TSandboxFlag] - proc newCtx*(module: PSym): PCtx = PCtx(code: @[], debug: @[], |