summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
Commit message (Collapse)AuthorAgeFilesLines
* unpublic the sons field of PType; the precursor to PType refactorings (#22446)ringabout2023-08-111-2/+2
| | | | | | | | | | | * unpublic the sons field of PType * tiny fixes * fixes an omittance * fixes IC * fixes
* fixes move sideeffects issues [backport] (#22439)ringabout2023-08-101-3/+15
| | | | | | | * fixes move sideeffects issues [backport] * fix openarray * fixes openarray
* `getTemp` and friends now return `TLoc` as requested (#22440)ringabout2023-08-101-37/+29
| | | getTemp and friends now return `TLoc`
* `initLocExpr` and friends now return `TLoc` (#22434)ringabout2023-08-101-235/+164
| | | `initLocExpr` and friends now return TLoc
* simplify isAtom condition (#22430)ringabout2023-08-091-4/+1
|
* clean up `gc:arc` or `gc:orc` in docs and in error messages (#22408)ringabout2023-08-081-1/+1
| | | | | * clean up gc:arc/orc in docs * in error messages
* use out parameters for getTemp (#22399)ringabout2023-08-071-11/+17
|
* use strictdefs for compiler (#22365)ringabout2023-08-061-105/+116
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* Revert "fix #22173 `sink` paramers not moved into closure (refc) (#22… ↵Bung2023-08-031-9/+6
| | | | | | | (#22376) Revert "fix #22173 `sink` paramers not moved into closure (refc) (#22359)" This reverts commit b40da812f7aa590ed16df54a492684c228320549.
* fix #22173 `sink` paramers not moved into closure (refc) (#22359)Bung2023-08-021-6/+9
| | | | | * use genRefAssign when assign to sink string * add test case
* implement `ensureMove` (#22339)ringabout2023-07-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement `ensureMove` * use an additional flag * improve some logics * progress: fixes discard ensureMove * forbids nested expressions * improve error messages * checkpoint * fixes cursor * ADD MORE TESTS * fixes cursorinference again * tiny cleanup * improve error messages * fixes docs * implement comments add more tests * fixes js
* fixes #22268; fixes `move` codegen (#22288)ringabout2023-07-191-0/+7
|
* fixes #22175 (#22229)Andreas Rumpf2023-07-061-2/+5
|
* alternative to #22219; adds a pointer wrapper for T destructor (#22225)ringabout2023-07-061-4/+0
| | | | | | | | | | | | | | | * alternative to #22219; adds a pointer wrapper for T destructor * clean up and add comments * Update compiler/ccgtypes.nim * tidy up * fixes comments * fixes cpp * fixes cpp
* fixes #19101; zero initialization union casts (#22185)ringabout2023-06-291-2/+9
| | | | | | | * zero initialization union casts * cleans up and adds a test case for #19101 * uses nimZeroMem
* fixes #16331; aliasing of tuple construction within a single assignme… ↵Andreas Rumpf2023-06-161-3/+18
| | | | | | | (#22113) * fixes #16331; aliasing of tuple construction within a single assignment, great coding style * added test case
* fixes explicit deref block (#22093)ringabout2023-06-151-2/+0
| | | fixes explicit deref
* make `move` use `=wasMoved` internally (#22032)ringabout2023-06-091-1/+2
| | | | | | | | | | | | | * make `move` use `=wasMoved` internally * fixes tests * fixes spawn finally * fixes views * rename to internalMove * add a test case
* lift the `=dup` hook (#21903)ringabout2023-06-021-10/+0
| | | | | | * fixes tests again * remove helper functions * fixes closures, owned refs * final cleanup
* fixes fieldDefect loses enum type info in ORC; consistent with VM and refc ↵ringabout2023-05-291-10/+13
| | | | | (#21954) fixes fieldDefect loses enum type info in ORC
* fixes #15428 by updating deep open array copy codegen (#21935)heterodoxic2023-05-271-2/+3
| | | | | * fix #15428 * add test
* fix #10964 by honoring pointer deref syntax if a reified openarray is used ↵heterodoxic2023-05-271-2/+11
| | | | | | | to get an array's length (#21925) * fix #10964 * add test
* implements allow byref to work in params #21873 (#21875)Juan M Gómez2023-05-211-7/+7
|
* refactor gettypedesc so it accepts its own kind instead of symkind (#21867)Juan M Gómez2023-05-191-10/+10
|
* fix #21848 (#21852)heterodoxic2023-05-151-7/+8
|
* bring #21802 back; fixes #21753 [backport] (#21815)ringabout2023-05-111-2/+2
| | | | | | | | | | | | | * bring #21802 back; fixes #21753 [backport] * adds tests and multiple fixes * add test cases * refactor and remove startId * fixes custom hooks and adds tests * handle tyUncheckedArray better
* adds an experimental `mm:atomicArc` switch (#21798)ringabout2023-05-081-3/+3
|
* implement `=dup` hook eliminating `wasMoved` and `=copy` pairs (#21586)ringabout2023-05-061-0/+10
| | | | | | | | | | | | | | | | | | | * import `=dup` hook eliminating `wasMoved` and `=copy` pairs * add dup * add a test for dup * fixes documentation * fixes signature * resolve comments * fixes tests * fixes tests * clean up
* amends #21690 to fix broken Nim to C++ source line mappings (#21784)heterodoxic2023-05-041-39/+39
| | | resync fork
* improve C/C++ debug output readability (1/N) (#21690)heterodoxic2023-04-281-40/+40
| | | | | * hacky attempt to reconcile default explicit constructors with enforcement of brace initialization, instead of memsetting imported objects to 0 * improve C/C++ debug output readability (1/N)
* fixes #21540; deref block at transf phase to make injectdestructors function ↵ringabout2023-04-191-14/+1
| | | | | | | | | | | | | properly (#21688) * fixes #21540; deref block at transf phase to make injectdestructors function properly * add a test case * add one more test * fixes the type of block * transform block
* fixes #21632; enforce deref for `wasMoved` in ORC (#21647)ringabout2023-04-121-1/+1
| | | fixes #21632; enforce deref for `wasMoved`
* remove `seq[T]` `setLen` undefined behavior (#21582)tersec2023-03-291-1/+1
| | | remove seq[T] setLen UB
* fixes #20139; hash types based on its path relative to its package path ↵ringabout2023-03-021-2/+2
| | | | | | | | | | | | | | | (#21274) [backport:1.6] * fixes #20139; hash types based on its path relative its project * add a test case * fixes procs * better implementation and test case --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep th… ↵Andreas Rumpf2023-03-021-1/+4
| | | | | (#21459) fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
* fixes #21333; bad codegen for the at operator; [backport:1.6] (#21344)Andreas Rumpf2023-02-081-1/+1
|
* fix #15117 zero size array cause incorrect codegen for VCC compiler (#21197)Bung2022-12-301-0/+2
| | | fix #15117
* fix #14667 (#21190)Bung2022-12-281-0/+4
|
* fix #20997 calling system.card[T](x: set[T]) with T of int8 or uint8 … ↵Bung2022-12-231-1/+1
| | | | | | | (#21010) * fix #20997 calling system.card[T](x: set[T]) with T of int8 or uint8 uses mismatched C array sizes * fullfil set variant
* fix #21045; getTime with vmopsDanger is broken; alternative to #21054 (#21056)ringabout2022-12-101-0/+1
| | | | | * fix #21045 getTime with vmopsDanger is broken; alternative to #21054 * typo
* fixes #20954; bounchecks for len(toOpenArray()) [backport] (#20956)ringabout2022-12-051-0/+4
| | | | | * bounchecks for len(toOpenArray()) * add a testcase
* Revert "fixes #20699; generate an empty struct for void type" (#20806)Andreas Rumpf2022-11-121-1/+6
| | | | | | | * Revert "fixes #20699; generate an empty struct for void type (#20790)" This reverts commit 8fcb9380f076e55bde29e365d395bd0603fc6229. * better fix [backport]
* reduce openArray-related C undefined behavior (#20795)tersec2022-11-091-5/+7
|
* implements display based subtype checking (6.4x faster without threads; 2.8x ↵ringabout2022-11-081-19/+19
| | | | | | | | faster with threads) (#20781) * WIP: fast 'of' operator based on the literature * implement display based subtype checking Co-authored-by: Araq <rumpf_a@web.de>
* Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738)Bung2022-11-041-1/+10
| | | | | | * add test case * refactoring transformAddrDeref and fix #18079 * fix jsgen
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-1/+1
| | | | | * fixes #20572 * added a test case
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fresh start * add cpp target * add result support * add nimPreviewRangeDefault * reduce * use orc * refactor common parts * add tuple support * add testcase for tuple * cleanup; fixes nimsuggest tests * there is something wrong with cpp * remove * add support for seqs * fixes style * addd initial distinct support * remove links * typo * fixes tuple defaults * add rangedefault * add cpp support * fixes one more bugs * add more hasDefaults * fixes ordinal types * add testcase for #16744 * add testcase for #3608 * fixes docgen * small fix * recursive * fixes * cleanup and remove tuple support * fixes nimsuggest * fixes generics procs * refactor * increases timeout * refactor hasDefault * zero default; disable i386 * add tuples back * fixes bugs * fixes tuple * add more tests * fix one more bug regarding tuples * more tests and cleanup * remove messy distinct types which must be initialized by original types * add tests * fixes zero default * fixes grammar * fixes tests * fixes tests * fixes tests * fixes comments * fixes and add testcase * undo default values for results Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* remove hack for deprecated csize in compiler (#20463)metagn2022-10-011-2/+1
| | | | | * remove hack for deprecated csize in compiler * remove test
* store full definition AST for consts, fix noRewrite (#20115)metagn2022-09-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * continue #9582 for consts, close #9331, fix #20114 also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc * changelog correctly * fix jsgen * update tgetimpl * fix sighashes * fix #19766, add comment about postfix * fix noRewrite LOL refs #16620 * fix changelog * fix destructors
* fixes #20141; dereferencing pointer to incomplete type error with cast (#20147)ringabout2022-09-281-0/+5
| | | Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>