]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/internal/gc: mark unimplemented variable classes as such
authorDaniel Morsing <daniel.morsing@gmail.com>
Wed, 1 Jul 2015 19:37:25 +0000 (20:37 +0100)
committerDaniel Morsing <daniel.morsing@gmail.com>
Thu, 2 Jul 2015 08:29:33 +0000 (08:29 +0000)
Doesn't fix the build entirely, but does make it get to the race
detector tests.

Change-Id: Ie986d52374936855b7ee975dc68742306527eb15
Reviewed-on: https://go-review.googlesource.com/11835
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go

index 389d2868e8b8e6571bb7865757860743767a6713..1dba9b22a51e03be7539e36be300bdb8566766a3 100644 (file)
@@ -77,6 +77,12 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
                case PAUTO:
                        aux := &ssa.AutoSymbol{Typ: n.Type, Offset: -1, Sym: n.Sym} // offset TBD by SSA pass
                        s.decladdrs[n] = s.entryNewValue1A(ssa.OpAddr, Ptrto(n.Type), aux, s.sp)
+               default:
+                       str := ""
+                       if n.Class&PHEAP != 0 {
+                               str = ",heap"
+                       }
+                       s.Unimplementedf("local variable %v with class %s%s unimplemented", n, classnames[n.Class&^PHEAP], str)
                }
        }
        // nodfp is a special argument which is the function's FP.