WIP shadow-stack based mark/sweep collector

This commit is contained in:
Ayke van Laethem
2019-01-17 20:54:35 +01:00
parent e6e561100a
commit d27cfb1585
4 changed files with 310 additions and 1 deletions
+4
View File
@@ -52,6 +52,10 @@ func (c *Compiler) Optimize(optLevel, sizeLevel int, inlinerThreshold uint) erro
// Run TinyGo-specific interprocedural optimizations.
c.OptimizeAllocs()
c.OptimizeStringToBytes()
if c.selectGC() == "shadowstack" {
c.AddGCRoots()
}
} else {
// Must be run at any optimization level.
c.LowerInterfaces()