Codegen change, remove typedefs, use standard

This commit is contained in:
Krzosa Karol
2022-10-01 16:42:03 +02:00
parent 3623ecce00
commit c85f16f673
3 changed files with 50 additions and 44 deletions

View File

@@ -9,15 +9,10 @@ In the future
- [ ] Cleanup
- [ ] Remove tuple stuff or cleanup, in the future might replace it with a better implementation
- [ ] Add ability to do i: int = 0 inside for loops
- [ ] Add ability to do i: int = 0 inside for loops for i: int = 0, i < 10, i+=1
- [ ] Complicated c declaration generation
- [ ] The fact that symbols from main file get introduced to the loaded files
might be kind of confusing, need to watch out for that
- [ ] You can't alias Lambdas because they are not evaluated as constant.
I used a little simplification where lambdas and structs were marked as such
in parsing I think. BUT Structs work so it's maybe just a little fix of constant
propagation using Operands, where I will need to modify Operand of lambda to
be constant AND rewrite_const to not rewrite a lambda OR SOMETHING, maybe it's cool
dont know. BUT not sure if we wont need to rewrite the idea that Lambdas can be Decls.
- [ ] Conditional compilation
- [ ] Expand macros
@@ -157,6 +152,12 @@ For modules it's a bit different cause they should be distributed as valid.
## Done
- [x] You can't alias Lambdas because they are not evaluated as constant.
I used a little simplification where lambdas and structs were marked as such
in parsing I think. BUT Structs work so it's maybe just a little fix of constant
propagation using Operands, where I will need to modify Operand of lambda to
be constant AND rewrite_const to not rewrite a lambda OR SOMETHING, maybe it's cool
dont know. BUT not sure if we wont need to rewrite the idea that Lambdas can be Decls.
- [x] Operator Overloading
- [x] '.' Operator doesn't handle expressions inside the dot chain, no good, so casts don't work
- [x] Introduce List to reduce heap allocations and make it more arena friendly, can we get rid of heap completly?