go/ssa: treat declared init functions less specially

Before this change, declared init functions were not package members;
this choice dates from when go/types did not create Func objects for them.

Now, they have an Object.  They appear in Members, keyed by "init#%d"
(sequence number) for uniqueness.  They can be enumerated.  They can
be looked up from a *types.Func via (*Program).FuncValue.

Caveat: fn.Object.Name() no longer equals fn.Name() in all cases.

NB: incompatible API change!  (Your build will not break though.)

Change-Id: I2de873079fd57329e6c2f55a282940f6699a77a1
Reviewed-on: https://go-review.googlesource.com/6950
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Peter Collingbourne <pcc@google.com>
5 files changed