]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/internal/gc: handle local function declarations
authorKeith Randall <khr@golang.org>
Sun, 6 Sep 2015 20:42:26 +0000 (13:42 -0700)
committerKeith Randall <khr@golang.org>
Sun, 6 Sep 2015 23:41:10 +0000 (23:41 +0000)
They are already handled by the frontend, we just need to
skip them when we see them in ssa.

Change-Id: I309d91552f96a761f8d429a2cab3a47d200ca9e5
Reviewed-on: https://go-review.googlesource.com/14341
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/ssa.go

index 01db5477363238983e9b2539d85fcf523720e832..9a9834f3e1730b4d604e2bf31b6a7ff656ad5a0c 100644 (file)
@@ -96,6 +96,8 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
                case PAUTO:
                        // processed at each use, to prevent Addr coming
                        // before the decl.
+               case PFUNC:
+                       // local function - already handled by frontend
                default:
                        str := ""
                        if n.Class&PHEAP != 0 {