| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
works better with strictdefs (#22436)
replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* wip; use strictdefs for compiler
* checkpoint
* complete the chores
* more fixes
* first phase cleanup
* Update compiler/bitsets.nim
* cleanup
|
|
|
|
|
| |
* fixes #22001
* added test case
|
| |
|
|
|
|
|
| |
* fixes #20572
* added a test case
|
|
|
|
|
|
|
|
|
|
|
| |
* DAA and 'out' parameters
* progress
* documented strictDefs and out parameters
* docs, tests and a bugfix
* fixes silly regression
|
|
|
|
|
|
|
|
| |
* produce better code for closure environment creation
* new 'first write' analysis;
* scope based move analyser
* code cleanup
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* implement case for cstring
for now just converts to string on C backend
* custom implementation for cstring
* remove leftover
* revert even more
* add nil + fix packages weird variant literal bug
* update docs
|
| |
|
|
|
|
|
|
|
| |
Simply recurse into their first child, which is always
a nkDotExpr instead of treating them seperately.
This fixes the rhs sym of a nkCheckedFieldExpr being
checked twice in aliases. This double checking didn't
cause any issues, but was unintentional and redundant.
|
| |
|
| |
|
|
|
|
| |
* warnDuplicateModuleImport => hintDuplicateModuleImport
* improve DuplicateModuleImport msg, add test
|
|
|
|
|
|
|
|
|
| |
* ORC: progress
* ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic
* progress
* minor style changes
|
| |
|
|
|
|
|
|
| |
This alters the DFA control flow graph generation for case statments.
Gotos are now generated as a chained link, this ensures that evaluation
of variant branches collapses as early as possible, without hitting the
2k call limit.
|
|
|
|
| |
ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Analyse last reads all at once
* Integrate firstWrite analysis
* Small cleanup
* Use sets instead of seqs
* Remove instrTargets
* Reap the benefits
* Implement error diagnostics
* Operate on DFA index for lastRead analysis
* Use mgetOrPut
* Cache alias results
This improves performance by a lot, since many
CFG locations map to a single PNode
* Improve performance
* Improve performance
* Cleanup
* Fix #17025
* Grammar
* Expand testcase
|
|
|
| |
This reverts commit 216be4060a853b3425501318537d598c4842eefc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Analyse last reads all at once
* Integrate firstWrite analysis
* Small cleanup
* Use sets instead of seqs
* Remove instrTargets
* Reap the benefits
* Implement error diagnostics
* Operate on DFA index for lastRead analysis
* Use mgetOrPut
* Cache alias results
This improves performance by a lot, since many
CFG locations map to a single PNode
* Improve performance
* Improve performance
* Cleanup
|
|
|
| |
This reverts commit ab740cb5b9bfbacece26956fa2444763a790ccd1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Analyse last reads all at once
* Integrate firstWrite analysis
* Small cleanup
* Use sets instead of seqs
* Remove instrTargets
* Reap the benefits
* Implement error diagnostics
* Operate on DFA index for lastRead analysis
* Use mgetOrPut
|
|
|
|
|
| |
* Refine the analysis for array access
* Cleanup
* Add comments
|
|
|
|
|
| |
* move asciitables
* minor
|
|
|
|
|
| |
* fixes #15130
* you really have to copy from cursors
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* injectdestructors fixes and refactor
* Tiny cleanup
* Refactor and expand testcase
* Closes #14902 by adding testcase
* Better naming
* Fix test failures
* Misc cleanup
* Add testcase for #14968
* Better approach; expand testcases
* Optimizations and fixes
* Add testcase
* typo
* Tiny cleanup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* DFA and injectdestructors cleanup
* More precise write analysis
* Cleanup obsoleted path
* Unify defInstrTargets and useInstrTargets
* Misc cleanups
* Nicer CFG printing
* Misc cleanups 2
|
|
|
|
|
|
|
|
|
|
|
| |
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
|
|
|
|
| |
* sigmatch: removed dead code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New ping-pong analysis
* Add testcase for #13456
* Remove debugging leftover
* Unquote "unstructured controlflow"
* Fix typo
* Fix exponential complexity in edge cases
* Add sanity testcase
* Fix
|
| |
|
|
|
|
|
| |
* Fix the DFA for "unstructured controlflow"
* Add testcase from #14233
|
|
|
|
|
| |
* destructors: don't produce stupid code for 'cast'
* fixes #14207
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ensure capitalize doesn't take an inferred sink parameter
* sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec.
* sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required
* fixes yet another critical DFA bug
* better implementation that also understands if expressions etc
* document sink parameter inference and allow for global disabling
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* fixes #13102
* closes #13149
* ARC: fixes a move optimizer bug (there are more left regarding array and tuple indexing)
* proper fix; fixes #12957
* fixes yet another case object '=' code generation problem
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
|
| |
|
| |
|
| |
|