1 2008-04-28 Jb Evain <jbevain@novell.com>
3 * EmitContext.cs: deal with globals when encountering them while
4 compiling, and not ahead of time with a dedicated visitor.
6 2008-04-27 Jb Evain <jbevain@novell.com>
8 * ConstantExpression.cs (Emit): emit properly null nullable types.
10 2008-04-27 Jb Evain <jbevain@novell.com>
12 * Expression.cs: improve method finder.
14 2008-04-24 Jb Evain <jbevain@novell.com>
16 * UnaryExpression.cs, EmitContext.cs: implement compilation
17 of Quote as a global load.
19 2008-04-23 Jb Evain <jbevain@novell.com>
21 * UnaryExpression.cs: start implementing EmitConvert.
23 2008-04-23 Jb Evain <jbevain@novell.com>
25 * ConstantExpression.cs (Emit): properly Emit null constants.
27 2008-04-23 Jb Evain <jbevain@novell.com>
29 * Expression.cs (Constant): check for assignability, not for type
30 equality, when a type is passed.
32 2008-04-23 Jb Evain <jbevain@novell.com>
34 * ExpressionPrinter.cs: ToString convert properly.
36 2008-04-22 Jb Evain <jbevain@novell.com>
38 * UnaryExpression.cs: implement IsLiftedToNull properly.
39 * Expression.cs (Convert, ConvertChecked): implemented computing
40 of IsLifted and IsLiftedToNull for conversions.
42 2008-04-22 Jb Evain <jbevain@novell.com>
44 * Expression.cs (Convert, ConvertChecked): implement.
46 2008-04-21 Jb Evain <jbevain@novell.com>
48 * Expression.cs (Call): don't rely on the fact that if the
49 instance expression is null, then it's a static call. Explicitely
50 check on the MethodInfo for that.
51 * EmitContext.cs (EmitCall): same pattern.
53 2008-04-20 Jb Evain <jbevain@novell.com>
55 * MemberMemberBinding.cs (Emit): implement.
57 2008-04-19 Jb Evain <jbevain@novell.com>
59 * EmitContext.cs: infrastructure work to attach a compiled
60 lambda expression to an execution scope, and to detect and store
61 external globals in the scope.
62 * ConstantExpression.cs: load globals from the scope.
64 2008-04-19 Jb Evain <jbevain@novell.com>
66 * ExpressionVisitor.cs (Visit): don't die because of Power.
68 2008-04-09 Jb Evain <jbevain@novell.com>
70 * Expression.cs: check for illegal booleab unary expressions.
72 2008-04-09 Jb Evain <jbevain@novell.com>
74 * UnaryExpression.cs: implement compilation of negate.
76 2008-04-09 Jb Evain <jbevain@novell.com>
78 * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
79 to null for simple unary operators. Implement Not compilation.
81 2008-04-08 Jb Evain <jbevain@novell.com>
83 * ElementInit.cs: emit pop if the add method doesn't return void.
85 2008-03-20 Jb Evain <jbevain@novell.com>
87 * Expression.cs: use the new and more complete IsAssignableTo
88 instead of IsAssignableFrom.
90 2008-03-19 Jb Evain <jbevain@novell.com>
92 * LambdaExpression.cs: use the new standardified IsAssignableTo,
93 fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
95 2008-03-19 Jb Evain <jbevain@novell.com>
97 * Extensions.cs (Type.IsAssignableTo): deal with arrays.
99 2008-03-13 Jb Evain <jbevain@novell.com>
101 * NewArrayExpression.cs (EmitNewArrayBounds): implement.
103 2008-03-12 Jb Evain <jbevain@novell.com>
105 * NewArrayExpression.cs (Emit): naive implementation of emit support
106 for array initialization.
108 2008-03-11 Jb Evain <jbevain@novell.com>
110 * BinaryExpression.cs: very naive implementation of emitting
113 2008-03-11 Jb Evain <jbevain@novell.com>
115 * *.cs: Move the different Emit* helpers to EmitContext,
116 so that they get used more naturally by the non Expression
119 2008-03-10 Jb Evain <jbevain@novell.com>
121 * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
122 * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
124 2008-03-10 Jb Evain <jbevain@novell.com>
126 * TypeBinaryExpression.cs (Emit): implement.
128 2008-03-08 Jb Evain <jbevain@novell.com>
130 * MemberListBinding.cs (Emit): implement.
131 * MemberBinding.cs (EmitLoadMember): add helper.
133 2008-03-08 Jb Evain <jbevain@novell.com>
135 * MemberAssignment.cs (Emit): implement.
137 2008-03-08 Jb Evain <jbevain@novell.com>
139 * ElementInit.cs (Emit): implement.
141 2008-03-06 Jb Evain <jbevain@novell.com>
143 * EmitContext.cs: the DebugContext delegate the CreateDelegate
144 to a DynamicContext to avoid visibility issues in debug mode.
146 2008-03-06 Jb Evain <jbevain@novell.com>
148 * EmitContext.cs: Lambda methods bypass JIT visibility checks.
150 2008-03-06 Jb Evain <jbevain@novell.com>
152 * MethodCallExpression.cs, Expression.cs: refactor method calling
153 into a more sophisticated EmitCall in Expression.
154 * InvocationExpression.cs (Emit): implement using the previous EmitCall.
156 2008-03-06 Jb Evain <jbevain@novell.com>
158 * Expression.cs: add a EmitCall helper.
159 * MemberExpression.cs: implement property access.
161 2008-03-06 Jb Evain <jbevain@novell.com>
163 * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
164 * MemberExpression.cs: use EmitLoad to load the instance field if needed.
166 2008-03-06 Jb Evain <jbevain@novell.com>
168 * BinaryExpression.cs, Expression.cs: move EmitStored from
169 BinaryExpression to Expression.
170 * MethodCallExpression.cs: allow method calls on structs.
172 2008-03-05 Jb Evain <jbevain@novell.com>
174 * Expression.cs: Fix the Call method which takes an array
177 2008-03-05 Jb Evain <jbevain@novell.com>
179 * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
181 2008-02-26 Jb Evain <jbevain@novell.com>
183 * Expression.cs (Call): Guess the parameters type from the argument
186 2008-02-25 Jb Evain <jbevain@novell.com>
188 * NewExpression.cs (Emit): deal with value types construction.
190 2008-02-25 Jb Evain <jbevain@novell.com>
192 * Expression.cs, NewExpression.cs: deal with the fact that value types
193 don't have a parameterless constructor.
195 2008-02-24 Jb Evain <jbevain@novell.com>
197 * LambdaExpression.cs, EmitContext.cs: make compilation
198 of delegate returning void work.
200 2008-02-24 Jb Evain <jbevain@novell.com>
202 * MethodCallExpression.cs: emit call or callvirt depending
203 on the virtuality of the method.
205 2008-02-24 Jb Evain <jbevain@novell.com>
207 * LambdaExpression.cs: properly format error message.
209 2008-02-21 Jb Evain <jbevain@novell.com>
211 * BinaryExpression.cs (EmitCoalesce): fix setup_null.
213 2008-02-21 Jb Evain <jbevain@novell.com>
215 * BinaryExpression.cs (Emit): fix the both_are_null case.
217 2008-02-20 Jb Evain <jbevain@novell.com>
219 * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
221 2008-02-20 Jb Evain <jbevain@novell.com>
223 * Expression.cs, ExpressionPrinter.cs: implement ListInit.
225 2008-02-19 Jb Evain <jbevain@novell.com>
227 * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
229 2008-02-19 Jb Evain <jbevain@novell.com>
231 * Expression.cs, ExpressionPrinter.cs: implement last New
232 overload for anonymous types.
234 2008-02-08 Jb Evain <jbevain@novell.com>
236 * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
237 add support for Invoke.
239 2008-02-04 Jb Evain <jbevain@novell.com>
241 * ExpressionPrinter.cs: fix printing of MemberListBinding.
243 2008-02-04 Jb Evain <jbevain@novell.com>
245 * Expression.cs, NewExpression.cs: make New(Type) test pass.
247 2008-02-04 Jb Evain <jbevain@novell.com>
249 * ExpressionPrinter.cs: fix and clean printing of ElementInit.
251 2008-02-02 Jb Evain <jbevain@novell.com>
253 * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
255 2008-02-02 Jb Evain <jbevain@novell.com>
257 * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
259 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
261 * Expression.cs, ExpressionPrinter.cs:Add ListBind
263 2008-02-01 Olivier Dufour <olivier.duff@gmail.com>
265 * Expression.cs, ExpressionPrinter.cs:Add Elementinit
267 2008-01-31 Jb Evain <jbevain@novell.com>
269 * UnaryExpression.cs: emit array length.
271 2008-01-31 Jb Evain <jbevain@novell.com>
273 * MemberExpression.cs: Simple support for emitting fields.
275 2008-01-30 Jb Evain <jbevain@novell.com>
277 * MethodCallExpression.cs: very naive implementation of Emit.
279 2008-01-30 Jb Evain <jbevain@novell.com>
281 * NewExpression.cs: add Emit support for reference types.
283 2008-01-30 Jb Evain <jbevain@novell.com>
285 * LambdaExpression.cs, EmitContext.cs: small refactoring.
286 Extract the different EmitContexts to their own file.
288 2008-01-29 Jb Evain <jbevain@novell.com>
290 * MethodCallExpression.cs, Expression.cs: complete Calls.
292 2008-01-29 Jb Evain <jbevain@novell.com>
294 * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
295 implement the first flavors of New.
297 2008-01-27 Jb Evain <jbevain@novell.com>
299 * ConditionalExpression.cs: implement Emit.
301 2008-01-27 Jb Evain <jbevain@novell.com>
303 * Expression.cs: implement the last Lambda method.
305 2008-01-27 Jb Evain <jbevain@novell.com>
307 * LambdaExpression.cs: fix the Type of the LambdaExpressions.
309 2008-01-27 Olivier Dufour <olivier.duff@gmail.com>
311 * Expression.cs, InvocationExpession.cs,
312 ListInitExpression.cs, MemberInitExpression.cs
313 NewExpression.cs : Add all missing
314 constructor in Expressions and remove the base one
316 2008-01-25 Jb Evain <jbevain@novell.com>
318 * Expression.cs, ExpressionPrinter.cs: implement Bind.
320 2008-01-25 Jb Evain <jbevain@novell.com>
322 * MemberMemberBinding.cs, MemberListBinding.cs,
323 MemberAssignment.cs, MemberBinding.cs:
326 2008-01-25 Jb Evain <jbevain@novell.com>
328 * Expression.cs: implement PropertyOrField.
330 2008-01-24 Jb Evain <jbevain@novell.com>
332 * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
333 implement Field and Property.
335 2008-01-22 Miguel de Icaza <miguel@novell.com>
337 * BinaryExpression.cs: Unleash the power of cut and paste.
339 Bring a bunch of operatros from mcs/expression.cs
341 * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
342 used those from mcs, that was wrong. use the proper ones, clean
345 * BinaryExpression.cs: Add method invocations for binary methods.
347 2008-01-22 Jb Evain <jbevain@novell.com>
349 * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
351 2008-01-22 Jb Evain <jbevain@novell.com>
353 * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
354 implement Expression.NewArrayBounds.
356 2008-01-22 Jb Evain <jbevain@novell.com>
358 * ExpressionPrinter.cs: fix Lambda and Equal.
360 2008-01-22 Miguel de Icaza <miguel@novell.com>
362 * BinaryExpression.cs (EmitCoalesce): Add support for emitting
365 TODO: this does not use the "Conversion" Lambda, which am not sure
366 who generates this or what it is used for.
368 (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
370 * Expression.cs: Add support for Coalesce.
371 (BinaryCoreCheck): Move more checking here, instead of the helper
372 routines, will remove them next.
374 * LambdaExpression.cs (Compile): Create the delegate last, so we
375 manage to save the assembly while debugging in case of error
377 2008-01-21 Miguel de Icaza <miguel@novell.com>
379 * Expression.cs (BinaryCoreCheck): Add checking for a few
380 operators here (to avoid doing a second pass, handles AndAlso and
383 (AndAlso, OrElse): Add some code.
385 * BinaryExpression.cs: Instead of using GetValueOrDefault use
386 get_Value, as we already probed for the lack of value.
388 Split out support for And/Or to a separate routine as the code is
389 not very easy to share with the arithmetics code.
391 2008-01-21 Marek Safar <marek.safar@gmail.com>
393 * BinaryExpression.cs: Fixed initobj initialization.
395 2008-01-21 Jb Evain <jbevain@novell.com>
397 * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
398 Move the IsUnsigned helper from BinaryExpression to Expression,
399 so it can be used in UnaryExpression.
401 2008-01-21 Miguel de Icaza <miguel@novell.com>
403 * Start code generation for nullables, currently this generates
404 incorrect code for things like:
406 Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
407 e2.Compile ().Invoke (null, 3))
409 This should return null, but returns something else.
411 * Introduce LINQ_DBG env variable, which generates a linq file in
412 /tmp; It currently does not work as well as it should, as the
413 Func<> parameters do not mwatch the generated method.
417 2008-01-20 Miguel de Icaza <miguel@novell.com>
419 Introduce support for Nullable arguments, no code is generated for
420 these yet, its only tests + node creation behavior at this point.
422 * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
423 as operators, they must both be nullable.
425 NullableTypes in the arguments are transformed into the underlying
426 values when doing the method validation.
428 2008-01-18 Miguel de Icaza <miguel@novell.com>
430 * ParameterExpression.cs: Add emit support.
432 2008-01-18 Jb Evain <jbevain@novell.com>
434 * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
436 2008-01-18 Miguel de Icaza <miguel@novell.com>
438 * BinaryExpression.cs: Add support for emitting code for some
439 operators (ported from the Mono C# compiler).
443 2008-01-17 Miguel de Icaza <miguel@novell.com>
445 Beginning of code generation framework for Linq.Expressions.
446 Some code was borrowed by from the C# compiler
448 * Expression_T.cs: Fill in the blanks.
450 * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
453 * ConstantExpression.cs: Mostly done, need to write tests for
454 non-fundamental types and other ValueType initializations.
456 2008-01-17 Jb Evain <jbevain@novell.com>
458 * Expression.cs: implement MakeMemberAccess.
460 2008-01-17 Jb Evain <jbevain@novell.com>
462 * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
463 implement ArrayIndex.
465 2008-01-17 Jb Evain <jbevain@novell.com>
467 * Expression.cs: Use TypeCode for IsInt and IsNumber.
469 2008-01-16 Miguel de Icaza <miguel@novell.com>
471 * Expression.cs: Add support for user-defined operators.
473 Put back various binary operator tests.
475 2008-01-16 Jb Evain <jbevain@novell.com>
477 * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
479 2008-01-15 Miguel de Icaza <miguel@novell.com>
481 * Expression.cs: Do validation on the method parameters and use
482 the return type if provided.
484 2008-01-15 Jb Evain <jbevain@novell.com>
486 * MethodCallExpression.cs, Expression.cs
487 ExpressionPrinter.cs: Implement Call (Expression, ...)
489 2008-01-15 Jb Evain <jbevain@novell.com>
491 * Expression.cs, ConditionalExpressionExpression.cs
492 ExpressionPrinter.cs : implement Expression.Condition.
494 2008-01-15 Jb Evain <jbevain@novell.com>
497 ParameterExpression.cs,
498 ExpressionPrinter.cs: implement Expression.Parameter
500 2008-01-15 Jb Evain <jbevain@novell.com>
502 * ExpressionPrinter.cs (VisitBinaryExpression): simple
503 implementation (probably misses a few cases).
505 2008-01-14 Miguel de Icaza <miguel@novell.com>
507 * Expression.cs: Bring back the (most) of binary operators. Added
508 type checking as well and reorganized the source file by topic
509 instead of alphabetical sorting.
511 2008-01-14 Jb Evain <jbevain@novell.com>
513 * ExpressionPrinter.cs: print ArrayLength.
515 2008-01-14 Jb Evain <jbevain@novell.com>
517 * Expression.cs: TypeAs can't take value types.
518 * ExpressionPrinter.cs: implement TypeAs.
520 2008-01-14 Jb Evain <jbevain@novell.com>
522 * Expression.cs: implement TypeIs.
523 * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
524 * TypeBinaryExpression.cs: add proper ctor.
526 2008-01-14 Jb Evain <jbevain@novell.com>
528 * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
530 2008-01-14 Jb Evain <jbevain@novell.com>
532 * BinaryExpression.cs,
533 * Expression.cs: revert part of Miguel's last patch.
534 MakeBinary is expected to call the appropriate factory
535 methods. Whose methods that are responsible for creating
536 the good BinaryExpression, wether they use a custom method
539 2008-01-14 Jb Evain <jbevain@novell.com>
541 * Expression.cs: MakeUnary is expected to call the appropriate
544 2008-01-14 Miguel de Icaza <miguel@novell.com>
546 * Expression.cs (Constant, MakeBinary and consumers of it): Some
547 more fill-up changes.
549 MakeBinary will need much more work to support user-provided
552 2008-01-13 Jb Evain <jbevain@novell.com>
554 * *.cs: fresh implementation.