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 * Check for Final when overriding, if the parent is Final, then we cant
26 I have not figured out why the Microsoft version puts an
27 `instance' attribute, and I am not generating this `instance' attribute.
29 Explanation: The reason for the `instance' attribute on
30 indexers is that indexers only apply to instances
34 We need to make sure at *compile time* that the arguments in
35 the expression list of an array creation are always positive.
39 the following wont work:
43 if x has indexers, the value of x [N] set is set to void. This needs to be
48 Multi-dim arrays are declared as [,] instead of [0..,0..]
50 * Break/Continue statements
52 A finally block should reset the InLoop/LoopBegin/LoopEnd, as
53 they are logically outside the scope of the loop.
55 * Break/continue part 2.
57 They should transfer control to the finally block if inside a try/catch
60 * Method Registration and error CS111
62 The way we use the method registration to signal 111 is wrong.
64 Method registration should only be used to register methodbuilders,
65 we need an alternate method of checking for duplicates.
69 extern string Property {
73 The get there should only have a semicolon
76 > // CSC sets beforefieldinit
78 > // .cctor will be generated by compiler
79 > public static readonly object O = new System.Object ();
80 > public static void Main () {}
87 * Merge test 89 and test-34
91 Primary-expression, as it has now been split into
92 non-array-creation-expression and array-creation-expression.
94 * Static flow analysis
96 Required to warn about reachability of code and definite
97 assignemt as well as missing returns on functions.
101 The information when registering a method in InternalParameters
102 is duplicated, you can always get the types from the InternalParameters
104 * Emit modreq for volatiles
106 Handle modreq from public apis.
108 * Emit `pinned' for pinned local variables.
110 Both `modreq' and pinned will require special hacks in the compiler.
112 * Make sure that we are pinning the right variable
114 * Maybe track event usage? Currently I am not tracking these, although they
117 * Merge tree.cs, rootcontext.cs
122 * Implement loop inversion for `For' as well.
124 * There is too much unshared code between MemberAccess.Resolve and SimpleName
127 * User Defined Conversions is doing way too many calls to do union sets that are not needed
129 * Add test case for destructors
131 * Places that use `Ldelema' are basically places where I will be
132 initializing a value type. I could apply an optimization to
133 disable the implicit local temporary from being created (by using
136 * Dropping TypeContainer as an argument to EmitContext
138 My theory is that I can get rid of the TypeBuilder completely from
139 the EmitContext, and have typecasts where it is used (from
140 DeclSpace to where it matters).
142 The only pending problem is that the code that implements Aliases
143 is on TypeContainer, and probably should go in DeclSpace.
145 * Casts need to trigger a name resolution against types only.
147 currently we use a secret hand shake, probably we should use
148 a differen path, and only expressions (memberaccess, simplename)
149 would participate in this protocol.
151 * Use of local temporary in UnaryMutator
153 We should get rid of the Localtemporary there for some cases
157 Do we really need to instanciate this variable all the time?
159 It could be static for all we care, and just use it for making
160 sure that there are no recursive invocations on it.
162 * Use of EmitBranchable
164 Currently I use brfalse/brtrue in the code for statements, instead of
165 using the EmitBranchable function that lives in Binary
169 Currently ConvertImplicit will not catch things like:
171 - IntLiteral in a float context to generate a -FloatLiteral.
172 Instead it will perform an integer load followed by a conversion.
176 Write tests for the various reference conversions. We have
177 test for all the numeric conversions.
181 In Indexers and Properties, probably support an EmitWithDup
182 That emits the code to call Get and then leaves a this pointer
183 in the stack, so that later a Store can be emitted using that
184 this pointer (consider Property++ or Indexer++)
186 * Optimizations: variable allocation.
188 When local variables of a type are required, we should request
189 the variable and later release it when we are done, so that
190 the same local variable slot can be reused later on.
192 * Add a cache for the various GetArrayMethod operations.
194 * TypeManager.FindMembers:
196 Instead of having hundreds of builder_to_blah hash table, have
197 a single one that maps a TypeBuilder `t' to a set of classes
198 that implement an interface that supports FindMembers.
200 * MakeUnionSet Callers
202 If the types are the same, there is no need to compute the unionset,
203 we can just use the list from one of the types.
205 * Factor all the FindMembers in all the FindMembers providers.
207 * Factor the lookup code for class declarations an interfaces
208 (interface.cs:GetInterfaceByName)
213 * Use of lexer.Location in the parser
217 TOKEN nt TERMINAL nt TERMINAL nt3 {
218 $$ = new Blah ($2, $4, $6, lexer.Location);
221 This is bad, because the lexer.Location is for the last item in `nt3'
223 We need to change that to use this pattern:
225 TOKEN { oob_stack.Push (lexer.Location) } nt TERMINAL nt TERMINAL nt3 {
226 $$ = new Blah ($3, $5, $7, (Location) oob_stack.Pop ());
229 Notice how numbering of the arguments changes as the
230 { oob_stack.Push (lexer.Location) } takes a "slot" in the productions.
232 * local_variable_declaration
234 Not sure that this grammar is correct, we might have to
235 resolve this during semantic analysis.
241 These guys should only appear as part of an Invocation, so we
242 probably can afford to have a special callback:
244 Expression.ResolveAllowMemberGroups
246 This is only called by Invocation (or anyone that consumes
249 And the regular DoResolve and DoResolveLValue do emit the error
250 654 `Method referenced without argument list'.
252 Otherwise, a resolution will return a MethodGroupExpr which is
253 not guaranteed to have set its `Expression.Type' to a non-null