gcc/libgo/go
Ian Lance Taylor 39c0aa5f74 compiler, runtime, reflect: generate unique type descriptors
Currently, the compiler already generates common symbols for type
    descriptors, so the type descriptors are unique. However, when a
    type is created through reflection, it is not deduplicated with
    compiler-generated types. As a consequence, we cannot assume type
    descriptors are unique, and cannot use pointer equality to
    compare them. Also, when constructing a reflect.Type, it has to
    go through a canonicalization map, which introduces overhead to
    reflect.TypeOf, and lock contentions in concurrent programs.
    
    In order for the reflect package to deduplicate types with
    compiler-created types, we register all the compiler-created type
    descriptors at startup time. The reflect package, when it needs
    to create a type, looks up the registry of compiler-created types
    before creates a new one. There is no lock contention since the
    registry is read-only after initialization.
    
    This lets us get rid of the canonicalization map, and also makes
    it possible to compare type descriptors with pointer equality.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179598

From-SVN: r271894
2019-06-03 23:37:04 +00:00
..
archive
bufio
builtin
bytes
cmd
compress
container
context
crypto
database/sql
debug
encoding
errors
expvar
flag
fmt
go
golang.org/x/tools
hash
html
image
index/suffixarray
internal
io
log
math
mime
net
os os/user: disable TestGroupIds for AIX 2019-05-03 17:15:54 +00:00
path
plugin
reflect compiler, runtime, reflect: generate unique type descriptors 2019-06-03 23:37:04 +00:00
regexp
runtime compiler, runtime, reflect: generate unique type descriptors 2019-06-03 23:37:04 +00:00
sort
strconv
strings
sync
syscall re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused parameter ‘w’ [-Werror=unused-parameter] Continued (uint32_t *w)) 2019-05-27 00:10:34 +00:00
testdata
testing
text
time
unicode