-
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
Add new Unmanaged MD calling convention value #38357
Add new Unmanaged MD calling convention value #38357
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
...ries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs
Show resolved
Hide resolved
...ries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs
Outdated
Show resolved
Hide resolved
Technically, I think we need a new JIT/EE interface GUID |
It's really worrisome to change ilasm and esp. the ilasm parser since we currently don't have automated testing (or any testing). Maybe you could figure out a way to test it by replacing the ilasm used to build the coreclr Pri-1 tests, and verify they all build (and run) without error. You'll also want to test ilasm/ildasm round tripping of the new callKind. |
That seems to work for the few examples I have locally. |
The changes in corinfo.h can be easily excluded from this change to make new JIT/EE interface GUID unnecessary (even technically). |
I do not see how it can possible roundtrip with the current version of the change. I expect ildasm to error out on the |
I compiled the following with ILAsm:
This decompiled without issue. However when I looked at it the actual IL the result is slightly off:
I observed the same thing in .NET Framework, but in that case it was slightly different because the signature token stated the correct thing (i.e. It seems in this case, it isn't failing but instead falling back to some "default" value. I am still writing tests and haven't run through any actual runtime scenarios yet. |
@jkotas I now see what you are talking about (i.e. |
Opinions on where some new tests should live? Here are two I am considering:
I am leaning toward (1) since this really has nothing to do with interop but is support in the runtime for metadata related to calling conventions. |
I am going with (1) Well shoot. I didn't realize the IL tools weren't consumed from a local build following repo consolidation. This is unfortunate. @jkotas or @tannergooding any suggestions on how to author tests here?
The above options are what I am thinking. |
Add the tests as disabled, and re-enable them once we get updated tooling |
I think 2 would be good. Other tools, like the C# compiler, also support overriding/dogfooding the locally built copy or a user specified copy. |
You would have an uphill battle to fight to make cross-compilation to work, and the rewire the partition dependencies. These are among the reasons why we are using LKG style model for build tools. |
@jkotas @tannergooding @davidwrighton Any additional feedback? |
src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs
Show resolved
Hide resolved
bde5839
to
e6c4adb
Compare
Currently throws "Not Supported" on runtime side if detected and "BADCODE" on JIT side.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Move enum value blocking into VM side.
Add text based grammar file for IL tooling
e6c4adb
to
145309e
Compare
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs
Show resolved
Hide resolved
@davidwrighton Any concerns here? |
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.
No this looks good from my pov.
Currently throws "Not Supported".
Contributes to #38133
Fixes #38135
/cc @lambdageek @jkotas @tannergooding @333fred @jkoritzinsky @elinor-fung @davidwrighton