summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-06-11 01:23:14 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-06-11 01:23:14 +0200
commit61e189792220b7eb3b6a6b2ac543c6de84862aae (patch)
treed49034c7890186115e8faa3df4e3b7af1c6366a5 /compiler
parent90b1030dec0a5fb6ac0f2a4332fecfa7264bbf44 (diff)
downloadNim-61e189792220b7eb3b6a6b2ac543c6de84862aae.tar.gz
make tests green again
Diffstat (limited to 'compiler')
-rw-r--r--compiler/nimeval.nim4
-rw-r--r--compiler/semstmts.nim14
2 files changed, 10 insertions, 8 deletions
diff --git a/compiler/nimeval.nim b/compiler/nimeval.nim
index 308560010..f20b5642c 100644
--- a/compiler/nimeval.nim
+++ b/compiler/nimeval.nim
@@ -73,7 +73,7 @@ proc evalScript*(i: Interpreter; scriptStream: PLLStream = nil) =
 
   let s = if scriptStream != nil: scriptStream
           else: llStreamOpen(findFile(i.graph.config, i.scriptName), fmRead)
-  processModule(i.graph, i.mainModule, s, nil, i.graph.cache)
+  processModule(i.graph, i.mainModule, s)
 
 proc findNimStdLib*(): string =
   ## Tries to find a path to a valid "system.nim" file.
@@ -112,7 +112,7 @@ proc createInterpreter*(scriptName: string;
   vm.mode = emRepl
   vm.features = flags
   graph.vm = vm
-  graph.compileSystemModule(cache)
+  graph.compileSystemModule()
   result = Interpreter(mainModule: m, graph: graph, scriptName: scriptName)
 
 proc destroyInterpreter*(i: Interpreter) =
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 0f8e77fc9..0e143e7c1 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1771,12 +1771,14 @@ proc semStaticStmt(c: PContext, n: PNode): PNode =
   inc c.inStaticContext
   let a = semStmt(c, n.sons[0])
   dec c.inStaticContext
-  n.sons[0] = a
-  evalStaticStmt(c.module, c.graph, a, c.p.owner)
-  # for incremental replays, keep the AST as required for replays:
-  result = n
-  #result = newNodeI(nkDiscardStmt, n.info, 1)
-  #result.sons[0] = c.graph.emptyNode
+  when false:
+    n.sons[0] = a
+    evalStaticStmt(c.module, c.graph, a, c.p.owner)
+    # for incremental replays, keep the AST as required for replays:
+    result = n
+  else:
+    result = newNodeI(nkDiscardStmt, n.info, 1)
+    result.sons[0] = c.graph.emptyNode
 
 proc usesResult(n: PNode): bool =
   # nkStmtList(expr) properly propagates the void context,