This is the mail archive of the
mailing list for the GCC project.
Re: gccgo: A gcc frontend for Go, a new programming language
Sebastian Pop <firstname.lastname@example.org> writes:
> I haven't looked at the gccgo branch yet, but have quickly browsed
> over the material at golang.org, and I found no document describing,
> at a high level, the design of the compiler(s) and the runtime of go.
As far as I know there is no such document.
First let me say that while gccgo's runtime is currently different
from gc's (the other Go compiler), I hope that gccgo's runtime will
pick up pieces of gc's over time.
> How are the goroutines implemented/translated by gccgo?
In gccgo goroutines are simply implemented as pthreads. In gc they
are implemented as coroutines multiplexed onto pthreads.
> How are the channels implemented?
They are basically just buffers controlled by locks that feed into the
goroutine scheduling one way or another.
> What kind of memory model did the go authors
> had in mind: shared memory, NUMA, or heterogeneous systems?
> I have
> the impression that go targets, for now, only shared memory systems
> with pthreads.
> I would appreciate pointers either to high level design documents, or
> to the source code.
The source code is there at http://golang.org/ or in
svn://gcc.gnu.org/svn/gcc/branches/gccgo. For gc the runtime supports
is in src/pkg/runtime, for gccgo it is libgo/runtime.