1 2008-05-14 Jb Evain <jbevain@novell.com>
3 * EmitContext.cs: only generate a new lambda name if we're in
6 2008-05-14 Jb Evain <jbevain@novell.com>
8 * LambdaExpression.cs, EmitContext.cs: When encountering a lambda
9 inside an ET, compile it as a read of a global. Based on a patch
10 by Roei Erez <roeie@mainsoft.com>
12 2008-05-08 Jb Evain <jbevain@novell.com>
14 * Expression.cs, EmitContext.cs: deal with call to methods
15 with byref parameters.
17 2008-05-07 Roei Erez <roeie@mainsoft.com>
19 * Add ifdef TARGET_JVM
21 2008-05-03 Jb Evain <jbevain@novell.com>
23 * LambdaExpression.cs: move checks to Expression
24 * Expression.cs: apply check for both typed and untyped lambda
25 creation, so that the constructor does not throws exception.
26 Needed to create instances of Expression<> for untyped lambda
27 factory method. Fixes #386322.
29 2008-05-02 Jb Evain <jbevain@novell.com>
31 * Expression.cs: make Emit virtual instead of abstract,
32 to allow externals libraries to extend Expression.
33 Patch by Jan Oravec <jan.oravec@6com.sk>. Fixes #386097.
35 2008-04-29 Jb Evain <jbevain@novell.com>
37 * UnaryExpression.cs (EmitPrimitiveConversion): implement.
39 2008-04-28 Jb Evain <jbevain@novell.com>
41 * EmitContext.cs: deal with globals when encountering them while
42 compiling, and not ahead of time with a dedicated visitor.
44 2008-04-27 Jb Evain <jbevain@novell.com>
46 * ConstantExpression.cs (Emit): emit properly null nullable types.
48 2008-04-27 Jb Evain <jbevain@novell.com>
50 * Expression.cs: improve method finder.
52 2008-04-24 Jb Evain <jbevain@novell.com>
54 * UnaryExpression.cs, EmitContext.cs: implement compilation
55 of Quote as a global load.
57 2008-04-23 Jb Evain <jbevain@novell.com>
59 * UnaryExpression.cs: start implementing EmitConvert.
61 2008-04-23 Jb Evain <jbevain@novell.com>
63 * ConstantExpression.cs (Emit): properly Emit null constants.
65 2008-04-23 Jb Evain <jbevain@novell.com>
67 * Expression.cs (Constant): check for assignability, not for type
68 equality, when a type is passed.
70 2008-04-23 Jb Evain <jbevain@novell.com>
72 * ExpressionPrinter.cs: ToString convert properly.
74 2008-04-22 Jb Evain <jbevain@novell.com>
76 * UnaryExpression.cs: implement IsLiftedToNull properly.
77 * Expression.cs (Convert, ConvertChecked): implemented computing
78 of IsLifted and IsLiftedToNull for conversions.
80 2008-04-22 Jb Evain <jbevain@novell.com>
82 * Expression.cs (Convert, ConvertChecked): implement.
84 2008-04-21 Jb Evain <jbevain@novell.com>
86 * Expression.cs (Call): don't rely on the fact that if the
87 instance expression is null, then it's a static call. Explicitely
88 check on the MethodInfo for that.
89 * EmitContext.cs (EmitCall): same pattern.
91 2008-04-20 Jb Evain <jbevain@novell.com>
93 * MemberMemberBinding.cs (Emit): implement.
95 2008-04-19 Jb Evain <jbevain@novell.com>
97 * EmitContext.cs: infrastructure work to attach a compiled
98 lambda expression to an execution scope, and to detect and store
99 external globals in the scope.
100 * ConstantExpression.cs: load globals from the scope.
102 2008-04-19 Jb Evain <jbevain@novell.com>
104 * ExpressionVisitor.cs (Visit): don't die because of Power.
106 2008-04-09 Jb Evain <jbevain@novell.com>
108 * Expression.cs: check for illegal booleab unary expressions.
110 2008-04-09 Jb Evain <jbevain@novell.com>
112 * UnaryExpression.cs: implement compilation of negate.
114 2008-04-09 Jb Evain <jbevain@novell.com>
116 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
117 to null for simple unary operators. Implement Not compilation.
119 2008-04-08 Jb Evain <jbevain@novell.com>
121 * ElementInit.cs: emit pop if the add method doesn't return void.
123 2008-03-20 Jb Evain <jbevain@novell.com>
125 * Expression.cs: use the new and more complete IsAssignableTo
126 instead of IsAssignableFrom.
128 2008-03-19 Jb Evain <jbevain@novell.com>
130 * LambdaExpression.cs: use the new standardified IsAssignableTo,
131 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
133 2008-03-19 Jb Evain <jbevain@novell.com>
135 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
137 2008-03-13 Jb Evain <jbevain@novell.com>
139 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
141 2008-03-12 Jb Evain <jbevain@novell.com>
143 * NewArrayExpression.cs (Emit): naive implementation of emit support
144 for array initialization.
146 2008-03-11 Jb Evain <jbevain@novell.com>
148 * BinaryExpression.cs: very naive implementation of emitting
151 2008-03-11 Jb Evain <jbevain@novell.com>
153 * *.cs: Move the different Emit* helpers to EmitContext,
154 so that they get used more naturally by the non Expression
157 2008-03-10 Jb Evain <jbevain@novell.com>
159 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
160 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
162 2008-03-10 Jb Evain <jbevain@novell.com>
164 * TypeBinaryExpression.cs (Emit): implement.
166 2008-03-08 Jb Evain <jbevain@novell.com>
168 * MemberListBinding.cs (Emit): implement.
169 * MemberBinding.cs (EmitLoadMember): add helper.
171 2008-03-08 Jb Evain <jbevain@novell.com>
173 * MemberAssignment.cs (Emit): implement.
175 2008-03-08 Jb Evain <jbevain@novell.com>
177 * ElementInit.cs (Emit): implement.
179 2008-03-06 Jb Evain <jbevain@novell.com>
181 * EmitContext.cs: the DebugContext delegate the CreateDelegate
182 to a DynamicContext to avoid visibility issues in debug mode.
184 2008-03-06 Jb Evain <jbevain@novell.com>
186 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
188 2008-03-06 Jb Evain <jbevain@novell.com>
190 * MethodCallExpression.cs, Expression.cs: refactor method calling
191 into a more sophisticated EmitCall in Expression.
192 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
194 2008-03-06 Jb Evain <jbevain@novell.com>
196 * Expression.cs: add a EmitCall helper.
197 * MemberExpression.cs: implement property access.
199 2008-03-06 Jb Evain <jbevain@novell.com>
201 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
202 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
204 2008-03-06 Jb Evain <jbevain@novell.com>
206 * BinaryExpression.cs, Expression.cs: move EmitStored from
207 BinaryExpression to Expression.
208 * MethodCallExpression.cs: allow method calls on structs.
210 2008-03-05 Jb Evain <jbevain@novell.com>
212 * Expression.cs: Fix the Call method which takes an array
215 2008-03-05 Jb Evain <jbevain@novell.com>
217 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
219 2008-02-26 Jb Evain <jbevain@novell.com>
221 * Expression.cs (Call): Guess the parameters type from the argument
224 2008-02-25 Jb Evain <jbevain@novell.com>
226 * NewExpression.cs (Emit): deal with value types construction.
228 2008-02-25 Jb Evain <jbevain@novell.com>
230 * Expression.cs, NewExpression.cs: deal with the fact that value types
231 don't have a parameterless constructor.
233 2008-02-24 Jb Evain <jbevain@novell.com>
235 * LambdaExpression.cs, EmitContext.cs: make compilation
236 of delegate returning void work.
238 2008-02-24 Jb Evain <jbevain@novell.com>
240 * MethodCallExpression.cs: emit call or callvirt depending
241 on the virtuality of the method.
243 2008-02-24 Jb Evain <jbevain@novell.com>
245 * LambdaExpression.cs: properly format error message.
247 2008-02-21 Jb Evain <jbevain@novell.com>
249 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
251 2008-02-21 Jb Evain <jbevain@novell.com>
253 * BinaryExpression.cs (Emit): fix the both_are_null case.
255 2008-02-20 Jb Evain <jbevain@novell.com>
257 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
259 2008-02-20 Jb Evain <jbevain@novell.com>
261 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
263 2008-02-19 Jb Evain <jbevain@novell.com>
265 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
267 2008-02-19 Jb Evain <jbevain@novell.com>
269 * Expression.cs, ExpressionPrinter.cs: implement last New
270 overload for anonymous types.
272 2008-02-08 Jb Evain <jbevain@novell.com>
274 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
275 add support for Invoke.
277 2008-02-04 Jb Evain <jbevain@novell.com>
279 * ExpressionPrinter.cs: fix printing of MemberListBinding.
281 2008-02-04 Jb Evain <jbevain@novell.com>
283 * Expression.cs, NewExpression.cs: make New(Type) test pass.
285 2008-02-04 Jb Evain <jbevain@novell.com>
287 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
289 2008-02-02 Jb Evain <jbevain@novell.com>
291 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
293 2008-02-02 Jb Evain <jbevain@novell.com>
295 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
297 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
299 * Expression.cs, ExpressionPrinter.cs:Add ListBind
301 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
303 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
305 2008-01-31 Jb Evain <jbevain@novell.com>
307 * UnaryExpression.cs: emit array length.
309 2008-01-31 Jb Evain <jbevain@novell.com>
311 * MemberExpression.cs: Simple support for emitting fields.
313 2008-01-30 Jb Evain <jbevain@novell.com>
315 * MethodCallExpression.cs: very naive implementation of Emit.
317 2008-01-30 Jb Evain <jbevain@novell.com>
319 * NewExpression.cs: add Emit support for reference types.
321 2008-01-30 Jb Evain <jbevain@novell.com>
323 * LambdaExpression.cs, EmitContext.cs: small refactoring.
324 Extract the different EmitContexts to their own file.
326 2008-01-29 Jb Evain <jbevain@novell.com>
328 * MethodCallExpression.cs, Expression.cs: complete Calls.
330 2008-01-29 Jb Evain <jbevain@novell.com>
332 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
333 implement the first flavors of New.
335 2008-01-27 Jb Evain <jbevain@novell.com>
337 * ConditionalExpression.cs: implement Emit.
339 2008-01-27 Jb Evain <jbevain@novell.com>
341 * Expression.cs: implement the last Lambda method.
343 2008-01-27 Jb Evain <jbevain@novell.com>
345 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
347 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
349 * Expression.cs, InvocationExpession.cs,
350 ListInitExpression.cs, MemberInitExpression.cs
351 NewExpression.cs : Add all missing
352 constructor in Expressions and remove the base one
354 2008-01-25 Jb Evain <jbevain@novell.com>
356 * Expression.cs, ExpressionPrinter.cs: implement Bind.
358 2008-01-25 Jb Evain <jbevain@novell.com>
360 * MemberMemberBinding.cs, MemberListBinding.cs,
361 MemberAssignment.cs, MemberBinding.cs:
364 2008-01-25 Jb Evain <jbevain@novell.com>
366 * Expression.cs: implement PropertyOrField.
368 2008-01-24 Jb Evain <jbevain@novell.com>
370 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
371 implement Field and Property.
373 2008-01-22 Miguel de Icaza <miguel@novell.com>
375 * BinaryExpression.cs: Unleash the power of cut and paste.
377 Bring a bunch of operatros from mcs/expression.cs
379 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
380 used those from mcs, that was wrong. use the proper ones, clean
383 * BinaryExpression.cs: Add method invocations for binary methods.
385 2008-01-22 Jb Evain <jbevain@novell.com>
387 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
389 2008-01-22 Jb Evain <jbevain@novell.com>
391 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
392 implement Expression.NewArrayBounds.
394 2008-01-22 Jb Evain <jbevain@novell.com>
396 * ExpressionPrinter.cs: fix Lambda and Equal.
398 2008-01-22 Miguel de Icaza <miguel@novell.com>
400 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
403 TODO: this does not use the "Conversion" Lambda, which am not sure
404 who generates this or what it is used for.
406 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
408 * Expression.cs: Add support for Coalesce.
409 (BinaryCoreCheck): Move more checking here, instead of the helper
410 routines, will remove them next.
412 * LambdaExpression.cs (Compile): Create the delegate last, so we
413 manage to save the assembly while debugging in case of error
415 2008-01-21 Miguel de Icaza <miguel@novell.com>
417 * Expression.cs (BinaryCoreCheck): Add checking for a few
418 operators here (to avoid doing a second pass, handles AndAlso and
421 (AndAlso, OrElse): Add some code.
423 * BinaryExpression.cs: Instead of using GetValueOrDefault use
424 get_Value, as we already probed for the lack of value.
426 Split out support for And/Or to a separate routine as the code is
427 not very easy to share with the arithmetics code.
429 2008-01-21 Marek Safar <marek.safar@gmail.com>
431 * BinaryExpression.cs: Fixed initobj initialization.
433 2008-01-21 Jb Evain <jbevain@novell.com>
435 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
436 Move the IsUnsigned helper from BinaryExpression to Expression,
437 so it can be used in UnaryExpression.
439 2008-01-21 Miguel de Icaza <miguel@novell.com>
441 * Start code generation for nullables, currently this generates
442 incorrect code for things like:
444 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
445 e2.Compile ().Invoke (null, 3))
447 This should return null, but returns something else.
449 * Introduce LINQ_DBG env variable, which generates a linq file in
450 /tmp; It currently does not work as well as it should, as the
451 Func<> parameters do not mwatch the generated method.
455 2008-01-20 Miguel de Icaza <miguel@novell.com>
457 Introduce support for Nullable arguments, no code is generated for
458 these yet, its only tests + node creation behavior at this point.
460 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
461 as operators, they must both be nullable.
463 NullableTypes in the arguments are transformed into the underlying
464 values when doing the method validation.
466 2008-01-18 Miguel de Icaza <miguel@novell.com>
468 * ParameterExpression.cs: Add emit support.
470 2008-01-18 Jb Evain <jbevain@novell.com>
472 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
474 2008-01-18 Miguel de Icaza <miguel@novell.com>
476 * BinaryExpression.cs: Add support for emitting code for some
477 operators (ported from the Mono C# compiler).
481 2008-01-17 Miguel de Icaza <miguel@novell.com>
483 Beginning of code generation framework for Linq.Expressions.
484 Some code was borrowed by from the C# compiler
486 * Expression_T.cs: Fill in the blanks.
488 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
491 * ConstantExpression.cs: Mostly done, need to write tests for
492 non-fundamental types and other ValueType initializations.
494 2008-01-17 Jb Evain <jbevain@novell.com>
496 * Expression.cs: implement MakeMemberAccess.
498 2008-01-17 Jb Evain <jbevain@novell.com>
500 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
501 implement ArrayIndex.
503 2008-01-17 Jb Evain <jbevain@novell.com>
505 * Expression.cs: Use TypeCode for IsInt and IsNumber.
507 2008-01-16 Miguel de Icaza <miguel@novell.com>
509 * Expression.cs: Add support for user-defined operators.
511 Put back various binary operator tests.
513 2008-01-16 Jb Evain <jbevain@novell.com>
515 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
517 2008-01-15 Miguel de Icaza <miguel@novell.com>
519 * Expression.cs: Do validation on the method parameters and use
520 the return type if provided.
522 2008-01-15 Jb Evain <jbevain@novell.com>
524 * MethodCallExpression.cs, Expression.cs
525 ExpressionPrinter.cs: Implement Call (Expression, ...)
527 2008-01-15 Jb Evain <jbevain@novell.com>
529 * Expression.cs, ConditionalExpressionExpression.cs
530 ExpressionPrinter.cs : implement Expression.Condition.
532 2008-01-15 Jb Evain <jbevain@novell.com>
535 ParameterExpression.cs,
536 ExpressionPrinter.cs: implement Expression.Parameter
538 2008-01-15 Jb Evain <jbevain@novell.com>
540 * ExpressionPrinter.cs (VisitBinaryExpression): simple
541 implementation (probably misses a few cases).
543 2008-01-14 Miguel de Icaza <miguel@novell.com>
545 * Expression.cs: Bring back the (most) of binary operators. Added
546 type checking as well and reorganized the source file by topic
547 instead of alphabetical sorting.
549 2008-01-14 Jb Evain <jbevain@novell.com>
551 * ExpressionPrinter.cs: print ArrayLength.
553 2008-01-14 Jb Evain <jbevain@novell.com>
555 * Expression.cs: TypeAs can't take value types.
556 * ExpressionPrinter.cs: implement TypeAs.
558 2008-01-14 Jb Evain <jbevain@novell.com>
560 * Expression.cs: implement TypeIs.
561 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
562 * TypeBinaryExpression.cs: add proper ctor.
564 2008-01-14 Jb Evain <jbevain@novell.com>
566 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
568 2008-01-14 Jb Evain <jbevain@novell.com>
570 * BinaryExpression.cs,
571 * Expression.cs: revert part of Miguel's last patch.
572 MakeBinary is expected to call the appropriate factory
573 methods. Whose methods that are responsible for creating
574 the good BinaryExpression, wether they use a custom method
577 2008-01-14 Jb Evain <jbevain@novell.com>
579 * Expression.cs: MakeUnary is expected to call the appropriate
582 2008-01-14 Miguel de Icaza <miguel@novell.com>
584 * Expression.cs (Constant, MakeBinary and consumers of it): Some
585 more fill-up changes.
587 MakeBinary will need much more work to support user-provided
590 2008-01-13 Jb Evain <jbevain@novell.com>
592 * *.cs: fresh implementation.