summary refs log tree commit diff stats
path: root/compiler/transf.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #23536; Stack trace with wrong line number when the proc called inside ↵ringabout2024-04-261-6/+8
| | | | | for loop (#23540) fixes #23536
* fixes #4299 #12492 #10849; lambda lifting for JS backend (#23484)ringabout2024-04-111-1/+0
| | | | | | | | fixes #4299 fixes #12492 fixes #10849 It binds `function` with `env`: `function.bind(:env)` to ease codegen for now
* fixes addr/hiddenAddr in strictdefs (#23477)ringabout2024-04-101-4/+0
|
* refactoring: no inheritance for PType/PSym (#23403)Andreas Rumpf2024-03-141-12/+14
|
* fixes #19977; rework inlining of 'var openarray' iterators for C++ (#23258)ringabout2024-01-261-1/+2
| | | fixes #19977
* fixes #22552 (#23014)Andreas Rumpf2023-12-021-2/+17
|
* NIR: progress (#22817)Andreas Rumpf2023-10-121-26/+26
| | | | | | Done: - [x] Implement conversions to openArray/varargs. - [x] Implement index/range checking.
* `initNodeTable` and friends now return (#22444)ringabout2023-08-111-3/+1
|
* use strictdefs for compiler (#22365)ringabout2023-08-061-2/+6
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* fixes #22237; fixes #21160; wrong cursor on unowned parameters in the for ↵ringabout2023-07-101-2/+15
| | | | | loop in ORC (#22240) fixes #22237; fixes #21160; wrong cursor on unowned parameters
* fixes #22148; std/memfiles.memSlices nesting now fails with memory sa… ↵ringabout2023-06-251-1/+1
| | | | | | | (#22154) * fixes #22148; std/memfiles.memSlices nesting now fails with memory safety capture violation * adds a test case
* fixes #21110; duplicate proc definitions for inline iters (#21136)ringabout2023-06-221-0/+8
| | | fixes #21110; duplicate proc definitions for iters
* fixes explicit deref block (#22093)ringabout2023-06-151-1/+3
| | | fixes explicit deref
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-4/+3
| | | | | | | | | | | (#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
* fixes #21540; deref block at transf phase to make injectdestructors function ↵ringabout2023-04-191-1/+15
| | | | | | | | | | | | | 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 #21306; fixes #20485; don't transform yields in the var section when ↵ringabout2023-03-101-1/+4
| | | | | | | | | | | introducing new local vars [backport: 1.6] (#21489) * fixes #21306; don't transform yields in the var section when introducing new local vars * adds `inVarSection` so the var section in the var section is freshed * use `isIntroducingNewLocalVars` to avoid yield transformations in var sections * fixes comments
* Force lambda lifting for getImplTransformed. Hacky. Fixes #19818 (#21031)Yuriy Glukhov2023-01-191-3/+3
|
* remove duplicate assignment (#21050)ringabout2022-12-091-1/+0
| | | `newNodeIT` has already assigned `n.typ` to x.
* fixes #20856; store defaults directly (#20859)ringabout2022-11-171-7/+0
| | | | | | | | | | | * fixes #20856; store defaults directly * fixes * fixes * check * fixes
* Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738)Bung2022-11-041-8/+10
| | | | | | * add test case * refactoring transformAddrDeref and fix #18079 * fix jsgen
* refactorings (#20536)Andreas Rumpf2022-10-101-5/+9
| | | | | | | * refactoring * refactoring: removed unused macroUsagesSection * enum instead of bool for better readability
* cleanup nfFirstWrite flags (#20500)Andreas Rumpf2022-10-051-1/+1
|
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* new move analyser2 (#20471)Andreas Rumpf2022-10-011-5/+7
| | | | | | | | * produce better code for closure environment creation * new 'first write' analysis; * scope based move analyser * code cleanup Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* store full definition AST for consts, fix noRewrite (#20115)metagn2022-09-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | * 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
* document compiler procs regarding `&` (#20257)ringabout2022-08-221-0/+5
|
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* Fixed distinct composite type class proc borrowing (#18904)Jason Beetham2021-10-261-0/+8
| | | | | | | * Fixed composite type class proc borrowing * Moved borrow search into transf * added borrow check to symbol flag
* fixes #12642 (#18811)Andreas Rumpf2021-09-061-2/+3
| | | | | | | | | | | | | | | | | | | * fixes #12642 * update important packages; refs #18804 * fixes #18805; refs #18806 * fixes a regression * Update testament/categories.nim Co-authored-by: flywind <xzsflywind@gmail.com> * progress * progress Co-authored-by: flywind <xzsflywind@gmail.com>
* fixes #14165, fixes #18739, fix the second example of #6269 (#18812)Andreas Rumpf2021-09-061-4/+7
|
* remove unnecessary if statement (#18792)flywind2021-09-031-6/+6
|
* fix #9778 (pairs iterator calling a helper proc with tuple return type will ↵flywind2021-09-021-11/+44
| | | | | | | | | | | cut the iterator yield into half) (#18767) * test someSymFromImportTable * Update compiler/lookups.nim * test nkTupleConstr * use isConstExpr * add tests * add comments and todo * use todo
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-2/+2
| | | | cstring, not cString (#17744)
* IC: bugfix (#17533)Andreas Rumpf2021-03-271-4/+2
| | | | * cleanups * IC: bugfix
* fixes #11225; generic sandwich problems; [backport:1.2] (#17255)Andreas Rumpf2021-03-091-1/+1
| | | | | * fixes #11225; generic sandwich problems; [backport:1.2] * progress * delegating these symbols must be done via 'bind'
* IC: next steps (#16729)Andreas Rumpf2021-01-231-1/+3
| | | | | | | | | | | * IC: dead code elimination pass * preparations for a different codegen strategy * added documentation to the newly written code * IC: backend code * IC: backend adjustments * optimized the compiler a bit * IC: yet another massive refactoring * fixes regressions * cleanups
* Fix 16722 (#16730)cooldome2021-01-151-0/+2
| | | | | | | * fix #16722 * fix spacing * spacing
* IC: next steps (#16705)Andreas Rumpf2021-01-141-2/+2
| | | | | | | | | | | * code cleanups * refactorings for IC * more refactorings for IC * IC: attach the 'nil' type to its module * IC: refactorings and improvements * IC: progress * IC: more serialization fixes * IC: embarrassing omission * code cleanups
* IC: next steps (#16550)Andreas Rumpf2021-01-071-7/+8
| | | | | | | | | | | | | | | | | | * cleanups * ast.nim: cleanups * IC: no more sym.tab field, stored externally in the module graph * nimble compiles again * rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly * rodfiles: added compilerproc and export sections * rodfiles: added all the missing sections * rodfiles: track the missing information * IC: architecture for lazy loading of proc bodies * make tests green again * completed the lazy loading of proc bodies * symbol lookup integration, part 1 * symbol lookup integration, part 2 * symbol lookup integration, part 3 * make tcompilerapi work again * rodfiles: fixed config change handling
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-3/+3
| | | | | | | | | | | | | | | | | | | * 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>
* fixes #16069; [backport:1.2] [backport:1.4] (#16115)Andreas Rumpf2020-11-241-0/+5
| | | | | * fixes #16069; refs https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] [backport:1.4] * make tests green again
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-30/+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)
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-0/+1
| | | | | | | | | * implements https://github.com/nim-lang/RFCs/issues/258 * don't be too strict with custom pragma blocks * cast pragmas: documentation * added most missing inference query procs to effecttraits.nim
* implements https://github.com/nim-lang/RFCs/issues/257 (#15466)Andreas Rumpf2020-10-021-7/+0
|
* borrow checking (#15282)Andreas Rumpf2020-09-091-0/+4
| | | | | | | | | | | * refactoring: move procs to typeallowed.nim * frontend preparations for first class openArray support * prepare the code generator for first class openArray * code generation for first class openArray; WIP * code generation for open arrays, progress * added isViewType proc * preparations for borrow checking * added borrow checking to the front end
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-47/+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
* Use typeflag insteadClyybber2020-08-101-1/+1
|
* Make explicit {.nimcall.} a seperate calling conventionClyybber2020-08-081-1/+1
|
* fixes #15071 [backport] (#15131)Andreas Rumpf2020-07-311-3/+3
|
* arc: cursors for simple for loop variables (#15008)Andreas Rumpf2020-07-171-2/+22
| | | | | * arc: cursors for simple for loop variables * merged devel