compiler: compile all functions/methods, remove SimpleDCE

This is important because once we move to compiling packages
independently, SimpleDCE can't work anymore. Instead we'll have to
compile all parts of a package and cache that for later reuse.
This commit is contained in:
Ayke van Laethem
2020-03-27 23:00:41 +01:00
parent 23e88bfb15
commit b8db79f6a6
11 changed files with 491 additions and 595 deletions
-5
View File
@@ -85,14 +85,9 @@ type taskHolder interface {
getReturnPtr() unsafe.Pointer
}
// If there are no direct references to the task methods, they will not be discovered by the compiler, and this will trigger a compiler error.
// Instantiating this interface forces discovery of these methods.
var _ = taskHolder((*Task)(nil))
func fake() {
// Hack to ensure intrinsics are discovered.
Current()
go func() {}()
Pause()
}