Commit Graph
78 Commits
Author SHA1 Message Date
Jb Evain 6f6fcf74f5 2008-02-02 Jb Evain <[email protected]>
* Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).


svn path=/trunk/mcs/; revision=94622
2008-02-02 13:43:10 +00:00
Jb Evain 77f7bfeac2 typo
svn path=/trunk/mcs/; revision=94619
2008-02-02 13:29:30 +00:00
Jb Evain 4cac0aaecd 2008-02-02 Jb Evain <[email protected]>
* Expression.cs: fix ListInit(MethodInfo,IEnumerable<ElementInit>).


svn path=/trunk/mcs/; revision=94618
2008-02-02 13:28:55 +00:00
Olivier Dufour 2e6db9f437 2008-02-01 Olivier Dufour <[email protected]>
* Expression.cs, ExpressionPrinter.cs:Add ListBind

svn path=/trunk/mcs/; revision=94572
2008-02-01 21:17:39 +00:00
Olivier Dufour b88f4990be 2008-02-01 Olivier Dufour <[email protected]>
* Expression.cs, ExpressionPrinter.cs:Add Elementinit

svn path=/trunk/mcs/; revision=94530
2008-02-01 17:32:21 +00:00
Jb Evain 14c53a1dcf 2008-01-31 Jb Evain <[email protected]>
* UnaryExpression.cs: emit array length.


svn path=/trunk/mcs/; revision=94480
2008-01-31 17:13:45 +00:00
Jb Evain fc503e8a1e 2008-01-31 Jb Evain <[email protected]>
* MemberExpression.cs: Simple support for emitting fields.


svn path=/trunk/mcs/; revision=94475
2008-01-31 16:53:42 +00:00
Jb Evain 1df8b38311 2008-01-30 Jb Evain <[email protected]>
* MethodCallExpression.cs: very naive implementation of Emit.


svn path=/trunk/mcs/; revision=94413
2008-01-30 20:04:24 +00:00
Jb Evain e18a7cc29d 2008-01-30 Jb Evain <[email protected]>
* NewExpression.cs: add Emit support for reference types.


svn path=/trunk/mcs/; revision=94407
2008-01-30 19:25:04 +00:00
Jb Evain 2f7f1e3b50 2008-01-30 Jb Evain <[email protected]>
* LambdaExpression.cs, EmitContext.cs: small refactoring.
	Extract the different EmitContexts to their own file.

svn path=/trunk/mcs/; revision=94369
2008-01-30 12:51:26 +00:00
Jb Evain 90bbae33cf 2008-01-29 Jb Evain <[email protected]>
* MethodCallExpression.cs, Expression.cs: complete Calls.


svn path=/trunk/mcs/; revision=94240
2008-01-29 12:51:11 +00:00
Jb Evain 5984d661aa 2008-01-29 Jb Evain <[email protected]>
* Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
	implement the first flavors of New.


svn path=/trunk/mcs/; revision=94190
2008-01-28 23:02:26 +00:00
Jb Evain 3eaa62782b 2008-01-27 Jb Evain <[email protected]>
* ConditionalExpression.cs: implement Emit.


svn path=/trunk/mcs/; revision=94092
2008-01-27 22:02:31 +00:00
Jb Evain 1d735366a8 2008-01-27 Jb Evain <[email protected]>
* Expression.cs: implement the last Lambda method.


svn path=/trunk/mcs/; revision=94075
2008-01-27 19:15:48 +00:00
Jb Evain 73d31c3d57 2008-01-27 Jb Evain <[email protected]>
* LambdaExpression.cs: fix the Type of the LambdaExpressions.


svn path=/trunk/mcs/; revision=94067
2008-01-27 18:15:42 +00:00
Olivier Dufour 02a1a5b2e1 2008-01-27 Olivier Dufour <[email protected]>
* Expression.cs, InvocationExpession.cs,
	ListInitExpression.cs, MemberInitExpression.cs
	NewExpression.cs : Add all missing 
	constructor in Expressions and remove the base one

svn path=/trunk/mcs/; revision=94036
2008-01-27 08:26:00 +00:00
Jb Evain de7a908d94 2008-01-25 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs: implement Bind.


svn path=/trunk/mcs/; revision=93907
2008-01-25 15:22:44 +00:00
Jb Evain 2c1c8f2479 2008-01-25 Jb Evain <[email protected]>
* MemberMemberBinding.cs, MemberListBinding.cs,
	MemberAssignment.cs, MemberBinding.cs:
	add constructors.


svn path=/trunk/mcs/; revision=93906
2008-01-25 15:22:23 +00:00
Jb Evain e037b0f0ae 2008-01-25 Jb Evain <[email protected]>
* Expression.cs: implement PropertyOrField.


svn path=/trunk/mcs/; revision=93901
2008-01-25 14:38:55 +00:00
Jb Evain 4e7e3de8b3 2008-01-24 Jb Evain <[email protected]>
* Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
	implement Field and Property.


