Extracted Builder.findMethod function to handle
methodset/receiver logic common to
function calls (Builder.setCall) and
bound method closure creation (Builder.selector).
Capture: added explicit Name, Type fields to Capture instead
of relying on Outer field, which is now un-exported since its
only purpose is to let Builder.expr(case *ast.FuncLit) know
which values to put in the closure; it is nilled immediately
after.
Simplified Function.lookup() logic: there's no need to walk
the Outer chain each time to set Alloc.Heap=true, as it's
already set during creation of the outermost
Capture{outer:*Alloc}.
Added interp/testdata/boundmeth.go test.
Cosmetic changes:
- add support for bound method thunks to Function.FullName().
- Simplified {Literal,Global,Builtin,Function}.String()
- doc: Captures are no longer necessarily addresses.
- added yet another missing pair of "()" (go/types accessors).
- print "Synthetic" not "Declared at -" for synthetic functions.
- use '$' not center-dot in synthetic identifiers (easier to type).
R=gri
CC=golang-dev
https://golang.org/cl/9654043
- remove Makefile
- move test data into a subdirectory
- encapsulate the invocation of errchk into a standard Test using os.exec
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/9509045
Now that it's in the same repository as the go/types package we can delete
the mechanism to build it without type checking.
Add a make rule to install it where the go tool can find it.
Why doesn't "go install" take a -o flag?
R=gri
CC=gobot, golang-dev
https://golang.org/cl/9526043
Also:
- remove redundant text in doc.go.
- fix (yet more) cases of missing parens in Printf, fallout from
go/types accessors refactoring.
- don't mix spaces and tabs within lines printed by ssa.Function.DumpTo:
it makes it too hard to constructed expected outputs for tests.
(Tabs may appear at line start though.)
Sadly godoc -play won't run this program; it complains it
can't import "code.google.com/p/go.exp/ssa". Any idea why?
R=gri
CC=golang-dev
https://golang.org/cl/9481044
They will be deleted from their current homes once this has landed.
Changes made to import paths to make the code compile, and to find
errchk in the right place in cmd/vet's Makefile.
TODO in a later CL: tidy up vet.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/9495043