Nuitka-winsvc 2.3__cp311-cp311-win_amd64.whl → 2.3.2__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Nuitka-winsvc might be problematic. Click here for more details.
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/METADATA +2 -1
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/RECORD +26 -26
- nuitka/Options.py +4 -3
- nuitka/Version.py +1 -1
- nuitka/build/SconsCompilerSettings.py +7 -1
- nuitka/build/SconsInterface.py +6 -2
- nuitka/build/include/nuitka/prelude.h +14 -3
- nuitka/build/static_src/HelpersCallingGenerated.c +819 -0
- nuitka/code_generation/templates/CodeTemplatesModules.py +3 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +51 -0
- nuitka/freezer/IncludedEntryPoints.py +16 -0
- nuitka/freezer/Standalone.py +35 -20
- nuitka/plugins/standard/ImplicitImports.py +3 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +10 -1
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +5 -0
- nuitka/tools/testing/run_nuitka_tests/__main__.py +37 -0
- nuitka/tree/ReformulationMatchStatements.py +12 -11
- nuitka/utils/FileOperations.py +1 -1
- nuitka/utils/ReExecute.py +5 -0
- nuitka/utils/SharedLibraries.py +9 -1
- {Nuitka_winsvc-2.3.data → Nuitka_winsvc-2.3.2.data}/scripts/nuitka-run.bat +0 -0
- {Nuitka_winsvc-2.3.data → Nuitka_winsvc-2.3.2.data}/scripts/nuitka.bat +0 -0
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/WHEEL +0 -0
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/top_level.txt +0 -0
|
@@ -90,6 +90,44 @@ PyObject *CALL_FUNCTION_NO_ARGS(PyThreadState *tstate, PyObject *called) {
|
|
|
90
90
|
}
|
|
91
91
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
92
92
|
} else if (PyCFunction_CheckExact(called)) {
|
|
93
|
+
#if PYTHON_VERSION >= 0x380
|
|
94
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
95
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
96
|
+
return NULL;
|
|
97
|
+
}
|
|
98
|
+
#endif
|
|
99
|
+
|
|
100
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
101
|
+
|
|
102
|
+
PyObject *result;
|
|
103
|
+
|
|
104
|
+
if (!(flags & METH_VARARGS)) {
|
|
105
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
106
|
+
|
|
107
|
+
assert(func != NULL);
|
|
108
|
+
result = func(called, NULL, 0, NULL);
|
|
109
|
+
|
|
110
|
+
CHECK_OBJECT_X(result);
|
|
111
|
+
} else {
|
|
112
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
113
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
114
|
+
|
|
115
|
+
PyObject *pos_args = const_tuple_empty;
|
|
116
|
+
|
|
117
|
+
if (flags & METH_KEYWORDS) {
|
|
118
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
119
|
+
} else {
|
|
120
|
+
result = (*method)(self, pos_args);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
125
|
+
Py_LeaveRecursiveCall();
|
|
126
|
+
#endif
|
|
127
|
+
CHECK_OBJECT_X(result);
|
|
128
|
+
|
|
129
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
130
|
+
#else
|
|
93
131
|
// Try to be fast about wrapping the arguments.
|
|
94
132
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
95
133
|
|
|
@@ -163,6 +201,7 @@ PyObject *CALL_FUNCTION_NO_ARGS(PyThreadState *tstate, PyObject *called) {
|
|
|
163
201
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
164
202
|
}
|
|
165
203
|
#endif
|
|
204
|
+
#endif
|
|
166
205
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
167
206
|
} else if (PyFunction_Check(called)) {
|
|
168
207
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -471,6 +510,46 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
|
|
|
471
510
|
}
|
|
472
511
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
473
512
|
} else if (PyCFunction_CheckExact(called)) {
|
|
513
|
+
#if PYTHON_VERSION >= 0x380
|
|
514
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
515
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
516
|
+
return NULL;
|
|
517
|
+
}
|
|
518
|
+
#endif
|
|
519
|
+
|
|
520
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
521
|
+
|
|
522
|
+
PyObject *result;
|
|
523
|
+
|
|
524
|
+
if (!(flags & METH_VARARGS)) {
|
|
525
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
526
|
+
|
|
527
|
+
assert(func != NULL);
|
|
528
|
+
result = func(called, args, 1, NULL);
|
|
529
|
+
|
|
530
|
+
CHECK_OBJECT_X(result);
|
|
531
|
+
} else {
|
|
532
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
533
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
534
|
+
|
|
535
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
|
|
536
|
+
|
|
537
|
+
if (flags & METH_KEYWORDS) {
|
|
538
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
539
|
+
} else {
|
|
540
|
+
result = (*method)(self, pos_args);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
Py_DECREF(pos_args);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
547
|
+
Py_LeaveRecursiveCall();
|
|
548
|
+
#endif
|
|
549
|
+
CHECK_OBJECT_X(result);
|
|
550
|
+
|
|
551
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
552
|
+
#else
|
|
474
553
|
// Try to be fast about wrapping the arguments.
|
|
475
554
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
476
555
|
|
|
@@ -549,6 +628,7 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
|
|
|
549
628
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
550
629
|
}
|
|
551
630
|
#endif
|
|
631
|
+
#endif
|
|
552
632
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
553
633
|
} else if (PyFunction_Check(called)) {
|
|
554
634
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -883,6 +963,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS1(PyThreadState *tstate, PyObject *called, P
|
|
|
883
963
|
}
|
|
884
964
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
885
965
|
} else if (PyCFunction_CheckExact(called)) {
|
|
966
|
+
#if PYTHON_VERSION >= 0x380
|
|
967
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
968
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
969
|
+
return NULL;
|
|
970
|
+
}
|
|
971
|
+
#endif
|
|
972
|
+
|
|
973
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
974
|
+
|
|
975
|
+
PyObject *result;
|
|
976
|
+
|
|
977
|
+
if (!(flags & METH_VARARGS)) {
|
|
978
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
979
|
+
|
|
980
|
+
assert(func != NULL);
|
|
981
|
+
result = func(called, args, 1, NULL);
|
|
982
|
+
|
|
983
|
+
CHECK_OBJECT_X(result);
|
|
984
|
+
} else {
|
|
985
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
986
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
987
|
+
|
|
988
|
+
if (flags & METH_KEYWORDS) {
|
|
989
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
990
|
+
} else {
|
|
991
|
+
result = (*method)(self, pos_args);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
996
|
+
Py_LeaveRecursiveCall();
|
|
997
|
+
#endif
|
|
998
|
+
CHECK_OBJECT_X(result);
|
|
999
|
+
|
|
1000
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
1001
|
+
#else
|
|
886
1002
|
// Try to be fast about wrapping the arguments.
|
|
887
1003
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
888
1004
|
|
|
@@ -953,6 +1069,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS1(PyThreadState *tstate, PyObject *called, P
|
|
|
953
1069
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
954
1070
|
}
|
|
955
1071
|
#endif
|
|
1072
|
+
#endif
|
|
956
1073
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
957
1074
|
} else if (PyFunction_Check(called)) {
|
|
958
1075
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -1273,6 +1390,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
1273
1390
|
}
|
|
1274
1391
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
1275
1392
|
} else if (PyCFunction_CheckExact(called)) {
|
|
1393
|
+
#if PYTHON_VERSION >= 0x380
|
|
1394
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
1395
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
1396
|
+
return NULL;
|
|
1397
|
+
}
|
|
1398
|
+
#endif
|
|
1399
|
+
|
|
1400
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
1401
|
+
|
|
1402
|
+
PyObject *result;
|
|
1403
|
+
|
|
1404
|
+
if (!(flags & METH_VARARGS)) {
|
|
1405
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
1406
|
+
|
|
1407
|
+
assert(func != NULL);
|
|
1408
|
+
result = func(called, args, 2, NULL);
|
|
1409
|
+
|
|
1410
|
+
CHECK_OBJECT_X(result);
|
|
1411
|
+
} else {
|
|
1412
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
1413
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
1414
|
+
|
|
1415
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
|
|
1416
|
+
|
|
1417
|
+
if (flags & METH_KEYWORDS) {
|
|
1418
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
1419
|
+
} else {
|
|
1420
|
+
result = (*method)(self, pos_args);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
Py_DECREF(pos_args);
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
1427
|
+
Py_LeaveRecursiveCall();
|
|
1428
|
+
#endif
|
|
1429
|
+
CHECK_OBJECT_X(result);
|
|
1430
|
+
|
|
1431
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
1432
|
+
#else
|
|
1276
1433
|
// Try to be fast about wrapping the arguments.
|
|
1277
1434
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
1278
1435
|
|
|
@@ -1335,6 +1492,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
1335
1492
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
1336
1493
|
}
|
|
1337
1494
|
#endif
|
|
1495
|
+
#endif
|
|
1338
1496
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
1339
1497
|
} else if (PyFunction_Check(called)) {
|
|
1340
1498
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -1666,6 +1824,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS2(PyThreadState *tstate, PyObject *called, P
|
|
|
1666
1824
|
}
|
|
1667
1825
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
1668
1826
|
} else if (PyCFunction_CheckExact(called)) {
|
|
1827
|
+
#if PYTHON_VERSION >= 0x380
|
|
1828
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
1829
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
1830
|
+
return NULL;
|
|
1831
|
+
}
|
|
1832
|
+
#endif
|
|
1833
|
+
|
|
1834
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
1835
|
+
|
|
1836
|
+
PyObject *result;
|
|
1837
|
+
|
|
1838
|
+
if (!(flags & METH_VARARGS)) {
|
|
1839
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
1840
|
+
|
|
1841
|
+
assert(func != NULL);
|
|
1842
|
+
result = func(called, args, 2, NULL);
|
|
1843
|
+
|
|
1844
|
+
CHECK_OBJECT_X(result);
|
|
1845
|
+
} else {
|
|
1846
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
1847
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
1848
|
+
|
|
1849
|
+
if (flags & METH_KEYWORDS) {
|
|
1850
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
1851
|
+
} else {
|
|
1852
|
+
result = (*method)(self, pos_args);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
1857
|
+
Py_LeaveRecursiveCall();
|
|
1858
|
+
#endif
|
|
1859
|
+
CHECK_OBJECT_X(result);
|
|
1860
|
+
|
|
1861
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
1862
|
+
#else
|
|
1669
1863
|
// Try to be fast about wrapping the arguments.
|
|
1670
1864
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
1671
1865
|
|
|
@@ -1720,6 +1914,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS2(PyThreadState *tstate, PyObject *called, P
|
|
|
1720
1914
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
1721
1915
|
}
|
|
1722
1916
|
#endif
|
|
1917
|
+
#endif
|
|
1723
1918
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
1724
1919
|
} else if (PyFunction_Check(called)) {
|
|
1725
1920
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -2033,6 +2228,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
2033
2228
|
}
|
|
2034
2229
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
2035
2230
|
} else if (PyCFunction_CheckExact(called)) {
|
|
2231
|
+
#if PYTHON_VERSION >= 0x380
|
|
2232
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
2233
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
2234
|
+
return NULL;
|
|
2235
|
+
}
|
|
2236
|
+
#endif
|
|
2237
|
+
|
|
2238
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
2239
|
+
|
|
2240
|
+
PyObject *result;
|
|
2241
|
+
|
|
2242
|
+
if (!(flags & METH_VARARGS)) {
|
|
2243
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
2244
|
+
|
|
2245
|
+
assert(func != NULL);
|
|
2246
|
+
result = func(called, args, 3, NULL);
|
|
2247
|
+
|
|
2248
|
+
CHECK_OBJECT_X(result);
|
|
2249
|
+
} else {
|
|
2250
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
2251
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
2252
|
+
|
|
2253
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
|
|
2254
|
+
|
|
2255
|
+
if (flags & METH_KEYWORDS) {
|
|
2256
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
2257
|
+
} else {
|
|
2258
|
+
result = (*method)(self, pos_args);
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
Py_DECREF(pos_args);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
2265
|
+
Py_LeaveRecursiveCall();
|
|
2266
|
+
#endif
|
|
2267
|
+
CHECK_OBJECT_X(result);
|
|
2268
|
+
|
|
2269
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
2270
|
+
#else
|
|
2036
2271
|
// Try to be fast about wrapping the arguments.
|
|
2037
2272
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
2038
2273
|
|
|
@@ -2095,6 +2330,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
2095
2330
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
2096
2331
|
}
|
|
2097
2332
|
#endif
|
|
2333
|
+
#endif
|
|
2098
2334
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
2099
2335
|
} else if (PyFunction_Check(called)) {
|
|
2100
2336
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -2426,6 +2662,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS3(PyThreadState *tstate, PyObject *called, P
|
|
|
2426
2662
|
}
|
|
2427
2663
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
2428
2664
|
} else if (PyCFunction_CheckExact(called)) {
|
|
2665
|
+
#if PYTHON_VERSION >= 0x380
|
|
2666
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
2667
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
2668
|
+
return NULL;
|
|
2669
|
+
}
|
|
2670
|
+
#endif
|
|
2671
|
+
|
|
2672
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
2673
|
+
|
|
2674
|
+
PyObject *result;
|
|
2675
|
+
|
|
2676
|
+
if (!(flags & METH_VARARGS)) {
|
|
2677
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
2678
|
+
|
|
2679
|
+
assert(func != NULL);
|
|
2680
|
+
result = func(called, args, 3, NULL);
|
|
2681
|
+
|
|
2682
|
+
CHECK_OBJECT_X(result);
|
|
2683
|
+
} else {
|
|
2684
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
2685
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
2686
|
+
|
|
2687
|
+
if (flags & METH_KEYWORDS) {
|
|
2688
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
2689
|
+
} else {
|
|
2690
|
+
result = (*method)(self, pos_args);
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
2695
|
+
Py_LeaveRecursiveCall();
|
|
2696
|
+
#endif
|
|
2697
|
+
CHECK_OBJECT_X(result);
|
|
2698
|
+
|
|
2699
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
2700
|
+
#else
|
|
2429
2701
|
// Try to be fast about wrapping the arguments.
|
|
2430
2702
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
2431
2703
|
|
|
@@ -2480,6 +2752,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS3(PyThreadState *tstate, PyObject *called, P
|
|
|
2480
2752
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
2481
2753
|
}
|
|
2482
2754
|
#endif
|
|
2755
|
+
#endif
|
|
2483
2756
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
2484
2757
|
} else if (PyFunction_Check(called)) {
|
|
2485
2758
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -2793,6 +3066,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
2793
3066
|
}
|
|
2794
3067
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
2795
3068
|
} else if (PyCFunction_CheckExact(called)) {
|
|
3069
|
+
#if PYTHON_VERSION >= 0x380
|
|
3070
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3071
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
3072
|
+
return NULL;
|
|
3073
|
+
}
|
|
3074
|
+
#endif
|
|
3075
|
+
|
|
3076
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
3077
|
+
|
|
3078
|
+
PyObject *result;
|
|
3079
|
+
|
|
3080
|
+
if (!(flags & METH_VARARGS)) {
|
|
3081
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
3082
|
+
|
|
3083
|
+
assert(func != NULL);
|
|
3084
|
+
result = func(called, args, 4, NULL);
|
|
3085
|
+
|
|
3086
|
+
CHECK_OBJECT_X(result);
|
|
3087
|
+
} else {
|
|
3088
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
3089
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
3090
|
+
|
|
3091
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
|
|
3092
|
+
|
|
3093
|
+
if (flags & METH_KEYWORDS) {
|
|
3094
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
3095
|
+
} else {
|
|
3096
|
+
result = (*method)(self, pos_args);
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
Py_DECREF(pos_args);
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3102
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3103
|
+
Py_LeaveRecursiveCall();
|
|
3104
|
+
#endif
|
|
3105
|
+
CHECK_OBJECT_X(result);
|
|
3106
|
+
|
|
3107
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
3108
|
+
#else
|
|
2796
3109
|
// Try to be fast about wrapping the arguments.
|
|
2797
3110
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
2798
3111
|
|
|
@@ -2855,6 +3168,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
2855
3168
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
2856
3169
|
}
|
|
2857
3170
|
#endif
|
|
3171
|
+
#endif
|
|
2858
3172
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
2859
3173
|
} else if (PyFunction_Check(called)) {
|
|
2860
3174
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -3186,6 +3500,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS4(PyThreadState *tstate, PyObject *called, P
|
|
|
3186
3500
|
}
|
|
3187
3501
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
3188
3502
|
} else if (PyCFunction_CheckExact(called)) {
|
|
3503
|
+
#if PYTHON_VERSION >= 0x380
|
|
3504
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3505
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
3506
|
+
return NULL;
|
|
3507
|
+
}
|
|
3508
|
+
#endif
|
|
3509
|
+
|
|
3510
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
3511
|
+
|
|
3512
|
+
PyObject *result;
|
|
3513
|
+
|
|
3514
|
+
if (!(flags & METH_VARARGS)) {
|
|
3515
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
3516
|
+
|
|
3517
|
+
assert(func != NULL);
|
|
3518
|
+
result = func(called, args, 4, NULL);
|
|
3519
|
+
|
|
3520
|
+
CHECK_OBJECT_X(result);
|
|
3521
|
+
} else {
|
|
3522
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
3523
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
3524
|
+
|
|
3525
|
+
if (flags & METH_KEYWORDS) {
|
|
3526
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
3527
|
+
} else {
|
|
3528
|
+
result = (*method)(self, pos_args);
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3533
|
+
Py_LeaveRecursiveCall();
|
|
3534
|
+
#endif
|
|
3535
|
+
CHECK_OBJECT_X(result);
|
|
3536
|
+
|
|
3537
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
3538
|
+
#else
|
|
3189
3539
|
// Try to be fast about wrapping the arguments.
|
|
3190
3540
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
3191
3541
|
|
|
@@ -3240,6 +3590,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS4(PyThreadState *tstate, PyObject *called, P
|
|
|
3240
3590
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
3241
3591
|
}
|
|
3242
3592
|
#endif
|
|
3593
|
+
#endif
|
|
3243
3594
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
3244
3595
|
} else if (PyFunction_Check(called)) {
|
|
3245
3596
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -3553,6 +3904,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
3553
3904
|
}
|
|
3554
3905
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
3555
3906
|
} else if (PyCFunction_CheckExact(called)) {
|
|
3907
|
+
#if PYTHON_VERSION >= 0x380
|
|
3908
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3909
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
3910
|
+
return NULL;
|
|
3911
|
+
}
|
|
3912
|
+
#endif
|
|
3913
|
+
|
|
3914
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
3915
|
+
|
|
3916
|
+
PyObject *result;
|
|
3917
|
+
|
|
3918
|
+
if (!(flags & METH_VARARGS)) {
|
|
3919
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
3920
|
+
|
|
3921
|
+
assert(func != NULL);
|
|
3922
|
+
result = func(called, args, 5, NULL);
|
|
3923
|
+
|
|
3924
|
+
CHECK_OBJECT_X(result);
|
|
3925
|
+
} else {
|
|
3926
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
3927
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
3928
|
+
|
|
3929
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
|
|
3930
|
+
|
|
3931
|
+
if (flags & METH_KEYWORDS) {
|
|
3932
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
3933
|
+
} else {
|
|
3934
|
+
result = (*method)(self, pos_args);
|
|
3935
|
+
}
|
|
3936
|
+
|
|
3937
|
+
Py_DECREF(pos_args);
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
3941
|
+
Py_LeaveRecursiveCall();
|
|
3942
|
+
#endif
|
|
3943
|
+
CHECK_OBJECT_X(result);
|
|
3944
|
+
|
|
3945
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
3946
|
+
#else
|
|
3556
3947
|
// Try to be fast about wrapping the arguments.
|
|
3557
3948
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
3558
3949
|
|
|
@@ -3615,6 +4006,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
3615
4006
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
3616
4007
|
}
|
|
3617
4008
|
#endif
|
|
4009
|
+
#endif
|
|
3618
4010
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
3619
4011
|
} else if (PyFunction_Check(called)) {
|
|
3620
4012
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -3946,6 +4338,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS5(PyThreadState *tstate, PyObject *called, P
|
|
|
3946
4338
|
}
|
|
3947
4339
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
3948
4340
|
} else if (PyCFunction_CheckExact(called)) {
|
|
4341
|
+
#if PYTHON_VERSION >= 0x380
|
|
4342
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
4343
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
4344
|
+
return NULL;
|
|
4345
|
+
}
|
|
4346
|
+
#endif
|
|
4347
|
+
|
|
4348
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
4349
|
+
|
|
4350
|
+
PyObject *result;
|
|
4351
|
+
|
|
4352
|
+
if (!(flags & METH_VARARGS)) {
|
|
4353
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
4354
|
+
|
|
4355
|
+
assert(func != NULL);
|
|
4356
|
+
result = func(called, args, 5, NULL);
|
|
4357
|
+
|
|
4358
|
+
CHECK_OBJECT_X(result);
|
|
4359
|
+
} else {
|
|
4360
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
4361
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
4362
|
+
|
|
4363
|
+
if (flags & METH_KEYWORDS) {
|
|
4364
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
4365
|
+
} else {
|
|
4366
|
+
result = (*method)(self, pos_args);
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
|
|
4370
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
4371
|
+
Py_LeaveRecursiveCall();
|
|
4372
|
+
#endif
|
|
4373
|
+
CHECK_OBJECT_X(result);
|
|
4374
|
+
|
|
4375
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
4376
|
+
#else
|
|
3949
4377
|
// Try to be fast about wrapping the arguments.
|
|
3950
4378
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
3951
4379
|
|
|
@@ -4000,6 +4428,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS5(PyThreadState *tstate, PyObject *called, P
|
|
|
4000
4428
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
4001
4429
|
}
|
|
4002
4430
|
#endif
|
|
4431
|
+
#endif
|
|
4003
4432
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
4004
4433
|
} else if (PyFunction_Check(called)) {
|
|
4005
4434
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -4313,6 +4742,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
4313
4742
|
}
|
|
4314
4743
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
4315
4744
|
} else if (PyCFunction_CheckExact(called)) {
|
|
4745
|
+
#if PYTHON_VERSION >= 0x380
|
|
4746
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
4747
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
4748
|
+
return NULL;
|
|
4749
|
+
}
|
|
4750
|
+
#endif
|
|
4751
|
+
|
|
4752
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
4753
|
+
|
|
4754
|
+
PyObject *result;
|
|
4755
|
+
|
|
4756
|
+
if (!(flags & METH_VARARGS)) {
|
|
4757
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
4758
|
+
|
|
4759
|
+
assert(func != NULL);
|
|
4760
|
+
result = func(called, args, 6, NULL);
|
|
4761
|
+
|
|
4762
|
+
CHECK_OBJECT_X(result);
|
|
4763
|
+
} else {
|
|
4764
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
4765
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
4766
|
+
|
|
4767
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
|
|
4768
|
+
|
|
4769
|
+
if (flags & METH_KEYWORDS) {
|
|
4770
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
4771
|
+
} else {
|
|
4772
|
+
result = (*method)(self, pos_args);
|
|
4773
|
+
}
|
|
4774
|
+
|
|
4775
|
+
Py_DECREF(pos_args);
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4778
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
4779
|
+
Py_LeaveRecursiveCall();
|
|
4780
|
+
#endif
|
|
4781
|
+
CHECK_OBJECT_X(result);
|
|
4782
|
+
|
|
4783
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
4784
|
+
#else
|
|
4316
4785
|
// Try to be fast about wrapping the arguments.
|
|
4317
4786
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
4318
4787
|
|
|
@@ -4375,6 +4844,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
4375
4844
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
4376
4845
|
}
|
|
4377
4846
|
#endif
|
|
4847
|
+
#endif
|
|
4378
4848
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
4379
4849
|
} else if (PyFunction_Check(called)) {
|
|
4380
4850
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -4706,6 +5176,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS6(PyThreadState *tstate, PyObject *called, P
|
|
|
4706
5176
|
}
|
|
4707
5177
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
4708
5178
|
} else if (PyCFunction_CheckExact(called)) {
|
|
5179
|
+
#if PYTHON_VERSION >= 0x380
|
|
5180
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
5181
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
5182
|
+
return NULL;
|
|
5183
|
+
}
|
|
5184
|
+
#endif
|
|
5185
|
+
|
|
5186
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
5187
|
+
|
|
5188
|
+
PyObject *result;
|
|
5189
|
+
|
|
5190
|
+
if (!(flags & METH_VARARGS)) {
|
|
5191
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
5192
|
+
|
|
5193
|
+
assert(func != NULL);
|
|
5194
|
+
result = func(called, args, 6, NULL);
|
|
5195
|
+
|
|
5196
|
+
CHECK_OBJECT_X(result);
|
|
5197
|
+
} else {
|
|
5198
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
5199
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
5200
|
+
|
|
5201
|
+
if (flags & METH_KEYWORDS) {
|
|
5202
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
5203
|
+
} else {
|
|
5204
|
+
result = (*method)(self, pos_args);
|
|
5205
|
+
}
|
|
5206
|
+
}
|
|
5207
|
+
|
|
5208
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
5209
|
+
Py_LeaveRecursiveCall();
|
|
5210
|
+
#endif
|
|
5211
|
+
CHECK_OBJECT_X(result);
|
|
5212
|
+
|
|
5213
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
5214
|
+
#else
|
|
4709
5215
|
// Try to be fast about wrapping the arguments.
|
|
4710
5216
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
4711
5217
|
|
|
@@ -4760,6 +5266,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS6(PyThreadState *tstate, PyObject *called, P
|
|
|
4760
5266
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
4761
5267
|
}
|
|
4762
5268
|
#endif
|
|
5269
|
+
#endif
|
|
4763
5270
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
4764
5271
|
} else if (PyFunction_Check(called)) {
|
|
4765
5272
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -5073,6 +5580,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
5073
5580
|
}
|
|
5074
5581
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
5075
5582
|
} else if (PyCFunction_CheckExact(called)) {
|
|
5583
|
+
#if PYTHON_VERSION >= 0x380
|
|
5584
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
5585
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
5586
|
+
return NULL;
|
|
5587
|
+
}
|
|
5588
|
+
#endif
|
|
5589
|
+
|
|
5590
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
5591
|
+
|
|
5592
|
+
PyObject *result;
|
|
5593
|
+
|
|
5594
|
+
if (!(flags & METH_VARARGS)) {
|
|
5595
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
5596
|
+
|
|
5597
|
+
assert(func != NULL);
|
|
5598
|
+
result = func(called, args, 7, NULL);
|
|
5599
|
+
|
|
5600
|
+
CHECK_OBJECT_X(result);
|
|
5601
|
+
} else {
|
|
5602
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
5603
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
5604
|
+
|
|
5605
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
|
|
5606
|
+
|
|
5607
|
+
if (flags & METH_KEYWORDS) {
|
|
5608
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
5609
|
+
} else {
|
|
5610
|
+
result = (*method)(self, pos_args);
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
Py_DECREF(pos_args);
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
5617
|
+
Py_LeaveRecursiveCall();
|
|
5618
|
+
#endif
|
|
5619
|
+
CHECK_OBJECT_X(result);
|
|
5620
|
+
|
|
5621
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
5622
|
+
#else
|
|
5076
5623
|
// Try to be fast about wrapping the arguments.
|
|
5077
5624
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
5078
5625
|
|
|
@@ -5135,6 +5682,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
5135
5682
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
5136
5683
|
}
|
|
5137
5684
|
#endif
|
|
5685
|
+
#endif
|
|
5138
5686
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
5139
5687
|
} else if (PyFunction_Check(called)) {
|
|
5140
5688
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -5466,6 +6014,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS7(PyThreadState *tstate, PyObject *called, P
|
|
|
5466
6014
|
}
|
|
5467
6015
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
5468
6016
|
} else if (PyCFunction_CheckExact(called)) {
|
|
6017
|
+
#if PYTHON_VERSION >= 0x380
|
|
6018
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6019
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
6020
|
+
return NULL;
|
|
6021
|
+
}
|
|
6022
|
+
#endif
|
|
6023
|
+
|
|
6024
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
6025
|
+
|
|
6026
|
+
PyObject *result;
|
|
6027
|
+
|
|
6028
|
+
if (!(flags & METH_VARARGS)) {
|
|
6029
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
6030
|
+
|
|
6031
|
+
assert(func != NULL);
|
|
6032
|
+
result = func(called, args, 7, NULL);
|
|
6033
|
+
|
|
6034
|
+
CHECK_OBJECT_X(result);
|
|
6035
|
+
} else {
|
|
6036
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
6037
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
6038
|
+
|
|
6039
|
+
if (flags & METH_KEYWORDS) {
|
|
6040
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
6041
|
+
} else {
|
|
6042
|
+
result = (*method)(self, pos_args);
|
|
6043
|
+
}
|
|
6044
|
+
}
|
|
6045
|
+
|
|
6046
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6047
|
+
Py_LeaveRecursiveCall();
|
|
6048
|
+
#endif
|
|
6049
|
+
CHECK_OBJECT_X(result);
|
|
6050
|
+
|
|
6051
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
6052
|
+
#else
|
|
5469
6053
|
// Try to be fast about wrapping the arguments.
|
|
5470
6054
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
5471
6055
|
|
|
@@ -5520,6 +6104,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS7(PyThreadState *tstate, PyObject *called, P
|
|
|
5520
6104
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
5521
6105
|
}
|
|
5522
6106
|
#endif
|
|
6107
|
+
#endif
|
|
5523
6108
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
5524
6109
|
} else if (PyFunction_Check(called)) {
|
|
5525
6110
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -5833,6 +6418,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
5833
6418
|
}
|
|
5834
6419
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
5835
6420
|
} else if (PyCFunction_CheckExact(called)) {
|
|
6421
|
+
#if PYTHON_VERSION >= 0x380
|
|
6422
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6423
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
6424
|
+
return NULL;
|
|
6425
|
+
}
|
|
6426
|
+
#endif
|
|
6427
|
+
|
|
6428
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
6429
|
+
|
|
6430
|
+
PyObject *result;
|
|
6431
|
+
|
|
6432
|
+
if (!(flags & METH_VARARGS)) {
|
|
6433
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
6434
|
+
|
|
6435
|
+
assert(func != NULL);
|
|
6436
|
+
result = func(called, args, 8, NULL);
|
|
6437
|
+
|
|
6438
|
+
CHECK_OBJECT_X(result);
|
|
6439
|
+
} else {
|
|
6440
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
6441
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
6442
|
+
|
|
6443
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
|
|
6444
|
+
|
|
6445
|
+
if (flags & METH_KEYWORDS) {
|
|
6446
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
6447
|
+
} else {
|
|
6448
|
+
result = (*method)(self, pos_args);
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
Py_DECREF(pos_args);
|
|
6452
|
+
}
|
|
6453
|
+
|
|
6454
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6455
|
+
Py_LeaveRecursiveCall();
|
|
6456
|
+
#endif
|
|
6457
|
+
CHECK_OBJECT_X(result);
|
|
6458
|
+
|
|
6459
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
6460
|
+
#else
|
|
5836
6461
|
// Try to be fast about wrapping the arguments.
|
|
5837
6462
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
5838
6463
|
|
|
@@ -5895,6 +6520,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
5895
6520
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
5896
6521
|
}
|
|
5897
6522
|
#endif
|
|
6523
|
+
#endif
|
|
5898
6524
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
5899
6525
|
} else if (PyFunction_Check(called)) {
|
|
5900
6526
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -6226,6 +6852,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS8(PyThreadState *tstate, PyObject *called, P
|
|
|
6226
6852
|
}
|
|
6227
6853
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
6228
6854
|
} else if (PyCFunction_CheckExact(called)) {
|
|
6855
|
+
#if PYTHON_VERSION >= 0x380
|
|
6856
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6857
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
6858
|
+
return NULL;
|
|
6859
|
+
}
|
|
6860
|
+
#endif
|
|
6861
|
+
|
|
6862
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
6863
|
+
|
|
6864
|
+
PyObject *result;
|
|
6865
|
+
|
|
6866
|
+
if (!(flags & METH_VARARGS)) {
|
|
6867
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
6868
|
+
|
|
6869
|
+
assert(func != NULL);
|
|
6870
|
+
result = func(called, args, 8, NULL);
|
|
6871
|
+
|
|
6872
|
+
CHECK_OBJECT_X(result);
|
|
6873
|
+
} else {
|
|
6874
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
6875
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
6876
|
+
|
|
6877
|
+
if (flags & METH_KEYWORDS) {
|
|
6878
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
6879
|
+
} else {
|
|
6880
|
+
result = (*method)(self, pos_args);
|
|
6881
|
+
}
|
|
6882
|
+
}
|
|
6883
|
+
|
|
6884
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
6885
|
+
Py_LeaveRecursiveCall();
|
|
6886
|
+
#endif
|
|
6887
|
+
CHECK_OBJECT_X(result);
|
|
6888
|
+
|
|
6889
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
6890
|
+
#else
|
|
6229
6891
|
// Try to be fast about wrapping the arguments.
|
|
6230
6892
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
6231
6893
|
|
|
@@ -6280,6 +6942,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS8(PyThreadState *tstate, PyObject *called, P
|
|
|
6280
6942
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
6281
6943
|
}
|
|
6282
6944
|
#endif
|
|
6945
|
+
#endif
|
|
6283
6946
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
6284
6947
|
} else if (PyFunction_Check(called)) {
|
|
6285
6948
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -6593,6 +7256,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
6593
7256
|
}
|
|
6594
7257
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
6595
7258
|
} else if (PyCFunction_CheckExact(called)) {
|
|
7259
|
+
#if PYTHON_VERSION >= 0x380
|
|
7260
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
7261
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
7262
|
+
return NULL;
|
|
7263
|
+
}
|
|
7264
|
+
#endif
|
|
7265
|
+
|
|
7266
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
7267
|
+
|
|
7268
|
+
PyObject *result;
|
|
7269
|
+
|
|
7270
|
+
if (!(flags & METH_VARARGS)) {
|
|
7271
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
7272
|
+
|
|
7273
|
+
assert(func != NULL);
|
|
7274
|
+
result = func(called, args, 9, NULL);
|
|
7275
|
+
|
|
7276
|
+
CHECK_OBJECT_X(result);
|
|
7277
|
+
} else {
|
|
7278
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
7279
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
7280
|
+
|
|
7281
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
|
|
7282
|
+
|
|
7283
|
+
if (flags & METH_KEYWORDS) {
|
|
7284
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
7285
|
+
} else {
|
|
7286
|
+
result = (*method)(self, pos_args);
|
|
7287
|
+
}
|
|
7288
|
+
|
|
7289
|
+
Py_DECREF(pos_args);
|
|
7290
|
+
}
|
|
7291
|
+
|
|
7292
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
7293
|
+
Py_LeaveRecursiveCall();
|
|
7294
|
+
#endif
|
|
7295
|
+
CHECK_OBJECT_X(result);
|
|
7296
|
+
|
|
7297
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
7298
|
+
#else
|
|
6596
7299
|
// Try to be fast about wrapping the arguments.
|
|
6597
7300
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
6598
7301
|
|
|
@@ -6655,6 +7358,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
|
|
|
6655
7358
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
6656
7359
|
}
|
|
6657
7360
|
#endif
|
|
7361
|
+
#endif
|
|
6658
7362
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
6659
7363
|
} else if (PyFunction_Check(called)) {
|
|
6660
7364
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -6986,6 +7690,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS9(PyThreadState *tstate, PyObject *called, P
|
|
|
6986
7690
|
}
|
|
6987
7691
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
6988
7692
|
} else if (PyCFunction_CheckExact(called)) {
|
|
7693
|
+
#if PYTHON_VERSION >= 0x380
|
|
7694
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
7695
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
7696
|
+
return NULL;
|
|
7697
|
+
}
|
|
7698
|
+
#endif
|
|
7699
|
+
|
|
7700
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
7701
|
+
|
|
7702
|
+
PyObject *result;
|
|
7703
|
+
|
|
7704
|
+
if (!(flags & METH_VARARGS)) {
|
|
7705
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
7706
|
+
|
|
7707
|
+
assert(func != NULL);
|
|
7708
|
+
result = func(called, args, 9, NULL);
|
|
7709
|
+
|
|
7710
|
+
CHECK_OBJECT_X(result);
|
|
7711
|
+
} else {
|
|
7712
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
7713
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
7714
|
+
|
|
7715
|
+
if (flags & METH_KEYWORDS) {
|
|
7716
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
7717
|
+
} else {
|
|
7718
|
+
result = (*method)(self, pos_args);
|
|
7719
|
+
}
|
|
7720
|
+
}
|
|
7721
|
+
|
|
7722
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
7723
|
+
Py_LeaveRecursiveCall();
|
|
7724
|
+
#endif
|
|
7725
|
+
CHECK_OBJECT_X(result);
|
|
7726
|
+
|
|
7727
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
7728
|
+
#else
|
|
6989
7729
|
// Try to be fast about wrapping the arguments.
|
|
6990
7730
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
6991
7731
|
|
|
@@ -7040,6 +7780,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS9(PyThreadState *tstate, PyObject *called, P
|
|
|
7040
7780
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
7041
7781
|
}
|
|
7042
7782
|
#endif
|
|
7783
|
+
#endif
|
|
7043
7784
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
7044
7785
|
} else if (PyFunction_Check(called)) {
|
|
7045
7786
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -7353,6 +8094,46 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
|
|
|
7353
8094
|
}
|
|
7354
8095
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
7355
8096
|
} else if (PyCFunction_CheckExact(called)) {
|
|
8097
|
+
#if PYTHON_VERSION >= 0x380
|
|
8098
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
8099
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
8100
|
+
return NULL;
|
|
8101
|
+
}
|
|
8102
|
+
#endif
|
|
8103
|
+
|
|
8104
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
8105
|
+
|
|
8106
|
+
PyObject *result;
|
|
8107
|
+
|
|
8108
|
+
if (!(flags & METH_VARARGS)) {
|
|
8109
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
8110
|
+
|
|
8111
|
+
assert(func != NULL);
|
|
8112
|
+
result = func(called, args, 10, NULL);
|
|
8113
|
+
|
|
8114
|
+
CHECK_OBJECT_X(result);
|
|
8115
|
+
} else {
|
|
8116
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
8117
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
8118
|
+
|
|
8119
|
+
PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
|
|
8120
|
+
|
|
8121
|
+
if (flags & METH_KEYWORDS) {
|
|
8122
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
8123
|
+
} else {
|
|
8124
|
+
result = (*method)(self, pos_args);
|
|
8125
|
+
}
|
|
8126
|
+
|
|
8127
|
+
Py_DECREF(pos_args);
|
|
8128
|
+
}
|
|
8129
|
+
|
|
8130
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
8131
|
+
Py_LeaveRecursiveCall();
|
|
8132
|
+
#endif
|
|
8133
|
+
CHECK_OBJECT_X(result);
|
|
8134
|
+
|
|
8135
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
8136
|
+
#else
|
|
7356
8137
|
// Try to be fast about wrapping the arguments.
|
|
7357
8138
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
7358
8139
|
|
|
@@ -7415,6 +8196,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
|
|
|
7415
8196
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
7416
8197
|
}
|
|
7417
8198
|
#endif
|
|
8199
|
+
#endif
|
|
7418
8200
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
7419
8201
|
} else if (PyFunction_Check(called)) {
|
|
7420
8202
|
#if PYTHON_VERSION < 0x3b0
|
|
@@ -7746,6 +8528,42 @@ PyObject *CALL_FUNCTION_WITH_POSARGS10(PyThreadState *tstate, PyObject *called,
|
|
|
7746
8528
|
}
|
|
7747
8529
|
#if !defined(_NUITKA_EXPERIMENTAL_DISABLE_CFUNCTION_CALL_OPT)
|
|
7748
8530
|
} else if (PyCFunction_CheckExact(called)) {
|
|
8531
|
+
#if PYTHON_VERSION >= 0x380
|
|
8532
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
8533
|
+
if (unlikely(Py_EnterRecursiveCall((char *)" while calling a Python object"))) {
|
|
8534
|
+
return NULL;
|
|
8535
|
+
}
|
|
8536
|
+
#endif
|
|
8537
|
+
|
|
8538
|
+
int flags = PyCFunction_GET_FLAGS(called);
|
|
8539
|
+
|
|
8540
|
+
PyObject *result;
|
|
8541
|
+
|
|
8542
|
+
if (!(flags & METH_VARARGS)) {
|
|
8543
|
+
vectorcallfunc func = *((vectorcallfunc *)(((char *)called) + Py_TYPE(called)->tp_vectorcall_offset));
|
|
8544
|
+
|
|
8545
|
+
assert(func != NULL);
|
|
8546
|
+
result = func(called, args, 10, NULL);
|
|
8547
|
+
|
|
8548
|
+
CHECK_OBJECT_X(result);
|
|
8549
|
+
} else {
|
|
8550
|
+
PyCFunction method = PyCFunction_GET_FUNCTION(called);
|
|
8551
|
+
PyObject *self = PyCFunction_GET_SELF(called);
|
|
8552
|
+
|
|
8553
|
+
if (flags & METH_KEYWORDS) {
|
|
8554
|
+
result = (*(PyCFunctionWithKeywords)(void (*)(void))method)(self, pos_args, NULL);
|
|
8555
|
+
} else {
|
|
8556
|
+
result = (*method)(self, pos_args);
|
|
8557
|
+
}
|
|
8558
|
+
}
|
|
8559
|
+
|
|
8560
|
+
#ifdef _NUITKA_FULL_COMPAT
|
|
8561
|
+
Py_LeaveRecursiveCall();
|
|
8562
|
+
#endif
|
|
8563
|
+
CHECK_OBJECT_X(result);
|
|
8564
|
+
|
|
8565
|
+
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
8566
|
+
#else
|
|
7749
8567
|
// Try to be fast about wrapping the arguments.
|
|
7750
8568
|
int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
|
|
7751
8569
|
|
|
@@ -7800,6 +8618,7 @@ PyObject *CALL_FUNCTION_WITH_POSARGS10(PyThreadState *tstate, PyObject *called,
|
|
|
7800
8618
|
return Nuitka_CheckFunctionResult(tstate, called, result);
|
|
7801
8619
|
}
|
|
7802
8620
|
#endif
|
|
8621
|
+
#endif
|
|
7803
8622
|
#if PYTHON_VERSION < 0x380 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
|
|
7804
8623
|
} else if (PyFunction_Check(called)) {
|
|
7805
8624
|
#if PYTHON_VERSION < 0x3b0
|