1 Dead Code Elimination bugs:
2 ---------------------------
4 I should also resolve all the children expressions in Switch, Fixed, Using.
9 Pinned and volatile require type modifiers that can not be encoded
12 Properties and 17.6.3: Finish it.
14 Implement base indexer access.
16 readonly variables and ref/out
21 * Explicit indexer implementation is missing.
23 * Check for Final when overriding, if the parent is Final, then we cant
28 I have not figured out why the Microsoft version puts an
29 `instance' attribute, and I am not generating this `instance' attribute.
31 Explanation: The reason for the `instance' attribute on
32 indexers is that indexers only apply to instances
36 We need to make sure at *compile time* that the arguments in
37 the expression list of an array creation are always positive.
41 the following wont work:
45 if x has indexers, the value of x [N] set is set to void. This needs to be
50 Multi-dim arrays are declared as [,] instead of [0..,0..]
52 * Break/Continue statements
54 A finally block should reset the InLoop/LoopBegin/LoopEnd, as
55 they are logically outside the scope of the loop.
57 * Break/continue part 2.
59 They should transfer control to the finally block if inside a try/catch
62 * Method Registration and error CS111
64 The way we use the method registration to signal 111 is wrong.
66 Method registration should only be used to register methodbuilders,
67 we need an alternate method of checking for duplicates.
71 extern string Property {
75 The get there should only have a semicolon
78 > // CSC sets beforefieldinit
80 > // .cctor will be generated by compiler
81 > public static readonly object O = new System.Object ();
82 > public static void Main () {}
89 * IMprove error handling here:
91 public static Process ()
93 THat assumes that it is a constructor, check if its the same name
94 as the class, if not report a different error than the one we use now.
96 * Merge test 89 and test-34
100 Primary-expression, as it has now been split into
101 non-array-creation-expression and array-creation-expression.
103 * Static flow analysis
105 Required to warn about reachability of code and definite
106 assignemt as well as missing returns on functions.
110 The information when registering a method in InternalParameters
111 is duplicated, you can always get the types from the InternalParameters
113 * Emit modreq for volatiles
115 Handle modreq from public apis.
117 * Emit `pinned' for pinned local variables.
119 Both `modreq' and pinned will require special hacks in the compiler.
121 * Make sure that we are pinning the right variable
123 * Maybe track event usage? Currently I am not tracking these, although they
126 * Merge tree.cs, rootcontext.cs
131 * Implement loop inversion for `For' as well.
133 * There is too much unshared code between MemberAccess.Resolve and SimpleName
136 * User Defined Conversions is doing way too many calls to do union sets that are not needed
138 * Add test case for destructors
140 * Places that use `Ldelema' are basically places where I will be
141 initializing a value type. I could apply an optimization to
142 disable the implicit local temporary from being created (by using
145 * Dropping TypeContainer as an argument to EmitContext
147 My theory is that I can get rid of the TypeBuilder completely from
148 the EmitContext, and have typecasts where it is used (from
149 DeclSpace to where it matters).
151 The only pending problem is that the code that implements Aliases
152 is on TypeContainer, and probably should go in DeclSpace.
154 * Casts need to trigger a name resolution against types only.
156 currently we use a secret hand shake, probably we should use
157 a differen path, and only expressions (memberaccess, simplename)
158 would participate in this protocol.
160 * Use of local temporary in UnaryMutator
162 We should get rid of the Localtemporary there for some cases
166 Do we really need to instanciate this variable all the time?
168 It could be static for all we care, and just use it for making
169 sure that there are no recursive invocations on it.
171 * Use of EmitBranchable
173 Currently I use brfalse/brtrue in the code for statements, instead of
174 using the EmitBranchable function that lives in Binary
178 Currently ConvertImplicit will not catch things like:
180 - IntLiteral in a float context to generate a -FloatLiteral.
181 Instead it will perform an integer load followed by a conversion.
185 Write tests for the various reference conversions. We have
186 test for all the numeric conversions.
190 In Indexers and Properties, probably support an EmitWithDup
191 That emits the code to call Get and then leaves a this pointer
192 in the stack, so that later a Store can be emitted using that
193 this pointer (consider Property++ or Indexer++)
195 * Optimizations: variable allocation.
197 When local variables of a type are required, we should request
198 the variable and later release it when we are done, so that
199 the same local variable slot can be reused later on.
201 * Add a cache for the various GetArrayMethod operations.
203 * TypeManager.FindMembers:
205 Instead of having hundreds of builder_to_blah hash table, have
206 a single one that maps a TypeBuilder `t' to a set of classes
207 that implement an interface that supports FindMembers.
209 * MakeUnionSet Callers
211 If the types are the same, there is no need to compute the unionset,
212 we can just use the list from one of the types.
214 * Factor all the FindMembers in all the FindMembers providers.
216 * Factor the lookup code for class declarations an interfaces
217 (interface.cs:GetInterfaceByName)
222 * Use of lexer.Location in the parser
226 TOKEN nt TERMINAL nt TERMINAL nt3 {
227 $$ = new Blah ($2, $4, $6, lexer.Location);
230 This is bad, because the lexer.Location is for the last item in `nt3'
232 We need to change that to use this pattern:
234 TOKEN { oob_stack.Push (lexer.Location) } nt TERMINAL nt TERMINAL nt3 {
235 $$ = new Blah ($3, $5, $7, (Location) oob_stack.Pop ());
238 Notice how numbering of the arguments changes as the
239 { oob_stack.Push (lexer.Location) } takes a "slot" in the productions.
241 * local_variable_declaration
243 Not sure that this grammar is correct, we might have to
244 resolve this during semantic analysis.
250 These guys should only appear as part of an Invocation, so we
251 probably can afford to have a special callback:
253 Expression.ResolveAllowMemberGroups
255 This is only called by Invocation (or anyone that consumes
258 And the regular DoResolve and DoResolveLValue do emit the error
259 654 `Method referenced without argument list'.
261 Otherwise, a resolution will return a MethodGroupExpr which is
262 not guaranteed to have set its `Expression.Type' to a non-null