[Tizen] Enable Linq expressions interpreter instead of compiler
authorGleb Balykov <g.balykov@samsung.com>
Wed, 24 Nov 2021 17:54:48 +0000 (20:54 +0300)
committer이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com>
Thu, 17 Mar 2022 21:19:23 +0000 (06:19 +0900)
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs

index 0c591d6..1f78297 100644 (file)
@@ -131,7 +131,12 @@ namespace System.Linq.Expressions
         public Delegate Compile()
         {
 #if FEATURE_COMPILE
+#if FEATURE_INTERPRET
+            // Use interpreter by default
+            return new Interpreter.LightCompiler().CompileTop(this).CreateDelegate();
+#else
             return Compiler.LambdaCompiler.Compile(this);
+#endif
 #else
             return new Interpreter.LightCompiler().CompileTop(this).CreateDelegate();
 #endif
@@ -211,7 +216,12 @@ namespace System.Linq.Expressions
         public new TDelegate Compile()
         {
 #if FEATURE_COMPILE
+#if FEATURE_INTERPRET
+            // Use interpreter by default
+            return (TDelegate)(object)new Interpreter.LightCompiler().CompileTop(this).CreateDelegate();
+#else
             return (TDelegate)(object)Compiler.LambdaCompiler.Compile(this);
+#endif
 #else
             return (TDelegate)(object)new Interpreter.LightCompiler().CompileTop(this).CreateDelegate();
 #endif