reflect: add FuncOf function

This also involves adding functions to typelinks along with a minor
change to ensure they are sorted correctly.

Change-Id: I054a79b6498a634cbccce17579f52c299733c2cf
Reviewed-on: https://go-review.googlesource.com/1996
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Dave Day 2014-12-23 15:19:30 +11:00
parent f5b5e41814
commit e1c1fa2919
4 changed files with 199 additions and 5 deletions

View file

@ -44,3 +44,13 @@ func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr,
ptrs = ft.kind&kindNoPointers == 0
return
}
func TypeLinks() []string {
var r []string
for _, m := range typelinks() {
for _, t := range m {
r = append(r, *t.string)
}
}
return r
}