From 57e9eb3c65ac6fa7cf3cb5bb88b4177ff061ad50 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Wed, 24 Nov 2021 20:54:48 +0300 Subject: [PATCH] [Tizen] Enable Linq expressions interpreter instead of compiler --- .../src/System/Linq/Expressions/LambdaExpression.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs index 0c591d6..1f78297 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs @@ -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 -- 2.7.4