summary refs log tree commit diff stats
path: root/compiler/pipelines.nim
Commit message (Collapse)AuthorAgeFilesLines
* NIR: store sizes, alignments and offsets in the type graph; beginning… ↵Andreas Rumpf2023-10-161-0/+6
| | | | | (#22822) …s of a patent-pending new VM
* NIR: Nim intermediate representation (#22777)Andreas Rumpf2023-10-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+3
| | | | | works better with strictdefs (#22436) replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
* use strictdefs for compiler (#22365)ringabout2023-08-061-2/+9
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* fixes #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-071-2/+12
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* tuple unpacking for vars as just sugar, allowing nesting (#21563)metagn2023-03-281-1/+1
| | | | | | | | | | | | | | | | | | | * tuple unpacking for vars as just sugar, allowing nesting * set temp symbol AST * hopeful fix some issues, add test for #19364 * always use temp for consts * document, fix small issue * fix manual indentation * actually fix manual * use helper proc * don't resem temp tuple assignment
* add a prepass for codeReordering (#21513)ringabout2023-03-171-2/+32
| | | | | | | * add a prepass for codeReordering * simplify * fixes
* replaces implicit passes array registed at runtime with explicit function ↵ringabout2023-03-031-0/+254
calls; simplify compilation pipeline (#21444) * abolish using passes in the compiler; simplify compilation pipeline * duplicate code * Really cool to have the same signature... * haul * unify other backends * refactor process * introduce PipelinePhase * refactor compiler * fixes passes * fixes nimsuggest * add a sentinel * enable docs checkj * activate doc testing * clean up * complete cleanups