Commit Graph

20018 Commits

Author SHA1 Message Date
flywind
a262a87bbe [add testcase] arc problems with recursive types (#19456)
* [add testcase] arc problems with recursive types

close #9650

* do test

* expand

* Update tests/arc/t9650.nim
2022-03-23 21:07:05 +01:00
flywind
2c01c9c4c8 output byref types into --header file [backport: 1.6] (#19505)
* output byref types into --header file

fix #19445

* fix comments

* set targets
2022-03-23 20:57:13 +01:00
Juan Carlos
b0bd4320a0 Remove deprecated typo poDemon (#19631)
* Remove Deprecated poDemon

* Remove Deprecated poDemon
2022-03-23 20:43:58 +01:00
Juan Carlos
d7a966c4eb Remove Deprecated domextension (#19630)
* Remove Deprecated domextension

* Remove Deprecated domextension
2022-03-23 20:43:28 +01:00
Juan Carlos
d14e8e8dcc Remove Deprecated Nimscript proc (#19629) 2022-03-23 20:42:54 +01:00
flywind
e93eaac223 build external deps with userversion:1.6 (#19612) 2022-03-23 20:42:08 +01:00
flywind
7f6e800caf move assertions out of system (#19599) 2022-03-23 20:34:53 +01:00
Dominic Ward
a8b5ad845c Fix process lines iterator (#19605)
* Ensure lines when process done

* eliminate post-EOF exit test

* Recommend fixes for execCmdEx/execProcess
2022-03-23 07:50:36 +01:00
Jaremy Creechley
4c8934305c system: thread: stack dealloction on Zephyr (#19633) [backport:1.6]
Try to free the stack allocation when a thread exits. Possibly works for FreeRTOS as well.
2022-03-22 20:08:31 +01:00
Andreas Rumpf
c4a0d4c5e3 fixes #19615; emit better code for integer divisions when the divisor… (#19626)
* fixes #19615; emit better code for integer divisions when the divisor is known at compile-time

* proper bugfix: unsigned numbers cannot be -1
2022-03-22 15:36:49 +01:00
Andreas Rumpf
731eabc930 fixes #19631 (#19618)
Aliasing is hard and we have to watch out not to compile 'x = f(x.a)' into 'f(x.a, addr x)'
2022-03-20 14:02:44 +01:00
Clyybber
3e83d73f27 compiler: Handle nkCheckedFieldExpr better in dfa (#19616)
Simply recurse into their first child, which is always
a nkDotExpr instead of treating them seperately.
This fixes the rhs sym of a nkCheckedFieldExpr being
checked twice in aliases. This double checking didn't
cause any issues, but was unintentional and redundant.
2022-03-18 16:41:45 +01:00
Araq
7b811deeff db_sqlite: added a space 2022-03-18 14:18:05 +01:00
Juan Carlos
7a50d66346 Removed deprecated httpcore func (#19550)
* Remove Deprecated httpcore func

* Remove Deprecated httpcore func

* Fix a test with Deprecated func

* Restart CI, Apple can code shit anymore I tell you
2022-03-18 07:54:20 +01:00
flywind
4c76f9f152 support useVersion:1.6 (#19601) 2022-03-10 17:01:27 +01:00
flywind
6773ffa63d enable nimPreviewDotLikeOps (#19598) 2022-03-09 12:55:20 +01:00
Andreas Rumpf
2beefb9aa0 fixes #19575 (#19596) [backport]
* fixes #19575

* better bugfix
2022-03-09 11:42:09 +01:00
Andreas Rumpf
0d6795a771 fixes #19569 (#19595) [backport]
* minor code refactorings

* fixes #19569
2022-03-09 07:22:10 +01:00
flywind
8f9dd5b349 register callback for marshal in VM (#19578)
* register callback for marshal in VM

* remove unrelated code

* polish

* more tests

* more tests

* add loadVM and toVM
2022-03-08 18:12:31 +01:00
Hamid Bluri
6454472938 fix not flushing stdout in MSYS (#19590)
I did this pull request according to what xflywind said: https://github.com/nim-lang/Nim/pull/19584#issuecomment-1060085141
2022-03-07 17:21:42 +08:00
VlkrS
488e18f90d Fix CPU detection for i386 (#19577)
* Fix CPU detection for i386

Commit 787def271b breaks CPU detection for i386 on OpenBSD and probably on other platforms.
[ isOpenIndiana -eq "yes" ] always returns 0, so mycpu is always set to "amd64".

* Update buildsh.nimf

Fix accidental bashism
2022-03-03 14:41:35 +01:00
huantian
590d397852 Fix typo in Nim Tutorial pt3 (#19579) 2022-03-02 13:53:59 +08:00
flywind
d6d36093b1 apply changes from #18017 and some fixes (#19571)
* implements https://github.com/nim-lang/RFCs/issues/369

* deprecate unsafeAddr; extend addr

addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr

* follow @Vindaar's advice

* change the signature of addr

* unsafeAddr => addr (stdlib)

* Update changelog.md

* unsafeAddr => addr (tests)

* Revert "unsafeAddr => addr (stdlib)"

This reverts commit ab83c99c50.

* doc changes; thanks to @konsumlamm

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* merge

* remove

* fix bug

Co-authored-by: Araq <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-03-01 07:46:08 +01:00
Evan Typanski
207237cec2 Fix #18662 (#19534) 2022-02-28 13:18:41 +01:00
Tomohiro
c870ff5946 Add error message to pointer size check assert in lib/nimbase.h (#19549) 2022-02-27 15:36:16 +01:00
solarizedalias
c2c9fbd745 make compileOption("panics") work (#19568) 2022-02-27 08:22:52 +01:00
Juan Carlos
f0bfc0bd3f Remove define for jsfetch (#19530)
* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch
2022-02-25 20:34:16 +01:00
flywind
9c17a32e0e fix #19266; allow reassign discriminant field (#19567)
* add inUncheckedAssignSection

* add one more test
2022-02-25 20:33:28 +01:00
Tanguy
ef3f343ec2 Allow std/macros.params to work with nnkProcTy (#19563)
* Allow std/macros.params to work with nnkProcTy

* Add tests for proc params & pragma
2022-02-25 12:57:58 +01:00
Juan Carlos
fe791c67b4 Remove Deprecated jsre func (#19551)
* Remove Deprecated jsre func

* Remove Deprecated jsre func

* ReStart CI, because OSX is dumb and I have no permission to restart
2022-02-25 10:43:35 +01:00
PMunch
9a49451124 Remove volatiles when compiling with ARC/ORC (#19545)
This removes volatiles on ARC/ORC targets in NimMain and PreMainInner.
This avoids an issue where they couldn't be optimised out on
microcontrollers leading to larger code. Since the stack bottom doesn't
have to be initialised this way when using ARC or ORC (or None, which is
also covered by this PR) these can be safely removed.
2022-02-25 10:43:03 +01:00
Jake Leahy
340b5a1676 Document links repect --out in .idx file (#19543)
* Link in .idx file now respects --out:file switch

* Use clearer chained calls

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-02-24 15:16:46 -05:00
Ștefan Talpalaru
0c915b5e47 compile pragma: cache the result sooner (#19554)
extccomp.addExternalFileToCompile() relies on hashes to decide whether
an external C file needs recompilation or not.

Due to short-circuit evaluation of boolean expressions, the procedure
that generates a corresponding hash file is not called the first time an
external file is compiled, so an avoidable recompilation is triggered
the next build.

This patch fixes that by moving the proc call with a desired side
effect from its boolean expression, so it's executed unconditionally.
2022-02-24 08:31:40 +01:00
locriacyber
516db3bac3 Remove trailing space in nim r command; Amend one error message (#19487) 2022-02-18 17:24:42 -05:00
tersec
f019e999d4 keep casing of noinit and noreturn pragmas consistently documented (#19535) 2022-02-18 16:06:11 +01:00
rockcavera
30e9f23ec0 Update chcks.nim (#19540) 2022-02-17 12:48:57 +01:00
Sizhe Zhao
b2c5d7b4ff Documentation: Fix word usage (#19529) 2022-02-14 22:15:59 +00:00
flywind
2ef71c0a46 [testcase] genSym fails to make unique identifier for ref object types (#19506)
close #15118
2022-02-14 14:36:01 +01:00
Juan Carlos
8e8231f9d6 Remove deprecated math.c_frexp (#19518)
* Remove Deprecated math proc

* Remove Deprecated math proc

* Remove Deprecated math proc
2022-02-14 14:35:33 +01:00
Juan Carlos
42eeab5fd1 Remove Deprecated oids.oidsToString (#19519)
* Remove deprecated oids.oidToString

* Remove deprecated oids.oidToString
2022-02-14 09:09:21 +01:00
David Krause
cda77c1520 use OrderedTable instead of OrderedTableRef for mimedb (#19522)
* use OrderedTable instead of OrderedTableRef for mimedb

Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>

* added changelog entry for mimedb change

Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
2022-02-14 08:56:35 +01:00
konsumlamm
551225d888 Remove backslash in glob pattern (#19524) 2022-02-14 08:50:38 +01:00
Andreas Rumpf
ed0dce7292 fixes #19404 by protecting the memory we borrow from. this replaces crashes with minor memory leaks which seems to be acceptable. In the longer run we need a better VM that didn't grow hacks over a decade. (#19515)
Co-authored-by: flywind <xzsflywind@gmail.com>
2022-02-12 15:10:45 +01:00
flywind
b936bfd01a fix #16458; make useNimRtl compile for --gc:orc (#19512)
* fix #16458; make useNimRtl compile for --gc:orc/arc

* fix tests
2022-02-11 11:16:27 +01:00
flywind
27e548140b don't use a temp for addr [backport: 1.6] (#19503)
* don't use a temp for addr

fix #19497

* Update compiler/ccgcalls.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* add a test

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-02-08 08:34:44 +01:00
Andrey Makarov
801c0f0369 Fix bug 27 of #17340 (#19433)
Fixes silent disappearance of Markdown (pseudo-)link when it's detected as
unsafe protocol. Now it will be converted to plain text in spirit of
[the specification](https://spec.commonmark.org/0.30/#links).
For that sake the check for protocol is added to rst.nim also.
2022-02-07 18:11:53 -05:00
Federico Ceratto
4b0636fba0 Add compilers and hints to default nim.cfg (#18424) 2022-02-07 18:05:41 -05:00
flywind
28180e47a9 disable nimlsp (#19499) 2022-02-07 14:04:04 +08:00
Roj
6b302bb71b Improve consistency (#19490) 2022-02-07 10:28:54 +08:00
flywind
d0287748fe setjump => setjmp [backport: 1.2] (#19496) 2022-02-06 08:51:03 +01:00