Skip to content

Commit

Permalink
Revert "cmd/compile: properly handle map assignments for OAS2DOTTYPE"
Browse files Browse the repository at this point in the history
This reverts commit 9d7c9b4.

For #15602.

Change-Id: I464184b05babe4cb8dedab6161efa730cea6ee2d
Reviewed-on: https://go-review.googlesource.com/22930
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
mdempsky committed May 8, 2016
1 parent 0b6e5e3 commit 55546ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 43 deletions.
26 changes: 10 additions & 16 deletions src/cmd/compile/internal/gc/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,24 +569,18 @@ func orderstmt(n *Node, order *Order) {

orderexprlist(n.List, order)
n.Rlist.First().Left = orderexpr(n.Rlist.First().Left, order, nil) // i in i.(T)

results := n.List.Slice()
var assigns [2]*Node

for r, res := range results {
if !isblank(res) {
results[r] = ordertemp(res.Type, order, haspointers(res.Type))
assigns[r] = Nod(OAS, res, results[r])
}
if isblank(n.List.First()) {
order.out = append(order.out, n)
} else {
typ := n.Rlist.First().Type
tmp1 := ordertemp(typ, order, haspointers(typ))
order.out = append(order.out, n)
r := Nod(OAS, n.List.First(), tmp1)
r = typecheck(r, Etop)
ordermapassign(r, order)
n.List.Set([]*Node{tmp1, n.List.Second()})
}
order.out = append(order.out, n)

for _, assign := range assigns {
if assign != nil {
assign = typecheck(assign, Etop)
ordermapassign(assign, order)
}
}
cleantemp(t, order)

// Special: use temporary variables to hold result,
Expand Down
27 changes: 0 additions & 27 deletions test/fixedbugs/issue14678.go

This file was deleted.

0 comments on commit 55546ef

Please sign in to comment.