Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By value out fixes #89982

Merged
merged 31 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bd4c73e
Add CleanupIn and CleanupOut
jtschuster Aug 1, 2023
ad4f5d4
Rename to CleanupCallerAllocated and CleanupCalleeAllocated
jtschuster Aug 1, 2023
ba4e7bc
Rename CleansUpInStage to ShouldCleanupInCurrentStage
jtschuster Aug 1, 2023
a0f63df
Add more info in stage description comment
jtschuster Aug 1, 2023
b4bdfb7
Add test types
jtschuster Aug 2, 2023
90495fe
Merge branch 'main' of https://github.com/dotnet/runtime into CleanupOut
jtschuster Aug 2, 2023
751632e
Enable tests
jtschuster Aug 2, 2023
c562670
Move cleanup stage filter method to CustomTypeMarshallingGenerator
jtschuster Aug 2, 2023
51f0c54
Make marshaller types specific to each scenario
jtschuster Aug 2, 2023
26283fe
Expect System.Exception from ThrowForHR on non-windows
jtschuster Aug 2, 2023
be1739f
Merge branch 'main' of https://github.com/dotnet/runtime into CleanupOut
jtschuster Aug 2, 2023
c3152e2
Merge branch 'main' of https://github.com/dotnet/runtime into MakeMar…
jtschuster Aug 3, 2023
584567c
Expect System.Exception from ThrowForHR on NativeAOT
jtschuster Aug 3, 2023
028b573
wip
jtschuster Aug 3, 2023
e070681
Merge branch 'MakeMarshallersSpecific' into CleanupOut
jtschuster Aug 3, 2023
73369c1
Cleanup ContentsOut guarded
jtschuster Aug 3, 2023
acdbee9
Merge branch 'main' of https://github.com/dotnet/runtime into Cleanup…
jtschuster Aug 3, 2023
e6c251b
Don't cleanup [Out] elements in unmanaged to managed stub
jtschuster Aug 3, 2023
aba85f5
Fix some ByValueOut Behavior
jtschuster Aug 3, 2023
2364be0
Merge branch 'main' of https://github.com/dotnet/runtime into Cleanup…
jtschuster Aug 4, 2023
51bc04c
Cleanup some changes from debugging
jtschuster Aug 4, 2023
2f836f6
Too many commits
jtschuster Aug 4, 2023
20d4360
Merge branch 'main' into ByValueOutFixes
jtschuster Aug 5, 2023
4649024
PR feedback
jtschuster Aug 7, 2023
5f3368e
Empty to rerun CI
jtschuster Aug 7, 2023
aebc887
PR Feedback
jtschuster Aug 8, 2023
80dc7fd
Merge branch 'main' of https://github.com/dotnet/runtime into Cleanup…
jtschuster Aug 8, 2023
dce6751
Add comments with the C# expression above the builders
jtschuster Aug 8, 2023
f5b8f24
Merge branch 'CleanupContents' into ByValueOutFixes
jtschuster Aug 8, 2023
48cfbb4
Merge branch 'main' of https://github.com/dotnet/runtime into ByValue…
jtschuster Aug 8, 2023
a7e7b1e
Merge branch 'ByValueOutFixes' of https://github.com/jtschuster/runti…
jtschuster Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more info in stage description comment
  • Loading branch information
jtschuster committed Aug 1, 2023
commit a0f63df50b0bc32ce25f89e5594655845d78dc51
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ private static SyntaxTriviaList GenerateStageTrivia(StubCodeContext.Stage stage)
StubCodeContext.Stage.Invoke => "Call the P/Invoke.",
StubCodeContext.Stage.UnmarshalCapture => "Capture the native data into marshaller instances in case conversion to managed data throws an exception.",
StubCodeContext.Stage.Unmarshal => "Convert native data to managed data.",
StubCodeContext.Stage.CleanupCallerAllocated => "Perform required cleanup.",
StubCodeContext.Stage.CleanupCalleeAllocated => "Perform required cleanup.",
StubCodeContext.Stage.CleanupCallerAllocated => "Perform cleanup of caller allocated resources.",
StubCodeContext.Stage.CleanupCalleeAllocated => "Perform cleanup of callee allocated resources.",
StubCodeContext.Stage.NotifyForSuccessfulInvoke => "Keep alive any managed objects that need to stay alive across the call.",
StubCodeContext.Stage.GuaranteedUnmarshal => "Convert native data to managed data even in the case of an exception during the non-cleanup phases.",
_ => throw new ArgumentOutOfRangeException(nameof(stage))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;

namespace SharedTypes.ComInterfaces
{
[GeneratedComInterface]
[GeneratedComInterface(Options = ComInterfaceOptions.ComObjectWrapper)]
[Guid(_guid)]
internal partial interface IDerived : IGetAndSetInt
{
void SetName([MarshalUsing(typeof(Utf16StringMarshaller))] string name);

[return:MarshalUsing(typeof(Utf16StringMarshaller))]
[return: MarshalUsing(typeof(Utf16StringMarshaller))]
string GetName();

internal new const string _guid = "7F0DB364-3C04-4487-9193-4BB05DC7B654";
Expand Down
Loading