Commit Graph

181 Commits

Author SHA1 Message Date
Ian Lance Taylor
df1304ee03 libgo: Update to weekly.2012-01-15.
From-SVN: r183539
2012-01-25 20:56:26 +00:00
Ian Lance Taylor
98dfd7ff16 runtime: Make builtin print exactly match gc builtin print.
From-SVN: r183378
2012-01-21 21:58:09 +00:00
Ian Lance Taylor
1efa38d1a7 libgo: Solaris and Irix compatibility patches.
From Rainer Orth.

From-SVN: r183246
2012-01-17 14:18:39 +00:00
Ian Lance Taylor
df4aa89a5e libgo: Update to weekly.2011-12-22.
From-SVN: r183150
2012-01-13 05:11:45 +00:00
Ian Lance Taylor
9a0e3259f4 libgo: Update to weekly.2011-12-14.
From-SVN: r183118
2012-01-12 01:31:45 +00:00
Ian Lance Taylor
f9f9698753 compiler, runtime: Implement struct and array comparisons.
From-SVN: r182971
2012-01-06 21:47:49 +00:00
Ian Lance Taylor
a05fe19071 runtime: Fix missing USING_SPLIT_STACK ifdef.
From Uros Bizjak.

From-SVN: r182633
2011-12-22 19:07:12 +00:00
Ian Lance Taylor
a6dcb7d465 runtime: Catch signals on altstack, disable splitstack signal blocking.
From-SVN: r182607
2011-12-21 22:24:47 +00:00
Ian Lance Taylor
d8fa39bfc8 libgo/runtime: Don't define _GNU_SOURCE in source code.
From-SVN: r182550
2011-12-20 18:49:40 +00:00
Ian Lance Taylor
03eee7f75c runtime: RTEMS build fixes.
From Joel Sherrill.

From-SVN: r182309
2011-12-13 21:59:26 +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
ec2c72551e runtime: make print() built-in write to stderr.
Fixes issue 2294.

From-SVN: r182167
2011-12-09 16:42:40 +00:00
Ian Lance Taylor
c19bd76920 libgo: Add back tests of syscall time.
From-SVN: r182075
2011-12-07 01:55:49 +00:00
Ian Lance Taylor
9c63abc9a1 libgo: Update to weekly 2011-11-09.
From-SVN: r182073
2011-12-07 01:11:29 +00:00
Ian Lance Taylor
506cf9aaea libgo: Update to weekly.2011-11-01.
From-SVN: r181938
2011-12-02 19:34:41 +00:00
Ian Lance Taylor
f4c016e605 runtime: Remove temporary runtime_cond_wait function.
From-SVN: r181897
2011-12-01 23:50:48 +00:00
Ian Lance Taylor
17dcf07581 runtime: Rename sigignore to sig_ignore for Solaris.
From-SVN: r181885
2011-12-01 17:08:12 +00:00
Ian Lance Taylor
3e68d6d75a compiler/runtime: Copy channel implementation from master library.
From-SVN: r181874
2011-12-01 08:06:16 +00:00
Ian Lance Taylor
b87974949f runtime: Copy runtime_panicstring from master library.
From-SVN: r181830
2011-11-30 00:21:52 +00:00
Ian Lance Taylor
08ee945e0b runtime: If no sem_timedwait, use pthread_cond_timedwait.
From-SVN: r181821
2011-11-29 21:58:48 +00:00
Ian Lance Taylor
421ecf992e runtime: If O_CLOEXEC is not defined, define it as 0.
From-SVN: r181814
2011-11-29 19:26:00 +00:00
Ian Lance Taylor
737087cbc8 runtime: Multiplex goroutines onto OS threads.
From-SVN: r181772
2011-11-28 05:45:49 +00:00
Ian Lance Taylor
48e7d50e9f runtime: New lock/note implementation.
From-SVN: r181633
2011-11-22 20:24:44 +00:00
Ian Lance Taylor
5c262e9444 runtime: Use some of 6g runtime.c for easier merging.
From-SVN: r181368
2011-11-14 22:26:45 +00:00
Ian Lance Taylor
34277c5228 Introduce G structure and thread-local global g.
From-SVN: r181301
2011-11-11 21:02:48 +00:00
Ian Lance Taylor
787f74b487 runtime: Don't ask mmap for wrapping memory.
From-SVN: r180732
2011-11-01 05:20:40 +00:00
Ian Lance Taylor
3d43396098 runtime: Correct test of mmap return value.
From-SVN: r180731
2011-11-01 04:55:15 +00:00
Ian Lance Taylor
f0080f6cf9 syscall: Use sched_yield rather than pthread_yield.
From-SVN: r180716
2011-10-31 22:09:21 +00:00
Ian Lance Taylor
d8f412571f Update Go library to last weekly.
From-SVN: r180552
2011-10-26 23:57:58 +00:00
Ian Lance Taylor
f29ce5f5f1 Implement predeclared delete function.
From-SVN: r180438
2011-10-25 17:21:07 +00:00
Ian Lance Taylor
09367c0d60 Don't permit close of receive-only channel.
Better panic on attempt to close nil channel.

From-SVN: r180437
2011-10-25 16:35:24 +00:00
Ian Lance Taylor
de27caacfb Implement new syscall package.
Calls to library functions now use entersyscall and
exitsyscall as appropriate.  This is a first step toward
multiplexing goroutines onto threads.

From-SVN: r180345
2011-10-23 19:04:37 +00:00
Ian Lance Taylor
e6f8e59016 Support nil maps.
From-SVN: r179054
2011-09-21 17:37:50 +00:00
Ian Lance Taylor
f6cde0add6 Fix channels with element type of size zero.
From-SVN: r179030
2011-09-21 00:56:28 +00:00
Ian Lance Taylor
6fa2979911 Fix calling make with slice whose element type is size zero.
From-SVN: r179019
2011-09-20 22:06:20 +00:00
Ian Lance Taylor
31aeabd3c5 Block forever on send/receive to/from nil channel.
From-SVN: r178920
2011-09-16 22:56:32 +00:00
Ian Lance Taylor
adb0401dac Update Go library to r60.
From-SVN: r178910
2011-09-16 15:47:21 +00:00
Ian Lance Taylor
b9f04a8461 Fix defer when not calling recover in function with named results.
From-SVN: r178905
2011-09-16 05:47:20 +00:00
Ian Lance Taylor
ae06570eb6 libgo/runtime: Change std::abort to abort.
From-SVN: r176181
2011-07-11 20:16:01 +00:00
Ian Lance Taylor
de38eefaa7 Change builtin make to runtime call at lowering time.
Use kindNoPointers as 6g does.

	* Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H).

From-SVN: r175020
2011-06-14 13:51:16 +00:00
Ian Lance Taylor
3b8dffe701 Change builtin make to runtime call at lowering time.
Use kindNoPointers as 6g does.

	* Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H).

From-SVN: r175008
2011-06-14 05:53:10 +00:00
Ian Lance Taylor
891daafaf8 Use backend interface for map descriptors.
From-SVN: r174943
2011-06-11 06:21:55 +00:00
Ian Lance Taylor
5bb92e54b7 libgo: Make os.setenv_c work on systems without setenv.
From-SVN: r174147
2011-05-24 22:21:34 +00:00
Ian Lance Taylor
9ff56c9570 Update to current version of Go library.
From-SVN: r173931
2011-05-20 00:18:15 +00:00
Ian Lance Taylor
4e7e7a49b7 More uses of backend interface for types.
From-SVN: r173507
2011-05-06 20:06:29 +00:00
Ian Lance Taylor
e1c2f29025 libgo: Fix append declaration.
From Rainer Orth.

From-SVN: r172659
2011-04-18 17:31:00 +00:00
Ian Lance Taylor
b39c10b813 Unify handling of runtime support functions.
This introduces the new approach, and rewrites the lowering
code which uses runtime functions.  The code which calls
runtime functions at GENERIC conversion time is not yet
rewritten.

