1 2008-05-14 Jb Evain <jbevain@novell.com>
3 * LambdaExpression.cs, EmitContext.cs: When encountering a lambda
4 inside an ET, compile it as a read of a global. Based on a patch
5 by Roei Erez <roeie@mainsoft.com>
7 2008-05-08 Jb Evain <jbevain@novell.com>
9 * Expression.cs, EmitContext.cs: deal with call to methods
10 with byref parameters.
12 2008-05-07 Roei Erez <roeie@mainsoft.com>
14 * Add ifdef TARGET_JVM
16 2008-05-03 Jb Evain <jbevain@novell.com>
18 * LambdaExpression.cs: move checks to Expression
19 * Expression.cs: apply check for both typed and untyped lambda
20 creation, so that the constructor does not throws exception.
21 Needed to create instances of Expression<> for untyped lambda
22 factory method. Fixes #386322.
24 2008-05-02 Jb Evain <jbevain@novell.com>
26 * Expression.cs: make Emit virtual instead of abstract,
27 to allow externals libraries to extend Expression.
28 Patch by Jan Oravec <jan.oravec@6com.sk>. Fixes #386097.
30 2008-04-29 Jb Evain <jbevain@novell.com>
32 * UnaryExpression.cs (EmitPrimitiveConversion): implement.
34 2008-04-28 Jb Evain <jbevain@novell.com>
36 * EmitContext.cs: deal with globals when encountering them while
37 compiling, and not ahead of time with a dedicated visitor.
39 2008-04-27 Jb Evain <jbevain@novell.com>
41 * ConstantExpression.cs (Emit): emit properly null nullable types.
43 2008-04-27 Jb Evain <jbevain@novell.com>
45 * Expression.cs: improve method finder.
47 2008-04-24 Jb Evain <jbevain@novell.com>
49 * UnaryExpression.cs, EmitContext.cs: implement compilation
50 of Quote as a global load.
52 2008-04-23 Jb Evain <jbevain@novell.com>
54 * UnaryExpression.cs: start implementing EmitConvert.
56 2008-04-23 Jb Evain <jbevain@novell.com>
58 * ConstantExpression.cs (Emit): properly Emit null constants.
60 2008-04-23 Jb Evain <jbevain@novell.com>
62 * Expression.cs (Constant): check for assignability, not for type
63 equality, when a type is passed.
65 2008-04-23 Jb Evain <jbevain@novell.com>
67 * ExpressionPrinter.cs: ToString convert properly.
69 2008-04-22 Jb Evain <jbevain@novell.com>
71 * UnaryExpression.cs: implement IsLiftedToNull properly.
72 * Expression.cs (Convert, ConvertChecked): implemented computing
73 of IsLifted and IsLiftedToNull for conversions.
75 2008-04-22 Jb Evain <jbevain@novell.com>
77 * Expression.cs (Convert, ConvertChecked): implement.
79 2008-04-21 Jb Evain <jbevain@novell.com>
81 * Expression.cs (Call): don't rely on the fact that if the
82 instance expression is null, then it's a static call. Explicitely
83 check on the MethodInfo for that.
84 * EmitContext.cs (EmitCall): same pattern.
86 2008-04-20 Jb Evain <jbevain@novell.com>
88 * MemberMemberBinding.cs (Emit): implement.
90 2008-04-19 Jb Evain <jbevain@novell.com>
92 * EmitContext.cs: infrastructure work to attach a compiled
93 lambda expression to an execution scope, and to detect and store
94 external globals in the scope.
95 * ConstantExpression.cs: load globals from the scope.
97 2008-04-19 Jb Evain <jbevain@novell.com>
99 * ExpressionVisitor.cs (Visit): don't die because of Power.
101 2008-04-09 Jb Evain <jbevain@novell.com>
103 * Expression.cs: check for illegal booleab unary expressions.
105 2008-04-09 Jb Evain <jbevain@novell.com>
107 * UnaryExpression.cs: implement compilation of negate.
109 2008-04-09 Jb Evain <jbevain@novell.com>
111 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
112 to null for simple unary operators. Implement Not compilation.
114 2008-04-08 Jb Evain <jbevain@novell.com>
116 * ElementInit.cs: emit pop if the add method doesn't return void.
118 2008-03-20 Jb Evain <jbevain@novell.com>
120 * Expression.cs: use the new and more complete IsAssignableTo
121 instead of IsAssignableFrom.
123 2008-03-19 Jb Evain <jbevain@novell.com>
125 * LambdaExpression.cs: use the new standardified IsAssignableTo,
126 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
128 2008-03-19 Jb Evain <jbevain@novell.com>
130 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
132 2008-03-13 Jb Evain <jbevain@novell.com>
134 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
136 2008-03-12 Jb Evain <jbevain@novell.com>
138 * NewArrayExpression.cs (Emit): naive implementation of emit support
139 for array initialization.
141 2008-03-11 Jb Evain <jbevain@novell.com>
143 * BinaryExpression.cs: very naive implementation of emitting
146 2008-03-11 Jb Evain <jbevain@novell.com>
148 * *.cs: Move the different Emit* helpers to EmitContext,
149 so that they get used more naturally by the non Expression
152 2008-03-10 Jb Evain <jbevain@novell.com>
154 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
155 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
157 2008-03-10 Jb Evain <jbevain@novell.com>
159 * TypeBinaryExpression.cs (Emit): implement.
161 2008-03-08 Jb Evain <jbevain@novell.com>
163 * MemberListBinding.cs (Emit): implement.
164 * MemberBinding.cs (EmitLoadMember): add helper.
166 2008-03-08 Jb Evain <jbevain@novell.com>
168 * MemberAssignment.cs (Emit): implement.
170 2008-03-08 Jb Evain <jbevain@novell.com>
172 * ElementInit.cs (Emit): implement.
174 2008-03-06 Jb Evain <jbevain@novell.com>
176 * EmitContext.cs: the DebugContext delegate the CreateDelegate
177 to a DynamicContext to avoid visibility issues in debug mode.
179 2008-03-06 Jb Evain <jbevain@novell.com>
181 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
183 2008-03-06 Jb Evain <jbevain@novell.com>
185 * MethodCallExpression.cs, Expression.cs: refactor method calling
186 into a more sophisticated EmitCall in Expression.
187 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
189 2008-03-06 Jb Evain <jbevain@novell.com>
191 * Expression.cs: add a EmitCall helper.
192 * MemberExpression.cs: implement property access.
194 2008-03-06 Jb Evain <jbevain@novell.com>
196 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
197 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
199 2008-03-06 Jb Evain <jbevain@novell.com>
201 * BinaryExpression.cs, Expression.cs: move EmitStored from
202 BinaryExpression to Expression.
203 * MethodCallExpression.cs: allow method calls on structs.
205 2008-03-05 Jb Evain <jbevain@novell.com>
207 * Expression.cs: Fix the Call method which takes an array
210 2008-03-05 Jb Evain <jbevain@novell.com>
212 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
214 2008-02-26 Jb Evain <jbevain@novell.com>
216 * Expression.cs (Call): Guess the parameters type from the argument
219 2008-02-25 Jb Evain <jbevain@novell.com>
221 * NewExpression.cs (Emit): deal with value types construction.
223 2008-02-25 Jb Evain <jbevain@novell.com>
225 * Expression.cs, NewExpression.cs: deal with the fact that value types
226 don't have a parameterless constructor.
228 2008-02-24 Jb Evain <jbevain@novell.com>
230 * LambdaExpression.cs, EmitContext.cs: make compilation
231 of delegate returning void work.
233 2008-02-24 Jb Evain <jbevain@novell.com>
235 * MethodCallExpression.cs: emit call or callvirt depending
236 on the virtuality of the method.
238 2008-02-24 Jb Evain <jbevain@novell.com>
240 * LambdaExpression.cs: properly format error message.
242 2008-02-21 Jb Evain <jbevain@novell.com>
244 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
246 2008-02-21 Jb Evain <jbevain@novell.com>
248 * BinaryExpression.cs (Emit): fix the both_are_null case.
250 2008-02-20 Jb Evain <jbevain@novell.com>
252 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
254 2008-02-20 Jb Evain <jbevain@novell.com>
256 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
258 2008-02-19 Jb Evain <jbevain@novell.com>
260 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
262 2008-02-19 Jb Evain <jbevain@novell.com>
264 * Expression.cs, ExpressionPrinter.cs: implement last New
265 overload for anonymous types.
267 2008-02-08 Jb Evain <jbevain@novell.com>
269 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
270 add support for Invoke.
272 2008-02-04 Jb Evain <jbevain@novell.com>
274 * ExpressionPrinter.cs: fix printing of MemberListBinding.
276 2008-02-04 Jb Evain <jbevain@novell.com>
278 * Expression.cs, NewExpression.cs: make New(Type) test pass.
280 2008-02-04 Jb Evain <jbevain@novell.com>
282 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
284 2008-02-02 Jb Evain <jbevain@novell.com>
286 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
288 2008-02-02 Jb Evain <jbevain@novell.com>
290 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
292 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
294 * Expression.cs, ExpressionPrinter.cs:Add ListBind
296 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
298 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
300 2008-01-31 Jb Evain <jbevain@novell.com>
302 * UnaryExpression.cs: emit array length.
304 2008-01-31 Jb Evain <jbevain@novell.com>
306 * MemberExpression.cs: Simple support for emitting fields.
308 2008-01-30 Jb Evain <jbevain@novell.com>
310 * MethodCallExpression.cs: very naive implementation of Emit.
312 2008-01-30 Jb Evain <jbevain@novell.com>
314 * NewExpression.cs: add Emit support for reference types.
316 2008-01-30 Jb Evain <jbevain@novell.com>
318 * LambdaExpression.cs, EmitContext.cs: small refactoring.
319 Extract the different EmitContexts to their own file.
321 2008-01-29 Jb Evain <jbevain@novell.com>
323 * MethodCallExpression.cs, Expression.cs: complete Calls.
325 2008-01-29 Jb Evain <jbevain@novell.com>
327 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
328 implement the first flavors of New.
330 2008-01-27 Jb Evain <jbevain@novell.com>
332 * ConditionalExpression.cs: implement Emit.
334 2008-01-27 Jb Evain <jbevain@novell.com>
336 * Expression.cs: implement the last Lambda method.
338 2008-01-27 Jb Evain <jbevain@novell.com>
340 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
342 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
344 * Expression.cs, InvocationExpession.cs,
345 ListInitExpression.cs, MemberInitExpression.cs
346 NewExpression.cs : Add all missing
347 constructor in Expressions and remove the base one
349 2008-01-25 Jb Evain <jbevain@novell.com>
351 * Expression.cs, ExpressionPrinter.cs: implement Bind.
353 2008-01-25 Jb Evain <jbevain@novell.com>
355 * MemberMemberBinding.cs, MemberListBinding.cs,
356 MemberAssignment.cs, MemberBinding.cs:
359 2008-01-25 Jb Evain <jbevain@novell.com>
361 * Expression.cs: implement PropertyOrField.
363 2008-01-24 Jb Evain <jbevain@novell.com>
365 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
366 implement Field and Property.
368 2008-01-22 Miguel de Icaza <miguel@novell.com>
370 * BinaryExpression.cs: Unleash the power of cut and paste.
372 Bring a bunch of operatros from mcs/expression.cs
374 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
375 used those from mcs, that was wrong. use the proper ones, clean
378 * BinaryExpression.cs: Add method invocations for binary methods.
380 2008-01-22 Jb Evain <jbevain@novell.com>
382 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
384 2008-01-22 Jb Evain <jbevain@novell.com>
386 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
387 implement Expression.NewArrayBounds.
389 2008-01-22 Jb Evain <jbevain@novell.com>
391 * ExpressionPrinter.cs: fix Lambda and Equal.
393 2008-01-22 Miguel de Icaza <miguel@novell.com>
395 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
398 TODO: this does not use the "Conversion" Lambda, which am not sure
399 who generates this or what it is used for.
401 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
403 * Expression.cs: Add support for Coalesce.
404 (BinaryCoreCheck): Move more checking here, instead of the helper
405 routines, will remove them next.
407 * LambdaExpression.cs (Compile): Create the delegate last, so we
408 manage to save the assembly while debugging in case of error
410 2008-01-21 Miguel de Icaza <miguel@novell.com>
412 * Expression.cs (BinaryCoreCheck): Add checking for a few
413 operators here (to avoid doing a second pass, handles AndAlso and
416 (AndAlso, OrElse): Add some code.
418 * BinaryExpression.cs: Instead of using GetValueOrDefault use
419 get_Value, as we already probed for the lack of value.
421 Split out support for And/Or to a separate routine as the code is
422 not very easy to share with the arithmetics code.
424 2008-01-21 Marek Safar <marek.safar@gmail.com>
426 * BinaryExpression.cs: Fixed initobj initialization.
428 2008-01-21 Jb Evain <jbevain@novell.com>
430 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
431 Move the IsUnsigned helper from BinaryExpression to Expression,
432 so it can be used in UnaryExpression.
434 2008-01-21 Miguel de Icaza <miguel@novell.com>
436 * Start code generation for nullables, currently this generates
437 incorrect code for things like:
439 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
440 e2.Compile ().Invoke (null, 3))
442 This should return null, but returns something else.
444 * Introduce LINQ_DBG env variable, which generates a linq file in
445 /tmp; It currently does not work as well as it should, as the
446 Func<> parameters do not mwatch the generated method.
450 2008-01-20 Miguel de Icaza <miguel@novell.com>
452 Introduce support for Nullable arguments, no code is generated for
453 these yet, its only tests + node creation behavior at this point.
455 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
456 as operators, they must both be nullable.
458 NullableTypes in the arguments are transformed into the underlying
459 values when doing the method validation.
461 2008-01-18 Miguel de Icaza <miguel@novell.com>
463 * ParameterExpression.cs: Add emit support.
465 2008-01-18 Jb Evain <jbevain@novell.com>
467 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
469 2008-01-18 Miguel de Icaza <miguel@novell.com>
471 * BinaryExpression.cs: Add support for emitting code for some
472 operators (ported from the Mono C# compiler).
476 2008-01-17 Miguel de Icaza <miguel@novell.com>
478 Beginning of code generation framework for Linq.Expressions.
479 Some code was borrowed by from the C# compiler
481 * Expression_T.cs: Fill in the blanks.
483 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
486 * ConstantExpression.cs: Mostly done, need to write tests for
487 non-fundamental types and other ValueType initializations.
489 2008-01-17 Jb Evain <jbevain@novell.com>
491 * Expression.cs: implement MakeMemberAccess.
493 2008-01-17 Jb Evain <jbevain@novell.com>
495 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
496 implement ArrayIndex.
498 2008-01-17 Jb Evain <jbevain@novell.com>
500 * Expression.cs: Use TypeCode for IsInt and IsNumber.
502 2008-01-16 Miguel de Icaza <miguel@novell.com>
504 * Expression.cs: Add support for user-defined operators.
506 Put back various binary operator tests.
508 2008-01-16 Jb Evain <jbevain@novell.com>
510 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
512 2008-01-15 Miguel de Icaza <miguel@novell.com>
514 * Expression.cs: Do validation on the method parameters and use
515 the return type if provided.
517 2008-01-15 Jb Evain <jbevain@novell.com>
519 * MethodCallExpression.cs, Expression.cs
520 ExpressionPrinter.cs: Implement Call (Expression, ...)
522 2008-01-15 Jb Evain <jbevain@novell.com>
524 * Expression.cs, ConditionalExpressionExpression.cs
525 ExpressionPrinter.cs : implement Expression.Condition.
527 2008-01-15 Jb Evain <jbevain@novell.com>
530 ParameterExpression.cs,
531 ExpressionPrinter.cs: implement Expression.Parameter
533 2008-01-15 Jb Evain <jbevain@novell.com>
535 * ExpressionPrinter.cs (VisitBinaryExpression): simple
536 implementation (probably misses a few cases).
538 2008-01-14 Miguel de Icaza <miguel@novell.com>
540 * Expression.cs: Bring back the (most) of binary operators. Added
541 type checking as well and reorganized the source file by topic
542 instead of alphabetical sorting.
544 2008-01-14 Jb Evain <jbevain@novell.com>
546 * ExpressionPrinter.cs: print ArrayLength.
548 2008-01-14 Jb Evain <jbevain@novell.com>
550 * Expression.cs: TypeAs can't take value types.
551 * ExpressionPrinter.cs: implement TypeAs.
553 2008-01-14 Jb Evain <jbevain@novell.com>
555 * Expression.cs: implement TypeIs.
556 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
557 * TypeBinaryExpression.cs: add proper ctor.
559 2008-01-14 Jb Evain <jbevain@novell.com>
561 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
563 2008-01-14 Jb Evain <jbevain@novell.com>
565 * BinaryExpression.cs,
566 * Expression.cs: revert part of Miguel's last patch.
567 MakeBinary is expected to call the appropriate factory
568 methods. Whose methods that are responsible for creating
569 the good BinaryExpression, wether they use a custom method
572 2008-01-14 Jb Evain <jbevain@novell.com>
574 * Expression.cs: MakeUnary is expected to call the appropriate
577 2008-01-14 Miguel de Icaza <miguel@novell.com>
579 * Expression.cs (Constant, MakeBinary and consumers of it): Some
580 more fill-up changes.
582 MakeBinary will need much more work to support user-provided
585 2008-01-13 Jb Evain <jbevain@novell.com>
587 * *.cs: fresh implementation.