Commit Graph

17391 Commits

Author SHA1 Message Date
Timothee Cour
7ded490ec0 cleanup tests/test_nimscript.nims (#14686) 2020-06-16 14:38:30 -07:00
Dylan Modesitt
e35b21e553 Close#5586 (#14682)
* re-enable macos and bsd on some coro tests

* re-enable macos and bsd on some coro tests
2020-06-16 16:24:26 +02:00
Euan
1bc2e19498 Set cincludes and clibdir for FreeBSD, OpenBSD and NetBSD. (#14680) 2020-06-16 11:44:28 +02:00
Timothee Cour
dfe51d10a1 addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342)
* make addQuitProc great again

* fix bugs in testament

* fix test

* change 2016 => 2020

* addQuitProc => addExitProc + locks

* move to std/exitprocs
2020-06-16 11:43:48 +02:00
Timothee Cour
45cac4afda fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)
* fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims

* remove a comment

* Revert "fixes the regression #12860 caused; hotfix"

This reverts commit 3d2459bdc0.

* Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)"

This reverts commit d38853c504.

* noNimScript => noWeirdTarget + noNimJs
2020-06-16 08:56:12 +02:00
Euan
7b12f13946 Use cc on OpenBSD and link to libm when building result (#14672) 2020-06-16 08:50:57 +02:00
Timothee Cour
de5cde473a hintMsgOrigin now works in VM code (#14678)
* `hintMsgOrigin` now works in VM code

* remove a simplification for now
2020-06-16 08:49:57 +02:00
Timothee Cour
faedb14a16 misc cleanups in compiler msgs: use toHumanStr, etc (#14677) 2020-06-15 21:17:24 -07:00
Timothee Cour
49033eb531 make tests/stdlib tests joinable (#14626)
* make tests/stdlib tests joinable

* fixup
2020-06-15 13:27:33 +02:00
Timothee Cour
d51beb7b20 make fromJson/toJson work with array[range, typ], + 1 bugfix (#14669)
* make toJson more robust

* properly handle array
2020-06-15 13:22:43 +02:00
Timothee Cour
bf604c6829 normalizeExe (#14668) 2020-06-15 10:57:34 +02:00
solo989
3cbf59336d Update newLit set[T] to work when set is empty. (#14662)
* Update macros.nim

* Update lib/core/macros.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-06-15 09:15:17 +02:00
Ico Doornekamp
571bc011ea Added --benchmarkVM to times.cpuTime() documentation (#14663) 2020-06-15 08:58:11 +02:00
Juan Carlos
a056b4c3f1 Change 'Future Directions' to link memory management documentation (#14664) 2020-06-15 08:55:24 +02:00
jcosborn
5a22d6b57b fix codegen bug due to changing existing symbol declaration in template (#14666) 2020-06-15 08:40:12 +02:00
alaviss
d749c8cd87 compiler/commands: make gitHash settable at compile-time. (#14654)
This is useful for building nightlies, since we will be building from a
generated source archive and git metadata is lost there.
2020-06-14 11:22:55 +02:00
Andy Davidoff
4e3edf5836 add arc and orc to gc list (#14653) 2020-06-14 11:12:08 +02:00
Timothee Cour
0fc5d3f13b fix #14655 setLen(seq) now zeros memory (#14656)
* simplify sysstr.nim

* fix #14655
2020-06-14 11:11:26 +02:00
Dominik Picheta
d3b25a2948 Clarify imported exceptions note in manual 2020-06-13 11:44:01 +01:00
Timothee Cour
d149823019 fix #13166 tioselectors flaky test on freebsd+OSX (#14634) 2020-06-12 21:19:23 -07:00
Araq
5a26c3799b reorder.nim: fixed typos 2020-06-12 11:57:29 +02:00
Timothee Cour
e30a08103d remove tyOpt, mOpt (#14636)
* remove tyOpt, mOpt

* fixup
2020-06-12 11:03:52 +02:00
Juan Carlos
82e424189e Add rstgen.rstToLatex convenience proc for renderRstToOut and initRstGenerator with outLatex output, see https://github.com/nim-lang/fusion/pull/11#issuecomment-641804899 (#14629) 2020-06-12 10:51:55 +02:00
djazz
1168c75381 httpcore: Add http code 308 Permanent Redirect (#14639)
* httpcore: Add http code 308
* httpclient: Add 308 to redirection proc
* fix typo
2020-06-12 10:16:38 +02:00
alaviss
67d34366dc tools/kochdocs: add log folding supports for more CI services (#14643)
Added log folding for:
- Github Actions
- Azure Pipelines
2020-06-12 10:06:29 +02:00
Timothee Cour
c83a22b76e Disable tfdleak_multiple on platforms other than Windows (#14624) 2020-06-11 12:54:32 -07:00
c-blake
6aa971d39f Add proc find to heapqueue (#14628)
* Unwind just the "pseudorandom probing" (whole hash-code-keyed variable
stride double hashing) part of recent sets & tables changes (which has
still been causing bugs over a month later (e.g., two days ago
https://github.com/nim-lang/Nim/issues/13794) as well as still having
several "figure this out" implementation question comments in them (see
just diffs of this PR).

This topic has been discussed in many places:
  https://github.com/nim-lang/Nim/issues/13393
  https://github.com/nim-lang/Nim/pull/13418
  https://github.com/nim-lang/Nim/pull/13440
  https://github.com/nim-lang/Nim/issues/13794

Alternative/non-mandatory stronger integer hashes (or vice-versa opt-in
identity hashes) are a better solution that is more general (no illusion
of one hard-coded sequence solving all problems) while retaining the
virtues of linear probing such as cache obliviousness and age-less tables
under delete-heavy workloads (still untested after a month of this change).

The only real solution for truly adversarial keys is a hash keyed off of
data unobservable to attackers.  That all fits better with a few families
of user-pluggable/define-switchable hashes which can be provided in a
separate PR more about `hashes.nim`.

This PR carefully preserves the better (but still hard coded!) probing
of the  `intsets` and other recent fixes like `move` annotations, hash
order invariant tests, `intsets.missingOrExcl` fixing, and the move of
`rightSize` into `hashcommon.nim`.

* Fix `data.len` -> `dataLen` problem.

* Add neglected API call `find` to heapqueue.

* Add a changelog.md entry, `since` annotation and rename parameter to be
`heap` like all the other procs for consistency.

* Add missing import.
2020-06-10 19:53:18 +01:00
Timothee Cour
8bbdb8f43f fix #14545 windows CI docs (#14590)
* fix #14545 windows paths
* add lib/std/private/strutils2.nim
* remove dependency strutils2 => strutils
* address comment: lib/std/private/strutils2.nim => compiler/strutils2.nim
2020-06-10 14:10:57 +02:00
ee7
5131af1a44 exceptions.nim: Fix a bad Error -> Defect renaming (#14621)
This commit fixes a mistake from 7d6cbf290a.
2020-06-10 09:34:20 +02:00
Timothee Cour
b7b84fa165 parseutils: integerOutOfRangeDefect => integerOutOfRangeError (#14627) 2020-06-09 23:57:27 -07:00
Timothee Cour
d81bc69587 enable tioselectors on osx; more diagnostic for #13166 (#14625) 2020-06-09 19:15:18 -07:00
Juan Carlos
387e337a2a Documentation update a description (#14619)
* Documentation update a description in a page listing links

* Update doc/docs.rst

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
2020-06-09 22:17:32 +01:00
Andreas Rumpf
6085ad95ff fixes #14279 (#14618) 2020-06-09 20:39:26 +02:00
Andreas Rumpf
b3029ba213 fixes #14578 (#14615) 2020-06-09 17:05:01 +02:00
Juan Carlos
881fa94b57 Documentation Fix Typo, Add Table (#14609) 2020-06-09 15:43:42 +02:00
ynfle
aa70cfdea2 Fix(astspec.txt): type of repeated word (#14612) 2020-06-08 20:14:26 -07:00
Max Grender-Jones
cc3409e264 Make the example better describe the desired outcome (#14611) 2020-06-08 18:49:07 -07:00
lbartoletti
30c09e4607 [OpenBSD] Add arm support (#14608)
* add arm support to openbsd

* use clang on openbsd
2020-06-08 20:06:04 +02:00
Andreas Rumpf
c308c2e60b optimized wrapWords; fixes #14579 (#14606) [backport:1.2] 2020-06-08 14:34:26 +02:00
Andreas Rumpf
e3f80e434a fixes #14557 (#14607) 2020-06-08 14:32:45 +02:00
Timothee Cour
c7a1a7b8bf toJson, jsonTo, json (de)serialization for custom types; remove dependency on strtabs thanks to a hooking mechanism (#14563)
* json custom serialization; application for strtabs
* serialize using nesting
* make toJson more feature complete
* add since
* Revert "Improve JSON serialisation of strtabs (#14549)"

This reverts commit 7cb4ef26ad.

* better approach via mixin
* toJson, jsonTo
* fix test
* address comments
* move to jsonutils
* doc
* cleanups
* also test for js
* also test for vm
2020-06-08 10:35:23 +02:00
Tomohiro
733bd76f6b Fix sugar.dump: It doesn't work correctly with compile time expression (#14580) 2020-06-08 10:28:42 +02:00
Timothee Cour
0d814f2d44 hotfix disable nitter refs https://github.com/timotheecour/Nim/issues/167 (#14603) 2020-06-08 08:15:34 +02:00
alaviss
8edac9cf1d openssl: use explicit result for SSL_in_init (#14597)
Sometimes the analysis might get funky and decide that the if-expression
below is not an if-expression. Details of how this can happen is largely
unknown, but it's easy to prevent so we will just go forward with that.

Fix #14591
2020-06-08 08:15:10 +02:00
Clyybber
52841dba09 Fix #14568 (#14583)
* Fix #14568
* Add testcase
* Fix bogus test
* Adapt other failing tests
* Declarations are always first writes
2020-06-07 23:32:41 +02:00
Andreas Rumpf
754a196d47 fixes #14315 (#14594) 2020-06-07 23:29:26 +02:00
Andreas Rumpf
419dbd573d fixes #14118 (#14595) 2020-06-07 20:11:42 +02:00
Andreas Rumpf
66c50c2ffc implement the 'bind' statement for generics, it was an oversight that this was never implemented (#14584) 2020-06-07 09:55:56 +02:00
lbartoletti
51b71e35f2 Fix link to "rebuilding the compiler" (#14567) 2020-06-06 21:53:18 +02:00
Andreas Rumpf
32083c7ff8 more precise analysis about 'observable stores' [backport:1.2] (#14582) 2020-06-06 21:28:46 +02:00