summaryrefslogtreecommitdiff
path: root/notes/one_pass_problems.txt
blob: 80d47976be0740f526e99e476281c7f75ba7fbf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

solvable:
- what is a type and what is an identifier?
-- this is given by the keywords before (ref/in/inout/addr/value/etc), also required for things like arrays
-- elementary types are known to the parser,
-- create types as we see them, then fill them in
-- dito for struct members etc (lhs type, rhs member)
-- dito for operators and type scopes (target type)

generate two output files/arrays:
- ahead-of-usage definitions + stack based operations
- past-usage definitions
-- this needs to be sorted in the right order. can we just process it backwards?
-- for "ref/in/inout/addr" types in type defs, we can just go ahead


problems (if compiling to C):
- complex literals, array-to-literal etc, that need temporaries
- complex operations, such as struct/array compare, that need literals