Commit 64f1a30
[TrimmableTypeMap] Runtime trimmable typemap support (#11090)
* [TrimmableTypeMap] Runtime trimmable typemap support
Rebuild the remaining runtime-only portion of PR 11090 on top of main.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Keep cached proxy-only JNI lookup
Remove the accidental fallback chain from TryGetJniName while preserving the cache.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Remove legacy TypeManager redirect
Keep the trimmable peer path on TrimmableTypeMapTypeManager/JavaMarshalValueManager, make any legacy TypeManager lookup in trimmable mode fail fast, and tighten the proxy caches/state handling for parity with the existing activation flow.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Fail fast on missing peer proxies
Stop silently falling back when trimmable peer activation cannot resolve a generated JavaPeerProxy. In trimmable mode, missing proxy coverage should surface as an explicit runtime error so generator gaps are fixed at the source.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Remove duplicate JNI name helper
Collapse the trimmable managed-to-JNI lookup back to a single internal API by keeping TryGetJniNameForManagedType() and removing the duplicate TryGetJniName() entry point.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Prune internal peer helpers
Reduce TrimmableTypeMap surface area by making purely local proxy helpers private and removing the unused TryCreatePeer() wrapper.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Clarify Java object proxy lookup
Rename GetProxyForPeer() to GetProxyForJavaObject() so the helper more clearly describes what it actually inspects and resolves.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [TrimmableTypeMap] Restore CreatePeer guard semantics
Preserve the inherited JniValueManager.CreatePeer() preconditions for disposed managers and invalid JNI references before the trimmable fail-fast proxy check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix trimmable typemap review issues
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refine trimmable typemap cleanup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Inline sentinel cache handling
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Reuse managed proxy lookup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Rename typemap target lookup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Extract Java proxy cache helper
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Separate proxy lookup from activation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor Java proxy resolution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Inline typemap cache resolution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Tidy typemap helper flow
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fail fast on typemap aliases
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Runtime helper qualification
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Simplify Java proxy target lookup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 36e7c08 commit 64f1a30
6 files changed
Lines changed: 145 additions & 45 deletions
File tree
- src/Mono.Android
- Android.Runtime
- Java.Interop
- Microsoft.Android.Runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
272 | 277 | | |
273 | 278 | | |
274 | 279 | | |
| |||
Lines changed: 26 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
510 | 516 | | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
520 | 525 | | |
| 526 | + | |
| 527 | + | |
521 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
522 | 539 | | |
523 | 540 | | |
524 | 541 | | |
| |||
Lines changed: 104 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
80 | 87 | | |
81 | | - | |
| 88 | + | |
82 | 89 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
91 | 109 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 110 | + | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 114 | + | |
107 | 115 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
114 | 175 | | |
115 | 176 | | |
116 | 177 | | |
| |||
162 | 223 | | |
163 | 224 | | |
164 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
165 | 235 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments