-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
227 lines (189 loc) · 5.2 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
* - not done
v - done
<-- - in progress
x - wont/cant be done
*#686868* - transferred to pivotaltracker
Runtime:
* Make decision about integer types (64 bit or 32 bit or compiler/options-dependent?)
* Double / float / quad - the same
* Double / float / quad array
*#186758540* UTF8 strings (library from Julia is already there)
v String
v PersistentList
v PersistentVector
v Integer
v Double
v Boolean
v nil
v Symbol
v Keyword
v ConcurrentHashMap
* ConcurrentHashMap resizing
v ConcurrentHashMap new memory model (now it crashes)
v Var
v Function (generic)
v FunctionMethod (generic)
v Keyword uniquing
v PersistentArrayMap
(This cannot be done, for some reason atomic operations fail here)
x Merge Object into all objects, trivialise super and Object_data
* Var return type and value
*#186758549* Optimise hash computations (caching for all collections, conj/disj should just modify it a bit (use a commutative operator, e.g. +)
* Iterators (vector, string, map, list)
* Dynamic sequence (that retains a list, vector, map etc.)
* Symbol uniquing
* Character
* Ratio
* BigInteger
*#186758558* PersistentHashMap
*#186758570* PersistentSet
*#186758575,#186758576* Transients for vectors and maps.
v HUGE Memory management ref counting for runtime data structures
v Implement Renking et al, MSR-TR-2020-42, Nov 29, 2020, v2. refcount strategy
v Improve the strategy with manually combining retains with releases
v Improve the strategy with reuse
* HUGE Implement all java methods for runtime functions
* ...
Compiler:
v JIT infrastructure + arg type deduction
* Const
v Integer
v Double
v Boolean
v Nil
v String
v Symbol
v Keyword
v Keyword uniquing
* Symbol uniquing
v Map (PersistentArrayMap)
* Map (PersistentHashMap)
v Vector
v List
* Ratio
* BigInteger
v Add pd() at start and end of each anonymous computation.
v StaticCall (works for simple math, framework prepared to add more functionality)
v StaticCall with dynamic args
v WithMeta (for now just ignores meta)
v If
v Def and vars system
v Dynamic Def and vars system
v Binding (dziala dla funkcji)
v Fn
v FnMethod
v Invoke static (with dynamic args)
v Invoke dynamiczne
v Invoke dynamic recurrent speedup (jit recurrence before casting return value to LO, have a stub function to do that)
v Recur (for Fn)
v Vector
v Let
* Namespaces
* Invoke static with :static in metadata
*#186758640* Invoke lambda
* Invoke lambda once
*#186758639* Invoke variadic with Seq
*#186758641* Invoke with up to 20 args (8 currently supported)
* A way to run tests and meaningfully observe their results
* Loop (+ recur for loop)
* dynamic vars
* Case (CaseTest CaseThen)
* HUGE Memory management ref counting (let us start with string)
v Unify type system to have boxed/unboxed trump isDetermined() (new fields on ObjectTypeSet)
v Use stack-like system for bindings instead the current vector based (to enable let)
--> (Alek) Write new passes in analyzer frontend to help with memory management
v Memory management for args and let (currently each managed var can be used at most once)
--> (Alek) Implement Renking et al, MSR-TR-2020-42, Nov 29, 2020, v2. refcount strategy
* Improve the strategy with combining retains with releases
* Reuse pools for object types (especially boxed ones and collections)
* Improve the strategy with reuse (already manually implemented in StaticCall, but this needs improvement)
* HUGE Exception model
* Try
* Throw
* ...
* HUGE Class/Object system
* Deftype
* HostInterop
* InstanceCall
* InstanceField
* IsInstance
* StaticField
* ProtocolInvoke
....
//
Additional fields on every node:
Nodes that create bindings
* BindingNode
Nodes that signify a usage of a variable
* LocalNode
Nodes that consume variables
* InvokeNode
* KeywordInvokeNode
* StaticCallNode
* DefNode
* ImportNode
* InstanceCallNode
* InstanceFieldNode
* IsInstanceNode
* MonitorEnterNode
* MonitorExitNode
* NewNode
* PrimInvokeNode
* ProtocolInvokeNode
* QuoteNode
* RecurNode
* SetNode
* MutateSetNode
* StaticFieldNode
* ThrowNode
* VectorNode
* WithMetaNode
* MapNode
* Returning from a function
* Non-ret forms of DoNode
// Hashers:
// from code.google.com/p/smhasher/wiki/MurmurHash3
=======================
Node status
v BindingNode (never used directly, it is a part of let, letfn, function, loop...)
* CaseNode
* CaseTestNode
* CaseThenNode
* CatchNode
v ConstNode (not all)
v DefNode
* DeftypeNode
v DoNode
v FnNode
v FnMethodNode
* HostInteropNode
v IfNode (possible JIT branching / continuations)
* ImportNode
* InstanceCallNode
* InstanceFieldNode
* IsInstanceNode
v InvokeNode
v KeywordInvokeNode
v LetNode
* LetFnNode
v LocalNode
* LoopNode
v MapNode
* MethodNode
* MonitorEnterNode
* MonitorExitNode
* NewNode
* PrimInvokeNode
* ProtocolInvokeNode
* QuoteNode
v RecurNode (done for recurrence, to do for loops)
* ReifyNode
* SetNode
* MutateSetNode
v StaticCallNode
* StaticFieldNode
* TheVarNode
* ThrowNode
v VarNode (possible memory management + JIT changes)
v VectorNode
* WithMetaNode (for now trivial)