From-SVN: r172396
2011-04-13 21:00:59 +00:00
Ian Lance Taylor
9cc1bb97bc libgo: Use MAP_FIXED if necessary to grab arena.
From Rainer Orth.

	PR go/48240
	* configure.ac: Check for mincore.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* runtime/mem.c: Include unistd.h.
	(addrspace_free): New function.
	(runtime_SysMap): Retry 64-bit runtime_mmap with MAP_FIXED.

From-SVN: r171961
2011-04-05 00:02:15 +00:00
Rainer Orth
06ec98415a libgo: Always initialize semaphores.
2011-04-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR go/48222
	* runtime/malloc.goc (runtime_mallocinit): Call
	runtime_Mprof_Init, runtime_initfintab.
	* runtime/cpuprof.c (runtime_cpuprofinit): New function.
	* runtime/runtime.h (runtime_cpuprofinit): Declare it.
	* runtime/go-main.c (main): Use it.

From-SVN: r171960
2011-04-04 23:43:59 +00:00
Ian Lance Taylor
c29301d6b1 Add runtime profiling infrastructure, not yet working.
From-SVN: r171579
2011-03-27 19:14:55 +00:00
Ian Lance Taylor
c570af00f6 Remove closedchan function.
From-SVN: r171577
2011-03-27 18:06:50 +00:00
Ian Lance Taylor
fe052134f6 Remove closed function. Fix tuple receive in select.
From-SVN: r171440
2011-03-25 05:14:57 +00:00
Ian Lance Taylor
8039ca76a5 Update to current version of Go library.
From-SVN: r171427
2011-03-24 23:46:17 +00:00
Ian Lance Taylor
3137991dfc Tuple receives indicate whether channel is closed.
From-SVN: r171380
2011-03-24 06:01:27 +00:00
Ian Lance Taylor
4bfc521c9e Send on a closed channel panics.
Calling close on a closed channel panics.
Don't limit number of receives on a closed channel.

From-SVN: r171364
2011-03-23 21:13:57 +00:00
Ian Lance Taylor
7b5da51d4f Don't catch LIBPROF in Go code.
From-SVN: r171077
2011-03-16 23:18:40 +00:00
Ian Lance Taylor
5133f00ef8 Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
2011-03-16 23:05:44 +00:00
Ian Lance Taylor
7b5e671326 re PR go/48019 (Need to handle EINTR in libgo testsuite)
PR go/48019
Ignore EINTR in runtime_lock_full.

From-SVN: r170810
2011-03-09 06:31:37 +00:00
Ian Lance Taylor
a601335076 re PR go/47910 (typo in __go_map_next_prime)
PR go/47910
Correct search for next prime in libgo map code.

From-SVN: r170808
2011-03-09 05:32:36 +00:00
Ian Lance Taylor
d8b878dc29 Permit garbage collection on any compiler generated memory allocation.
From-SVN: r170760
2011-03-07 22:19:50 +00:00
Ian Lance Taylor
691a924baf Avoid race condition manipulating heap when goroutine exits.
From-SVN: r170758
2011-03-07 21:56:40 +00:00
Ian Lance Taylor
7b67393dff Permit comparing non-empty interfaces with empty interfaces.
From-SVN: r170385
2011-02-22 02:52:55 +00:00
Ian Lance Taylor
084996f1d1 Implement __sync_fetch_and_add_4 if necessary.
From-SVN: r169820
2011-02-04 00:49:47 +00:00
Ian Lance Taylor
0c521d1875 Check whether we are using setjmp/longjmp exceptions.
From-SVN: r169777
2011-02-03 01:53:36 +00:00
Ian Lance Taylor
a7c48c8ec5 Test whether libgcc or kernel defines __sync_bool_compare_and_swap_4.
From-SVN: r169504
2011-02-01 21:23:07 +00:00
Ian Lance Taylor
e499b5eef4 Add __sync_bool_compare_and_swap_4 for targets which don't have it.
From-SVN: r169502
2011-02-01 20:15:13 +00:00
Ian Lance Taylor
ca7174cf5c re PR go/47515 (Issues porting libgo to IRIX 6.5)
PR go/47515
runtime: If no MAP_ANON, use /dev/zero.

