1 2008-04-23 Jb Evain <jbevain@novell.com>
3 * ConstantExpression.cs (Emit): properly Emit null constants.
5 2008-04-23 Jb Evain <jbevain@novell.com>
7 * Expression.cs (Constant): check for assignability, not for type
8 equality, when a type is passed.
10 2008-04-23 Jb Evain <jbevain@novell.com>
12 * ExpressionPrinter.cs: ToString convert properly.
14 2008-04-22 Jb Evain <jbevain@novell.com>
16 * UnaryExpression.cs: implement IsLiftedToNull properly.
17 * Expression.cs (Convert, ConvertChecked): implemented computing
18 of IsLifted and IsLiftedToNull for conversions.
20 2008-04-22 Jb Evain <jbevain@novell.com>
22 * Expression.cs (Convert, ConvertChecked): implement.
24 2008-04-21 Jb Evain <jbevain@novell.com>
26 * Expression.cs (Call): don't rely on the fact that if the
27 instance expression is null, then it's a static call. Explicitely
28 check on the MethodInfo for that.
29 * EmitContext.cs (EmitCall): same pattern.
31 2008-04-20 Jb Evain <jbevain@novell.com>
33 * MemberMemberBinding.cs (Emit): implement.
35 2008-04-19 Jb Evain <jbevain@novell.com>
37 * EmitContext.cs: infrastructure work to attach a compiled
38 lambda expression to an execution scope, and to detect and store
39 external globals in the scope.
40 * ConstantExpression.cs: load globals from the scope.
42 2008-04-19 Jb Evain <jbevain@novell.com>
44 * ExpressionVisitor.cs (Visit): don't die because of Power.
46 2008-04-09 Jb Evain <jbevain@novell.com>
48 * Expression.cs: check for illegal booleab unary expressions.
50 2008-04-09 Jb Evain <jbevain@novell.com>
52 * UnaryExpression.cs: implement compilation of negate.
54 2008-04-09 Jb Evain <jbevain@novell.com>
56 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
57 to null for simple unary operators. Implement Not compilation.
59 2008-04-08 Jb Evain <jbevain@novell.com>
61 * ElementInit.cs: emit pop if the add method doesn't return void.
63 2008-03-20 Jb Evain <jbevain@novell.com>
65 * Expression.cs: use the new and more complete IsAssignableTo
66 instead of IsAssignableFrom.
68 2008-03-19 Jb Evain <jbevain@novell.com>
70 * LambdaExpression.cs: use the new standardified IsAssignableTo,
71 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
73 2008-03-19 Jb Evain <jbevain@novell.com>
75 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
77 2008-03-13 Jb Evain <jbevain@novell.com>
79 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
81 2008-03-12 Jb Evain <jbevain@novell.com>
83 * NewArrayExpression.cs (Emit): naive implementation of emit support
84 for array initialization.
86 2008-03-11 Jb Evain <jbevain@novell.com>
88 * BinaryExpression.cs: very naive implementation of emitting
91 2008-03-11 Jb Evain <jbevain@novell.com>
93 * *.cs: Move the different Emit* helpers to EmitContext,
94 so that they get used more naturally by the non Expression
97 2008-03-10 Jb Evain <jbevain@novell.com>
99 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
100 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
102 2008-03-10 Jb Evain <jbevain@novell.com>
104 * TypeBinaryExpression.cs (Emit): implement.
106 2008-03-08 Jb Evain <jbevain@novell.com>
108 * MemberListBinding.cs (Emit): implement.
109 * MemberBinding.cs (EmitLoadMember): add helper.
111 2008-03-08 Jb Evain <jbevain@novell.com>
113 * MemberAssignment.cs (Emit): implement.
115 2008-03-08 Jb Evain <jbevain@novell.com>
117 * ElementInit.cs (Emit): implement.
119 2008-03-06 Jb Evain <jbevain@novell.com>
121 * EmitContext.cs: the DebugContext delegate the CreateDelegate
122 to a DynamicContext to avoid visibility issues in debug mode.
124 2008-03-06 Jb Evain <jbevain@novell.com>
126 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
128 2008-03-06 Jb Evain <jbevain@novell.com>
130 * MethodCallExpression.cs, Expression.cs: refactor method calling
131 into a more sophisticated EmitCall in Expression.
132 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
134 2008-03-06 Jb Evain <jbevain@novell.com>
136 * Expression.cs: add a EmitCall helper.
137 * MemberExpression.cs: implement property access.
139 2008-03-06 Jb Evain <jbevain@novell.com>
141 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
142 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
144 2008-03-06 Jb Evain <jbevain@novell.com>
146 * BinaryExpression.cs, Expression.cs: move EmitStored from
147 BinaryExpression to Expression.
148 * MethodCallExpression.cs: allow method calls on structs.
150 2008-03-05 Jb Evain <jbevain@novell.com>
152 * Expression.cs: Fix the Call method which takes an array
155 2008-03-05 Jb Evain <jbevain@novell.com>
157 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
159 2008-02-26 Jb Evain <jbevain@novell.com>
161 * Expression.cs (Call): Guess the parameters type from the argument
164 2008-02-25 Jb Evain <jbevain@novell.com>
166 * NewExpression.cs (Emit): deal with value types construction.
168 2008-02-25 Jb Evain <jbevain@novell.com>
170 * Expression.cs, NewExpression.cs: deal with the fact that value types
171 don't have a parameterless constructor.
173 2008-02-24 Jb Evain <jbevain@novell.com>
175 * LambdaExpression.cs, EmitContext.cs: make compilation
176 of delegate returning void work.
178 2008-02-24 Jb Evain <jbevain@novell.com>
180 * MethodCallExpression.cs: emit call or callvirt depending
181 on the virtuality of the method.
183 2008-02-24 Jb Evain <jbevain@novell.com>
185 * LambdaExpression.cs: properly format error message.
187 2008-02-21 Jb Evain <jbevain@novell.com>
189 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
191 2008-02-21 Jb Evain <jbevain@novell.com>
193 * BinaryExpression.cs (Emit): fix the both_are_null case.
195 2008-02-20 Jb Evain <jbevain@novell.com>
197 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
199 2008-02-20 Jb Evain <jbevain@novell.com>
201 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
203 2008-02-19 Jb Evain <jbevain@novell.com>
205 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
207 2008-02-19 Jb Evain <jbevain@novell.com>
209 * Expression.cs, ExpressionPrinter.cs: implement last New
210 overload for anonymous types.
212 2008-02-08 Jb Evain <jbevain@novell.com>
214 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
215 add support for Invoke.
217 2008-02-04 Jb Evain <jbevain@novell.com>
219 * ExpressionPrinter.cs: fix printing of MemberListBinding.
221 2008-02-04 Jb Evain <jbevain@novell.com>
223 * Expression.cs, NewExpression.cs: make New(Type) test pass.
225 2008-02-04 Jb Evain <jbevain@novell.com>
227 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
229 2008-02-02 Jb Evain <jbevain@novell.com>
231 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
233 2008-02-02 Jb Evain <jbevain@novell.com>
235 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
237 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
239 * Expression.cs, ExpressionPrinter.cs:Add ListBind
241 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
243 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
245 2008-01-31 Jb Evain <jbevain@novell.com>
247 * UnaryExpression.cs: emit array length.
249 2008-01-31 Jb Evain <jbevain@novell.com>
251 * MemberExpression.cs: Simple support for emitting fields.
253 2008-01-30 Jb Evain <jbevain@novell.com>
255 * MethodCallExpression.cs: very naive implementation of Emit.
257 2008-01-30 Jb Evain <jbevain@novell.com>
259 * NewExpression.cs: add Emit support for reference types.
261 2008-01-30 Jb Evain <jbevain@novell.com>
263 * LambdaExpression.cs, EmitContext.cs: small refactoring.
264 Extract the different EmitContexts to their own file.
266 2008-01-29 Jb Evain <jbevain@novell.com>
268 * MethodCallExpression.cs, Expression.cs: complete Calls.
270 2008-01-29 Jb Evain <jbevain@novell.com>
272 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
273 implement the first flavors of New.
275 2008-01-27 Jb Evain <jbevain@novell.com>
277 * ConditionalExpression.cs: implement Emit.
279 2008-01-27 Jb Evain <jbevain@novell.com>
281 * Expression.cs: implement the last Lambda method.
283 2008-01-27 Jb Evain <jbevain@novell.com>
285 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
287 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
289 * Expression.cs, InvocationExpession.cs,
290 ListInitExpression.cs, MemberInitExpression.cs
291 NewExpression.cs : Add all missing
292 constructor in Expressions and remove the base one
294 2008-01-25 Jb Evain <jbevain@novell.com>
296 * Expression.cs, ExpressionPrinter.cs: implement Bind.
298 2008-01-25 Jb Evain <jbevain@novell.com>
300 * MemberMemberBinding.cs, MemberListBinding.cs,
301 MemberAssignment.cs, MemberBinding.cs:
304 2008-01-25 Jb Evain <jbevain@novell.com>
306 * Expression.cs: implement PropertyOrField.
308 2008-01-24 Jb Evain <jbevain@novell.com>
310 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
311 implement Field and Property.
313 2008-01-22 Miguel de Icaza <miguel@novell.com>
315 * BinaryExpression.cs: Unleash the power of cut and paste.
317 Bring a bunch of operatros from mcs/expression.cs
319 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
320 used those from mcs, that was wrong. use the proper ones, clean
323 * BinaryExpression.cs: Add method invocations for binary methods.
325 2008-01-22 Jb Evain <jbevain@novell.com>
327 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
329 2008-01-22 Jb Evain <jbevain@novell.com>
331 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
332 implement Expression.NewArrayBounds.
334 2008-01-22 Jb Evain <jbevain@novell.com>
336 * ExpressionPrinter.cs: fix Lambda and Equal.
338 2008-01-22 Miguel de Icaza <miguel@novell.com>
340 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
343 TODO: this does not use the "Conversion" Lambda, which am not sure
344 who generates this or what it is used for.
346 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
348 * Expression.cs: Add support for Coalesce.
349 (BinaryCoreCheck): Move more checking here, instead of the helper
350 routines, will remove them next.
352 * LambdaExpression.cs (Compile): Create the delegate last, so we
353 manage to save the assembly while debugging in case of error
355 2008-01-21 Miguel de Icaza <miguel@novell.com>
357 * Expression.cs (BinaryCoreCheck): Add checking for a few
358 operators here (to avoid doing a second pass, handles AndAlso and
361 (AndAlso, OrElse): Add some code.
363 * BinaryExpression.cs: Instead of using GetValueOrDefault use
364 get_Value, as we already probed for the lack of value.
366 Split out support for And/Or to a separate routine as the code is
367 not very easy to share with the arithmetics code.
369 2008-01-21 Marek Safar <marek.safar@gmail.com>
371 * BinaryExpression.cs: Fixed initobj initialization.
373 2008-01-21 Jb Evain <jbevain@novell.com>
375 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
376 Move the IsUnsigned helper from BinaryExpression to Expression,
377 so it can be used in UnaryExpression.
379 2008-01-21 Miguel de Icaza <miguel@novell.com>
381 * Start code generation for nullables, currently this generates
382 incorrect code for things like:
384 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
385 e2.Compile ().Invoke (null, 3))
387 This should return null, but returns something else.
389 * Introduce LINQ_DBG env variable, which generates a linq file in
390 /tmp; It currently does not work as well as it should, as the
391 Func<> parameters do not mwatch the generated method.
395 2008-01-20 Miguel de Icaza <miguel@novell.com>
397 Introduce support for Nullable arguments, no code is generated for
398 these yet, its only tests + node creation behavior at this point.
400 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
401 as operators, they must both be nullable.
403 NullableTypes in the arguments are transformed into the underlying
404 values when doing the method validation.
406 2008-01-18 Miguel de Icaza <miguel@novell.com>
408 * ParameterExpression.cs: Add emit support.
410 2008-01-18 Jb Evain <jbevain@novell.com>
412 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
414 2008-01-18 Miguel de Icaza <miguel@novell.com>
416 * BinaryExpression.cs: Add support for emitting code for some
417 operators (ported from the Mono C# compiler).
421 2008-01-17 Miguel de Icaza <miguel@novell.com>
423 Beginning of code generation framework for Linq.Expressions.
424 Some code was borrowed by from the C# compiler
426 * Expression_T.cs: Fill in the blanks.
428 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
431 * ConstantExpression.cs: Mostly done, need to write tests for
432 non-fundamental types and other ValueType initializations.
434 2008-01-17 Jb Evain <jbevain@novell.com>
436 * Expression.cs: implement MakeMemberAccess.
438 2008-01-17 Jb Evain <jbevain@novell.com>
440 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
441 implement ArrayIndex.
443 2008-01-17 Jb Evain <jbevain@novell.com>
445 * Expression.cs: Use TypeCode for IsInt and IsNumber.
447 2008-01-16 Miguel de Icaza <miguel@novell.com>
449 * Expression.cs: Add support for user-defined operators.
451 Put back various binary operator tests.
453 2008-01-16 Jb Evain <jbevain@novell.com>
455 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
457 2008-01-15 Miguel de Icaza <miguel@novell.com>
459 * Expression.cs: Do validation on the method parameters and use
460 the return type if provided.
462 2008-01-15 Jb Evain <jbevain@novell.com>
464 * MethodCallExpression.cs, Expression.cs
465 ExpressionPrinter.cs: Implement Call (Expression, ...)
467 2008-01-15 Jb Evain <jbevain@novell.com>
469 * Expression.cs, ConditionalExpressionExpression.cs
470 ExpressionPrinter.cs : implement Expression.Condition.
472 2008-01-15 Jb Evain <jbevain@novell.com>
475 ParameterExpression.cs,
476 ExpressionPrinter.cs: implement Expression.Parameter
478 2008-01-15 Jb Evain <jbevain@novell.com>
480 * ExpressionPrinter.cs (VisitBinaryExpression): simple
481 implementation (probably misses a few cases).
483 2008-01-14 Miguel de Icaza <miguel@novell.com>
485 * Expression.cs: Bring back the (most) of binary operators. Added
486 type checking as well and reorganized the source file by topic
487 instead of alphabetical sorting.
489 2008-01-14 Jb Evain <jbevain@novell.com>
491 * ExpressionPrinter.cs: print ArrayLength.
493 2008-01-14 Jb Evain <jbevain@novell.com>
495 * Expression.cs: TypeAs can't take value types.
496 * ExpressionPrinter.cs: implement TypeAs.
498 2008-01-14 Jb Evain <jbevain@novell.com>
500 * Expression.cs: implement TypeIs.
501 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
502 * TypeBinaryExpression.cs: add proper ctor.
504 2008-01-14 Jb Evain <jbevain@novell.com>
506 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
508 2008-01-14 Jb Evain <jbevain@novell.com>
510 * BinaryExpression.cs,
511 * Expression.cs: revert part of Miguel's last patch.
512 MakeBinary is expected to call the appropriate factory
513 methods. Whose methods that are responsible for creating
514 the good BinaryExpression, wether they use a custom method
517 2008-01-14 Jb Evain <jbevain@novell.com>
519 * Expression.cs: MakeUnary is expected to call the appropriate
522 2008-01-14 Miguel de Icaza <miguel@novell.com>
524 * Expression.cs (Constant, MakeBinary and consumers of it): Some
525 more fill-up changes.
527 MakeBinary will need much more work to support user-provided
530 2008-01-13 Jb Evain <jbevain@novell.com>
532 * *.cs: fresh implementation.