Commit graph

93 commits

Author SHA1 Message Date
Reimer Behrends
f99c40f61b Improve setjmp()/longjmp() performance.
Exception handling for the C backend used setjmp()/longjmp()
unconditionally. However, on POSIX systems, these functions save and
restore the signal mask, adding considerable overhead to exception
handling, even where no exceptions are involved. The compiler and
library now try to use either _setjmp()/_longjmp() or
sigsetjmp()/siglongjmp() where possible, marked by the defines
"nimRawSetjmp" and "nimSigSetjmp", respectively. The define
"nimStdSetjmp" can be used to revert to setjmp()/longjmp() instead.
2014-09-25 23:29:02 +02:00
Reimer Behrends
80356f1cc7 Avoid unnecessary #include triggered by importc vars.
When a C variable or macro is imported via an {.importc.} var or
let statement, but no definition is needed and the variable does
not have an initializer part, then there is also no need to generate
an #include for the associated header until and unless the variable
is actually used. The header is already generated upon use, but
unnecessarily also when the variable is defined.

This is an issue with the posix module in particular, where a lot
of unnecessary header files are being included because relevant
constants are defined via importc vars, and those header files
may not even be available on a given system.

This patch omits the generation of the #include directive for those
definitions where they aren't needed.
2014-09-19 03:34:00 +02:00
Araq
c73142d852 fixes #1067 2014-09-11 10:02:45 +02:00
Araq
2728bbccc4 fixes newly introduced bugs 2014-08-14 02:42:26 +02:00
Araq
f3d530e482 fixes #1434 2014-08-14 00:02:24 +02:00
Araq
bd705a517f compiler prepared for the new comment handling 2014-04-30 00:53:44 +02:00
Araq
325dd44e81 gensym'ed symbols work with lambda-lifting; closures produce objects instead of tuples for easier debugging 2014-04-03 22:35:10 +02:00
Zahary Karadjov
862c0ef83d split the inline and closure iterators into different symbol kinds for easier discrimination between them 2014-03-06 21:57:35 +02:00
Audun Wilhelmsen
739b4f214b Fixed #688 : return in except statments. Also fixed return in finally statements. 2014-02-23 00:23:06 +01:00
Audun Wilhelmsen
8cccaebc2e Fixed issue 391 (nested break in except-stmts) 2014-02-16 02:08:36 +01:00
Araq
b731e6ef1c case consistency: cs:partial bootstraps on windows 2013-12-29 03:19:10 +01:00
Araq
438703f59e case consistency: next steps 2013-12-29 01:13:51 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01:00
Araq
b76729df1c Merge branch 'master' of https://github.com/Araq/Nimrod into vm2
Conflicts:
	web/news.txt
2013-12-23 01:23:16 +01:00
Araq
132b6b3efe implemented 'injectStmt'; more debug support 2013-12-16 22:26:17 +01:00
Araq
6ea538cec3 computed goto now works; some progress on the new VM 2013-10-25 13:30:34 +02:00
Araq
90d25919f3 implemented top level asm statements 2013-10-07 06:38:04 +02:00
Araq
f1e789bfc2 fixes #576 2013-09-18 02:58:18 +02:00
Araq
891f871ba7 better support for GNU's assembler 2013-09-03 23:44:31 +02:00
Araq
a8c8a85135 Merge branch 'master' of github.com:Araq/Nimrod 2013-08-22 19:28:58 +02:00
Araq
6f1fc1b5ba fixed and documented computedGoto pragma 2013-08-22 08:38:47 +02:00
Zahary Karadjov
b01d9b6181 work-in-progress for compiling generics in their owner module 2013-08-19 01:45:16 +03:00
Araq
d53f313599 implemented computed goto support 2013-08-13 11:21:02 +02:00
Araq
9589acd00e fixes #532 2013-08-01 00:16:29 +02:00
Araq
dfe195a4a1 fixes #501 2013-07-01 20:25:38 +02:00
Araq
0991706d55 fixed: typo 2013-05-03 23:56:49 +02:00
Araq
fa0a327dd6 completed expr/stmt unification 2013-05-03 23:51:43 +02:00
Araq
1dd01e5891 revert new scope for 'if' 2013-05-02 00:36:06 +02:00
Araq
427f84b4ec tester should work again; documented (;) 2013-04-30 23:54:02 +02:00
Araq
2afadc5c9c first steps to the expr/stmt unification 2013-04-30 02:38:49 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
a64d4dc35c documented object constrs; endb works again 2013-03-09 20:43:56 +01:00
Araq
5d119f61d1 preparations for a generational GC 2013-02-16 22:53:35 +01:00
Araq
4ee9816a78 code cleanup for mark&sweep GC 2013-02-07 16:09:46 +01:00
Araq
ab6f793408 first version of a simple mark&sweep GC; activate with --gc:markAndSweep 2013-02-07 01:57:10 +01:00
Zahary Karadjov
81a3585872 merged upstream master 2013-01-27 23:41:45 +02:00
Araq
3be576222a fixes #277; documentation improvements 2012-12-17 19:30:43 +01:00
Araq
92e10e4b18 implemented 'import except' 2012-11-28 23:54:23 +01:00
Zahary Karadjov
a42545ea3e disables the compile-time rope formatting during bootstrapping 2012-11-28 01:15:14 +02:00
Zahary Karadjov
e817d54369 first batch of rope code converted to rfmt
The results so far are inconclusive:
The rope cache tries have been reduced by more than 125K (nearly 20%),
but the bootstrap time seems to be ever slightly increasing (0.01s).
2012-11-28 01:15:13 +02:00
Araq
7a2c11d3cf next steps for first class iterators 2012-11-15 22:54:06 +01:00
Araq
1fada12a5f improvements for first class iterators 2012-11-15 08:45:16 +01:00
Araq
814fcb2639 bugfix: stack traces; first class iterators almost working 2012-11-15 01:27:25 +01:00
Zahary Karadjov
c27637747a bugfix: closures as default param values 2012-10-06 14:51:46 +03:00
Zahary Karadjov
badb6c0f66 improved support for typedesc values
* can be stored in constants and variables (including in containers like sequences)
* can be passed to and returned from macros
2012-09-25 02:03:15 +03:00
Araq
214c7a2ebd implemented a stack trace profiler 2012-09-15 00:21:10 +02:00
Araq
64c638a9dc first steps for overloading support of passing blocks; bugfix: test results of 'compile' are not overwritten 2012-09-11 08:09:34 +02:00
Araq
d3d9d32c35 first steps to deprecate 'nil' statement 2012-09-09 01:08:00 +02:00
Araq
0171566c98 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +02:00