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