summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-0111-45/+181
| | | | | | | | | The new mechanism can deal with more complex scenarios such as not nil field appearing in a non-default case object branch or a field within a generic object that may depend on a when branch. The commit also plugs another hole: the user is no longer able to create illegal default values through seq.setLen(N).
* Fix tests/parallel/tguard2.nimZahary Karadjov2020-04-013-3/+5
|
* Fix a CI failure during koch docZahary Karadjov2020-04-011-1/+2
|
* Fix https://github.com/nim-lang/Nim/issues/4907Zahary Karadjov2020-04-013-5/+78
|
* Close https://github.com/nim-lang/Nim/issues/11428Zahary Karadjov2020-04-011-0/+12
|
* Perform nil checks during object construction and within compiles()Zahary Karadjov2020-04-014-7/+10
| | | | Close https://github.com/nim-lang/Nim/issues/6494
* More precise error messages for uninitialized fields in the presence of ↵Zahary Karadjov2020-04-013-38/+39
| | | | inheritance
* Hrm, the new errors highlighted some code that seems to be brokenZahary Karadjov2020-04-018-22/+23
| | | | | | New issue: since `Table[A, B]` allocates its backing storage with `newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table with `not nil` types used as either keys or values.
* not nil types are illegal to construct through default(T)Zahary Karadjov2020-04-012-0/+16
|
* Turn the warning for uninitialized (result) variables into errorsZahary Karadjov2020-04-017-17/+103
|
* Fix tests/notnil/tnotnil_in_objconstr.nimZahary Karadjov2020-04-011-1/+1
|
* Enable the requiresInit checks only for objectsZahary Karadjov2020-04-012-2/+2
|
* Plug another hole: default(T) forbidden for objects requiring initializationZahary Karadjov2020-04-015-19/+31
|
* Don't allow 'var x: T' for objects that require initializationZahary Karadjov2020-04-014-37/+63
|
* More sophistication; Allow requiresInit to be specified per-fieldZahary Karadjov2020-04-014-15/+61
|
* First steps, the compiler can boot with enforced requiresInitZahary Karadjov2020-04-017-29/+26
|
* make `usage of foo is a user-defined error` more informative (#13833)Timothee Cour2020-04-011-3/+5
|
* fix open file leak when running --debugger:native (#13832)Timothee Cour2020-04-012-6/+16
|
* updated the changelogAraq2020-04-011-1/+1
|
* encodeMIME should be encodeMime by our coding guidelinesAraq2020-04-011-3/+3
|
* fix #13829 (#13831)Timothee Cour2020-04-011-1/+1
|
* Small typo (#13824)Clyybber2020-03-311-1/+1
|
* Add arm/arm64 for FreeBSD (#13822)lbartoletti2020-03-312-3/+3
| | | | | * Add arm and arm64 for FreeBSD * Add arm64 with aarch64 and reorder to avoid conflict with arm
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-3125-35/+1242
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* Tiny fix on browsers.openDefaultBrowser (#13818)Juan Carlos2020-03-311-1/+3
|
* Fix a 'See XXX' on documentation, clean out (#13820)Juan Carlos2020-03-311-2/+1
|
* fixes #13810 (#13821)cooldome2020-03-312-2/+23
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-317-140/+303
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* workflows/ci_docs: fix documentation deployment (#13819)alaviss2020-03-311-3/+9
| | | | | | | | | | | | * workflows/ci_docs: fix docs publishing It turns out that github.ref is the full ref name, so we have to be a bit more specific. See https://developer.github.com/v3/activity/events/types/#pushevent Also fixed a silly typo :) * workflows/ci_docs: run CI when there are changes to the workflow
* Unwind just the "pseudorandom probing" part of recent sets,tables changes ↵c-blake2020-03-318-175/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#13816) * 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.
* #13806 - getApplFreebsd might lose data (#13807)Euan2020-03-311-16/+16
| | | | | | | | | * #13806 - first call sysctl with a null buffer to get the length, then alloc buffer and call again * Use csize_t rather than csize * Suggestions from @Clyybber Co-authored-by: Euan Torano <euan.torano@bluesky-wireless.co.uk>
* workflows/ci_docs: lots of goodies (#13809)alaviss2020-03-311-13/+95
| | | | | | | | | | | | | | | | | | | | | | | | | * workflows/ci_docs: publish documentation to Github Pages This should be a complete replacement for our current Travis CI setup. * workflows/ci_docs: run docgen upon modification to the css on push So that any changes regarding the stylesheets would be reflected on the published docs. * workflows/ci_docs: build the compiler in release mode * workflows/ci_docs: set branch name for the generated docs This makes the "Source" links work correctly. * workflows/ci_docs: run docgen on windows and osx too Only deploy the Linux-generated version. * workflows/ci_docs: cache csources compiler This should cut the time spent building csources, which is about 1-2mins depending on OS.
* Add Documentation (#13811)Juan Carlos2020-03-3112-19/+135
| | | | * Add more Docs and runnableExamples
* refs #13797 (#13812)Timothee Cour2020-03-311-1/+1
|
* Fix telebot test failed, closes ba0f3/telebot.nim#49 [ref #13812] (#13814)Huy Doan2020-03-311-1/+1
| | | I was update telebot to version 1.0.0, update folder structure follow `nimble` guideline
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-3014-21/+171
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* faster CIs (#13803)Miran2020-03-3072-1085/+535
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* '.push raises: []' now also affects proc types (#13776)Andreas Rumpf2020-03-295-5/+32
| | | | | | | | | * '.push raises: []' now also affects proc types * fixes the regression * less disruptive bugfix * another attempt
* fix #13794 HashSet leak (#13800)Timothee Cour2020-03-291-1/+2
|
* Fix #13631 (#13789)Juan Carlos2020-03-291-2/+2
|
* fix #13730 (#13787)Timothee Cour2020-03-282-2/+10
|
* [CI] fix recent freebsd systematic failure (#13788)Timothee Cour2020-03-281-9/+14
|
* fixes #13763 (#13777)Andreas Rumpf2020-03-272-1/+10
|
* More fixes for Haiku (#13774)alaviss2020-03-272-47/+50
| | | | | | | | | | | * osproc: move fork-based code path under the when conditional * osproc: avoid using the environ global on Haiku * osenv: import environ from stdlib.h on Haiku Haiku's environ is declared in `<stdlib.h>` by default, differing from POSIX and/or Linux. Import it from there to avoid collision with anyone importing `<stdlib.h>` from Nim.
* fix typos and deprecation warnings for tconvariancerules.nim (#13772)Arne Döring2020-03-271-21/+20
|
* make nim_temp compile with --gc:arc --sinkInference:off (#13769)cooldome2020-03-261-1/+1
| | | | | | | * make nim_temp compiler with --gc:arc * trigger build Co-authored-by: cooldome <ariabushenko@bk.ru>
* Fix vm.nim for --gc:arc (#13741)Clyybber2020-03-263-41/+30
| | | | | | | | | | | | | * koch boot --gc:arc now passes the nim stage ... but generates invalid C code * Move it closer to where its used * Try something else * Poor mans var * Use UncheckedArray instead
* ssl_certs: add Haiku support (#13761)alaviss2020-03-261-7/+32
|
* asyncdispatch: fix erroneous set construction (#13765)alaviss2020-03-261-1/+3
| | | | | | | These constants were defined as `cint`. They can be huge on certain systems, such as Haiku, and trigger out-of-bounds errors in asyncdispatch. Ref #13764.
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-264-8/+88
| | | | | | | | | | | | | | | | | | | | | * Fix typeSym.getImpl for ref types * Fix a codegen issue affecting the test suite of nim-beacon-chain * Fix tests/stdlib/tjsonmacro To understand the fix better it may help to take a look at the history of the replaced code. The nil check that is removed in this commit was introduced in another fix that failed to identify the root cause of the issue - namely that we allow an object type to exist for which no ast is present: https://github.com/nim-lang/Nim/pull/9601/files The original intention of the code is more obvious here: https://github.com/nim-lang/Nim/pull/9538/files