-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
122 lines (114 loc) · 3.15 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Roadmap
=======
x Basic analyzer (keep track of stack count)
x Basic analyzer (keep track of types)
x Memory opcodes
x Devices (same as enums?)
x String literals
x Variables
x If statement
x Structs
x HERE
x Malloc
x Basic + free + realloc
x Defrag
x Opaque ("void") pointers
x Maybe0
x Unit tests
x Remove macros
x Test suite
x Imports
x Arrays (sized, unknown-size)
x Vec
x Metadata
x (r) keyword (use rt-stack)
x Signed numbers
x Comparison
x Printing
x Lexer/Parser
x Abs/Neg?/Division
x A* pathfinding
x GetIndex fixes
x Enums
x Cond (for Direction/move)
x Refactoring
x Scopes
x Explicit main function
x Decls within decls
x Metadata
x Error messages and context
x Existing
x Lexer
x Parser
x Analyser
x Remove panics (except typeref stuff)
x Lexer
x Parser
x Analyser
x Analyser: proper checks
x End of func
x Loop body
x When branches
x Cond branches
x Fix: inlining func w/ early return
x Fix: inlining func w/ whens/conds/loops
x Dampe
x docs
x mailing list discussion + proposal
x change to .System/expansion
*** v0.1 release ***
- Fix: s/ASTNodeList/Block/g
- Proper scoping per block, not per decl
- Each block carries srcloc info (allows for cleanup of Cond struct)
- New: Of() w/ method calls
- New: hints (grep HINT src/errors.zig)
- Enh: additional lines for long messages/context (e.g. error.StackBranching*)
- Fix: proper error reporting on type expr evaluation error
- Fix: memory leaks
- Enh: #[] syntax
- New: Allow wild w/o block
- New: Loops: break/continue
- Std: Fixed-point (8:8)
x Basic arithmetic
x Sin, cos (CORDIC + taylor series)
- Natural log
- Scr1 demo
- Fix: Solve Effects issue
- i.e. how to represent effect of quote in arity def?
- would require being able to "expand" typeref...
- need major refactoring?
- Opt: Make std/alloc faster
- Auto-merge when freeing (only immediate next block)
- Remove Header/prev
- Remove Header/guard* when dampe is used
- New: Constant pointers, (const) builtin
- Constant version of devs (for readonly ports)?
- Fix: proper precedence rules for multimethods
- New: dip builtin
- Cleanup pervasive "move <do stuff> (r move)" pattern in stdlib
- Bi@, bi*, sip, etc
- Static analysis pt 2
- New analyser pass: track comptime-known vals
- Devices
- Chk: is port readable/writeable when calling deo/dei
Optimizations
-------------
- Inline locals
x Eliminate duplicate decls (from generics)
- E.g. 0 1 swap and 0 (as ptr) 1 (as ptr) swap -> two different functions,
which is unnecessary (only one needs to be generated)
- Solution: after spouting out decl at codegen time, check if the generated
output is exactly the same as another variant, and delete if that's the
case (and set romloc to that other function's romloc)
- Change variants field of decl to ASTNodePtrList to make this easy
x Auto-inlining
- Metadata: always/never inline
- Tail recursion
- (recurse) builtin
Warnings
--------
- Sprite structs can have metadata to warn if 0-initialized (either not enough
data or no data)
- #(warn data-zero-init) #(warn data-incomplete-init)
- Certain structs should not be initialized w/ make()
- e.g. fxpt