Commit Graph

1432 Commits

Author SHA1 Message Date
Andreas Rumpf
e2d80b15a6 finish the stacktraces.nim implementation [backport:1.2] (#15393) 2020-09-23 10:01:52 +02:00
flywind
ab05e141c0 deinitLock (#15383)
* deinitLock

* minor
2020-09-22 13:07:31 +02:00
Andreas Rumpf
1fae66e4df better nativestacktrace support; refs #15284; backport [1.2] (#15384)
* nimStackTraceOverride: enable stack traces in exceptions

This is a two-step stack trace collection scheme, because re-raised
exceptions will collect multiple stack traces but use them rarely, when
printing info about an uncaught exception, so it makes sense to only do
the cheap stack unwinding all the time and the relatively expensive
debugging information collection on-demand.

`asyncfutures` implements its own `$` proc for printing
`seq[StackTraceEntry]`, so we have to add the debugging info there, just
like we do for the private `$` proc in `system/excpt`.

* cleaned up PR #15284

Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com>
2020-09-22 13:03:24 +02:00
Andreas Rumpf
04cecdf9c2 async: removed the 'unown' references, async never worked with --newruntime anyway and --newruntime is dead (#15374) 2020-09-20 18:01:07 +02:00
Araq
33be7c6f5e arc: =deepcopy fixes 2020-09-20 10:43:57 +02:00
Andreas Rumpf
9a34009f00 ORC and stdlib optimizations (#15362) 2020-09-19 00:27:43 +02:00
yatsen1
341cd844b2 fix coro proc crash for stack problem when run long enough than a GC cycle (#7612) (#11410)
Co-authored-by: drswinghead <drswinghead@gmail.com>
Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-09-18 17:17:09 +02:00
Andreas Rumpf
d19316bbb9 more ORC bugfixes (#15355)
* introduced --define:nimArcIds

* ORC: bugfixes
2020-09-18 11:55:58 +02:00
Andreas Rumpf
fd31e8ff6f allow old styled RTTI for arc/orc (#15331) 2020-09-16 14:57:01 +02:00
Andreas Rumpf
bc179ccc3f fixes #15076 (#15329) 2020-09-15 12:40:23 +02:00
Andreas Rumpf
c38487aa22 fixes a critical ORC bug, refs #15076 (#15323) 2020-09-14 12:50:23 +02:00
shirleyquirk
57f98dae9a Fix c_malloc inside syslocks.nim to take size_t (#15268) [backport]
* update c_malloc's to csize_t
2020-09-05 23:00:59 +02:00
Andreas Rumpf
ff13f8cc3c fixes #15210 [backport:1.2] (#15237)
* fixes #15210 [backport:1.2]

* use patched version of bigints library
2020-08-31 14:46:23 +02:00
Jaremy Creechley
a76ae8f795 Changes for FreeRTOS/LwIP Port for the ESP32 (ESP-IDF) (#15250)
* Changes for FreeRTOS/LwIP Port for the ESP32 (ESP-IDF)

Adding FreeRTOS/LwIP to compiler:

* adding freertos option
* dyncalls for freertos
* add freertos to posix os list
* adding lwip option

Setting up networking FreeRTOS/LwIP Port:

* setting up lwip network for freertos
* fixing posix / networking for freertos
* disable setInheritable for freerots
* using lwip for net control items

* Fix builds by ignoring lib/posix/posix_freertos_consts.nim similar to lib/posix/posix_other_consts.nim
2020-08-31 11:48:54 +02:00
alaviss
e9df8ebcfd gc_regions: cleanup & fixes for deallocation (#11920)
* gc_regions: withRegion nows return the modified MemRegion

* gc_regions: make withScratchRegion dealloc correctly

* tests/gc: add tregionleak test

This test checks if memory within regions are freed properly.
2020-08-17 20:20:48 +02:00
Andreas Rumpf
86c9b78339 disable sink inference, only enable it for the stdlib. Reason: better source code compatibility (#15105) 2020-07-28 19:18:46 +02:00
Araq
947ecd1257 more renamings 2020-07-27 13:07:09 +02:00
Araq
46bd6787b8 code cleanup 2020-07-27 13:07:09 +02:00
genotrance
450a3e3179 Fix #2408 - add -d:globalSymbols (#14904) 2020-07-21 19:14:36 +02:00
Andreas Rumpf
70acba7f0d readLine: Unicode support for Windows console (#14782)
* readLine: Unicode support for Windows console

When input is read from the Windows console, input encoding is UTF16. This is translated internally to UTF8.

* readLine: Remove recursive imports

* readLine: Fix issues with --gc:arc

**--gc:arc** defines **nimv2**. This changes the definition of **WideCStringObj**.
Also an empty string should be returned in case of EOF.
2020-07-20 14:39:27 +02:00
alaviss
bb1adf6a70 io: fix SetHandleInformation signature to match Windows' (#15017)
* io: fix SetHandleInformation signature to match Windows'

Fixes #14980

* rename Handle -> IoHandle because system.nim is a mess
2020-07-20 00:17:33 -04:00
flywind
9fb7467fda fix #15006 (#15007) 2020-07-17 10:53:26 +02:00
Clyybber
282128ab66 Fix #14994 (#14996)
* Fix #14994

* Revert misplaced "optimization"

* Typo
2020-07-15 23:33:58 +02:00
Clyybber
813dd1b670 repr_v2 improvements (#14992)
* Support proc in arc repr

* Typo

* Improve repr for strings and chars
2020-07-15 22:04:15 +02:00
Andreas Rumpf
6cc0061a72 optimize the new nimPrepareStrMutationV2 with inlining (#14969) 2020-07-12 16:50:56 +02:00
Clyybber
4a1128d16c Move wasMoved out of =destroy 2020-07-10 13:36:02 +02:00
Timothee Cour
695154970d deprecate existsDir; use dirExists instead (#14884) 2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3 {.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
Juan Carlos
5d5df4a394 Clean out Deprecated proc (#14797)
* Remove and/or clean out Deprecated 'add' proc for floats
* Update a test
2020-06-29 09:33:07 +02:00
ktamp
41c97e4b70 readLine: Fix issues with --gc:arc
**--gc:arc** defines **nimv2**. This changes the definition of **WideCStringObj**.
Also an empty string should be returned in case of EOF.
2020-06-26 00:31:06 +03:00
ktamp
c6e09e335a readLine: Remove recursive imports 2020-06-25 00:22:24 +03:00
ktamp
a3b9516249 readLine: Unicode support for Windows console
When input is read from the Windows console, input encoding is UTF16. This is translated internally to UTF8.
2020-06-23 23:31:41 +03: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
Clyybber
03c8bbcc6e Remove outdated comment and copy of length (#14759) 2020-06-22 22:05:18 +02:00
Miran
e7f280bd26 Remove deprecated stuff from stdlib (#14699)
* update to the latest Jester

* remove deprecated procs from some stdlib modules

* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +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
Timothee Cour
0fc5d3f13b fix #14655 setLen(seq) now zeros memory (#14656)
* simplify sysstr.nim

* fix #14655
2020-06-14 11:11:26 +02:00
Timothee Cour
e30a08103d remove tyOpt, mOpt (#14636)
* remove tyOpt, mOpt

* fixup
2020-06-12 11:03:52 +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
alaviss
55f0df164b io: correct signature for some win32 apis (#14551)
See https://github.com/nim-lang/Nim/pull/14550#issuecomment-637937649
2020-06-03 18:17:06 +02:00
Timothee Cour
63d1a0289e fix #14421 items uses lent T (#14447)
* fix #14421 items uses lent T for seq + openArray
* add -d:nimWorkaround14447
* fix test
2020-05-29 17:10:59 +02:00
Timothee Cour
e646c16e06 hotfix doc comments for procs without body (#14494) 2020-05-29 05:30:36 -07:00
Andreas Rumpf
e31ac81899 more checking for --gc:arc, no need for valgrind (#14467)
* sigmatch: removed dead code
2020-05-29 12:08:17 +02:00
hlaaftana
f70d01a7d5 fix repr(char) example assert (#14437) 2020-05-23 21:26:49 -07:00
Andreas Rumpf
f7b73e6bfd make malloc.nim consistent in style (#14427) 2020-05-22 09:55:10 +02:00
Andreas Rumpf
3eaa870c0a ARC/ORC: optimize s.setLen(0) to match the old runtime's behaviour (#14423) 2020-05-21 22:38:13 +02:00
Clyybber
7fe4c66f35 Small improvements for string and char repr with gc:arc (#14400)
* Small improvements for string and char repr with gc:arc

* Fix test
2020-05-20 12:54:04 +02:00
Andreas Rumpf
b35d370d88 specialize genericReset (#14398)
* progress
* make tests green
* maybe we also want to reset pointers, dunno
* progress
* cleanup; fixes #13879 [backport:1.2]
2020-05-19 21:42:53 +02:00
Timothee Cour
e909486e5c trunner was not actually being tested in non-CTFFI mode; minor testament cleanups (#14377)
* use check
* trunner now works with cpp
* cleanup: move compiler/unittest_light => stdtest/unittest_light
* fix tests/readme.md
* remove deadcode references to rodfiles
* fix for windows
2020-05-19 09:41:31 +02:00