reflect: Remove imprecise techniques from channel/select operations.
Reflect used to communicate to the runtime using interface words, which is bad for precise GC because sometimes iwords hold a pointer and sometimes they don't. This change rewrites channel and select operations to always pass pointers to the runtime. reflect.Select gets somewhat more expensive, as we now do an allocation per receive case instead of one allocation whose size is the max of all the received types. This seems unavoidable to get preciseness (unless we move the allocation into selectgo, which is a much bigger change). Fixes #6490 R=golang-codereviews, dvyukov, rsc CC=golang-codereviews https://golang.org/cl/52900043
Showing
Please
register
or
sign in
to comment