FAQ
A few of us have been pondering unifying the compiler's types
(cmd/compile/internal/gc:Type and cmd/compile/internal/ssa:Type) and moving
it to its own package. And then maybe replacing it with go/types. As far
as I know this is just a pipe dream at the moment, no work has been done.

On Tue, Mar 22, 2016 at 9:59 AM, David Crawshaw wrote:

You're referring to reflect/type.go, runtime/type.go,
cmd/compile/internal/gc/reflect.go, and
cmd/link/internal/gc/decodesym.go?

I don't think there's any plan for them. It may be possible to merge
the types from runtime/type.go and reflect/type.go into an
internal/rtype package, but those types assume the pointer width of
the running binary, while both the compiler and linker need to be able
to work in variable target pointer widths. Perhaps it's possible to
generate some part of the compiler's encoder and decodesym from the
types?

I'll put an hour into an internal/rtype package and see what comes up.
On Tue, Mar 22, 2016 at 12:46 PM, Seb Binet wrote:
hi there,

while trying to implement a new feature for reflect, I had to dive
into how types are represented in Go.

Before Go-1.4 and the re-write/translation to C, types were defined in
Go in the runtime and reflect packages.
There was also a type representation in C, inside the C-based compiler.

Now, everything is in Go, but the amount of packages and places where
types are defined and managed (reflect, runtime,
cmd/compile/internal/gc) hasn't decreased.

Is there a plan to merge all these (or a subset of these) into a
single internal package?

-s

--
You received this message because you are subscribed to the Google
Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedMar 22, '16 at 4:46p
activeMar 22, '16 at 6:22p
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase