1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:51:21 -06:00

[dev.ssa] cmd/compile/internal/ssa: implement OCOMPLEX

Change-Id: I1e5993e0e56481ce838c0e3979b1a3052e72dba5
Reviewed-on: https://go-review.googlesource.com/14535
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Keith Randall 2015-09-12 14:14:02 -07:00
parent a329e21ccd
commit 7e390724d2

View File

@ -1633,6 +1633,10 @@ func (s *state) expr(n *Node) *ssa.Value {
s.startBlock(bResult)
return s.variable(n, Types[TBOOL])
case OCOMPLEX:
r := s.expr(n.Left)
i := s.expr(n.Right)
return s.newValue2(ssa.OpComplexMake, n.Type, r, i)
// unary ops
case OMINUS: