Commit Graph

1455 Commits

Author SHA1 Message Date
Andreas Rumpf
87dc838370 fixes #17033 [backport:1.4] (#17061)
* fixes #17033 [backport:1.4]

* make test robust against stdlib gensym things

* cleanup assertions.nim to make topt_no_cursor easier to get right

(cherry picked from commit f32ffb6ed8)
2021-02-17 18:38:53 +01:00
Andreas Rumpf
c04214f8cb don't introduce 'dispose', use '=dispose', fixes #17003 [backport:1.4] (#17062)
(cherry picked from commit e463a67c74)
2021-02-17 18:36:39 +01:00
hlaaftana
c55506006f [backport:1.4] JS cstring null fixes (#16979)
* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner

(cherry picked from commit 81533a0014)
2021-02-17 18:36:05 +01:00
narimiran
5e49d3b68a Revert "make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)"
This reverts commit 822c7acd3c.
2021-02-02 09:45:54 +01:00
flywind
d9e14414a4 fix #16706 (#16717) [backport:1.4]
(cherry picked from commit ef9027c290)
2021-02-01 15:18:48 +01:00
Andreas Rumpf
822c7acd3c make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4]

* fixes #16404 [backport:1.4]

(cherry picked from commit 6317e4004d)
2021-02-01 15:16:50 +01:00
Andreas Rumpf
c9d7c67acb fixes #16365 [backport] (#16381)
(cherry picked from commit 868c31e88a)
2020-12-19 14:10:54 +01:00
rockcavera
553c2e5cff Fix #14259 #15621 (#16322) [backport:1.4]
* IPv6 text representation according to RFC 5952

* Revert IPv6 text representation according to RFC 5952

* fix #14259 #15621

fix #14259 #15621

* Update lib/system/io.nim

* reverted IoHandle removal

* adaptation of types for WinAPI

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit d15f63a0f2)
2020-12-19 14:10:06 +01:00
Andreas Rumpf
6e45429ab1 fixes #16214 [backport] (#16252)
(cherry picked from commit edce5897a5)
2020-12-11 05:39:46 +01:00
Miran
04f810c2ec Correct all eggs (#15906)
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".

(cherry picked from commit bbe49a14ae)
2020-11-16 06:54:45 +01:00
flywind
8c31c210ee fix #15663 (#15839) [backport:1.4]
(cherry picked from commit 8e1fa84b0d)
2020-11-09 16:18:20 +01:00
flywind
6d9961c898 fix deprecated messages regarding high (#15832)
(cherry picked from commit 75dc69417a)
2020-11-05 09:18:45 +01:00
Antonis Geralis
60403c9e6b Make newObjUninit proc to adhere to its name (#15764)
Co-authored-by: b3liever <b3liever@yandex.com>
(cherry picked from commit 94e2b9e837)
2020-11-05 09:06:53 +01:00
cooldome
a4f9bc55c7 ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697)
(cherry picked from commit 0956a99537)
2020-11-05 09:06:39 +01:00
Timothee Cour
11ef97d57f $(uint|uint64) now works with nimscript (#15644)
* $(uint|uint64) now works with nimscript

* fixup

(cherry picked from commit 3cbe8d2c53)
2020-10-21 11:08:43 +02:00
RecruitMain707
5874bce91c Fix compilation error for regions and memory profiling (#15641) (#15656)
Co-authored-by: Recruit_main707 <Recruit_main707@users.noreply.github.com>
(cherry picked from commit ed0f8a4973)
2020-10-21 11:08:14 +02:00
cooldome
1e9746aade arc allocation method aligned (#15588)
* progress

* fix typo

(cherry picked from commit 833035bacd)
2020-10-21 11:02:10 +02:00
shirleyquirk
4ef255b69d fix rlock compilation failure (#15584)
* change SysLockType_Reentrant

fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h

* syslocktype_reentrant now a var
* remove nodecl to remove empty system_syslocks.c
* let is better than var.

in reality SysLockType = enum, maybe that would be a better fix
2020-10-15 12:54:01 +02:00
Andreas Rumpf
fd9ab2ce6d ORC: API extensions for 1.4 (#15581) 2020-10-15 11:51:40 +02:00
Andreas Rumpf
644eb4dd54 ORC: critical bugfix for the cycle analyser, introduce -d:nimStressOrc for easier stress testing (#15572) 2020-10-14 22:26:21 +02:00
Juan Carlos
4e7d383f29 Clean out jssys (#15442) 2020-10-01 11:21:27 +02:00
Yuriy Glukhov
22d0a39932 Dont assert on setstacksize result in iOS (#15427) [backport:1.2] 2020-09-29 16:55:53 +02:00
Andreas Rumpf
453167a41e cleanup lib/system/stacktraces.nim; refs #15416 (#15418) 2020-09-28 10:51:13 +02:00
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