runtime: implement a simple mark/sweep garbage collector

This commit is contained in:
Ayke van Laethem
2018-11-18 19:18:39 +01:00
parent dbf581b56d
commit 8402e84b6d
7 changed files with 477 additions and 3 deletions
+10
View File
@@ -58,9 +58,19 @@ func runTest(path, tmpdir string, target string, t *testing.T) {
t.Fatal("could not read expected output file:", err)
}
var gc string
if target == "qemu" {
// make sure testdata/gc.go passes
gc = "marksweep"
} else {
// pick the default heap implementation
gc = ""
}
// Build the test binary.
config := &BuildConfig{
opt: "z",
gc: gc,
printIR: false,
dumpSSA: false,
debug: false,