summary refs log tree commit diff stats
path: root/compiler/nir/ast2ir.nim
Commit message (Collapse)AuthorAgeFilesLines
* rework `wasMoved`, `move` on the JS backend (#23577)ringabout2024-05-081-1/+1
| | | | | `reset`, `wasMoved` and `move` doesn't support primitive types, which generate `null` for these types. It is now produce `x = default(...)` in the backend. Ideally it should be done by ast2ir in the future
* remove unused magics: mIntToStr, mInt64ToStr, mFloatToStr (#23486)ringabout2024-04-091-7/+0
| | | mIntToStr, mInt64ToStr, mFloatToStr,
* adds ccMember CC fixes #23434 (#23457)Juan M Gómez2024-03-291-1/+1
|
* type refactoring: part 2 (#23059)Andreas Rumpf2023-12-131-2/+2
|
* Types: Refactorings; step 1 (#23055)Andreas Rumpf2023-12-121-8/+8
|
* NIR: C codegen additions (#22914)Andreas Rumpf2023-11-061-15/+22
|
* NIR: C codegen, WIP (#22903)Andreas Rumpf2023-11-051-57/+104
|
* so close... (#22885)Andreas Rumpf2023-10-311-41/+53
|
* NIR: progress (#22884)Andreas Rumpf2023-10-291-8/+24
|
* NIR: VM + refactorings (#22835)Andreas Rumpf2023-10-291-191/+318
|
* NIR: temporary ID generation bugfix (#22830)Andreas Rumpf2023-10-161-20/+33
|
* NIR: store sizes, alignments and offsets in the type graph; beginning… ↵Andreas Rumpf2023-10-161-263/+329
| | | | | (#22822) …s of a patent-pending new VM
* NIR: progress (#22817)Andreas Rumpf2023-10-121-56/+221
| | | | | | Done: - [x] Implement conversions to openArray/varargs. - [x] Implement index/range checking.
* Import std/stackframes in ast2ir.nim (#22815)SirOlaf2023-10-111-0/+3
| | | | | Ref https://github.com/nim-lang/Nim/pull/22777#issuecomment-1758090410 Co-authored-by: SirOlaf <>
* NIR: Nim intermediate representation (#22777)Andreas Rumpf2023-10-111-0/+2189
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.