Commit graph

1,476 commits

Author SHA1 Message Date
flywind
89a2390f8b
fix printing negative zero in JS backend (#16505) 2020-12-29 15:50:22 +01:00
Antonis Geralis
d5a3c2c2da
Added cmpMem export (#16484)
* added cmpMem export

* updates

* fix test

* Tiny changelog change

* Add a dot.

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:27:08 +01:00
flywind
3f9a2ebea5
fix nim js cmp fails at CT (#16473) 2020-12-27 10:13:57 +01:00
Jonah Snider
fa1a04188f
Avoid creating a holey array in makeNimstrLit for JS target (#16461)
* Avoid creating a holey array in makeNimstrLit
* Use array index instead of push
2020-12-27 09:33:51 +01:00
ee7
297c8e403d
styleCheck: Fix some inconsistent identifiers (#16177) 2020-12-21 09:41:56 -08:00
Matt Haggard
23d23ecb08
Make 'echo' raise IOErrors when appropriate (#16367)
* Make 'echo' raise IOError when fwrite/fflush fail

* Fix fwrite return value comparison

* Add test for echo raising error and don't fail to release locks in echo

* Fix exitcode expectation

* Make 'echo' raise IOError on Windows if it fails

* Add nimLegacyEchoNoRaise for prior no-IOError echo behavior

* Use checkErrMaybe template
2020-12-18 10:06:13 +01:00
Andreas Rumpf
868c31e88a
fixes #16365 [backport] (#16381) 2020-12-17 23:21:55 +01:00
Elliot Waite
f3d57761ab
Fix broken links in docs (#16336)
* Fix broken links in docs

* Fix rand HSlice links
2020-12-14 20:13:12 +01:00
rockcavera
d15f63a0f2
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>
2020-12-12 09:35:18 +01:00
Timothee Cour
bb1c962286
fix partially #13115 (now works for cpp; but still fails for js on openbsd) (#16167)
* fix partially #13115 properly (works for c,js,cpp,vm; still fails for js on openbsd)
* address comment: also test with -d:danger, -d:debug
2020-12-11 10:35:05 +01:00
flywind
9ce2f87a0a
clean up old codes (#16284)
* clean up old codes

* fix docs and links

* clean
2020-12-09 12:18:32 +01:00
flywind
1aaa67fc18
[docs minor] remove unicode in docs comments (#16267) 2020-12-06 05:51:29 +01:00
Andreas Rumpf
af7f7726fe
ORC: make the adaptive strategy the default in order to fight memory consumption (#16250)
* ORC: make the adaptive strategy the default in order to fight memory consumption

* added missing test case
2020-12-05 23:15:17 +01:00
Andreas Rumpf
edce5897a5
fixes #16214 [backport] (#16252) 2020-12-04 17:47:41 +01:00
flywind
e4e5a0c65a
cleanup docs and tests (#16235)
* js module also uses runnableExamples

* cleanup docs and tests
2020-12-03 22:59:17 +01:00
Alf-André Walla
545c406cbe
Add 32-bit RISC-V support (#16231) 2020-12-03 17:33:42 +01:00
flywind
b1554cfeb5
better setops docs (#16236)
* js module also uses runnableExamples

* better setops docs

* Update lib/system/setops.nim

* better

* Update lib/system/setops.nim

* Update lib/system/setops.nim

* better

* better
2020-12-03 14:47:44 +01:00
Clyybber
af984a3db9
Fix typo and improve grammar for clamps note 2020-12-02 17:18:51 +01:00
flywind
d2bf0fb43c
small style changes and clarify clamp (#16228)
* [docs minor]better comparisons docs

* switch from PRNG to random module

* apply suggestions

* not compile

* Revert "switch from PRNG to random module"

This reverts commit 83b4d8946d7d677edac43b7675c41e230ba4e382.

* small style changes and clarify clamp
2020-12-02 17:06:23 +01:00
flywind
e875f27ee6
[docs minor] better comparisons docs (#16201) 2020-12-02 09:34:34 +01:00
Andreas Rumpf
ae9fe2b2f9
ORC: API extensions (#16126)
* ORC: API extensions
* ORC: exploit a common special case
2020-12-01 22:34:52 +01:00
flywind
c65f95417a
better addInt (#16160)
* better addint
* Update lib/system/strmantle.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2020-12-01 20:19:39 +01:00
flywind
c555525227
fix #13115 (#15930)
* fix #13115

* fix testament
2020-11-27 21:04:36 +01:00
flywind
19e224866b
add simple writeStackTrace for JS backend (#16016)
* add simple writeStackTrace for JS backend

* add testcase for writeStackTrace

* changelog
2020-11-24 19:45:06 +01:00
Timothee Cour
b3c3557c33
fix #16025 repr now consistent: does not insert trailing newline (#16034) 2020-11-19 12:12:51 -08:00
Andreas Rumpf
b9eb91cbb5
ORC: prepare for another patent-pending optimization (#15996)
* ORC: prepare for another patent-pending optimization

* bugfix

* '=copy' for refs can take a cyclic parameter for more ORC optimizations

* ORC: exploit the common 'it = it.next' pattern

* can't hurt to check for nil

* use an algorithm that is not obviously broken

* restore the test case

* final cleanups for --gc:orc
2020-11-18 22:31:06 +01:00
Timothee Cour
e5db5316c2
doAssertRaises improvements; nimscript supports except Exception as e (#15765)
* doAssertRaises now correctly handles foreign exceptions; now shows which exception is raised on mismatch
* nimscript now handles `Exception as e`
* remove catch-all doAssertRaises overload from this PR

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-12 09:25:41 +01:00
Miran
bbe49a14ae
Correct all eggs (#15906)
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
2020-11-10 21:53:25 +01:00
Andreas Rumpf
3aab6a409d
micro improvements (#15849) 2020-11-05 14:56:44 +01:00
flywind
8e1fa84b0d
fix #15663 (#15839) [backport:1.4] 2020-11-05 14:00:49 +01:00
flywind
75dc69417a
fix deprecated messages regarding high (#15832) 2020-11-03 16:31:16 +01:00
Antonis Geralis
94e2b9e837
Make newObjUninit proc to adhere to its name (#15764)
Co-authored-by: b3liever <b3liever@yandex.com>
2020-10-28 17:54:42 +01:00
cooldome
0956a99537
ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697) 2020-10-28 14:00:49 +01:00
Andreas Rumpf
226595515c
explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
Dominik Picheta
675cf5760f
Fixes compilation for --os:any + --exception:setjmp (#15626) 2020-10-20 16:47:23 +02:00
Timothee Cour
3cbe8d2c53
$(uint|uint64) now works with nimscript (#15644)
* $(uint|uint64) now works with nimscript

* fixup
2020-10-20 14:26:37 +02:00
RecruitMain707
ed0f8a4973
Fix compilation error for regions and memory profiling (#15641) (#15656)
Co-authored-by: Recruit_main707 <Recruit_main707@users.noreply.github.com>
2020-10-20 14:22:02 +02:00
cooldome
833035bacd
arc allocation method aligned (#15588)
* progress

* fix typo
2020-10-19 14:50:06 +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