compiler: scan all function literals for escape analysis

We were scanning only function literals with closures, but not all
function literals have closures.

Discovered because compiler failed building 1.15rc1, as there is a
function literal in the runtime package (p1 in hexdumpWords) that has
no closure and, without escape analysis, was forcing a variable to the
heap which is not permitted in the runtime.

Change-Id: I8a26f3c8deaf5f54ab5bfec36a753a1917ef6cc8
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/244802
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed