1 2008-05-30 Jb Evain <jbevain@novell.com>
3 * UnaryExpression.cs (Emit): fix convertion from nullable
6 2008-05-29 Jb Evain <jbevain@novell.com>
8 * Expression.cs (Power): allow bool?.
9 * BinaryExpression.cs: properly deal with lifted power expression.
11 2008-05-29 Jb Evain <jbevain@novell.com>
13 * BinaryExpression.cs (Emit): fix lifted andalso and orelse.
15 2008-05-29 Jb Evain <jbevain@novell.com>
17 * BinaryExpression.cs (Emit): properly emit lifted to null
18 relational binary expressions.
20 2008-05-28 Jb Evain <jbevain@novell.com>
22 * BinaryExpression.cs (Emit): rework compilation of
23 arithmetic and relational lifted binary expressions.
25 2008-05-28 Jb Evain <jbevain@novell.com>
27 * UnaryExpression.cs (Emit): implement support for compiling
28 lifted unary expressions.
30 2008-05-27 Jb Evain <jbevain@novell.com>
32 * UnaryExpression.cs (EmitConvert): implement nullable to nullable
35 2008-05-20 Roei Erez <roeie@mainsoft.com>
37 * Extensions.cs: Add 'IsGenericImplementationOf' extension method
39 2008-05-15 Jb Evain <jbevain@novell.com>
41 * UnaryExpression.cs, EmitContext.cs: emit convert from and
44 2008-05-15 Jb Evain <jbevain@novell.com>
46 * Extensions.cs: add a few useful extensions such as
47 IsGenericInstanceOf and MakeGenericFrom.
49 2008-05-15 Roei Erez <roeie@mainsoft.com>
51 * ExpressionTransformer.cs: Add a base class for transforming Expressions.
52 In use at AsQueryable() implementation.
54 2008-05-14 Jb Evain <jbevain@novell.com>
56 * EmitContext.cs: only generate a new lambda name if we're in
59 2008-05-14 Jb Evain <jbevain@novell.com>
61 * LambdaExpression.cs, EmitContext.cs: When encountering a lambda
62 inside an ET, compile it as a read of a global. Based on a patch
63 by Roei Erez <roeie@mainsoft.com>
65 2008-05-08 Jb Evain <jbevain@novell.com>
67 * Expression.cs, EmitContext.cs: deal with call to methods
68 with byref parameters.
70 2008-05-07 Roei Erez <roeie@mainsoft.com>
72 * Add ifdef TARGET_JVM
74 2008-05-03 Jb Evain <jbevain@novell.com>
76 * LambdaExpression.cs: move checks to Expression
77 * Expression.cs: apply check for both typed and untyped lambda
78 creation, so that the constructor does not throws exception.
79 Needed to create instances of Expression<> for untyped lambda
80 factory method. Fixes #386322.
82 2008-05-02 Jb Evain <jbevain@novell.com>
84 * Expression.cs: make Emit virtual instead of abstract,
85 to allow externals libraries to extend Expression.
86 Patch by Jan Oravec <jan.oravec@6com.sk>. Fixes #386097.
88 2008-04-29 Jb Evain <jbevain@novell.com>
90 * UnaryExpression.cs (EmitPrimitiveConversion): implement.
92 2008-04-28 Jb Evain <jbevain@novell.com>
94 * EmitContext.cs: deal with globals when encountering them while
95 compiling, and not ahead of time with a dedicated visitor.
97 2008-04-27 Jb Evain <jbevain@novell.com>
99 * ConstantExpression.cs (Emit): emit properly null nullable types.
101 2008-04-27 Jb Evain <jbevain@novell.com>
103 * Expression.cs: improve method finder.
105 2008-04-24 Jb Evain <jbevain@novell.com>
107 * UnaryExpression.cs, EmitContext.cs: implement compilation
108 of Quote as a global load.
110 2008-04-23 Jb Evain <jbevain@novell.com>
112 * UnaryExpression.cs: start implementing EmitConvert.
114 2008-04-23 Jb Evain <jbevain@novell.com>
116 * ConstantExpression.cs (Emit): properly Emit null constants.
118 2008-04-23 Jb Evain <jbevain@novell.com>
120 * Expression.cs (Constant): check for assignability, not for type
121 equality, when a type is passed.
123 2008-04-23 Jb Evain <jbevain@novell.com>
125 * ExpressionPrinter.cs: ToString convert properly.
127 2008-04-22 Jb Evain <jbevain@novell.com>
129 * UnaryExpression.cs: implement IsLiftedToNull properly.
130 * Expression.cs (Convert, ConvertChecked): implemented computing
131 of IsLifted and IsLiftedToNull for conversions.
133 2008-04-22 Jb Evain <jbevain@novell.com>
135 * Expression.cs (Convert, ConvertChecked): implement.
137 2008-04-21 Jb Evain <jbevain@novell.com>
139 * Expression.cs (Call): don't rely on the fact that if the
140 instance expression is null, then it's a static call. Explicitely
141 check on the MethodInfo for that.
142 * EmitContext.cs (EmitCall): same pattern.
144 2008-04-20 Jb Evain <jbevain@novell.com>
146 * MemberMemberBinding.cs (Emit): implement.
148 2008-04-19 Jb Evain <jbevain@novell.com>
150 * EmitContext.cs: infrastructure work to attach a compiled
151 lambda expression to an execution scope, and to detect and store
152 external globals in the scope.
153 * ConstantExpression.cs: load globals from the scope.
155 2008-04-19 Jb Evain <jbevain@novell.com>
157 * ExpressionVisitor.cs (Visit): don't die because of Power.
159 2008-04-09 Jb Evain <jbevain@novell.com>
161 * Expression.cs: check for illegal booleab unary expressions.
163 2008-04-09 Jb Evain <jbevain@novell.com>
165 * UnaryExpression.cs: implement compilation of negate.
167 2008-04-09 Jb Evain <jbevain@novell.com>
169 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
170 to null for simple unary operators. Implement Not compilation.
172 2008-04-08 Jb Evain <jbevain@novell.com>
174 * ElementInit.cs: emit pop if the add method doesn't return void.
176 2008-03-20 Jb Evain <jbevain@novell.com>
178 * Expression.cs: use the new and more complete IsAssignableTo
179 instead of IsAssignableFrom.
181 2008-03-19 Jb Evain <jbevain@novell.com>
183 * LambdaExpression.cs: use the new standardified IsAssignableTo,
184 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
186 2008-03-19 Jb Evain <jbevain@novell.com>
188 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
190 2008-03-13 Jb Evain <jbevain@novell.com>
192 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
194 2008-03-12 Jb Evain <jbevain@novell.com>
196 * NewArrayExpression.cs (Emit): naive implementation of emit support
197 for array initialization.
199 2008-03-11 Jb Evain <jbevain@novell.com>
201 * BinaryExpression.cs: very naive implementation of emitting
204 2008-03-11 Jb Evain <jbevain@novell.com>
206 * *.cs: Move the different Emit* helpers to EmitContext,
207 so that they get used more naturally by the non Expression
210 2008-03-10 Jb Evain <jbevain@novell.com>
212 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
213 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
215 2008-03-10 Jb Evain <jbevain@novell.com>
217 * TypeBinaryExpression.cs (Emit): implement.
219 2008-03-08 Jb Evain <jbevain@novell.com>
221 * MemberListBinding.cs (Emit): implement.
222 * MemberBinding.cs (EmitLoadMember): add helper.
224 2008-03-08 Jb Evain <jbevain@novell.com>
226 * MemberAssignment.cs (Emit): implement.
228 2008-03-08 Jb Evain <jbevain@novell.com>
230 * ElementInit.cs (Emit): implement.
232 2008-03-06 Jb Evain <jbevain@novell.com>
234 * EmitContext.cs: the DebugContext delegate the CreateDelegate
235 to a DynamicContext to avoid visibility issues in debug mode.
237 2008-03-06 Jb Evain <jbevain@novell.com>
239 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
241 2008-03-06 Jb Evain <jbevain@novell.com>
243 * MethodCallExpression.cs, Expression.cs: refactor method calling
244 into a more sophisticated EmitCall in Expression.
245 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
247 2008-03-06 Jb Evain <jbevain@novell.com>
249 * Expression.cs: add a EmitCall helper.
250 * MemberExpression.cs: implement property access.
252 2008-03-06 Jb Evain <jbevain@novell.com>
254 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
255 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
257 2008-03-06 Jb Evain <jbevain@novell.com>
259 * BinaryExpression.cs, Expression.cs: move EmitStored from
260 BinaryExpression to Expression.
261 * MethodCallExpression.cs: allow method calls on structs.
263 2008-03-05 Jb Evain <jbevain@novell.com>
265 * Expression.cs: Fix the Call method which takes an array
268 2008-03-05 Jb Evain <jbevain@novell.com>
270 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
272 2008-02-26 Jb Evain <jbevain@novell.com>
274 * Expression.cs (Call): Guess the parameters type from the argument
277 2008-02-25 Jb Evain <jbevain@novell.com>
279 * NewExpression.cs (Emit): deal with value types construction.
281 2008-02-25 Jb Evain <jbevain@novell.com>
283 * Expression.cs, NewExpression.cs: deal with the fact that value types
284 don't have a parameterless constructor.
286 2008-02-24 Jb Evain <jbevain@novell.com>
288 * LambdaExpression.cs, EmitContext.cs: make compilation
289 of delegate returning void work.
291 2008-02-24 Jb Evain <jbevain@novell.com>
293 * MethodCallExpression.cs: emit call or callvirt depending
294 on the virtuality of the method.
296 2008-02-24 Jb Evain <jbevain@novell.com>
298 * LambdaExpression.cs: properly format error message.
300 2008-02-21 Jb Evain <jbevain@novell.com>
302 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
304 2008-02-21 Jb Evain <jbevain@novell.com>
306 * BinaryExpression.cs (Emit): fix the both_are_null case.
308 2008-02-20 Jb Evain <jbevain@novell.com>
310 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
312 2008-02-20 Jb Evain <jbevain@novell.com>
314 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
316 2008-02-19 Jb Evain <jbevain@novell.com>
318 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
320 2008-02-19 Jb Evain <jbevain@novell.com>
322 * Expression.cs, ExpressionPrinter.cs: implement last New
323 overload for anonymous types.
325 2008-02-08 Jb Evain <jbevain@novell.com>
327 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
328 add support for Invoke.
330 2008-02-04 Jb Evain <jbevain@novell.com>
332 * ExpressionPrinter.cs: fix printing of MemberListBinding.
334 2008-02-04 Jb Evain <jbevain@novell.com>
336 * Expression.cs, NewExpression.cs: make New(Type) test pass.
338 2008-02-04 Jb Evain <jbevain@novell.com>
340 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
342 2008-02-02 Jb Evain <jbevain@novell.com>
344 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
346 2008-02-02 Jb Evain <jbevain@novell.com>
348 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
350 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
352 * Expression.cs, ExpressionPrinter.cs:Add ListBind
354 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
356 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
358 2008-01-31 Jb Evain <jbevain@novell.com>
360 * UnaryExpression.cs: emit array length.
362 2008-01-31 Jb Evain <jbevain@novell.com>
364 * MemberExpression.cs: Simple support for emitting fields.
366 2008-01-30 Jb Evain <jbevain@novell.com>
368 * MethodCallExpression.cs: very naive implementation of Emit.
370 2008-01-30 Jb Evain <jbevain@novell.com>
372 * NewExpression.cs: add Emit support for reference types.
374 2008-01-30 Jb Evain <jbevain@novell.com>
376 * LambdaExpression.cs, EmitContext.cs: small refactoring.
377 Extract the different EmitContexts to their own file.
379 2008-01-29 Jb Evain <jbevain@novell.com>
381 * MethodCallExpression.cs, Expression.cs: complete Calls.
383 2008-01-29 Jb Evain <jbevain@novell.com>
385 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
386 implement the first flavors of New.
388 2008-01-27 Jb Evain <jbevain@novell.com>
390 * ConditionalExpression.cs: implement Emit.
392 2008-01-27 Jb Evain <jbevain@novell.com>
394 * Expression.cs: implement the last Lambda method.
396 2008-01-27 Jb Evain <jbevain@novell.com>
398 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
400 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
402 * Expression.cs, InvocationExpession.cs,
403 ListInitExpression.cs, MemberInitExpression.cs
404 NewExpression.cs : Add all missing
405 constructor in Expressions and remove the base one
407 2008-01-25 Jb Evain <jbevain@novell.com>
409 * Expression.cs, ExpressionPrinter.cs: implement Bind.
411 2008-01-25 Jb Evain <jbevain@novell.com>
413 * MemberMemberBinding.cs, MemberListBinding.cs,
414 MemberAssignment.cs, MemberBinding.cs:
417 2008-01-25 Jb Evain <jbevain@novell.com>
419 * Expression.cs: implement PropertyOrField.
421 2008-01-24 Jb Evain <jbevain@novell.com>
423 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
424 implement Field and Property.
426 2008-01-22 Miguel de Icaza <miguel@novell.com>
428 * BinaryExpression.cs: Unleash the power of cut and paste.
430 Bring a bunch of operatros from mcs/expression.cs
432 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
433 used those from mcs, that was wrong. use the proper ones, clean
436 * BinaryExpression.cs: Add method invocations for binary methods.
438 2008-01-22 Jb Evain <jbevain@novell.com>
440 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
442 2008-01-22 Jb Evain <jbevain@novell.com>
444 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
445 implement Expression.NewArrayBounds.
447 2008-01-22 Jb Evain <jbevain@novell.com>
449 * ExpressionPrinter.cs: fix Lambda and Equal.
451 2008-01-22 Miguel de Icaza <miguel@novell.com>
453 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
456 TODO: this does not use the "Conversion" Lambda, which am not sure
457 who generates this or what it is used for.
459 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
461 * Expression.cs: Add support for Coalesce.
462 (BinaryCoreCheck): Move more checking here, instead of the helper
463 routines, will remove them next.
465 * LambdaExpression.cs (Compile): Create the delegate last, so we
466 manage to save the assembly while debugging in case of error
468 2008-01-21 Miguel de Icaza <miguel@novell.com>
470 * Expression.cs (BinaryCoreCheck): Add checking for a few
471 operators here (to avoid doing a second pass, handles AndAlso and
474 (AndAlso, OrElse): Add some code.
476 * BinaryExpression.cs: Instead of using GetValueOrDefault use
477 get_Value, as we already probed for the lack of value.
479 Split out support for And/Or to a separate routine as the code is
480 not very easy to share with the arithmetics code.
482 2008-01-21 Marek Safar <marek.safar@gmail.com>
484 * BinaryExpression.cs: Fixed initobj initialization.
486 2008-01-21 Jb Evain <jbevain@novell.com>
488 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
489 Move the IsUnsigned helper from BinaryExpression to Expression,
490 so it can be used in UnaryExpression.
492 2008-01-21 Miguel de Icaza <miguel@novell.com>
494 * Start code generation for nullables, currently this generates
495 incorrect code for things like:
497 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
498 e2.Compile ().Invoke (null, 3))
500 This should return null, but returns something else.
502 * Introduce LINQ_DBG env variable, which generates a linq file in
503 /tmp; It currently does not work as well as it should, as the
504 Func<> parameters do not mwatch the generated method.
508 2008-01-20 Miguel de Icaza <miguel@novell.com>
510 Introduce support for Nullable arguments, no code is generated for
511 these yet, its only tests + node creation behavior at this point.
513 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
514 as operators, they must both be nullable.
516 NullableTypes in the arguments are transformed into the underlying
517 values when doing the method validation.
519 2008-01-18 Miguel de Icaza <miguel@novell.com>
521 * ParameterExpression.cs: Add emit support.
523 2008-01-18 Jb Evain <jbevain@novell.com>
525 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
527 2008-01-18 Miguel de Icaza <miguel@novell.com>
529 * BinaryExpression.cs: Add support for emitting code for some
530 operators (ported from the Mono C# compiler).
534 2008-01-17 Miguel de Icaza <miguel@novell.com>
536 Beginning of code generation framework for Linq.Expressions.
537 Some code was borrowed by from the C# compiler
539 * Expression_T.cs: Fill in the blanks.
541 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
544 * ConstantExpression.cs: Mostly done, need to write tests for
545 non-fundamental types and other ValueType initializations.
547 2008-01-17 Jb Evain <jbevain@novell.com>
549 * Expression.cs: implement MakeMemberAccess.
551 2008-01-17 Jb Evain <jbevain@novell.com>
553 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
554 implement ArrayIndex.
556 2008-01-17 Jb Evain <jbevain@novell.com>
558 * Expression.cs: Use TypeCode for IsInt and IsNumber.
560 2008-01-16 Miguel de Icaza <miguel@novell.com>
562 * Expression.cs: Add support for user-defined operators.
564 Put back various binary operator tests.
566 2008-01-16 Jb Evain <jbevain@novell.com>
568 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
570 2008-01-15 Miguel de Icaza <miguel@novell.com>
572 * Expression.cs: Do validation on the method parameters and use
573 the return type if provided.
575 2008-01-15 Jb Evain <jbevain@novell.com>
577 * MethodCallExpression.cs, Expression.cs
578 ExpressionPrinter.cs: Implement Call (Expression, ...)
580 2008-01-15 Jb Evain <jbevain@novell.com>
582 * Expression.cs, ConditionalExpressionExpression.cs
583 ExpressionPrinter.cs : implement Expression.Condition.
585 2008-01-15 Jb Evain <jbevain@novell.com>
588 ParameterExpression.cs,
589 ExpressionPrinter.cs: implement Expression.Parameter
591 2008-01-15 Jb Evain <jbevain@novell.com>
593 * ExpressionPrinter.cs (VisitBinaryExpression): simple
594 implementation (probably misses a few cases).
596 2008-01-14 Miguel de Icaza <miguel@novell.com>
598 * Expression.cs: Bring back the (most) of binary operators. Added
599 type checking as well and reorganized the source file by topic
600 instead of alphabetical sorting.
602 2008-01-14 Jb Evain <jbevain@novell.com>
604 * ExpressionPrinter.cs: print ArrayLength.
606 2008-01-14 Jb Evain <jbevain@novell.com>
608 * Expression.cs: TypeAs can't take value types.
609 * ExpressionPrinter.cs: implement TypeAs.
611 2008-01-14 Jb Evain <jbevain@novell.com>
613 * Expression.cs: implement TypeIs.
614 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
615 * TypeBinaryExpression.cs: add proper ctor.
617 2008-01-14 Jb Evain <jbevain@novell.com>
619 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
621 2008-01-14 Jb Evain <jbevain@novell.com>
623 * BinaryExpression.cs,
624 * Expression.cs: revert part of Miguel's last patch.
625 MakeBinary is expected to call the appropriate factory
626 methods. Whose methods that are responsible for creating
627 the good BinaryExpression, wether they use a custom method
630 2008-01-14 Jb Evain <jbevain@novell.com>
632 * Expression.cs: MakeUnary is expected to call the appropriate
635 2008-01-14 Miguel de Icaza <miguel@novell.com>
637 * Expression.cs (Constant, MakeBinary and consumers of it): Some
638 more fill-up changes.
640 MakeBinary will need much more work to support user-provided
643 2008-01-13 Jb Evain <jbevain@novell.com>
645 * *.cs: fresh implementation.