1
0
mirror of https://github.com/golang/go synced 2024-10-01 20:28:33 -06:00
go/ssa/interp
Alan Donovan 341a07a3aa go.tools/ssa: small changes accumulated during gri's vacation. :)
Method sets:
- Simplify CallCommon.
  Avoid the implicit copy when calling a T method on a *T
  receiver.  This simplifies clients.  Instead we generate
  "indirection wrapper" functions that do this (like gc does).
  New invariant:
  m's receiver type is exactly T for all m in MethodSet(T)
- MakeInterface no longer holds the concrete type's MethodSet.
  We can defer its computation this way.
- ssa.Type now just wraps a types.TypeName object.
  MethodSets are computed as needed, not eagerly.

Position info:
- new CanonicalPos utility maps ast.Expr to canonical
  token.Pos, as returned by {Instruction,Value}.Pos() methods.
- Don't set posn for implicit operations (e.g. varargs array alloc)
- Set position info for ChangeInterface and Slice instructions.

Cosmetic:
- add Member.Token() method
- simplify isPointer
- Omit words "interface", "slice" when printing MakeInterface,
  MakeSlice; the type is enough.
- Comments on PathEnclosingInterval.
- Remove Function.FullName() where implicit String() suffices.

Also:
- Exposed NewLiteral to clients.
- Added ssa.Instruction.Parent() *Function
  Added ssa.BasicBlock.Parent() *Function.
  Added Sanity checks for above.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/10166045
2013-06-13 14:43:35 -04:00
..
testdata go.tools/ssa: fix bug in makeBridgeMethod for promoted interfaces. 2013-05-31 16:36:03 -04:00
external_plan9.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external_unix.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external_windows.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00
interp_test.go go.tools/ssa: refactoring: eliminate Builder from API. 2013-06-03 16:46:57 -04:00
interp.go go.tools/ssa: small changes accumulated during gri's vacation. :) 2013-06-13 14:43:35 -04:00
map.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
ops.go go.tools/go/types: Factories for all objects 2013-06-04 15:15:41 -04:00
reflect.go go.tools/go/types: Factories for all objects 2013-06-04 15:15:41 -04:00
value.go go.tools/ssa: Value.Pos() method + remaining source position plumbing. 2013-05-30 09:59:17 -04:00