1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 11:37:04 +09:00
Commit graph

19 commits

Author SHA1 Message Date
Jackson Schuster
191ec61d66
Cleanup caller allocated and callee allocated resources separately (#89982)
This PR separates cleaning up caller allocated resources and callee allocated resources into separate stages in the managed to unmanaged direction. Caller allocated parameters (anything except 'out') will clean up the same way. Callee allocated parameters ('out' parameters) will be cleaned up only if the invocation succeeded.
2023-08-08 14:47:45 -07:00
Jeremy Koritzinsky
9efa9cd261
Update UserTypeMarshallingV2.md (#89222) 2023-07-19 16:49:40 -07:00
Jeremy Koritzinsky
2eaa57c45c
Add NFloat as an interop intrinsic for the source generator (#88257) 2023-06-30 11:30:22 -07:00
Jeremy Koritzinsky
cdd7566751
Specially consider CLong, CULong and Guid strictly blittable (#88213) 2023-06-29 19:58:29 -07:00
Jeremy Koritzinsky
fdb5ac7d45
Add marshallers for GeneratedComInterface-based types (#86177) 2023-05-19 18:59:29 -07:00
Jeremy Koritzinsky
5e0044f60c
Add new SafeHandleMarshaller type to provide out-of-generator marshalling support. (#85419)
Fixes #74035

We can't remove the built-in marshalling support from the generator yet, but once the out-of-band packages we ship don't support .NET 6. we can remove the built-in support that emits the marshalling code in the stub. I believe the .NET 9 packages won't support .NET 6, so once we snap for .NET 9 and update how we ship the packages, we can clean this up.

This PR also adds a requested feature to the SafeHandle marshaller: If the call to native code fails, we'll call Dispose() on the pre-allocated handle to avoid leaking it to the finalizer queue.
2023-05-03 11:28:53 -07:00
Adeel Mujahid
9d6396deb0
Fix typos (#72709) 2022-07-23 20:24:28 -07:00
Elinor Fung
6f13196cb0
Update UserTypeMarshallingV2.md to match approved design (#72230) 2022-07-14 23:02:05 -07:00
Jeremy Koritzinsky
c99b5b067c
Update design and expose new attributes for the CustomTypeMarshaller support (#71682) 2022-07-06 09:35:51 -07:00
Elinor Fung
19811c279a
Basic support for stateless linear collection marshalling (#71473)
Basic stateless linear collection marshalling for blittable elements

Not handled:
- caller-allocated buffer
- guaranteed unmarshal
- pinnable reference
- non-blittable element marshalling
- element scenarios on custom marshallers
2022-07-01 12:34:46 -07:00
Jeremy Koritzinsky
9e8c7a8f65
Update design docs to reflect our new marshaller design from partner feedback (#71017)
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2022-06-22 20:17:54 -07:00
Aaron Robinson
094b787046
Support strictly blittable type marshalling (#69100)
* Support strictly blittable type marshalling

* Update design document.

* Add test to validate check for blittability for assembly reference
2022-05-11 07:25:16 -07:00
Andrii Kurdiumov
2ea67f1f42
Get rid of last mentions of DllImportGenerator (#68535)
This should help avoid confusion when reading the code,
and what's DllImportGenerator is.
2022-04-26 07:57:40 -07:00
Elinor Fung
74e1d4df57
[LibraryImportGenerator] Fix pointer array marshalling (#67988) 2022-04-17 22:36:22 -07:00
Elinor Fung
f502039f39
[LibraryImportGenerator] Add/use CustomTypeMarshaller implementations for string marshalling (#67635) 2022-04-14 16:33:38 -07:00
Jeremy Koritzinsky
a02b49a048
Add the CustomTypeMarshallerAttribute type to make it easier to identify marshaller types (#65591) 2022-03-23 09:06:32 -07:00
Elinor Fung
c2ec86b1c5
Rename GeneratedDllImportAttribute -> LibraryImportAttribute (#66307) 2022-03-09 18:07:52 -08:00
Elinor Fung
94480f128c
Rename classes in p/invoke generator to be LibraryImport (#66217) 2022-03-04 19:42:33 -08:00
Elinor Fung
a0635832f1
Rename DllImportGenerator project to LibraryImportGenerator (#66029) 2022-03-03 22:17:23 -08:00