Commit 4178f207 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

[dev.ssa] cmd/compile: implement OPLUS

Change-Id: Iaf282211a717e38b05e5d2661d400d465decad50
Reviewed-on: https://go-review.googlesource.com/14337Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 9569b957
......@@ -1599,7 +1599,7 @@ func (s *state) expr(n *Node) *ssa.Value {
s.startBlock(bResult)
return s.variable(n, Types[TBOOL])
// unary ops
// unary ops
case OMINUS:
a := s.expr(n.Left)
if n.Type.IsComplex() {
......@@ -1613,6 +1613,8 @@ func (s *state) expr(n *Node) *ssa.Value {
case ONOT, OCOM:
a := s.expr(n.Left)
return s.newValue1(s.ssaOp(n.Op, n.Type), a.Type, a)
case OPLUS:
return s.expr(n.Left)
case OADDR:
return s.addr(n.Left)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment