Nuitka-winsvc 2.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.

Files changed (201) hide show
  1. {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/METADATA +2 -1
  2. {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/RECORD +201 -200
  3. nuitka/Bytecodes.py +4 -2
  4. nuitka/HardImportRegistry.py +1 -0
  5. nuitka/MainControl.py +16 -10
  6. nuitka/ModuleRegistry.py +15 -0
  7. nuitka/OptionParsing.py +30 -8
  8. nuitka/Options.py +106 -45
  9. nuitka/PostProcessing.py +9 -8
  10. nuitka/PythonVersions.py +2 -1
  11. nuitka/Serialization.py +47 -30
  12. nuitka/Version.py +1 -1
  13. nuitka/build/Backend.scons +46 -19
  14. nuitka/build/CCompilerVersion.scons +3 -3
  15. nuitka/build/Onefile.scons +4 -4
  16. nuitka/build/SconsCaching.py +3 -2
  17. nuitka/build/SconsCompilerSettings.py +18 -6
  18. nuitka/build/SconsInterface.py +28 -8
  19. nuitka/build/SconsUtils.py +9 -1
  20. nuitka/build/include/nuitka/allocator.h +58 -2
  21. nuitka/build/include/nuitka/compiled_frame.h +48 -13
  22. nuitka/build/include/nuitka/compiled_function.h +4 -0
  23. nuitka/build/include/nuitka/constants.h +6 -0
  24. nuitka/build/include/nuitka/exception_groups.h +6 -6
  25. nuitka/build/include/nuitka/exceptions.h +3 -3
  26. nuitka/build/include/nuitka/freelists.h +11 -0
  27. nuitka/build/include/nuitka/helper/dictionaries.h +5 -4
  28. nuitka/build/include/nuitka/helper/lists.h +5 -5
  29. nuitka/build/include/nuitka/helper/lists_generated.h +12 -12
  30. nuitka/build/include/nuitka/helper/sequences.h +6 -0
  31. nuitka/build/include/nuitka/helper/slices.h +14 -8
  32. nuitka/build/include/nuitka/helper/subscripts.h +1 -184
  33. nuitka/build/include/nuitka/helper/tuples.h +42 -33
  34. nuitka/build/include/nuitka/importing.h +5 -0
  35. nuitka/build/include/nuitka/prelude.h +49 -5
  36. nuitka/build/include/nuitka/safe_string_ops.h +1 -0
  37. nuitka/build/include/nuitka/threading.h +13 -10
  38. nuitka/build/static_src/CompiledAsyncgenType.c +19 -8
  39. nuitka/build/static_src/CompiledCellType.c +1 -1
  40. nuitka/build/static_src/CompiledCodeHelpers.c +18 -16
  41. nuitka/build/static_src/CompiledCoroutineType.c +23 -19
  42. nuitka/build/static_src/CompiledFrameType.c +46 -34
  43. nuitka/build/static_src/CompiledFunctionType.c +55 -34
  44. nuitka/build/static_src/CompiledGeneratorType.c +21 -19
  45. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +127 -130
  46. nuitka/build/static_src/CompiledMethodType.c +15 -17
  47. nuitka/build/static_src/HelpersAllocator.c +71 -0
  48. nuitka/build/static_src/HelpersAttributes.c +1 -1
  49. nuitka/build/static_src/HelpersBuiltin.c +5 -5
  50. nuitka/build/static_src/HelpersBytes.c +2 -2
  51. nuitka/build/static_src/HelpersCalling.c +3 -0
  52. nuitka/build/static_src/HelpersCallingGenerated.c +952 -133
  53. nuitka/build/static_src/HelpersComparisonEq.c +329 -329
  54. nuitka/build/static_src/HelpersComparisonEqUtils.c +3 -1
  55. nuitka/build/static_src/HelpersComparisonGe.c +322 -322
  56. nuitka/build/static_src/HelpersComparisonGt.c +321 -321
  57. nuitka/build/static_src/HelpersComparisonLe.c +322 -322
  58. nuitka/build/static_src/HelpersComparisonLt.c +321 -321
  59. nuitka/build/static_src/HelpersComparisonNe.c +329 -329
  60. nuitka/build/static_src/HelpersConsole.c +96 -0
  61. nuitka/build/static_src/HelpersConstantsBlob.c +10 -6
  62. nuitka/build/static_src/HelpersDeepcopy.c +10 -8
  63. nuitka/build/static_src/HelpersDictionaries.c +17 -11
  64. nuitka/build/static_src/HelpersDictionariesGenerated.c +65 -29
  65. nuitka/build/static_src/HelpersExceptions.c +107 -9
  66. nuitka/build/static_src/HelpersFilesystemPaths.c +64 -4
  67. nuitka/build/static_src/HelpersFloats.c +20 -14
  68. nuitka/build/static_src/HelpersImport.c +1 -1
  69. nuitka/build/static_src/HelpersJitSources.c +1 -1
  70. nuitka/build/static_src/HelpersLists.c +29 -19
  71. nuitka/build/static_src/HelpersListsGenerated.c +24 -24
  72. nuitka/build/static_src/HelpersMatching.c +32 -5
  73. nuitka/build/static_src/HelpersOperationBinaryAdd.c +90 -63
  74. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +4 -4
  75. nuitka/build/static_src/HelpersOperationBinaryBitand.c +33 -33
  76. nuitka/build/static_src/HelpersOperationBinaryBitor.c +33 -33
  77. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +33 -33
  78. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +24 -24
  79. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +24 -24
  80. nuitka/build/static_src/HelpersOperationBinaryLshift.c +30 -30
  81. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +7 -7
  82. nuitka/build/static_src/HelpersOperationBinaryMod.c +90 -90
  83. nuitka/build/static_src/HelpersOperationBinaryMult.c +64 -58
  84. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +24 -24
  85. nuitka/build/static_src/HelpersOperationBinaryPow.c +27 -27
  86. nuitka/build/static_src/HelpersOperationBinaryRshift.c +30 -30
  87. nuitka/build/static_src/HelpersOperationBinarySub.c +24 -24
  88. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +24 -24
  89. nuitka/build/static_src/HelpersOperationInplaceAdd.c +67 -49
  90. nuitka/build/static_src/HelpersOperationInplaceBitand.c +25 -25
  91. nuitka/build/static_src/HelpersOperationInplaceBitor.c +25 -25
  92. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +25 -25
  93. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +28 -28
  94. nuitka/build/static_src/HelpersOperationInplaceLshift.c +18 -18
  95. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +10 -10
  96. nuitka/build/static_src/HelpersOperationInplaceMod.c +70 -70
  97. nuitka/build/static_src/HelpersOperationInplaceMult.c +33 -33
  98. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +28 -28
  99. nuitka/build/static_src/HelpersOperationInplacePow.c +28 -28
  100. nuitka/build/static_src/HelpersOperationInplaceRshift.c +18 -18
  101. nuitka/build/static_src/HelpersOperationInplaceSub.c +28 -28
  102. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +28 -28
  103. nuitka/build/static_src/HelpersRaising.c +10 -3
  104. nuitka/build/static_src/HelpersSafeStrings.c +14 -4
  105. nuitka/build/static_src/HelpersSlices.c +12 -5
  106. nuitka/build/static_src/HelpersStrings.c +1 -1
  107. nuitka/build/static_src/HelpersTuples.c +20 -15
  108. nuitka/build/static_src/InspectPatcher.c +74 -6
  109. nuitka/build/static_src/MainProgram.c +90 -25
  110. nuitka/build/static_src/MetaPathBasedLoader.c +81 -45
  111. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +2 -2
  112. nuitka/build/static_src/OnefileBootstrap.c +16 -17
  113. nuitka/code_generation/CodeGeneration.py +5 -2
  114. nuitka/code_generation/ConstantCodes.py +2 -2
  115. nuitka/code_generation/DictCodes.py +2 -2
  116. nuitka/code_generation/GlobalConstants.py +5 -0
  117. nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
  118. nuitka/code_generation/ListCodes.py +2 -2
  119. nuitka/code_generation/LocalsDictCodes.py +1 -1
  120. nuitka/code_generation/ModuleCodes.py +19 -0
  121. nuitka/code_generation/PackageResourceCodes.py +14 -0
  122. nuitka/code_generation/SliceCodes.py +3 -3
  123. nuitka/code_generation/SubscriptCodes.py +5 -13
  124. nuitka/code_generation/TupleCodes.py +1 -1
  125. nuitka/code_generation/c_types/CTypePyObjectPointers.py +7 -7
  126. nuitka/code_generation/templates/CodeTemplatesConstants.py +7 -5
  127. nuitka/code_generation/templates/CodeTemplatesLoader.py +2 -0
  128. nuitka/code_generation/templates/CodeTemplatesModules.py +80 -54
  129. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
  130. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +59 -8
  131. nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +5 -5
  132. nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +2 -2
  133. nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +2 -2
  134. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +57 -21
  135. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
  136. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +5 -5
  137. nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +18 -18
  138. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +11 -11
  139. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +3 -3
  140. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +3 -3
  141. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +7 -7
  142. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +3 -3
  143. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +11 -11
  144. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
  145. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +10 -10
  146. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
  147. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +3 -3
  148. nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +4 -1
  149. nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +4 -1
  150. nuitka/finalizations/FinalizeMarkups.py +0 -18
  151. nuitka/freezer/DependsExe.py +9 -4
  152. nuitka/freezer/DllDependenciesMacOS.py +1 -1
  153. nuitka/freezer/DllDependenciesWin32.py +1 -1
  154. nuitka/freezer/ImportDetection.py +1 -0
  155. nuitka/freezer/IncludedDataFiles.py +13 -4
  156. nuitka/freezer/IncludedEntryPoints.py +16 -0
  157. nuitka/freezer/Onefile.py +0 -1
  158. nuitka/freezer/Standalone.py +38 -21
  159. nuitka/importing/ImportCache.py +3 -2
  160. nuitka/importing/Importing.py +16 -3
  161. nuitka/importing/StandardLibrary.py +4 -0
  162. nuitka/nodes/ChildrenHavingMixins.py +2 -0
  163. nuitka/nodes/ExpressionBasesGenerated.py +4 -0
  164. nuitka/nodes/HardImportNodesGenerated.py +83 -0
  165. nuitka/nodes/ModuleNodes.py +10 -2
  166. nuitka/nodes/OsSysNodes.py +16 -0
  167. nuitka/nodes/SubscriptNodes.py +3 -3
  168. nuitka/plugins/PluginBase.py +2 -0
  169. nuitka/plugins/standard/DataFilesPlugin.py +22 -1
  170. nuitka/plugins/standard/DillPlugin/DillPlugin.c +3 -3
  171. nuitka/plugins/standard/ImplicitImports.py +3 -0
  172. nuitka/plugins/standard/OptionsNannyPlugin.py +9 -41
  173. nuitka/plugins/standard/PkgResourcesPlugin.py +8 -2
  174. nuitka/plugins/standard/PySidePyQtPlugin.py +3 -0
  175. nuitka/plugins/standard/standard.nuitka-package.config.yml +28 -13
  176. nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +2 -2
  177. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +7 -2
  178. nuitka/specs/HardImportSpecs.py +3 -0
  179. nuitka/specs/ParameterSpecs.py +26 -15
  180. nuitka/tools/general/find_module/FindModuleCode.py +3 -2
  181. nuitka/tools/specialize/CTypeDescriptions.py +11 -9
  182. nuitka/tools/testing/Common.py +12 -5
  183. nuitka/tools/testing/SearchModes.py +5 -1
  184. nuitka/tools/testing/run_nuitka_tests/__main__.py +37 -0
  185. nuitka/tools/watch/GitHub.py +1 -7
  186. nuitka/tree/Building.py +9 -6
  187. nuitka/tree/ReformulationMatchStatements.py +51 -14
  188. nuitka/tree/TreeHelpers.py +8 -0
  189. nuitka/utils/CStrings.py +7 -0
  190. nuitka/utils/Execution.py +10 -1
  191. nuitka/utils/FileOperations.py +21 -13
  192. nuitka/utils/Importing.py +24 -0
  193. nuitka/utils/ReExecute.py +12 -3
  194. nuitka/utils/SharedLibraries.py +26 -1
  195. nuitka/utils/Yaml.py +9 -1
  196. {Nuitka_winsvc-2.2.3.data → Nuitka_winsvc-2.3.2.data}/scripts/nuitka-run.bat +0 -0
  197. {Nuitka_winsvc-2.2.3.data → Nuitka_winsvc-2.3.2.data}/scripts/nuitka.bat +0 -0
  198. {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/LICENSE.txt +0 -0
  199. {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/WHEEL +0 -0
  200. {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.2.dist-info}/entry_points.txt +0 -0
  201. {Nuitka_winsvc-2.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,7 +201,8 @@ PyObject *CALL_FUNCTION_NO_ARGS(PyThreadState *tstate, PyObject *called) {
163
201
  return Nuitka_CheckFunctionResult(tstate, called, result);
164
202
  }
165
203
  #endif
166
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
204
+ #endif
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
169
208
  PyObject *result = callPythonFunctionNoArgs(called);
@@ -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
 
@@ -512,7 +591,7 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
512
591
  PyObject *result;
513
592
 
514
593
  #if PYTHON_VERSION < 0x360
515
- PyObject *pos_args = MAKE_TUPLE(args, 1);
594
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
516
595
  if (flags & METH_KEYWORDS) {
517
596
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
518
597
  } else {
@@ -522,19 +601,19 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
522
601
  Py_DECREF(pos_args);
523
602
  #else
524
603
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
525
- PyObject *pos_args = MAKE_TUPLE(args, 1);
604
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
526
605
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
527
606
  Py_DECREF(pos_args);
528
607
  } else if (flags == METH_FASTCALL) {
529
608
  #if PYTHON_VERSION < 0x370
530
609
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 1, NULL);
531
610
  #else
532
- PyObject *pos_args = MAKE_TUPLE(args, 1);
611
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
533
612
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 1);
534
613
  Py_DECREF(pos_args);
535
614
  #endif
536
615
  } else {
537
- PyObject *pos_args = MAKE_TUPLE(args, 1);
616
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
538
617
  result = (*method)(self, pos_args);
539
618
  Py_DECREF(pos_args);
540
619
  }
@@ -549,7 +628,8 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
549
628
  return Nuitka_CheckFunctionResult(tstate, called, result);
550
629
  }
551
630
  #endif
552
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
631
+ #endif
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
555
635
  PyObject *result = callPythonFunction(called, args, 1);
@@ -590,7 +670,7 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
590
670
  obj = called_type->tp_alloc(called_type, 0);
591
671
  CHECK_OBJECT(obj);
592
672
  } else {
593
- pos_args = MAKE_TUPLE(args, 1);
673
+ pos_args = MAKE_TUPLE(tstate, args, 1);
594
674
  obj = called_type->tp_new(called_type, pos_args, NULL);
595
675
  }
596
676
 
@@ -663,7 +743,7 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
663
743
  }
664
744
  } else {
665
745
  if (pos_args == NULL) {
666
- pos_args = MAKE_TUPLE(args, 1);
746
+ pos_args = MAKE_TUPLE(tstate, args, 1);
667
747
  }
668
748
 
669
749
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -762,7 +842,7 @@ PyObject *CALL_FUNCTION_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *called,
762
842
  PRINT_NEW_LINE();
763
843
  #endif
764
844
 
765
- PyObject *pos_args = MAKE_TUPLE(args, 1);
845
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
766
846
 
767
847
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
768
848
 
@@ -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,7 +1069,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS1(PyThreadState *tstate, PyObject *called, P
953
1069
  return Nuitka_CheckFunctionResult(tstate, called, result);
954
1070
  }
955
1071
  #endif
956
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
1072
+ #endif
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
959
1076
  PyObject *result = callPythonFunction(called, args, 1);
@@ -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
 
@@ -1298,7 +1455,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1298
1455
  PyObject *result;
1299
1456
 
1300
1457
  #if PYTHON_VERSION < 0x360
1301
- PyObject *pos_args = MAKE_TUPLE(args, 2);
1458
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
1302
1459
  if (flags & METH_KEYWORDS) {
1303
1460
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
1304
1461
  } else {
@@ -1308,19 +1465,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1308
1465
  Py_DECREF(pos_args);
1309
1466
  #else
1310
1467
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
1311
- PyObject *pos_args = MAKE_TUPLE(args, 2);
1468
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
1312
1469
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
1313
1470
  Py_DECREF(pos_args);
1314
1471
  } else if (flags == METH_FASTCALL) {
1315
1472
  #if PYTHON_VERSION < 0x370
1316
1473
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 2, NULL);
1317
1474
  #else
1318
- PyObject *pos_args = MAKE_TUPLE(args, 2);
1475
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
1319
1476
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 2);
1320
1477
  Py_DECREF(pos_args);
