]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: skip looking for OCLOSURE nodes in xtop
authorMatthew Dempsky <mdempsky@google.com>
Wed, 16 Sep 2020 22:41:47 +0000 (15:41 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 16 Sep 2020 23:00:02 +0000 (23:00 +0000)
commitf5d59d0e382dc59195537a128fe9423a49a4cea8
treedc48bbae157d32b7fc41bd73968011dd7e6602e1
parent396688af7ee121d478e9b8d2cc9d06999ba7fc6e
cmd/compile: skip looking for OCLOSURE nodes in xtop

xtop holds package's top-level declaration statements, but OCLOSURE
only appears in expression contexts. xtop will instead hold the
synthetic ODCLFUNC representing OCLOSURE's function body.

This CL makes the loop consistent with the later phases that only look
for ODCLFUNC nodes in xtop.

Passes toolstash-check.

Change-Id: I852a10ef1bf75bb3351e3da0357ca8b2e26aec6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/255340
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/gc/main.go