Commit b22aef2
Port default-ctor nctor IL to TrackedInstructionEncoder
After rebasing onto main (which merged #11260 adding maxstack tracking),
the new 0-arg nctor codegen path in EmitUcoMethod was using the
pre-#11260 bare OpCode + Token style. Switch to the tracked encoder
helpers (LoadToken, CastClass, Call(parameterCount,…), Callvirt(parameterCount,…))
so the emitted method's maxstack is computed correctly, matching every
other IL site in TypeMapAssemblyEmitter.
Also update Generate_InheritedCtor_* / Generate_InheritedJavaInteropCtor_*
generator tests to reflect the new nctor contract: the default-ctor
branch references the target type's parameterless .ctor(),
SetPeerReference and MarkActivationPeerReplaceable — and no longer
references the legacy (IntPtr, JniHandleOwnership) /
(JniObjectReference&, JniObjectReferenceOptions) activation ctor on the
inherited base.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 324b7f0 commit b22aef2
2 files changed
Lines changed: 27 additions & 17 deletions
File tree
- src/Microsoft.Android.Sdk.TrimmableTypeMap/Generator
- tests/Microsoft.Android.Sdk.TrimmableTypeMap.Tests/Generator
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1076 | 1074 | | |
1077 | 1075 | | |
1078 | 1076 | | |
1079 | 1077 | | |
1080 | 1078 | | |
1081 | | - | |
| 1079 | + | |
1082 | 1080 | | |
1083 | 1081 | | |
1084 | 1082 | | |
1085 | | - | |
1086 | | - | |
| 1083 | + | |
1087 | 1084 | | |
1088 | 1085 | | |
1089 | | - | |
| 1086 | + | |
1090 | 1087 | | |
1091 | 1088 | | |
1092 | | - | |
| 1089 | + | |
1093 | 1090 | | |
1094 | 1091 | | |
1095 | 1092 | | |
| |||
1133 | 1130 | | |
1134 | 1131 | | |
1135 | 1132 | | |
1136 | | - | |
| 1133 | + | |
1137 | 1134 | | |
1138 | 1135 | | |
1139 | 1136 | | |
| |||
1164 | 1161 | | |
1165 | 1162 | | |
1166 | 1163 | | |
1167 | | - | |
| 1164 | + | |
1168 | 1165 | | |
1169 | 1166 | | |
1170 | 1167 | | |
| |||
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
310 | 315 | | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
316 | | - | |
| 322 | + | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
| |||
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
| 341 | + | |
| 342 | + | |
335 | 343 | | |
336 | 344 | | |
337 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
338 | 350 | | |
| 351 | + | |
339 | 352 | | |
340 | 353 | | |
341 | 354 | | |
| |||
0 commit comments