• Gustavo Niemeyer's avatar
    cgo: fix dwarf type parsing · 99686ec7
    Gustavo Niemeyer authored
    The recursive algorithm used to parse types in cgo
    has a bug related to building the C type representation.
    
    As an example, when the recursion starts at a type *T,
    the C type representation won't be known until type T
    itself is parsed.  But then, it is possible that type T
    references the type **T internally.  The latter
    representation is built based on the one of *T, which
    started the recursion, so it won't attempt to parse it
    again, and will instead use the current representation
    value for *T, which is still empty at this point.
    
    This problem was fixed by introducing a simple TypeRepr
    type which builds the string representation lazily,
    analogous to how the Go type information is built within
    the same algorithm.  This way, even if a type
    representation is still unknown at some level in the
    recursion, representations dependant on it can still
    be created correctly.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/4244052
    99686ec7
Name
Last commit
Last update
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
ebnflint Loading commit data...
gc Loading commit data...
godefs Loading commit data...
godoc Loading commit data...
gofmt Loading commit data...
goinstall Loading commit data...
gomake Loading commit data...
gopack Loading commit data...
gotest Loading commit data...
govet Loading commit data...
goyacc Loading commit data...
hgpatch Loading commit data...
ld Loading commit data...
nm Loading commit data...
prof Loading commit data...
Makefile Loading commit data...