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

Implement more APIs in new TypeBuilder, fix bugs found during testing #95753

Merged
merged 16 commits into from Dec 22, 2023

Conversation

buyaa-n
Copy link
Member

@buyaa-n buyaa-n commented Dec 7, 2023

  • Added implementation for DefineMethodOverrideCore(...), GetInterfaceMap(...), GetMethods(...), GetMethodImpl(...), IsAssignableFrom(...) overrides and a few other related APIs
    • Mainly followed scenarios from runtime implementation, added corresponding tests (a few IL level things not testable)
    • In runtime implementation validations related to DefineMethodOverrideCore(...) was happening during type creation, moved the validations to the corresponding API call and throwing ArgumentException instead of TypeLoadException
  • Added validations on CreateType() for not implemented methods, methods not having IL when supposed to or having IL when not supposed to have etc.
  • Always set MethodAttributes.RTSpecialName for constructors (in addition to MethodAttributes.SpecialName)
  • Imported AssemblyBuilderB.Save test from mono and fixed bugs found
    • Corrected logic for getting SignatureCallingConvention of a method
    • Fixed bug found with MarshalAsAttribute attribute with UnmanagedType.CustomMarshaler field type
    • Bug found with writing nested type

Contributes to #92975

@ghost
Copy link

ghost commented Dec 7, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Added implementation for DefineMethodOverrideCore(...), GetInterfaceMap(), IsAssignableFrom(...) overrides and a few other related APIs
    • Mainly followed scenarios from runtime implementation
    • In runtime implementation validations related to DefineMethodOverrideCore(...) was happening during type creation, moved the validations to the corresponding API call and throwing ArgumentException instead of TypeLoadException
  • Imported AB.Save test from mono and fixed bugs found
Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

buyaa-n and others added 2 commits December 10, 2023 19:46
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@buyaa-n buyaa-n closed this Dec 22, 2023
@buyaa-n buyaa-n reopened this Dec 22, 2023
@buyaa-n
Copy link
Member Author

buyaa-n commented Dec 22, 2023

Build failure unrelated and reported

@buyaa-n buyaa-n merged commit 9b01699 into dotnet:main Dec 22, 2023
131 of 152 checks passed
@buyaa-n buyaa-n deleted the implement_apis branch December 22, 2023 18:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
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

4 participants