mirror of
https://github.com/golang/go
synced 2024-10-05 19:11:22 -06:00
[dev.ssa] cmd/compile: implement OPLUS
Change-Id: Iaf282211a717e38b05e5d2661d400d465decad50 Reviewed-on: https://go-review.googlesource.com/14337 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
9569b957cb
commit
4178f20776
@ -1599,7 +1599,7 @@ func (s *state) expr(n *Node) *ssa.Value {
|
|||||||
s.startBlock(bResult)
|
s.startBlock(bResult)
|
||||||
return s.variable(n, Types[TBOOL])
|
return s.variable(n, Types[TBOOL])
|
||||||
|
|
||||||
// unary ops
|
// unary ops
|
||||||
case OMINUS:
|
case OMINUS:
|
||||||
a := s.expr(n.Left)
|
a := s.expr(n.Left)
|
||||||
if n.Type.IsComplex() {
|
if n.Type.IsComplex() {
|
||||||
@ -1613,6 +1613,8 @@ func (s *state) expr(n *Node) *ssa.Value {
|
|||||||
case ONOT, OCOM:
|
case ONOT, OCOM:
|
||||||
a := s.expr(n.Left)
|
a := s.expr(n.Left)
|
||||||
return s.newValue1(s.ssaOp(n.Op, n.Type), a.Type, a)
|
return s.newValue1(s.ssaOp(n.Op, n.Type), a.Type, a)
|
||||||
|
case OPLUS:
|
||||||
|
return s.expr(n.Left)
|
||||||
|
|
||||||
case OADDR:
|
case OADDR:
|
||||||
return s.addr(n.Left)
|
return s.addr(n.Left)
|
||||||
|
Loading…
Reference in New Issue
Block a user