Skip to content

Conversation

@AndyAyersMS
Copy link
Member

Some unboxed entries require an additional generic context argument, and
finding the right form for this argument when prejitting is more complex than
it is for jitting. So, defer this update when prejitting.

Resolves #52450.

Some unboxed entries require an additional generic context argument, and
finding the right form for this argument when prejitting is more complex than
it is for jitting. So, defer this update when prejitting.

Resolves dotnet#52450.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 7, 2021
@AndyAyersMS
Copy link
Member Author

@BruceForstall ptal
cc @dotnet/jit-contrib

Diffs are not as complex as GH default compare makes it seem, try ignoring whitespace: https://github.com/dotnet/runtime/pull/52453/files?diff=split&w=1

{
JITDUMP(
"unboxed entry needs MT arg, but the handle we have is shared. Deferring update.\n");
JITDUMP("unboxed entry needs MT arg, embedding this is complicated for prejit. Deferring "
Copy link
Member

Choose a reason for hiding this comment

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

I believe that we have done work to embed this in crossgen2. Is this just a problem for old crossgen?

We should just throw an NYI exception in old crossgen instead of asserting. It is what we have been doing in other similar situations. We are generally not spending time on keeping parity in old crossgen.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's just a problem for crossgen, and only for a relatively small number of methods.

So I'll revise per your suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Crossgen is already throwing here -- but it is asserting first. So looks like I can just remove the assert.

if (IsReadyToRunCompilation())
{
_ASSERTE(!"embedClassHandle");
ThrowHR(E_NOTIMPL);
}

@AndyAyersMS
Copy link
Member Author

Failure is known: #52464

@AndyAyersMS
Copy link
Member Author

I ran crossgen locally on the two examples with asserts, so don't see the need to run outerloop here.

@AndyAyersMS AndyAyersMS merged commit 28cff50 into dotnet:main May 7, 2021
@AndyAyersMS AndyAyersMS deleted the Fix52450 branch May 7, 2021 22:01
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assert failure: !"embedClassHandle"

4 participants