-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO.txt
60 lines (45 loc) · 1.5 KB
/
TODO.txt
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
Opt:
SymbolTable::getSymbol<T>(name, wronghint)
Deconstructors and memory deallocation
Features:
void and bool
self operator
type check
return check
array literal
var definition with expr
much infomation about error and warning
Tigger:
read input and give Intrinsic object
initialize a map of <lineno, Intrin> and connect them
// vector may also be possible?
liveness analysis
SSA --> use a map to record how to access a variable
generate the code
** Variable --> RightVariable: can be EeyoreVar or IntVar
** resource mgr should give correct imm-value or memory position of RightVariable
** s11 stores the imm value in expression
liveness analysis: done!
param: an intrin set
return: map<time, live-var-set>
gencode version 1:
Resmgr maintain the variable's position
methods to access the variable and resources
Load(var) // move (may allocate) value on stack into reg
Lea(var) // move the address of the var into reg
Store(var)// move the var's reg into stack
SaveRegs(); // no need
RestoreRegs(); // no need
Need to represent the var's position
map<POSITION_T, offset>
POSITION_T -- enum { STACK, REG }
DEBUG INFO:
record "prev_line" in Function
make a function to get "prev_line"
subsitude all "lineno - 1" to "prev_line"
optimization:
inline
load/store // done
stack size
mov opti // done
const opti // done