Commit Graph

16 Commits

Author SHA1 Message Date
Richard Henderson 38bf819a5f compiler, reflect, runtime: Use static chain for closures.
Change from using __go_set_closure to passing the closure
value in the static chain field.  Uses new backend support for
setting the closure chain in a call from C via
__builtin_call_with_static_chain.  Uses new support in libffi
for Go closures.

The old architecture specific support for reflect.MakeFunc is
removed, replaced by the libffi support.

All work done by Richard Henderson.

	* go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument.
	(Gcc_backend::static_chain_variable): New method.

From-SVN: r219776
2015-01-16 22:58:53 +00:00
Ian Lance Taylor f8d9fa9e80 libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.
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
2015-01-15 00:27:56 +00:00
Ian Lance Taylor bca4b95c4a runtime: Remove undefined references to runtime_race*.
From-SVN: r219049
2014-12-23 20:33:53 +00:00
Ian Lance Taylor 00d86ac99f libgo: Update to Go 1.3 release.
From-SVN: r212837
2014-07-19 08:53:52 +00:00
Ian Lance Taylor 6736ef96ea libgo: Merge to master revision 19184.
The next revision, 19185, renames several runtime files, and
will be handled in a separate change.

From-SVN: r211328
2014-06-06 22:37:27 +00:00
Ian Lance Taylor f038dae646 libgo: Update to October 24 version of master library.
From-SVN: r204466
2013-11-06 19:49:01 +00:00
Ian Lance Taylor 05a7d56678 compiler, runtime: Use runtime functions to pass closure value.
This changes the compiler and runtime to not pass a closure
value as the last argument, but to instead pass it via
__go_set_closure and retrieve it via __go_get_closure.  This
eliminates the need for function descriptor wrapper functions.
It will make it possible to retrieve the closure value in a
reflect.MakeFunc function.

From-SVN: r202233
2013-09-03 21:52:37 +00:00
Ian Lance Taylor be47d6ecef libgo: Update to Go 1.1.1.
From-SVN: r200974
2013-07-16 06:54:42 +00:00
Ian Lance Taylor fdbc38a6e8 compiler, runtime: Use function descriptors.
This changes the representation of a Go value of function type
from being a pointer to function code (like a C function
pointer) to being a pointer to a struct.  The first field of
the struct points to the function code.  The remaining fields,
if any, are the addresses of variables referenced in enclosing
functions.  For each call to a function, the address of the
function descriptor is passed as the last argument.

This lets us avoid generating trampolines, and removes the use
of writable/executable sections of the heap.

From-SVN: r200181
2013-06-18 23:49:49 +00:00
Ian Lance Taylor 777133fefb libgo: Update Go library to master revision 15502/229081515358.
From-SVN: r195569
2013-01-30 01:37:13 +00:00
Ian Lance Taylor 409a5e7eb4 libgo: Update to revision 15193:6fdc1974457c of master library.
From-SVN: r194692
2012-12-22 01:15:33 +00:00
Ian Lance Taylor 4ccad563d2 libgo: Update to current sources.
From-SVN: r192704
2012-10-23 04:31:11 +00:00
Ian Lance Taylor 08a680a887 libgo: Update to Go 1.0.2 release.
From-SVN: r188943
2012-06-25 16:20:03 +00:00
Ian Lance Taylor 7b1c3dd9e6 libgo: Update to weekly.2011-12-02.
From-SVN: r182295
2011-12-13 19:16:27 +00:00
Ian Lance Taylor ab61e9c4da libgo: Update to weekly.2011-11-18.
From-SVN: r182266
2011-12-12 23:40:51 +00:00
Ian Lance Taylor 9c63abc9a1 libgo: Update to weekly 2011-11-09.
From-SVN: r182073
2011-12-07 01:11:29 +00:00