Skip to content

Commit 2ab3783

Browse files
MichalStrehovskyjkotas
authored andcommitted
Disable FEATURE_DLG_INVOKE and FEATURE_FAST_CREATE on UapAot (dotnet/corefx#29734)
* Disable FEATURE_DLG_INVOKE and FEATURE_FAST_CREATE on UapAot dotnet/corefx#28792 broke UapAot platform by introducing reflection on private implementation details of the framework. It's not possible to reflect on non-public classes/members of the framework on AoT platfrorms. While this would be fixable by making `FuncCallInstruction` and friends public (same way `ExpressionCreator` is already public), we need measurements first that demonstrate this is an actual runtime performance improvement on UapAot (e.g. reflection invoke on AoT platforms is 4x faster than on the CLR, but on the other hand `MakeGenericType` random types might make us fall back to universal shared code for the new instantiations, which is pretty bad). I have reasons to believe enabling FEATURE_DLG_INVOKE and FEATURE_FAST_CREATE also causes a pretty significant size on disk regression. Fixes dotnet/corefx#29652. * Add link to issue Commit migrated from dotnet/corefx@9ab3f57
1 parent b9b810a commit 2ab3783

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/libraries/System.Composition/tests/CustomerReportedMetadataBug.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public class LooseImporter
3838
}
3939

4040
[Fact]
41-
[ActiveIssue(29652, TargetFrameworkMonikers.UapAot)]
4241
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
4342
public void SampleServicesCorrectlyImported()
4443
{

src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
<AssemblyName>System.Linq.Expressions</AssemblyName>
1111
<RootNamespace>System.Linq.Expressions</RootNamespace>
1212
<IsInterpreting Condition="'$(TargetGroup)' == 'uapaot'">true</IsInterpreting>
13-
<DefineConstants> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
13+
14+
<!-- These defines are disabled on UapAot due to https://github.com/dotnet/corefx/issues/29745 -->
15+
<DefineConstants Condition="'$(TargetGroup)' != 'uapaot'"> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
16+
1417
<DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
1518
<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
1619
</PropertyGroup>

0 commit comments

Comments
 (0)