Commit Graph
39 Commits
Author SHA1 Message Date
Miguel de Icaza b6d1b4492f Class libraries: introduce mobile_static profile, for MonoTouch-like static builds, but not limited to iOS (WinStore, Kumpera did the work). 2013-07-30 16:51:38 -04:00
Rodrigo Kumpera e88bef33b7 Add Full AOT support for System.Linq.Expression.
* System.Core/System.Linq.Expressions/*.cs: To bring LINQ expressions
	to Full AOT we disable all code that depends on SRE or dynamic code generation.
2012-11-06 18:18:13 -05:00
Jb Evain 9816af42ff Add support for hoisted variables in the ET interpreter
This fixes #645765.
2010-10-13 16:36:31 +02:00
Jb Evain 5bc44ecc4b use the expression interpreter on MonoTouch
svn path=/trunk/mcs/; revision=143772
2009-10-08 13:53:26 +00:00
Jb Evain 73e627220b 2008-06-20 Jb Evain <[email protected]>
* LambdaExpression.cs, EmitContext.cs: refactor the emit context to
	handle the fact that lambdas are compiled in a general context where
	they share globals but are also able to use parameters from parent lambdas.
	(Although parameter sharing is not implemented yet).

	* BinaryExpression.cs (fix converted coalesce case to use the lambda
	compilation code).


svn path=/trunk/mcs/; revision=106310
2008-06-20 16:02:04 +00:00
Jb Evain 65439303c6 refactoring
svn path=/trunk/mcs/; revision=105578
2008-06-11 13:07:11 +00:00
Jb Evain 3865601b87 2008-05-14 Jb Evain <[email protected]>
* LambdaExpression.cs, EmitContext.cs: When encountering a lambda
	inside an ET, compile it as a read of a global. Based on a patch
	by Roei Erez <[email protected]>


svn path=/trunk/mcs/; revision=103177
2008-05-14 12:49:34 +00:00
Jb Evain 58c7843036 hm
svn path=/trunk/mcs/; revision=102806
2008-05-08 14:10:52 +00:00
Jb Evain 57257c33a2 2008-05-03 Jb Evain <[email protected]>
* LambdaExpression.cs: move checks to Expression
	* Expression.cs: apply check for both typed and untyped lambda
	creation, so that the constructor does not throws exception.
	Needed to create instances of Expression<> for untyped lambda
	factory method. Fixes #386322.


svn path=/trunk/mcs/; revision=102398
2008-05-02 22:50:14 +00:00
Jb Evain b93e9b9fe7 cleol
svn path=/trunk/mcs/; revision=100214
2008-04-09 11:43:54 +00:00
Jb Evain 2ce040ac87 tabs
svn path=/trunk/mcs/; revision=99175
2008-03-28 10:22:37 +00:00
Leonid Freydovich 2f2417c33d Add some TARGET_JVM specific code.
svn path=/trunk/mcs/; revision=99132
2008-03-27 15:44:08 +00:00
Jb Evain b005aab7bc 2008-03-19 Jb Evain <[email protected]>
* LambdaExpression.cs: use the new standardified IsAssignableTo,
	fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.


svn path=/trunk/mcs/; revision=98632
2008-03-19 21:14:32 +00:00
Jb Evain 6f28b0a720 2008-03-11 Jb Evain <[email protected]>
* *.cs: Move the different Emit* helpers to EmitContext,
	so that they get used more naturally by the non Expression
	types.

svn path=/trunk/mcs/; revision=97992
2008-03-11 19:29:28 +00:00
Jb Evain 0c14456101 2008-02-24 Jb Evain <[email protected]>
* LambdaExpression.cs, EmitContext.cs: make compilation
	of delegate returning void work.


svn path=/trunk/mcs/; revision=96505
2008-02-24 13:07:38 +00:00
Jb Evain f64d9e2d88 2008-02-24 Jb Evain <[email protected]>
* LambdaExpression.cs: properly format error message.


svn path=/trunk/mcs/; revision=96503
2008-02-24 12:45:42 +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 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 1a5e816e27 make fields private
svn path=/trunk/mcs/; revision=94060
2008-01-27 17:50:56 +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
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
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 e526224822 use common params [] to IEnumerable pattern
svn path=/trunk/mcs/; revision=93247
2008-01-18 12:21:14 +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 71088609e9 fresh impl
svn path=/trunk/mcs/; revision=92823
2008-01-13 22:16:25 +00:00
Jb Evain f6359e4092 make some room
svn path=/trunk/mcs/; revision=92822
2008-01-13 22:11:43 +00:00
Jb Evain c53053a916 tabs instead of spaces
svn path=/trunk/mcs/; revision=92514
2008-01-09 15:52:22 +00:00
Miguel de Icaza 7a419ba406 command line options, and dos2unix
svn path=/trunk/mcs/; revision=74904
2007-03-23 19:11:16 +00:00
Antonello Provenzano 0a4912d7a2 Implementation of the basic features of LINQ Expressions.
svn path=/trunk/mcs/; revision=74894
2007-03-23 18:03:41 +00:00
Atsushi Eno 5c0fca4cca 2007-02-03 Atsushi Enomoto <[email protected]>
* System.Core.dll.sources : added LambdaExpression.cs.

	* LambdaExpression.cs : new (stub) file.

	* IQueryable_T.cs : fixed type/member signatures (generic arguments).


svn path=/trunk/mcs/; revision=72244
2007-02-03 21:01:01 +00:00