1321
1478
  #endif
1322
1479
  } else {
1323
- PyObject *pos_args = MAKE_TUPLE(args, 2);
1480
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
1324
1481
  result = (*method)(self, pos_args);
1325
1482
  Py_DECREF(pos_args);
1326
1483
  }
@@ -1335,7 +1492,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1335
1492
  return Nuitka_CheckFunctionResult(tstate, called, result);
1336
1493
  }
1337
1494
  #endif
1338
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
1495
+ #endif
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
1341
1499
  PyObject *result = callPythonFunction(called, args, 2);
@@ -1370,7 +1528,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1370
1528
  obj = called_type->tp_alloc(called_type, 0);
1371
1529
  CHECK_OBJECT(obj);
1372
1530
  } else {
1373
- pos_args = MAKE_TUPLE(args, 2);
1531
+ pos_args = MAKE_TUPLE(tstate, args, 2);
1374
1532
  obj = called_type->tp_new(called_type, pos_args, NULL);
1375
1533
  }
1376
1534
 
@@ -1442,7 +1600,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1442
1600
  }
1443
1601
  } else {
1444
1602
  if (pos_args == NULL) {
1445
- pos_args = MAKE_TUPLE(args, 2);
1603
+ pos_args = MAKE_TUPLE(tstate, args, 2);
1446
1604
  }
1447
1605
 
1448
1606
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -1541,7 +1699,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2(PyThreadState *tstate, PyObject *called, PyOb
1541
1699
  PRINT_NEW_LINE();
1542
1700
  #endif
1543
1701
 
1544
- PyObject *pos_args = MAKE_TUPLE(args, 2);
1702
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
1545
1703
 
1546
1704
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
1547
1705
 
@@ -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,7 +1914,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS2(PyThreadState *tstate, PyObject *called, P
1720
1914
  return Nuitka_CheckFunctionResult(tstate, called, result);
1721
1915
  }
1722
1916
  #endif
1723
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
1917
+ #endif
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
1726
1921
  PyObject *result = callPythonFunction(called, args, 2);
@@ -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
 
@@ -2058,7 +2293,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2058
2293
  PyObject *result;
2059
2294
 
2060
2295
  #if PYTHON_VERSION < 0x360
2061
- PyObject *pos_args = MAKE_TUPLE(args, 3);
2296
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
2062
2297
  if (flags & METH_KEYWORDS) {
2063
2298
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
2064
2299
  } else {
@@ -2068,19 +2303,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2068
2303
  Py_DECREF(pos_args);
2069
2304
  #else
2070
2305
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
2071
- PyObject *pos_args = MAKE_TUPLE(args, 3);
2306
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
2072
2307
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
2073
2308
  Py_DECREF(pos_args);
2074
2309
  } else if (flags == METH_FASTCALL) {
2075
2310
  #if PYTHON_VERSION < 0x370
2076
2311
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 3, NULL);
2077
2312
  #else
2078
- PyObject *pos_args = MAKE_TUPLE(args, 3);
2313
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
2079
2314
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 3);
2080
2315
  Py_DECREF(pos_args);
2081
2316
  #endif
2082
2317
  } else {
2083
- PyObject *pos_args = MAKE_TUPLE(args, 3);
2318
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
2084
2319
  result = (*method)(self, pos_args);
2085
2320
  Py_DECREF(pos_args);
2086
2321
  }
@@ -2095,7 +2330,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2095
2330
  return Nuitka_CheckFunctionResult(tstate, called, result);
2096
2331
  }
2097
2332
  #endif
2098
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
2333
+ #endif
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
2101
2337
  PyObject *result = callPythonFunction(called, args, 3);
@@ -2130,7 +2366,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2130
2366
  obj = called_type->tp_alloc(called_type, 0);
2131
2367
  CHECK_OBJECT(obj);
2132
2368
  } else {
2133
- pos_args = MAKE_TUPLE(args, 3);
2369
+ pos_args = MAKE_TUPLE(tstate, args, 3);
2134
2370
  obj = called_type->tp_new(called_type, pos_args, NULL);
2135
2371
  }
2136
2372
 
@@ -2202,7 +2438,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2202
2438
  }
