summary refs log tree commit diff stats
path: root/compiler/lowerings.nim
Commit message (Collapse)AuthorAgeFilesLines
* type refactoring: part 2 (#23059)Andreas Rumpf2023-12-131-5/+5
|
* Types: Refactorings; step 1 (#23055)Andreas Rumpf2023-12-121-3/+3
|
* IC: progress and refactorings (#22961)Andreas Rumpf2023-11-201-2/+2
|
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-241-19/+0
| | | | | | | | | | | | | | | * round out tuple unpacking assignment, support underscores fixes #18710 * fix test messages * use discard instead of continue Co-authored-by: Andreas Rumpf <rumpf_a@web.de> --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22419; async/closure environment does not align local variables (#22425)ringabout2023-08-091-0/+3
| | | | | | | | | | | | | | | | | * fixes #22419; async/closure environment does not align local variables * Apply suggestions from code review * Update tests/align/talign.nim Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * apply code review * update tests --------- Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* fixes #22268; fixes `move` codegen (#22288)ringabout2023-07-191-11/+2
|
* make `move` use `=wasMoved` internally (#22032)ringabout2023-06-091-2/+11
| | | | | | | | | | | | | * make `move` use `=wasMoved` internally * fixes tests * fixes spawn finally * fixes views * rename to internalMove * add a test case
* cheap fix for #10853 + better tuple subscript error message (#21767)metagn2023-05-021-1/+1
| | | | | | | * cheap fix for #10853 * also better tuple subscript error message * weird
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-8/+7
| | | | | | | | | | | (#21667) * refactoring in preparation for better, simpler name mangling that works with IC flawlessly * use new disamb field * see if this makes tests green * make tests green again
* warn on set types bigger than max size, default to 0..255 for int literals ↵metagn2023-04-171-1/+2
| | | | | | | | | | | | | | | | | | | (#21659) * test implicitly huge set types refs https://github.com/nim-lang/RFCs/issues/298 * oh my god * boot at least * don't error, fix remaining issues, no 2 len arrays * fix runnable example * test assuming 0..255 for int literal * test refactor, add changelog, test
* Fixed noinit pragma for closure variables (#20101)Yuriy Glukhov2022-07-281-1/+2
|
* Fix bug in freshVarForClosureIter. Fixes #18474 (#19675) [backport]flywind2022-04-041-1/+2
| | | | | | | | | | * Fix bug in freshVarForClosureIter. Fixes #18474. freshVarForClosureIter was returning non-fresh symbols sometimes. Fixed by making addField return the generated PSym. * remove discardable Co-authored-by: Nick Smallbone <nick@smallbone.se>
* mitigates #19364 [backport]; we make this bug more unlikely to appear by ↵Andreas Rumpf2022-03-261-6/+12
| | | | producing better code to begin with; real fix will come later (#19647)
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-9/+9
| | | | | | | | | | | | | | | | | | | * reworked ID handling * the packed AST now has its own ID mechanism * basic serialization code works * extract rodfiles to its own module * rodfiles: store and compare configs * rodfiles: store dependencies * store config at the end * precise dependency tracking * dependency tracking for rodfiles * completed loading of PSym, PType, etc * removed dead code * bugfix: do not realloc seqs when taking addr into an element * make IC opt-in for now * makes tcompilerapi green again * final cleanups Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
* fix #15463 (#15831)flywind2020-11-051-0/+1
|
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-29/+32
| | | | | | | | | | | | | | | | | * 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)
* fixes #15076 (#15329)Andreas Rumpf2020-09-151-1/+1
|
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-11/+0
| | | | | | | | | * Expand hoisted default params in sem Introduce ast.newTree{I,IT} Add test for default params in procs * Cleanup * Simplify hoist transformation and expand test
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-1/+1
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* Step2: fixes #13781, fixes #13805 (#13897)cooldome2020-04-161-0/+7
| | | | | | | | | * Fix sym owner in wrapper proc * threadpool changes * revert lowerings * add newFastMoveStmt * try fixing test by switching to cpp Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #13708 (#13711)cooldome2020-03-211-2/+2
| | | | | | * fixes #13708 * differentiate between arc and rest of GC Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #13368 (#13397)cooldome2020-02-141-2/+3
|
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-1/+1
| | | | a few magic numbers with consts (#13170)
* Sink to MemMove optimization in injectdestructors (#13002)cooldome2020-01-021-2/+8
|
* fixes #12989 (#12992)cooldome2019-12-311-1/+0
| | | | | | | * fixes #12989 * Revert "remove unwanted changes" This reverts commit 501829732a8e44deef2d815c303859efbe452cb5.
* Revert "fixes #12989"Andrii Riabushenko2019-12-311-0/+1
| | | | This reverts commit 928c2fee06bd11a0901c5f563b4953788be76ae6.
* fixes #12989Andrii Riabushenko2019-12-311-1/+0
|
* ARC: fixes cycle detection and move the .cursor attribute into closures (#12872)Andreas Rumpf2019-12-111-0/+1
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-76/+76
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* ARC: ported the GC tests over to --gc:arcAraq2019-11-261-0/+1
|
* Revert "ARC: another critical bugfix; temporary tuples we introduce for ↵narimiran2019-11-241-1/+0
| | | | | | tuple unpackaging are not owning the data" This reverts commit 8b2f8f5430e8c328efe5bce94e397f15e3c501af.
* ARC: another critical bugfix; temporary tuples we introduce for tuple ↵Araq2019-11-221-0/+1
| | | | unpackaging are not owning the data
* more arc improvements (#12690)Andreas Rumpf2019-11-201-0/+8
| | | | | * ARC: bugfix for =destroy for inherited objects * added code useful for debugging
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-5/+5
| | | | | * Remove sonsLen * Use Indexable
* Support iterators returning lent T (#11938)cooldome2019-08-311-2/+2
| | | | | | | * lent iterators * rebase tests * update changelog * fix comments, more tests
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-2/+2
| | | | * fixes #11847
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+0
|
* [refactoring] moves transformation for 'spawn' into its own spawn.nim ↵Araq2019-07-141-428/+15
| | | | implementation
* fixes #7057Andreas Rumpf2019-07-061-1/+1
|
* [bugfix] owned closures (#11544)Andreas Rumpf2019-06-201-0/+3
|
* fixes #11215Araq2019-05-121-2/+2
|
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-2/+2
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-2/+2
|
* added lowerings.evalOnceAraq2019-04-091-0/+16
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-1/+1
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* added lowerings.genLen helper procAndreas Rumpf2019-03-141-0/+9
|
* Tuple unpacking now works for `for` vars (#10152)Neelesh Chandola2019-02-231-6/+14
| | | | | | | | * Tuple unpacking now works for `for` vars * Give error if length of tuple vars != length of tuple * Fix error message showing wrong tuple length * unpacking now works now for mutable items * Update changelog
* Destructors: more moves for tuples (#9808)cooldome2018-11-271-1/+1
|
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-0/+2
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux