Browse Source

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.
pull/350/head
Ayke van Laethem 6 years ago
parent
commit
00e91ec569
No known key found for this signature in database GPG Key ID: E97FF5335DFDFDED
  1. 2
      compiler/compiler.go
  2. 2
      main.go
  3. 2
      src/runtime/gc_conservative.go
  4. 2
      src/runtime/gc_leaking.go
  5. 2
      targets/cortex-m.json

2
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
}

2
main.go

@ -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")

2
src/runtime/gc_marksweep.go → src/runtime/gc_conservative.go

@ -1,4 +1,4 @@
// +build gc.marksweep
// +build gc.conservative
package runtime

2
src/runtime/gc_dumb.go → src/runtime/gc_leaking.go

@ -1,4 +1,4 @@
// +build gc.dumb
// +build gc.leaking
package runtime

2
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": [

Loading…
Cancel
Save