/
todo
79 lines (46 loc) · 1.76 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
set member class types and arrays to zero
assert struct/union has at least one member
? recursive types (types that contain references to each other) crash things
rearange class members largest to smallest (for packing efficiency)
warn of invalid use of local if function member
allocating class on stack does not set vtable
"[int, int]^ tup; tup++" breaks things (eg, passing tuple by reference)
unions do not take into account class lifetime
check for index void^
select tuple constant type dependant on context (eg [int, int] instead of [long, long] if needed)
(problem noticed in function call parameter)
make function arguments const
exceptions?
exception if stackAlloc class has refcount > 1 on scope end
static class members should require a 'dot'
static members will sometimes not be validated correctly if member type is declared after use
attempting to access members in static function will segfault
check if class base exists (if base is in module not yet imported, it will crash)
function overload on constructor
""""
the following compiles, but fails in llvm linking:
Block[] blocks
block.ptr = malloc(Block.sizeof)
""""
validate target of idOps. (delete, retain, release).
OR on constants promotes to floating point?
on 'new', check for expected number of arguments
on binary expression, validate types before codegen
allow pointer arithmatic (void^ + int). (currently fails in llc)
outputing to folder does not work (eg wlc main.wl -o build/output)
add a syntax for all basic c functionality:
memcpy, memset, strlen, strdup, assert, atof, exit... etc
'memcpy' syntax?:
dst[] = src[0..10]
'memset'?:
dst[0..x] = 0
dst[] = 0
'strlen':
arr.size
'strdup'?
'assert'?
'atof':
tofloat(str)
'exit':
die?
throw?