4 Apply the method verification process to indexers and properties as well.
6 Properties and 17.6.3: Finish it.
8 Implement pre-processor.
13 * Currently the code path for 108/109 reporting is not being ran for methods
14 as we need to compare method signatures. But since we retrieve the expensive
15 method arguments in the method, we probably should do 108/109 processing there.
17 * Emit warning on hiding members without NEW not only in members.
19 * Implement visibility.
23 We do add variables in a number of places, and this is erroneous:
40 I am not reporting errors on visibility yet.
44 For indexers, the output of ix2.cs is different from our
45 compiler and theirs. They use a DefaultMemberAttribute, which
46 I have yet to figure out:
48 .class interface private abstract auto ansi INTERFACE
50 .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string)
51 = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item..
57 I have not figured out why the Microsoft version puts an
58 `instance' attribute, and I am not generating this `instance' attribute.
60 Explanation: The reason for the `instance' attribute on
61 indexers is that indexers only apply to instances
63 * Handle destructors specially
65 Turn ~X () { a () } into:
66 void Finalize () { try { a (); } finally { base.Finalize (); } }
68 The code is mostly done, but `base' is missing. The reason it is
69 missing is because we have to implement visibility first.
73 Method names could be; `IFACE.NAME' in the method declaration,
74 stating that they implement a specific interface method.
76 We currently fail to parse it.
80 We need to make sure at *compile time* that the arguments in
81 the expression list of an array creation are always positive.
83 * Implement dead code elimination in statement.cs
85 It is pretty simple to implement dead code elimination in
90 the following wont work:
94 if x has indexers, the value of x [N] set is set to void. This needs to be
99 Multi-dim arrays are declared as [,] instead of [0..,0..]
101 * Break/Continue statements
103 A finally block should reset the InLoop/LoopBegin/LoopEnd, as
104 they are logically outside the scope of the loop.
106 * Break/continue part 2.
108 They should transfer control to the finally block if inside a try/catch
111 * Conversions and overflow
113 I am not using the checked state while doing type casts,
114 they should result in conv.ovf.XXX
116 * Method Registration and error CS111
118 The way we use the method registration to signal 111 is wrong.
120 Method registration should only be used to register methodbuilders,
121 we need an alternate method of checking for duplicates.
125 extern string Property {
129 The get there should only have a semicolon
132 > // CSC sets beforefieldinit
134 > // .cctor will be generated by compiler
135 > public static readonly object O = new System.Object ();
136 > public static void Main () {}
146 Making the parser accept unsafe code.
148 * Implement `base' (BaseAccess class)
150 * Implement constant folding. We might need to implement
151 a new `Constant' class and derive Literal from it.
153 * OUT Variables passed as OUT variables.
155 Currently we pass the pointer to the pointer (see expression.cs:Argument.Emit)
157 * Function Declarations
159 Support PINvoke/Internallcall and extern declarated-functions.
161 * Manual field layout in structures
163 * Make the rules for inheritance/overriding apply to
164 properties, operators and indexers (currently we only do this
169 * Support Re-Throw exceptions:
173 } catch (SomeException e){
178 * Static flow analysis
180 Required to warn about reachability of code and definite
181 assignemt as well as missing returns on functions.
183 * Implement `goto case expr'
186 case 1: print ("1"); goto case 4;
193 The information when registering a method in InternalParameters
194 is duplicated, you can always get the types from the InternalParameters
201 Do we really need to instanciate this variable all the time?
203 It could be static for all we care, and just use it for making
204 sure that there are no recursive invocations on it.
208 Since AppDomain exists, maybe we can get rid of all the stuff
209 that is part of the `compiler instance' and just use globals
215 Currently it calls the parent constructor before initializing fields.
216 It should do it the other way around.
218 * Reducer and -Literal
220 Maybe we should never handle -Literal in Unary expressions and let
221 the reducer take care of it always?
223 * Use of EmitBranchable
225 Currently I use brfalse/brtrue in the code for statements, instead of
226 using the EmitBranchable function that lives in Binary
228 * Create an UnimplementedExpcetion
230 And use that instead of plain Exceptions to flag compiler errors.
234 Currently ConvertImplicit will not catch things like:
236 - IntLiteral in a float context to generate a -FloatLiteral.
237 Instead it will perform an integer load followed by a conversion.
241 Write tests for the various reference conversions. We have
242 test for all the numeric conversions.
244 * Remove the tree dumper, cleanup `public readonly'
246 And make all the stuff which is `public readonly' be private unless
251 In Indexers and Properties, probably support an EmitWithDup
252 That emits the code to call Get and then leaves a this pointer
253 in the stack, so that later a Store can be emitted using that
254 this pointer (consider Property++ or Indexer++)
257 * Optimizations: variable allocation.
259 When local variables of a type are required, we should request
260 the variable and later release it when we are done, so that
261 the same local variable slot can be reused later on.
263 * Add a cache for the various GetArrayMethod operations.
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.
287 * local_variable_declaration
289 Not sure that this grammar is correct, we might have to
290 resolve this during semantic analysis.
295 Investigate what is the right value to return from `Emit' in
296 there (ie, for the `all code paths return')
301 Only create one `This' instance per class, and reuse it.
303 Maybe keep a pool of constants/literals (zero, 1)?
309 We would need to decode the shortname before we lookup members?