summary refs log tree commit diff stats
path: root/lib/system
Commit message (Collapse)AuthorAgeFilesLines
* fixes #13457 (#13458)Andreas Rumpf2020-02-211-10/+11
|
* fix #9634 don't crash on execCmdEx/readLine when inside gdb/lldb (#13232)Timothee Cour2020-02-111-2/+15
| | | | | | | | * fix #9634 debugging a program using execCmdEx now works * only apply EINTR to c_gets for now This reverts commit c0f5305b5a0b46983dfd27e3d77ecbf4f8744dcc.
* Revert "printing float values will have one more digit. (#13276) [backport]" ↵Timothee Cour2020-02-081-1/+1
| | | | | (#13363) This reverts commit b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.
* [backport] fix #13352narimiran2020-02-071-0/+3
|
* printing float values will have one more digit. (#13276) [backport]Arne Döring2020-02-071-1/+1
| | | | * printing float values will have one more digit. Fixes #13196
* replace old problematic isNamedTuple implementation by TypeTrait ↵Timothee Cour2020-02-071-11/+15
| | | | | | | | isNamedTuple in dollars.nim (#13347) * replace old problematic isNamedTuple implementation by TypeTrait isNamedTuple * fix for bootstrap
* enable testing -d:nimHasLibFFI mode (#13091)Timothee Cour2020-02-042-2/+2
|
* miscellaneous bug fixes (#13291)Timothee Cour2020-01-301-1/+1
| | | | | | | | * fix for emscripten etc * add testcase for #13290 * replace deprecated isNilOrWhitespace
* Thread attributes should be destroyed using the pthread_attr_destroy() (#13293)Hiroki Noda2020-01-292-4/+7
| | | | | On some OSes (such as FreeBSD or Solaris), pthread_attr_init allocate memory. So it is necessary to deallocate that memory by using pthread_attr_destroy.
* fix stdout(etc) for emscriptenTimothee Cour2020-01-282-6/+8
|
* Repr v2 progress (#13268)cooldome2020-01-281-71/+59
| | | | | | | | | | * progress on repr_v2 * repr progress * add ref objects with distrinct * fix failing tests
* nimv2 widestring indexing (#13279)cooldome2020-01-281-2/+2
|
* Tiny since cleanup (#13286)Clyybber2020-01-281-1/+1
|
* TlSF Alloctor: use less memory for --gc:arc (#13280)Andreas Rumpf2020-01-282-80/+101
|
* fixes #13219 (#13272)Andreas Rumpf2020-01-271-3/+5
|
* ARC: optimize complete object constructors to use nimNewObjUninitAraq2020-01-261-0/+17
|
* ARC: remove unnecessary codeAraq2020-01-261-14/+0
|
* make goto based exceptions available for 'nim cpp' (#13244)Andreas Rumpf2020-01-253-6/+10
| | | | | * make goto based exceptions available for 'nim cpp' * optimize seq.add to be comparable to C++'s emplace_back
* Cleaned up mmdisp.nim, moved implementations into lib/system/mm/ (#13254)Ico Doornekamp2020-01-255-392/+416
|
* contributing docs: symbols need package prefix; changed allocStats to ↵Timothee Cour2020-01-251-1/+1
| | | | nimAllocStats (#13247)
* [backport] documentation: Add channels examples (#13202) [ci skip]chr v1.x2020-01-231-0/+114
|
* Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses ↵Ico Doornekamp2020-01-239-246/+234
| | | | | | | | | | | | | | | | | | | | | | | | | allocShared0. (#13190) * Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use allocShared0 by default. * Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc. * Removed debug printfs * Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc * More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that * Introduced realloc0 and reallocShared0, these procs are now used by strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to drop the extra header with allocation length. * Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field * Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats * *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
* Unexport even more symbols (#13214)alaviss2020-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system/gc: don't export markStackAndRegisters * compiler/cgen: unexport internal symbols As these functions are Nim-specific walkaround against C's optimization schemes, they don't serve any purpose being exported. * compiler/cgen: don't export global var unless marked * compiler/ccgthreadvars: don't export threadvar unless marked * tests/dll/visibility: also check for exports This ensure that these changes don't break manual exports. * compiler/cgen: hide all variables created for constants * compiler/ccgtypes: don't export RTTI variables * compiler/ccgexprs: make all complex const static * nimbase.h: fix export for windows * compiler/cgen, ccgthreadvars: export variables correctly For C/C++ variables, `extern` means that the variable is defined in an another unit. Added a new N_LIB_EXPORT_VAR to correctly export variables.
* fix docs + API for fieldPairs, fields (#13189)Timothee Cour2020-01-181-26/+40
|
* ARC works for async on Windows (#13179)Andreas Rumpf2020-01-171-3/+6
|
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-164-5/+5
|
* Remove obsolete code from osalloc (#13158)Ico Doornekamp2020-01-161-10/+0
|
* ARC: misc bugfixes (#13156)Andreas Rumpf2020-01-151-1/+1
| | | | | | | | * fixes #13102 * closes #13149 * ARC: fixes a move optimizer bug (there are more left regarding array and tuple indexing) * proper fix; fixes #12957 * fixes yet another case object '=' code generation problem
* System cleanup, part 2 (#13155)Miran2020-01-158-0/+1671
| | | | | | | | * create basic_types, arithmetics, exceptions, comparisons * create setops.nim * create memalloc.nim * create gc_interface.nim * create iterators_1.nim
* Added 'ansic' os support for minimal (embedded) targets (#13088)Ico Doornekamp2020-01-154-68/+73
| | | | | | | | * os:any implementation * os:asny: omit flock/funlock calls in echoBinSafe * Disabled default "unhandled expection" reporting for `--os:any` to reduce code size. Added unhandledExceptionHook instead which can be used to get a notification from Nim and handle it from the application.
* VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)Timothee Cour2020-01-122-5/+16
|
* more arc features (#13098)Andreas Rumpf2020-01-101-0/+170
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* [backport] system/io.nim fix wrong documentation comment [ci skip]narimiran2020-01-101-2/+2
|
* typetraits: fixes #6454; genericParams; added lenTuple; added tuple type get ↵Timothee Cour2020-01-101-0/+2
| | | | | | (#13064)
* fixes #13070Araq2020-01-101-2/+2
|
* take the one good idea from --os:standalone and enable it via ↵Andreas Rumpf2020-01-092-8/+8
| | | | -d:StandaloneHeapSize (#13077)
* reprjs: style changesAraq2020-01-051-12/+12
|
* fixes #13013, reverts previous changes to readLines() (#13036) [backport]cooldome2020-01-051-3/+5
| | | | | | | * Revert "remove default argument for readLines (#12807) [backport]" This reverts commit c949b81efdeb08b38224e1678ad140b7b7663b15.
* fixes #13032Araq2020-01-042-6/+6
|
* remove default argument for readLines (#12807) [backport]cooldome2020-01-021-3/+3
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-013-98/+120
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* fixes #12965 (#12991)Andreas Rumpf2019-12-311-10/+11
|
* c_fflush() the rawWrite() buffer (#12987)Ștefan Talpalaru2019-12-301-0/+4
| | | | | | Stack traces on an unbuffered stderr get out of sync with line-buffered stdout - usually on Windows terminals or CI logs. This fixes it by calling C's fflush() on the output buffer in the procedure used for printing stack traces.
* generic stack trace overriding mechanism (#12922)Ștefan Talpalaru2019-12-291-10/+33
| | | | | | | | | | | | | | | | * libbacktrace support * switch to a generic stack trace overriding mechanism When "nimStackTraceOverride" is defined, once of the imported modules can register its own procedure to replace the default stack trace generation by calling `registerStackTraceOverride(myOwnProc)`. Tested with `./koch boot -d:release --debugger:native -d:nimStackTraceOverride --import:libbacktrace` for the compiler itself and `./bin/nim c -r -f --stacktrace:off --debugger:native -d:nimStackTraceOverride --import:libbacktrace foo.nim` for an external program. * make the StackTraceOverrideProc {.noinline.}
* minor refactoringsAndreas Rumpf2019-12-271-9/+9
|
* ARC: default to a shared heap with --threads:onAraq2019-12-242-0/+10
|
* ported channels to ARCAraq2019-12-241-120/+142
|
* fix error in assertions document (#12925) [backport]flywind2019-12-181-1/+1
|
* ARC: cycle detector (#12823)Andreas Rumpf2019-12-177-2/+762
| | | | | | | | | | | | | * first implementation of the =trace and =dispose hooks for the cycle collector * a cycle collector for ARC: progress * manual: the .acyclic pragma is a thing once again * gcbench: adaptations for --gc:arc * enable valgrind tests for the strutils tests * testament: better valgrind support * ARC refactoring: growable jumpstacks * ARC cycle detector: non-recursive algorithm * moved and renamed core/ files back to system/ * refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
* NaN floatFormat with clang_cl (#12910)cooldome2019-12-171-2/+2
| | | | | | * clang_cl nan floatFormat * format