Misc changes

This commit is contained in:
Krzosa Karol
2022-10-13 20:46:03 +02:00
parent 022f874c32
commit 16a2fe659e
5 changed files with 50 additions and 20 deletions

View File

@@ -1,26 +1,41 @@
/*
Current:
- [ ] Maybe wait to implement WASM / bytecode emitter before doing this?
Probably need some UInt Int types and those should be default, target
decides the size of these
Fix backlog
- [ ] Fix invalid error message: AlmostLinearToSRGB :: (a: Color);; return {sqrtf(a.r), sqrtf(a.g), sqrtf(a.b), a.a}
- [ ] Fix untyped literal going to codegen stage, example in arms_race
- [ ] Fix and decide what to do when initializing global variable using not constants
- [ ] Fix and decide what to do when initializing global variable using not constants C:/AProgramming/cparse/compiler/modules/Language.core:180:28: error: initializer element is not a compile-time constant
- [ ] Fix adressing void is possible, maybe make it possible to address void
using bytes
* a.void + 10
* a.void[10]
- [ ] String declaration in Language.core
- [ ] Way to import and force evaluate #import_lazy #import ?
- [ ] Test and bulletproof any, slices
- [ ] Need tests that make sure stuff errors out
Memory:
Future features
- [ ] Add some directive that passes metadata arguments to compiler, stores them
in array and then those can be searched etc. Then we could add the link thing there
- [ ] The ability for a type to also be a namespace seems like a good idea, a common pattern
emerges. Not sure how to execute it though without complications. Data for sure needs
to be nicely visible in a struct and those functions should be separate
- [ ] Other kinds of casts, a cast from structs of same layout, a cast without conversion
- [ ] Inject symbols into a declaration / namespace ??
- [ ] Using directive to bring symbols into local scope
###
- [ ] Maybe wait to implement WASM / bytecode emitter before doing this?
Probably need some UInt Int types and those should be default, target
decides the size of these
- [ ] String declaration in Language.core
- [ ] Way to import and force evaluate #import_lazy #import ?
Redesign:
- [ ] Redesign Type map to use List and reduce wasting space
- [ ] Redesign lexing to minimize memory usage, we got rid of heap but in a naive way!
- [ ] Probably need to move all the global data into the context if we want to use this as library or not?
- [ ] Casting
In the future
@@ -28,7 +43,6 @@ In the future
- [ ] Add ability to do i: int = 0 inside for loops for i: int = 0, i < 10, i+=1
- [ ] Complicated c declaration generation
- [ ] Other kinds of casts, a cast from structs of same layout, a cast without conversion
- [ ] Expand macros
- [ ] Defer