1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:05:06 -07:00
go/ssa
Alan Donovan be28dbb86f go.types/ssa: split the load/parse/typecheck logic off into a separate package.
PLEASE NOTE: the APIs for both "importer" and "ssa" packages
will continue to evolve and both need some polishing; the key
thing is that this CL splits them.

The go.types/importer package contains contains the Importer,
which takes care of the mechanics of loading a set of packages
and type-checking them.  It exposes for each package a
PackageInfo containing:
- the package's ASTs (i.e. the input to the typechecker)
- the types.Package object
- the memoization of the typechecker callbacks for identifier
  resolution, constant folding and expression type inference.

Method-set computation (and hence bridge-method creation) is
now moved to after creation of all packages: since they are no
longer created in topological order, we can't guarantee the
needed delegate methods exist yet.

ssa.Package no longer has public TypeOf, ObjectOf, ValueOf methods.
The private counterparts are valid only during the build phase.

Also:
- added to go/types an informative error (not crash) for an
  importer() returning nil without error.
- removed Package.Name(), barely needed.
- changed Package.String() slightly.
- flag what looks like a bug in makeBridgeMethod. Will follow up.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/9898043
2013-05-31 16:14:13 -04:00
..
interp go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
blockopt.go go.tools: add missing files ssa/*.go 2013-05-17 13:25:48 -07:00
builder.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
doc.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
dom.go go.tools: add missing files ssa/*.go 2013-05-17 13:25:48 -07:00
emit.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
example_test.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
func.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
lift.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
literal.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
lvalue.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
print.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
promote.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
sanity.go go.tools: bring up to date 2013-05-17 14:02:47 -07:00
source_ast.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
source_test.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
source.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
ssa.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
ssadump.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00
util.go go.types/ssa: split the load/parse/typecheck logic off into a separate package. 2013-05-31 16:14:13 -04:00