summary refs log tree commit diff stats
path: root/compiler/cgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* nvro don't touch cdecl types [backport: 1.6] (#19461)flywind2022-01-281-2/+2
| | | * nvro don't touch cdecl types; fix #19342 again
* enable weave (#19363) [backport:1.6]flywind2022-01-201-2/+7
| | | | * enable weave * workaround CI
* added --nimMainPrefix switch; fixes #15955; refs #16945 [backport:1.6] (#19235)Andreas Rumpf2021-12-101-17/+20
|
* fix #19193 (#19195) [backport:1.2]Tanguy2021-12-071-2/+8
|
* fix #18410 (Errors initializing an object of RootObj with the C++ backend) ↵flywind2021-10-311-1/+2
| | | | | | | | | | | | | [backport] (#18836) * fix #18410 * one line comment * typo * typo * cover cpp
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-3/+0
|
* this ensures libp2p continues to compile [backport] (#18908)Andreas Rumpf2021-09-271-3/+8
|
* more minor bootstrapping cleanups (#18759)Miran2021-08-281-1/+0
|
* properly fix #10053 ; `FieldDefect` msg now shows discriminant value + ↵Timothee Cour2021-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lineinfo, in all backends (c,vm,js) (#11955) * fix #10053 FieldError for vm * fixup * FieldError now also shows runtime value of discriminant * fix field error reporting in vm * also report culprit line info in err msg * fix errors for newruntime 2 * fix for js * fixup * PRTEMP4 * works * works * works perfect * refactor * std/private/repr_impl * suppport --gc:arc * cleanup * refactor * simplify * simplify * simplify * fixup * move out compiler.vmgen.genCustom * fixup * fixup * add tests * revert compiler/debugutils.nim * simplify reprDiscriminant * fixup * lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim * try to fix D20210812T165220 * honor --declaredlocs * control toFileLineCol via --declaredlocs
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-271-2/+0
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* Genode platform fixes (#17521)Emery Hemingway2021-04-091-1/+1
| | | | | | | | | | | | | | | | | | | * Genode: move dyncall failures to runtime Do not use the "error" pragma to warn that dynamic library loading is not implemented, print a message at runtime and exit. * Genode: use stricter dataspace type in page allocator * Genode: remove compiler configuration from nim.cfg Self-hosting Nim is not supported on Genode and defining the cross-compilation environment can be done externally. * Genode: use new mutex API * Genode: call nim_component_construct as a C procedure * Genode: implement echo for NimStringV2
* added a 'koch ic' command for easier adhoc testing of IC (#17508)Andreas Rumpf2021-03-261-0/+30
| | | | | | * added a 'koch ic' command for easier adhoc testing of IC * IC: progress * IC: enable generics test * make tests green
* IC: green tests (#17311)Andreas Rumpf2021-03-191-74/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fixes #11225; generic sandwich problems; [backport:1.2] (#17255)Andreas Rumpf2021-03-091-1/+2
| | | | | * fixes #11225; generic sandwich problems; [backport:1.2] * progress * delegating these symbols must be done via 'bind'
* attempt to fix #16374 (#17232)flywind2021-03-021-1/+6
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * attempt to fix #16374 * fix
* fixes #17085 [backport:1.2] (#17101)Andreas Rumpf2021-02-191-1/+1
|
* IC: bugfixes (WIP) (#16836)Andreas Rumpf2021-02-021-1/+3
| | | | | | | | * 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-56/+30
| | | | | | | | | | | * 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 #16265; fix #13999 (HCR on OSX); cgen now does not line wrap string ↵Timothee Cour2020-12-141-0/+3
| | | | | | | | | | | | | | | | | litterals (#16329) * fix #16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix #13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
* fixes #16249 [backport:1.4] (#16251)Andreas Rumpf2020-12-051-1/+1
|
* cmdline: improve command processing (#16056)Timothee Cour2020-11-261-1/+1
|
* fixes https://github.com/status-im/nimbus-eth2/issues/1549 (#16146)Andreas Rumpf2020-11-261-0/+8
| | | | | * fixes https://github.com/status-im/nimbus-eth2/issues/1549 [backport:1.4] * test fixup
* fixes #15942 [backport:1.2] [backport:1.4] (#16051)Andreas Rumpf2020-11-191-1/+1
|
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-5/+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 cgen header consistent with jsgen header (#15682)Timothee Cour2020-10-231-16/+9
|
* fix cgen header copyright (#15649)Timothee Cour2020-10-211-3/+1
| | | | * remove copyright Andreas Rumpf from cgen files
* const view types; fixes some cases from ↵Andreas Rumpf2020-10-051-1/+2
| | | | https://github.com/nim-lang/Nim/issues/15428 (#15488)
* .noalias annotation; frontend support (#15419)Andreas Rumpf2020-09-281-0/+3
| | | | | * .noalias annotation; frontend support * added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-3/+6
|
* borrow checking (#15282)Andreas Rumpf2020-09-091-25/+31
| | | | | | | | | | | * 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
* Big compiler Cleanup (#14777)Clyybber2020-08-281-1/+1
|
* scoped memory management (#14790)Andreas Rumpf2020-07-041-1/+5
| | | | | | | * fixes the regressions * closes #13936 * scope based memory management implemented * enabled tcontrolflow.nim test case * final cleanups
* Fix #14647 (#14776)Clyybber2020-06-281-6/+3
| | | | | | | | | * Fix #14647 * Correct fix * Typo and add test * For real now :p
* fixes #14240 [backport:1.2] (#14757)Andreas Rumpf2020-06-221-0/+1
|
* fixes #14458 [backport:1.2] (#14756)Andreas Rumpf2020-06-221-3/+6
|
* more checking for --gc:arc, no need for valgrind (#14467)Andreas Rumpf2020-05-291-1/+2
| | | | * sigmatch: removed dead code
* specialize genericReset (#14398)Andreas Rumpf2020-05-191-2/+6
| | | | | | | * progress * make tests green * maybe we also want to reset pointers, dunno * progress * cleanup; fixes #13879 [backport:1.2]
* `nim doc --backend:js`, `nim doc --doccmd:-d:foo`, `nim r --backend:js`, ↵Timothee Cour2020-05-111-4/+4
| | | | | | | | | | `--doccmd:skip` + other improvements (#14278) * `nim doc --backend:js|cpp...` `nim doc --doccmd:'-d:foo --threads:on'` `nim r --backend:cpp...` (implies --run --usenimcache) * --usenimcache works with all targets * --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
* Make ./koch temp --gc:arc work (#14186)Clyybber2020-05-011-1/+4
|
* arc: do not unload globals when building a library [backport:1.2] (#14180)Andreas Rumpf2020-05-011-2/+3
|
* HCR: properly handling complex const objects in the codegen - fixes #13915 ↵Viktor Kirilov2020-04-251-6/+28
| | | | (#14115)
* remove the nilChecks switch; refs #11570Araq2020-04-201-2/+0
|
* move tinyc to a separate repo and allow installing external dependencency ↵Timothee Cour2020-04-031-2/+2
| | | | | | | (eg tinyc) from koch / library code (#13850) * remove tinyc * installDeps * update tinyc paths
* fix open file leak when running --debugger:native (#13832)Timothee Cour2020-04-011-2/+3
|
* make nim_temp compile with --gc:arc --sinkInference:off (#13769)cooldome2020-03-261-1/+1
| | | | | | | * make nim_temp compiler with --gc:arc * trigger build Co-authored-by: cooldome <ariabushenko@bk.ru>
* Attempt to finish off araq cpp exceptions (#13695)cooldome2020-03-191-5/+0
| | | | | | | | | | | | | | | * config update * disable a questionable test * remove c++ exception handling IDs, new impl doesn't require it anymore * C++ based exceptions finally work * fixes bootstrapping problem in C++ mode * teach GCC it's 2020 now * more bugfixes for C++ based exception handling * apply cooldome's patch * another attempt to enable C++11 * bug fix Co-authored-by: Araq <rumpf_a@web.de> Co-authored-by: cooldome <ariabushenko@bk.ru>
* added a switch -d:nimEmulateOverflowChecks for broken or old GCC versions ↵Andreas Rumpf2020-03-191-3/+5
| | | | (#13692)
* rewritten goto based exception handling; much cleaner implementation;… ↵Andreas Rumpf2020-03-171-1/+1
| | | | | | (#13677) * rewritten goto based exception handling; much cleaner implementation; fixes #13668
* catchable defects (#13626)Andreas Rumpf2020-03-121-0/+1
| | | | | | | | | | * allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
* fixes #13436 (#13615)Andreas Rumpf2020-03-101-3/+9
|