summary refs log tree commit diff stats
path: root/compiler/ic/cbackend.nim
Commit message (Collapse)AuthorAgeFilesLines
* rework the vtable implementation embedding the vtable array directly with ↵ringabout2023-11-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
|
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-1/+1
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* use strictdefs for compiler (#22365)ringabout2023-08-061-1/+1
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* fixes #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-071-1/+4
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* Refactor and doc package handling, module name mangling (#19821)quantimnot2022-05-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor and doc package handling, module name mangling * Consolidate, de-duplicate and extend package handling * Alter how duplicate module names of a package are handled * Alter how module names are mangled * Fix crash when another package is named 'stdlib' (test case added) * Doc what defines a package in the manual Modules with duplicate names within a package used to be given 'fake' packages to resolve conflicts. That prevented the ability to discern if a module belonged to the current project package or a foreign package. They now have the proper package owner and the names are mangled in a consistent manner to prevent codegen clashes. All module names are now mangled the same. Stdlib was treated special before, but now it is same as any other package. This fixes a crash when a foreign package is named 'stdlib'. Module mangling is altered for both file paths and symbols used by the backends. Removed an unused module name to package mapping that may have been intended for IC. The mapping was removed because it wasn't being used and was complicating the issue of package modules with duplicate names not having the proper package owner assigned. * Fix some tests * Refactor `packagehandling` * Remove `packagehandling.withPackageName` and its uses * Move module path mangling from `packagehandling` to `modulepaths` * Move `options.toRodFile` to `ic` to break import cycle * Changed import style to match preferred style Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-211-3/+3
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* IC: fixes a long standing bug about DCE set computations (#17763)Andreas Rumpf2021-04-181-25/+33
|
* IC: added basic test case for methods (#17679)Andreas Rumpf2021-04-091-5/+26
| | | | | * IC: added basic test case for methods * IC: better methods test
* added a 'koch ic' command for easier adhoc testing of IC (#17508)Andreas Rumpf2021-03-261-1/+11
| | | | | | * added a 'koch ic' command for easier adhoc testing of IC * IC: progress * IC: enable generics test * make tests green
* IC: backend: remember produced type information (#17440)Andreas Rumpf2021-03-231-7/+36
|
* IC: green tests (#17311)Andreas Rumpf2021-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * IC: renamed to_packed_ast module to ic module * IC: don't store the --forceBuild flag, makes it easier to test * IC: enable hello world test * Codegen: refactorings for IC; changed the name mangling algorithm * fixed the HCR regressions * life is too short for HCR * tconvexhull is now allowed to use deepCopy * IC exposed a stdlib bug, required a refactoring * codegen: code cleanups * IC: even if a module is outdated, its dependencies might come from disk * IC: progress * IC: better name mangling, module IDs are not stable * IC: another refactoring helping with --ic:on --gc:arc * disable arraymancer on Windows for the time being * disable arraymancer altogether * IC: make basic test work with 'nim cpp' * IC: progress on --ic:on --gc:arc * wip; name mangling for type info
* IC: compilerprocs are handled correctly (#17265)Andreas Rumpf2021-03-091-0/+1
| | | | | | | * IC: compilerprocs are handled correctly * IC: special logic for .exportC'ed procs * IC: 'hello world' compiles for the first round (2nd round fails) * IC: hello world seems to work
* fix `UnusedImport` for `nim c compiler/nim` (#17152)Timothee Cour2021-02-231-3/+4
|
* IC: bugfixes (WIP) (#16836)Andreas Rumpf2021-02-021-4/+6
| | | | | | | | * minor improvements * IC: added the required logic for compilerProcs * LazySym ftw * we need this testing logic * reimplement the old way we use for module package creation * fixes a regression; don't pick module names if you can avoid it
* IC: next steps (#16729)Andreas Rumpf2021-01-231-0/+102
* 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