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.
Этот коммит содержится в:
родитель
1fd0c8d48c
коммит
00e91ec569
5 изменённых файлов: 5 добавлений и 5 удалений
|
@ -169,7 +169,7 @@ func (c *Compiler) TargetData() llvm.TargetData {
|
||||||
func (c *Compiler) selectGC() string {
|
func (c *Compiler) selectGC() string {
|
||||||
gc := c.GC
|
gc := c.GC
|
||||||
if gc == "" {
|
if gc == "" {
|
||||||
gc = "dumb"
|
gc = "leaking"
|
||||||
}
|
}
|
||||||
return gc
|
return gc
|
||||||
}
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -585,7 +585,7 @@ func handleCompilerError(err error) {
|
||||||
func main() {
|
func main() {
|
||||||
outpath := flag.String("o", "", "output filename")
|
outpath := flag.String("o", "", "output filename")
|
||||||
opt := flag.String("opt", "z", "optimization level: 0, 1, 2, s, z")
|
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)")
|
panicStrategy := flag.String("panic", "print", "panic strategy (abort, trap)")
|
||||||
printIR := flag.Bool("printir", false, "print LLVM IR")
|
printIR := flag.Bool("printir", false, "print LLVM IR")
|
||||||
dumpSSA := flag.Bool("dumpssa", false, "dump internal Go SSA")
|
dumpSSA := flag.Bool("dumpssa", false, "dump internal Go SSA")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build gc.marksweep
|
// +build gc.conservative
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build gc.dumb
|
// +build gc.leaking
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"goos": "linux",
|
"goos": "linux",
|
||||||
"goarch": "arm",
|
"goarch": "arm",
|
||||||
"compiler": "clang",
|
"compiler": "clang",
|
||||||
"gc": "marksweep",
|
"gc": "conservative",
|
||||||
"linker": "ld.lld",
|
"linker": "ld.lld",
|
||||||
"rtlib": "compiler-rt",
|
"rtlib": "compiler-rt",
|
||||||
"cflags": [
|
"cflags": [
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче