summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
Commit message (Collapse)AuthorAgeFilesLines
* Better range error messages (#19867)Tanguy2022-06-151-3/+3
| | | | | | | * Better range error messages * Revert to old behavior for arrays * Small corrections
* fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)flywind2022-04-261-2/+5
| | | | | | | | | | | | | | | | | * try using endsWith * use memcmp * add cache * cleanup * better * minor * fix * improve test coverage for methods with ARC
* use signed comparisons for the index checking in the hope it improves the ↵Andreas Rumpf2022-04-261-7/+7
| | | | code generation (#19712)
* fixes #19615; emit better code for integer divisions when the divisor… ↵Andreas Rumpf2022-03-221-6/+16
| | | | | | | (#19626) * fixes #19615; emit better code for integer divisions when the divisor is known at compile-time * proper bugfix: unsigned numbers cannot be -1
* fix #19266; allow reassign discriminant field (#19567)flywind2022-02-251-1/+15
| | | | | * add inUncheckedAssignSection * add one more test
* fixes an old ARC bug: the produced copy/sink operations don't copy the ↵Andreas Rumpf2021-12-091-0/+8
| | | | hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232)
* define `nimVersion` automatically and avoid needing -d:nimVersion140 (#18726)Timothee Cour2021-10-171-2/+2
| | | | | * define `nimVersion` and avoid needing -d:nimVersion140 * fix changelog
* correct effect tracking for .borrowed procs [backport] (#18882)Andreas Rumpf2021-09-231-2/+2
| | | | | | | | | | | * correct effect tracking for .borrowed procs [backport] * progress * fix error message in a test * correctly fix it Co-authored-by: narimiran <narimiran@disroot.org>
* fix #10128 (#18852)flywind2021-09-141-3/+3
|
* allow building 1.4.0 from devel (#18708)Timothee Cour2021-08-181-4/+17
| | | | | * allow building 1.4.0 from devel * changelog
* properly fix #10053 ; `FieldDefect` msg now shows discriminant value + ↵Timothee Cour2021-08-131-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fixes #18643 [backport:1.0] (#18678)Andreas Rumpf2021-08-121-1/+1
|
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-201-7/+5
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* ORC: support for custom =trace procs (#18459)Andreas Rumpf2021-07-091-0/+1
| | | | | | | | | | | * ORC: support custom =trace procs (WIP) * Update tests/arc/tcustomtrace.nim Co-authored-by: Clyybber <darkmine956@gmail.com> * =trace is now documented and seems to work * make test green Co-authored-by: Clyybber <darkmine956@gmail.com>
* Renamed `-d:nimCompilerStackraceHints` to `-d:nimCompilerStacktraceHints`. ↵Timothee Cour2021-06-171-2/+2
| | | | (#18283)
* added float32 schubfach algorithm; wip (#18155)Andreas Rumpf2021-06-031-1/+5
| | | | | * added float32 schubfach algorithm; wip * fixes #18418
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] (#18040)Andreas Rumpf2021-05-181-1/+6
| | | | * ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] * Update tests/arc/tnewseq_legacy.nim
* IC: codegen: fix (#17931)Andreas Rumpf2021-05-041-1/+3
|
* -d:nimDebug: calls doAssert false instead of quit (#17739)Timothee Cour2021-04-171-2/+2
|
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-7/+7
| | | | cstring, not cString (#17744)
* Genode platform fixes (#17521)Emery Hemingway2021-04-091-4/+10
| | | | | | | | | | | | | | | | | | | * 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
* Fix #14325 (#17308)Clyybber2021-03-111-30/+22
| | | | | * Fix #14325 * Refactor and fix
* fixes #11225; generic sandwich problems; [backport:1.2] (#17255)Andreas Rumpf2021-03-091-0/+1
| | | | | * fixes #11225; generic sandwich problems; [backport:1.2] * progress * delegating these symbols must be done via 'bind'
* IC: compilerprocs are handled correctly (#17265)Andreas Rumpf2021-03-091-2/+4
| | | | | | | * 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 #17264 [backport:1.4] (#17266)flywind2021-03-051-1/+2
| | | | | * fix #17264 * fix vm * fix js and add tests
* `--nilseqs` is now a deprecated noop (#17211)Timothee Cour2021-03-011-10/+6
| | | | | * --nilseqs is now a deprecated noop * fix tests; fix: future => sugar
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* IC: bugfixes (WIP) (#16836)Andreas Rumpf2021-02-021-0/+1
| | | | | | | | * 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: final implementation steps (#16801)Andreas Rumpf2021-01-251-1/+0
| | | | | | | | * 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-19/+78
| | | | | | | | | | | * 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
* IC: next steps (#16550)Andreas Rumpf2021-01-071-2/+2
| | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | | | * 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 #14340 (#16386)Timothee Cour2021-01-011-1/+3
|
* use -d:nimCompilerStackraceHints in more places (#16400)Timothee Cour2020-12-291-0/+5
|
* fixes #16069; [backport:1.2] [backport:1.4] (#16115)Andreas Rumpf2020-11-241-0/+1
| | | | | * fixes #16069; refs https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] [backport:1.4] * make tests green again
* Semfold for nil cast (#16030)cooldome2020-11-181-1/+3
| | | | | | | | | * bring back the semfold of nil * remove space * fix test * proc type can't be dereferenced
* Fix #15706 (#15846)Bung2020-11-071-1/+1
| | | | | * fix #15706 Underflow not detected when using dec on distinct ranges * fix #15846 first, jsgen even doesn't care of range in this op
* ARC now capable of custom extra alignment. Ref, closure and seq support. ↵cooldome2020-10-281-13/+9
| | | | (#15697)
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-10/+10
| | | | | | | | | | | | | | | | | * 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 view types for sizeof() and --gc:orc (#15680)Andreas Rumpf2020-10-221-3/+3
|
* fixes #15652 [backport:1.4] (#15679)Andreas Rumpf2020-10-221-1/+1
|
* arc allocation method aligned (#15588)cooldome2020-10-191-8/+16
| | | | | * progress * fix typo
* fix gitignore for testament cruft (#15530)Timothee Cour2020-10-091-1/+1
| | | | | * fix gitignore for testament cruft * fix rendertree => renderTree
* const view types; fixes some cases from ↵Andreas Rumpf2020-10-051-41/+54
| | | | https://github.com/nim-lang/Nim/issues/15428 (#15488)
* closureiters: fixes #15243 (#15454) [backport:1.2]Andreas Rumpf2020-10-021-1/+17
| | | | * fixes #15243 [backport:1.2]
* fix #15405. deepcopy arc (#15410)cooldome2020-10-011-0/+4
| | | | | | | * fix #15405 * fix tests * deepcopy for ARC has to be enabled via --deepcopy:on Co-authored-by: Araq <rumpf_a@web.de>
* produce runtime type information for reified openArrays (#15415)Andreas Rumpf2020-09-271-11/+11
| | | | | * produce runtime type information for reified openArrays * added a test case
* better support for slices as views (#15414)Andreas Rumpf2020-09-271-3/+9
| | | | | | * moved view tests to tests/views * refactoring * more refactorings * better support for system.toOpenArray for first class view types
* ORC/ARC async progress (#15370)Andreas Rumpf2020-09-201-1/+1
| | | | | | | * ARC/ORC: fixes memory leak for empty seqs that have a non-zero capacity * async: minor refactorings * it helps to finish a refactoring
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-32/+51
|