Age | Commit message (Collapse) | Author | Files | Lines |
|
A step toward eliminating goc2c.
Drop the exported parfor code; it was needed for tests in the past, but
no longer is. The Go 1.7 runtime no longer uses parfor.
Reviewed-on: https://go-review.googlesource.com/33324
From-SVN: r242509
|
|
I started to copy the Go 1.7 interface code, but the gc and gccgo
representations of interfaces are too different. So instead I rewrote
the gccgo interface code from C to Go. The code is largely the same as
it was, but the names are more like those used in the gc runtime.
I also copied over the string comparison functions, and tweaked the
compiler to use eqstring when comparing strings for equality.
Reviewed-on: https://go-review.googlesource.com/31591
From-SVN: r241384
|
|
This replaces runtime/cpuprof.goc with go/runtime/cpuprof.go and adjusts
the supporting code in runtime/proc.c.
This adds another case where the compiler needs to avoid heap allocation
in the runtime package: when evaluating a method expression into a
closure. Implementing this required moving the relevant code from
do_get_backend to do_flatten, so that I could easily add a temporary
variable. Doing that let me get rid of Bound_method_expression::do_lower.
Reviewed-on: https://go-review.googlesource.com/31050
From-SVN: r241163
|
|
Also copy over cputicks.go, env_posix.go, vdso_none.go, stubs2.go, and a
part of os_linux.go. Remove the corresponding functions from the C code
in libgo/go/runtime. Add some transitional support functions to
stubs.go. This converts several minor functions from C to Go.
Reviewed-on: https://go-review.googlesource.com/29962
From-SVN: r240609
|
|
Use the new -fgo-c-header option to build a header file for the Go
runtime code in libgo/go/runtime, and use the new header file in the C
runtime code in libgo/runtime. This will ensure that the Go code and C
code share the same data structures as we convert the runtime from C to
Go.
The new file libgo/go/runtime/runtime2.go is copied from the Go 1.7
release, and then edited to remove unnecessary data structures and
modify others for use with libgo.
The new file libgo/go/runtime/mcache.go is an initial version of the
same files in the Go 1.7 release, and will be replaced by the Go 1.7
file when we convert to the new memory allocator.
The new file libgo/go/runtime/type.go describes the gccgo version of the
reflection data structures, and replaces the Go 1.7 runtime file which
describes the gc version of those structures.
Using the new header file means changing a number of struct fields to
use Go naming conventions (that is, no underscores) and to rename
constants to have a leading underscore so that they are not exported
from the Go package. These names were updated in the C code.
The C code was also changed to drop the thread-local variable m, as was
done some time ago in the gc sources. Now the m field is always
accessed using g->m, where g is the single remaining thread-local
variable. This in turn required some adjustments to set g->m correctly
in all cases.
Also pass the new -fgo-compiling-runtime option when compiling the
runtime package, although that option doesn't do anything yet.
Reviewed-on: https://go-review.googlesource.com/28051
From-SVN: r239872
|
|
It is not needed due to the removal of the ctx field.
Reviewed-on: https://go-review.googlesource.com/16525
From-SVN: r229616
|
|
This upgrades all of libgo other than the runtime package to
the Go 1.4 release. In Go 1.4 much of the runtime was
rewritten into Go. Merging that code will take more time and
will not change the API, so I'm putting it off for now.
There are a few runtime changes anyhow, to accomodate other
packages that rely on minor modifications to the runtime
support.
The compiler changes slightly to add a one-bit flag to each
type descriptor kind that is stored directly in an interface,
which for gccgo is currently only pointer types. Another
one-bit flag (gcprog) is reserved because it is used by the gc
compiler, but gccgo does not currently use it.
There is another error check in the compiler since I ran
across it during testing.
gotools/:
* Makefile.am (go_cmd_go_files): Sort entries. Add generate.go.
* Makefile.in: Rebuild.
From-SVN: r219627
|
|
This revision renames several files in the runtime directory
from .c to .goc.
From-SVN: r212472
|
|
From-SVN: r192704
|
|
From-SVN: r183539
|
|
From-SVN: r181772
|