-
Notifications
You must be signed in to change notification settings - Fork 522
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
[DRAFT] Add a managed static registrar. Fixes #17324. #17828
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cb09cab
to
60d99a1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fcc9caa
to
07eaec3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d123e10
to
1aa4108
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8346a6d
to
714c256
Compare
This comment has been minimized.
This comment has been minimized.
… attribute (if any)
…ypes when emitting IL code with Cecil.
…ssor to make it easier to reuse.
…enerating native code when using the managed static registrar. When using the managed static registrar, we register types with the static registrar before the linker does its work, so we need to follow-up after the linker has figured out what will be trimmed away to remove any such types from the list of registered types.
This is to make the Class.ResolveToken usable from the managed static registrar.
…llersOnly] method. Add an API to look up the native symbol for an [UnmanagedCallersOnly] method from native code.
This adds a managed static registrar, which is a variation of the static registrar that takes advantage of a few new features in C# and the runtime, as well as avoiding metadata tokens, which NativeAOT doesn't support. This registrar will generate most of the trampoline/interop code as managed code using Cecil, and the Objective-C part is as small as possible. Fixes dotnet#17324.
…gedCallersOnly method from the managed static registrar
…for later reference by the static registrar
…messages. This commit introduces a few new GetNSObject/GetINativeObject overloads that will be used by the managed static registrar.
…ceIdentification in exported methods. MidiCIDeviceIdentification isn't blittable ((yet)[1]), so exporting it makes the AOT compiler complain. Use a different (but blittable) type instead in the test. [1]: dotnet@03f0a35
…sing the managed static registrar.
…ral.CreateBlockForDelegate.
3bbac73
to
cee17c0
Compare
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes).NET (No breaking changes)✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌Failed tests are:
Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 235 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Closing in favor of #18268. |
This is very much WIP, and a PR to get CI testing.
This adds a managed static registrar, which is a variation of the static registrar
that takes advantage of a few new features in C# and the runtime, as well as avoiding
metadata tokens, which NativeAOT doesn't support.
This registrar will generate most of the trampoline/interop code as managed code
using Cecil, and the Objective-C part is as small as possible.
Some documentation is also included (the first commit, so start reviewing there).
Fixes #17324.
This PR is best reviewed commit-by-commit (it's quite big with changes in a of places - but each commit has a descriptive commit message that describes that change).