svn path=/trunk/mcs/; revision=93821
2008-01-24 17:55:41 +00:00
Miguel de Icaza c11152b046 2008-01-22 Miguel de Icaza <[email protected]>
* BinaryExpression.cs: Unleash the power of cut and paste.

	Bring a bunch of operatros from mcs/expression.cs

	* Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
	used those from mcs, that was wrong.   use the proper ones, clean
	up the result.

	* BinaryExpression.cs: Add method invocations for binary methods. 


svn path=/trunk/mcs/; revision=93613
2008-01-23 01:18:25 +00:00
Miguel de Icaza aeaffaada3 2008-01-22 Miguel de Icaza <[email protected]>
* Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
	used those from mcs, that was wrong.   use the proper ones, clean
	up the result.

	* BinaryExpression.cs: Add method invocations for binary methods. 



svn path=/trunk/mcs/; revision=93605
2008-01-22 23:51:22 +00:00
Jb Evain 967cf2e629 2008-01-22 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs: implement NewArrayList.


svn path=/trunk/mcs/; revision=93528
2008-01-22 14:20:05 +00:00
Jb Evain 1953afe3d2 2008-01-22 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
	implement Expression.NewArrayBounds.


svn path=/trunk/mcs/; revision=93526
2008-01-22 14:01:07 +00:00
Jb Evain 420442a610 2008-01-22 Jb Evain <[email protected]>
* ExpressionPrinter.cs: fix Lambda and Equal.


svn path=/trunk/mcs/; revision=93491
2008-01-22 09:47:00 +00:00
Miguel de Icaza b9b9a664e0 2008-01-22 Miguel de Icaza <[email protected]>
* BinaryExpression.cs (EmitCoalesce): Add support for emitting
	code for Coalesce.

	TODO: this does not use the "Conversion" Lambda, which am not sure
	who generates this or what it is used for.

	(EmitLogical): Fix a couple of bugs in AndAlso, OrElse.	

	* Expression.cs: Add support for Coalesce.
	(BinaryCoreCheck): Move more checking here, instead of the helper
	routines, will remove them next.
	
	* LambdaExpression.cs (Compile): Create the delegate last, so we
	manage to save the assembly while debugging in case of error


svn path=/trunk/mcs/; revision=93480
2008-01-22 07:01:58 +00:00
Miguel de Icaza 70bf0fecac 2008-01-21 Miguel de Icaza <[email protected]>
* Expression.cs (BinaryCoreCheck): Add checking for a few
	operators here (to avoid doing a second pass, handles AndAlso and
	OrElse). 

	(AndAlso, OrElse): Add some code.

	* BinaryExpression.cs: Instead of using GetValueOrDefault use
	get_Value, as we already probed for the lack of value.

	Split out support for And/Or to a separate routine as the code is
	not very easy to share with the arithmetics code. 


svn path=/trunk/mcs/; revision=93471
2008-01-22 01:25:04 +00:00
Marek Safar 2ece240c14 2008-01-21 Marek Safar <[email protected]>
* BinaryExpression.cs: Fixed initobj initialization.
	

svn path=/trunk/mcs/; revision=93434
2008-01-21 19:18:00 +00:00
Jb Evain 619e5002f0 2008-01-21 Jb Evain <[email protected]>
* Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
	Move the IsUnsigned helper from BinaryExpression to Expression,
	so it can be used in UnaryExpression.


svn path=/trunk/mcs/; revision=93387
2008-01-21 14:12:21 +00:00
Miguel de Icaza b032fe6df6 2008-01-21 Miguel de Icaza <[email protected]>
* Start code generation for nullables, currently this generates
	incorrect code for things like:
	
	Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
	e2.Compile ().Invoke (null, 3))

	This should return null, but returns something else.

	* Introduce LINQ_DBG env variable, which generates a linq file in
	/tmp;   It currently does not work as well as it should, as the
	Func<> parameters do not mwatch the generated method.
	Investigate. 


svn path=/trunk/mcs/; revision=93369
2008-01-21 06:05:28 +00:00
Miguel de Icaza 1affd8bf07 2008-01-20 Miguel de Icaza <[email protected]>
Introduce support for Nullable arguments, no code is generated for
	these yet, its only tests + node creation behavior at this point.
	
	* Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
	as operators, they must both be nullable.

	NullableTypes in the arguments are transformed into the underlying
	values when doing the method validation.  


svn path=/trunk/mcs/; revision=93368
2008-01-21 00:45:16 +00:00
Miguel de Icaza 8b7e464dc9 Add basic support for parameters
svn path=/trunk/mcs/; revision=93297
2008-01-18 22:06:53 +00:00
Jb Evain 8f4b736f29 2008-01-18 Jb Evain <[email protected]>
* Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.


