]> Cypherpunks repositories - gostls13.git/commit
go/typechecker: 2nd step towards augmenting AST with full type information.
authorRobert Griesemer <gri@golang.org>
Thu, 26 Aug 2010 21:36:13 +0000 (14:36 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 26 Aug 2010 21:36:13 +0000 (14:36 -0700)
commitc606b964a06459c6522b4649bfee2e6d21c65695
tree406d76c4920ccd708a5673c354937e17a55209bd
parent4ae2b43ef23ef0e187a923fdf1ca61c33e7faef2
go/typechecker: 2nd step towards augmenting AST with full type information.

- refine/define Scope, Object, and Type structures
  (note: scope.go has the addition of types, the rest is only re-organized
  for better readability)
- implemented top-level of type checker:
  resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
  with initial set of tests

This is a subset of the code for easier review.

R=rsc
CC=golang-dev
https://golang.org/cl/1967049
12 files changed:
src/cmd/godoc/godoc.go
src/pkg/Makefile
src/pkg/go/ast/scope.go
src/pkg/go/typechecker/Makefile [new file with mode: 0644]
src/pkg/go/typechecker/scope.go [new file with mode: 0644]
src/pkg/go/typechecker/testdata/test0.go [new file with mode: 0644]
src/pkg/go/typechecker/testdata/test1.go [new file with mode: 0644]
src/pkg/go/typechecker/testdata/test3.go [new file with mode: 0644]
src/pkg/go/typechecker/testdata/test4.go [new file with mode: 0644]
src/pkg/go/typechecker/typechecker.go [new file with mode: 0644]
src/pkg/go/typechecker/typechecker_test.go [new file with mode: 0644]
src/pkg/go/typechecker/universe.go [new file with mode: 0644]