summary refs log tree commit diff stats
path: root/compiler/vmdef.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-12 02:36:59 +0100
committerAraq <rumpf_a@web.de>2014-11-12 02:36:59 +0100
commitb2f577df23d5daae873df18ff345965f8dc7e47b (patch)
tree2307ab50c5aa1c3cd2f7d56dfda817bcf05a3da1 /compiler/vmdef.nim
parent2d43fcafe0cedd4f78611dddccc31e1bef432aab (diff)
downloadNim-b2f577df23d5daae873df18ff345965f8dc7e47b.tar.gz
fixes #1473
Diffstat (limited to 'compiler/vmdef.nim')
-rw-r--r--compiler/vmdef.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim
index d7cdafb69..c06606318 100644
--- a/compiler/vmdef.nim
+++ b/compiler/vmdef.nim
@@ -92,6 +92,7 @@ type
     opcGorge,
     opcParseExprToAst,
     opcParseStmtToAst,
+    opcQueryErrorFlag,
     opcNError,
     opcNWarning,
     opcNHint,
@@ -174,6 +175,7 @@ type
   VmArgs* = object
     ra*, rb*, rc*: Natural
     slots*: pointer
+    currentException*: PNode
   VmCallback* = proc (args: VmArgs) {.closure.}
   
   PCtx* = ref TCtx
@@ -195,6 +197,7 @@ type
     loopIterations*: int
     comesFromHeuristic*: TLineInfo # Heuristic for better macro stack traces
     callbacks*: seq[tuple[key: string, value: VmCallback]]
+    errorFlag*: string
 
   TPosition* = distinct int
 
@@ -204,7 +207,7 @@ proc newCtx*(module: PSym): PCtx =
   PCtx(code: @[], debug: @[],
     globals: newNode(nkStmtListExpr), constants: newNode(nkStmtList), types: @[],
     prc: PProc(blocks: @[]), module: module, loopIterations: MaxLoopIterations,
-    comesFromHeuristic: unknownLineInfo(), callbacks: @[])
+    comesFromHeuristic: unknownLineInfo(), callbacks: @[], errorFlag: "")
 
 proc refresh*(c: PCtx, module: PSym) =
   c.module = module