mirror of https://github.com/golang/go.git
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
|
||
|---|---|---|
| .. | ||
| interp | ||
| blockopt.go | ||
| builder.go | ||
| create.go | ||
| doc.go | ||
| dom.go | ||
| emit.go | ||
| example_test.go | ||
| func.go | ||
| lift.go | ||
| literal.go | ||
| lvalue.go | ||
| print.go | ||
| promote.go | ||
| sanity.go | ||
| source.go | ||
| source_ast.go | ||
| source_test.go | ||
| ssa.go | ||
| ssadump.go | ||
| util.go | ||