2008-03-06 Jb Evain <jbevain@novell.com>
[mono.git] / mcs / class / System.Core / System.Linq.Expressions / ChangeLog
1 2008-03-06  Jb Evain  <jbevain@novell.com>
2
3         * EmitContext.cs: the DebugContext delegate the CreateDelegate
4         to a DynamicContext to avoid visibility issues in debug mode.
5
6 2008-03-06  Jb Evain  <jbevain@novell.com>
7
8         * EmitContext.cs: Lambda methods bypass JIT visibility checks.
9
10 2008-03-06  Jb Evain  <jbevain@novell.com>
11
12         * MethodCallExpression.cs, Expression.cs: refactor method calling
13         into a more sophisticated EmitCall in Expression.
14         * InvocationExpression.cs (Emit): implement using the previous EmitCall.
15
16 2008-03-06  Jb Evain  <jbevain@novell.com>
17
18         * Expression.cs: add a EmitCall helper.
19         * MemberExpression.cs: implement property access.
20
21 2008-03-06  Jb Evain  <jbevain@novell.com>
22
23         * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
24         * MemberExpression.cs: use EmitLoad to load the instance field if needed.
25
26 2008-03-06  Jb Evain  <jbevain@novell.com>
27
28         * BinaryExpression.cs, Expression.cs: move EmitStored from
29         BinaryExpression to Expression.
30         * MethodCallExpression.cs: allow method calls on structs.
31
32 2008-03-05  Jb Evain  <jbevain@novell.com>
33
34         * Expression.cs: Fix the Call method which takes an array
35         of type arguments.
36
37 2008-03-05  Jb Evain  <jbevain@novell.com>
38
39         * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
40
41 2008-02-26  Jb Evain  <jbevain@novell.com>
42
43         * Expression.cs (Call): Guess the parameters type from the argument
44         types if needed.
45
46 2008-02-25  Jb Evain  <jbevain@novell.com>
47
48         * NewExpression.cs (Emit): deal with value types construction.
49
50 2008-02-25  Jb Evain  <jbevain@novell.com>
51
52         * Expression.cs, NewExpression.cs: deal with the fact that value types
53         don't have a parameterless constructor.
54
55 2008-02-24  Jb Evain  <jbevain@novell.com>
56
57         * LambdaExpression.cs, EmitContext.cs: make compilation
58         of delegate returning void work.
59
60 2008-02-24  Jb Evain  <jbevain@novell.com>
61
62         * MethodCallExpression.cs: emit call or callvirt depending
63         on the virtuality of the method.
64
65 2008-02-24  Jb Evain  <jbevain@novell.com>
66
67         * LambdaExpression.cs: properly format error message.
68
69 2008-02-21  Jb Evain  <jbevain@novell.com>
70
71         * BinaryExpression.cs (EmitCoalesce): fix setup_null.
72
73 2008-02-21  Jb Evain  <jbevain@novell.com>
74
75         * BinaryExpression.cs (Emit): fix the both_are_null case.
76
77 2008-02-20  Jb Evain  <jbevain@novell.com>
78
79         * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
80
81 2008-02-20  Jb Evain  <jbevain@novell.com>
82
83         * Expression.cs, ExpressionPrinter.cs: implement ListInit.
84
85 2008-02-19  Jb Evain  <jbevain@novell.com>
86
87         * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
88
89 2008-02-19  Jb Evain  <jbevain@novell.com>
90
91         * Expression.cs, ExpressionPrinter.cs: implement last New
92         overload for anonymous types.
93
94 2008-02-08  Jb Evain  <jbevain@novell.com>
95
96         * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
97                 add support for Invoke.
98
99 2008-02-04  Jb Evain  <jbevain@novell.com>
100
101         * ExpressionPrinter.cs: fix printing of MemberListBinding.
102
103 2008-02-04  Jb Evain  <jbevain@novell.com>
104
105         * Expression.cs, NewExpression.cs: make New(Type) test pass.
106
107 2008-02-04  Jb Evain  <jbevain@novell.com>
108
109         * ExpressionPrinter.cs: fix and clean printing of ElementInit.
110
111 2008-02-02  Jb Evain  <jbevain@novell.com>
112
113         * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
114
115 2008-02-02  Jb Evain  <jbevain@novell.com>
116
117         * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
118
119 2008-02-01  Olivier Dufour  <olivier.duff@gmail.com>
120
121         * Expression.cs, ExpressionPrinter.cs:Add ListBind
122
123 2008-02-01  Olivier Dufour  <olivier.duff@gmail.com>
124
125         * Expression.cs, ExpressionPrinter.cs:Add Elementinit
126
127 2008-01-31  Jb Evain  <jbevain@novell.com>
128
129         * UnaryExpression.cs: emit array length.
130
131 2008-01-31  Jb Evain  <jbevain@novell.com>
132
133         * MemberExpression.cs: Simple support for emitting fields.
134
135 2008-01-30  Jb Evain  <jbevain@novell.com>
136
137         * MethodCallExpression.cs: very naive implementation of Emit.
138
139 2008-01-30  Jb Evain  <jbevain@novell.com>
140
141         * NewExpression.cs: add Emit support for reference types.
142
143 2008-01-30  Jb Evain  <jbevain@novell.com>
144
145         * LambdaExpression.cs, EmitContext.cs: small refactoring.
146         Extract the different EmitContexts to their own file.
147
148 2008-01-29  Jb Evain  <jbevain@novell.com>
149
150         * MethodCallExpression.cs, Expression.cs: complete Calls.
151
152 2008-01-29  Jb Evain  <jbevain@novell.com>
153
154         * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
155         implement the first flavors of New.
156
157 2008-01-27  Jb Evain  <jbevain@novell.com>
158
159         * ConditionalExpression.cs: implement Emit.
160
161 2008-01-27  Jb Evain  <jbevain@novell.com>
162
163         * Expression.cs: implement the last Lambda method.
164
165 2008-01-27  Jb Evain  <jbevain@novell.com>
166
167         * LambdaExpression.cs: fix the Type of the LambdaExpressions.
168
169 2008-01-27  Olivier Dufour  <olivier.duff@gmail.com>
170
171         * Expression.cs, InvocationExpession.cs,
172         ListInitExpression.cs, MemberInitExpression.cs
173         NewExpression.cs : Add all missing
174         constructor in Expressions and remove the base one
175
176 2008-01-25  Jb Evain  <jbevain@novell.com>
177
178         * Expression.cs, ExpressionPrinter.cs: implement Bind.
179
180 2008-01-25  Jb Evain  <jbevain@novell.com>
181
182         * MemberMemberBinding.cs, MemberListBinding.cs,
183         MemberAssignment.cs, MemberBinding.cs:
184         add constructors.
185
186 2008-01-25  Jb Evain  <jbevain@novell.com>
187
188         * Expression.cs: implement PropertyOrField.
189
190 2008-01-24  Jb Evain  <jbevain@novell.com>
191
192         * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
193         implement Field and Property.
194
195 2008-01-22  Miguel de Icaza  <miguel@novell.com>
196
197         * BinaryExpression.cs: Unleash the power of cut and paste.
198
199         Bring a bunch of operatros from mcs/expression.cs
200
201         * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
202         used those from mcs, that was wrong.   use the proper ones, clean
203         up the result.
204
205         * BinaryExpression.cs: Add method invocations for binary methods.
206
207 2008-01-22  Jb Evain  <jbevain@novell.com>
208
209         * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
210
211 2008-01-22  Jb Evain  <jbevain@novell.com>
212
213         * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
214         implement Expression.NewArrayBounds.
215
216 2008-01-22  Jb Evain  <jbevain@novell.com>
217
218         * ExpressionPrinter.cs: fix Lambda and Equal.
219
220 2008-01-22  Miguel de Icaza  <miguel@novell.com>
221
222         * BinaryExpression.cs (EmitCoalesce): Add support for emitting
223         code for Coalesce.
224
225         TODO: this does not use the "Conversion" Lambda, which am not sure
226         who generates this or what it is used for.
227
228         (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
229
230         * Expression.cs: Add support for Coalesce.
231         (BinaryCoreCheck): Move more checking here, instead of the helper
232         routines, will remove them next.
233
234         * LambdaExpression.cs (Compile): Create the delegate last, so we
235         manage to save the assembly while debugging in case of error
236
237 2008-01-21  Miguel de Icaza  <miguel@novell.com>
238
239         * Expression.cs (BinaryCoreCheck): Add checking for a few
240         operators here (to avoid doing a second pass, handles AndAlso and
241         OrElse).
242
243         (AndAlso, OrElse): Add some code.
244
245         * BinaryExpression.cs: Instead of using GetValueOrDefault use
246         get_Value, as we already probed for the lack of value.
247
248         Split out support for And/Or to a separate routine as the code is
249         not very easy to share with the arithmetics code.
250
251 2008-01-21  Marek Safar  <marek.safar@gmail.com>
252
253         * BinaryExpression.cs: Fixed initobj initialization.
254
255 2008-01-21  Jb Evain  <jbevain@novell.com>
256
257         * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
258         Move the IsUnsigned helper from BinaryExpression to Expression,
259         so it can be used in UnaryExpression.
260
261 2008-01-21  Miguel de Icaza  <miguel@novell.com>
262
263         * Start code generation for nullables, currently this generates
264         incorrect code for things like:
265
266         Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
267         e2.Compile ().Invoke (null, 3))
268
269         This should return null, but returns something else.
270
271         * Introduce LINQ_DBG env variable, which generates a linq file in
272         /tmp;   It currently does not work as well as it should, as the
273         Func<> parameters do not mwatch the generated method.
274         Investigate.
275
276
277 2008-01-20  Miguel de Icaza  <miguel@novell.com>
278
279         Introduce support for Nullable arguments, no code is generated for
280         these yet, its only tests + node creation behavior at this point.
281
282         * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
283         as operators, they must both be nullable.
284
285         NullableTypes in the arguments are transformed into the underlying
286         values when doing the method validation.
287
288 2008-01-18  Miguel de Icaza  <miguel@novell.com>
289
290         * ParameterExpression.cs: Add emit support.
291
292 2008-01-18  Jb Evain  <jbevain@novell.com>
293
294         * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
295
296 2008-01-18  Miguel de Icaza  <miguel@novell.com>
297
298         * BinaryExpression.cs: Add support for emitting code for some
299         operators (ported from the Mono C# compiler).
300
301         Add tests.
302
303 2008-01-17  Miguel de Icaza  <miguel@novell.com>
304
305         Beginning of code generation framework for Linq.Expressions.
306         Some code was borrowed by from the C# compiler
307
308         * Expression_T.cs: Fill in the blanks.
309
310         * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
311         of codegen.
312
313         * ConstantExpression.cs: Mostly done, need to write tests for
314         non-fundamental types and other ValueType initializations.
315
316 2008-01-17  Jb Evain  <jbevain@novell.com>
317
318         * Expression.cs: implement MakeMemberAccess.
319
320 2008-01-17  Jb Evain  <jbevain@novell.com>
321
322         * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
323         implement ArrayIndex.
324
325 2008-01-17  Jb Evain  <jbevain@novell.com>
326
327         * Expression.cs: Use TypeCode for IsInt and IsNumber.
328
329 2008-01-16  Miguel de Icaza  <miguel@novell.com>
330
331         * Expression.cs: Add support for user-defined operators.
332
333         Put back various binary operator tests.
334
335 2008-01-16  Jb Evain  <jbevain@novell.com>
336
337         * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
338
339 2008-01-15  Miguel de Icaza  <miguel@novell.com>
340
341         * Expression.cs: Do validation on the method parameters and use
342         the return type if provided.
343
344 2008-01-15  Jb Evain  <jbevain@novell.com>
345
346         * MethodCallExpression.cs, Expression.cs
347         ExpressionPrinter.cs: Implement Call (Expression, ...)
348
349 2008-01-15  Jb Evain  <jbevain@novell.com>
350
351         * Expression.cs, ConditionalExpressionExpression.cs
352         ExpressionPrinter.cs : implement Expression.Condition.
353
354 2008-01-15  Jb Evain  <jbevain@novell.com>
355
356         * Expression.cs,
357         ParameterExpression.cs,
358         ExpressionPrinter.cs: implement Expression.Parameter
359
360 2008-01-15  Jb Evain  <jbevain@novell.com>
361
362         * ExpressionPrinter.cs (VisitBinaryExpression): simple
363         implementation (probably misses a few cases).
364
365 2008-01-14  Miguel de Icaza  <miguel@novell.com>
366
367         * Expression.cs: Bring back the (most) of binary operators.  Added
368         type checking as well and reorganized the source file by topic
369         instead of alphabetical sorting.
370
371 2008-01-14  Jb Evain  <jbevain@novell.com>
372
373         * ExpressionPrinter.cs: print ArrayLength.
374
375 2008-01-14  Jb Evain  <jbevain@novell.com>
376
377         * Expression.cs: TypeAs can't take value types.
378         * ExpressionPrinter.cs: implement TypeAs.
379
380 2008-01-14  Jb Evain  <jbevain@novell.com>
381
382         * Expression.cs: implement TypeIs.
383         * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
384         * TypeBinaryExpression.cs: add proper ctor.
385
386 2008-01-14  Jb Evain  <jbevain@novell.com>
387
388         * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
389
390 2008-01-14  Jb Evain  <jbevain@novell.com>
391
392         * BinaryExpression.cs,
393         * Expression.cs: revert part of Miguel's last patch.
394         MakeBinary is expected to call the appropriate factory
395         methods. Whose methods that are responsible for creating
396         the good BinaryExpression, wether they use a custom method
397         or not.
398
399 2008-01-14  Jb Evain  <jbevain@novell.com>
400
401         * Expression.cs: MakeUnary is expected to call the appropriate
402         factory methods.
403
404 2008-01-14  Miguel de Icaza  <miguel@novell.com>
405
406         * Expression.cs (Constant, MakeBinary and consumers of it): Some
407         more fill-up changes.
408
409         MakeBinary will need much more work to support user-provided
410         types.
411
412 2008-01-13  Jb Evain  <jbevain@novell.com>
413
414         * *.cs: fresh implementation.