1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:54:42 -07:00
go/ssa
Alan Donovan 4d628a0312 go.tools/ssa: refactoring to make Builder stateless.
A Builder is now just a Program and a Context.

Details of this CL:
- Builder.imp field removed.
- Builder.globals split up into Package.values and Prog.Builtins.
- Builder.packages  moved to Prog.packages.
- Builder.PackageFor moved to Program.Package(types.Object)
- Program.Lookup() func replaces Builder.globals map.
- also: keep Package.info field around until end of BuildPackage.

Planned follow-ups to eliminate Builder from API:
- split NewBuilder up into NewProgram and Program.CreatePackages(...)
- move Builder.BuildAllPackages -> Program.BuildAll(Context)
- move Builder.BuildPackage -> Package.Build(Context)

R=gri, iant
CC=golang-dev
https://golang.org/cl/9966044
2013-06-03 14:15:19 -04:00
..
interp go.tools/ssa: refactoring to make Builder stateless. 2013-06-03 14:15:19 -04:00
blockopt.go go.tools: add missing files ssa/*.go 2013-05-17 13:25:48 -07:00
builder.go go.tools/ssa: refactoring to make Builder stateless. 2013-06-03 14:15:19 -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.tools/ssa: refactoring to make Builder stateless. 2013-06-03 14:15:19 -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.tools/ssa: fix bug in makeBridgeMethod for promoted interfaces. 2013-05-31 16:36:03 -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.tools/ssa: refactoring to make Builder stateless. 2013-06-03 14:15:19 -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.tools/ssa: refactoring to make Builder stateless. 2013-06-03 14:15:19 -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