-
Notifications
You must be signed in to change notification settings - Fork 524
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
Marshal methods part 4 of 5 (runtime) #7285
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
35f4e24
Implement marshal methods LLVM IR executable code generator.
grendello e34f88e
[marshal methods] Runtime fixes and missing features
grendello eb15bd2
Update
grendello a80e4a1
TODOs and CWLs
grendello 49751f7
Update JI
grendello 803b3e3
Merge branch 'main' into mm-codegen
grendello e6101c1
Merge branch 'mm-codegen' into mm-runtime
grendello 657aff0
[WIP] Generate full native symbol names when necessary
grendello e8d3026
Handle enums properly (except when there are arrays of them)
grendello 4d7ec30
Merge branch 'main' into mm-codegen
grendello 39068d3
Merge branch 'mm-codegen' into mm-runtime
grendello 82ece43
Generate correct native names and process overloads properly
grendello acd5bc8
When a class is first seen, make sure to set class index properly
grendello 9a476d8
Merge branch 'main' into mm-codegen
grendello 8d2503f
Merge branch 'mm-codegen' into mm-runtime
grendello f913d24
Merge branch 'main' into mm-codegen
grendello 52c99db
Merge branch 'mm-codegen' into mm-runtime
grendello e5358f4
Trying to get the MAUI sample app running
grendello 2f15f67
Merge branch 'main' into mm-codegen
grendello 21c066f
Merge branch 'mm-codegen' into mm-runtime
grendello 3c8901a
MAUI app ran with marshal methods for the first time
grendello 7dc40fc
Check array dimensions when classifying methods
grendello 2b2ce55
Merge branch 'main' into mm-codegen
grendello 9c38c68
Merge branch 'mm-codegen' into mm-runtime
grendello 85f2cfa
Merge branch 'main' into mm-codegen
grendello 024b5f5
Merge branch 'mm-codegen' into mm-runtime
grendello 4d92570
We need to generate wrappers for methods with non-blittable params
grendello 20a2f00
Blittable wrapper generator progress
grendello 2d3c043
Non-blittable marshal method wrappers implemented
grendello 071e9d3
Merge branch 'main' into mm-codegen
grendello 710242e
Merge branch 'mm-codegen' into mm-runtime
grendello af91895
Fix non-blittable wrapper method generation
grendello 673836c
Merge branch 'main' into mm-codegen
grendello ca2f92d
Merge branch 'mm-codegen' into mm-runtime
grendello 10e63e2
Merge branch 'main' into mm-codegen
grendello 238417e
Merge branch 'mm-codegen' into mm-runtime
grendello 72c4b60
Disable some debug CWLs
grendello eb94adc
Merge branch 'mm-codegen' into mm-runtime
grendello a8471cd
Add some debugging info to function pointer lookups
grendello cfaabf2
Escape double quotes in function attribute value
grendello 8ca61bb
Merge branch 'main' into mm-codegen
grendello a473f27
Merge branch 'mm-codegen' into mm-runtime
grendello d99b7e3
Fix and optimize debugging info for class and method names
grendello cfa1b30
Reorganize code, move error handling to the end of function
grendello 9c9612d
Merge branch 'main' into mm-runtime
grendello 334619b
Disable marshal methods for PR
grendello c9332a8
Move some code behind the ENABLE_MARSHAL_METHODS flag
grendello e518a4e
Remove workarounds for methods with non-blittable types
grendello 6ca1245
Update apkdesc files
grendello 63bf193
Fix a failing test
grendello c516792
Merge branch 'main' into mm-runtime
grendello c8a2d9f
Implement some requested changes
grendello 0aa3e95
Merge branch 'main' into mm-runtime
grendello 49895b8
Merge branch 'main' into mm-runtime
grendello 92fa671
Remove JI workaround
grendello 6b116bf
Merge branch 'main' into mm-runtime
grendello e1e59f0
Merge branch 'main' into mm-runtime
grendello df04d47
Merge branch 'main' into mm-runtime
grendello d3d9007
Merge branch 'main' into mm-runtime
grendello b459e4a
Merge branch 'main' into mm-runtime
grendello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/Microsoft.Android.Sdk.ILLink/PreserveLists/System.Runtime.InteropServices.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<linker> | ||
<assembly fullname="System.Runtime.InteropServices"> | ||
<type fullname="System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute" /> | ||
</assembly> | ||
</linker> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This raises a "meta-question": the implication here is that whether we register via
JNIEnv::RegisterNatives()
or via CJava_…
function is done on a per-method basis.Is that actually supported on Android?
Rephrased; given the Java type:
and then at runtime we have a
Java_example_C_m_1viaFunction()
function in a loaded.so
, and we also callJNIEnv:RegisterNatives()
but only form_viaRegister()
…Does that work? The JNI docs are not clear on how these two mechanisms interact.
For that matter, if both native mechanisms are provided, which mechanism actually invoked at runtime? Which has priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answering that would require a deeper dive into Android JNI sources I suppose...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this requires reading Android source. An on-device test would answer this as well. (Though that answer could change over time, and thus wouldn't be a "final" answer, but it could still be informative.)