[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)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs

index 0c591d6f3ae058f601d0650ca62f7dd9d627bd50..1f78297104e3fcf47aa45a550746f45b47a00554 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