]> Cypherpunks repositories - gostls13.git/commit
runtime: use heap bitmap for typedmemmove
authorRuss Cox <rsc@golang.org>
Fri, 8 May 2015 02:40:54 +0000 (22:40 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 May 2015 16:38:21 +0000 (16:38 +0000)
commit4212a3c3d9a520c3124134c97bb48677c0c1203f
tree8bfe60e6578f466f5cee6160e9740560742b1e56
parent266a842f5525fa8009f0c97b6d9967bb59fea349
runtime: use heap bitmap for typedmemmove

The current implementation of typedmemmove walks the ptrmask
in the type to find out where pointers are. This led to turning off
GC programs for the Go 1.5 dev cycle, so that there would always
be a ptrmask. Instead of also interpreting the GC programs,
interpret the heap bitmap, which we know must be available and
up to date. (There is no point to write barriers when writing outside
the heap.)

This CL is only about correctness. The next CL will optimize the code.

Change-Id: Id1305c7c071fd2734ab96634b0e1c745b23fa793
Reviewed-on: https://go-review.googlesource.com/9886
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mbarrier.go
src/runtime/mbitmap.go