• 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
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...