diff options
author | Stefan Talpalaru <stefantalpalaru@yahoo.com> | 2015-05-31 19:07:44 +0200 |
---|---|---|
committer | Stefan Talpalaru <stefantalpalaru@yahoo.com> | 2015-05-31 19:07:44 +0200 |
commit | 50e96ad939c39c9d9e25b75803ed971fad49dc8f (patch) | |
tree | e3935fce15b3dab0573907d28d47869f1d18fbde /compiler | |
parent | 6820b2fea919c033405e7e204343fddd947c2ef3 (diff) | |
download | Nim-50e96ad939c39c9d9e25b75803ed971fad49dc8f.tar.gz |
the Go GC - initial implementation
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 7 | ||||
-rw-r--r-- | compiler/options.nim | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index d30d8326c..d0719a420 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -22,6 +22,7 @@ bootSwitch(usedNoCaas, defined(noCaas), "-d:noCaas") bootSwitch(usedBoehm, defined(boehmgc), "--gc:boehm") bootSwitch(usedMarkAndSweep, defined(gcmarkandsweep), "--gc:markAndSweep") bootSwitch(usedGenerational, defined(gcgenerational), "--gc:generational") +bootSwitch(usedGoGC, defined(gogc), "--gc:go") bootSwitch(usedNoGC, defined(nogc), "--gc:none") import @@ -86,7 +87,7 @@ proc writeVersionInfo(pass: TCmdLinePass) = msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine & usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas & - usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedNoGC) + usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedGoGC & usedNoGC) msgQuit(0) var @@ -181,6 +182,7 @@ proc testCompileOptionArg*(switch, arg: string, info: TLineInfo): bool = of "v2": result = gSelectedGC == gcV2 of "markandsweep": result = gSelectedGC == gcMarkAndSweep of "generational": result = gSelectedGC == gcGenerational + of "go": result = gSelectedGC == gcGo of "none": result = gSelectedGC == gcNone else: localError(info, errNoneBoehmRefcExpectedButXFound, arg) of "opt": @@ -365,6 +367,9 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = of "generational": gSelectedGC = gcGenerational defineSymbol("gcgenerational") + of "go": + gSelectedGC = gcGo + defineSymbol("gogc") of "none": gSelectedGC = gcNone defineSymbol("nogc") diff --git a/compiler/options.nim b/compiler/options.nim index b3060a180..b0e711a44 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -81,7 +81,7 @@ 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, gcMarkAndSweep, gcRefc, gcV2, gcGenerational + gcNone, gcBoehm, gcGo, gcMarkAndSweep, gcRefc, gcV2, gcGenerational IdeCmd* = enum ideNone, ideSug, ideCon, ideDef, ideUse |