Commit Graph
85 Commits
Author SHA1 Message Date
Jb Evain c170b3c707 clean
svn path=/trunk/mcs/; revision=94625
2008-02-02 13:49:37 +00:00
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 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 8037ba68af revert fix
svn path=/trunk/mcs/; revision=94386
2008-01-30 15:11:50 +00:00
Jb Evain 721a3a19fa fix ArrayIndex
svn path=/trunk/mcs/; revision=94385
2008-01-30 15:10:12 +00:00
Jb Evain 8eba7244f1 refactoring
svn path=/trunk/mcs/; revision=94384
2008-01-30 15:05:30 +00:00
Jb Evain 8c36940bb4 fix AndAlso like OrElse
svn path=/trunk/mcs/; revision=94262
2008-01-29 16:28:14 +00:00
Jb Evain eb8c34373f refactoring
svn path=/trunk/mcs/; revision=94261
2008-01-29 16:22:47 +00:00
Jb Evain 6054c0ab5c check call arguments
svn path=/trunk/mcs/; revision=94259
2008-01-29 16:13:44 +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 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 6f74177c47 simplify
svn path=/trunk/mcs/; revision=94062
2008-01-27 17:57:00 +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 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
Marek Safar 4c60aa18cf Fixed copy&paste
svn path=/trunk/mcs/; revision=93875
2008-01-25 10:00:05 +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 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
Miguel de Icaza 0a6c4c0470 Shut up all those warnings
svn path=/trunk/mcs/; revision=93597
2008-01-22 22:50:33 +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
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
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 baf8a933e3 Fix the issue that JB found
svn path=/trunk/mcs/; revision=93271
2008-01-18 16:05:22 +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
Jb Evain e526224822 use common params [] to IEnumerable pattern
svn path=/trunk/mcs/; revision=93247
2008-01-18 12:21:14 +00:00
Marek Safar d63e0b084c No explicit return false.
svn path=/trunk/mcs/; revision=93235
2008-01-18 09:33:41 +00:00
Miguel de Icaza aeff6b77be Remove TypeCode in a few places, there is one place where its actually useful (ConstantExpression.Emit) and I dont feel like rewriting that one
svn path=/trunk/mcs/; revision=93232
2008-01-18 08:30:30 +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 5408f0c6c1 fix a couple of StackOverflow
svn path=/trunk/mcs/; revision=92933
2008-01-15 10:26:46 +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 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