summary refs log tree commit diff stats
path: root/lib/system.nim
Commit message (Collapse)AuthorAgeFilesLines
* add unsetControlCHook to remove a Ctrl-C hook after it was set (#7267)Vindaar2019-01-101-0/+4
| | | | | | | | | * add unsetControlCHook to remove a Ctrl-C hook after it was set Adds the inverse proc to setControlCHook in order to lift a Ctrl-C hook after it has been set. * remove check for noSignalHandler in system/excpt.nim
* void object fields are now ignored by codegen and fields/fieldPairs iterator ↵Neelesh Chandola2019-01-101-0/+1
| | | | | | | | | (#10144) * Codegen now ignores object fields of type void * Fix `$` bug for objects/tuples where it does not add a comma * fields/fieldPairs iterators now ignore void types * Use `isEmptyType` instead of checking for `tyVoid` directly
* Fix exception tracking for system.open (#10253)Oscar Nihlgård2019-01-101-3/+4
|
* ValueError now inherits from CatchableError (#10246)Oscar Nihlgård2019-01-101-1/+1
|
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) ↵Timothee Cour2019-01-081-5/+16
| | | | | | | | | | | | | which leaked implementation detail (#10070) * add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2) fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim * Note: isNamedTuple is useful in other places, eg #10010 (comment) * move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim * remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
* * move up runnableExamples definition so can be used more in system.nim (#10196)Timothee Cour2019-01-051-28/+30
| | | | * document that toInt, toBiggestInt round towards 0 and add runnableExamples * minor doc fixes
* fix system.nim documentations (#10168)alaviss2019-01-041-2/+2
| | | | | * system: fix nimGC_getStackBottom doc * system/helpers: avoid leaking docs to system
* fix bug in doAssertRaises when exception==Exception (#10172)Timothee Cour2019-01-041-11/+19
| | | | | * fix bug in doAssertRaises when exception==Exception * add testcase for doAssertRaises
* [backport] correctly document `toInt`, fixes #2764 [ci skip] (#10176)Miran2019-01-041-4/+6
|
* Add {.noReturn.} to system.raiseAssert (#10161)Oscar Nihlgård2019-01-021-1/+1
|
* Dead code elimination for entire modules and their init procs if empty (#10032)cooldome2018-12-301-6/+3
| | | | | | * fixes #9798 * Change order of write modules * Move datInit calls ahead of initStackBottom
* revives: Move typetraits.`$` to system. Fixes #5827 (#10071)Timothee Cour2018-12-301-0/+9
| | | | | | * Move typetraits.`$` to system. Fixes #5827. * revive PR; adjust code to make sure everything works and add tests * fix tests/concepts/tstackconcept.nim * address comments
* clarify doc for <= on tuple uses lexicographic order (#10069)Timothee Cour2018-12-211-4/+4
|
* Fixed insert for nil seq in js (#10068)Yuriy Glukhov2018-12-211-1/+1
|
* Add system.$(HSlice) and fix #7898 (#8670)hlaaf2018-12-211-1/+11
| | | | | | * Add system.$(HSlice) and fix #7898 * Surround system.$(HSlice) with spaces
* fixes #9120Araq2018-12-161-1/+1
|
* fixes #8991, fixes #4446Araq2018-12-161-2/+2
|
* fixes #9153Araq2018-12-161-3/+3
|
* --gc:destructors: baby stepsAndreas Rumpf2018-12-151-4/+5
|
* hotfix: discriminants can be of size 8 bytes [backport]Araq2018-12-051-0/+1
|
* Fix fat pointers, object copying, magic double evals on JS (#9411) [backport]rec2018-12-041-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a test for issue #9389 * Fixes #9389. * Make object contructors copy objects properly by checking whether the expressions passed to them don't need to be copied. * Make mArrToSeq implementation actually check if a copy needs to be made. * Avoid unnecessary copy in mChr impl * Assume set constructor elements need no copy * Add a test for issue #9410 * Add a test * fix passing fat pointers (#9410) * Enhance tests * More tests and fixes * Add more (failing) tests [ci skip] * Added equality operator for fat pointers, more tests and fixes * Fix printing uninitialized strings * Fix mInc, mDec double eval, add more tests * Tests * Refactored, fixed multiple evals, revamped the tests, added missing ops * Fix ups * Fix #9643 and #9644 * add pointer normalization
* add: proc deepCopy*[T](y: T): T (#9740)Timothee Cour2018-11-281-0/+4
|
* fixes #9675Andreas Rumpf2018-11-261-1/+1
|
* fix segfault when calling shallow() on an empty string (#9782) [backport]Ștefan Talpalaru2018-11-221-0/+2
| | | | | | | | | shallow() casts its string argument to a seq and then tries to access its fields. Guess what happens when that string is nil, which seems to be the representation of an empty string (both the default value and an explicitly assigned ""). Segfault encountered when running "ntags -R ." on a large project. The relevant line: https://bitbucket.org/nimcontrib/ntags/src/a1c62c38e539877c105fbe4e08d06b76232f8017/ntags.nim#lines-125
* Empty check in shallow [backport] (#9676)ishowta2018-11-211-0/+1
|
* removes deprecated T/P typesAraq2018-11-161-4/+0
|
* Inline generic min and max - https://github.com/nim-lang/Nim/issues/9514 (#9688)Mamy Ratsimbazafy2018-11-141-2/+2
|
* NaN fixes for clang backend (#9652)Arne Döring2018-11-081-3/+3
|
* Nim devel is version 0.19.9Andreas Rumpf2018-11-031-1/+1
|
* system.nim: workaround for the fixed documentation generatorAraq2018-10-301-1/+1
|
* change system.nim to adhere to the style guideAraq2018-10-301-11/+11
|
* fixes #8603Araq2018-10-301-27/+29
|
* more examples for mod and div, plus corrections [ci skip]narimiran2018-10-281-5/+11
|
* Openmp parallel iterator improvements (#9493)Mamy Ratsimbazafy2018-10-251-2/+6
| | | | | * More flexibility in OpenMP pragma * Use static to constrain to compile-time annotation string * Update changelog with OpenMP change
* stdlib: documenation updates, the exception names have been changedAndreas Rumpf2018-10-251-5/+5
|
* added system.typeof operation; fixes #9093Araq2018-10-241-0/+9
|
* system.nim deprecate 'getRefcount'; refs #2839, refs #3713Araq2018-10-151-3/+6
|
* system.nim: fixes typoAraq2018-10-151-1/+1
|
* implement sizeof and alignof operator (manually squashed #5664) (#9356)Timothee Cour2018-10-141-2/+19
|
* correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 ↵Timothee Cour2018-10-141-6/+8
| | | | | | (#9332) * fixes #8518; refs #9301; correctly render AST in doAssert condition
* deprecate accumulateResult => sequtils.toSeq (#8666)Timothee Cour2018-10-131-1/+4
|
* Add `toOpenArray[T](ptr UncheckedArray[T])` for clarity. (#9316)c-blake2018-10-121-0/+2
| | | | | | | | | | | * 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.
* compile date and compile time tz written in doc (#9283)eqperes2018-10-111-2/+2
|
* Unchecked arrays now have their own type (#9267)LemonBoy2018-10-101-1/+7
|
* Separate high/low/len docs for each overload (#8816)hlaaf2018-10-091-19/+99
|
* development version is 0.19.1Araq2018-10-091-1/+1
|
* update version to 0.19Andreas Rumpf2018-09-251-2/+2
|
* .error for routines now can also have a custom error message; improve error ↵Araq2018-09-251-2/+10
| | | | message for 'nil' strings
* Implements the equals operator for openarrayZahary Karadjov2018-09-181-0/+10
|
* documents system.cmp's platform specific behaviour; fixes #8930Araq2018-09-151-0/+2
|