]> Cypherpunks repositories - gostls13.git/commit
cmd/gc, runtime: make assertI2T and variants not variadic
authorRuss Cox <rsc@golang.org>
Mon, 29 Dec 2014 21:15:05 +0000 (16:15 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 6 Jan 2015 00:28:03 +0000 (00:28 +0000)
commitccdb50931f815fdf8de16f876478d7a1d0ee6696
tree262efa3aa8b20bbf5278a0ae201cf6ee581f6c4d
parente5ef657264ef9b7c0bcd9b5c437fea2d602a2030
cmd/gc, runtime: make assertI2T and variants not variadic

A side effect of this change is that when assertI2T writes to the
memory for the T being extracted, it can use typedmemmove
for write barriers.

There are other ways we could have done this, but this one
finishes a TODO in package runtime.

Found with GODEBUG=wbshadow=2 mode.
Eventually that will run automatically, but right now
it still detects other missing write barriers.

Change-Id: Icbc8aabfd8a9b1f00be2e421af0e3b29fa54d01e
Reviewed-on: https://go-review.googlesource.com/2279
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/gc/builtin.c
src/cmd/gc/order.c
src/cmd/gc/runtime.go
src/cmd/gc/walk.c
src/runtime/iface.go
src/runtime/malloc.go