Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Jul 18, 2022

Contributes to #72316

@jkotas jkotas requested a review from MichalStrehovsky as a code owner July 18, 2022 22:28
@ghost ghost assigned jkotas Jul 18, 2022
ImportCall(opCode, token);
}

private void ImportJmp(int token)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to have all call-like opcodes together.

@jkotas
Copy link
Member Author

jkotas commented Jul 18, 2022

I considered adding a case for this to PInvoke smoke tests, but it would not actually catch the problem since the MarshalDirectiveException is rooted in other ways there.

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MichalStrehovsky
Copy link
Member

I considered adding a case for this to PInvoke smoke tests, but it would not actually catch the problem since the MarshalDirectiveException is rooted in other ways there.

We could probably test this by having a calli that needs to do marshalling (maybe something along the lines of a calli that returns SomeSequentialLayoutClass - this would result in an allocation of the class in the stub and that for sure crashes the compiler if the class wasn't seen allocated elsewhere.

But also it's probably not worth the effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants