]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: report typedslicecopy write barriers
authorAustin Clements <austin@google.com>
Tue, 24 Oct 2017 21:10:02 +0000 (17:10 -0400)
committerAustin Clements <austin@google.com>
Sun, 29 Oct 2017 20:21:43 +0000 (20:21 +0000)
commitafbe646ab4480696d61462e9cab2ad048b5c1b6c
tree0afc29efdb52fd3ceb5193e2b9277c41b5463543
parent507ca082d116c19cbe5cbdd457e6b37d851d2341
cmd/compile: report typedslicecopy write barriers

Most write barrier calls are inserted by SSA, but copy and append are
lowered to runtime.typedslicecopy during walk. Fix these to set
Func.WBPos and emit the "write barrier" warning, as done for the write
barriers inserted by SSA. As part of this, we refactor setting WBPos
and emitting this warning into the frontend so it can be shared by
both walk and SSA.

Change-Id: I5fe9997d9bdb55e03e01dd58aee28908c35f606b
Reviewed-on: https://go-review.googlesource.com/73411
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/walk.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/ssa/writebarrier.go