Commit Graph
365 Commits
Author SHA1 Message Date
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 df9b3d07ad not needed
svn path=/trunk/mcs/; revision=94371
2008-01-30 13:01:00 +00:00
Jb Evain 15d5f962e6 adjust visibility
svn path=/trunk/mcs/; revision=94370
2008-01-30 12:55:03 +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 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 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 08ac78e797 remove useless field
svn path=/trunk/mcs/; revision=94068
2008-01-27 18:16:19 +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
Jb Evain 6f74177c47 simplify
svn path=/trunk/mcs/; revision=94062
2008-01-27 17:57:00 +00:00
Jb Evain 1a5e816e27 make fields private
svn path=/trunk/mcs/; revision=94060
2008-01-27 17:50:56 +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
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 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
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
Jb Evain addb0c10a3 small refactoring
svn path=/trunk/mcs/; revision=93503
2008-01-22 10:59:22 +00:00
Jb Evain 532de54e2f small refactoring
svn path=/trunk/mcs/; revision=93502
2008-01-22 10:42:47 +00:00
Jb Evain a9cc7c971e small refactoring
svn path=/trunk/mcs/; revision=93501
2008-01-22 10:39:12 +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
Miguel de Icaza 7df54982fc Improve the helper tool, generate code twice
svn path=/trunk/mcs/; revision=93438
2008-01-21 19:53:04 +00:00
Marek Safar b4b685024a 2008-01-21 Marek Safar <[email protected]>
* BinaryExpression.cs: Fixed initobj initialization.
	

svn path=/trunk/mcs/; revision=93437
2008-01-21 19:31:05 +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 6b6d7966f4 Improve this, still wrong
svn path=/trunk/mcs/; revision=93370
2008-01-21 06:14:06 +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
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
Jb Evain c60bc5dd0b spaces to tabs
svn path=/trunk/mcs/; revision=93244
2008-01-18 12:11:34 +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