-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono] Make some icalls pass/return object references using ObjectHandleOnStack/QCallTypeHandle #62141
Conversation
Tagging subscribers to this area: Issue Details…tack argument.
|
The wasm failures are relevant. |
548a3a2
to
87a6f09
Compare
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
The wasm failures are probably becaue ObjectHandleOnStack is a structure and its passed incorrectly as an argument to icalls on wasm. |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
@vargaz I don't think this PR is worth it if we can't use the exact same managed declarations and callers that coreclr do. We may need to teach our marshalling code that ObjectHandleOnStack is just an IntPtr For example:
|
Some of the types passed are more complicated, QCallTypeReference is a struct with 2 fields for example. |
I think I'm wrong: there's nothing special for marshaling. All these types are represented as blittable structs and are just passed using the normal ABI calling convention. But also, QCalls are PInvokes, not icalls. |
Is this the reference for the wasm32 ABI that Emscripten uses? https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md#function-calling-sequence |
Yes, there was an issue passing scalar structs on wasm both in AOT and the interpreter, which is also fixed by this PR. |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
Also do some other cleanups: * Convert some icalls which don't receive/return objects any more and don't return an error to NOHANDLES. * Implement IsGenericVariable in managed code. * Add a separate GetMetadataToken icall to avoid the REUSE_WRAPPER stuff. * Sync the implementation of IsTypeDefinition with coreclr.
…erServices/QCallHandles.cs Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures are unrelated |
…tack argument.