Commit Graph

13715 Commits

Author SHA1 Message Date
LemonBoy
4808ef72db [WIP] Early evaluation of mIs (#8723)
* Early evaluation of mIs

The `evalIs` implementation was just a broken copy of `isOpImpl` so
let's just avoid it alltogether: `mIs` nodes are either resolved during
the semantic phase or bust.

* Remove dead code and tidy it up
2018-10-14 08:53:41 +02:00
Miran
9f8b93641e Merge tests into a larger file (part 3 of ∞: generics) (#9347)
* merge generics issues tests
* merge tgeneric
* merge test with local imports
* merge tcan tests
* merge matcher tests
* more issue tests merged
* one more tcan test
* merge various small tests into one file
* add a test for #3717
2018-10-14 08:50:39 +02:00
Vindaar
afd5abdfc2 add issue #5707 as test case (#9361) 2018-10-14 08:44:57 +02:00
Josh Goebel
38454c6951 Fix type in docs (#9362) 2018-10-14 08:44:36 +02:00
Timothee Cour
eb946f37a7 fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
Araq
8232bd04f9 sizeof(UncheckedArray) should be invalid; fixed the formating of sizealignoffsetimpl.nim to make it bearable 2018-10-14 00:58:43 +02:00
Timothee Cour
745f1642d6 implement sizeof and alignof operator (manually squashed #5664) (#9356) 2018-10-14 00:52:28 +02:00
Timothee Cour
3e2d8c1c53 correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 (#9332)
* fixes #8518; refs #9301; correctly render AST in doAssert condition
2018-10-14 00:17:10 +02:00
LemonBoy
166720bdf9 Make sure the annotation for || is avail. at CT (#9354)
Closes #9353
2018-10-14 00:00:21 +02:00
Miran
d570dea480 put several issues in tests (#9352)
* put several issues in tests

* remove wrong test
2018-10-13 20:17:59 +02:00
Federico Ceratto
e435dbd35e Update makefile and buildsh templates for riscv64 (#9351) 2018-10-13 17:18:06 +02:00
Timothee Cour
e4c76f8a2a add strutils.stripLineEnd (#9346) 2018-10-13 14:59:56 +02:00
Miran
3c9fcc4c30 Merge tests into a larger file (part 2 of ∞) (#9335)
* merge controlflow tests

* merge distinct tests

* merge enum tests

* merge fields tests

* merge implicit tests

* merge iter issues tests
2018-10-13 14:58:31 +02:00
Timothee Cour
ef820769a4 deprecate accumulateResult => sequtils.toSeq (#8666) 2018-10-13 09:23:33 +02:00
Tomohiro
eb4272ba1c manual: Fix links to Parallel & Spawn (#9342) 2018-10-13 08:55:34 +02:00
Vindaar
9cdd9be5a5 fixes #8916 by fixing typeinfo and marshal. (#9341)
* fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string
2018-10-13 08:47:58 +02:00
Oscar Nihlgård
c495e97ec4 Build codeowners.rst (#9337) 2018-10-13 08:44:39 +02:00
Timothee Cour
d5fe8e1e0c doc: tests/testament/specs.nim => testament/specs.nim (#9338) 2018-10-13 08:41:47 +02:00
Andreas Rumpf
1475697fbf make tests green again 2018-10-13 08:39:56 +02:00
Andreas Rumpf
33cdae8c32 dfa.nim: clarify exception handling 2018-10-13 08:28:56 +02:00
Andreas Rumpf
fcca59e415 destructors: optimize more assignments into moves; also fixes #9294 2018-10-12 20:36:42 +02:00
Andreas Rumpf
2fecf4f36a compiler: cleanup dfa.nim 2018-10-12 19:56:51 +02:00
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