You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TrimmableTypeMap] Implement TypeManager and ValueManager and other Runtime codeΒ #10791
We need to clearly separate the new typemap related code from legacy code. Ideally, we'll put the new code in a separate folder and namespace.
TrimmableTypeMapTypeManager
Based on AndroidTypeManager (implements method replacement for InTune)
How can we reuse code between our type manager and this type manager?
We need to carefuly handle the Java type hierarchy walking when identifying the best match for JNI type name and a targetType (might involve type aliases, although there seems to be inconsistent support for that feature in the existing code)
Caching of type mappings needs to be done carefuly
No dependency on Java.Interop.TypeManager + Java.Interop.JavaTypeManager
These need to be trimmed away since they contain most of the trimming-unsafe code
TrimmableTypeMapValueManager
Ideally we'd just use ManagedValueManager (CoreCLR + Native AOT bridge integration), but make sure the CreatePeer calls
JavaConvert
We need to carefully override all the primitive and container type conversions with trimming- and AOT-safe factories through (as outlined in earlier draft [Draft][Proposal] Trimmable Type MapΒ #10757 - see "PoC Usage: TypeMapAttributeTypeMap.CreateArray" and "PoC Usage: JavaConvert Generic Collection Marshalling")
This might require changes to the generated proxy. I think we might want to add abstract class JavaPeerProxy<T> : JavaPeerProxy which has a GetContainerFactory() method as described in the spec draft mentioned earlier
Note: GetContainerFactory() emission on proxy types is deferred from the generator PR (#10917 / issue #10799) to this issue. The proxy type infrastructure is ready β this just needs a small addition to TypeMapAssemblyEmitter to emit the method body once JavaPeerContainerFactory is defined.
Activity
simonrozsival commentedon Mar 12, 2026
Note:
GetContainerFactory()emission on proxy types is deferred from the generator PR (#10917 / issue #10799) to this issue. The proxy type infrastructure is ready β this just needs a small addition toTypeMapAssemblyEmitterto emit the method body onceJavaPeerContainerFactoryis defined.[TrimmableTypeMap] Add UCO wrappers, JCW generator, and JNI signatureβ¦
[TrimmableTypeMap] Implement runtime TypeManager, ValueManager, and Jβ¦