Make the build pass
[mono.git] / mcs / mcs / TODO
1 * Reorganization
2
3         There is a mess right now between SimpleName,
4         ResolveMemberAccess and Invocation.
5
6         Nested things like:
7
8         class X {
9                 X Prop () {  get ... }
10         }
11
12         class Y {
13                 void a (X x)
14                 {
15                         x.Prop.Prop.Prop.Prop.method ();
16                 }
17         }
18
19         Are valid, and our current recursive-less implementation wont
20         address these.  
21
22         We need to make sure that SimpleNames (which are a horrible
23         name, as they are really CompoundNames right now) will be remapped
24         to the propper MemberAccess after parsing. 
25
26 * Reorganization: calling structure methods
27
28         Structure methods do not expect a `this' pointer, they expect
29         an address on the stack.  We can probably use all the LValue members
30         to do this.
31
32         Now, for cases like:
33
34                 struct A { void M ();}
35                 class B { A Func () {}}
36
37         When we do:
38                 b.Func ().M ()
39
40         A temporary is created by the compiler to store the result from 
41         b.Func, we could then use this LocalVariable to invoke the
42         AddressOf on it.
43
44 * FindMembers
45
46         Move our utility FindMembers from TypeContainer to Decl, because interfaces
47         are also scanned with it.
48
49 * Ordering
50
51         Can a constant_expression invoke overloaded operators?
52         Explicit user-defined conversions?
53
54 * Visibility
55
56         I am not reporting errors on visibility yet.
57
58 * Error handling
59
60         Normalize, and use Tokenizer location 
61
62 * Enumerations
63
64         Currently I am not resolving enumerations.
65
66         Either I track them with `RecordEnum' as I do with classes,
67         structs and interfaces or I rewrite the code to visit type
68         containers and `walk' the enums with this process. 
69
70 * Known problems:
71
72   Cast expressions
73
74         They should should use:
75
76                 OPEN_PARENS type CLOSE_PARENS
77
78         instead of the current production which is wrong, because it
79         only handles a few cases.
80
81         Complex casts like:
82
83                 Array r = (string []) object
84
85         Wont be parsed.
86   
87 * Interfaces
88
89         For indexers, the output of ix2.cs is different from our
90         compiler and theirs.  They use a DefaultMemberAttribute, which
91         I have yet to figure out:
92
93         .class interface private abstract auto ansi INTERFACE
94         {
95                 .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) 
96                 = ( 01 00 04 49 74 65 6D 00 00 )                      // ...Item..
97                 ...
98         }
99
100 * Interface indexers
101
102         I have not figured out why the Microsoft version puts an
103         `instance' attribute, and I am not generating this `instance' attribute.
104
105 * Constructors
106
107         Currently it calls the parent constructor before initializing fields.
108         It should do it the other way around.
109
110 * Use of EmitBranchable
111
112         Currently I use brfalse/brtrue in the code for statements, instead of
113         using the EmitBranchable function that lives in Binary
114
115 * Create an UnimplementedExpcetion
116
117         And use that instead of plain Exceptions.
118
119 * ConvertImplicit
120
121         Currently ConvertImplicit will not catch things like:
122
123         - IntLiteral in a float context to generate a -FloatLiteral.
124         Instead it will perform an integer load followed by a conversion.
125
126 * In class.cs: Method.Define
127
128         Need to use FindMembers to lookup the member for reporting
129         whether a new is needed or not.  
130
131 * virtual-method.cs breaks
132
133         It breaks on the call to: new B ();
134
135         Where B is a class defined in the source code, my guess is that
136         the look for ".ctor" fails
137
138 * Foreach on structure returns does not work
139
140         I am generating invalid code instead of calling ldarga for the
141         structure, I am calling ldarg:
142
143         struct X {
144                 public IEnumerator GetEnumerator ();
145         }
146
147         X x;
148
149         foreach (object a in x){
150                 ...
151         }
152
153         I need to get the address of that bad boy
154
155 * Work todo:
156
157         Understand how methods are invoked on structs