From e3f93f8258fdce99a67252930b7405b6acd5d509 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Tue, 6 Dec 2016 18:22:14 +0900 Subject: [PATCH] Extract ARRAYSTUBS_AS_IL code from STUBS_AS_IL region (dotnet/coreclr#8443) FEATURE_ARRAYSTUBS_AS_IL code seems to be independent from FEATURE_STUBS_AS_IL, but the related code is enclosed with FEATURE_STUBS_AS_IL. This commit extracts the related code from STUBS_AS_IL region. Commit migrated from https://github.com/dotnet/coreclr/commit/7baf52ee8d079fd41a306fcc3a195199f50f85d3 --- src/coreclr/src/vm/i386/stublinkerx86.cpp | 10 ++++++---- src/coreclr/src/vm/i386/stublinkerx86.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/coreclr/src/vm/i386/stublinkerx86.cpp b/src/coreclr/src/vm/i386/stublinkerx86.cpp index 2fedb19e6040e..fb2b1fe857bd3 100644 --- a/src/coreclr/src/vm/i386/stublinkerx86.cpp +++ b/src/coreclr/src/vm/i386/stublinkerx86.cpp @@ -4834,8 +4834,9 @@ VOID StubLinkerCPU::EmitSecureDelegateInvoke(UINT_PTR hash) // Epilog EmitMethodStubEpilog(numStackBytes, SecureDelegateFrame::GetOffsetOfTransitionBlock()); } +#endif // !CROSSGEN_COMPILE && !FEATURE_STUBS_AS_IL -#ifndef FEATURE_ARRAYSTUB_AS_IL +#if !defined(CROSSGEN_COMPILE) && !defined(FEATURE_ARRAYSTUB_AS_IL) // Little helper to generate code to move nbytes bytes of non Ref memory @@ -5778,8 +5779,9 @@ VOID StubLinkerCPU::EmitArrayOpStub(const ArrayOpScript* pArrayOpScript) #pragma warning(pop) #endif -#endif // FEATURE_ARRAYSTUB_AS_IL +#endif // !CROSSGEN_COMPILE && !FEATURE_ARRAYSTUB_AS_IL +#if !defined(CROSSGEN_COMPILE) && !defined(FEATURE_STUBS_AS_IL) //=========================================================================== // Emits code to break into debugger VOID StubLinkerCPU::EmitDebugBreak() @@ -5851,9 +5853,9 @@ Thread* __stdcall CreateThreadBlockReturnHr(ComMethodFrame *pFrame) #pragma warning(pop) #endif -#endif // defined(FEATURE_COMINTEROP) && defined(_TARGET_X86_) +#endif // FEATURE_COMINTEROP && _TARGET_X86_ -#endif // !defined(CROSSGEN_COMPILE) && !defined(FEATURE_STUBS_AS_IL) +#endif // !CROSSGEN_COMPILE && !FEATURE_STUBS_AS_IL #endif // !DACCESS_COMPILE diff --git a/src/coreclr/src/vm/i386/stublinkerx86.h b/src/coreclr/src/vm/i386/stublinkerx86.h index e50486b964e3f..e361833a1e21d 100644 --- a/src/coreclr/src/vm/i386/stublinkerx86.h +++ b/src/coreclr/src/vm/i386/stublinkerx86.h @@ -402,12 +402,14 @@ class StubLinkerCPU : public StubLinker VOID EmitShuffleThunk(struct ShuffleEntry *pShuffleEntryArray); +#ifndef FEATURE_ARRAYSTUB_AS_IL //=========================================================================== // Emits code to do an array operation. VOID EmitArrayOpStub(const ArrayOpScript*); //Worker function to emit throw helpers for array ops. VOID EmitArrayOpStubThrow(unsigned exConst, unsigned cbRetArg); +#endif #ifndef FEATURE_STUBS_AS_IL //===========================================================================