diff options
author | Ayke van Laethem <[email protected]> | 2019-02-17 20:19:08 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2019-07-01 13:03:07 +0200 |
commit | 00e91ec56975c3fbc600d4ed164ac2e493327624 (patch) | |
tree | b4674a24fbd0ff25999596f45357f15d3565f680 | |
parent | 1fd0c8d48cde0228244be0c2d5ea720eddb683d6 (diff) | |
download | tinygo-00e91ec56975c3fbc600d4ed164ac2e493327624.tar.gz tinygo-00e91ec56975c3fbc600d4ed164ac2e493327624.zip |
all: rename garbage collectors
dumb -> leaking:
make it more clear what this "GC" does: leak everything.
marksweep -> conservative:
"marksweep" is too generic, use "conservative" to differentiate
between future garbage collectors: precise marksweep / mark-compact /
refcounting.
-rw-r--r-- | compiler/compiler.go | 2 | ||||
-rw-r--r-- | main.go | 2 | ||||
-rw-r--r-- | src/runtime/gc_conservative.go (renamed from src/runtime/gc_marksweep.go) | 2 | ||||
-rw-r--r-- | src/runtime/gc_leaking.go (renamed from src/runtime/gc_dumb.go) | 2 | ||||
-rw-r--r-- | targets/cortex-m.json | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/compiler/compiler.go b/compiler/compiler.go index 00e008fbe..d82c00f27 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -169,7 +169,7 @@ func (c *Compiler) TargetData() llvm.TargetData { func (c *Compiler) selectGC() string { gc := c.GC if gc == "" { - gc = "dumb" + gc = "leaking" } return gc } @@ -585,7 +585,7 @@ func handleCompilerError(err error) { func main() { outpath := flag.String("o", "", "output filename") opt := flag.String("opt", "z", "optimization level: 0, 1, 2, s, z") - gc := flag.String("gc", "", "garbage collector to use (none, dumb, marksweep)") + gc := flag.String("gc", "", "garbage collector to use (none, leaking, conservative)") panicStrategy := flag.String("panic", "print", "panic strategy (abort, trap)") printIR := flag.Bool("printir", false, "print LLVM IR") dumpSSA := flag.Bool("dumpssa", false, "dump internal Go SSA") diff --git a/src/runtime/gc_marksweep.go b/src/runtime/gc_conservative.go index 45eab6bce..dd1e52115 100644 --- a/src/runtime/gc_marksweep.go +++ b/src/runtime/gc_conservative.go @@ -1,4 +1,4 @@ -// +build gc.marksweep +// +build gc.conservative package runtime diff --git a/src/runtime/gc_dumb.go b/src/runtime/gc_leaking.go index 92527364b..fb0f9086e 100644 --- a/src/runtime/gc_dumb.go +++ b/src/runtime/gc_leaking.go @@ -1,4 +1,4 @@ -// +build gc.dumb +// +build gc.leaking package runtime diff --git a/targets/cortex-m.json b/targets/cortex-m.json index a8e8f612a..7fb1b0286 100644 --- a/targets/cortex-m.json +++ b/targets/cortex-m.json @@ -3,7 +3,7 @@ "goos": "linux", "goarch": "arm", "compiler": "clang", - "gc": "marksweep", + "gc": "conservative", "linker": "ld.lld", "rtlib": "compiler-rt", "cflags": [ |