summary refs log tree commit diff stats
path: root/compiler/ccgstmts.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #14444; add `genLineDir` before assignment (#21201)ringabout2022-12-291-0/+1
| | | | | | | * fixes #14444; add `genLineDir` before raises * add a test case * fixes differently
* implements display based subtype checking (6.4x faster without threads; 2.8x ↵ringabout2022-11-081-15/+18
| | | | | | | | faster with threads) (#20781) * WIP: fast 'of' operator based on the literature * implement display based subtype checking Co-authored-by: Araq <rumpf_a@web.de>
* no ropes WIP (#20433)Andreas Rumpf2022-09-271-91/+97
| | | | | | | | | | | | | * 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
* support cstring in `case` (#20130)metagn2022-09-011-9/+28
| | | | | | | | | | | | | | | * implement case for cstring for now just converts to string on C backend * custom implementation for cstring * remove leftover * revert even more * add nil + fix packages weird variant literal bug * update docs
* Fixed noinit pragma for closure variables (#20101)Yuriy Glukhov2022-07-281-1/+1
|
* Fixing `nimRawSetJmp` for vcc and clangcl on Windows (#19959)rockcavera2022-07-041-7/+12
| | | | | | | | | | | | | * fix vcc rawsetjmp * changing `_longjmp()` to `longjmp()` and `_setjmp()` to `setjmp()` * fix * fix setjmp to clangcl on Windows * fix genTrySetjmp() to clangcl on Windows
* remove noop option `gc:v2` (#19810)flywind2022-06-101-1/+1
| | | | | * remove noop option gc:v2 * changelog
* fix #19266; allow reassign discriminant field (#19567)flywind2022-02-251-1/+1
| | | | | * add inUncheckedAssignSection * add one more test
* nvro don't touch cdecl types [backport: 1.6] (#19461)flywind2022-01-281-7/+14
| | | * nvro don't touch cdecl types; fix #19342 again
* nimRawSetjmp: support Windows (#19197)Ștefan Talpalaru2021-12-101-1/+12
| | | | | | | | | | | | * nimRawSetjmp: support Windows Using `_setjmp()` directly is required to avoid some rare (but very annoying) exception-related stack corruption leading to segfaults on Windows, with Mingw-w64 and SEH. More details: https://github.com/status-im/nimbus-eth2/issues/3121 Also add "nimBuiltinSetjmp" - mostly for benchmarking. * fix for Apple's Clang++
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-5/+0
|
* fixes #17085 [backport:1.2] (#17101)Andreas Rumpf2021-02-191-2/+2
|
* IC: next steps (#16729)Andreas Rumpf2021-01-231-14/+15
| | | | | | | | | | | * 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
* continue #15456 add #pragma directives compiler support (#16472)flywind2021-01-041-6/+13
| | | | | * continue #15456 * follow the advice from juan_carlos
* fix #12640 (#15829)flywind2020-11-031-1/+7
|
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-2/+2
| | | | | | | | | | | | | | | | | * 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)
* const view types; fixes some cases from ↵Andreas Rumpf2020-10-051-2/+2
| | | | https://github.com/nim-lang/Nim/issues/15428 (#15488)
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-4/+4
|
* borrow checking (#15282)Andreas Rumpf2020-09-091-1/+1
| | | | | | | | | | | * 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
|
* fixes #15026 [backport] (#15040)Andreas Rumpf2020-07-221-1/+1
| | | no test case since only a special case was affected and the special case got removed
* fixes #14925 (#14947)Andreas Rumpf2020-07-091-0/+4
|
* scoped memory management (#14790)Andreas Rumpf2020-07-041-8/+16
| | | | | | | * fixes the regressions * closes #13936 * scope based memory management implemented * enabled tcontrolflow.nim test case * final cleanups
* fixes #14240 [backport:1.2] (#14757)Andreas Rumpf2020-06-221-8/+9
|
* fix #14369 (#14386)cooldome2020-05-181-0/+1
| | | | | * fix #14369 * empty commit
* fixes #13998 [backport:1.2]Andreas Rumpf2020-05-131-1/+1
|
* fix for asm statement; refs #12650Araq2020-04-201-1/+1
|
* Implements RFCs #209 (#13995)cooldome2020-04-161-24/+7
| | | | | * add test * add changelod entry Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #13782 (#13834)Andreas Rumpf2020-04-011-0/+3
|
* Attempt to finish off araq cpp exceptions (#13695)cooldome2020-03-191-8/+173
| | | | | | | | | | | | | | | * 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>
* rewritten goto based exception handling; much cleaner implementation;… ↵Andreas Rumpf2020-03-171-22/+6
| | | | | | (#13677) * rewritten goto based exception handling; much cleaner implementation; fixes #13668
* catchable defects (#13626)Andreas Rumpf2020-03-121-27/+36
| | | | | | | | | | * 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 #13599 (#13614)Andreas Rumpf2020-03-091-1/+1
|
* fix #8312 --hints:off and --warnings:off now honored everywhere (#13489)Timothee Cour2020-02-261-1/+1
|
* Fixes #13186 (#13188)slangmgh2020-01-191-2/+4
|
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-1/+1
| | | | a few magic numbers with consts (#13170)
* fixes #12961 (#13019)Andreas Rumpf2020-01-031-9/+12
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-24/+157
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* fixes #12826Araq2019-12-241-2/+2
|
* Fix #12785 (#12943)RSDuck2019-12-211-0/+4
| | | | | | * Fix #12785 and add test * better variable name
* ARC related bugfixes and refactorings (#12781)Andreas Rumpf2019-12-051-3/+10
|
* better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799)Andreas Rumpf2019-12-051-12/+26
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-174/+165
| | | | | | | | | | | | | | | | | | * 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
* --gc:destructors now means Nim uses pure refcounting (#12557)Andreas Rumpf2019-10-301-1/+1
|
* refactoring: --newruntime consists of 3 different switchesAraq2019-10-201-4/+4
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-20/+20
| | | | | * Remove sonsLen * Use Indexable
* allows access to .compileTime vars at runtime (#12128)Andreas Rumpf2019-09-051-11/+12
|
* Remove ENDB (#12095)Clyybber2019-08-311-26/+0
|
* only store finally block in exception stack (#11876)Jacek Sieka2019-08-281-9/+11
|