|
3 | 3 |
|
4 | 4 |
|
5 | 5 | #include "cinderx/Interpreter/3.14/Includes/ceval_macros.h" |
6 | | -#include "cinderx/Jit/generators_core.h" |
7 | 6 | #include "internal/pycore_ceval.h" |
8 | 7 | #include "internal/pycore_stackref.h" |
9 | 8 | #include "internal/pycore_unicodeobject.h" |
@@ -938,40 +937,6 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject *func, |
938 | 937 | fail_post_args: |
939 | 938 | return -1; |
940 | 939 | } |
941 | | -const binaryfunc _PyEval_BinaryOps[] = { |
942 | | - [NB_ADD] = PyNumber_Add, |
943 | | - [NB_AND] = PyNumber_And, |
944 | | - [NB_FLOOR_DIVIDE] = PyNumber_FloorDivide, |
945 | | - [NB_LSHIFT] = PyNumber_Lshift, |
946 | | - [NB_MATRIX_MULTIPLY] = PyNumber_MatrixMultiply, |
947 | | - [NB_MULTIPLY] = PyNumber_Multiply, |
948 | | - [NB_REMAINDER] = PyNumber_Remainder, |
949 | | - [NB_OR] = PyNumber_Or, |
950 | | - [NB_POWER] = _PyNumber_PowerNoMod, |
951 | | - [NB_RSHIFT] = PyNumber_Rshift, |
952 | | - [NB_SUBTRACT] = PyNumber_Subtract, |
953 | | - [NB_TRUE_DIVIDE] = PyNumber_TrueDivide, |
954 | | - [NB_XOR] = PyNumber_Xor, |
955 | | - [NB_INPLACE_ADD] = PyNumber_InPlaceAdd, |
956 | | - [NB_INPLACE_AND] = PyNumber_InPlaceAnd, |
957 | | - [NB_INPLACE_FLOOR_DIVIDE] = PyNumber_InPlaceFloorDivide, |
958 | | - [NB_INPLACE_LSHIFT] = PyNumber_InPlaceLshift, |
959 | | - [NB_INPLACE_MATRIX_MULTIPLY] = PyNumber_InPlaceMatrixMultiply, |
960 | | - [NB_INPLACE_MULTIPLY] = PyNumber_InPlaceMultiply, |
961 | | - [NB_INPLACE_REMAINDER] = PyNumber_InPlaceRemainder, |
962 | | - [NB_INPLACE_OR] = PyNumber_InPlaceOr, |
963 | | - [NB_INPLACE_POWER] = _PyNumber_InPlacePowerNoMod, |
964 | | - [NB_INPLACE_RSHIFT] = PyNumber_InPlaceRshift, |
965 | | - [NB_INPLACE_SUBTRACT] = PyNumber_InPlaceSubtract, |
966 | | - [NB_INPLACE_TRUE_DIVIDE] = PyNumber_InPlaceTrueDivide, |
967 | | - [NB_INPLACE_XOR] = PyNumber_InPlaceXor, |
968 | | - [NB_SUBSCR] = PyObject_GetItem, |
969 | | -}; |
970 | | -const conversion_func _PyEval_ConversionFuncs[4] = { |
971 | | - [FVC_STR] = PyObject_Str, |
972 | | - [FVC_REPR] = PyObject_Repr, |
973 | | - [FVC_ASCII] = PyObject_ASCII |
974 | | -}; |
975 | 940 | static void |
976 | 941 | clear_thread_frame(PyThreadState *tstate, _PyInterpreterFrame * frame) |
977 | 942 | { |
@@ -1105,6 +1070,8 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func, |
1105 | 1070 | return NULL; |
1106 | 1071 | } |
1107 | 1072 |
|
| 1073 | +#ifdef ENABLE_JIT_GENERATORS |
| 1074 | + |
1108 | 1075 | // Cinder specific adapted functions |
1109 | 1076 | static PyObject * |
1110 | 1077 | Ci_PyEval_GetANext(PyObject *aiter) |
@@ -1171,6 +1138,13 @@ Ci_PyEval_GetAwaitable(PyObject *iterable, int oparg) |
1171 | 1138 | return iter; |
1172 | 1139 | } |
1173 | 1140 |
|
| 1141 | +#else |
| 1142 | + |
| 1143 | +#define Ci_PyEval_GetANext _PyEval_GetANext |
| 1144 | +#define Ci_PyEval_GetAwaitable _PyEval_GetAwaitable |
| 1145 | + |
| 1146 | +#endif |
| 1147 | + |
1174 | 1148 | #if Py_TAIL_CALL_INTERP |
1175 | 1149 | #include "cinderx/Interpreter/cinderx_opcode_targets.h" |
1176 | 1150 | #include "cinderx/Interpreter/3.14/Includes/generated_cases.c.h" |
|
0 commit comments