-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
91 lines (80 loc) · 3.28 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
TODO LIST
Legend
[X] -- done
[~] -- in progress
[ ] -- todo
GENERAL
[ ] remove IdentifierExpr
[ ] finish TypeCheck() for all nodes
[ ] add annotation for expressions for whether `lvalue' or `rvalue'
[X] add "dereferencable" annotation to Decl
[ ] remove Identifier
[X] add "Address" method to decls
[X] add "integral" method to decl
[X] Least-upper bound of integer. Perhaps via integer sorting?
[ ] when first line is error, root is NULL, causing segfault
[ ] create ``ASTCreatable'' template class that implements ``Create'' method
PARSER
[ ] Handle nested pointers properly, e.g. *(*id) -> **id
[X] type_spec from enum to class
[ ] never return decls, only bound types.
SEMANTIC ANALYSIS
[X] `long long int` -> `LONG`, not `LONG_LONG`
[X] print annotated types
[X] type serialization for easy equality check
[X] Convert Decl to ASTType
[X] rewrite DeclSpecs to return TypeSpecs converted to single TypeSpec.
[X] Handle function to function pointer TypeCoercion edge cases.
[X] Don't add identifiers in function declarations that are not definitions to scope
[X] Introduce declarations as types
[X] Return statements present unless void.
[~] Type deserialization for easy type construction
[ ] Fix "incomplete type" error when declaring "void *"
[ ] Add explicit cast expressions whenever needed so that types always match.
[X] Always cast down logical expressions to char.
[ ] Rename/reallocate variables (and structs) so that re-enscoping is not necessary during CodeGen.
For example, the outermost declaration of 'int a', say, could be labeled as '1', and the
innermost declaration of 'char a', say, could be labeled as '123', say. Each oterhwise
conflicting declaration would be assigned an unambiguous unique label.
[ ] Handle case when types are forward-declared or defined in type casts.
[ ] Check for duplicate struct members.
AST
[X] Add bindings of types to identifiers (TypeID, perhaps?)
[ ] Transformations of AST at different stages
[X] Tagged Type (ASTTaggedType)
- current ASTType becomes specialization of ASTTaggedType
- ASTBoundType becomes ASTTaggedType<Symbol *>
[ ] Constructor type functions for converting Declarator to type
[X] Get rid of virtual on ASTNodeVec
[ ] Remove DeclSpecs
[ ] Get rid of Sizes
[ ] remove ExprKind::EXPR_NONE
[ ] Add extra `immediate' operand "IntKind" type that is flexible
ASM
[ ] Register attributes: loadable, movable, addable, etc.
[ ] Separate singleton classes for each register (`a', `hl', etc.)
CODEGEN
[ ] add `live()' method for blocks to determine if they can be joined.
[ ] better solution than `return register'
[ ] Move new_label() mechanism into cgen environment.
[ ] Add pass that converts transitions to instructions.
[X] use std::deque for instructions in blocks.
[ ] abstract away instruction and transition access in blocks.
[X] functions should have epilogue that `ret' transitions jump to
[ ] casting should also worked for signed values, eventually.
[X] test addresses, derefence
LANGUAGE FEATURES
[X] cast expressions
[ ] hexadecimal notation (0x...)
[X] while loops
[ ] for loops
[X] structs
[~] sizeof operator
[ ] void param decl
[X] add struct access semantics
[ ] some id's ARE constant expressions, e.g. when they are enums
OPTIMIZATION
[ ] Constant propogation
[ ] Dead code elimination
RALLOC
[ ] Only use instruction iterators for intervals.