Skip to content

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

Merged
LeVladIonescu merged 21 commits into
dotnet:mainfrom
LeVladIonescu:AOT_delegates
May 22, 2023
Merged

[mono][aot] Enabling AOT wrappers for virtual delegates#85643
LeVladIonescu merged 21 commits into
dotnet:mainfrom
LeVladIonescu:AOT_delegates

Conversation

@LeVladIonescu

@LeVladIonescuLeVladIonescu commented May 2, 2023

Copy link
Copy Markdown
Contributor

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>
@LeVladIonescuLeVladIonescu added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 2, 2023
Comment threadsrc/mono/mono/mini/aot-compiler.c Outdated
MonoJumpInfoToken *ji;
guint8 *p = buf;

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

Copy link
Copy Markdown
ContributorAuthor

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

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

Copy link
Copy Markdown
ContributorAuthor

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

@LeVladIonescu

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@runfoapprunfoappBot mentioned this pull request May 15, 2023
@SamMonoRT

Copy link
Copy Markdown
Member

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

@LeVladIonescu

Copy link
Copy Markdown
ContributorAuthor

@SamMonoRT will check

Comment threadsrc/mono/mono/metadata/metadata.c Outdated
shared_context = mono_class_get_generic_container (method->klass)->context;
inst = shared_context.class_inst;

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

Copy link
Copy Markdown
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?

@LeVladIonescuLeVladIonescuMay 16, 2023

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

@LeVladIonescu

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

LeVladIonescuand 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
Copy Markdown
ContributorAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu

Copy link
Copy Markdown
ContributorAuthor

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:mainMay 22, 2023
@LeVladIonescu
LeVladIonescu deleted the AOT_delegates branch May 22, 2023 10:35
@ghostghost locked as resolved and limited conversation to collaborators Jun 21, 2023
Sign up for freeto 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

@LeVladIonescu@SamMonoRT@vargaz@kotlarmilos