summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xcompiler/ccgexprs.nim12
-rwxr-xr-xcompiler/nimrod.nim4
-rwxr-xr-xlib/system/gc.nim3
-rw-r--r--tests/compile/tmandelbrot.nim4
-rwxr-xr-xtodo.txt1
5 files changed, 14 insertions, 10 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 8a2b60aba..4138aecd2 100755
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1484,20 +1484,14 @@ proc genTupleConstr(p: BProc, n: PNode, d: var TLoc) =
     if d.k == locNone: getTemp(p, t, d)
     for i in countup(0, sonsLen(n) - 1):
       var it = n.sons[i]
-      if it.kind == nkExprColonExpr:
-        initLoc(rec, locExpr, it.sons[1].typ, d.s)
-        if (t.n.sons[i].kind != nkSym): InternalError(n.info, "genTupleConstr")
-        rec.r = ropef("$1.$2",
-                      [rdLoc(d), mangleRecFieldName(t.n.sons[i].sym, t)])
-        expr(p, it.sons[1], rec)
-      elif t.n == nil:
+      if it.kind == nkExprColonExpr: it = it.sons[1]
+      if t.n == nil:
         initLoc(rec, locExpr, it.typ, d.s)
         rec.r = ropef("$1.Field$2", [rdLoc(d), toRope(i)])
         expr(p, it, rec)
       else:
         initLoc(rec, locExpr, it.typ, d.s)
-        if (t.n.sons[i].kind != nkSym):
-          InternalError(n.info, "genTupleConstr: 2")
+        if (t.n.sons[i].kind != nkSym): InternalError(n.info, "genTupleConstr")
         rec.r = ropef("$1.$2",
                       [rdLoc(d), mangleRecFieldName(t.n.sons[i].sym, t)])
         expr(p, it, rec)
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim
index 87a9b1a75..b71929693 100755
--- a/compiler/nimrod.nim
+++ b/compiler/nimrod.nim
@@ -49,6 +49,7 @@ proc ProcessCmdLine(pass: TCmdLinePass) =
           
   if pass == passCmd2: 
     arguments = cmdLineRest(p)
+    echo "Setting args to ", arguments
     if optRun notin gGlobalOptions and arguments != "": 
       rawMessage(errArgsNeedRunOption, [])
   
@@ -91,7 +92,8 @@ proc HandleCmdLine() =
         rawMessage(hintSuccessX, [$gLinesCompiled, 
                    formatFloat(epochTime() - start, ffDecimal, 3)])
       if optRun in gGlobalOptions: 
-        var ex = quoteIfContainsWhite(changeFileExt(projectName, "").prependCurDir)
+        var ex = quoteIfContainsWhite(
+            changeFileExt(projectFullPath, "").prependCurDir)
         execExternalProgram(ex & ' ' & arguments)
 
 #GC_disableMarkAndSweep()
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index 51ff9c90c..c7d1ba314 100755
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -11,6 +11,9 @@
 #            Garbage Collector
 #
 # The basic algorithm is *Deferrent Reference Counting* with cycle detection.
+# This is achieved by combining a Deutsch-Bobrow garbage collector
+# together with Christoper's partial mark-sweep garbage collector.
+#
 # Special care has been taken to avoid recursion as far as possible to avoid
 # stack overflows when traversing deep datastructures. This is comparable to
 # an incremental and generational GC. It should be well-suited for soft real
diff --git a/tests/compile/tmandelbrot.nim b/tests/compile/tmandelbrot.nim
index 54724d247..1e39c8756 100644
--- a/tests/compile/tmandelbrot.nim
+++ b/tests/compile/tmandelbrot.nim
@@ -1,3 +1,7 @@
+discard """
+  cmd: "nimrod cc --hints:on -d:release $# $#"
+"""
+
 # -*- nimrod -*-
 
 import math
diff --git a/todo.txt b/todo.txt
index e4d47c4c5..76b4460f4 100755
--- a/todo.txt
+++ b/todo.txt
@@ -1,6 +1,7 @@
 version 0.8.14
 ==============
 
+- argument passing with --run option is broken
 - stdlib and compiler should not use deprecated endOfFile and readline
 
 version 0.9.0