diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-12 02:19:23 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-12 02:19:23 +0300 |
| commit | e1f17535a043b55ce34de4d7583928d8c94bb71a (patch) | |
| tree | 256299aeb970730e56a48e6ad72ac82e848a14d1 /TODO | |
| parent | 7294673a9889f968eef86930d4e09f47070439fc (diff) | |
| download | ek-e1f17535a043b55ce34de4d7583928d8c94bb71a.tar.gz ek-e1f17535a043b55ce34de4d7583928d8c94bb71a.zip | |
start work on struct handling
Diffstat (limited to 'TODO')
| -rw-r--r-- | TODO | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -25,3 +25,36 @@ OPTIMIZATIONS: actualized procs immediately instead of keeping them around in memory + Simplify IDs to just char arrays, would save on memory + Types can just be types, they maybe don't need to be full on AST nodes + +LOWERING: + +Structure handling in lowering could probably be as follows: + +Imagine +struct something { + i27 a; + other_struct b; +}; + +main () +{ + // something s = {...}; + i27 s_def = alloc $STRUCT_SIZE; + // i27 a = s.a; + i27 member_a = struct_def + 0; + i27 a << struct_def 0; + + // other_struct c = s.b; + i27 c_def = alloc $OTHER_STRUCT_SIZE; + i27 member_b = struct_def + 3; + c_def blit member_b, $OTHER_STRUCT_SIZE; // has to be added to qbt, + // might need to be handled + // like store with constant as + // 'return'. Or can c_def be + // considered an output value + // for blit? + + /* calls just dump all registers down I guess, as do returns. No + * implicit conversion to pointer and passed as first argument, ufcs + * does that for us. */ +} |
