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