| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
fixes #22519
|
|
|
|
| |
fixes #22246
resurrects #22350
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
| |
- Add Atomic ARC to Documentation. Documentation only, tiny diff.
|
|
|
|
|
|
|
| |
(#22722)
…in typeMasked
fixes #22687
|
|
|
|
|
|
|
|
|
|
|
|
| |
`{.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.

Likewise, the index checking is probably not needed.
|
| |
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
|
|
|
| |
closes #8390, closes #11726, closes #8446, closes #21221, closes #7461,
closes #7995
|
|
|
| |
fixes #22726
|
| |
|
|
|
| |
fixes #22692
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
see https://github.com/nim-lang/Nim/issues/22674
|
|
|
| |
fixes #22700
|
|
|
|
|
|
| |
fixes #21615; fixes #16735
It also partially fixes | #22673, though It still gives 'baseless'
warnings.
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Close #22713
---------
Co-authored-by: SirOlaf <>
|
|
|
| |
fixes #22699
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
| |
-
https://github.com/nim-lang/Nim/actions/runs/6187256704/job/16796720625#step:4:29
- https://github.com/nim-lang/Nim/issues/22699
|
| |
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
| |
followup of #19771.
|
| |
|
|
|
|
| |
proc return it (#22684)
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/11955
|
|
|
|
|
|
|
|
|
|
|
|
| |
* `PrepareSeqAdd`
* `add`
* `setLen`
* `grow`
Merge after #21842.
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
|
|
|
| |
fixes #22669 constructor pragma doesnt init Nim default fields
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
| |
proc return it (#22681)
|
| |
|
|
|
|
|
|
|
| |
It's used in `newSeqUninitialized`.
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
| |
fixes #22676
If csource or CI forbids it, we can always fall back to adding it to the
nonPragmaWords list. I doubt it was used outside of the system since it
was used to implement & or something for magics.
|
|
|
|
|
|
|
|
|
|
| |
Attempts to move the generic instantiation to the module that uses it.
This should decrease re-compilation times as the source module where the
generic lives doesnt need to be recompiled
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
| |
fixes #22664
|
|
|
|
|
|
|
|
|
|
| |
fields (#22665)
fixes #22662 Procs with constructor pragma doesn't initialize object's
fields
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Close #21742
Checking if there's any side-effects and if just changing typeRel is
adequate for this issue before trying to look into related ones.
`skipBoth` is also not that great, it can lead to code that works
sometimes but fails when the proc is instantiated with branching
aliases. This is mostly an issue with error clarity though.
---------
Co-authored-by: SirOlaf <unknown>
Co-authored-by: SirOlaf <>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Close #17509
Current knowledge:
- delaying cache fixes the issue
- changing return of `if inst.len < key.len:` in `searchInstTypes` to
`continue` fixes the issue. With return the broken types are also cached
over and over
Related issues are completely unaffected as of now, so there must be
something deeper.
I am also still trying to find the true cause, so feel free to ignore
for now
---------
Co-authored-by: SirOlaf <>
|
|
|
|
|
|
|
|
| |
* `prepareAdd`
* `toNimStr`
* `setLengthStrV2`
* `NimAsgnStrV2`
* `prepareMutation`
* Some cleanups
|
|
|
|
|
|
|
|
|
|
| |
Move `symFromType` and `symNodeFromType` from `sem`, and `isSelf` and
`makeTypeDesc` from `concepts` into `semdata`.
`makeTypeDesc` was moved out from semdata [when the `concepts` module
was
added](https://github.com/nim-lang/Nim/commit/6278b5d89af38e90aa30cfc4c217a2f4b1323339),
so its old position might have been intended. If not, `isSelf` can also
go in `ast`.
|
|
|
|
|
|
| |
refs #22650
Docs CI cover standard library runnable examples that aren't covered by
the test suite and can be affected by compiler changes without knowing
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #22639 for the third time
Nodes generated by `getType` for `tyGenericInst` types, instead of
having the original `tyGenericInst` type, will have the type of the last
child (due to the `mapTypeToAst` calls which set the type to the given
argument). This will cause subsequent `getType` calls to lose
information and think it's OK to use the sym of the instantiated type
rather than fully expand the generic instantiation.
To prevent this, update the type of the node from the `mapTypeToAst`
calls to the full generic instantiation type.
|
|
|
| |
refs https://github.com/andreaferretti/neo/pull/53
|
| |
|
|
|
|
|
|
|
| |
reverts #22642, reopens #22639, closes #22646, refs #22650, refs
https://github.com/alaviss/union/issues/51, refs #22652
The fallout is too much from #22642, we can come back to it if we can
account for all the affected code.
|