Commit Graph

3743 Commits

Author SHA1 Message Date
Araq
dcaba49c3f deprecated '#[' comments for future multi-line comment feature 2014-09-28 13:38:26 +02:00
Reimer Behrends
cb6441e73d Use _setjmp()/_longjmp() only on BSD-like systems for now. 2014-09-27 18:05:30 +02:00
Araq
d576fbb39a implemented locking levels; still incomplete 2014-09-27 15:06:06 +02:00
Araq
1088814e56 deepCopy is instantiated when its corresponding type is instantiated 2014-09-26 09:36:09 +02:00
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
Araq
8930ba50b9 'let' within 'parallel' now works 2014-09-22 08:34:05 +02:00
Araq
3866820eee made some tests green 2014-09-21 23:57:54 +02:00
Araq
7916b1f9aa implemented 'guard' annotation 2014-09-21 18:39:00 +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
45accd613b 'nim i' should work again 2014-09-18 09:56:13 +02:00
Araq
02c076f9b4 more robust for nim check 2014-09-17 23:13:38 +02:00
Araq
611d5d7766 improvements for nimfix 2014-09-17 01:45:27 +02:00
Araq
344488fa0d ttypeclasses works again 2014-09-17 01:35:46 +02:00
Araq
297647affe fixes a recently introduced regression 2014-09-16 22:49:10 +02:00
Araq
113a1c450c generic proc type works again 2014-09-14 14:38:11 +02:00
Araq
d330a72a45 fixes documentation generator 2014-09-14 11:34:06 +02:00
Araq
838871b4d9 resolved conflict 2014-09-13 17:59:37 +02:00
Araq
e24996de7c minor changes to manual.txt 2014-09-13 17:53:35 +02:00
Dominik Picheta
d28088f0f5 Fix 'doc' command. 2014-09-13 16:09:54 +01:00
Araq
9d9c3fe121 merged things from devel 2014-09-12 01:37:48 +02:00
Araq
1791ab6385 fixes #665 2014-09-11 19:54:49 +02:00
Araq
c73142d852 fixes #1067 2014-09-11 10:02:45 +02:00
Araq
ff55c487b6 mostly fixes #1339 2014-09-11 09:57:33 +02:00
Araq
46bbae4745 fixes #1366 2014-09-11 09:53:00 +02:00
Araq
dafa8ccaf3 fixes #903, fixess #1513 2014-09-11 01:45:14 +02:00
Araq
b7f8dbbec2 fixes #1511 2014-09-11 00:45:29 +02:00
Araq
e766c7c3cd minor bugfix for void .compileTime procs 2014-09-11 00:36:31 +02:00
Araq
2c99991d16 fixes #1444 2014-09-11 00:34:59 +02:00
Araq
9500780037 renamed URLencode to encodeUrl 2014-09-10 23:25:29 +02:00
Araq
758d8e11d9 Merge branch 'bigbreak' of https://github.com/Araq/Nimrod into bigbreak 2014-09-10 22:56:26 +02:00
Araq
22fb9db845 nimfix improvements 2014-09-10 20:34:33 +02:00
Araq
c5dbcb548f improvements for nimfix 2014-09-10 09:48:18 +02:00
Araq
569fbe8c37 'pretty' command does not exist anymore; improvements for nimfix 2014-09-10 02:19:46 +02:00
Reimer Behrends
f9c46b04a6 Properly handle staticExec() generating large output.
A staticExec() invocation that generated more than the internal
buffer size worth of output blocked because the compiler waited
for the process to terminate before reading the output.
2014-09-10 01:22:20 +02:00
Dominik Picheta
4d2ff282f6 Fix case issues in compiler/docgen. 2014-09-10 00:09:59 +01:00
Araq
490371977e some improvements for nimfix 2014-09-09 21:31:34 +02:00
Araq
c53a27f0dc nimfix supports specialized '.nimfix' modules 2014-09-08 09:18:09 +02:00
Araq
7333237be6 'nimfix' improvements; FdSet is TFdSet again 2014-09-08 08:46:35 +02:00
Araq
a90f73ca4c nimfix can fix obsolete statement comments 2014-09-08 00:58:29 +02:00
Araq
ae53d1ecc8 nimgrep compiles again 2014-09-07 02:52:15 +02:00
Araq
428ee0c022 changed comment handling (breaking change); part 2 2014-09-07 01:47:16 +02:00
Araq
1cdb8022d0 changed comment handling (breaking change) 2014-09-07 00:58:31 +02:00
Araq
7f7b13a45f nimfix handles helloworld 2014-09-06 00:50:53 +02:00
Araq
bd4e229464 Merge branch 'bigbreak' of https://github.com/Araq/Nimrod into bigbreak 2014-09-05 01:17:03 +02:00
Araq
bf557a7cdb added nimfix tool 2014-09-05 01:16:48 +02:00
Zahary Karadjov
7d5e387a48 mostly fixes #1339
The compiler hangs were caused by the interaction of tyError and the instantiation caches.
For procs, the cache wasn't able to find previously compiled proc featuring tyError in the signature.
For types, the unresolved type parameters leading to tyError were not replaced everywhere leading
to endless replaceTypeVarsT recursion for cyclic types.

The fix is still not perfect, because the handling of tyError in other places in the compiler doesn't seem
to be complete and the first test case now results in internal error (still, much better than a hang blocking
your IDE).
2014-09-05 01:02:46 +03:00
Zahary Karadjov
9a3963f51b fix #959
Variable declarations using a type class will be subject to type inference similar to the one
already present in type coercions and the return type inference.
2014-09-04 23:50:00 +03:00
Araq
4c870fc293 fixes recently introduced regression 2014-09-03 22:00:23 +02:00
Araq
e093f45756 fixes #1511 2014-09-03 19:54:20 +02:00
Araq
201a08e9a5 fixes #903, fixes #1513 2014-09-03 19:45:04 +02:00