Commit Graph

34 Commits

Author SHA1 Message Date
flywind
70ec17eede use single backtick (#17133) 2021-02-21 00:27:39 -08:00
flywind
a03ec067da better getTempDir (#16914)
* better getTempDir

* fix comments

* better

* address comments

* use uint32
2021-02-15 19:39:03 +01:00
flywind
777888fdea add widestrs.newWideCString overload (#16860) 2021-02-01 20:16:50 +01:00
flywind
8e1fa84b0d fix #15663 (#15839) [backport:1.4] 2020-11-05 14:00:49 +01:00
cooldome
833035bacd arc allocation method aligned (#15588)
* progress

* fix typo
2020-10-19 14:50:06 +02:00
Clyybber
4a1128d16c Move wasMoved out of =destroy 2020-07-10 13:36:02 +02:00
Miran
881d1ee57b fix #14750, don't allocate too much in newWideCString (#14773) 2020-06-23 16:15:37 +02:00
Andreas Rumpf
da29222f86 init checks and 'out' parameters (#14521)
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
cooldome
92010becbe nimv2 widestring indexing (#13279) 2020-01-28 20:02:39 +01:00
Ico Doornekamp
b68eb1cad0 Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses 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
2020-01-23 14:25:22 +01:00
Andreas Rumpf
83a736a34a ARC: cycle detector (#12823)
* 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
2019-12-17 17:37:50 +01:00
Andreas Rumpf
c0d240b8cd fixes #11807 (#11900)
* fixes #11807
* make tests green again
2019-08-07 22:40:58 +02:00
Arne Döring
e904b3f952 code cleanup (#10874) 2019-03-28 12:32:02 +01:00
Andreas Rumpf
0036014727 system refactorings (#10559)
* move IO subsystem into its own module; refs #10385
* make standalone test compile again
* make C++ examples compile again
* make more tests green
* make sysAssert and gcAssert work again
2019-02-06 21:00:00 +01:00
Andreas Rumpf
74bf316619 more progress on destructor based strings 2018-07-13 21:15:47 +02:00
Jacek Sieka
22684370b0 remove ArrayDummySize with unchecked arrays (#5818) 2017-08-28 15:44:35 +02:00
Andreas Rumpf
cb0d65280f fixes #6131 2017-07-22 15:42:09 +02:00
Araq
3caf108425 system/unicode: check for buffer overflows; refs #5284 2017-02-08 15:22:36 +01:00
Araq
346ea6d171 system.nim: don't use deprecated symbols/constructs 2017-02-08 14:55:30 +01:00
Dmitry Polienko
c768fea630 Fix newWideCString(cstring, int) 2016-07-19 20:37:26 -07:00
Jacek Sieka
64b0485207 fix types of ansi_c/sysio to more closely match C ABI
also fixes some instances of using C library functions when there are
nim alternatives available
2016-06-05 12:03:20 +08:00
Adam Strzelecki
43bddf62dd lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
jangko
7c757599f1 fixed UTF-16 to UTF-8 conversion in widestrs.nim
the source of problem for issue #3228
also add test for entire range of valid UTF-16
and test for invalid UTF-16 sequence
2015-08-21 10:43:31 +07:00
jangko
c103eddc73 fixed UTF-16 to UTF-8 conversion in widestrs.nim
the source of problem for issue #3228
also add test for entire range of valid UTF-16
2015-08-20 20:30:14 +07:00
jangko
493dbc8932 fixed UTF-16 to UTF-8 conversion in widestrs.nim
the source of problem for issue #3228
2015-08-20 14:17:46 +07:00
pdw
2ca90a20a1 lib/system/g-w - Dropped 'T' from types 2015-06-04 13:18:37 +02:00
Araq
dbf9117c56 the big renamefest: first steps 2014-08-22 23:54:26 +02:00
Araq
dd806cafa0 distinguish between 'defined' and 'declared' 2014-08-11 20:38:28 +02:00
Grzegorz Adam Hankiewicz
1daa54e5a2 Downgrades public module comments to private level.
This avoids the weird concatenation in the final system.html file which
doesn't make any sense.
2014-08-05 17:07:43 +02:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
4447c1b7e3 tcnstseq works again 2013-12-23 08:28:32 +01:00
Araq
9145bcfbb6 new VM: some progress for the FFI support 2013-12-23 01:17:48 +01:00
Araq
baf89e3d66 GC'ed wide strings for windows 2013-05-20 02:17:24 +02:00
Araq
ff4a69b624 win64 is a supported target; bugfix: nimrod c -r on windows; stdlib uses wide char versions of the WinAPI 2012-03-04 21:44:56 +01:00