Skip to content

Commit 169831e

Browse files
committed
Revert previous changes
1 parent 49e4fdc commit 169831e

File tree

9 files changed

+26
-72
lines changed

9 files changed

+26
-72
lines changed

Doc/using/configure.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -297,25 +297,6 @@ General Options
297297

298298
.. versionadded:: 3.13
299299

300-
.. option:: --enable-experimental-jit
301-
302-
Enables :ref:`JIT compiler <whatsnew313-jit-compiler>`.
303-
304-
Possible values:
305-
* ``no`` - build interpreter without JIT.
306-
* ``yes`` - build interpreter with JIT.
307-
* ``yes-off`` - build interpreter with JIT but disable it by default.
308-
* ``interpreter`` - build interpreter without JIT, but with enabled tier 2 interpreter.
309-
310-
Defines the ``Py_JIT_ENABLED`` macro, with possible values:
311-
* ``0`` - interpreter was built without JIT.
312-
* ``1`` - interpreter was built with JIT.
313-
* ``2`` - interpreter was built without JIT, but with enabled tier 2 interpreter.
314-
315-
.. versionadded:: next
316-
317-
.. versionadded:: 3.13
318-
319300
.. option:: PKG_CONFIG
320301

321302
Path to ``pkg-config`` utility.

Misc/NEWS.d/next/Core_and_Builtins/2024-10-31-17-44-32.gh-issue-126204.ASJLDK.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Modules/_sysconfig.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,7 @@ _sysconfig_config_vars_impl(PyObject *module)
6666
Py_DECREF(config);
6767
return NULL;
6868
}
69-
#ifdef Py_JIT_ENABLED
70-
PyObject *py_jit_enabled;
71-
if (Py_JIT_ENABLED == 1) {
72-
py_jit_enabled = _PyLong_GetOne();
73-
} else {
74-
py_jit_enabled = PyLong_FromLong(2);
75-
}
76-
#else
77-
PyObject *py_jit_enabled = _PyLong_GetZero();
78-
#endif
79-
if (PyDict_SetItemString(config, "Py_JIT_ENABLED", py_jit_enabled) < 0) {
80-
Py_DECREF(config);
81-
return NULL;
82-
}
69+
8370
return config;
8471
}
8572

PC/pyconfig.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ WIN32 is still required for the locale module.
102102
/* #define Py_GIL_DISABLED 1 */
103103
#endif
104104

105-
/* Define to 1 if you want to build an interpreter with JIT, or define to 2 if
106-
you want to enable tier 2 interpreter */
107-
#ifndef Py_JIT_ENABLED
108-
/* #define Py_JIT_ENABLED 1 */
109-
#endif
110-
111105
/* Compiler specific defines */
112106

113107
/* ------------------------------------------------------------------------*/

PCbuild/_freeze_module.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@
450450
<PyConfigHText>$(PyConfigHText.Replace('#undef Py_GIL_DISABLED', '#define Py_GIL_DISABLED 1'))</PyConfigHText>
451451
</PropertyGroup>
452452
<PropertyGroup Condition="$(UseJIT) == 'true'">
453-
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_JIT_ENABLED 1 */', '#define Py_JIT_ENABLED 1'))</PyConfigHText>
453+
<PyConfigHText>$(PyConfigHText.Replace('#undef Py_JIT_ENABLED', '#define Py_JIT_ENABLED 1'))</PyConfigHText>
454454
</PropertyGroup>
455-
<PropertyGroup Condition="$(UseTIER2) == '4' Or $(UseTIER2) == '6'">
456-
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_JIT_ENABLED 1 */', '#define Py_JIT_ENABLED 2'))</PyConfigHText>
455+
<PropertyGroup Condition="$(UseTIER2) == 'true'">
456+
<PyConfigHText>$(PyConfigHText.Replace('#undef Py_JIT_ENABLED', '#define Py_JIT_ENABLED "interpreter"'))</PyConfigHText>
457457
</PropertyGroup>
458458
<Message Text="Updating pyconfig.h" Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" />
459459
<WriteLinesToFile File="$(IntDir)pyconfig.h"

