[Mono] added simple reverse pinvoke support to interpreter#102185
Merged
jkurdek merged 12 commits intodotnet:mainfrom May 17, 2024
Merged
[Mono] added simple reverse pinvoke support to interpreter#102185jkurdek merged 12 commits intodotnet:mainfrom
jkurdek merged 12 commits intodotnet:mainfrom
Conversation
jkurdek
commented
May 14, 2024
Comment on lines
4423
to
4435
| imethod->swift_error_offset = -1; | ||
|
|
||
| MonoClass *swift_error = mono_class_try_get_swift_error_class (); | ||
| MonoClass *swift_error_ptr = mono_class_create_ptr (m_class_get_this_arg (swift_error)); | ||
|
|
||
| int swift_error_index = -1; | ||
| for (int i = 0; i < sig->param_count; i++) { | ||
| MonoClass *klass = mono_class_from_mono_type_internal (sig->params [i]); | ||
| if (klass == swift_error_ptr) { | ||
| swift_error_index = i; | ||
| break; | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
We could probably hardcode type and allocate this variable without checking whether SwiftError* exists on signature
Member
There was a problem hiding this comment.
Sounds good. It can allocate a variable for SwiftError* if a signature is CallConvSwift.
Contributor
Author
There was a problem hiding this comment.
I got rid of the loop as you suggested. I don't think there is a significant benefit of hardcoding it now. What you think?
a135604 to
232d512
Compare
jkurdek
commented
May 14, 2024
BrzVlad
reviewed
May 14, 2024
BrzVlad
reviewed
May 14, 2024
BrzVlad
reviewed
May 14, 2024
2 tasks
2 tasks
kotlarmilos
reviewed
May 14, 2024
This was referenced May 14, 2024
Contributor
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced May 15, 2024
Contributor
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
Verified that using |
This was referenced May 16, 2024
Closed
BrzVlad
reviewed
May 17, 2024
BrzVlad
approved these changes
May 17, 2024
5 tasks
Ruihan-Yin
pushed a commit
to Ruihan-Yin/runtime
that referenced
this pull request
May 30, 2024
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds simple (no structs) Swift reverse pinvoke support to mono interpreter.