• Carl Shapiro's avatar
    cmd/cc, cmd/gc, runtime: Uniquely encode iface and eface pointers in the pointer map. · abc516e4
    Carl Shapiro authored
    Prior to this change, pointer maps encoded the disposition of
    a word using a single bit.  A zero signaled a non-pointer
    value and a one signaled a pointer value.  Interface values,
    which are a effectively a union type, were conservatively
    labeled as a pointer.
    
    This change widens the logical element size of the pointer map
    to two bits per word.  As before, zero signals a non-pointer
    value and one signals a pointer value.  Additionally, a two
    signals an iface pointer and a three signals an eface pointer.
    
    Following other changes to the runtime, values two and three
    will allow a type information to drive interpretation of the
    subsequent word so only those interface values containing a
    pointer value will be scanned.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/12689046
    abc516e4
pgen.c 14.8 KB