Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54c3db5

Browse files
authored
exclude UTF8 string marshallers from cg2 (#55624)
* exclude UTF8 and Unicode string marshallers from cg2* keep unicodestringmarshallerThe non-pinned cases which are not supported will throw* excluding one non-r2r caseAll calls to InteropHelpers should now be under !READYTORUN
1 parent546604c commit54c3db5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

‎src/coreclr/tools/Common/TypeSystem/Interop/IL/Marshaller.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,8 +1483,12 @@ internal override bool CleanupRequired
14831483

14841484
internaloverridevoidEmitElementCleanup(ILCodeStreamcodeStream,ILEmitteremitter)
14851485
{
1486+
#ifREADYTORUN
1487+
thrownewNotSupportedException();
1488+
#else
14861489
codeStream.Emit(ILOpcode.call,emitter.NewToken(
14871490
Context.GetHelperEntryPoint("InteropHelpers","CoTaskMemFree")));
1491+
#endif
14881492
}
14891493

14901494
protectedoverridevoidTransformManagedToNative(ILCodeStreamcodeStream)
@@ -1536,12 +1540,16 @@ protected override void TransformManagedToNative(ILCodeStream codeStream)
15361540
}
15371541
else
15381542
{
1543+
#ifREADYTORUN
1544+
thrownewNotSupportedException();
1545+
#else
15391546
varhelper=Context.GetHelperEntryPoint("InteropHelpers","StringToUnicodeBuffer");
15401547
LoadManagedValue(codeStream);
15411548

15421549
codeStream.Emit(ILOpcode.call,emitter.NewToken(helper));
15431550

15441551
StoreNativeValue(codeStream);
1552+
#endif
15451553
}
15461554
}
15471555

@@ -1597,8 +1605,12 @@ internal override bool CleanupRequired
15971605

15981606
internaloverridevoidEmitElementCleanup(ILCodeStreamcodeStream,ILEmitteremitter)
15991607
{
1608+
#ifREADYTORUN
1609+
thrownewNotSupportedException();
1610+
#else
16001611
codeStream.Emit(ILOpcode.call,emitter.NewToken(
16011612
Context.GetHelperEntryPoint("InteropHelpers","CoTaskMemFree")));
1613+
#endif
16021614
}
16031615

16041616
protectedoverridevoidTransformManagedToNative(ILCodeStreamcodeStream)
@@ -1752,6 +1764,7 @@ protected override void EmitCleanupManaged(ILCodeStream codeStream)
17521764
}
17531765
}
17541766

1767+
#if!READYTORUN
17551768
classUTF8StringMarshaller:Marshaller
17561769
{
17571770
internaloverrideboolCleanupRequired
@@ -1806,6 +1819,7 @@ protected override void EmitCleanupManaged(ILCodeStream codeStream)
18061819
codeStream.EmitLabel(lNullCheck);
18071820
}
18081821
}
1822+
#endif
18091823

18101824
classSafeHandleMarshaller:Marshaller
18111825
{

‎src/coreclr/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ protected static Marshaller CreateMarshaller(MarshallerKind kind)
2525
returnnewBooleanMarshaller();
2626
caseMarshallerKind.AnsiString:
2727
returnnewAnsiStringMarshaller();
28-
caseMarshallerKind.UTF8String:
29-
returnnewUTF8StringMarshaller();
3028
caseMarshallerKind.SafeHandle:
3129
returnnewSafeHandleMarshaller();
3230
caseMarshallerKind.UnicodeString:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp