cmd/compile: eliminate OASWB

Instead we can just call needwritebarrier when constructing the SSA
representation.

Change-Id: I6fefaad49daada9cdb3050f112889e49dca0047b
Reviewed-on: https://go-review.googlesource.com/34566
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Matthew Dempsky 2016-12-19 10:30:44 -08:00
parent e7ec06e000
commit bdb9b945b9
11 changed files with 17 additions and 40 deletions

View file

@ -837,7 +837,7 @@ func (n *Node) stmtfmt(s fmt.State) {
// Don't export "v = <N>" initializing statements, hope they're always
// preceded by the DCL which will be re-parsed and typechecked to reproduce
// the "v = <N>" again.
case OAS, OASWB:
case OAS:
if n.Colas && !complexinit {
fmt.Fprintf(s, "%v := %v", n.Left, n.Right)
} else {