Commit Graph

55 Commits

Author SHA1 Message Date
Reimer Behrends
250375bdd2 Remove spurious unsigned operations from system/threads.nim.
These operations were included before the unsigned module was
incorporated directly into system.nim and subsequently caused
compilation errors with --gc:go due to duplicate definitions.
2015-09-08 19:12:01 +02:00
Reimer Behrends
639b5e0069 Properly register threads with the Boehm GC.
In order to be able to scan thread stacks, the Boehm GC needs to know
about newly created threads. We establish the end of the stack by using
GC_call_with_stack_base (this works properly also with the dual-stack
Itanium architecture) and then GC_register_my_thread() to register a
thrad and GC_unregister_my_thread() to unregister it again.

This patch also includes a modification for the refc and markandsweep
collectors to set the stack bottom for thread stacks correctly even if
an optimizer aggressively inlines and optimizes procedures (this is
already being done for the stack of the main thread).

Finally, we use the {.noconv.} pragma for the Boehm GC, as the Boehm
API uses no specific calling convention.
2015-09-08 19:01:06 +02:00
Reimer Behrends
4baaea5ad5 Properly initialize the Boehm GC on all platforms. 2015-09-06 01:48:31 +02:00
Araq
a1caef474b proper distinction between --gc:none and --os:standalone 2015-06-29 02:48:33 +02:00
Stefan Talpalaru
8624654c57 TMemRegion -> MemRegion 2015-06-15 09:18:44 +02:00
Stefan Talpalaru
fe0b6d74f5 cleanup 2015-06-15 08:56:07 +02:00
Stefan Talpalaru
bdac85f2cf Merge branch 'devel' into gogc 2015-06-15 08:44:02 +02:00
Stefan Talpalaru
657d6f9de2 finalizer support 2015-06-15 08:36:55 +02:00
pdw
2ca90a20a1 lib/system/g-w - Dropped 'T' from types 2015-06-04 13:18:37 +02:00
Stefan Talpalaru
50e96ad939 the Go GC - initial implementation 2015-05-31 19:07:44 +02:00
Sergey Avseyev
1001fd2166 Fix Boehm GC on linux
Motivation
----------
Some linuxes (like Fedora) actually multiarch. And it means that
libgc.so.1 not always installed into /usr/lib. It is better to entrust
this job to ld and system configuration for it.

Modification
------------
Use relative path for Boehm GC on 'other' OS (and linux in particular)

Result
------
It is possible now to build nim with --gc:boehm on linux
2015-05-26 08:40:51 +03:00
def
22b4e4c2f2 Use more Natural and Positive numbers in proc parameters
- Didn't go through all modules, only the main ones I thought of
- Building the compiler and tests still work
2015-04-06 02:24:17 +02:00
Araq
ee57bb3e3e fixes --gc:none regression; made some tests green 2015-03-10 12:32:47 +01:00
def
2399f3b03d Some GC renames to get rid of deprecation warnings 2015-01-06 01:28:43 +01:00
Dominik Picheta
082bcb070f Fix --gc:none with --cs:partial. 2014-09-19 15:17:34 +01:00
Araq
4800acf6ab Merge branch 'devel' of https://github.com/Araq/Nimrod into bigbreak 2014-09-19 01:55:22 +02:00
Reimer Behrends
b11493585c Various fixes to how the Boehm GC's interface.
The Boehm GC interface did not define the getXXXSharedMem() functions
that were needed for compilation with --threads:on. It also used
`ppointer` instead of `PPointer`, so it failed to compile with
--cs:partial.
2014-09-18 18:46:23 +02:00
Araq
6d40288bb8 renamed Byte to byte 2014-08-29 00:56:34 +02:00
Araq
dbf9117c56 the big renamefest: first steps 2014-08-22 23:54:26 +02:00
Araq
42a8ab34f1 preparations for easier debugging 2014-04-07 23:28:29 +02:00
Araq
15859d94ec compiler warns when you use GC'ed memory and '--gc:none' 2014-01-19 20:24:44 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
132b6b3efe implemented 'injectStmt'; more debug support 2013-12-16 22:26:17 +01:00
Araq
f73cec7f01 GC: even more stress testing 2013-10-31 22:32:27 +01:00
Araq
1a792d46d0 first version of the debug GC; doesn't work yet 2013-10-01 08:44:09 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
5d119f61d1 preparations for a generational GC 2013-02-16 22:53:35 +01:00
Araq
ab6f793408 first version of a simple mark&sweep GC; activate with --gc:markAndSweep 2013-02-07 01:57:10 +01:00
Araq
65fdd641a9 revert to old GC; use --gc:v2 to activate the new GC 2013-01-31 17:24:55 +01:00
Zahary Karadjov
86bf97a730 cleaned up some debugging code 2013-01-20 21:22:07 +02:00
Zahary Karadjov
083d4f4708 fixes the recently discovered GC memory leaks
This revision is intended as comparison point between the old and the new GC
The used GC can be switched in mmdisp and various statistics will be gathered during
execution (these will be removed/disabled in later revisions)
2012-12-20 15:51:21 +02:00
Zahary Karadjov
c67520a7c5 temporary debugging code for the memory leak investigation 2012-11-28 01:15:14 +02:00
Araq
142e849b91 implemented support for the AVR CPU and standalone OS 2012-03-31 01:03:14 +02:00
Araq
74498d616e fixes tests for 'system.shallow' 2012-02-10 00:50:19 +01:00
Araq
8d19a93f1a pragma on/off improvements; endb rewritten 2012-01-28 23:22:44 +01:00
Araq
42dad650e0 bugfix: boehm GC improvements 2012-01-16 00:04:56 +01:00
Araq
4de5b82fdc better inferfacing to boehm GC 2012-01-15 23:47:49 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
c8d270268a bugfixes for .rod files and visual C++ 2011-12-03 17:21:35 +01:00
Araq
0b4d5e45b9 tester checks exitcode; osproc additions; DLL fixes; taint mode fixes 2011-11-07 23:25:34 +01:00
Araq
81a917390b shared untraced heap; bugfix: mem corruptions in message passing code 2011-07-18 23:59:39 +02:00
Araq
42e6130b2c first steps to explicit channels for thread communication; added mainThreadId 2011-07-16 18:34:18 +02:00
Araq
99bcc233cd bugfix: 'set' overloadable; further steps for multi threading support 2011-07-08 01:29:15 +02:00
Araq
e25384db89 improvements to get code size down for programs that don't use GC 2011-06-26 20:17:19 +02:00
Araq
c70fa87471 further progress for multi-threading 2011-05-19 23:23:10 +02:00
Araq
9207492bb9 lexer, parser cleanup; boehm gc for mac os x 2011-05-17 21:14:30 +02:00
Araq
196c0dd5d3 mmdisp [] instead of ^ 2011-05-14 21:41:45 +02:00
Araq
73c3551766 gc tweaking to gain a few percent of performance 2011-05-07 22:13:24 +02:00
Araq
627e192f64 basic continue after error works; interactive mode more useful 2011-02-13 03:39:11 +01:00
Andreas Rumpf
8098e2a421 inlining of the write barrier for dlls 2010-08-08 22:45:21 +02:00