1 2008-06-07 Jb Evain <jbevain@novell.com>
3 * BinaryExpression.cs (EmitConvertedCoalesce): implement.
5 2008-06-05 Jb Evain <jbevain@novell.com>
7 * Expression.cs (GetUserConversionMethod): check for convertion
8 operators on both types.
10 2008-06-05 Jb Evain <jbevain@novell.com>
12 * Expression.cs (ConditionalBinaryCheck): if a method is passed,
13 checked that the operators true and false are also defined.
15 2008-06-05 Jb Evain <jbevain@novell.com>
17 * BinaryExpression.cs (Emit): deal with binary expressions
18 where only the left is lifted.
20 2008-06-05 Jb Evain <jbevain@novell.com>
22 * Extensions.cs: Add Type.MakeNullableType helper.
23 * Expression.cs (MakeSimpleBinary, MakeBoolBinar): Properly
24 creat lifted/lifted to null/not lifted
25 user defined binary expressions.
26 * BinaryExpression.cs (Emit): implement compilation of
27 lifted and lifted to null user defined binary operators.
29 2008-06-05 Jb Evain <jbevain@novell.com>
31 * Expression.cs (MakeSimpleUnary): properly create lifted/not lifted
32 unary expressions with user defined operators.
33 * UnaryExpression.cs (Emit): fix compilation of lifted user operators.
35 2008-05-30 Jb Evain <jbevain@novell.com>
37 * UnaryExpression.cs (Emit): fix convertion from nullable
40 2008-05-29 Jb Evain <jbevain@novell.com>
42 * Expression.cs (Power): allow bool?.
43 * BinaryExpression.cs: properly deal with lifted power expression.
45 2008-05-29 Jb Evain <jbevain@novell.com>
47 * BinaryExpression.cs (Emit): fix lifted andalso and orelse.
49 2008-05-29 Jb Evain <jbevain@novell.com>
51 * BinaryExpression.cs (Emit): properly emit lifted to null
52 relational binary expressions.
54 2008-05-28 Jb Evain <jbevain@novell.com>
56 * BinaryExpression.cs (Emit): rework compilation of
57 arithmetic and relational lifted binary expressions.
59 2008-05-28 Jb Evain <jbevain@novell.com>
61 * UnaryExpression.cs (Emit): implement support for compiling
62 lifted unary expressions.
64 2008-05-27 Jb Evain <jbevain@novell.com>
66 * UnaryExpression.cs (EmitConvert): implement nullable to nullable
69 2008-05-20 Roei Erez <roeie@mainsoft.com>
71 * Extensions.cs: Add 'IsGenericImplementationOf' extension method
73 2008-05-15 Jb Evain <jbevain@novell.com>
75 * UnaryExpression.cs, EmitContext.cs: emit convert from and
78 2008-05-15 Jb Evain <jbevain@novell.com>
80 * Extensions.cs: add a few useful extensions such as
81 IsGenericInstanceOf and MakeGenericFrom.
83 2008-05-15 Roei Erez <roeie@mainsoft.com>
85 * ExpressionTransformer.cs: Add a base class for transforming Expressions.
86 In use at AsQueryable() implementation.
88 2008-05-14 Jb Evain <jbevain@novell.com>
90 * EmitContext.cs: only generate a new lambda name if we're in
93 2008-05-14 Jb Evain <jbevain@novell.com>
95 * LambdaExpression.cs, EmitContext.cs: When encountering a lambda
96 inside an ET, compile it as a read of a global. Based on a patch
97 by Roei Erez <roeie@mainsoft.com>
99 2008-05-08 Jb Evain <jbevain@novell.com>
101 * Expression.cs, EmitContext.cs: deal with call to methods
102 with byref parameters.
104 2008-05-07 Roei Erez <roeie@mainsoft.com>
106 * Add ifdef TARGET_JVM
108 2008-05-03 Jb Evain <jbevain@novell.com>
110 * LambdaExpression.cs: move checks to Expression
111 * Expression.cs: apply check for both typed and untyped lambda
112 creation, so that the constructor does not throws exception.
113 Needed to create instances of Expression<> for untyped lambda
114 factory method. Fixes #386322.
116 2008-05-02 Jb Evain <jbevain@novell.com>
118 * Expression.cs: make Emit virtual instead of abstract,
119 to allow externals libraries to extend Expression.
120 Patch by Jan Oravec <jan.oravec@6com.sk>. Fixes #386097.
122 2008-04-29 Jb Evain <jbevain@novell.com>
124 * UnaryExpression.cs (EmitPrimitiveConversion): implement.
126 2008-04-28 Jb Evain <jbevain@novell.com>
128 * EmitContext.cs: deal with globals when encountering them while
129 compiling, and not ahead of time with a dedicated visitor.
131 2008-04-27 Jb Evain <jbevain@novell.com>
133 * ConstantExpression.cs (Emit): emit properly null nullable types.
135 2008-04-27 Jb Evain <jbevain@novell.com>
137 * Expression.cs: improve method finder.
139 2008-04-24 Jb Evain <jbevain@novell.com>
141 * UnaryExpression.cs, EmitContext.cs: implement compilation
142 of Quote as a global load.
144 2008-04-23 Jb Evain <jbevain@novell.com>
146 * UnaryExpression.cs: start implementing EmitConvert.
148 2008-04-23 Jb Evain <jbevain@novell.com>
150 * ConstantExpression.cs (Emit): properly Emit null constants.
152 2008-04-23 Jb Evain <jbevain@novell.com>
154 * Expression.cs (Constant): check for assignability, not for type
155 equality, when a type is passed.
157 2008-04-23 Jb Evain <jbevain@novell.com>
159 * ExpressionPrinter.cs: ToString convert properly.
161 2008-04-22 Jb Evain <jbevain@novell.com>
163 * UnaryExpression.cs: implement IsLiftedToNull properly.
164 * Expression.cs (Convert, ConvertChecked): implemented computing
165 of IsLifted and IsLiftedToNull for conversions.
167 2008-04-22 Jb Evain <jbevain@novell.com>
169 * Expression.cs (Convert, ConvertChecked): implement.
171 2008-04-21 Jb Evain <jbevain@novell.com>
173 * Expression.cs (Call): don't rely on the fact that if the
174 instance expression is null, then it's a static call. Explicitely
175 check on the MethodInfo for that.
176 * EmitContext.cs (EmitCall): same pattern.
178 2008-04-20 Jb Evain <jbevain@novell.com>
180 * MemberMemberBinding.cs (Emit): implement.
182 2008-04-19 Jb Evain <jbevain@novell.com>
184 * EmitContext.cs: infrastructure work to attach a compiled
185 lambda expression to an execution scope, and to detect and store
186 external globals in the scope.
187 * ConstantExpression.cs: load globals from the scope.
189 2008-04-19 Jb Evain <jbevain@novell.com>
191 * ExpressionVisitor.cs (Visit): don't die because of Power.
193 2008-04-09 Jb Evain <jbevain@novell.com>
195 * Expression.cs: check for illegal booleab unary expressions.
197 2008-04-09 Jb Evain <jbevain@novell.com>
199 * UnaryExpression.cs: implement compilation of negate.
201 2008-04-09 Jb Evain <jbevain@novell.com>
203 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
204 to null for simple unary operators. Implement Not compilation.
206 2008-04-08 Jb Evain <jbevain@novell.com>
208 * ElementInit.cs: emit pop if the add method doesn't return void.
210 2008-03-20 Jb Evain <jbevain@novell.com>
212 * Expression.cs: use the new and more complete IsAssignableTo
213 instead of IsAssignableFrom.
215 2008-03-19 Jb Evain <jbevain@novell.com>
217 * LambdaExpression.cs: use the new standardified IsAssignableTo,
218 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
220 2008-03-19 Jb Evain <jbevain@novell.com>
222 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
224 2008-03-13 Jb Evain <jbevain@novell.com>
226 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
228 2008-03-12 Jb Evain <jbevain@novell.com>
230 * NewArrayExpression.cs (Emit): naive implementation of emit support
231 for array initialization.
233 2008-03-11 Jb Evain <jbevain@novell.com>
235 * BinaryExpression.cs: very naive implementation of emitting
238 2008-03-11 Jb Evain <jbevain@novell.com>
240 * *.cs: Move the different Emit* helpers to EmitContext,
241 so that they get used more naturally by the non Expression
244 2008-03-10 Jb Evain <jbevain@novell.com>
246 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
247 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
249 2008-03-10 Jb Evain <jbevain@novell.com>
251 * TypeBinaryExpression.cs (Emit): implement.
253 2008-03-08 Jb Evain <jbevain@novell.com>
255 * MemberListBinding.cs (Emit): implement.
256 * MemberBinding.cs (EmitLoadMember): add helper.
258 2008-03-08 Jb Evain <jbevain@novell.com>
260 * MemberAssignment.cs (Emit): implement.
262 2008-03-08 Jb Evain <jbevain@novell.com>
264 * ElementInit.cs (Emit): implement.
266 2008-03-06 Jb Evain <jbevain@novell.com>
268 * EmitContext.cs: the DebugContext delegate the CreateDelegate
269 to a DynamicContext to avoid visibility issues in debug mode.
271 2008-03-06 Jb Evain <jbevain@novell.com>
273 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
275 2008-03-06 Jb Evain <jbevain@novell.com>
277 * MethodCallExpression.cs, Expression.cs: refactor method calling
278 into a more sophisticated EmitCall in Expression.
279 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
281 2008-03-06 Jb Evain <jbevain@novell.com>
283 * Expression.cs: add a EmitCall helper.
284 * MemberExpression.cs: implement property access.
286 2008-03-06 Jb Evain <jbevain@novell.com>
288 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
289 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
291 2008-03-06 Jb Evain <jbevain@novell.com>
293 * BinaryExpression.cs, Expression.cs: move EmitStored from
294 BinaryExpression to Expression.
295 * MethodCallExpression.cs: allow method calls on structs.
297 2008-03-05 Jb Evain <jbevain@novell.com>
299 * Expression.cs: Fix the Call method which takes an array
302 2008-03-05 Jb Evain <jbevain@novell.com>
304 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
306 2008-02-26 Jb Evain <jbevain@novell.com>
308 * Expression.cs (Call): Guess the parameters type from the argument
311 2008-02-25 Jb Evain <jbevain@novell.com>
313 * NewExpression.cs (Emit): deal with value types construction.
315 2008-02-25 Jb Evain <jbevain@novell.com>
317 * Expression.cs, NewExpression.cs: deal with the fact that value types
318 don't have a parameterless constructor.
320 2008-02-24 Jb Evain <jbevain@novell.com>
322 * LambdaExpression.cs, EmitContext.cs: make compilation
323 of delegate returning void work.
325 2008-02-24 Jb Evain <jbevain@novell.com>
327 * MethodCallExpression.cs: emit call or callvirt depending
328 on the virtuality of the method.
330 2008-02-24 Jb Evain <jbevain@novell.com>
332 * LambdaExpression.cs: properly format error message.
334 2008-02-21 Jb Evain <jbevain@novell.com>
336 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
338 2008-02-21 Jb Evain <jbevain@novell.com>
340 * BinaryExpression.cs (Emit): fix the both_are_null case.
342 2008-02-20 Jb Evain <jbevain@novell.com>
344 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
346 2008-02-20 Jb Evain <jbevain@novell.com>
348 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
350 2008-02-19 Jb Evain <jbevain@novell.com>
352 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
354 2008-02-19 Jb Evain <jbevain@novell.com>
356 * Expression.cs, ExpressionPrinter.cs: implement last New
357 overload for anonymous types.
359 2008-02-08 Jb Evain <jbevain@novell.com>
361 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
362 add support for Invoke.
364 2008-02-04 Jb Evain <jbevain@novell.com>
366 * ExpressionPrinter.cs: fix printing of MemberListBinding.
368 2008-02-04 Jb Evain <jbevain@novell.com>
370 * Expression.cs, NewExpression.cs: make New(Type) test pass.
372 2008-02-04 Jb Evain <jbevain@novell.com>
374 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
376 2008-02-02 Jb Evain <jbevain@novell.com>
378 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
380 2008-02-02 Jb Evain <jbevain@novell.com>
382 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
384 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
386 * Expression.cs, ExpressionPrinter.cs:Add ListBind
388 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
390 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
392 2008-01-31 Jb Evain <jbevain@novell.com>
394 * UnaryExpression.cs: emit array length.
396 2008-01-31 Jb Evain <jbevain@novell.com>
398 * MemberExpression.cs: Simple support for emitting fields.
400 2008-01-30 Jb Evain <jbevain@novell.com>
402 * MethodCallExpression.cs: very naive implementation of Emit.
404 2008-01-30 Jb Evain <jbevain@novell.com>
406 * NewExpression.cs: add Emit support for reference types.
408 2008-01-30 Jb Evain <jbevain@novell.com>
410 * LambdaExpression.cs, EmitContext.cs: small refactoring.
411 Extract the different EmitContexts to their own file.
413 2008-01-29 Jb Evain <jbevain@novell.com>
415 * MethodCallExpression.cs, Expression.cs: complete Calls.
417 2008-01-29 Jb Evain <jbevain@novell.com>
419 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
420 implement the first flavors of New.
422 2008-01-27 Jb Evain <jbevain@novell.com>
424 * ConditionalExpression.cs: implement Emit.
426 2008-01-27 Jb Evain <jbevain@novell.com>
428 * Expression.cs: implement the last Lambda method.
430 2008-01-27 Jb Evain <jbevain@novell.com>
432 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
434 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
436 * Expression.cs, InvocationExpession.cs,
437 ListInitExpression.cs, MemberInitExpression.cs
438 NewExpression.cs : Add all missing
439 constructor in Expressions and remove the base one
441 2008-01-25 Jb Evain <jbevain@novell.com>
443 * Expression.cs, ExpressionPrinter.cs: implement Bind.
445 2008-01-25 Jb Evain <jbevain@novell.com>
447 * MemberMemberBinding.cs, MemberListBinding.cs,
448 MemberAssignment.cs, MemberBinding.cs:
451 2008-01-25 Jb Evain <jbevain@novell.com>
453 * Expression.cs: implement PropertyOrField.
455 2008-01-24 Jb Evain <jbevain@novell.com>
457 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
458 implement Field and Property.
460 2008-01-22 Miguel de Icaza <miguel@novell.com>
462 * BinaryExpression.cs: Unleash the power of cut and paste.
464 Bring a bunch of operatros from mcs/expression.cs
466 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
467 used those from mcs, that was wrong. use the proper ones, clean
470 * BinaryExpression.cs: Add method invocations for binary methods.
472 2008-01-22 Jb Evain <jbevain@novell.com>
474 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
476 2008-01-22 Jb Evain <jbevain@novell.com>
478 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
479 implement Expression.NewArrayBounds.
481 2008-01-22 Jb Evain <jbevain@novell.com>
483 * ExpressionPrinter.cs: fix Lambda and Equal.
485 2008-01-22 Miguel de Icaza <miguel@novell.com>
487 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
490 TODO: this does not use the "Conversion" Lambda, which am not sure
491 who generates this or what it is used for.
493 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
495 * Expression.cs: Add support for Coalesce.
496 (BinaryCoreCheck): Move more checking here, instead of the helper
497 routines, will remove them next.
499 * LambdaExpression.cs (Compile): Create the delegate last, so we
500 manage to save the assembly while debugging in case of error
502 2008-01-21 Miguel de Icaza <miguel@novell.com>
504 * Expression.cs (BinaryCoreCheck): Add checking for a few
505 operators here (to avoid doing a second pass, handles AndAlso and
508 (AndAlso, OrElse): Add some code.
510 * BinaryExpression.cs: Instead of using GetValueOrDefault use
511 get_Value, as we already probed for the lack of value.
513 Split out support for And/Or to a separate routine as the code is
514 not very easy to share with the arithmetics code.
516 2008-01-21 Marek Safar <marek.safar@gmail.com>
518 * BinaryExpression.cs: Fixed initobj initialization.
520 2008-01-21 Jb Evain <jbevain@novell.com>
522 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
523 Move the IsUnsigned helper from BinaryExpression to Expression,
524 so it can be used in UnaryExpression.
526 2008-01-21 Miguel de Icaza <miguel@novell.com>
528 * Start code generation for nullables, currently this generates
529 incorrect code for things like:
531 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
532 e2.Compile ().Invoke (null, 3))
534 This should return null, but returns something else.
536 * Introduce LINQ_DBG env variable, which generates a linq file in
537 /tmp; It currently does not work as well as it should, as the
538 Func<> parameters do not mwatch the generated method.
542 2008-01-20 Miguel de Icaza <miguel@novell.com>
544 Introduce support for Nullable arguments, no code is generated for
545 these yet, its only tests + node creation behavior at this point.
547 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
548 as operators, they must both be nullable.
550 NullableTypes in the arguments are transformed into the underlying
551 values when doing the method validation.
553 2008-01-18 Miguel de Icaza <miguel@novell.com>
555 * ParameterExpression.cs: Add emit support.
557 2008-01-18 Jb Evain <jbevain@novell.com>
559 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
561 2008-01-18 Miguel de Icaza <miguel@novell.com>
563 * BinaryExpression.cs: Add support for emitting code for some
564 operators (ported from the Mono C# compiler).
568 2008-01-17 Miguel de Icaza <miguel@novell.com>
570 Beginning of code generation framework for Linq.Expressions.
571 Some code was borrowed by from the C# compiler
573 * Expression_T.cs: Fill in the blanks.
575 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
578 * ConstantExpression.cs: Mostly done, need to write tests for
579 non-fundamental types and other ValueType initializations.
581 2008-01-17 Jb Evain <jbevain@novell.com>
583 * Expression.cs: implement MakeMemberAccess.
585 2008-01-17 Jb Evain <jbevain@novell.com>
587 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
588 implement ArrayIndex.
590 2008-01-17 Jb Evain <jbevain@novell.com>
592 * Expression.cs: Use TypeCode for IsInt and IsNumber.
594 2008-01-16 Miguel de Icaza <miguel@novell.com>
596 * Expression.cs: Add support for user-defined operators.
598 Put back various binary operator tests.
600 2008-01-16 Jb Evain <jbevain@novell.com>
602 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
604 2008-01-15 Miguel de Icaza <miguel@novell.com>
606 * Expression.cs: Do validation on the method parameters and use
607 the return type if provided.
609 2008-01-15 Jb Evain <jbevain@novell.com>
611 * MethodCallExpression.cs, Expression.cs
612 ExpressionPrinter.cs: Implement Call (Expression, ...)
614 2008-01-15 Jb Evain <jbevain@novell.com>
616 * Expression.cs, ConditionalExpressionExpression.cs
617 ExpressionPrinter.cs : implement Expression.Condition.
619 2008-01-15 Jb Evain <jbevain@novell.com>
622 ParameterExpression.cs,
623 ExpressionPrinter.cs: implement Expression.Parameter
625 2008-01-15 Jb Evain <jbevain@novell.com>
627 * ExpressionPrinter.cs (VisitBinaryExpression): simple
628 implementation (probably misses a few cases).
630 2008-01-14 Miguel de Icaza <miguel@novell.com>
632 * Expression.cs: Bring back the (most) of binary operators. Added
633 type checking as well and reorganized the source file by topic
634 instead of alphabetical sorting.
636 2008-01-14 Jb Evain <jbevain@novell.com>
638 * ExpressionPrinter.cs: print ArrayLength.
640 2008-01-14 Jb Evain <jbevain@novell.com>
642 * Expression.cs: TypeAs can't take value types.
643 * ExpressionPrinter.cs: implement TypeAs.
645 2008-01-14 Jb Evain <jbevain@novell.com>
647 * Expression.cs: implement TypeIs.
648 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
649 * TypeBinaryExpression.cs: add proper ctor.
651 2008-01-14 Jb Evain <jbevain@novell.com>
653 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
655 2008-01-14 Jb Evain <jbevain@novell.com>
657 * BinaryExpression.cs,
658 * Expression.cs: revert part of Miguel's last patch.
659 MakeBinary is expected to call the appropriate factory
660 methods. Whose methods that are responsible for creating
661 the good BinaryExpression, wether they use a custom method
664 2008-01-14 Jb Evain <jbevain@novell.com>
666 * Expression.cs: MakeUnary is expected to call the appropriate
669 2008-01-14 Miguel de Icaza <miguel@novell.com>
671 * Expression.cs (Constant, MakeBinary and consumers of it): Some
672 more fill-up changes.
674 MakeBinary will need much more work to support user-provided
677 2008-01-13 Jb Evain <jbevain@novell.com>
679 * *.cs: fresh implementation.