Skip to content

Commit

Permalink
Stackless issue python#283: Concentrate platform code in slp_transfer.c
Browse files Browse the repository at this point in the history
Move all pycore_slp_switch_*.h includes from Include/internal to
Stackless/platf. These headers are included by "slp_transfer.c" only.
  • Loading branch information
Anselm Kruis committed Jul 1, 2021
1 parent d289e99 commit 82eaada
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 29 deletions.
24 changes: 12 additions & 12 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1093,18 +1093,18 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_stackless.h \
$(srcdir)/Include/internal/pycore_slp_pystate.h \
$(srcdir)/Include/internal/pycore_slp_prickelpit.h \
$(srcdir)/Include/internal/pycore_slp_switch_amd64_unix.h \
$(srcdir)/Include/internal/pycore_slp_switch_arm32_gcc.h \
$(srcdir)/Include/internal/pycore_slp_switch_arm_thumb_gcc.h \
$(srcdir)/Include/internal/pycore_slp_switch_mips_unix.h \
$(srcdir)/Include/internal/pycore_slp_switch_ppc_macosx.h \
$(srcdir)/Include/internal/pycore_slp_switch_ppc_unix.h \
$(srcdir)/Include/internal/pycore_slp_switch_ps3_SNTools.h \
$(srcdir)/Include/internal/pycore_slp_switch_s390_unix.h \
$(srcdir)/Include/internal/pycore_slp_switch_sparc_sun_gcc.h \
$(srcdir)/Include/internal/pycore_slp_switch_x64_msvc.h \
$(srcdir)/Include/internal/pycore_slp_switch_x86_msvc.h \
$(srcdir)/Include/internal/pycore_slp_switch_x86_unix.h \
$(srcdir)/Stackless/platf/switch_amd64_unix.h \
$(srcdir)/Stackless/platf/switch_arm32_gcc.h \
$(srcdir)/Stackless/platf/switch_arm_thumb_gcc.h \
$(srcdir)/Stackless/platf/switch_mips_unix.h \
$(srcdir)/Stackless/platf/switch_ppc_macosx.h \
$(srcdir)/Stackless/platf/switch_ppc_unix.h \
$(srcdir)/Stackless/platf/switch_ps3_SNTools.h \
$(srcdir)/Stackless/platf/switch_s390_unix.h \
$(srcdir)/Stackless/platf/switch_sparc_sun_gcc.h \
$(srcdir)/Stackless/platf/switch_x64_msvc.h \
$(srcdir)/Stackless/platf/switch_x86_msvc.h \
$(srcdir)/Stackless/platf/switch_x86_unix.h \
\
pyconfig.h \
$(PARSER_HEADERS) \
Expand Down
4 changes: 2 additions & 2 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@
<ClInclude Include="..\Include\internal\pycore_stackless.h" />
<ClInclude Include="..\Include\internal\pycore_slp_pystate.h" />
<ClInclude Include="..\Include\internal\pycore_slp_prickelpit.h" />
<ClInclude Include="..\Include\internal\pycore_slp_switch_x64_msvc.h" />
<ClInclude Include="..\Include\internal\pycore_slp_switch_x86_msvc.h" />
<ClInclude Include="..\Stackless\platf\switch_x64_msvc.h" />
<ClInclude Include="..\Stackless\platf\switch_x86_msvc.h" />
<ClInclude Include="..\Include\stackless.h" />
<ClInclude Include="..\Include\stackless_api.h" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,10 @@
<ClInclude Include="..\Include\internal\pycore_slp_pystate.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_slp_switch_x64_msvc.h">
<ClInclude Include="..\Stackless\platf\switch_x64_msvc.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_slp_switch_x86_msvc.h">
<ClInclude Include="..\Stackless\platf\switch_x86_msvc.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_slp_prickelpit.h">
Expand Down
26 changes: 13 additions & 13 deletions Stackless/platf/slp_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@
#define SLP_EVAL /* enable code generation in the included header */

#if defined(MS_WIN32) && !defined(MS_WIN64) && defined(_M_IX86)
#include "pycore_slp_switch_x86_msvc.h" /* MS Visual Studio on X86 */
#include "switch_x86_msvc.h" /* MS Visual Studio on X86 */
#elif defined(MS_WIN64) && defined(_M_X64)
#include "pycore_slp_switch_x64_msvc.h" /* MS Visual Studio on X64 */
#include "switch_x64_msvc.h" /* MS Visual Studio on X64 */
#elif defined(__GNUC__) && defined(__i386__)
#include "pycore_slp_switch_x86_unix.h" /* gcc on X86 */
#include "switch_x86_unix.h" /* gcc on X86 */
#elif defined(__GNUC__) && defined(__amd64__)
#include "pycore_slp_switch_amd64_unix.h" /* gcc on amd64 */
#include "switch_amd64_unix.h" /* gcc on amd64 */
#elif defined(__GNUC__) && defined(__PPC__) && defined(__linux__)
#include "pycore_slp_switch_ppc_unix.h" /* gcc on PowerPC */
#include "switch_ppc_unix.h" /* gcc on PowerPC */
#elif defined(__GNUC__) && defined(__ppc__) && defined(__APPLE__)
#include "pycore_slp_switch_ppc_macosx.h" /* Apple MacOS X on PowerPC */
#include "switch_ppc_macosx.h" /* Apple MacOS X on PowerPC */
#elif defined(__GNUC__) && defined(sparc) && defined(sun)
#include "pycore_slp_switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */
#include "switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */
#elif defined(__GNUC__) && defined(__s390__) && defined(__linux__)
#include "pycore_slp_switch_s390_unix.h" /* Linux/S390 */
#include "switch_s390_unix.h" /* Linux/S390 */
#elif defined(__GNUC__) && defined(__s390x__) && defined(__linux__)
#include "pycore_slp_switch_s390_unix.h" /* Linux/S390 zSeries (identical) */
#include "switch_s390_unix.h" /* Linux/S390 zSeries (identical) */
#elif defined(__GNUC__) && defined(__arm__) && defined(__thumb__)
#include "pycore_slp_switch_arm_thumb_gcc.h" /* gcc using arm thumb */
#include "switch_arm_thumb_gcc.h" /* gcc using arm thumb */
#elif defined(__GNUC__) && defined(__arm32__)
#include "pycore_slp_switch_arm32_gcc.h" /* gcc using arm32 */
#include "switch_arm32_gcc.h" /* gcc using arm32 */
#elif defined(__GNUC__) && defined(__mips__) && defined(__linux__)
#include "pycore_slp_switch_mips_unix.h" /* MIPS */
#include "switch_mips_unix.h" /* MIPS */
#elif defined(SN_TARGET_PS3)
#include "pycore_slp_switch_ps3_SNTools.h" /* Sony PS3 */
#include "switch_ps3_SNTools.h" /* Sony PS3 */
#endif
#ifndef STACKLESS
**********
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 82eaada

Please sign in to comment.