aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/Makefile
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-04-07 21:40:37 -0700
committerRobert Griesemer <gri@golang.org>2011-04-07 21:40:37 -0700
commita87382e7b3d569b57eda5af2973e2f73aabb7f56 (patch)
tree97ef4b547f8eb1fb007088170b2f9ef90e875876 /src/pkg/Makefile
parent70bf4215e9d9e6e4693e61657daaa52e6c4c3894 (diff)
downloadgo-a87382e7b3d569b57eda5af2973e2f73aabb7f56.tar.xz
go/types: New Go type hierarchy implementation for AST.
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
Diffstat (limited to 'src/pkg/Makefile')
-rw-r--r--src/pkg/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/Makefile b/src/pkg/Makefile
index 1e066dcf95..0d426e7a54 100644
--- a/src/pkg/Makefile
+++ b/src/pkg/Makefile
@@ -90,6 +90,7 @@ DIRS=\
go/scanner\
go/token\
go/typechecker\
+ go/types\
gob\
hash\
hash/adler32\