From 58010850217463943ba5910ddc8303b9d36f709e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 1 Mar 2017 22:15:34 -0800 Subject: [PATCH] Use the correct class handle for fat call temporary (#9893) `clsHnd` is the class handle of the type that owns the method for `opcode != CEE_CALLI`. We need the class handle for the method's return type though. This is ending up with RyuJIT asking weird questions over JitInterface (`getClassGClayout` of a reference type). Also removing a line that was added in #9191 to support the old code. --- src/jit/importer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index adc06b2674..4038a18abe 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -6432,7 +6432,6 @@ var_types Compiler::impImportCall(OPCODE opcode, eeGetSig(pResolvedToken->token, info.compScopeHnd, impTokenLookupContextHandle, &calliSig); callRetTyp = JITtype2varType(calliSig.retType); - clsHnd = calliSig.retTypeClass; call = impImportIndirectCall(&calliSig, ilOffset); @@ -7715,7 +7714,7 @@ DONE_CALL: unsigned calliSlot = lvaGrabTemp(true DEBUGARG("calli")); LclVarDsc* varDsc = &lvaTable[calliSlot]; varDsc->lvVerTypeInfo = tiRetVal; - impAssignTempGen(calliSlot, call, clsHnd, (unsigned)CHECK_SPILL_NONE); + impAssignTempGen(calliSlot, call, tiRetVal.GetClassHandle(), (unsigned)CHECK_SPILL_NONE); // impAssignTempGen can change src arg list and return type for call that returns struct. var_types type = genActualType(lvaTable[calliSlot].TypeGet()); call = gtNewLclvNode(calliSlot, type); -- 2.34.1