Commit Graph

14787 Commits

Author SHA1 Message Date
LemonBoy
76df77f912 Fix codegen problem with strict C++ compilers (#10639)
Since tyCString is convertible to a tyPointer we must be extra careful
to emit a cast to (void*) in order to appease clang++.

Reported by masnagam on the Nim forum.
2019-02-13 23:30:14 +01:00
alaviss
d64e218abd nimsuggest: only log when logging is enabled (#10646)
fixes #6199
2019-02-13 23:30:14 +01:00
Arne Döring
dfa3099929 deprecated list comprehension (#10636) 2019-02-13 23:30:14 +01:00
Juan Carlos
f5e55162ba Lowercase ext before querying the mimedb on mimetypes module, change isMainModule to runnableExamples (#10644) 2019-02-13 23:30:14 +01:00
Timothee Cour
cf87687c40 travis:upgrade to xenial (trusty end of life is april 2019) (#10643) 2019-02-13 23:30:14 +01:00
narimiran
e26a0c4f1a better docs: times 2019-02-13 23:30:14 +01:00
Andreas Rumpf
36f6f035ff attempt to make nightlies work again 2019-02-13 23:30:14 +01:00
Juan Carlos
d3a74ea515 Update mimetypes (#10621)
* Update mimetypes const mimes, Fix for Nim mimetypes to recognize Nim and Nimble
2019-02-13 23:30:14 +01:00
narimiran
572739a4f3 macros: add links in the docs [ci skip] 2019-02-13 23:30:14 +01:00
Jjp137
7bb94abc31 better docs: random (#10546) 2019-02-13 23:30:14 +01:00
LemonBoy
0ebef1764d Propagate tfGcSafe flag to generic instantiations (#10620)
Fixes a nasty endless loop in the generic instantiation phase.
2019-02-13 23:30:14 +01:00
Timothee Cour
942495611b revive #10228 (fix #9880) (#10610)
* Make index out of bounds more useful by including the 'bounds'.
* fixes #9880 index out of bounds (remaining cases); revives #10228
* change err msg to: `index 3 not in 0 .. 1`
2019-02-13 23:30:14 +01:00
Federico Ceratto
8f05b34125 Add note on channel usage with spawn (#10627) [ci skip] 2019-02-13 23:30:14 +01:00
Andreas Rumpf
02b5fc940d fixes #10547 2019-02-13 23:30:14 +01:00
Emery Hemingway
d1e3f58afc Use standard XML escaping 2019-02-13 23:30:14 +01:00
Dean Thompson
f785286743 Expanded the typeinfo module's doc comment to warn that rtti will evolve and suggest alternative approaches. (#10596) 2019-02-13 23:30:14 +01:00
Juan Carlos
dcbab1031a Fixes #10357 (#10618) 2019-02-13 23:30:14 +01:00
Brent Pedersen
fe26328a19 sets: avoid calling countBits32 for 0 (#10619)
this speeds up the system.sets time from ~0.2 to ~0.06
in release mode. This is still slower than intsets and
tables (which both are ~0.01).

This assumes that most sets will be sparse.

fixes #10617
2019-02-13 23:30:14 +01:00
Oscar Nihlgård
779c51c29b Implement json.% for tables and options 2019-02-13 23:30:14 +01:00
LemonBoy
d83520ec8f Do not walk into type sub-nodes for cast/conv expr (#10616) 2019-02-13 23:30:14 +01:00
LemonBoy
eb30c78694 Misc macro things (#10612)
* Misc cleanup in macro code

Generate error messages using `error` instead of `assert`.

Fixes #10574

* Fix crash with hasCustomPragma on quoted fields

Use the `$` operator instead of reaching for the `strVal` field directly
2019-02-13 23:30:14 +01:00
Kobi
dd422bfb0f fix replacef typo in example 2019-02-13 23:30:14 +01:00
Andreas Rumpf
f55d094cf2 fixes #6955 2019-02-13 23:30:14 +01:00
Andreas Rumpf
49a5213713 fixes #10606 2019-02-13 23:30:14 +01:00
Andreas Rumpf
354e3f2a40 disable flaky coroutines test 2019-02-13 23:30:14 +01:00
Andreas Rumpf
614b731caf new AppVeyor configuration that should test the compiler against sele… (#10549) 2019-02-13 23:30:14 +01:00
Arne Döring
43a0dd42bc Print missing case labels (#10600) 2019-02-13 23:30:14 +01:00
LemonBoy
048a7a6539 Fix compilation w/ Atomic[T] types (#10607) 2019-02-13 23:30:14 +01:00
cooldome
d70dd6f3cb Move cpp exception handler from system to excpt next to the signal handler (#9435) 2019-02-13 23:30:14 +01:00
b3liever
695206a00c Add summation algorithms (#9284) 2019-02-13 23:30:14 +01:00
Andreas Rumpf
04cdf99448 koch and testament improvement; make testing command easier to get right 2019-02-13 23:30:14 +01:00
Andreas Rumpf
ec68d89e42 make it work with latest system.nim 2019-02-08 17:41:34 +01:00
Andreas Rumpf
0841c64a32 Merge branch 'devel' into araq-quirky-exceptions 2019-02-08 17:18:17 +01:00
Andreas Rumpf
444f2231c9 make tests green again 2019-02-08 16:54:12 +01:00
Andreas Rumpf
6fc90ab1c2 macros.nim: minor comment change 2019-02-08 16:09:22 +01:00
LemonBoy
aa6e40abe6 Fix wrong result in tuple assignment (#9340)
Fixes #9177
2019-02-08 12:24:03 +01:00
Araq
8bc7c50c86 DOM module: re-add more missing stuff 2019-02-08 12:18:42 +01:00
Araq
4ed7507cb2 error messages can have spaces, don't be dyslexic 2019-02-08 12:18:42 +01:00
LemonBoy
710cfcecd3 Rework exception handling in the VM (#10544)
* Rework exception handling in the VM

Make the safepoint handling more precise and less forgiving.
The new code is clearer and more commented.
Perform cleanup on `return`.
The no-exception-thrown case in a try block should be slightly faster
since we don't parse the whole set of exceptions every time.
More tests.

* Fix silly error that broke a few tests

* Testament doesn't like files having the same name

* Remove test case that failed compilation to js
2019-02-08 11:57:47 +01:00
LemonBoy
631a8ab57f Fix edge case in type hashing (#10601) [backport]
Empty types introduced by a template produced the same hash of the
"clean" type sharing the same name.
2019-02-08 09:56:32 +01:00
Araq
4572568045 fixes #10602 2019-02-08 09:52:29 +01:00
Matt Haggard
fd62d24c4c Add non-interactive installer flag (-y) to finish.nim (#10603) [backport] 2019-02-08 09:39:58 +01:00
LemonBoy
6b88ce3384 Stop useless suggestion of unsafeAddr (#10598)
Fixes #10594
2019-02-08 08:59:38 +01:00
Araq
c7c495f08a testament: use bin/nim.exe as the default 2019-02-07 20:35:23 +01:00
alaviss
2fdf816332 compiler/[msgs, suggest]: improve highlighter accuracy (#10496)
Previously the compiler would generate suggestions based on the symbol
identifier length, but that might not reflect the actual representation
of it within the actual source code.

This commit implements a simple source scanner for the suggest module to
address the problem outlined above.

Fixes nim-lang/nimsuggest#24
2019-02-07 17:08:15 +01:00
LemonBoy
29fbf111a8 Fix codegen when debugger is enabled (#10595)
Decrement the frame length before closing the parent scope.

Fixes #10589
2019-02-07 17:07:35 +01:00
LemonBoy
f23b0a7dc8 Fix handling of reraise in effect tracking (#10582)
This is the MVP in order not to get a completely useless error message
from the compiler.

Fixes #10579
2019-02-07 17:07:03 +01:00
Araq
c95616f6ee fixes #10586 2019-02-07 16:13:03 +01:00
narimiran
27364ece14 mention correct usage of export in the manual, fixes #6227 [ci skip] 2019-02-07 16:10:48 +01:00
Araq
84d10f7d8a fixes #10585 2019-02-07 15:04:05 +01:00