4 ms·
I noticed there's a go:noescape compiler directive that seems to provide an escape hatch for a lot of this unexpected compiler behaviour: https://golang.org/cm
by robbles 9y ago
I noticed there's a go:noescape compiler directive that seems to provide an escape hatch for a lot of this unexpected compiler behaviour:
https://golang.org/cmd/compile/#hdr-Compiler_Directives https://golang.org/cmd/compile/#hdr-Compiler_Directives
Does that actually work?
- achille-roussel 9y agogo:noescape is meant to be used on functions that are implemented in assembly because escape analysis only works on Go code. As far as I know a etting this tag on a function that is implemented in Go has no effect.