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

[mono][aot] Enabling AOT wrappers for virtual delegates #85643

Merged
merged 21 commits into from
May 22, 2023

Conversation

LeVladIonescu
Copy link
Contributor

@LeVladIonescu LeVladIonescu commented May 2, 2023

Adding AOT wrappers for delegate invoke virtual.
Contributes to #83329.

Vlad - Alexandru Ionescu added 5 commits April 26, 2023 20:31
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu LeVladIonescu added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 2, 2023
@ghost ghost assigned LeVladIonescu May 2, 2023
@@ -3778,6 +3778,8 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
MonoJumpInfoToken *ji;
guint8 *p = buf;

printf("NAME = %s\n", method->name);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated change...only for debug reasons

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu LeVladIonescu changed the title [DRAFT] Enabling AOT wrappers for virtual delegates [mono][aot] Enabling AOT wrappers for virtual delegates May 10, 2023
@LeVladIonescu LeVladIonescu removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 10, 2023
LeVladIonescu and others added 3 commits May 11, 2023 10:05
@LeVladIonescu
Copy link
Contributor Author

Ready to review / merge.
Library tests build failures from CI are related.

@LeVladIonescu
Copy link
Contributor Author

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@SamMonoRT
Copy link
Member

@LeVladIonescu - as part of this PR consider enabling any disabled tests fixed by the changes.

@LeVladIonescu
Copy link
Contributor Author

@SamMonoRT will check

shared_context = mono_class_get_generic_container (method->klass)->context;
inst = shared_context.class_inst;

args = g_new0 (MonoType*, inst->type_argc);
Copy link
Member

Choose a reason for hiding this comment

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

Is the memory being deallocated correctly?

Copy link
Contributor Author

@LeVladIonescu LeVladIonescu May 16, 2023

Choose a reason for hiding this comment

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

No, it is not. I would suggest deallocating it after

memcpy (ginst->type_argv, type_argv, type_argc * sizeof (MonoType *));

^ @vargaz

Copy link
Contributor

Choose a reason for hiding this comment

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

I can be freed, but the aot compiler is already leaking memory in a number of places, so its not that important.

…d indentation

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu
Copy link
Contributor Author

@LeVladIonescu
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

LeVladIonescu and others added 2 commits May 19, 2023 00:26
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu
Copy link
Contributor Author

Remaining failures are known and unrelated.

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu LeVladIonescu merged commit e91db04 into dotnet:main May 22, 2023
@LeVladIonescu LeVladIonescu deleted the AOT_delegates branch May 22, 2023 10:35
@ghost ghost locked as resolved and limited conversation to collaborators Jun 21, 2023
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.

4 participants