mirror of
https://github.com/golang/go
synced 2024-10-05 20:21:21 -06:00
[dev.ssa] cmd/compile: call through to expr for expression statements
Change-Id: I8625eff33f5a49dbaaec060c3fa067d7531193c4 Reviewed-on: https://go-review.googlesource.com/12313 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
67bfd69564
commit
2574e4ac1c
@ -299,8 +299,13 @@ func (s *state) stmt(n *Node) {
|
||||
case OBLOCK:
|
||||
s.stmtList(n.List)
|
||||
|
||||
// No-ops
|
||||
case OEMPTY, ODCLCONST, ODCLTYPE:
|
||||
|
||||
// Expression statements
|
||||
case OCALLFUNC, OCALLMETH, OCALLINTER:
|
||||
s.expr(n)
|
||||
|
||||
case ODCL:
|
||||
if n.Left.Class&PHEAP == 0 {
|
||||
return
|
||||
@ -434,9 +439,6 @@ func (s *state) stmt(n *Node) {
|
||||
}
|
||||
s.startBlock(bEnd)
|
||||
|
||||
case OCALLFUNC:
|
||||
s.expr(n)
|
||||
|
||||
case OVARKILL:
|
||||
// TODO(khr): ??? anything to do here? Only for addrtaken variables?
|
||||
// Maybe just link it in the store chain?
|
||||
|
Loading…
Reference in New Issue
Block a user