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.
14 In EmitAnonymousHelperClasses we set the "NeedThis" parameter of all
15 the roots, but this is not necessary. We should track the
16 "HaveCapturedFields" on a per-ScopeInfo basis, and only set the
17 HaveCapturedFields on the proper roots, instead of all the roots.
21 ===========================================
25 I believe that `Value Parameter' might have been introduced
26 after C# 1.0, also notice than in the treatment of Value Parameter
27 the parameters are defined in four categories:
29 Section 9.3 in the latest spec.
35 Reference type equality operators (15.9.6) introduced
36 operator == (C x, C y) where C is a reference type.
40 operator == (object a, object b)
42 Review our implementation.
47 It would be nice to optimize the case of:
49 Method (new ValueType ())
51 So that no temporary is created, and we only use a newobj call
52 that remains on the stack, as opposed to ldloca, initobj, ldloc
58 ImplicitStandardConversionExists and ImplicitStandardConversion
59 should always be the same, but there are a few diverging lines that
62 if (expr_type == target_type && !(expr is NullLiteral))
67 if (expr_type == target_type)
74 Need to introduce the NullType concept into the compiler, to address a
75 few small buglets and remove the hardcoded values for NullLiteral.
77 NullLiteral will be the only expression that has the NullType as its type.
79 This is what must be used to test for Null literals, instead of `is NullLiteral',
80 and this will introduce a couple of fixes to the rules.
82 ****************************************************************************************
84 * The information on the rest of this file is mostly outdated, and its kept here for
87 ****************************************************************************************
92 * Make yyerror show a nice syntax error, instead of the current mess.
96 * Reset should throw not implemented now.
101 Currently when we build a type cache, it contains private members,
102 internal members, and internal protected members; We should trim
103 these out, as it shows up on the profile.
105 We create too many Arraylists; When we know the size, we should create
108 During parsing we use arraylists to accumulate data, like this:
113 : thing { $$ =new ArrayList (); $$.Add ($1); }
114 | thing_list thing { ArrayList a = $1; a.Add ($2); $$ = a; }
116 We probably could start using "Pairs" there:
119 : thing { $$ = new Pair ($1, null); }
120 | thing_list thing { Pair p = $1; $$ = new Pair ($2, $1); }
123 EmitContext.ResolveTypeTree
124 ---------------------------
126 We should investigate its usage. The problem is that by default
127 this will be set when calling FindType, that triggers a more expensive
130 I believe we should pass the current EmitContext (which has this turned off
131 by default) to ResolveType/REsolveTypeExpr and then have the routines that
132 need ResolveType to pass null as the emit context.
137 DeclareLocal is used in various statements. The audit should be done
140 * Identify all the declare locals.
144 * Find if we can make wrapper functions for all of them.
146 Then we can move DeclareLocal into a helper class.
148 This is required to fix foreach in iterators.
153 Drop FindMembers as our API and instead extract all the data
154 out of a type the first time into our own datastructures, and
155 use that to navigate and search the type instead of the
156 callback based FindMembers.
158 Martin has some some of this work with his TypeHandle code
159 that we could use for this.
164 Instead of the hack that *knows* about System.Object not having any children classes,
165 we should just make it simple for a probe to know that there is no need for it.
167 Dead Code Elimination bugs:
168 ---------------------------
170 I should also resolve all the children expressions in Switch, Fixed, Using.
174 Properties and 17.6.3: Finish it.
176 readonly variables and ref/out
181 * Break/Continue statements
183 A finally block should reset the InLoop/LoopBegin/LoopEnd, as
184 they are logically outside the scope of the loop.
186 * Break/continue part 2.
188 They should transfer control to the finally block if inside a try/catch
191 * Method Registration and error CS111
193 The way we use the method registration to signal 111 is wrong.
195 Method registration should only be used to register methodbuilders,
196 we need an alternate method of checking for duplicates.
199 > // CSC sets beforefieldinit
201 > // .cctor will be generated by compiler
202 > public static readonly object O = new System.Object ();
203 > public static void Main () {}
210 * Merge test 89 and test-34
214 The information when registering a method in InternalParameters
215 is duplicated, you can always get the types from the InternalParameters
217 * Emit modreq for volatiles
219 Handle modreq from public apis.
221 * Merge tree.cs, rootcontext.cs
226 * User Defined Conversions is doing way too many calls to do union sets that are not needed
228 * Add test case for destructors
230 * Places that use `Ldelema' are basically places where I will be
231 initializing a value type. I could apply an optimization to
232 disable the implicit local temporary from being created (by using
235 * Dropping TypeContainer as an argument to EmitContext
237 My theory is that I can get rid of the TypeBuilder completely from
238 the EmitContext, and have typecasts where it is used (from
239 DeclSpace to where it matters).
241 The only pending problem is that the code that implements Aliases
242 is on TypeContainer, and probably should go in DeclSpace.
246 Write tests for the various reference conversions. We have
247 test for all the numeric conversions.
249 * Optimizations: variable allocation.
251 When local variables of a type are required, we should request
252 the variable and later release it when we are done, so that
253 the same local variable slot can be reused later on.
255 * Add a cache for the various GetArrayMethod operations.
257 * MakeUnionSet Callers
259 If the types are the same, there is no need to compute the unionset,
260 we can just use the list from one of the types.
262 * Factor the lookup code for class declarations an interfaces
263 (interface.cs:GetInterfaceByName)
268 * Use of lexer.Location in the parser
272 TOKEN nt TERMINAL nt TERMINAL nt3 {
273 $$ = new Blah ($2, $4, $6, lexer.Location);
276 This is bad, because the lexer.Location is for the last item in `nt3'
278 We need to change that to use this pattern:
280 TOKEN { oob_stack.Push (lexer.Location) } nt TERMINAL nt TERMINAL nt3 {
281 $$ = new Blah ($3, $5, $7, (Location) oob_stack.Pop ());
284 Notice how numbering of the arguments changes as the
285 { oob_stack.Push (lexer.Location) } takes a "slot" in the productions.