summary refs log tree commit diff stats
path: root/compiler/nir
Commit message (Collapse)AuthorAgeFilesLines
* IC: use better packed line information format (#22917)Andreas Rumpf2023-11-071-0/+3
|
* NIR: C codegen additions (#22914)Andreas Rumpf2023-11-062-57/+120
|
* NIR: C codegen, WIP (#22903)Andreas Rumpf2023-11-058-89/+1070
|
* so close... (#22885)Andreas Rumpf2023-10-314-157/+249
|
* fixes nightlies; fixes incompatible types with csource_v2 (#22889)ringabout2023-10-301-3/+3
| | | | | | | | | | ref https://github.com/nim-lang/nightlies/actions/runs/6686795512/job/18166625042#logs > /home/runner/work/nightlies/nightlies/nim/compiler/nir/nirvm.nim(163, 35) Error: type mismatch: got 'BiggestInt' for 'b.m.lit.numbers[litId(b.m.types.nodes[int(y)])]' but expected 'int' Or unifies the type in one way or another
* NIR: progress (#22884)Andreas Rumpf2023-10-293-19/+96
|
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-292-2/+2
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* NIR: VM + refactorings (#22835)Andreas Rumpf2023-10-298-640/+1528
|
* 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.