]> Cypherpunks repositories - gostls13.git/commit
runtime: factor object dumping code out of greyobject
authorAustin Clements <austin@google.com>
Thu, 12 Mar 2015 18:26:04 +0000 (14:26 -0400)
committerAustin Clements <austin@google.com>
Tue, 17 Mar 2015 01:46:35 +0000 (01:46 +0000)
commit506615d83ebbbaba33aaf98d79a285b0b367a094
tree568b34386c0572bc8a4d2682f762a3021678069e
parent830abc957a106e44ed33c4eeb8cc9f0dd807fcc9
runtime: factor object dumping code out of greyobject

When checkmark fails, greyobject dumps both the object that pointed to
the unmarked object and the unmarked object. This code cluttered up
greyobject, was copy-pasted for the two objects, and the copy for
dumping the unmarked object was not entirely correct.

Extract object dumping out to a new function. This declutters
greyobject and fixes the bugs in dumping the unmarked object. The new
function is slightly cleaned up from the original code to have more
natural control flow and shows a marker on the field in the base
object that points to the unmarked object to make it easy to find.

Change-Id: Ib51318a943f50b0b99995f0941d03ee8876b9fcf
Reviewed-on: https://go-review.googlesource.com/7506
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go