cmd/compile: eliminate PPARAMREF
As in the elimination of PHEAP|PPARAM in CL 23393,
this is something the front end can trivially take care of
and then not bother the back ends with.
It also eliminates some suspect (and only lightly exercised)
code paths in the back ends.
I don't have a smoking gun for this one but it seems
more clearly correct.
Change-Id: I3b3f5e669b3b81d091ff1e2fb13226a6f14c69d5
Reviewed-on: https://go-review.googlesource.com/23431
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index 566dece..30fb170 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -647,9 +647,7 @@
n.Addable = true
case ONAME:
- if n.Class != PPARAMREF {
- n.Addable = true
- }
+ n.Addable = true
case OCALLINTER:
usemethod(n)
@@ -2536,7 +2534,7 @@
switch l.Op {
case ONAME:
switch l.Class {
- case PPARAM, PPARAMREF, PAUTO:
+ case PPARAM, PAUTO:
break
// assignment to non-stack variable