5 Ok, solved part of the problem, but not the second.
7 Apparently there are 2 scopes in test-iter-05.cs that
8 are referenced, but when we call "ComputeMethodHost" in
9 iterators.cs:854 this information is not yet available.
11 ===========================================
15 I believe that `Value Parameter' might have been introduced
16 after C# 1.0, also notice than in the treatment of Value Parameter
17 the parameters are defined in four categories:
19 Section 9.3 in the latest spec.
28 It would be nice to optimize the case of:
30 Method (new ValueType ())
32 So that no temporary is created, and we only use a newobj call
33 that remains on the stack, as opposed to ldloca, initobj, ldloc
39 ImplicitStandardConversionExists and ImplicitStandardConversion
40 should always be the same, but there are a few diverging lines that
43 if (expr_type == target_type && !(expr is NullLiteral))
48 if (expr_type == target_type)
51 ****************************************************************************************
53 * The information on the rest of this file is mostly outdated, and its kept here for
56 ****************************************************************************************
61 * Make yyerror show a nice syntax error, instead of the current mess.
65 * Reset should throw not implemented now.
70 Currently when we build a type cache, it contains private members,
71 internal members, and internal protected members; We should trim
72 these out, as it shows up on the profile.
74 We create too many Arraylists; When we know the size, we should create
77 During parsing we use arraylists to accumulate data, like this:
82 : thing { $$ =new ArrayList (); $$.Add ($1); }
83 | thing_list thing { ArrayList a = $1; a.Add ($2); $$ = a; }
85 We probably could start using "Pairs" there:
88 : thing { $$ = new Pair ($1, null); }
89 | thing_list thing { Pair p = $1; $$ = new Pair ($2, $1); }
92 EmitContext.ResolveTypeTree
93 ---------------------------
95 We should investigate its usage. The problem is that by default
96 this will be set when calling FindType, that triggers a more expensive
99 I believe we should pass the current EmitContext (which has this turned off
100 by default) to ResolveType/REsolveTypeExpr and then have the routines that
101 need ResolveType to pass null as the emit context.
106 DeclareLocal is used in various statements. The audit should be done
109 * Identify all the declare locals.
113 * Find if we can make wrapper functions for all of them.
115 Then we can move DeclareLocal into a helper class.
117 This is required to fix foreach in iterators.
122 Instead of the hack that *knows* about System.Object not having any children classes,
123 we should just make it simple for a probe to know that there is no need for it.
125 Dead Code Elimination bugs:
126 ---------------------------
128 I should also resolve all the children expressions in Switch, Fixed, Using.
132 Properties and 17.6.3: Finish it.
134 readonly variables and ref/out
139 * Break/Continue statements
141 A finally block should reset the InLoop/LoopBegin/LoopEnd, as
142 they are logically outside the scope of the loop.
144 * Break/continue part 2.
146 They should transfer control to the finally block if inside a try/catch
149 * Method Registration and error CS111
151 The way we use the method registration to signal 111 is wrong.
153 Method registration should only be used to register methodbuilders,
154 we need an alternate method of checking for duplicates.
157 > // CSC sets beforefieldinit
159 > // .cctor will be generated by compiler
160 > public static readonly object O = new System.Object ();
161 > public static void Main () {}
168 * Merge test 89 and test-34
172 The information when registering a method in InternalParameters
173 is duplicated, you can always get the types from the InternalParameters
175 * Emit modreq for volatiles
177 Handle modreq from public apis.
179 * Merge tree.cs, rootcontext.cs
184 * User Defined Conversions is doing way too many calls to do union sets that are not needed
186 * Add test case for destructors
188 * Places that use `Ldelema' are basically places where I will be
189 initializing a value type. I could apply an optimization to
190 disable the implicit local temporary from being created (by using
193 * Dropping TypeContainer as an argument to EmitContext
195 My theory is that I can get rid of the TypeBuilder completely from
196 the EmitContext, and have typecasts where it is used (from
197 DeclSpace to where it matters).
199 The only pending problem is that the code that implements Aliases
200 is on TypeContainer, and probably should go in DeclSpace.
204 Write tests for the various reference conversions. We have
205 test for all the numeric conversions.
207 * Optimizations: variable allocation.
209 When local variables of a type are required, we should request
210 the variable and later release it when we are done, so that
211 the same local variable slot can be reused later on.
213 * Add a cache for the various GetArrayMethod operations.
215 * MakeUnionSet Callers
217 If the types are the same, there is no need to compute the unionset,
218 we can just use the list from one of the types.
220 * Factor the lookup code for class declarations an interfaces
221 (interface.cs:GetInterfaceByName)
226 * Use of lexer.Location in the parser
230 TOKEN nt TERMINAL nt TERMINAL nt3 {
231 $$ = new Blah ($2, $4, $6, lexer.Location);
234 This is bad, because the lexer.Location is for the last item in `nt3'
236 We need to change that to use this pattern:
238 TOKEN { oob_stack.Push (lexer.Location) } nt TERMINAL nt TERMINAL nt3 {
239 $$ = new Blah ($3, $5, $7, (Location) oob_stack.Pop ());
242 Notice how numbering of the arguments changes as the
243 { oob_stack.Push (lexer.Location) } takes a "slot" in the productions.
249 In EmitAnonymousHelperClasses we set the "NeedThis" parameter of all
250 the roots, but this is not necessary. We should track the
251 "HaveCapturedFields" on a per-ScopeInfo basis, and only set the
252 HaveCapturedFields on the proper roots, instead of all the roots.