PCbuild/pythoncore.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,8 @@
708708
<PropertyGroup Condition="$(UseJIT) == 'true'">
709709
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_JIT_ENABLED 1 */', '#define Py_JIT_ENABLED 1'))</PyConfigHText>
710710
</PropertyGroup>
711-
<PropertyGroup Condition="$(UseTIER2) == '4' Or $(UseTIER2) == '6'">
712-
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_JIT_ENABLED 1 */', '#define Py_JIT_ENABLED 2'))</PyConfigHText>
711+
<PropertyGroup Condition="$(UseTIER2) == 'true'">
712+
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_JIT_ENABLED "interpreter" */', '#define Py_JIT_ENABLED "interpreter"'))</PyConfigHText>
713713
</PropertyGroup>
714714
<Message Text="Updating pyconfig.h" Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" />
715715
<WriteLinesToFile File="$(IntDir)pyconfig.h"

configure

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,27 +1823,23 @@ case $enable_experimental_jit in
18231823
no)
18241824
jit_flags="";
18251825
tier2_flags="";
1826-
;;
1826+
AC_DEFINE([Py_JIT_ENABLED], [1], [Define to 1 if you want to build an interpreter with JIT]) ;;
18271827
yes)
18281828
jit_flags="-D_Py_JIT";
18291829
tier2_flags="-D_Py_TIER2=1";
1830-
AC_DEFINE([Py_JIT_ENABLED], [1], [Define to 1 if you want to build an interpreter with JIT, or define to 2 if you want to enable tier 2 interpreter])
1831-
;;
1830+
AC_DEFINE([Py_JIT_ENABLED], [1], [Define to 1 if you want to build an interpreter with JIT]) ;;
18321831
yes-off)
18331832
jit_flags="-D_Py_JIT";
18341833
tier2_flags="-D_Py_TIER2=3";
1835-
AC_DEFINE([Py_JIT_ENABLED], [1], [Define to 1 if you want to build an interpreter with JIT, or define to 2 if you want to enable tier 2 interpreter])
1836-
;;
1834+
AC_DEFINE([Py_JIT_ENABLED], [1], [Define to 1 if you want to build an interpreter with JIT]) ;;
18371835
interpreter)
18381836
jit_flags="";
18391837
tier2_flags="-D_Py_TIER2=4";
1840-
AC_DEFINE([Py_JIT_ENABLED], [2], [Define to 1 if you want to build an interpreter with JIT, or define to 2 if you want to enable tier 2 interpreter])
1841-
;;
1838+
AC_DEFINE([Py_JIT_ENABLED], ["interpreter"], [Define to interpreter if you want to build an interpreter with enabled tier 2 interpreter]) ;;
18421839
interpreter-off)
1843-
jit_flags="";
1844-
tier2_flags="-D_Py_TIER2=6";
1845-
AC_DEFINE([Py_JIT_ENABLED], [2], [Define to 1 if you want to build an interpreter with JIT, or define to 2 if you want to enable tier 2 interpreter]) # Secret option
1846-
;;
1840+
jit_flags="";
1841+
tier2_flags="-D_Py_TIER2=6";
1842+
AC_DEFINE([Py_JIT_ENABLED], ["interpreter"], [Define to interpreter if you want to build an interpreter with enabled tier 2 interpreter]) ;; # Secret option
18471843
*) AC_MSG_ERROR(
18481844
[invalid argument: --enable-experimental-jit=$enable_experimental_jit; expected no|yes|yes-off|interpreter]) ;;
18491845
esac

pyconfig.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,8 @@
16951695
/* Defined if _Complex C type is available. */
16961696
#undef Py_HAVE_C_COMPLEX
16971697

1698-
/* Define to 1 if you want to build an interpreter with JIT, or define to 2 if
1699-
you want to enable tier 2 interpreter */
1698+
/* Define to interpreter if you want to build an interpreter with enabled tier
1699+
2 interpreter */
17001700
#undef Py_JIT_ENABLED
17011701

17021702
/* Define if year with century should be normalized for strftime. */

0 commit comments

Comments
 (0)