summary refs log tree commit diff stats
path: root/compiler/nir
Commit message (Collapse)AuthorAgeFilesLines
* NIR: temporary ID generation bugfix (#22830)Andreas Rumpf2023-10-165-44/+61
|
* NIR: store sizes, alignments and offsets in the type graph; beginning… ↵Andreas Rumpf2023-10-1610-368/+1328
| | | | | (#22822) …s of a patent-pending new VM
* NIR: progress (#22817)Andreas Rumpf2023-10-124-57/+234
| | | | | | 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-118-0/+3752
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.