2203
2439
  } else {
2204
2440
  if (pos_args == NULL) {
2205
- pos_args = MAKE_TUPLE(args, 3);
2441
+ pos_args = MAKE_TUPLE(tstate, args, 3);
2206
2442
  }
2207
2443
 
2208
2444
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -2301,7 +2537,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3(PyThreadState *tstate, PyObject *called, PyOb
2301
2537
  PRINT_NEW_LINE();
2302
2538
  #endif
2303
2539
 
2304
- PyObject *pos_args = MAKE_TUPLE(args, 3);
2540
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
2305
2541
 
2306
2542
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
2307
2543
 
@@ -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,7 +2752,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS3(PyThreadState *tstate, PyObject *called, P
2480
2752
  return Nuitka_CheckFunctionResult(tstate, called, result);
2481
2753
  }
2482
2754
  #endif
2483
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
2755
+ #endif
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
2486
2759
  PyObject *result = callPythonFunction(called, args, 3);
@@ -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
 
@@ -2818,7 +3131,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
2818
3131
  PyObject *result;
2819
3132
 
2820
3133
  #if PYTHON_VERSION < 0x360
2821
- PyObject *pos_args = MAKE_TUPLE(args, 4);
3134
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
2822
3135
  if (flags & METH_KEYWORDS) {
2823
3136
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
2824
3137
  } else {
@@ -2828,19 +3141,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
2828
3141
  Py_DECREF(pos_args);
2829
3142
  #else
2830
3143
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
2831
- PyObject *pos_args = MAKE_TUPLE(args, 4);
3144
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
2832
3145
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
2833
3146
  Py_DECREF(pos_args);
2834
3147
  } else if (flags == METH_FASTCALL) {
2835
3148
  #if PYTHON_VERSION < 0x370
2836
3149
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 4, NULL);
2837
3150
  #else
2838
- PyObject *pos_args = MAKE_TUPLE(args, 4);
3151
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
2839
3152
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 4);
2840
3153
  Py_DECREF(pos_args);
2841
3154
  #endif
2842
3155
  } else {
2843
- PyObject *pos_args = MAKE_TUPLE(args, 4);
3156
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
2844
3157
  result = (*method)(self, pos_args);
2845
3158
  Py_DECREF(pos_args);
2846
3159
  }
@@ -2855,7 +3168,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
2855
3168
  return Nuitka_CheckFunctionResult(tstate, called, result);
2856
3169
  }
2857
3170
  #endif
2858
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
3171
+ #endif
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
2861
3175
  PyObject *result = callPythonFunction(called, args, 4);
@@ -2890,7 +3204,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
2890
3204
  obj = called_type->tp_alloc(called_type, 0);
2891
3205
  CHECK_OBJECT(obj);
2892
3206
  } else {
2893
- pos_args = MAKE_TUPLE(args, 4);
3207
+ pos_args = MAKE_TUPLE(tstate, args, 4);
2894
3208
  obj = called_type->tp_new(called_type, pos_args, NULL);
2895
3209
  }
2896
3210
 
@@ -2962,7 +3276,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
2962
3276
  }
2963
3277
  } else {
2964
3278
  if (pos_args == NULL) {
2965
- pos_args = MAKE_TUPLE(args, 4);
3279
+ pos_args = MAKE_TUPLE(tstate, args, 4);
2966
3280
  }
2967
3281
 
2968
3282
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -3061,7 +3375,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4(PyThreadState *tstate, PyObject *called, PyOb
3061
3375
  PRINT_NEW_LINE();
3062
3376
  #endif
3063
3377
 
3064
- PyObject *pos_args = MAKE_TUPLE(args, 4);
3378
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
3065
3379
 
3066
3380
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
3067
3381
 
@@ -3186,8 +3500,44 @@ 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)) {
3189
- // Try to be fast about wrapping the arguments.
3190
- int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
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
3539
+ // Try to be fast about wrapping the arguments.
3540
+ int flags = PyCFunction_GET_FLAGS(called) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
3191
3541
 
3192
3542
  if (unlikely(flags & METH_NOARGS)) {
3193
3543
  SET_CURRENT_EXCEPTION_TYPE0_FORMAT1(PyExc_TypeError, "%s() takes no arguments (4 given)",
@@ -3240,7 +3590,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS4(PyThreadState *tstate, PyObject *called, P
3240
3590
  return Nuitka_CheckFunctionResult(tstate, called, result);
3241
3591
  }
3242
3592
  #endif
3243
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
3593
+ #endif
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
3246
3597
  PyObject *result = callPythonFunction(called, args, 4);
@@ -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
 
@@ -3578,7 +3969,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3578
3969
  PyObject *result;
3579
3970
 
3580
3971
  #if PYTHON_VERSION < 0x360
3581
- PyObject *pos_args = MAKE_TUPLE(args, 5);
3972
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
3582
3973
  if (flags & METH_KEYWORDS) {
3583
3974
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
3584
3975
  } else {
@@ -3588,19 +3979,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3588
3979
  Py_DECREF(pos_args);
3589
3980
  #else
3590
3981
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
3591
- PyObject *pos_args = MAKE_TUPLE(args, 5);
3982
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
3592
3983
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
3593
3984
  Py_DECREF(pos_args);
3594
3985
  } else if (flags == METH_FASTCALL) {
3595
3986
  #if PYTHON_VERSION < 0x370
3596
3987
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 5, NULL);
3597
3988
  #else
3598
- PyObject *pos_args = MAKE_TUPLE(args, 5);
3989
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
3599
3990
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 5);
3600
3991
  Py_DECREF(pos_args);
3601
3992
  #endif
3602
3993
  } else {
3603
- PyObject *pos_args = MAKE_TUPLE(args, 5);
3994
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
3604
3995
  result = (*method)(self, pos_args);
3605
3996
  Py_DECREF(pos_args);
3606
3997
  }
@@ -3615,7 +4006,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3615
4006
  return Nuitka_CheckFunctionResult(tstate, called, result);
3616
4007
  }
3617
4008
  #endif
3618
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
4009
+ #endif
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
3621
4013
  PyObject *result = callPythonFunction(called, args, 5);
@@ -3650,7 +4042,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3650
4042
  obj = called_type->tp_alloc(called_type, 0);
3651
4043
  CHECK_OBJECT(obj);
3652
4044
  } else {
3653
- pos_args = MAKE_TUPLE(args, 5);
4045
+ pos_args = MAKE_TUPLE(tstate, args, 5);
3654
4046
  obj = called_type->tp_new(called_type, pos_args, NULL);
3655
4047
  }
3656
4048
 
@@ -3722,7 +4114,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3722
4114
  }
3723
4115
  } else {
3724
4116
  if (pos_args == NULL) {
3725
- pos_args = MAKE_TUPLE(args, 5);
4117
+ pos_args = MAKE_TUPLE(tstate, args, 5);
3726
4118
  }
3727
4119
 
3728
4120
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -3821,7 +4213,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5(PyThreadState *tstate, PyObject *called, PyOb
3821
4213
  PRINT_NEW_LINE();
3822
4214
  #endif
3823
4215
 
3824
- PyObject *pos_args = MAKE_TUPLE(args, 5);
4216
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
3825
4217
 
3826
4218
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
3827
4219
 
@@ -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,7 +4428,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS5(PyThreadState *tstate, PyObject *called, P
4000
4428
  return Nuitka_CheckFunctionResult(tstate, called, result);
4001
4429
  }
4002
4430
  #endif
4003
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
4431
+ #endif
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
4006
4435
  PyObject *result = callPythonFunction(called, args, 5);
@@ -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
 
@@ -4338,7 +4807,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4338
4807
  PyObject *result;
4339
4808
 
4340
4809
  #if PYTHON_VERSION < 0x360
4341
- PyObject *pos_args = MAKE_TUPLE(args, 6);
4810
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
4342
4811
  if (flags & METH_KEYWORDS) {
4343
4812
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
4344
4813
  } else {
@@ -4348,19 +4817,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4348
4817
  Py_DECREF(pos_args);
4349
4818
  #else
4350
4819
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
4351
- PyObject *pos_args = MAKE_TUPLE(args, 6);
4820
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
4352
4821
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
4353
4822
  Py_DECREF(pos_args);
4354
4823
  } else if (flags == METH_FASTCALL) {
4355
4824
  #if PYTHON_VERSION < 0x370
4356
4825
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 6, NULL);
4357
4826
  #else
4358
- PyObject *pos_args = MAKE_TUPLE(args, 6);
4827
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
4359
4828
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 6);
4360
4829
  Py_DECREF(pos_args);
4361
4830
  #endif
4362
4831
  } else {
4363
- PyObject *pos_args = MAKE_TUPLE(args, 6);
4832
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
4364
4833
  result = (*method)(self, pos_args);
4365
4834
  Py_DECREF(pos_args);
4366
4835
  }
@@ -4375,7 +4844,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4375
4844
  return Nuitka_CheckFunctionResult(tstate, called, result);
4376
4845
  }
4377
4846
  #endif
4378
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
4847
+ #endif
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
4381
4851
  PyObject *result = callPythonFunction(called, args, 6);
@@ -4410,7 +4880,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4410
4880
  obj = called_type->tp_alloc(called_type, 0);
4411
4881
  CHECK_OBJECT(obj);
4412
4882
  } else {
4413
- pos_args = MAKE_TUPLE(args, 6);
4883
+ pos_args = MAKE_TUPLE(tstate, args, 6);
4414
4884
  obj = called_type->tp_new(called_type, pos_args, NULL);
4415
4885
  }
4416
4886
 
@@ -4482,7 +4952,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4482
4952
  }
4483
4953
  } else {
4484
4954
  if (pos_args == NULL) {
4485
- pos_args = MAKE_TUPLE(args, 6);
4955
+ pos_args = MAKE_TUPLE(tstate, args, 6);
4486
4956
  }
4487
4957
 
4488
4958
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -4581,7 +5051,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6(PyThreadState *tstate, PyObject *called, PyOb
4581
5051
  PRINT_NEW_LINE();
4582
5052
  #endif
4583
5053
 
4584
- PyObject *pos_args = MAKE_TUPLE(args, 6);
5054
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
4585
5055
 
4586
5056
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
4587
5057
 
@@ -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,7 +5266,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS6(PyThreadState *tstate, PyObject *called, P
4760
5266
  return Nuitka_CheckFunctionResult(tstate, called, result);
4761
5267
  }
4762
5268
  #endif
4763
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
5269
+ #endif
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
4766
5273
  PyObject *result = callPythonFunction(called, args, 6);
@@ -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
 
@@ -5098,7 +5645,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5098
5645
  PyObject *result;
5099
5646
 
5100
5647
  #if PYTHON_VERSION < 0x360
5101
- PyObject *pos_args = MAKE_TUPLE(args, 7);
5648
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
5102
5649
  if (flags & METH_KEYWORDS) {
5103
5650
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
5104
5651
  } else {
@@ -5108,19 +5655,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5108
5655
  Py_DECREF(pos_args);
5109
5656
  #else
5110
5657
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
5111
- PyObject *pos_args = MAKE_TUPLE(args, 7);
5658
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
5112
5659
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
5113
5660
  Py_DECREF(pos_args);
5114
5661
  } else if (flags == METH_FASTCALL) {
5115
5662
  #if PYTHON_VERSION < 0x370
5116
5663
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 7, NULL);
5117
5664
  #else
5118
- PyObject *pos_args = MAKE_TUPLE(args, 7);
5665
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
5119
5666
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 7);
5120
5667
  Py_DECREF(pos_args);
5121
5668
  #endif
5122
5669
  } else {
5123
- PyObject *pos_args = MAKE_TUPLE(args, 7);
5670
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
5124
5671
  result = (*method)(self, pos_args);
5125
5672
  Py_DECREF(pos_args);
5126
5673
  }
@@ -5135,7 +5682,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5135
5682
  return Nuitka_CheckFunctionResult(tstate, called, result);
5136
5683
  }
5137
5684
  #endif
5138
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
5685
+ #endif
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
5141
5689
  PyObject *result = callPythonFunction(called, args, 7);
@@ -5170,7 +5718,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5170
5718
  obj = called_type->tp_alloc(called_type, 0);
5171
5719
  CHECK_OBJECT(obj);
5172
5720
  } else {
5173
- pos_args = MAKE_TUPLE(args, 7);
5721
+ pos_args = MAKE_TUPLE(tstate, args, 7);
5174
5722
  obj = called_type->tp_new(called_type, pos_args, NULL);
5175
5723
  }
5176
5724
 
@@ -5242,7 +5790,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5242
5790
  }
5243
5791
  } else {
5244
5792
  if (pos_args == NULL) {
5245
- pos_args = MAKE_TUPLE(args, 7);
5793
+ pos_args = MAKE_TUPLE(tstate, args, 7);
5246
5794
  }
5247
5795
 
5248
5796
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -5341,7 +5889,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7(PyThreadState *tstate, PyObject *called, PyOb
5341
5889
  PRINT_NEW_LINE();
5342
5890
  #endif
5343
5891
 
5344
- PyObject *pos_args = MAKE_TUPLE(args, 7);
5892
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
5345
5893
 
5346
5894
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
5347
5895
 
@@ -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,7 +6104,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS7(PyThreadState *tstate, PyObject *called, P
5520
6104
  return Nuitka_CheckFunctionResult(tstate, called, result);
5521
6105
  }
5522
6106
  #endif
5523
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
6107
+ #endif
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
5526
6111
  PyObject *result = callPythonFunction(called, args, 7);
@@ -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
 
@@ -5858,7 +6483,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
5858
6483
  PyObject *result;
5859
6484
 
5860
6485
  #if PYTHON_VERSION < 0x360
5861
- PyObject *pos_args = MAKE_TUPLE(args, 8);
6486
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
5862
6487
  if (flags & METH_KEYWORDS) {
5863
6488
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
5864
6489
  } else {
@@ -5868,19 +6493,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
5868
6493
  Py_DECREF(pos_args);
5869
6494
  #else
5870
6495
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
5871
- PyObject *pos_args = MAKE_TUPLE(args, 8);
6496
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
5872
6497
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
5873
6498
  Py_DECREF(pos_args);
5874
6499
  } else if (flags == METH_FASTCALL) {
5875
6500
  #if PYTHON_VERSION < 0x370
5876
6501
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 8, NULL);
5877
6502
  #else
5878
- PyObject *pos_args = MAKE_TUPLE(args, 8);
6503
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
5879
6504
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 8);
5880
6505
  Py_DECREF(pos_args);
5881
6506
  #endif
5882
6507
  } else {
5883
- PyObject *pos_args = MAKE_TUPLE(args, 8);
6508
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
5884
6509
  result = (*method)(self, pos_args);
5885
6510
  Py_DECREF(pos_args);
5886
6511
  }
@@ -5895,7 +6520,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
5895
6520
  return Nuitka_CheckFunctionResult(tstate, called, result);
5896
6521
  }
5897
6522
  #endif
5898
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
6523
+ #endif
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
5901
6527
  PyObject *result = callPythonFunction(called, args, 8);
@@ -5930,7 +6556,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
5930
6556
  obj = called_type->tp_alloc(called_type, 0);
5931
6557
  CHECK_OBJECT(obj);
5932
6558
  } else {
5933
- pos_args = MAKE_TUPLE(args, 8);
6559
+ pos_args = MAKE_TUPLE(tstate, args, 8);
5934
6560
  obj = called_type->tp_new(called_type, pos_args, NULL);
5935
6561
  }
5936
6562
 
@@ -6002,7 +6628,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
6002
6628
  }
6003
6629
  } else {
6004
6630
  if (pos_args == NULL) {
6005
- pos_args = MAKE_TUPLE(args, 8);
6631
+ pos_args = MAKE_TUPLE(tstate, args, 8);
6006
6632
  }
6007
6633
 
6008
6634
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -6101,7 +6727,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8(PyThreadState *tstate, PyObject *called, PyOb
6101
6727
  PRINT_NEW_LINE();
6102
6728
  #endif
6103
6729
 
6104
- PyObject *pos_args = MAKE_TUPLE(args, 8);
6730
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
6105
6731
 
6106
6732
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
6107
6733
 
@@ -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,7 +6942,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS8(PyThreadState *tstate, PyObject *called, P
6280
6942
  return Nuitka_CheckFunctionResult(tstate, called, result);
6281
6943
  }
6282
6944
  #endif
6283
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
6945
+ #endif
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
6286
6949
  PyObject *result = callPythonFunction(called, args, 8);
@@ -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
 
@@ -6618,7 +7321,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6618
7321
  PyObject *result;
6619
7322
 
6620
7323
  #if PYTHON_VERSION < 0x360
6621
- PyObject *pos_args = MAKE_TUPLE(args, 9);
7324
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
6622
7325
  if (flags & METH_KEYWORDS) {
6623
7326
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
6624
7327
  } else {
@@ -6628,19 +7331,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6628
7331
  Py_DECREF(pos_args);
6629
7332
  #else
6630
7333
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
6631
- PyObject *pos_args = MAKE_TUPLE(args, 9);
7334
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
6632
7335
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
6633
7336
  Py_DECREF(pos_args);
6634
7337
  } else if (flags == METH_FASTCALL) {
6635
7338
  #if PYTHON_VERSION < 0x370
6636
7339
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 9, NULL);
6637
7340
  #else
6638
- PyObject *pos_args = MAKE_TUPLE(args, 9);
7341
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
6639
7342
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 9);
6640
7343
  Py_DECREF(pos_args);
6641
7344
  #endif
6642
7345
  } else {
6643
- PyObject *pos_args = MAKE_TUPLE(args, 9);
7346
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
6644
7347
  result = (*method)(self, pos_args);
6645
7348
  Py_DECREF(pos_args);
6646
7349
  }
@@ -6655,7 +7358,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6655
7358
  return Nuitka_CheckFunctionResult(tstate, called, result);
6656
7359
  }
6657
7360
  #endif
6658
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
7361
+ #endif
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
6661
7365
  PyObject *result = callPythonFunction(called, args, 9);
@@ -6690,7 +7394,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6690
7394
  obj = called_type->tp_alloc(called_type, 0);
6691
7395
  CHECK_OBJECT(obj);
6692
7396
  } else {
6693
- pos_args = MAKE_TUPLE(args, 9);
7397
+ pos_args = MAKE_TUPLE(tstate, args, 9);
6694
7398
  obj = called_type->tp_new(called_type, pos_args, NULL);
6695
7399
  }
6696
7400
 
@@ -6762,7 +7466,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6762
7466
  }
6763
7467
  } else {
6764
7468
  if (pos_args == NULL) {
6765
- pos_args = MAKE_TUPLE(args, 9);
7469
+ pos_args = MAKE_TUPLE(tstate, args, 9);
6766
7470
  }
6767
7471
 
6768
7472
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -6861,7 +7565,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9(PyThreadState *tstate, PyObject *called, PyOb
6861
7565
  PRINT_NEW_LINE();
6862
7566
  #endif
6863
7567
 
6864
- PyObject *pos_args = MAKE_TUPLE(args, 9);
7568
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
6865
7569
 
6866
7570
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
6867
7571
 
@@ -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,7 +7780,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS9(PyThreadState *tstate, PyObject *called, P
7040
7780
  return Nuitka_CheckFunctionResult(tstate, called, result);
7041
7781
  }
7042
7782
  #endif
7043
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
7783
+ #endif
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
7046
7787
  PyObject *result = callPythonFunction(called, args, 9);
@@ -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
 
@@ -7378,7 +8159,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7378
8159
  PyObject *result;
7379
8160
 
7380
8161
  #if PYTHON_VERSION < 0x360
7381
- PyObject *pos_args = MAKE_TUPLE(args, 10);
8162
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
7382
8163
  if (flags & METH_KEYWORDS) {
7383
8164
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
7384
8165
  } else {
@@ -7388,19 +8169,19 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7388
8169
  Py_DECREF(pos_args);
7389
8170
  #else
7390
8171
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
7391
- PyObject *pos_args = MAKE_TUPLE(args, 10);
8172
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
7392
8173
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
7393
8174
  Py_DECREF(pos_args);
7394
8175
  } else if (flags == METH_FASTCALL) {
7395
8176
  #if PYTHON_VERSION < 0x370
7396
8177
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args, 10, NULL);
7397
8178
  #else
7398
- PyObject *pos_args = MAKE_TUPLE(args, 10);
8179
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
7399
8180
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 10);
7400
8181
  Py_DECREF(pos_args);
7401
8182
  #endif
7402
8183
  } else {
7403
- PyObject *pos_args = MAKE_TUPLE(args, 10);
8184
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
7404
8185
  result = (*method)(self, pos_args);
7405
8186
  Py_DECREF(pos_args);
7406
8187
  }
@@ -7415,7 +8196,8 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7415
8196
  return Nuitka_CheckFunctionResult(tstate, called, result);
7416
8197
  }
7417
8198
  #endif
7418
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
8199
+ #endif
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
7421
8203
  PyObject *result = callPythonFunction(called, args, 10);
@@ -7450,7 +8232,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7450
8232
  obj = called_type->tp_alloc(called_type, 0);
7451
8233
  CHECK_OBJECT(obj);
7452
8234
  } else {
7453
- pos_args = MAKE_TUPLE(args, 10);
8235
+ pos_args = MAKE_TUPLE(tstate, args, 10);
7454
8236
  obj = called_type->tp_new(called_type, pos_args, NULL);
7455
8237
  }
7456
8238
 
@@ -7522,7 +8304,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7522
8304
  }
7523
8305
  } else {
7524
8306
  if (pos_args == NULL) {
7525
- pos_args = MAKE_TUPLE(args, 10);
8307
+ pos_args = MAKE_TUPLE(tstate, args, 10);
7526
8308
  }
7527
8309
 
7528
8310
  if (unlikely(type->tp_init(obj, pos_args, NULL) < 0)) {
@@ -7621,7 +8403,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10(PyThreadState *tstate, PyObject *called, PyO
7621
8403
  PRINT_NEW_LINE();
7622
8404
  #endif
7623
8405
 
7624
- PyObject *pos_args = MAKE_TUPLE(args, 10);
8406
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
7625
8407
 
7626
8408
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
7627
8409
 
@@ -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,7 +8618,8 @@ PyObject *CALL_FUNCTION_WITH_POSARGS10(PyThreadState *tstate, PyObject *called,
7800
8618
  return Nuitka_CheckFunctionResult(tstate, called, result);
7801
8619
  }
7802
8620
  #endif
7803
- #if !defined(_NUITKA_EXPERIMENTAL_DISABLE_UNCOMPILED_FUNCTION_CALL_OPT)
8621
+ #endif
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
7806
8625
  PyObject *result = callPythonFunction(called, args, 10);
@@ -8141,7 +8960,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS1_VECTORCALL(PyThreadState *tstate, PyObject *c
8141
8960
  return NULL;
8142
8961
  }
8143
8962
 
8144
- PyObject *pos_args = MAKE_TUPLE(args, 1);
8963
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
8145
8964
 
8146
8965
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8147
8966
 
@@ -8229,7 +9048,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS1_KWSPLIT(PyThreadState *tstate, PyObject *call
8229
9048
  return NULL;
8230
9049
  }
8231
9050
 
8232
- PyObject *pos_args = MAKE_TUPLE(args, 1);
9051
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
8233
9052
 
8234
9053
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8235
9054
 
@@ -8400,7 +9219,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2_VECTORCALL(PyThreadState *tstate, PyObject *c
8400
9219
  return NULL;
8401
9220
  }
8402
9221
 
8403
- PyObject *pos_args = MAKE_TUPLE(args, 2);
9222
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
8404
9223
 
8405
9224
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8406
9225
 
@@ -8488,7 +9307,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS2_KWSPLIT(PyThreadState *tstate, PyObject *call
8488
9307
  return NULL;
8489
9308
  }
8490
9309
 
8491
- PyObject *pos_args = MAKE_TUPLE(args, 2);
9310
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
8492
9311
 
8493
9312
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8494
9313
 
@@ -8659,7 +9478,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3_VECTORCALL(PyThreadState *tstate, PyObject *c
8659
9478
  return NULL;
8660
9479
  }
8661
9480
 
8662
- PyObject *pos_args = MAKE_TUPLE(args, 3);
9481
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
8663
9482
 
8664
9483
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8665
9484
 
@@ -8747,7 +9566,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS3_KWSPLIT(PyThreadState *tstate, PyObject *call
8747
9566
  return NULL;
8748
9567
  }
8749
9568
 
8750
- PyObject *pos_args = MAKE_TUPLE(args, 3);
9569
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
8751
9570
 
8752
9571
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8753
9572
 
@@ -8918,7 +9737,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4_VECTORCALL(PyThreadState *tstate, PyObject *c
8918
9737
  return NULL;
8919
9738
  }
8920
9739
 
8921
- PyObject *pos_args = MAKE_TUPLE(args, 4);
9740
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
8922
9741
 
8923
9742
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
8924
9743
 
@@ -9006,7 +9825,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS4_KWSPLIT(PyThreadState *tstate, PyObject *call
9006
9825
  return NULL;
9007
9826
  }
9008
9827
 
9009
- PyObject *pos_args = MAKE_TUPLE(args, 4);
9828
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
9010
9829
 
9011
9830
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9012
9831
 
@@ -9177,7 +9996,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5_VECTORCALL(PyThreadState *tstate, PyObject *c
9177
9996
  return NULL;
9178
9997
  }
9179
9998
 
9180
- PyObject *pos_args = MAKE_TUPLE(args, 5);
9999
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
9181
10000
 
9182
10001
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9183
10002
 
@@ -9265,7 +10084,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS5_KWSPLIT(PyThreadState *tstate, PyObject *call
9265
10084
  return NULL;
9266
10085
  }
9267
10086
 
9268
- PyObject *pos_args = MAKE_TUPLE(args, 5);
10087
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 5);
9269
10088
 
9270
10089
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9271
10090
 
@@ -9436,7 +10255,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6_VECTORCALL(PyThreadState *tstate, PyObject *c
9436
10255
  return NULL;
9437
10256
  }
9438
10257
 
9439
- PyObject *pos_args = MAKE_TUPLE(args, 6);
10258
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
9440
10259
 
9441
10260
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9442
10261
 
@@ -9524,7 +10343,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS6_KWSPLIT(PyThreadState *tstate, PyObject *call
9524
10343
  return NULL;
9525
10344
  }
9526
10345
 
9527
- PyObject *pos_args = MAKE_TUPLE(args, 6);
10346
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 6);
9528
10347
 
9529
10348
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9530
10349
 
@@ -9695,7 +10514,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7_VECTORCALL(PyThreadState *tstate, PyObject *c
9695
10514
  return NULL;
9696
10515
  }
9697
10516
 
9698
- PyObject *pos_args = MAKE_TUPLE(args, 7);
10517
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
9699
10518
 
9700
10519
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9701
10520
 
@@ -9783,7 +10602,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS7_KWSPLIT(PyThreadState *tstate, PyObject *call
9783
10602
  return NULL;
9784
10603
  }
9785
10604
 
9786
- PyObject *pos_args = MAKE_TUPLE(args, 7);
10605
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 7);
9787
10606
 
9788
10607
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9789
10608
 
@@ -9954,7 +10773,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8_VECTORCALL(PyThreadState *tstate, PyObject *c
9954
10773
  return NULL;
9955
10774
  }
9956
10775
 
9957
- PyObject *pos_args = MAKE_TUPLE(args, 8);
10776
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
9958
10777
 
9959
10778
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
9960
10779
 
@@ -10042,7 +10861,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS8_KWSPLIT(PyThreadState *tstate, PyObject *call
10042
10861
  return NULL;
10043
10862
  }
10044
10863
 
10045
- PyObject *pos_args = MAKE_TUPLE(args, 8);
10864
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 8);
10046
10865
 
10047
10866
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
10048
10867
 
@@ -10213,7 +11032,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9_VECTORCALL(PyThreadState *tstate, PyObject *c
10213
11032
  return NULL;
10214
11033
  }
10215
11034
 
10216
- PyObject *pos_args = MAKE_TUPLE(args, 9);
11035
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
10217
11036
 
10218
11037
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
10219
11038
 
@@ -10301,7 +11120,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS9_KWSPLIT(PyThreadState *tstate, PyObject *call
10301
11120
  return NULL;
10302
11121
  }
10303
11122
 
10304
- PyObject *pos_args = MAKE_TUPLE(args, 9);
11123
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 9);
10305
11124
 
10306
11125
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
10307
11126
 
@@ -10472,7 +11291,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10_VECTORCALL(PyThreadState *tstate, PyObject *
10472
11291
  return NULL;
10473
11292
  }
10474
11293
 
10475
- PyObject *pos_args = MAKE_TUPLE(args, 10);
11294
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
10476
11295
 
10477
11296
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
10478
11297
 
@@ -10560,7 +11379,7 @@ PyObject *CALL_FUNCTION_WITH_ARGS10_KWSPLIT(PyThreadState *tstate, PyObject *cal
10560
11379
  return NULL;
10561
11380
  }
10562
11381
 
10563
- PyObject *pos_args = MAKE_TUPLE(args, 10);
11382
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 10);
10564
11383
 
10565
11384
  PyObject *named_args = _PyDict_NewPresized(nkwargs);
10566
11385
 
@@ -10718,7 +11537,7 @@ PyObject *CALL_METHODDESCR_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *call
10718
11537
  PyObject *result;
10719
11538
 
10720
11539
  #if PYTHON_VERSION < 0x360
10721
- PyObject *pos_args = MAKE_TUPLE(args + 1, 0);
11540
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 0);
10722
11541
 
10723
11542
  if (flags & METH_KEYWORDS) {
10724
11543
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
@@ -10729,19 +11548,19 @@ PyObject *CALL_METHODDESCR_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *call
10729
11548
  Py_DECREF(pos_args);
10730
11549
  #else
10731
11550
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
10732
- PyObject *pos_args = MAKE_TUPLE(args + 1, 0);
11551
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 0);
10733
11552
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
10734
11553
  Py_DECREF(pos_args);
