summary refs log tree commit diff stats
path: root/compiler/ccgreset.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix reset code gen for range types (#22462, #23214) (#23215)Giuliano Mega2024-01-181-2/+2
| | | | | | This PR modifies `specializeResetT` so that it generates the proper reset code for range types. I've tested it in the examples for issues #23214 and #22462 as well as our codebase, and it seems to fix the issues I had been experiencing.
* type refactor: part 4 (#23077)Andreas Rumpf2023-12-151-6/+5
|
* Types: Refactorings; step 1 (#23055)Andreas Rumpf2023-12-121-3/+3
|
* NIR: Nim intermediate representation (#22777)Andreas Rumpf2023-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Theoretical Benefits / Plans: - Typed assembler-like language. - Allows for a CPS transformation. - Can replace the existing C backend by a new C backend. - Can replace the VM. - Can do more effective "not nil" checking and static array bounds checking. - Can be used instead of the DFA. - Easily translatable to LLVM. - Reasonably easy to produce native code from. - Tiny memory consumption. No pointers, no cry. **In very early stages of development.** Todo: - [x] Map Nim types to IR types. - [ ] Map Nim AST to IR instructions: - [x] Map bitsets to bitops. - [ ] Implement string cases. - [ ] Implement range and index checks. - [x] Implement `default(T)` builtin. - [x] Implement multi string concat. - [ ] Write some analysis passes. - [ ] Write a backend. - [x] Integrate into the compilation pipeline.
* replaces `doAssert false` with `raiseAssert` for unreachable branches, which ↵ringabout2023-08-101-1/+1
| | | | | works better with strictdefs (#22436) replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
* `getTemp` and friends now return `TLoc` as requested (#22440)ringabout2023-08-101-2/+1
| | | getTemp and friends now return `TLoc`
* use out parameters for getTemp (#22399)ringabout2023-08-071-1/+1
|
* 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
* no ropes WIP (#20433)Andreas Rumpf2022-09-271-2/+2
| | | | | | | | | | | | | * 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
* fixes #19967; reset does not work on set [backport: 1.2] (#19968)ringabout2022-08-231-1/+14
| | | | | | | | | | | | | * fixes #19967 * use case * add testcase * fix typos * explictly specify other branches Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-1/+1
| | | | cstring, not cString (#17744)
* specialize genericReset (#14398)Andreas Rumpf2020-05-191-0/+94
* progress * make tests green * maybe we also want to reset pointers, dunno * progress * cleanup; fixes #13879 [backport:1.2]