summaryrefslogtreecommitdiff
path: root/src/vm/compile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/compile.cpp')
-rw-r--r--src/vm/compile.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp
index 5b33792d35..23242df1db 100644
--- a/src/vm/compile.cpp
+++ b/src/vm/compile.cpp
@@ -76,6 +76,8 @@
#endif
#include "tritonstress.h"
+#include "argdestination.h"
+
#ifdef CROSSGEN_COMPILE
CompilationDomain * theDomain;
#endif
@@ -1483,7 +1485,8 @@ void FakeGcScanRoots(MetaSig& msig, ArgIterator& argit, MethodDesc * pMD, BYTE *
int argOffset;
while ((argOffset = argit.GetNextOffset()) != TransitionBlock::InvalidOffset)
{
- msig.GcScanRoots(pFrame + argOffset, &FakePromote, &sc, &FakePromoteCarefully);
+ ArgDestination argDest(pFrame, argOffset, argit.GetArgLocDescForStructInRegs());
+ msig.GcScanRoots(&argDest, &FakePromote, &sc, &FakePromoteCarefully);
}
}
@@ -1933,7 +1936,17 @@ BOOL CanDeduplicateCode(CORINFO_METHOD_HANDLE method, CORINFO_METHOD_HANDLE dupl
return FALSE;
#endif // _TARGET_X86_
- if (pMethod->ReturnsObject() != pDuplicateMethod->ReturnsObject())
+ MetaSig::RETURNTYPE returnType = pMethod->ReturnsObject();
+ MetaSig::RETURNTYPE returnTypeDuplicate = pDuplicateMethod->ReturnsObject();
+
+ if (returnType != returnTypeDuplicate)
+ return FALSE;
+
+ //
+ // Do not enable deduplication of structs returned in registers
+ //
+
+ if (returnType == MetaSig::RETVALUETYPE)
return FALSE;
//