1 2008-06-05 Jb Evain <jbevain@novell.com>
3 * Extensions.cs: Add Type.MakeNullableType helper.
4 * Expression.cs (MakeSimpleBinary, MakeBoolBinar): Properly
5 creat lifted/lifted to null/not lifted
6 user defined binary expressions.
7 * BinaryExpression.cs (Emit): implement compilation of
8 lifted and lifted to null user defined binary operators.
10 2008-06-05 Jb Evain <jbevain@novell.com>
12 * Expression.cs (MakeSimpleUnary): properly create lifted/not lifted
13 unary expressions with user defined operators.
14 * UnaryExpression.cs (Emit): fix compilation of lifted user operators.
16 2008-05-30 Jb Evain <jbevain@novell.com>
18 * UnaryExpression.cs (Emit): fix convertion from nullable
21 2008-05-29 Jb Evain <jbevain@novell.com>
23 * Expression.cs (Power): allow bool?.
24 * BinaryExpression.cs: properly deal with lifted power expression.
26 2008-05-29 Jb Evain <jbevain@novell.com>
28 * BinaryExpression.cs (Emit): fix lifted andalso and orelse.
30 2008-05-29 Jb Evain <jbevain@novell.com>
32 * BinaryExpression.cs (Emit): properly emit lifted to null
33 relational binary expressions.
35 2008-05-28 Jb Evain <jbevain@novell.com>
37 * BinaryExpression.cs (Emit): rework compilation of
38 arithmetic and relational lifted binary expressions.
40 2008-05-28 Jb Evain <jbevain@novell.com>
42 * UnaryExpression.cs (Emit): implement support for compiling
43 lifted unary expressions.
45 2008-05-27 Jb Evain <jbevain@novell.com>
47 * UnaryExpression.cs (EmitConvert): implement nullable to nullable
50 2008-05-20 Roei Erez <roeie@mainsoft.com>
52 * Extensions.cs: Add 'IsGenericImplementationOf' extension method
54 2008-05-15 Jb Evain <jbevain@novell.com>
56 * UnaryExpression.cs, EmitContext.cs: emit convert from and
59 2008-05-15 Jb Evain <jbevain@novell.com>
61 * Extensions.cs: add a few useful extensions such as
62 IsGenericInstanceOf and MakeGenericFrom.
64 2008-05-15 Roei Erez <roeie@mainsoft.com>
66 * ExpressionTransformer.cs: Add a base class for transforming Expressions.
67 In use at AsQueryable() implementation.
69 2008-05-14 Jb Evain <jbevain@novell.com>
71 * EmitContext.cs: only generate a new lambda name if we're in
74 2008-05-14 Jb Evain <jbevain@novell.com>
76 * LambdaExpression.cs, EmitContext.cs: When encountering a lambda
77 inside an ET, compile it as a read of a global. Based on a patch
78 by Roei Erez <roeie@mainsoft.com>
80 2008-05-08 Jb Evain <jbevain@novell.com>
82 * Expression.cs, EmitContext.cs: deal with call to methods
83 with byref parameters.
85 2008-05-07 Roei Erez <roeie@mainsoft.com>
87 * Add ifdef TARGET_JVM
89 2008-05-03 Jb Evain <jbevain@novell.com>
91 * LambdaExpression.cs: move checks to Expression
92 * Expression.cs: apply check for both typed and untyped lambda
93 creation, so that the constructor does not throws exception.
94 Needed to create instances of Expression<> for untyped lambda
95 factory method. Fixes #386322.
97 2008-05-02 Jb Evain <jbevain@novell.com>
99 * Expression.cs: make Emit virtual instead of abstract,
100 to allow externals libraries to extend Expression.
101 Patch by Jan Oravec <jan.oravec@6com.sk>. Fixes #386097.
103 2008-04-29 Jb Evain <jbevain@novell.com>
105 * UnaryExpression.cs (EmitPrimitiveConversion): implement.
107 2008-04-28 Jb Evain <jbevain@novell.com>
109 * EmitContext.cs: deal with globals when encountering them while
110 compiling, and not ahead of time with a dedicated visitor.
112 2008-04-27 Jb Evain <jbevain@novell.com>
114 * ConstantExpression.cs (Emit): emit properly null nullable types.
116 2008-04-27 Jb Evain <jbevain@novell.com>
118 * Expression.cs: improve method finder.
120 2008-04-24 Jb Evain <jbevain@novell.com>
122 * UnaryExpression.cs, EmitContext.cs: implement compilation
123 of Quote as a global load.
125 2008-04-23 Jb Evain <jbevain@novell.com>
127 * UnaryExpression.cs: start implementing EmitConvert.
129 2008-04-23 Jb Evain <jbevain@novell.com>
131 * ConstantExpression.cs (Emit): properly Emit null constants.
133 2008-04-23 Jb Evain <jbevain@novell.com>
135 * Expression.cs (Constant): check for assignability, not for type
136 equality, when a type is passed.
138 2008-04-23 Jb Evain <jbevain@novell.com>
140 * ExpressionPrinter.cs: ToString convert properly.
142 2008-04-22 Jb Evain <jbevain@novell.com>
144 * UnaryExpression.cs: implement IsLiftedToNull properly.
145 * Expression.cs (Convert, ConvertChecked): implemented computing
146 of IsLifted and IsLiftedToNull for conversions.
148 2008-04-22 Jb Evain <jbevain@novell.com>
150 * Expression.cs (Convert, ConvertChecked): implement.
152 2008-04-21 Jb Evain <jbevain@novell.com>
154 * Expression.cs (Call): don't rely on the fact that if the
155 instance expression is null, then it's a static call. Explicitely
156 check on the MethodInfo for that.
157 * EmitContext.cs (EmitCall): same pattern.
159 2008-04-20 Jb Evain <jbevain@novell.com>
161 * MemberMemberBinding.cs (Emit): implement.
163 2008-04-19 Jb Evain <jbevain@novell.com>
165 * EmitContext.cs: infrastructure work to attach a compiled
166 lambda expression to an execution scope, and to detect and store
167 external globals in the scope.
168 * ConstantExpression.cs: load globals from the scope.
170 2008-04-19 Jb Evain <jbevain@novell.com>
172 * ExpressionVisitor.cs (Visit): don't die because of Power.
174 2008-04-09 Jb Evain <jbevain@novell.com>
176 * Expression.cs: check for illegal booleab unary expressions.
178 2008-04-09 Jb Evain <jbevain@novell.com>
180 * UnaryExpression.cs: implement compilation of negate.
182 2008-04-09 Jb Evain <jbevain@novell.com>
184 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
185 to null for simple unary operators. Implement Not compilation.
187 2008-04-08 Jb Evain <jbevain@novell.com>
189 * ElementInit.cs: emit pop if the add method doesn't return void.
191 2008-03-20 Jb Evain <jbevain@novell.com>
193 * Expression.cs: use the new and more complete IsAssignableTo
194 instead of IsAssignableFrom.
196 2008-03-19 Jb Evain <jbevain@novell.com>
198 * LambdaExpression.cs: use the new standardified IsAssignableTo,
199 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
201 2008-03-19 Jb Evain <jbevain@novell.com>
203 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
205 2008-03-13 Jb Evain <jbevain@novell.com>
207 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
209 2008-03-12 Jb Evain <jbevain@novell.com>
211 * NewArrayExpression.cs (Emit): naive implementation of emit support
212 for array initialization.
214 2008-03-11 Jb Evain <jbevain@novell.com>
216 * BinaryExpression.cs: very naive implementation of emitting
219 2008-03-11 Jb Evain <jbevain@novell.com>
221 * *.cs: Move the different Emit* helpers to EmitContext,
222 so that they get used more naturally by the non Expression
225 2008-03-10 Jb Evain <jbevain@novell.com>
227 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
228 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
230 2008-03-10 Jb Evain <jbevain@novell.com>
232 * TypeBinaryExpression.cs (Emit): implement.
234 2008-03-08 Jb Evain <jbevain@novell.com>
236 * MemberListBinding.cs (Emit): implement.
237 * MemberBinding.cs (EmitLoadMember): add helper.
239 2008-03-08 Jb Evain <jbevain@novell.com>
241 * MemberAssignment.cs (Emit): implement.
243 2008-03-08 Jb Evain <jbevain@novell.com>
245 * ElementInit.cs (Emit): implement.
247 2008-03-06 Jb Evain <jbevain@novell.com>
249 * EmitContext.cs: the DebugContext delegate the CreateDelegate
250 to a DynamicContext to avoid visibility issues in debug mode.
252 2008-03-06 Jb Evain <jbevain@novell.com>
254 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
256 2008-03-06 Jb Evain <jbevain@novell.com>
258 * MethodCallExpression.cs, Expression.cs: refactor method calling
259 into a more sophisticated EmitCall in Expression.
260 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
262 2008-03-06 Jb Evain <jbevain@novell.com>
264 * Expression.cs: add a EmitCall helper.
265 * MemberExpression.cs: implement property access.
267 2008-03-06 Jb Evain <jbevain@novell.com>
269 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
270 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
272 2008-03-06 Jb Evain <jbevain@novell.com>
274 * BinaryExpression.cs, Expression.cs: move EmitStored from
275 BinaryExpression to Expression.
276 * MethodCallExpression.cs: allow method calls on structs.
278 2008-03-05 Jb Evain <jbevain@novell.com>
280 * Expression.cs: Fix the Call method which takes an array
283 2008-03-05 Jb Evain <jbevain@novell.com>
285 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
287 2008-02-26 Jb Evain <jbevain@novell.com>
289 * Expression.cs (Call): Guess the parameters type from the argument
292 2008-02-25 Jb Evain <jbevain@novell.com>
294 * NewExpression.cs (Emit): deal with value types construction.
296 2008-02-25 Jb Evain <jbevain@novell.com>
298 * Expression.cs, NewExpression.cs: deal with the fact that value types
299 don't have a parameterless constructor.
301 2008-02-24 Jb Evain <jbevain@novell.com>
303 * LambdaExpression.cs, EmitContext.cs: make compilation
304 of delegate returning void work.
306 2008-02-24 Jb Evain <jbevain@novell.com>
308 * MethodCallExpression.cs: emit call or callvirt depending
309 on the virtuality of the method.
311 2008-02-24 Jb Evain <jbevain@novell.com>
313 * LambdaExpression.cs: properly format error message.
315 2008-02-21 Jb Evain <jbevain@novell.com>
317 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
319 2008-02-21 Jb Evain <jbevain@novell.com>
321 * BinaryExpression.cs (Emit): fix the both_are_null case.
323 2008-02-20 Jb Evain <jbevain@novell.com>
325 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
327 2008-02-20 Jb Evain <jbevain@novell.com>
329 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
331 2008-02-19 Jb Evain <jbevain@novell.com>
333 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
335 2008-02-19 Jb Evain <jbevain@novell.com>
337 * Expression.cs, ExpressionPrinter.cs: implement last New
338 overload for anonymous types.
340 2008-02-08 Jb Evain <jbevain@novell.com>
342 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
343 add support for Invoke.
345 2008-02-04 Jb Evain <jbevain@novell.com>
347 * ExpressionPrinter.cs: fix printing of MemberListBinding.
349 2008-02-04 Jb Evain <jbevain@novell.com>
351 * Expression.cs, NewExpression.cs: make New(Type) test pass.
353 2008-02-04 Jb Evain <jbevain@novell.com>
355 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
357 2008-02-02 Jb Evain <jbevain@novell.com>
359 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
361 2008-02-02 Jb Evain <jbevain@novell.com>
363 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
365 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
367 * Expression.cs, ExpressionPrinter.cs:Add ListBind
369 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
371 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
373 2008-01-31 Jb Evain <jbevain@novell.com>
375 * UnaryExpression.cs: emit array length.
377 2008-01-31 Jb Evain <jbevain@novell.com>
379 * MemberExpression.cs: Simple support for emitting fields.
381 2008-01-30 Jb Evain <jbevain@novell.com>
383 * MethodCallExpression.cs: very naive implementation of Emit.
385 2008-01-30 Jb Evain <jbevain@novell.com>
387 * NewExpression.cs: add Emit support for reference types.
389 2008-01-30 Jb Evain <jbevain@novell.com>
391 * LambdaExpression.cs, EmitContext.cs: small refactoring.
392 Extract the different EmitContexts to their own file.
394 2008-01-29 Jb Evain <jbevain@novell.com>
396 * MethodCallExpression.cs, Expression.cs: complete Calls.
398 2008-01-29 Jb Evain <jbevain@novell.com>
400 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
401 implement the first flavors of New.
403 2008-01-27 Jb Evain <jbevain@novell.com>
405 * ConditionalExpression.cs: implement Emit.
407 2008-01-27 Jb Evain <jbevain@novell.com>
409 * Expression.cs: implement the last Lambda method.
411 2008-01-27 Jb Evain <jbevain@novell.com>
413 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
415 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
417 * Expression.cs, InvocationExpession.cs,
418 ListInitExpression.cs, MemberInitExpression.cs
419 NewExpression.cs : Add all missing
420 constructor in Expressions and remove the base one
422 2008-01-25 Jb Evain <jbevain@novell.com>
424 * Expression.cs, ExpressionPrinter.cs: implement Bind.
426 2008-01-25 Jb Evain <jbevain@novell.com>
428 * MemberMemberBinding.cs, MemberListBinding.cs,
429 MemberAssignment.cs, MemberBinding.cs:
432 2008-01-25 Jb Evain <jbevain@novell.com>
434 * Expression.cs: implement PropertyOrField.
436 2008-01-24 Jb Evain <jbevain@novell.com>
438 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
439 implement Field and Property.
441 2008-01-22 Miguel de Icaza <miguel@novell.com>
443 * BinaryExpression.cs: Unleash the power of cut and paste.
445 Bring a bunch of operatros from mcs/expression.cs
447 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
448 used those from mcs, that was wrong. use the proper ones, clean
451 * BinaryExpression.cs: Add method invocations for binary methods.
453 2008-01-22 Jb Evain <jbevain@novell.com>
455 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
457 2008-01-22 Jb Evain <jbevain@novell.com>
459 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
460 implement Expression.NewArrayBounds.
462 2008-01-22 Jb Evain <jbevain@novell.com>
464 * ExpressionPrinter.cs: fix Lambda and Equal.
466 2008-01-22 Miguel de Icaza <miguel@novell.com>
468 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
471 TODO: this does not use the "Conversion" Lambda, which am not sure
472 who generates this or what it is used for.
474 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
476 * Expression.cs: Add support for Coalesce.
477 (BinaryCoreCheck): Move more checking here, instead of the helper
478 routines, will remove them next.
480 * LambdaExpression.cs (Compile): Create the delegate last, so we
481 manage to save the assembly while debugging in case of error
483 2008-01-21 Miguel de Icaza <miguel@novell.com>
485 * Expression.cs (BinaryCoreCheck): Add checking for a few
486 operators here (to avoid doing a second pass, handles AndAlso and
489 (AndAlso, OrElse): Add some code.
491 * BinaryExpression.cs: Instead of using GetValueOrDefault use
492 get_Value, as we already probed for the lack of value.
494 Split out support for And/Or to a separate routine as the code is
495 not very easy to share with the arithmetics code.
497 2008-01-21 Marek Safar <marek.safar@gmail.com>
499 * BinaryExpression.cs: Fixed initobj initialization.
501 2008-01-21 Jb Evain <jbevain@novell.com>
503 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
504 Move the IsUnsigned helper from BinaryExpression to Expression,
505 so it can be used in UnaryExpression.
507 2008-01-21 Miguel de Icaza <miguel@novell.com>
509 * Start code generation for nullables, currently this generates
510 incorrect code for things like:
512 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
513 e2.Compile ().Invoke (null, 3))
515 This should return null, but returns something else.
517 * Introduce LINQ_DBG env variable, which generates a linq file in
518 /tmp; It currently does not work as well as it should, as the
519 Func<> parameters do not mwatch the generated method.
523 2008-01-20 Miguel de Icaza <miguel@novell.com>
525 Introduce support for Nullable arguments, no code is generated for
526 these yet, its only tests + node creation behavior at this point.
528 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
529 as operators, they must both be nullable.
531 NullableTypes in the arguments are transformed into the underlying
532 values when doing the method validation.
534 2008-01-18 Miguel de Icaza <miguel@novell.com>
536 * ParameterExpression.cs: Add emit support.
538 2008-01-18 Jb Evain <jbevain@novell.com>
540 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
542 2008-01-18 Miguel de Icaza <miguel@novell.com>
544 * BinaryExpression.cs: Add support for emitting code for some
545 operators (ported from the Mono C# compiler).
549 2008-01-17 Miguel de Icaza <miguel@novell.com>
551 Beginning of code generation framework for Linq.Expressions.
552 Some code was borrowed by from the C# compiler
554 * Expression_T.cs: Fill in the blanks.
556 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
559 * ConstantExpression.cs: Mostly done, need to write tests for
560 non-fundamental types and other ValueType initializations.
562 2008-01-17 Jb Evain <jbevain@novell.com>
564 * Expression.cs: implement MakeMemberAccess.
566 2008-01-17 Jb Evain <jbevain@novell.com>
568 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
569 implement ArrayIndex.
571 2008-01-17 Jb Evain <jbevain@novell.com>
573 * Expression.cs: Use TypeCode for IsInt and IsNumber.
575 2008-01-16 Miguel de Icaza <miguel@novell.com>
577 * Expression.cs: Add support for user-defined operators.
579 Put back various binary operator tests.
581 2008-01-16 Jb Evain <jbevain@novell.com>
583 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
585 2008-01-15 Miguel de Icaza <miguel@novell.com>
587 * Expression.cs: Do validation on the method parameters and use
588 the return type if provided.
590 2008-01-15 Jb Evain <jbevain@novell.com>
592 * MethodCallExpression.cs, Expression.cs
593 ExpressionPrinter.cs: Implement Call (Expression, ...)
595 2008-01-15 Jb Evain <jbevain@novell.com>
597 * Expression.cs, ConditionalExpressionExpression.cs
598 ExpressionPrinter.cs : implement Expression.Condition.
600 2008-01-15 Jb Evain <jbevain@novell.com>
603 ParameterExpression.cs,
604 ExpressionPrinter.cs: implement Expression.Parameter
606 2008-01-15 Jb Evain <jbevain@novell.com>
608 * ExpressionPrinter.cs (VisitBinaryExpression): simple
609 implementation (probably misses a few cases).
611 2008-01-14 Miguel de Icaza <miguel@novell.com>
613 * Expression.cs: Bring back the (most) of binary operators. Added
614 type checking as well and reorganized the source file by topic
615 instead of alphabetical sorting.
617 2008-01-14 Jb Evain <jbevain@novell.com>
619 * ExpressionPrinter.cs: print ArrayLength.
621 2008-01-14 Jb Evain <jbevain@novell.com>
623 * Expression.cs: TypeAs can't take value types.
624 * ExpressionPrinter.cs: implement TypeAs.
626 2008-01-14 Jb Evain <jbevain@novell.com>
628 * Expression.cs: implement TypeIs.
629 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
630 * TypeBinaryExpression.cs: add proper ctor.
632 2008-01-14 Jb Evain <jbevain@novell.com>
634 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
636 2008-01-14 Jb Evain <jbevain@novell.com>
638 * BinaryExpression.cs,
639 * Expression.cs: revert part of Miguel's last patch.
640 MakeBinary is expected to call the appropriate factory
641 methods. Whose methods that are responsible for creating
642 the good BinaryExpression, wether they use a custom method
645 2008-01-14 Jb Evain <jbevain@novell.com>
647 * Expression.cs: MakeUnary is expected to call the appropriate
650 2008-01-14 Miguel de Icaza <miguel@novell.com>
652 * Expression.cs (Constant, MakeBinary and consumers of it): Some
653 more fill-up changes.
655 MakeBinary will need much more work to support user-provided
658 2008-01-13 Jb Evain <jbevain@novell.com>
660 * *.cs: fresh implementation.