summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-03-12 13:29:27 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-03-12 13:29:27 +0100
commit75b03188d09ff865ceb9c43892eceb22b2fd6d8f (patch)
tree8fea4b5a9c709e2f71fb1ca10bd381e08cc53e0f /compiler
parentad7e2191174d551e5787667bedf8aae72bb4e882 (diff)
downloadNim-75b03188d09ff865ceb9c43892eceb22b2fd6d8f.tar.gz
beginnings of --gc:stack
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim4
-rw-r--r--compiler/options.nim3
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 2622d64f4..86bc1c205 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -205,6 +205,7 @@ proc testCompileOptionArg*(switch, arg: string, info: TLineInfo): bool =
     of "generational": result = gSelectedGC == gcGenerational
     of "go":           result = gSelectedGC == gcGo
     of "none":         result = gSelectedGC == gcNone
+    of "stack":        result = gSelectedGC == gcStack
     else: localError(info, errNoneBoehmRefcExpectedButXFound, arg)
   of "opt":
     case arg.normalize
@@ -394,6 +395,9 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
     of "none":
       gSelectedGC = gcNone
       defineSymbol("nogc")
+    of "stack":
+      gSelectedGC= gcStack
+      defineSymbol("gcstack")
     else: localError(info, errNoneBoehmRefcExpectedButXFound, arg)
   of "warnings", "w":
     if processOnOffSwitchOrList({optWarns}, arg, pass, info): listWarnings()
diff --git a/compiler/options.nim b/compiler/options.nim
index 29cdd96fb..2716a98d3 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -86,7 +86,8 @@ type                          # please make sure we have under 32 options
     cmdRun                    # run the project via TCC backend
   TStringSeq* = seq[string]
   TGCMode* = enum             # the selected GC
-    gcNone, gcBoehm, gcGo, gcMarkAndSweep, gcRefc, gcV2, gcGenerational
+    gcNone, gcBoehm, gcGo, gcStack, gcMarkAndSweep, gcRefc,
+    gcV2, gcGenerational
 
   IdeCmd* = enum
     ideNone, ideSug, ideCon, ideDef, ideUse, ideDus, ideChk, ideMod,