On Mon, Jan 29, 2018 at 11:21 PM, Jason E. Aten <j.e.a...@gmail.com> wrote: > > I wrote some code to convert (go/types) types.Type to reflect.Type, > > but I kept thinking, "this has to be done somewhere already in > the runtime or compiler libraries...", doesn't it? > > [ I know gc doesn't use go/types, but assume I'm asking about > the equivalent (say /usr/local/go/src/cmd/compile/internal/syntax/nodes.go's > TypeDecl) > -- it has to be transformed at some > point into a reflect.Type, right? ] > > Does anyone know where in the go codebase that transform lives?
The reflect.rtype aka runtime._type structures are generated by cmd/compile/internal/gc/reflect.go. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.