Andreas Rumpf
dcc3ac74f4
don't crash when rendering wrong nkInfix nodes
2018-10-12 19:22:39 +02:00
c-blake
1b3725e395
Add toOpenArray[T](ptr UncheckedArray[T]) for clarity. ( #9316 )
...
* Add `toOpenArray[T](ptr UncheckedArray[T])` for clarity. `ptr array[0,T]`
for some unchecked type already works but A) `UncheckedArray` seems to be
the intended future way for this kind of access, and B) essentially all use
cases will have a `ptr` for that kind of array source and this call signature
lets callers drop the trailing `[]` corresponding to that `ptr` deref.
This PR relates to issue https://github.com/nim-lang/Nim/issues/9001 .
* Add a test for toOpenArray() for UncheckedArray[T]s.
2018-10-12 17:40:07 +02:00
eqperes
14925ee8b6
Proposed solution for issue #8919 ( #9280 )
...
* Proposed solution for issue #8919
* count sub/subs must be non-empty
2018-10-12 17:28:21 +02:00
Jacek Sieka
97738a4f28
Testament pre parallel ( #9137 )
...
* testament: move to root dir (it's not a test)
* osproc: fix process index passed to afterRunEvent for parallel runs
it was passing the index of the process, not index of all commands
* testament: complete file move
2018-10-12 17:27:47 +02:00
Miran
c492a7fd83
complete removal of web folder, fixes #9304 ( #9310 )
...
* complete removal of web folder, fixes #9304
* remove `buildJS`
2018-10-12 17:27:04 +02:00
Miran
7f18d7cbc1
Merge tests into a larger file (part 1 of ∞) ( #9318 )
...
* merge actiontable tests
* merge arithm tests
* merge array tests
* merge assign tests
* merge bind tests
* merge casestmt tests
* merge closure tests
* merge cnt seq tests
* merge collections tests
* merge concept issues tests
* merge concept tests
* fix failing tests
* smaller outputs
Use `doAssert` where possible.
* fix wrong output
* split `tcomputedgoto`
* revert merging concepts
* fix failing test
2018-10-12 17:02:46 +02:00
Tomohiro
d2b04a8bc7
manual: Remove stmt or expr template related text from manual ( #9321 )
2018-10-12 09:00:27 +02:00
LemonBoy
71636059e9
Avoid memory allocation during dynlib loading ( #9320 )
...
By using `write` instead of `rawWrite` we'd end up asking the compiler
to generate the GC dynlib _while_ we were already generating another
dynlib!
Fixes #9123
2018-10-12 08:56:14 +02:00
LemonBoy
fab4d38411
string to string conversion keeps the dest type ( #9323 )
...
Fixes #9322
2018-10-12 08:50:28 +02:00
cooldome
9b002e0d4f
Align to the actual experience ( #9324 )
...
* Align to the actual experience
* add exception handling
2018-10-12 08:49:33 +02:00
Konstantin Molchanov
fde4a086c5
8684 add shortcut sort procs ( #9174 )
...
* Stdlib: Algorithm: Add shortcut versions of sort, sorted, and isSorted procs.
* Add tests for sort, sorted, and isSorted procs from algorithm module.
* Merge sort tests into tsortcall.nim, remove tsort.nim.
* Stdlib: Algorithm: Add shortcut versions of sort, sorted, and isSorted procs.
* Add tests for sort, sorted, and isSorted procs from algorithm module.
* Merge sort tests into tsortcall.nim, remove tsort.nim.
2018-10-11 22:51:23 +02:00
Ștefan Talpalaru
10f5f67767
gogc: GCC-8.2.0 compatibility and other improvements ( #9211 )
...
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
2018-10-11 22:15:17 +02:00
Araq
d48e964950
fixes #9281
2018-10-11 19:52:48 +02:00
Araq
8ab6fa1be2
fixes #9306
2018-10-11 16:15:35 +02:00
Andrea Ferretti
160f8599c6
Clarify that term rewriting macros are applied recursively ( #9305 )
...
Fixes https://github.com/nim-lang/Nim/issues/9288 fixes https://github.com/nim-lang/Nim/issues/8376 and fixes https://github.com/nim-lang/Nim/issues/2901
2018-10-11 15:59:14 +02:00
Araq
26a9ba71c8
codeowners: try to make github's RST parser happy
2018-10-11 13:52:44 +02:00
Araq
78f9c9a2cd
update contributing.rst and added codeowners.rst
2018-10-11 13:45:37 +02:00
eqperes
00c4aba828
compile date and compile time tz written in doc ( #9283 )
2018-10-11 12:15:15 +02:00
Solitude
027a11d7c8
Add procs to retrieve project name, directory and full path to nimscript ( #9274 )
2018-10-11 09:56:12 +02:00
cooldome
7a5b614edc
fixes #9297 ( #9298 )
...
* fixes #9297
* improve spacing
2018-10-11 09:54:50 +02:00
Timothee Cour
a58c982a49
test case for #9180 and re-enables the disabled tcompilerapi test ( #9181 )
...
* add findNimStdLibCompileTime and un-disable tcompilerapi test; add test case for #9180
* address comments
2018-10-11 09:44:35 +02:00
xzfc
8fc7cecfa2
compiler: show name of instantiating context in error traces ( #6763 ) ( #9207 )
2018-10-11 09:34:56 +02:00
Timothee Cour
da4215af6a
make contributing.rst more up to date; reference it in readme.md to make it more discoverable ( #9302 )
2018-10-11 08:55:15 +02:00
Timothee Cour
6d910dedf0
rm web/website.ini ( #9290 )
2018-10-11 08:41:44 +02:00
Oscar Nihlgård
eade49d7a7
Fix OrderedSet.excl ( #9287 )
2018-10-11 08:40:09 +02:00
Timothee Cour
0aac5c9725
fix #9295 ( #9299 )
2018-10-11 08:36:36 +02:00
LemonBoy
7775b7efd1
Fix wrong heuristic in codegen ( #9293 )
...
A bare return may trigger the insertion of a genericReset.
Fixes #9286
2018-10-11 08:36:05 +02:00
xzfc
8ed3dac1dc
Fix tests on NixOS ( #9209 ) ( #9285 )
...
* Replace `/bin/sleep` with just `sleep`, i.e. use environment variable
`$PATH` to locate binary.
* Replace `/usr/share/zoneinfo` with `$TZDIR` when it is defined,
fallback to hardcoded path otherwise. This is the same behavior that
Glibc2 normally have, see man 3 tzset.
2018-10-10 22:47:08 +02:00
LemonBoy
0ead36dae6
Unchecked arrays now have their own type ( #9267 )
2018-10-10 21:03:18 +02:00
Andreas Rumpf
0803b532f4
fixes #9263
2018-10-10 21:00:54 +02:00
eqperes
6620b5dc8d
Documentation improved for math module ( #9266 )
2018-10-10 14:25:39 +02:00
manterolat
16a941a642
Fixes #9154 ( #9193 )
2018-10-10 13:17:28 +02:00
Miran
462bff48b2
Iter test: closes #3819 ( #9272 )
2018-10-10 10:21:38 +02:00
Timothee Cour
77f836b403
fix #9264 regression ( #9265 )
2018-10-09 23:48:27 +02:00
LemonBoy
32d5b80938
Fix macro expansion in expandMacros ( #8998 )
...
* Fix macro expansion in expandMacros
Running a semanticized node trough the semantic pass was a bad idea.
Fixes #7723
* Simpler smaller implementation
2018-10-09 23:24:54 +02:00
Miran
98a8868cb4
better docs for tables module ( #9221 )
...
* better docs for `tables` module
* lower case for the first sentence in docs
2018-10-09 22:39:51 +02:00
Timothee Cour
63c00d7be9
fix tests/generics/t8694.nim: runnableExamples were not run because of #9216 ( #9262 )
2018-10-09 21:51:51 +02:00
Miran
47828efe32
better docs for algorithm module ( #9192 )
...
* better docs for `algorithm` module
* address the comments
* small first letter in the first sentence
* last argument is reverted to be `int`
* `rotateLeft` keeps `discardable` pragma, as discussed on IRC
* another small correction
2018-10-09 21:36:51 +02:00
Miran
27e4825c62
[cleanup] remove xmldom and xmldomparser ( #9234 )
2018-10-09 20:58:56 +02:00
Kaushal Modi
c6dfbfc2cf
Do not encode the anchors in docs (id attr in a tags) ( #9261 )
...
Update the tests too.
Fixes https://github.com/nim-lang/Nim/issues/9232 .
2018-10-09 20:48:00 +02:00
hlaaf
c68ea019f9
Separate high/low/len docs for each overload ( #8816 )
2018-10-09 20:15:55 +02:00
Steve Kellock
173e8c4913
fixes unexpected transforming of runnableExamples ( #9158 )
2018-10-09 20:14:54 +02:00
LemonBoy
33458894da
Fix overload resolution for pragmas evaluation ( #8902 )
...
Fixes #6448
Fixes #4384
2018-10-09 19:58:23 +02:00
LemonBoy
ee14ace5d3
Field checks for everybody ( #8957 )
...
* Field checks for JS backend
* Clean nkCall nodes with no arguments
Generating a nkEmpty in place of no arguments makes no sense form the
AST point of view and also trips up the VM codegen.
* Field checks for VM backend
* Test case for #6612
This patchset fixes #6612
* Add test case for LHS double evaluation
* Prevent LHS double-eval for JS backend
* Prevent double evaluation in VM backend
2018-10-09 19:54:12 +02:00
LemonBoy
a3fb0a769c
Try/Catch support for native JS exceptions ( #8955 )
...
* Try/Catch support for native JS exceptions
* Better tests
2018-10-09 19:51:29 +02:00
LemonBoy
f98a3056c6
Fix transformation of yield in inline context ( #9135 )
...
When the loop variables are part of the envP block it is not safe to use
a nkFastAsgn.
Fixes #2656
2018-10-09 19:43:31 +02:00
Dominik Picheta
21ecf64d24
Fixes #8994 . FutureStream read procedure data loss no longer occurs. ( #9183 )
...
* Fixes #8994 . FutureStream read procedure data loss no longer occurs.
* Optimises the fix for #8994 .
2018-10-09 19:39:12 +02:00
Arne Döring
5076fda2e2
fix for #9082 ( #9089 )
2018-10-09 19:37:53 +02:00
Yasuhiro Horimoto
fe19670c52
Fixes #8841 ( #9101 )
...
Modify comments for readChar and peekChar to the same as the comment for them in the source code.
2018-10-09 19:30:02 +02:00
Timothee Cour
a98b1a7764
fix #8341 : add lastPathPart ( #9116 )
2018-10-09 19:27:31 +02:00