]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: enforce nowritebarrier in SSA compiler
authorKeith Randall <khr@golang.org>
Thu, 17 Mar 2016 04:51:17 +0000 (21:51 -0700)
committerKeith Randall <khr@golang.org>
Thu, 17 Mar 2016 20:13:24 +0000 (20:13 +0000)
commit15ed37d7b79721ad2077290f844d25e3e42a7821
tree8ab14dbdc445b759a262cfaaaee8818e553684bb
parent16029babe24c516230399205a74becb2c215e11a
cmd/compile: enforce nowritebarrier in SSA compiler

Make sure we don't generate write barriers in runtime
code that is marked to forbid write barriers.

Implement the optimization that if we're writing a sliced
slice back to the location it came from, we don't need a
write barrier.

Fixes #14784

Change-Id: I04b6a3b2ac303c19817e932a36a3b006de103aaa
Reviewed-on: https://go-review.googlesource.com/20791
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/walk.go
test/writebarrier.go