• Robert Griesemer's avatar
    go/types: New Go type hierarchy implementation for AST. · a87382e7
    Robert Griesemer authored
    This CL defines a new, more Go-like representation of
    Go types (different structs for different types as
    opposed to a single Type node). It also implements
    an ast.Importer for object/archive files generated
    by the gc compiler tool chain. Besides the individual
    type structs, the main difference is the handling of
    named types: In the old world, a named type had a
    non-nil *Object pointer but otherwise looked no
    different from other types. In this new model, named
    types have their own representation types.Name. As
    a result, resolving cycles is a bit simpler during
    construction, at the cost of having to deal with
    types.Name nodes explicitly later. It remains to be
    seen if this is a good approach. Nevertheless, code
    involving types reads more nicely and benefits from
    full type checking. Also, the representation seems
    to more closely match the spec wording.
    
    Credits: The original version of the gc importer was
    written by Evan Shaw (chickencha@gmail.com). The new
    version in this CL is based largely on Evan's original
    code but contains bug fixes, a few simplifications,
    some restructuring, and was adjusted to use the
    new type hierarchy. I have added a comprehensive test
    that imports all packages found under $GOROOT/pkg (with
    a 3s time-out to limit the run-time of the test). Run
    gotest -v for details.
    
    The original version of ExportData (exportdata.go) was
    written by Russ Cox (rsc@golang.org). The current version
    is returning the internal buffer positioned at the beginning
    of the export data instead of printing the export data to
    stdout.
    
    With the new types package, the existing in-progress
    typechecker package is deprecated. I will delete it
    once all functionality has been brought over.
    
    R=eds, rog, rsc
    CC=golang-dev
    https://golang.org/cl/4314054
    a87382e7
Name
Last commit
Last update
..
archive Loading commit data...
asn1 Loading commit data...
big Loading commit data...
bufio Loading commit data...
bytes Loading commit data...
cmath Loading commit data...
compress Loading commit data...
container Loading commit data...
crypto Loading commit data...
debug Loading commit data...
ebnf Loading commit data...
encoding Loading commit data...
exec Loading commit data...
exp Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
gob Loading commit data...
hash Loading commit data...
html Loading commit data...
http Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
io Loading commit data...
json Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
netchan Loading commit data...
os Loading commit data...
patch Loading commit data...
path Loading commit data...
rand Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
rpc Loading commit data...
runtime Loading commit data...
scanner Loading commit data...
smtp Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
syslog Loading commit data...
tabwriter Loading commit data...
template Loading commit data...
testing Loading commit data...
time Loading commit data...
try Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...
utf16 Loading commit data...
utf8 Loading commit data...
websocket Loading commit data...
xml Loading commit data...
Makefile Loading commit data...
deps.bash Loading commit data...