Skip to content
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

Scan calli dependencies #72413

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Scan calli dependencies #72413

merged 1 commit into from
Jul 19, 2022

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jul 18, 2022

Contributes to #72316

@@ -767,6 +761,31 @@ private void ImportLdFtn(int token, ILOpcode opCode)
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.

None yet

2 participants