10735
11554
  } else if (flags == METH_FASTCALL) {
10736
11555
  #if PYTHON_VERSION < 0x370
10737
11556
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args + 1, 0, NULL);
10738
11557
  #else
10739
- PyObject *pos_args = MAKE_TUPLE(args + 1, 0);
11558
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 0);
10740
11559
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 1);
10741
11560
  Py_DECREF(pos_args);
10742
11561
  #endif
10743
11562
  } else {
10744
- PyObject *pos_args = MAKE_TUPLE(args + 1, 0);
11563
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 0);
10745
11564
  result = (*method)(self, pos_args);
10746
11565
  Py_DECREF(pos_args);
10747
11566
  }
@@ -10760,7 +11579,7 @@ PyObject *CALL_METHODDESCR_WITH_SINGLE_ARG(PyThreadState *tstate, PyObject *call
10760
11579
  PRINT_NEW_LINE();
10761
11580
  #endif
10762
11581
 
10763
- PyObject *pos_args = MAKE_TUPLE(args, 1);
11582
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 1);
10764
11583
 
10765
11584
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
10766
11585
 
@@ -10820,7 +11639,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS2(PyThreadState *tstate, PyObject *called, P
10820
11639
  PyObject *result;
10821
11640
 
10822
11641
  #if PYTHON_VERSION < 0x360
10823
- PyObject *pos_args = MAKE_TUPLE(args + 1, 1);
11642
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 1);
10824
11643
 
10825
11644
  if (flags & METH_KEYWORDS) {
10826
11645
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
@@ -10831,19 +11650,19 @@ PyObject *CALL_METHODDESCR_WITH_ARGS2(PyThreadState *tstate, PyObject *called, P
10831
11650
  Py_DECREF(pos_args);
10832
11651
  #else
10833
11652
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
10834
- PyObject *pos_args = MAKE_TUPLE(args + 1, 1);
11653
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 1);
10835
11654
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
10836
11655
  Py_DECREF(pos_args);
10837
11656
  } else if (flags == METH_FASTCALL) {
10838
11657
  #if PYTHON_VERSION < 0x370
10839
11658
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args + 1, 1, NULL);
10840
11659
  #else
10841
- PyObject *pos_args = MAKE_TUPLE(args + 1, 1);
11660
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 1);
10842
11661
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 2);
10843
11662
  Py_DECREF(pos_args);
10844
11663
  #endif
10845
11664
  } else {
10846
- PyObject *pos_args = MAKE_TUPLE(args + 1, 1);
11665
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 1);
10847
11666
  result = (*method)(self, pos_args);
10848
11667
  Py_DECREF(pos_args);
10849
11668
  }
@@ -10862,7 +11681,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS2(PyThreadState *tstate, PyObject *called, P
10862
11681
  PRINT_NEW_LINE();
10863
11682
  #endif
10864
11683
 
10865
- PyObject *pos_args = MAKE_TUPLE(args, 2);
11684
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 2);
10866
11685
 
10867
11686
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
10868
11687
 
@@ -10915,7 +11734,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS3(PyThreadState *tstate, PyObject *called, P
10915
11734
  PyObject *result;
10916
11735
 
10917
11736
  #if PYTHON_VERSION < 0x360
10918
- PyObject *pos_args = MAKE_TUPLE(args + 1, 2);
11737
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 2);
10919
11738
 
10920
11739
  if (flags & METH_KEYWORDS) {
10921
11740
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
@@ -10926,19 +11745,19 @@ PyObject *CALL_METHODDESCR_WITH_ARGS3(PyThreadState *tstate, PyObject *called, P
10926
11745
  Py_DECREF(pos_args);
10927
11746
  #else
10928
11747
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
10929
- PyObject *pos_args = MAKE_TUPLE(args + 1, 2);
11748
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 2);
10930
11749
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
10931
11750
  Py_DECREF(pos_args);
10932
11751
  } else if (flags == METH_FASTCALL) {
10933
11752
  #if PYTHON_VERSION < 0x370
10934
11753
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args + 1, 2, NULL);
10935
11754
  #else
10936
- PyObject *pos_args = MAKE_TUPLE(args + 1, 2);
11755
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 2);
10937
11756
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 3);
10938
11757
  Py_DECREF(pos_args);
10939
11758
  #endif
10940
11759
  } else {
10941
- PyObject *pos_args = MAKE_TUPLE(args + 1, 2);
11760
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 2);
10942
11761
  result = (*method)(self, pos_args);
10943
11762
  Py_DECREF(pos_args);
10944
11763
  }
@@ -10957,7 +11776,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS3(PyThreadState *tstate, PyObject *called, P
10957
11776
  PRINT_NEW_LINE();
10958
11777
  #endif
10959
11778
 
10960
- PyObject *pos_args = MAKE_TUPLE(args, 3);
11779
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 3);
10961
11780
 
10962
11781
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
10963
11782
 
@@ -11010,7 +11829,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS4(PyThreadState *tstate, PyObject *called, P
11010
11829
  PyObject *result;
11011
11830
 
11012
11831
  #if PYTHON_VERSION < 0x360
11013
- PyObject *pos_args = MAKE_TUPLE(args + 1, 3);
11832
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 3);
11014
11833
 
11015
11834
  if (flags & METH_KEYWORDS) {
11016
11835
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
@@ -11021,19 +11840,19 @@ PyObject *CALL_METHODDESCR_WITH_ARGS4(PyThreadState *tstate, PyObject *called, P
11021
11840
  Py_DECREF(pos_args);
11022
11841
  #else
11023
11842
  if (flags == (METH_VARARGS | METH_KEYWORDS)) {
11024
- PyObject *pos_args = MAKE_TUPLE(args + 1, 3);
11843
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 3);
11025
11844
  result = (*(PyCFunctionWithKeywords)method)(self, pos_args, NULL);
11026
11845
  Py_DECREF(pos_args);
11027
11846
  } else if (flags == METH_FASTCALL) {
11028
11847
  #if PYTHON_VERSION < 0x370
11029
11848
  result = (*(_PyCFunctionFast)method)(self, (PyObject **)args + 1, 3, NULL);
11030
11849
  #else
11031
- PyObject *pos_args = MAKE_TUPLE(args + 1, 3);
11850
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 3);
11032
11851
  result = (*(_PyCFunctionFast)method)(self, &pos_args, 4);
11033
11852
  Py_DECREF(pos_args);
11034
11853
  #endif
11035
11854
  } else {
11036
- PyObject *pos_args = MAKE_TUPLE(args + 1, 3);
11855
+ PyObject *pos_args = MAKE_TUPLE(tstate, args + 1, 3);
11037
11856
  result = (*method)(self, pos_args);
11038
11857
  Py_DECREF(pos_args);
11039
11858
  }
@@ -11052,7 +11871,7 @@ PyObject *CALL_METHODDESCR_WITH_ARGS4(PyThreadState *tstate, PyObject *called, P
11052
11871
  PRINT_NEW_LINE();
11053
11872
  #endif
11054
11873
 
11055
- PyObject *pos_args = MAKE_TUPLE(args, 4);
11874
+ PyObject *pos_args = MAKE_TUPLE(tstate, args, 4);
11056
11875
 
11057
11876
  PyObject *result = CALL_FUNCTION(tstate, called, pos_args, NULL);
11058
11877