svn path=/trunk/mcs/; revision=93256
2008-01-18 14:17:27 +00:00
Miguel de Icaza 9586c1c5c5 2008-01-18 Miguel de Icaza <[email protected]>
* BinaryExpression.cs: Add support for emitting code for some
	operators (ported from the Mono C# compiler).   

	Add tests.


svn path=/trunk/mcs/; revision=93231
2008-01-18 08:03:10 +00:00
Miguel de Icaza 488a45b5a1 2008-01-17 Miguel de Icaza <[email protected]>
Beginning of code generation framework for Linq.Expressions.
	Some code was borrowed by from the C# compiler
	
	* Expression_T.cs: Fill in the blanks.
	
	* LambdaExpression.cs: Validation of parameters mostly, a tiny bit
	of codegen.

	* ConstantExpression.cs: Mostly done, need to write tests for
	non-fundamental types and other ValueType initializations. 



svn path=/trunk/mcs/; revision=93222
2008-01-18 00:24:01 +00:00
Jb Evain c752ee006a 2008-01-17 Jb Evain <[email protected]>
* Expression.cs: implement MakeMemberAccess.


svn path=/trunk/mcs/; revision=93157
2008-01-17 15:13:59 +00:00
Jb Evain c45a2971f7 2008-01-17 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
	implement ArrayIndex.


svn path=/trunk/mcs/; revision=93148
2008-01-17 13:04:32 +00:00
Jb Evain a956f2aafc 2008-01-17 Jb Evain <[email protected]>
* Expression.cs: Use TypeCode for IsInt and IsNumber.


svn path=/trunk/mcs/; revision=93147
2008-01-17 12:33:01 +00:00
Miguel de Icaza c4f9184d02 2008-01-16 Miguel de Icaza <[email protected]>
* Expression.cs: Add support for user-defined operators. 

	Put back various binary operator tests.


svn path=/trunk/mcs/; revision=93130
2008-01-17 04:03:31 +00:00
Jb Evain e17b58f99b 2008-01-16 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs: fix call for static methods.

svn path=/trunk/mcs/; revision=93041
2008-01-16 14:14:08 +00:00
Miguel de Icaza c12187096f 2008-01-15 Miguel de Icaza <[email protected]>
* Expression.cs: Do validation on the method parameters and use
	the return type if provided. 


svn path=/trunk/mcs/; revision=93010
2008-01-16 01:31:44 +00:00
Jb Evain 704defd9a4 2008-01-15 Jb Evain <[email protected]>
* MethodCallExpression.cs, Expression.cs
	ExpressionPrinter.cs: Implement Call (Expression, ...)


svn path=/trunk/mcs/; revision=92989
2008-01-15 21:57:07 +00:00
Jb Evain f8dd5c0ad4 2008-01-15 Jb Evain <[email protected]>
* Expression.cs, ConditionalExpressionExpression.cs
	ExpressionPrinter.cs : implement Expression.Condition.


svn path=/trunk/mcs/; revision=92950
2008-01-15 14:20:35 +00:00
Jb Evain 39de6e2a83 2008-01-15 Jb Evain <[email protected]>
* Expression.cs,
	ParameterExpression.cs,
	ExpressionPrinter.cs: implement Expression.Parameter


svn path=/trunk/mcs/; revision=92947
2008-01-15 13:55:05 +00:00
Jb Evain 83e0f89a58 2008-01-15 Jb Evain <[email protected]>
* ExpressionPrinter.cs (VisitBinaryExpression): simple
	implementation (probably misses a few cases).


svn path=/trunk/mcs/; revision=92937
2008-01-15 10:59:57 +00:00
Miguel de Icaza 68b16f4347 2008-01-14 Miguel de Icaza <[email protected]>
* Expression.cs: Bring back the (most) of binary operators.  Added
	type checking as well and reorganized the source file by topic
	instead of alphabetical sorting.


svn path=/trunk/mcs/; revision=92917
2008-01-15 00:19:41 +00:00
Jb Evain 814567b7ed 2008-01-14 Jb Evain <[email protected]>
* ExpressionPrinter.cs: print ArrayLength.


svn path=/trunk/mcs/; revision=92851
2008-01-14 12:13:41 +00:00
Jb Evain 903b17afe7 2008-01-14 Jb Evain <[email protected]>
* Expression.cs: TypeAs can't take value types.
	* ExpressionPrinter.cs: implement TypeAs.


svn path=/trunk/mcs/; revision=92849
2008-01-14 12:04:00 +00:00
Jb Evain 6e7f492eb8 2008-01-14 Jb Evain <[email protected]>
* Expression.cs: implement TypeIs.
	* ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
	* TypeBinaryExpression.cs: add proper ctor.


svn path=/trunk/mcs/; revision=92846
2008-01-14 11:55:47 +00:00
Jb Evain 53b914c34f 2008-01-14 Jb Evain <[email protected]>
* Expression.cs, ExpressionPrinter.cs: fix for Quote's type.

svn path=/trunk/mcs/; revision=92843
2008-01-14 11:43:40 +00:00