summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* fixes #22763; nimcache in nim.cfg uses the relative path to the config file ↵ringabout2023-09-285-3/+16
| | | | | (#22764) fixes #22763
* C++ Adds support for default arg using object construction syntax. Fixes a ↵Juan M Gómez2023-09-282-3/+35
| | | | | | | | | | compiler crash (#22768) `Foo()` below makes the compiler crash. ```nim proc makeBoo(a:cint = 10, b:cstring = "hello", foo: Foo = Foo()): Boo {.importcpp, constructor.} ```
* ref #19727; implement `setLenUninit` for seqsv2 (#22767)ringabout2023-09-282-0/+26
| | | ref #19727
* Removed `localStorage.hasKey` binding (#22766)Thiago2023-09-281-1/+0
| | | | | | | | Doesn't exists anymore. Use `window.localStorage.getItem("key").isNil` instead ![Screenshot from 2023-09-28 07-22-41](https://github.com/nim-lang/Nim/assets/74574275/65d58921-58c7-4a81-9f3b-5faa3a79c4f2)
* Fix #21407 (#22759)Juan Carlos2023-09-282-0/+9
| | | | | | | - Fix #21407 --------- Co-authored-by: Amjad Ben Hedhili <amjadhedhili@outlook.com>
* Documentation only (#22760)Juan Carlos2023-09-271-12/+12
| | | | - Documentation only. - Sometimes newbies try to use Valgrind with RefC etc.
* iNim switch to the official URL (#22762)ringabout2023-09-271-1/+1
| | | ref https://github.com/inim-repl/INim/pull/139
* Documentation only (#22761)Juan Carlos2023-09-271-0/+4
| | | - Mention Bisect bot in Bisect documentation.
* fixes #10542; suppresses varargs conversion warnings (#22757)ringabout2023-09-263-2/+27
| | | | fixes #10542 revives and close #20169
* Add test case for #15351 (#22754)Jake Leahy2023-09-261-0/+5
| | | | | Closes #15351 Stumbled across the issue and found it now works
* fixes stint CI (#22756)ringabout2023-09-261-1/+1
|
* fixes #22706; turn "unknown hint" into a hint (#22755)ringabout2023-09-252-1/+7
| | | fixes #22706
* Make `newStringUninit` available in the VM [backport] (#22748)Amjad Ben Hedhili2023-09-251-9/+12
| | | It's equivalent to `newString`.
* Update Bisect (#22750)Juan Carlos2023-09-251-15/+16
| | | | | | | | | | | | | | | | | - Support multiple OS Bisects (Linux, Windows, MacOS). - Install Valgrind only if needed to speed up non-Valgrind builds. - Valgrind+MacOS bisect support. - Show IR of OK repro code samples. - YAML only, tiny diff. #### New features - Bisect bugs that only reproduce on Windows and OSX. #### See also - https://github.com/juancarlospaco/nimrun-action/pull/10
* Add magic toOpenArrayChar (#22751)SirOlaf2023-09-241-0/+3
| | | | | | Should help with stuff like the checksums package which only takes `openArray[char]` Co-authored-by: SirOlaf <>
* Fix `newStringUninit` not setting the '\0' terminator [backport] (#22746)Amjad Ben Hedhili2023-09-231-2/+6
| | | Causes problems when working with `cstring`s.
* Initialize `newString` in js [backport:1.6] (#22745)Amjad Ben Hedhili2023-09-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | ```nim echo newString(8) ``` results in: ``` D:\User\test.js:25 var code_33556944 = c_33556931.toString(16); ^ TypeError: Cannot read properties of undefined (reading 'toString') at toJSStr (D:\User\test.js:25:50) at rawEcho (D:\User\test.js:70:16) at Object.<anonymous> (D:\User\test.js:101:1) at Module._compile (node:internal/modules/cjs/loader:1095:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 Node.js v17.0.1 Error: execution of an external program failed: '"C:\Program Files\nodejs\node.exe" --unhandled-rejections=strict D:\User\test.js' ```
* Make `newStringUninit` available on the js backend [backport] (#22743)Amjad Ben Hedhili2023-09-231-0/+3
|
* fixes #22519; DocGen does not work for std/times on JS backend (#22738)ringabout2023-09-221-3/+3
| | | fixes #22519
* fixes #22246; generate __builtin_unreachable hints for case defaults (#22737)ringabout2023-09-212-4/+8
| | | | fixes #22246 resurrects #22350
* moves `addUnique` to `std/sequtils` (#22734)Juan M Gómez2023-09-212-5/+29
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Documentation only (#22735)Juan Carlos2023-09-211-12/+13
| | | - Add Atomic ARC to Documentation. Documentation only, tiny diff.
* fixes #22687; js backend - std/bitops/bitsliced throws compile error … ↵ringabout2023-09-212-1/+5
| | | | | | | (#22722) …in typeMasked fixes #22687
* items, pairs and friends now use `unCheckedInc` (#22729)ringabout2023-09-202-26/+35
| | | | | | | | | | | | `{.push overflowChecks: off.}` works in backends. Though it could be implemented as a magic function. By inspecting the generated C code, the overflow check is eliminated in the debug or release mode. ![image](https://github.com/nim-lang/Nim/assets/43030857/49c3dbf4-675e-414a-b972-b91cf218c9f8) Likewise, the index checking is probably not needed.
* removes references to `this` in the `constructor` section (#22730)Juan M Gómez2023-09-201-4/+3
|
* fixes compiler crash by preventing exportc on generics (#22731)Juan M Gómez2023-09-202-3/+14
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* `constructor` now uses `result` instead of `this` (#22724)Juan M Gómez2023-09-193-37/+13
|
* second test case haul for templates and generics (#22728)metagn2023-09-196-6/+62
| | | | closes #8390, closes #11726, closes #8446, closes #21221, closes #7461, closes #7995
* make parseEnum skip type aliases for enum type sym (#22727)metagn2023-09-192-5/+17
| | | fixes #22726
* Fix `capacity` for const and shallow [backport] (#22705)Amjad Ben Hedhili2023-09-184-8/+8
|
* fixes #22692; ships `ci/funs.sh` (#22721)ringabout2023-09-181-0/+1
| | | fixes #22692
* Add descriptions and examples for `rawProc` and `rawEnv` (#22710)sls10052023-09-181-1/+31
| | | | | | | | | | Add descriptions for `rawProc` and `rawEnv`. See <https://forum.nim-lang.org/t/10485> for more informations. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Update osfiles.nim, make `moveFile` consider permission on *nix (#22719)litlighilit2023-09-181-1/+1
| | | see https://github.com/nim-lang/Nim/issues/22674
* fixes incorrect cint overflow in system (#22718)ringabout2023-09-182-2/+2
| | | fixes #22700
* fixes `result` requires explicit initialization on noReturn code (#22717)ringabout2023-09-182-1/+28
| | | | | | fixes #21615; fixes #16735 It also partially fixes | #22673, though It still gives 'baseless' warnings.
* prevents declaring a constructor without importcpp fixes #22712 (#22715)Juan M Gómez2023-09-182-2/+22
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make expressions opt in to symchoices (#22716)metagn2023-09-1811-64/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refs #22605 Sym choice nodes are now only allowed to pass through semchecking if contexts ask for them to (with `efAllowSymChoice`). Otherwise they are resolved or treated as ambiguous. The contexts that can receive symchoices in this PR are: * Call operands and addresses and emulations of such, which will subject them to overload resolution which will resolve them or fail. * Type conversion operands only for routine symchoices for type disambiguation syntax (like `(proc (x: int): int)(foo)`), which will resolve them or fail. * Proc parameter default values both at the declaration and during generic instantiation, which undergo type narrowing and so will resolve them or fail. This means unless these contexts mess up sym choice nodes should never leave the semchecking stage. This serves as a blueprint for future improvements to intermediate symbol resolution. Some tangential changes are also in this PR: 1. The `AmbiguousEnum` hint is removed, it was always disabled by default and since #22606 it only started getting emitted after the symchoice was soundly resolved. 2. Proc setter syntax (`a.b = c` becoming `` `b=`(a, c) ``) used to fully type check the RHS before passing the transformed call node to proc overloading. Now it just passes the original node directly so proc overloading can deal with its typechecking.
* Fix #22713: Make size unknown for tyForward (#22714)SirOlaf2023-09-172-4/+15
| | | | | | | Close #22713 --------- Co-authored-by: SirOlaf <>
* implement semgnrc for tuple and object type nodes (#22709)metagn2023-09-163-3/+52
| | | fixes #22699
* Document C++ Initializers (#22704)Juan M Gómez2023-09-151-0/+27
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Fix Bisect bot (#22703)Juan Carlos2023-09-141-1/+3
| | | | | - https://github.com/nim-lang/Nim/actions/runs/6187256704/job/16796720625#step:4:29 - https://github.com/nim-lang/Nim/issues/22699
* followup of #22568 (#22690)Amjad Ben Hedhili2023-09-141-24/+17
|
* implements RFC: [C++] Constructors as default initializers (#22694)Juan M Gómez2023-09-146-41/+119
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* refactor semtempl ident declarations, some special word use (#22693)metagn2023-09-142-64/+44
| | | | | | | | | `semtempl` is refactored to combine the uses of `getIdentNode`, `onlyReplaceParams`, `isTemplParam` and most of `replaceIdentBySym` into a single `getIdentReplaceParams` proc. This might fix possible problems with injections of `nkAccQuoted`. Some special word comparison in `ast` and `semtempl` are also made more efficient.
* Make capacity work with refc [backport] (#22697)Amjad Ben Hedhili2023-09-133-11/+26
| | | followup of #19771.
* produce better code for object constructions and 'result' [backport] (#22668)Andreas Rumpf2023-09-113-12/+29
|
* fixes #22680 Nim zero clear an object inherits C++ imported class when a ↵Juan M Gómez2023-09-112-3/+60
| | | | proc return it (#22684)
* fixes the `discVal` register is used after free in vmgen (#22688)ringabout2023-09-111-1/+1
| | | follow up https://github.com/nim-lang/Nim/pull/11955
* Remove some unnecessary initialization in `seq` operations (#22677)Amjad Ben Hedhili2023-09-101-7/+35
| | | | | | | | | | | | * `PrepareSeqAdd` * `add` * `setLen` * `grow` Merge after #21842. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* renderIr should print the actual return assign node (#22682)ringabout2023-09-101-2/+2
| | | | | | | | | | | | | | | | | | follow up https://github.com/nim-lang/Nim/pull/10806 Eventually we need a new option to print high level IR. It's confusing when I'm debugging the compiler without showing `return result = 1` using the expandArc option. For ```nim proc foo: int = return 2 ``` It now outputs when expanding ARC IR ```nim proc foo: int = return result = 2 ```