From-SVN: r169388
2011-01-29 07:16:20 +00:00
Ian Lance Taylor
47ba04ab54 Avoid crash when M structure free just before thread exit.
From-SVN: r169121
2011-01-22 02:59:24 +00:00
Ian Lance Taylor
039868965d libgo: Adjust deadlock avoidance.
From-SVN: r169120
2011-01-22 02:15:01 +00:00
Ian Lance Taylor
7e33c4aadc Avoid deadlock creating new thread.
From-SVN: r169114
2011-01-22 00:12:00 +00:00
Ian Lance Taylor
cf606aeb06 Avoid deadlock when finalizer lock is held during gc.
From-SVN: r169112
2011-01-21 23:33:52 +00:00
Ian Lance Taylor
ff5f50c52c Remove the types float and complex.
Update to current version of Go library.

Update testsuite for removed types.

	* go-lang.c (go_langhook_init): Omit float_type_size when calling
	go_create_gogo.
	* go-c.h: Update declaration of go_create_gogo.

From-SVN: r169098
2011-01-21 18:19:03 +00:00
Ian Lance Taylor
2e7e3e1de1 Add file missed in previous commit.
From-SVN: r168684
2011-01-11 23:26:03 +00:00
Ian Lance Taylor
9a00604e53 re PR go/46959 (M68K Not Supported by Go)
PR go/46959
	PR go/46960
	PR go/46961
	PR go/46962
	PR go/46963
	PR go/46964
Use __builtin_unwind_init rather than the SAVE_REGS hack.

From-SVN: r168500
2011-01-05 00:24:15 +00:00
Ian Lance Taylor
a3bc69c529 re PR go/46958 (ARM Go Does Not Compile (__builtin_return_address))
PR go/46958
	PR go/46965
Call __builtin_return_address with 0 rather than 1.

From-SVN: r168495
2011-01-05 00:07:59 +00:00
Ian Lance Taylor
a4ad1c7a08 Rework locking code to split stack much less.
From-SVN: r167973
2010-12-17 06:42:06 +00:00
Ian Lance Taylor
b5343013fe Avoid always splitting the stack when calling append and copy.
From-SVN: r167970
2010-12-17 06:33:41 +00:00
Ian Lance Taylor
646abff51d Better error message if malloc gets a SIGSEGV.
From-SVN: r167785
2010-12-14 05:19:51 +00:00
Ian Lance Taylor
cac7efc966 Release cache while holding thread lock.
Don't bother to hold thread lock while allocating cache.

From-SVN: r167784
2010-12-14 05:16:18 +00:00
Ian Lance Taylor
7a9389330e Add Go frontend, libgo library, and Go testsuite.
gcc/:
	* gcc.c (default_compilers): Add entry for ".go".
	* common.opt: Add -static-libgo as a driver option.
	* doc/install.texi (Configuration): Mention libgo as an option for
	--enable-shared.  Mention go as an option for --enable-languages.
	* doc/invoke.texi (Overall Options): Mention .go as a file name
	suffix.  Mention go as a -x option.
	* doc/frontends.texi (G++ and GCC): Mention Go as a supported
	language.
	* doc/sourcebuild.texi (Top Level): Mention libgo.
	* doc/standards.texi (Standards): Add section on Go language.
	Move references for other languages into their own section.
	* doc/contrib.texi (Contributors): Mention that I contributed the
	Go frontend.
gcc/testsuite/:
	* lib/go.exp: New file.
	* lib/go-dg.exp: New file.
	* lib/go-torture.exp: New file.
	* lib/target-supports.exp (check_compile): Match // Go.

From-SVN: r167407
2010-12-03 04:34:57 +00:00