summary refs log tree commit diff stats
path: root/compiler/cgmeth.nim
Commit message (Collapse)AuthorAgeFilesLines
* refactor: The popular 'r' field is now named 'snippet' (#23829)Andreas Rumpf2024-07-121-1/+1
|
* fixes #23273; forbids methods having importc pragmas (#23324)ringabout2024-03-031-0/+4
| | | fixes #23273
* type refactor: part 4 (#23077)Andreas Rumpf2023-12-151-10/+12
|
* Types: Refactorings; step 1 (#23055)Andreas Rumpf2023-12-121-12/+13
|
* enable vtable implementation for C++ and make it an experimental feature ↵ringabout2023-11-301-1/+1
| | | | | | | | | | | (#23004) follow up https://github.com/nim-lang/Nim/pull/22991 - [x] turning it into an experimental feature --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* rework the vtable implementation embedding the vtable array directly with ↵ringabout2023-11-281-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | new strictions on methods (#22991) **TODO** - [x] fixes changelog With the new option `nimPreviewVtables`, `methods` are confined in the same module where the type of the first parameter is defined - [x] make it opt in after CI checks its feasibility ## In the following-up PRs - [ ] in the following PRs, refactor code into a more efficient one - [ ] cpp needs special treatments since it cannot embed array in light of the preceding limits: ref https://github.com/nim-lang/Nim/pull/20977#discussion_r1035528927; we can support cpp backends with vtable implementations later on the comprise that uses indirect vtable access --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* IC: progress and refactorings (#22961)Andreas Rumpf2023-11-201-1/+1
|
* fixes #22673; Cannot prove that result is initialized for a placehold… ↵ringabout2023-11-061-1/+2
| | | | | | | | (#22915) …er base method returning a lent fixes #22673
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-1/+4
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* use strictdefs for compiler (#22365)ringabout2023-08-061-1/+6
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-2/+2
| | | | | | | | | | | (#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 #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-071-5/+1
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* fixes #21592; create type bound operations for calls in the method ↵ringabout2023-04-011-4/+8
| | | | | | | dispatcher for ORC (#21594) * fixes #21592; create type operations for the method dispatcher * add a test case
* fix dispatcher call type [backport] (#20696)Jacek Sieka2022-10-291-0/+1
| | | | | | fix dispatcher call type The call node should have the type of the dispatcher, not the static call
* Fix "imported but not used" warnings (#20575)Andrey Makarov2022-10-161-1/+1
|
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-111-17/+0
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* no ropes WIP (#20433)Andreas Rumpf2022-09-271-1/+1
| | | | | | | | | | | | | * refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite * rewrote ccgcalls.nim * refactored ccgexprs.nim * ccgliterals: refactoring * refactoring: code dealing with name mangling * refactoring: getRecordFieldsAux * ropes are strings (insert obscene joke here) * optimize JS code gen * optimizations and code improvements * more optimizations * final cleanups
* move assertions out of system (#19599)flywind2022-03-231-0/+4
|
* IC: final implementation steps (#16801)Andreas Rumpf2021-01-251-3/+1
| | | | | | | | * removed dead code * we need even more laziness for the generic caches * make it bootstrap on older Nims * wrote more deserialization code * IC: replay required methods information
* IC: next steps (#16729)Andreas Rumpf2021-01-231-2/+5
| | | | | | | | | | | * 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 #16516 method dispatch for sink args (#16594)cooldome2021-01-061-1/+1
| | | | | | | * fix #16516 * fix comment * Trigger build
* 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>
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-6/+6
| | | | | | | | | | | | | | | | | * 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)
* Make explicit {.nimcall.} a seperate calling conventionClyybber2020-08-081-1/+1
|
* arc optimizations (#13325)Andreas Rumpf2020-03-181-1/+1
| | | | | * scope based destructors * handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim * make this branch mergable, logic is disabled for now
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-3/+3
| | | | a few magic numbers with consts (#13170)
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-65/+63
| | | | | | | | | | | | | | | | | | * 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
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-8/+8
| | | | | * Remove sonsLen * Use Indexable
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* fixes #10912 (#11317)Andreas Rumpf2019-05-241-3/+3
| | | | | | * fixes #10912 * update the tutorial examples
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-1/+1
|
* Replace countup(x, y) with x .. yClyybber2019-05-071-2/+2
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-10/+10
|
* multi-methods need to be explicitly enabled (#10856)Miran2019-03-181-0/+3
| | | | | | * multi-methods need to be explicitly enabled * update changelog, manual and tutorial
* multi-methods: remove hack, make tmethod_various compile under strict C++ ↵Andreas Rumpf2019-03-141-11/+11
| | | | [backport]
* compiler refactoring: TSymSeq is gone for goodAraq2018-12-111-3/+3
|
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-0/+1
| | | | | | | | | | | | | | | 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
* fixes #5479Araq2018-10-021-2/+2
|
* Pick the `and` symbol we need explicitly (#8249)LemonBoy2018-07-081-2/+2
| | | | | | | Using getSysSym made the compiler pick a random `and` symbol: if the symbol table is shuffled we may end up selecting one of the wrong overloads. Fixes #8246
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* make tests green againAndreas Rumpf2018-05-181-1/+1
|
* remove ast.emptyNode global; cleanup configuration.nimAraq2018-05-161-3/+3
|
* pragmas compiles againAndreas Rumpf2018-05-111-22/+23
|
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-1/+1
|
* Fixes #5946 (#6017)Yuriy Glukhov2017-06-261-2/+3
|
* fixes multiple nil-checks for methods (#5806)Parashurama2017-05-121-3/+6
|
* fixes #5599 (#5610)Andreas Rumpf2017-03-261-2/+8
|
* fixes #5432Araq2017-02-261-1/+2
|
* another attempt to make test green againAraq2017-02-241-2/+10
|
* fixes a multimethod regressionAndreas Rumpf2017-02-241-6/+9
|