Nuitka-winsvc 2.7.7__cp313-cp313-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 (995) hide show
  1. nuitka/Builtins.py +259 -0
  2. nuitka/BytecodeCaching.py +184 -0
  3. nuitka/Bytecodes.py +109 -0
  4. nuitka/CacheCleanup.py +54 -0
  5. nuitka/Constants.py +425 -0
  6. nuitka/Errors.py +93 -0
  7. nuitka/HardImportRegistry.py +408 -0
  8. nuitka/MainControl.py +1201 -0
  9. nuitka/ModuleRegistry.py +364 -0
  10. nuitka/OptionParsing.py +2473 -0
  11. nuitka/Options.py +2948 -0
  12. nuitka/OutputDirectories.py +201 -0
  13. nuitka/PostProcessing.py +551 -0
  14. nuitka/Progress.py +252 -0
  15. nuitka/PythonFlavors.py +426 -0
  16. nuitka/PythonOperators.py +146 -0
  17. nuitka/PythonVersions.py +513 -0
  18. nuitka/Serialization.py +291 -0
  19. nuitka/SourceCodeReferences.py +176 -0
  20. nuitka/Tracing.py +579 -0
  21. nuitka/TreeXML.py +141 -0
  22. nuitka/Variables.py +515 -0
  23. nuitka/Version.py +88 -0
  24. nuitka/__init__.py +19 -0
  25. nuitka/__main__.py +224 -0
  26. nuitka/__past__.py +217 -0
  27. nuitka/build/Backend.scons +1111 -0
  28. nuitka/build/CCompilerVersion.scons +281 -0
  29. nuitka/build/DataComposerInterface.py +116 -0
  30. nuitka/build/Offsets.scons +626 -0
  31. nuitka/build/Onefile.scons +564 -0
  32. nuitka/build/SconsCaching.py +451 -0
  33. nuitka/build/SconsCompilerSettings.py +1133 -0
  34. nuitka/build/SconsHacks.py +215 -0
  35. nuitka/build/SconsInterface.py +664 -0
  36. nuitka/build/SconsProgress.py +100 -0
  37. nuitka/build/SconsSpawn.py +436 -0
  38. nuitka/build/SconsUtils.py +939 -0
  39. nuitka/build/__init__.py +19 -0
  40. nuitka/build/include/nuitka/allocator.h +450 -0
  41. nuitka/build/include/nuitka/builtins.h +97 -0
  42. nuitka/build/include/nuitka/calling.h +123 -0
  43. nuitka/build/include/nuitka/checkers.h +39 -0
  44. nuitka/build/include/nuitka/checksum_tools.h +28 -0
  45. nuitka/build/include/nuitka/compiled_asyncgen.h +281 -0
  46. nuitka/build/include/nuitka/compiled_cell.h +64 -0
  47. nuitka/build/include/nuitka/compiled_coroutine.h +271 -0
  48. nuitka/build/include/nuitka/compiled_frame.h +502 -0
  49. nuitka/build/include/nuitka/compiled_function.h +170 -0
  50. nuitka/build/include/nuitka/compiled_generator.h +287 -0
  51. nuitka/build/include/nuitka/compiled_method.h +54 -0
  52. nuitka/build/include/nuitka/constants.h +251 -0
  53. nuitka/build/include/nuitka/constants_blob.h +34 -0
  54. nuitka/build/include/nuitka/debug_settings.h +60 -0
  55. nuitka/build/include/nuitka/environment_variables.h +30 -0
  56. nuitka/build/include/nuitka/environment_variables_system.h +51 -0
  57. nuitka/build/include/nuitka/exception_groups.h +167 -0
  58. nuitka/build/include/nuitka/exceptions.h +1458 -0
  59. nuitka/build/include/nuitka/filesystem_paths.h +117 -0
  60. nuitka/build/include/nuitka/freelists.h +92 -0
  61. nuitka/build/include/nuitka/hedley.h +1774 -0
  62. nuitka/build/include/nuitka/helper/attributes.h +90 -0
  63. nuitka/build/include/nuitka/helper/boolean.h +86 -0
  64. nuitka/build/include/nuitka/helper/bytearrays.h +34 -0
  65. nuitka/build/include/nuitka/helper/bytes.h +28 -0
  66. nuitka/build/include/nuitka/helper/calling_generated.h +132 -0
  67. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
  68. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
  69. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
  70. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
  71. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
  72. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
  73. nuitka/build/include/nuitka/helper/comparisons_eq.h +247 -0
  74. nuitka/build/include/nuitka/helper/comparisons_ge.h +197 -0
  75. nuitka/build/include/nuitka/helper/comparisons_gt.h +197 -0
  76. nuitka/build/include/nuitka/helper/comparisons_le.h +247 -0
  77. nuitka/build/include/nuitka/helper/comparisons_lt.h +247 -0
  78. nuitka/build/include/nuitka/helper/comparisons_ne.h +197 -0
  79. nuitka/build/include/nuitka/helper/complex.h +46 -0
  80. nuitka/build/include/nuitka/helper/dictionaries.h +481 -0
  81. nuitka/build/include/nuitka/helper/floats.h +32 -0
  82. nuitka/build/include/nuitka/helper/import_hard.h +121 -0
  83. nuitka/build/include/nuitka/helper/indexes.h +47 -0
  84. nuitka/build/include/nuitka/helper/ints.h +165 -0
  85. nuitka/build/include/nuitka/helper/iterators.h +376 -0
  86. nuitka/build/include/nuitka/helper/lists.h +94 -0
  87. nuitka/build/include/nuitka/helper/lists_generated.h +36 -0
  88. nuitka/build/include/nuitka/helper/mappings.h +39 -0
  89. nuitka/build/include/nuitka/helper/operations.h +114 -0
  90. nuitka/build/include/nuitka/helper/operations_binary_add.h +240 -0
  91. nuitka/build/include/nuitka/helper/operations_binary_bitand.h +108 -0
  92. nuitka/build/include/nuitka/helper/operations_binary_bitor.h +108 -0
  93. nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +108 -0
  94. nuitka/build/include/nuitka/helper/operations_binary_divmod.h +103 -0
  95. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
  96. nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +103 -0
  97. nuitka/build/include/nuitka/helper/operations_binary_lshift.h +99 -0
  98. nuitka/build/include/nuitka/helper/operations_binary_matmult.h +60 -0
  99. nuitka/build/include/nuitka/helper/operations_binary_mod.h +304 -0
  100. nuitka/build/include/nuitka/helper/operations_binary_mult.h +247 -0
  101. nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +125 -0
  102. nuitka/build/include/nuitka/helper/operations_binary_pow.h +90 -0
  103. nuitka/build/include/nuitka/helper/operations_binary_rshift.h +99 -0
  104. nuitka/build/include/nuitka/helper/operations_binary_sub.h +117 -0
  105. nuitka/build/include/nuitka/helper/operations_binary_truediv.h +103 -0
  106. nuitka/build/include/nuitka/helper/operations_builtin_types.h +247 -0
  107. nuitka/build/include/nuitka/helper/operations_inplace_add.h +173 -0
  108. nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +76 -0
  109. nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +76 -0
  110. nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +76 -0
  111. nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +95 -0
  112. nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +62 -0
  113. nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +60 -0
  114. nuitka/build/include/nuitka/helper/operations_inplace_mod.h +218 -0
  115. nuitka/build/include/nuitka/helper/operations_inplace_mult.h +184 -0
  116. nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +115 -0
  117. nuitka/build/include/nuitka/helper/operations_inplace_pow.h +87 -0
  118. nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +62 -0
  119. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +102 -0
  120. nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +95 -0
  121. nuitka/build/include/nuitka/helper/raising.h +114 -0
  122. nuitka/build/include/nuitka/helper/rangeobjects.h +66 -0
  123. nuitka/build/include/nuitka/helper/richcomparisons.h +35 -0
  124. nuitka/build/include/nuitka/helper/sequences.h +33 -0
  125. nuitka/build/include/nuitka/helper/sets.h +25 -0
  126. nuitka/build/include/nuitka/helper/slices.h +314 -0
  127. nuitka/build/include/nuitka/helper/strings.h +30 -0
  128. nuitka/build/include/nuitka/helper/subscripts.h +390 -0
  129. nuitka/build/include/nuitka/helper/tuples.h +187 -0
  130. nuitka/build/include/nuitka/helpers.h +417 -0
  131. nuitka/build/include/nuitka/importing.h +149 -0
  132. nuitka/build/include/nuitka/incbin.h +402 -0
  133. nuitka/build/include/nuitka/jit_sources.h +25 -0
  134. nuitka/build/include/nuitka/prelude.h +626 -0
  135. nuitka/build/include/nuitka/printing.h +84 -0
  136. nuitka/build/include/nuitka/python_pgo.h +57 -0
  137. nuitka/build/include/nuitka/safe_string_ops.h +57 -0
  138. nuitka/build/include/nuitka/threading.h +142 -0
  139. nuitka/build/include/nuitka/tracing.h +82 -0
  140. nuitka/build/include/nuitka/type_aliases.h +30 -0
  141. nuitka/build/include/nuitka/unfreezing.h +91 -0
  142. nuitka/build/inline_copy/appdirs/LICENSE.txt +23 -0
  143. nuitka/build/inline_copy/appdirs/appdirs.py +611 -0
  144. nuitka/build/inline_copy/atomicwrites/LICENSE +19 -0
  145. nuitka/build/inline_copy/atomicwrites/atomicwrites.py +226 -0
  146. nuitka/build/inline_copy/bin/scons.py +58 -0
  147. nuitka/build/inline_copy/clcache/clcache/LICENSE +30 -0
  148. nuitka/build/inline_copy/clcache/clcache/__init__.py +4 -0
  149. nuitka/build/inline_copy/clcache/clcache/caching.py +2008 -0
  150. nuitka/build/inline_copy/colorama/LICENSE.txt +27 -0
  151. nuitka/build/inline_copy/colorama/colorama/__init__.py +6 -0
  152. nuitka/build/inline_copy/colorama/colorama/ansi.py +102 -0
  153. nuitka/build/inline_copy/colorama/colorama/ansitowin32.py +258 -0
  154. nuitka/build/inline_copy/colorama/colorama/initialise.py +80 -0
  155. nuitka/build/inline_copy/colorama/colorama/win32.py +152 -0
  156. nuitka/build/inline_copy/colorama/colorama/winterm.py +169 -0
  157. nuitka/build/inline_copy/glob2/LICENSE +27 -0
  158. nuitka/build/inline_copy/glob2/glob2/__init__.py +5 -0
  159. nuitka/build/inline_copy/glob2/glob2/compat.py +167 -0
  160. nuitka/build/inline_copy/glob2/glob2/fnmatch.py +141 -0
  161. nuitka/build/inline_copy/glob2/glob2/impl.py +216 -0
  162. nuitka/build/inline_copy/jinja2/LICENSE.rst +28 -0
  163. nuitka/build/inline_copy/jinja2/README.rst +2 -0
  164. nuitka/build/inline_copy/jinja2/jinja2/__init__.py +72 -0
  165. nuitka/build/inline_copy/jinja2/jinja2/_compat.py +105 -0
  166. nuitka/build/inline_copy/jinja2/jinja2/_identifier.py +2 -0
  167. nuitka/build/inline_copy/jinja2/jinja2/bccache.py +361 -0
  168. nuitka/build/inline_copy/jinja2/jinja2/compiler.py +1721 -0
  169. nuitka/build/inline_copy/jinja2/jinja2/constants.py +32 -0
  170. nuitka/build/inline_copy/jinja2/jinja2/debug.py +378 -0
  171. nuitka/build/inline_copy/jinja2/jinja2/defaults.py +56 -0
  172. nuitka/build/inline_copy/jinja2/jinja2/environment.py +1276 -0
  173. nuitka/build/inline_copy/jinja2/jinja2/exceptions.py +146 -0
  174. nuitka/build/inline_copy/jinja2/jinja2/ext.py +627 -0
  175. nuitka/build/inline_copy/jinja2/jinja2/filters.py +1190 -0
  176. nuitka/build/inline_copy/jinja2/jinja2/idtracking.py +286 -0
  177. nuitka/build/inline_copy/jinja2/jinja2/lexer.py +739 -0
  178. nuitka/build/inline_copy/jinja2/jinja2/loaders.py +483 -0
  179. nuitka/build/inline_copy/jinja2/jinja2/meta.py +106 -0
  180. nuitka/build/inline_copy/jinja2/jinja2/nativetypes.py +220 -0
  181. nuitka/build/inline_copy/jinja2/jinja2/nodes.py +999 -0
  182. nuitka/build/inline_copy/jinja2/jinja2/optimizer.py +49 -0
  183. nuitka/build/inline_copy/jinja2/jinja2/parser.py +903 -0
  184. nuitka/build/inline_copy/jinja2/jinja2/runtime.py +808 -0
  185. nuitka/build/inline_copy/jinja2/jinja2/sandbox.py +488 -0
  186. nuitka/build/inline_copy/jinja2/jinja2/tests.py +174 -0
  187. nuitka/build/inline_copy/jinja2/jinja2/utils.py +642 -0
  188. nuitka/build/inline_copy/jinja2/jinja2/visitor.py +87 -0
  189. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Action.py +1475 -0
  190. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Builder.py +905 -0
  191. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/CacheDir.py +314 -0
  192. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Conftest.py +805 -0
  193. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Debug.py +251 -0
  194. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Defaults.py +646 -0
  195. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Environment.py +2561 -0
  196. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/EnvironmentValues.py +119 -0
  197. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Errors.py +222 -0
  198. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Executor.py +660 -0
  199. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Job.py +439 -0
  200. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Memoize.py +242 -0
  201. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Alias.py +176 -0
  202. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/FS.py +3861 -0
  203. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Python.py +195 -0
  204. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/__init__.py +1784 -0
  205. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py +224 -0
  206. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/__init__.py +341 -0
  207. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/aix.py +81 -0
  208. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/cygwin.py +61 -0
  209. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/darwin.py +70 -0
  210. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/hpux.py +45 -0
  211. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/irix.py +41 -0
  212. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/mingw.py +33 -0
  213. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/os2.py +55 -0
  214. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/posix.py +124 -0
  215. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/sunos.py +47 -0
  216. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/virtualenv.py +115 -0
  217. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/win32.py +429 -0
  218. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConf.py +1119 -0
  219. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConsign.py +453 -0
  220. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/C.py +226 -0
  221. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Dir.py +131 -0
  222. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Prog.py +114 -0
  223. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/RC.py +57 -0
  224. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/__init__.py +436 -0
  225. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Interactive.py +372 -0
  226. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Main.py +1469 -0
  227. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConsOptions.py +1071 -0
  228. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConscript.py +686 -0
  229. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/__init__.py +425 -0
  230. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Subst.py +979 -0
  231. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Taskmaster.py +1062 -0
  232. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/386asm.py +61 -0
  233. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/GettextCommon.py +429 -0
  234. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/__init__.py +52 -0
  235. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/arch.py +66 -0
  236. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/common.py +371 -0
  237. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/netframework.py +83 -0
  238. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/sdk.py +411 -0
  239. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vc.py +994 -0
  240. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vs.py +608 -0
  241. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/PharLapCommon.py +116 -0
  242. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/__init__.py +882 -0
  243. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixc++.py +43 -0
  244. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcc.py +74 -0
  245. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcxx.py +77 -0
  246. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixlink.py +78 -0
  247. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/applelink.py +209 -0
  248. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ar.py +63 -0
  249. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/as.py +49 -0
  250. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/asm.py +78 -0
  251. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/bcc32.py +81 -0
  252. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/c++.py +44 -0
  253. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cc.py +105 -0
  254. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clang.py +91 -0
  255. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangCommon/__init__.py +18 -0
  256. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangxx.py +99 -0
  257. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cxx.py +95 -0
  258. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cyglink.py +212 -0
  259. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/default.py +50 -0
  260. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/filesystem.py +98 -0
  261. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/g++.py +45 -0
  262. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gas.py +56 -0
  263. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gcc.py +110 -0
  264. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gettext_tool.py +69 -0
  265. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gnulink.py +70 -0
  266. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gxx.py +78 -0
  267. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpc++.py +45 -0
  268. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcc.py +53 -0
  269. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcxx.py +88 -0
  270. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hplink.py +72 -0
  271. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icc.py +59 -0
  272. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icl.py +52 -0
  273. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink.py +55 -0
  274. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink32.py +60 -0
  275. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/install.py +510 -0
  276. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/intelc.py +617 -0
  277. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/link.py +72 -0
  278. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/LoadableModule.py +131 -0
  279. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/SharedLibrary.py +218 -0
  280. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/__init__.py +171 -0
  281. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkloc.py +112 -0
  282. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/m4.py +63 -0
  283. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/masm.py +77 -0
  284. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mingw.py +232 -0
  285. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgfmt.py +132 -0
  286. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msginit.py +137 -0
  287. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgmerge.py +125 -0
  288. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslib.py +73 -0
  289. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslink.py +339 -0
  290. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mssdk.py +50 -0
  291. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvc.py +325 -0
  292. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvs.py +2116 -0
  293. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwcc.py +207 -0
  294. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwld.py +108 -0
  295. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/nasm.py +72 -0
  296. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rmic.py +139 -0
  297. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rpcgen.py +70 -0
  298. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgiar.py +68 -0
  299. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgic++.py +43 -0
  300. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicc.py +53 -0
  301. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicxx.py +61 -0
  302. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgilink.py +59 -0
  303. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunar.py +64 -0
  304. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunc++.py +45 -0
  305. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncc.py +58 -0
  306. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncxx.py +153 -0
  307. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunlink.py +79 -0
  308. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tar.py +73 -0
  309. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/textfile.py +198 -0
  310. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tlib.py +53 -0
  311. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/wix.py +104 -0
  312. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/xgettext.py +337 -0
  313. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/zip.py +120 -0
  314. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Util.py +2134 -0
  315. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/ConfigureCache.py +171 -0
  316. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/__init__.py +0 -0
  317. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/sconsign.py +494 -0
  318. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/BoolVariable.py +96 -0
  319. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/EnumVariable.py +110 -0
  320. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +152 -0
  321. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PackageVariable.py +107 -0
  322. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PathVariable.py +158 -0
  323. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/__init__.py +334 -0
  324. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Warnings.py +238 -0
  325. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/__init__.py +9 -0
  326. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/__init__.py +104 -0
  327. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/_scons_dbm.py +42 -0
  328. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/win32.py +101 -0
  329. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/cpp.py +640 -0
  330. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/dblite.py +295 -0
  331. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/exitfuncs.py +59 -0
  332. nuitka/build/inline_copy/markupsafe/LICENSE.rst +28 -0
  333. nuitka/build/inline_copy/markupsafe/markupsafe/__init__.py +327 -0
  334. nuitka/build/inline_copy/markupsafe/markupsafe/_compat.py +33 -0
  335. nuitka/build/inline_copy/markupsafe/markupsafe/_constants.py +264 -0
  336. nuitka/build/inline_copy/markupsafe/markupsafe/_native.py +69 -0
  337. nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
  338. nuitka/build/inline_copy/pefile/ordlookup/__init__.py +41 -0
  339. nuitka/build/inline_copy/pefile/ordlookup/oleaut32.py +400 -0
  340. nuitka/build/inline_copy/pefile/ordlookup/ws2_32.py +120 -0
  341. nuitka/build/inline_copy/pefile/pefile.py +8034 -0
  342. nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +3272 -0
  343. nuitka/build/inline_copy/pkg_resources/pkg_resources/py31compat.py +21 -0
  344. nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
  345. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
  346. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
  347. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
  348. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
  349. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
  350. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
  351. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
  352. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
  353. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
  354. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
  355. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
  356. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
  357. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
  358. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
  359. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
  360. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
  361. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
  362. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
  363. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
  364. nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
  365. nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
  366. nuitka/build/inline_copy/stubgen/six.py +998 -0
  367. nuitka/build/inline_copy/stubgen/stubgen.py +484 -0
  368. nuitka/build/inline_copy/tqdm/tqdm/__init__.py +40 -0
  369. nuitka/build/inline_copy/tqdm/tqdm/_main.py +9 -0
  370. nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +97 -0
  371. nuitka/build/inline_copy/tqdm/tqdm/_tqdm.py +9 -0
  372. nuitka/build/inline_copy/tqdm/tqdm/_tqdm_notebook.py +9 -0
  373. nuitka/build/inline_copy/tqdm/tqdm/_tqdm_pandas.py +24 -0
  374. nuitka/build/inline_copy/tqdm/tqdm/_utils.py +12 -0
  375. nuitka/build/inline_copy/tqdm/tqdm/auto.py +44 -0
  376. nuitka/build/inline_copy/tqdm/tqdm/autonotebook.py +28 -0
  377. nuitka/build/inline_copy/tqdm/tqdm/dask.py +46 -0
  378. nuitka/build/inline_copy/tqdm/tqdm/notebook.py +316 -0
  379. nuitka/build/inline_copy/tqdm/tqdm/std.py +1524 -0
  380. nuitka/build/inline_copy/tqdm/tqdm/tk.py +207 -0
  381. nuitka/build/inline_copy/tqdm/tqdm/utils.py +351 -0
  382. nuitka/build/inline_copy/tqdm/tqdm/version.py +2 -0
  383. nuitka/build/inline_copy/yaml/LICENSE +20 -0
  384. nuitka/build/inline_copy/yaml/yaml/__init__.py +427 -0
  385. nuitka/build/inline_copy/yaml/yaml/composer.py +139 -0
  386. nuitka/build/inline_copy/yaml/yaml/constructor.py +748 -0
  387. nuitka/build/inline_copy/yaml/yaml/cyaml.py +101 -0
  388. nuitka/build/inline_copy/yaml/yaml/dumper.py +62 -0
  389. nuitka/build/inline_copy/yaml/yaml/emitter.py +1137 -0
  390. nuitka/build/inline_copy/yaml/yaml/error.py +75 -0
  391. nuitka/build/inline_copy/yaml/yaml/events.py +86 -0
  392. nuitka/build/inline_copy/yaml/yaml/loader.py +63 -0
  393. nuitka/build/inline_copy/yaml/yaml/nodes.py +49 -0
  394. nuitka/build/inline_copy/yaml/yaml/parser.py +589 -0
  395. nuitka/build/inline_copy/yaml/yaml/reader.py +185 -0
  396. nuitka/build/inline_copy/yaml/yaml/representer.py +389 -0
  397. nuitka/build/inline_copy/yaml/yaml/resolver.py +227 -0
  398. nuitka/build/inline_copy/yaml/yaml/scanner.py +1435 -0
  399. nuitka/build/inline_copy/yaml/yaml/serializer.py +111 -0
  400. nuitka/build/inline_copy/yaml/yaml/tokens.py +104 -0
  401. nuitka/build/inline_copy/zlib/LICENSE +22 -0
  402. nuitka/build/inline_copy/zlib/crc32.c +1049 -0
  403. nuitka/build/inline_copy/zlib/crc32.h +9446 -0
  404. nuitka/build/inline_copy/zlib/zconf.h +551 -0
  405. nuitka/build/inline_copy/zlib/zlib.h +1938 -0
  406. nuitka/build/inline_copy/zlib/zutil.h +275 -0
  407. nuitka/build/inline_copy/zstd/LICENSE.txt +30 -0
  408. nuitka/build/inline_copy/zstd/common/bitstream.h +463 -0
  409. nuitka/build/inline_copy/zstd/common/compiler.h +288 -0
  410. nuitka/build/inline_copy/zstd/common/cpu.h +213 -0
  411. nuitka/build/inline_copy/zstd/common/debug.h +107 -0
  412. nuitka/build/inline_copy/zstd/common/entropy_common.c +360 -0
  413. nuitka/build/inline_copy/zstd/common/error_private.c +56 -0
  414. nuitka/build/inline_copy/zstd/common/error_private.h +80 -0
  415. nuitka/build/inline_copy/zstd/common/fse.h +715 -0
  416. nuitka/build/inline_copy/zstd/common/fse_decompress.c +393 -0
  417. nuitka/build/inline_copy/zstd/common/huf.h +361 -0
  418. nuitka/build/inline_copy/zstd/common/mem.h +426 -0
  419. nuitka/build/inline_copy/zstd/common/xxhash.c +826 -0
  420. nuitka/build/inline_copy/zstd/common/xxhash.h +285 -0
  421. nuitka/build/inline_copy/zstd/common/zstd_common.c +83 -0
  422. nuitka/build/inline_copy/zstd/common/zstd_deps.h +111 -0
  423. nuitka/build/inline_copy/zstd/common/zstd_errors.h +95 -0
  424. nuitka/build/inline_copy/zstd/common/zstd_internal.h +478 -0
  425. nuitka/build/inline_copy/zstd/decompress/huf_decompress.c +1350 -0
  426. nuitka/build/inline_copy/zstd/decompress/zstd_ddict.c +244 -0
  427. nuitka/build/inline_copy/zstd/decompress/zstd_ddict.h +44 -0
  428. nuitka/build/inline_copy/zstd/decompress/zstd_decompress.c +1930 -0
  429. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.c +1540 -0
  430. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.h +62 -0
  431. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_internal.h +190 -0
  432. nuitka/build/inline_copy/zstd/zstd.h +2391 -0
  433. nuitka/build/static_src/CompiledAsyncgenType.c +2211 -0
  434. nuitka/build/static_src/CompiledCellType.c +300 -0
  435. nuitka/build/static_src/CompiledCodeHelpers.c +2160 -0
  436. nuitka/build/static_src/CompiledCoroutineType.c +1946 -0
  437. nuitka/build/static_src/CompiledFrameType.c +1337 -0
  438. nuitka/build/static_src/CompiledFunctionType.c +3320 -0
  439. nuitka/build/static_src/CompiledGeneratorType.c +1997 -0
  440. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2117 -0
  441. nuitka/build/static_src/CompiledMethodType.c +614 -0
  442. nuitka/build/static_src/GenerateHeadersMain.c +30 -0
  443. nuitka/build/static_src/HelpersAllocator.c +939 -0
  444. nuitka/build/static_src/HelpersAttributes.c +1241 -0
  445. nuitka/build/static_src/HelpersBuiltin.c +901 -0
  446. nuitka/build/static_src/HelpersBuiltinTypeMethods.c +3594 -0
  447. nuitka/build/static_src/HelpersBytes.c +107 -0
  448. nuitka/build/static_src/HelpersCalling.c +397 -0
  449. nuitka/build/static_src/HelpersCallingGenerated.c +14361 -0
  450. nuitka/build/static_src/HelpersChecksumTools.c +59 -0
  451. nuitka/build/static_src/HelpersClasses.c +91 -0
  452. nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
  453. nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
  454. nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
  455. nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
  456. nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
  457. nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
  458. nuitka/build/static_src/HelpersComparisonEq.c +12070 -0
  459. nuitka/build/static_src/HelpersComparisonEqUtils.c +169 -0
  460. nuitka/build/static_src/HelpersComparisonGe.c +11871 -0
  461. nuitka/build/static_src/HelpersComparisonGt.c +11855 -0
  462. nuitka/build/static_src/HelpersComparisonLe.c +11957 -0
  463. nuitka/build/static_src/HelpersComparisonLt.c +11941 -0
  464. nuitka/build/static_src/HelpersComparisonNe.c +11979 -0
  465. nuitka/build/static_src/HelpersConsole.c +124 -0
  466. nuitka/build/static_src/HelpersConstantsBlob.c +1487 -0
  467. nuitka/build/static_src/HelpersDeepcopy.c +636 -0
  468. nuitka/build/static_src/HelpersDictionaries.c +1739 -0
  469. nuitka/build/static_src/HelpersDictionariesGenerated.c +738 -0
  470. nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
  471. nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
  472. nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +97 -0
  473. nuitka/build/static_src/HelpersExceptions.c +298 -0
  474. nuitka/build/static_src/HelpersFiles.c +353 -0
  475. nuitka/build/static_src/HelpersFilesystemPaths.c +1322 -0
  476. nuitka/build/static_src/HelpersFloats.c +92 -0
  477. nuitka/build/static_src/HelpersHeapStorage.c +68 -0
  478. nuitka/build/static_src/HelpersImport.c +506 -0
  479. nuitka/build/static_src/HelpersImportHard.c +526 -0
  480. nuitka/build/static_src/HelpersJitSources.c +48 -0
  481. nuitka/build/static_src/HelpersLists.c +899 -0
  482. nuitka/build/static_src/HelpersListsGenerated.c +564 -0
  483. nuitka/build/static_src/HelpersMappings.c +46 -0
  484. nuitka/build/static_src/HelpersMatching.c +192 -0
  485. nuitka/build/static_src/HelpersOperationBinaryAdd.c +6477 -0
  486. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +703 -0
  487. nuitka/build/static_src/HelpersOperationBinaryBitand.c +2738 -0
  488. nuitka/build/static_src/HelpersOperationBinaryBitor.c +2738 -0
  489. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +2738 -0
  490. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +2406 -0
  491. nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +33 -0
  492. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
  493. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +2422 -0
  494. nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +220 -0
  495. nuitka/build/static_src/HelpersOperationBinaryLshift.c +2846 -0
  496. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +453 -0
  497. nuitka/build/static_src/HelpersOperationBinaryMod.c +6549 -0
  498. nuitka/build/static_src/HelpersOperationBinaryMult.c +6438 -0
  499. nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +125 -0
  500. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +2355 -0
  501. nuitka/build/static_src/HelpersOperationBinaryPow.c +2743 -0
  502. nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +26 -0
  503. nuitka/build/static_src/HelpersOperationBinaryRshift.c +2706 -0
  504. nuitka/build/static_src/HelpersOperationBinarySub.c +2649 -0
  505. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +2415 -0
  506. nuitka/build/static_src/HelpersOperationInplaceAdd.c +5211 -0
  507. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +144 -0
  508. nuitka/build/static_src/HelpersOperationInplaceBitand.c +1826 -0
  509. nuitka/build/static_src/HelpersOperationInplaceBitor.c +1826 -0
  510. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1826 -0
  511. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +2605 -0
  512. nuitka/build/static_src/HelpersOperationInplaceLshift.c +1594 -0
  513. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +603 -0
  514. nuitka/build/static_src/HelpersOperationInplaceMod.c +4762 -0
  515. nuitka/build/static_src/HelpersOperationInplaceMult.c +4689 -0
  516. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +2553 -0
  517. nuitka/build/static_src/HelpersOperationInplacePow.c +2807 -0
  518. nuitka/build/static_src/HelpersOperationInplaceRshift.c +1534 -0
  519. nuitka/build/static_src/HelpersOperationInplaceSub.c +2894 -0
  520. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +2612 -0
  521. nuitka/build/static_src/HelpersProfiling.c +104 -0
  522. nuitka/build/static_src/HelpersPythonPgo.c +113 -0
  523. nuitka/build/static_src/HelpersRaising.c +447 -0
  524. nuitka/build/static_src/HelpersSafeStrings.c +185 -0
  525. nuitka/build/static_src/HelpersSequences.c +134 -0
  526. nuitka/build/static_src/HelpersSlices.c +73 -0
  527. nuitka/build/static_src/HelpersStrings.c +998 -0
  528. nuitka/build/static_src/HelpersTuples.c +148 -0
  529. nuitka/build/static_src/HelpersTypes.c +329 -0
  530. nuitka/build/static_src/InspectPatcher.c +439 -0
  531. nuitka/build/static_src/MainProgram.c +2060 -0
  532. nuitka/build/static_src/MetaPathBasedLoader.c +2290 -0
  533. nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +125 -0
  534. nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +158 -0
  535. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +785 -0
  536. nuitka/build/static_src/OnefileBootstrap.c +1580 -0
  537. nuitka/build/static_src/OnefileSplashScreen.cpp +275 -0
  538. nuitka/code_generation/AsyncgenCodes.py +186 -0
  539. nuitka/code_generation/AttributeCodes.py +357 -0
  540. nuitka/code_generation/BinaryOperationHelperDefinitions.py +720 -0
  541. nuitka/code_generation/BranchCodes.py +67 -0
  542. nuitka/code_generation/BuiltinCodes.py +529 -0
  543. nuitka/code_generation/CallCodes.py +1186 -0
  544. nuitka/code_generation/ClassCodes.py +156 -0
  545. nuitka/code_generation/CodeGeneration.py +1078 -0
  546. nuitka/code_generation/CodeHelperSelection.py +81 -0
  547. nuitka/code_generation/CodeHelpers.py +455 -0
  548. nuitka/code_generation/CodeObjectCodes.py +165 -0
  549. nuitka/code_generation/ComparisonCodes.py +569 -0
  550. nuitka/code_generation/ComparisonHelperDefinitions.py +146 -0
  551. nuitka/code_generation/ConditionalCodes.py +236 -0
  552. nuitka/code_generation/ConstantCodes.py +243 -0
  553. nuitka/code_generation/Contexts.py +1248 -0
  554. nuitka/code_generation/CoroutineCodes.py +253 -0
  555. nuitka/code_generation/CtypesCodes.py +46 -0
  556. nuitka/code_generation/DictCodes.py +918 -0
  557. nuitka/code_generation/Emission.py +75 -0
  558. nuitka/code_generation/ErrorCodes.py +281 -0
  559. nuitka/code_generation/EvalCodes.py +444 -0
  560. nuitka/code_generation/ExceptionCodes.py +337 -0
  561. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +227 -0
  562. nuitka/code_generation/ExpressionCodes.py +61 -0
  563. nuitka/code_generation/FrameCodes.py +518 -0
  564. nuitka/code_generation/FunctionCodes.py +858 -0
  565. nuitka/code_generation/GeneratorCodes.py +218 -0
  566. nuitka/code_generation/GlobalConstants.py +249 -0
  567. nuitka/code_generation/GlobalsLocalsCodes.py +211 -0
  568. nuitka/code_generation/IdCodes.py +53 -0
  569. nuitka/code_generation/ImportCodes.py +468 -0
  570. nuitka/code_generation/Indentation.py +45 -0
  571. nuitka/code_generation/IndexCodes.py +50 -0
  572. nuitka/code_generation/InjectCCodes.py +28 -0
  573. nuitka/code_generation/IntegerCodes.py +110 -0
  574. nuitka/code_generation/IteratorCodes.py +378 -0
  575. nuitka/code_generation/JitCodes.py +44 -0
  576. nuitka/code_generation/LabelCodes.py +68 -0
  577. nuitka/code_generation/LineNumberCodes.py +91 -0
  578. nuitka/code_generation/ListCodes.py +502 -0
  579. nuitka/code_generation/LoaderCodes.py +193 -0
  580. nuitka/code_generation/LocalsDictCodes.py +359 -0
  581. nuitka/code_generation/LoopCodes.py +88 -0
  582. nuitka/code_generation/MatchCodes.py +67 -0
  583. nuitka/code_generation/ModuleCodes.py +247 -0
  584. nuitka/code_generation/Namify.py +260 -0
  585. nuitka/code_generation/NetworkxCodes.py +51 -0
  586. nuitka/code_generation/OperationCodes.py +398 -0
  587. nuitka/code_generation/PackageResourceCodes.py +986 -0
  588. nuitka/code_generation/PrintCodes.py +93 -0
  589. nuitka/code_generation/PythonAPICodes.py +215 -0
  590. nuitka/code_generation/RaisingCodes.py +481 -0
  591. nuitka/code_generation/Reports.py +115 -0
  592. nuitka/code_generation/ReturnCodes.py +143 -0
  593. nuitka/code_generation/SetCodes.py +196 -0
  594. nuitka/code_generation/SliceCodes.py +465 -0
  595. nuitka/code_generation/StringCodes.py +303 -0
  596. nuitka/code_generation/SubscriptCodes.py +263 -0
  597. nuitka/code_generation/TensorflowCodes.py +54 -0
  598. nuitka/code_generation/TryCodes.py +326 -0
  599. nuitka/code_generation/TupleCodes.py +115 -0
  600. nuitka/code_generation/TypeAliasCodes.py +120 -0
  601. nuitka/code_generation/VariableCodes.py +519 -0
  602. nuitka/code_generation/VariableDeclarations.py +279 -0
  603. nuitka/code_generation/YieldCodes.py +253 -0
  604. nuitka/code_generation/__init__.py +19 -0
  605. nuitka/code_generation/c_types/CTypeBases.py +177 -0
  606. nuitka/code_generation/c_types/CTypeBooleans.py +104 -0
  607. nuitka/code_generation/c_types/CTypeCFloats.py +57 -0
  608. nuitka/code_generation/c_types/CTypeCLongs.py +45 -0
  609. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +109 -0
  610. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +150 -0
  611. nuitka/code_generation/c_types/CTypeNuitkaInts.py +200 -0
  612. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +107 -0
  613. nuitka/code_generation/c_types/CTypePyObjectPointers.py +572 -0
  614. nuitka/code_generation/c_types/CTypeVoids.py +92 -0
  615. nuitka/code_generation/c_types/__init__.py +19 -0
  616. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +106 -0
  617. nuitka/code_generation/templates/CodeTemplatesConstants.py +296 -0
  618. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +109 -0
  619. nuitka/code_generation/templates/CodeTemplatesExceptions.py +84 -0
  620. nuitka/code_generation/templates/CodeTemplatesFrames.py +235 -0
  621. nuitka/code_generation/templates/CodeTemplatesFunction.py +117 -0
  622. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +130 -0
  623. nuitka/code_generation/templates/CodeTemplatesIterators.py +40 -0
  624. nuitka/code_generation/templates/CodeTemplatesLoader.py +180 -0
  625. nuitka/code_generation/templates/CodeTemplatesModules.py +710 -0
  626. nuitka/code_generation/templates/CodeTemplatesVariables.py +388 -0
  627. nuitka/code_generation/templates/TemplateDebugWrapper.py +80 -0
  628. nuitka/code_generation/templates/__init__.py +19 -0
  629. nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +321 -0
  630. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +143 -0
  631. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +677 -0
  632. nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +165 -0
  633. nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +38 -0
  634. nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +41 -0
  635. nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +53 -0
  636. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +364 -0
  637. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +37 -0
  638. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +53 -0
  639. nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +20 -0
  640. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +148 -0
  641. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
  642. nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +352 -0
  643. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +115 -0
  644. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
  645. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +31 -0
  646. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +32 -0
  647. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +112 -0
  648. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +157 -0
  649. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +115 -0
  650. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +99 -0
  651. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +115 -0
  652. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +281 -0
  653. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +420 -0
  654. nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +51 -0
  655. nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +71 -0
  656. nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +327 -0
  657. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +411 -0
  658. nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +59 -0
  659. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +229 -0
  660. nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +47 -0
  661. nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +55 -0
  662. nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +58 -0
  663. nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +62 -0
  664. nuitka/containers/Namedtuples.py +51 -0
  665. nuitka/containers/OrderedDicts.py +191 -0
  666. nuitka/containers/OrderedSets.py +123 -0
  667. nuitka/containers/OrderedSetsFallback.py +139 -0
  668. nuitka/containers/__init__.py +19 -0
  669. nuitka/distutils/Build.py +76 -0
  670. nuitka/distutils/DistutilCommands.py +438 -0
  671. nuitka/distutils/__init__.py +19 -0
  672. nuitka/finalizations/Finalization.py +35 -0
  673. nuitka/finalizations/FinalizeMarkups.py +136 -0
  674. nuitka/finalizations/__init__.py +19 -0
  675. nuitka/freezer/DependsExe.py +257 -0
  676. nuitka/freezer/DllDependenciesCommon.py +97 -0
  677. nuitka/freezer/DllDependenciesMacOS.py +444 -0
  678. nuitka/freezer/DllDependenciesPosix.py +242 -0
  679. nuitka/freezer/DllDependenciesWin32.py +315 -0
  680. nuitka/freezer/ImportDetection.py +359 -0
  681. nuitka/freezer/IncludedDataFiles.py +689 -0
  682. nuitka/freezer/IncludedEntryPoints.py +376 -0
  683. nuitka/freezer/Onefile.py +296 -0
  684. nuitka/freezer/Standalone.py +520 -0
  685. nuitka/freezer/__init__.py +19 -0
  686. nuitka/importing/IgnoreListing.py +449 -0
  687. nuitka/importing/ImportCache.py +95 -0
  688. nuitka/importing/ImportResolving.py +186 -0
  689. nuitka/importing/Importing.py +1200 -0
  690. nuitka/importing/PreloadedPackages.py +164 -0
  691. nuitka/importing/Recursion.py +611 -0
  692. nuitka/importing/StandardLibrary.py +429 -0
  693. nuitka/importing/__init__.py +19 -0
  694. nuitka/nodes/AsyncgenNodes.py +107 -0
  695. nuitka/nodes/AttributeLookupNodes.py +124 -0
  696. nuitka/nodes/AttributeNodes.py +386 -0
  697. nuitka/nodes/AttributeNodesGenerated.py +10734 -0
  698. nuitka/nodes/BuiltinAllNodes.py +115 -0
  699. nuitka/nodes/BuiltinAnyNodes.py +124 -0
  700. nuitka/nodes/BuiltinComplexNodes.py +83 -0
  701. nuitka/nodes/BuiltinDecodingNodes.py +52 -0
  702. nuitka/nodes/BuiltinDecoratorNodes.py +85 -0
  703. nuitka/nodes/BuiltinDictNodes.py +140 -0
  704. nuitka/nodes/BuiltinFormatNodes.py +159 -0
  705. nuitka/nodes/BuiltinHashNodes.py +63 -0
  706. nuitka/nodes/BuiltinInputNodes.py +39 -0
  707. nuitka/nodes/BuiltinIntegerNodes.py +170 -0
  708. nuitka/nodes/BuiltinIteratorNodes.py +391 -0
  709. nuitka/nodes/BuiltinLenNodes.py +61 -0
  710. nuitka/nodes/BuiltinNextNodes.py +111 -0
  711. nuitka/nodes/BuiltinOpenNodes.py +148 -0
  712. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +7367 -0
  713. nuitka/nodes/BuiltinRangeNodes.py +690 -0
  714. nuitka/nodes/BuiltinRefNodes.py +314 -0
  715. nuitka/nodes/BuiltinSumNodes.py +104 -0
  716. nuitka/nodes/BuiltinTypeNodes.py +454 -0
  717. nuitka/nodes/BuiltinVarsNodes.py +44 -0
  718. nuitka/nodes/BytesNodes.py +829 -0
  719. nuitka/nodes/CallNodes.py +217 -0
  720. nuitka/nodes/Checkers.py +55 -0
  721. nuitka/nodes/ChildrenHavingMixins.py +21576 -0
  722. nuitka/nodes/ClassNodes.py +286 -0
  723. nuitka/nodes/CodeObjectSpecs.py +230 -0
  724. nuitka/nodes/ComparisonNodes.py +687 -0
  725. nuitka/nodes/ConditionalNodes.py +884 -0
  726. nuitka/nodes/ConstantRefNodes.py +1717 -0
  727. nuitka/nodes/ContainerMakingNodes.py +408 -0
  728. nuitka/nodes/ContainerOperationNodes.py +87 -0
  729. nuitka/nodes/CoroutineNodes.py +144 -0
  730. nuitka/nodes/CtypesNodes.py +51 -0
  731. nuitka/nodes/DictionaryNodes.py +1513 -0
  732. nuitka/nodes/ExceptionNodes.py +393 -0
  733. nuitka/nodes/ExecEvalNodes.py +229 -0
  734. nuitka/nodes/ExpressionBases.py +1301 -0
  735. nuitka/nodes/ExpressionBasesGenerated.py +2103 -0
  736. nuitka/nodes/ExpressionShapeMixins.py +886 -0
  737. nuitka/nodes/FrameNodes.py +413 -0
  738. nuitka/nodes/FunctionAttributeNodes.py +102 -0
  739. nuitka/nodes/FunctionNodes.py +1303 -0
  740. nuitka/nodes/FutureSpecs.py +224 -0
  741. nuitka/nodes/GeneratorNodes.py +201 -0
  742. nuitka/nodes/GlobalsLocalsNodes.py +209 -0
  743. nuitka/nodes/HardImportNodesGenerated.py +3599 -0
  744. nuitka/nodes/ImportHardNodes.py +185 -0
  745. nuitka/nodes/ImportNodes.py +1366 -0
  746. nuitka/nodes/IndicatorMixins.py +79 -0
  747. nuitka/nodes/InjectCNodes.py +51 -0
  748. nuitka/nodes/IterationHandles.py +407 -0
  749. nuitka/nodes/KeyValuePairNodes.py +378 -0
  750. nuitka/nodes/ListOperationNodes.py +525 -0
  751. nuitka/nodes/LocalsDictNodes.py +717 -0
  752. nuitka/nodes/LocalsScopes.py +505 -0
  753. nuitka/nodes/LoopNodes.py +445 -0
  754. nuitka/nodes/MatchNodes.py +60 -0
  755. nuitka/nodes/ModuleAttributeNodes.py +180 -0
  756. nuitka/nodes/ModuleNodes.py +1137 -0
  757. nuitka/nodes/NetworkxNodes.py +45 -0
  758. nuitka/nodes/NodeBases.py +890 -0
  759. nuitka/nodes/NodeMakingHelpers.py +481 -0
  760. nuitka/nodes/NodeMetaClasses.py +172 -0
  761. nuitka/nodes/OperatorNodes.py +944 -0
  762. nuitka/nodes/OperatorNodesUnary.py +403 -0
  763. nuitka/nodes/OsSysNodes.py +215 -0
  764. nuitka/nodes/OutlineNodes.py +372 -0
  765. nuitka/nodes/PackageMetadataNodes.py +982 -0
  766. nuitka/nodes/PackageResourceNodes.py +424 -0
  767. nuitka/nodes/PrintNodes.py +105 -0
  768. nuitka/nodes/ReturnNodes.py +255 -0
  769. nuitka/nodes/SideEffectNodes.py +139 -0
  770. nuitka/nodes/SliceNodes.py +386 -0
  771. nuitka/nodes/StatementBasesGenerated.py +3419 -0
  772. nuitka/nodes/StatementNodes.py +316 -0
  773. nuitka/nodes/StrNodes.py +919 -0
  774. nuitka/nodes/StringConcatenationNodes.py +103 -0
  775. nuitka/nodes/SubscriptNodes.py +245 -0
  776. nuitka/nodes/TensorflowNodes.py +38 -0
  777. nuitka/nodes/TryNodes.py +519 -0
  778. nuitka/nodes/TypeMatchNodes.py +65 -0
  779. nuitka/nodes/TypeNodes.py +390 -0
  780. nuitka/nodes/VariableAssignNodes.py +1177 -0
  781. nuitka/nodes/VariableDelNodes.py +320 -0
  782. nuitka/nodes/VariableNameNodes.py +153 -0
  783. nuitka/nodes/VariableRefNodes.py +895 -0
  784. nuitka/nodes/VariableReleaseNodes.py +153 -0
  785. nuitka/nodes/YieldNodes.py +121 -0
  786. nuitka/nodes/__init__.py +19 -0
  787. nuitka/nodes/shapes/BuiltinTypeShapes.py +4290 -0
  788. nuitka/nodes/shapes/ControlFlowDescriptions.py +199 -0
  789. nuitka/nodes/shapes/IteratorShapes.py +71 -0
  790. nuitka/nodes/shapes/ShapeMixins.py +255 -0
  791. nuitka/nodes/shapes/StandardShapes.py +1384 -0
  792. nuitka/nodes/shapes/__init__.py +19 -0
  793. nuitka/optimizations/BytecodeDemotion.py +105 -0
  794. nuitka/optimizations/FunctionInlining.py +110 -0
  795. nuitka/optimizations/Graphs.py +70 -0
  796. nuitka/optimizations/Optimization.py +363 -0
  797. nuitka/optimizations/OptimizeBuiltinCalls.py +1582 -0
  798. nuitka/optimizations/Tags.py +76 -0
  799. nuitka/optimizations/TraceCollections.py +1257 -0
  800. nuitka/optimizations/ValueTraces.py +980 -0
  801. nuitka/optimizations/__init__.py +19 -0
  802. nuitka/pgo/PGO.py +160 -0
  803. nuitka/pgo/__init__.py +19 -0
  804. nuitka/plugins/PluginBase.py +1924 -0
  805. nuitka/plugins/Plugins.py +2007 -0
  806. nuitka/plugins/YamlPluginBase.py +121 -0
  807. nuitka/plugins/__init__.py +19 -0
  808. nuitka/plugins/standard/AntiBloatPlugin.py +1024 -0
  809. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +95 -0
  810. nuitka/plugins/standard/DataFilesPlugin.py +311 -0
  811. nuitka/plugins/standard/DelvewheelPlugin.py +150 -0
  812. nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
  813. nuitka/plugins/standard/DillPlugin/cloudpickle-postLoad.py +67 -0
  814. nuitka/plugins/standard/DillPlugin/dill-postLoad.py +223 -0
  815. nuitka/plugins/standard/DillPlugin.py +137 -0
  816. nuitka/plugins/standard/DllFilesPlugin.py +527 -0
  817. nuitka/plugins/standard/EnumPlugin.py +64 -0
  818. nuitka/plugins/standard/EventletPlugin.py +57 -0
  819. nuitka/plugins/standard/GeventPlugin.py +64 -0
  820. nuitka/plugins/standard/GiPlugin.py +118 -0
  821. nuitka/plugins/standard/GlfwPlugin.py +138 -0
  822. nuitka/plugins/standard/ImplicitImports.py +845 -0
  823. nuitka/plugins/standard/KivyPlugin.py +141 -0
  824. nuitka/plugins/standard/MatplotlibPlugin.py +256 -0
  825. nuitka/plugins/standard/MultiprocessingPlugin.py +199 -0
  826. nuitka/plugins/standard/NumpyPlugin.py +35 -0
  827. nuitka/plugins/standard/OptionsNannyPlugin.py +158 -0
  828. nuitka/plugins/standard/PbrPlugin.py +62 -0
  829. nuitka/plugins/standard/PkgResourcesPlugin.py +162 -0
  830. nuitka/plugins/standard/PlaywrightPlugin.py +179 -0
  831. nuitka/plugins/standard/PmwPlugin.py +248 -0
  832. nuitka/plugins/standard/PySidePyQtPlugin.py +1666 -0
  833. nuitka/plugins/standard/PywebViewPlugin.py +81 -0
  834. nuitka/plugins/standard/SpacyPlugin.py +137 -0
  835. nuitka/plugins/standard/TensorflowPlugin.py +35 -0
  836. nuitka/plugins/standard/TkinterPlugin.py +416 -0
  837. nuitka/plugins/standard/TorchPlugin.py +35 -0
  838. nuitka/plugins/standard/TransformersPlugin.py +121 -0
  839. nuitka/plugins/standard/TrioPlugin.py +33 -0
  840. nuitka/plugins/standard/UpxPlugin.py +174 -0
  841. nuitka/plugins/standard/__init__.py +19 -0
  842. nuitka/plugins/standard/standard.nuitka-package.config.yml +9313 -0
  843. nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +78 -0
  844. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +468 -0
  845. nuitka/reports/CompilationReportReader.py +83 -0
  846. nuitka/reports/LicenseReport.rst.j2 +41 -0
  847. nuitka/reports/Reports.py +961 -0
  848. nuitka/reports/__init__.py +19 -0
  849. nuitka/specs/BuiltinBytesOperationSpecs.py +180 -0
  850. nuitka/specs/BuiltinDictOperationSpecs.py +82 -0
  851. nuitka/specs/BuiltinListOperationSpecs.py +80 -0
  852. nuitka/specs/BuiltinParameterSpecs.py +831 -0
  853. nuitka/specs/BuiltinStrOperationSpecs.py +181 -0
  854. nuitka/specs/BuiltinTypeOperationSpecs.py +34 -0
  855. nuitka/specs/BuiltinUnicodeOperationSpecs.py +123 -0
  856. nuitka/specs/HardImportSpecs.py +236 -0
  857. nuitka/specs/ParameterSpecs.py +630 -0
  858. nuitka/specs/__init__.py +19 -0
  859. nuitka/tools/Basics.py +55 -0
  860. nuitka/tools/__init__.py +19 -0
  861. nuitka/tools/commercial/__init__.py +21 -0
  862. nuitka/tools/data_composer/DataComposer.py +593 -0
  863. nuitka/tools/data_composer/__init__.py +19 -0
  864. nuitka/tools/data_composer/__main__.py +41 -0
  865. nuitka/tools/environments/CreateEnvironment.py +69 -0
  866. nuitka/tools/environments/Virtualenv.py +158 -0
  867. nuitka/tools/environments/__init__.py +19 -0
  868. nuitka/tools/general/__init__.py +19 -0
  869. nuitka/tools/general/dll_report/__init__.py +19 -0
  870. nuitka/tools/general/dll_report/__main__.py +83 -0
  871. nuitka/tools/general/find_module/FindModuleCode.py +127 -0
  872. nuitka/tools/general/find_module/__init__.py +19 -0
  873. nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
  874. nuitka/tools/general/generate_header/__init__.py +19 -0
  875. nuitka/tools/onefile_compressor/OnefileCompressor.py +390 -0
  876. nuitka/tools/onefile_compressor/__init__.py +19 -0
  877. nuitka/tools/onefile_compressor/__main__.py +41 -0
  878. nuitka/tools/podman/Podman.py +55 -0
  879. nuitka/tools/podman/__init__.py +19 -0
  880. nuitka/tools/podman/__main__.py +425 -0
  881. nuitka/tools/profiler/__init__.py +19 -0
  882. nuitka/tools/profiler/__main__.py +93 -0
  883. nuitka/tools/scanning/DisplayDistributions.py +39 -0
  884. nuitka/tools/scanning/DisplayPackageDLLs.py +151 -0
  885. nuitka/tools/scanning/DisplayPackageData.py +73 -0
  886. nuitka/tools/scanning/__init__.py +19 -0
  887. nuitka/tools/specialize/CTypeDescriptions.py +1928 -0
  888. nuitka/tools/specialize/Common.py +380 -0
  889. nuitka/tools/specialize/SpecializeC.py +1483 -0
  890. nuitka/tools/specialize/SpecializePython.py +1151 -0
  891. nuitka/tools/specialize/__init__.py +19 -0
  892. nuitka/tools/testing/Common.py +2007 -0
  893. nuitka/tools/testing/Constructs.py +53 -0
  894. nuitka/tools/testing/DocTests.py +156 -0
  895. nuitka/tools/testing/OutputComparison.py +313 -0
  896. nuitka/tools/testing/Pythons.py +34 -0
  897. nuitka/tools/testing/RuntimeTracing.py +260 -0
  898. nuitka/tools/testing/SearchModes.py +208 -0
  899. nuitka/tools/testing/Valgrind.py +103 -0
  900. nuitka/tools/testing/__init__.py +19 -0
  901. nuitka/tools/testing/check_reference_counts/__init__.py +19 -0
  902. nuitka/tools/testing/check_reference_counts/__main__.py +107 -0
  903. nuitka/tools/testing/compare_with_cpython/__init__.py +19 -0
  904. nuitka/tools/testing/compare_with_cpython/__main__.py +942 -0
  905. nuitka/tools/testing/find_sxs_modules/__init__.py +19 -0
  906. nuitka/tools/testing/find_sxs_modules/__main__.py +73 -0
  907. nuitka/tools/testing/measure_construct_performance/__init__.py +19 -0
  908. nuitka/tools/testing/measure_construct_performance/__main__.py +288 -0
  909. nuitka/tools/testing/run_nuitka_tests/__init__.py +19 -0
  910. nuitka/tools/testing/run_nuitka_tests/__main__.py +1091 -0
  911. nuitka/tools/watch/AutoStage.py +145 -0
  912. nuitka/tools/watch/Common.py +55 -0
  913. nuitka/tools/watch/Conda.py +125 -0
  914. nuitka/tools/watch/GitHub.py +113 -0
  915. nuitka/tools/watch/Pacman.py +73 -0
  916. nuitka/tools/watch/Pipenv.py +145 -0
  917. nuitka/tools/watch/__init__.py +19 -0
  918. nuitka/tools/watch/__main__.py +615 -0
  919. nuitka/tree/Building.py +1459 -0
  920. nuitka/tree/ComplexCallHelperFunctions.py +2150 -0
  921. nuitka/tree/Extractions.py +48 -0
  922. nuitka/tree/FutureSpecState.py +71 -0
  923. nuitka/tree/InternalModule.py +96 -0
  924. nuitka/tree/Operations.py +45 -0
  925. nuitka/tree/ReformulationAssertStatements.py +97 -0
  926. nuitka/tree/ReformulationAssignmentStatements.py +1260 -0
  927. nuitka/tree/ReformulationBooleanExpressions.py +97 -0
  928. nuitka/tree/ReformulationCallExpressions.py +314 -0
  929. nuitka/tree/ReformulationClasses.py +407 -0
  930. nuitka/tree/ReformulationClasses3.py +1149 -0
  931. nuitka/tree/ReformulationComparisonExpressions.py +174 -0
  932. nuitka/tree/ReformulationContractionExpressions.py +676 -0
  933. nuitka/tree/ReformulationDictionaryCreation.py +304 -0
  934. nuitka/tree/ReformulationExecStatements.py +386 -0
  935. nuitka/tree/ReformulationForLoopStatements.py +215 -0
  936. nuitka/tree/ReformulationFunctionStatements.py +931 -0
  937. nuitka/tree/ReformulationImportStatements.py +333 -0
  938. nuitka/tree/ReformulationLambdaExpressions.py +185 -0
  939. nuitka/tree/ReformulationMatchStatements.py +797 -0
  940. nuitka/tree/ReformulationMultidist.py +80 -0
  941. nuitka/tree/ReformulationNamespacePackages.py +239 -0
  942. nuitka/tree/ReformulationPrintStatements.py +127 -0
  943. nuitka/tree/ReformulationSequenceCreation.py +438 -0
  944. nuitka/tree/ReformulationSubscriptExpressions.py +123 -0
  945. nuitka/tree/ReformulationTryExceptStatements.py +418 -0
  946. nuitka/tree/ReformulationTryFinallyStatements.py +239 -0
  947. nuitka/tree/ReformulationWhileLoopStatements.py +160 -0
  948. nuitka/tree/ReformulationWithStatements.py +382 -0
  949. nuitka/tree/ReformulationYieldExpressions.py +133 -0
  950. nuitka/tree/SourceHandling.py +476 -0
  951. nuitka/tree/SyntaxErrors.py +143 -0
  952. nuitka/tree/TreeHelpers.py +720 -0
  953. nuitka/tree/VariableClosure.py +483 -0
  954. nuitka/tree/__init__.py +19 -0
  955. nuitka/utils/AppDirs.py +104 -0
  956. nuitka/utils/CStrings.py +208 -0
  957. nuitka/utils/CommandLineOptions.py +207 -0
  958. nuitka/utils/Distributions.py +728 -0
  959. nuitka/utils/Download.py +217 -0
  960. nuitka/utils/Execution.py +517 -0
  961. nuitka/utils/FileOperations.py +1587 -0
  962. nuitka/utils/Hashing.py +137 -0
  963. nuitka/utils/Images.py +79 -0
  964. nuitka/utils/Importing.py +335 -0
  965. nuitka/utils/InlineCopies.py +52 -0
  966. nuitka/utils/InstalledPythons.py +254 -0
  967. nuitka/utils/InstanceCounters.py +86 -0
  968. nuitka/utils/Jinja2.py +158 -0
  969. nuitka/utils/Json.py +40 -0
  970. nuitka/utils/MacOSApp.py +134 -0
  971. nuitka/utils/MemoryUsage.py +165 -0
  972. nuitka/utils/ModuleNames.py +317 -0
  973. nuitka/utils/PackageResources.py +44 -0
  974. nuitka/utils/ReExecute.py +152 -0
  975. nuitka/utils/Rest.py +60 -0
  976. nuitka/utils/SharedLibraries.py +1014 -0
  977. nuitka/utils/Shebang.py +113 -0
  978. nuitka/utils/Signing.py +144 -0
  979. nuitka/utils/SlotMetaClasses.py +57 -0
  980. nuitka/utils/StaticLibraries.py +260 -0
  981. nuitka/utils/ThreadedExecutor.py +87 -0
  982. nuitka/utils/Timing.py +102 -0
  983. nuitka/utils/Utils.py +483 -0
  984. nuitka/utils/WindowsFileUsage.py +337 -0
  985. nuitka/utils/WindowsResources.py +652 -0
  986. nuitka/utils/Yaml.py +247 -0
  987. nuitka/utils/__init__.py +19 -0
  988. nuitka_winsvc-2.7.7.data/scripts/nuitka-run.cmd +24 -0
  989. nuitka_winsvc-2.7.7.data/scripts/nuitka.cmd +30 -0
  990. nuitka_winsvc-2.7.7.dist-info/METADATA +115 -0
  991. nuitka_winsvc-2.7.7.dist-info/RECORD +995 -0
  992. nuitka_winsvc-2.7.7.dist-info/WHEEL +5 -0
  993. nuitka_winsvc-2.7.7.dist-info/entry_points.txt +7 -0
  994. nuitka_winsvc-2.7.7.dist-info/licenses/LICENSE.txt +202 -0
  995. nuitka_winsvc-2.7.7.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2706 @@
1
+ // Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
+
3
+ /* WARNING, this code is GENERATED. Modify the template HelperOperationBinary.c.j2 instead! */
4
+
5
+ /* This file is included from another C file, help IDEs to still parse it on its own. */
6
+ #ifdef __IDE_ONLY__
7
+ #include "nuitka/prelude.h"
8
+ #endif
9
+
10
+ /* C helpers for type specialized ">>" (RSHIFT) operations */
11
+
12
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
13
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2) {
14
+ CHECK_OBJECT(operand1);
15
+ assert(PyLong_CheckExact(operand1));
16
+ CHECK_OBJECT(operand2);
17
+ assert(PyLong_CheckExact(operand2));
18
+
19
+ PyObject *result;
20
+
21
+ // Not every code path will make use of all possible results.
22
+ #ifdef _MSC_VER
23
+ #pragma warning(push)
24
+ #pragma warning(disable : 4101)
25
+ #endif
26
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
27
+ NUITKA_MAY_BE_UNUSED long clong_result;
28
+ #ifdef _MSC_VER
29
+ #pragma warning(pop)
30
+ #endif
31
+
32
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
33
+ assert(x != Py_NotImplemented);
34
+
35
+ obj_result = x;
36
+ goto exit_result_object;
37
+
38
+ exit_result_object:
39
+ if (unlikely(obj_result == NULL)) {
40
+ goto exit_result_exception;
41
+ }
42
+ result = obj_result;
43
+ goto exit_result_ok;
44
+
45
+ exit_result_ok:
46
+ return result;
47
+
48
+ exit_result_exception:
49
+ return NULL;
50
+ }
51
+
52
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2) {
53
+ return _BINARY_OPERATION_RSHIFT_OBJECT_LONG_LONG(operand1, operand2);
54
+ }
55
+
56
+ /* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
57
+ static HEDLEY_NEVER_INLINE PyObject *__BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_LONG(PyObject *operand1,
58
+ PyObject *operand2) {
59
+ PyTypeObject *type1 = Py_TYPE(operand1);
60
+
61
+ #ifdef _MSC_VER
62
+ #pragma warning(push)
63
+ #pragma warning(disable : 4101)
64
+ #endif
65
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
66
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
67
+ #ifdef _MSC_VER
68
+ #pragma warning(pop)
69
+ #endif
70
+
71
+ binaryfunc slot1 =
72
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
73
+ binaryfunc slot2 = NULL;
74
+
75
+ if (!(type1 == &PyLong_Type)) {
76
+ // Different types, need to consider second value slot.
77
+
78
+ slot2 = PyLong_Type.tp_as_number->nb_rshift;
79
+
80
+ if (slot1 == slot2) {
81
+ slot2 = NULL;
82
+ }
83
+ }
84
+
85
+ if (slot1 != NULL) {
86
+ PyObject *x = slot1(operand1, operand2);
87
+
88
+ if (x != Py_NotImplemented) {
89
+ obj_result = x;
90
+ goto exit_binary_result_object;
91
+ }
92
+
93
+ Py_DECREF_IMMORTAL(x);
94
+ }
95
+
96
+ if (slot2 != NULL) {
97
+ PyObject *x = slot2(operand1, operand2);
98
+
99
+ if (x != Py_NotImplemented) {
100
+ obj_result = x;
101
+ goto exit_binary_result_object;
102
+ }
103
+
104
+ Py_DECREF_IMMORTAL(x);
105
+ }
106
+
107
+ #if PYTHON_VERSION < 0x300
108
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !1) {
109
+ coercion c1 =
110
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
111
+
112
+ if (c1 != NULL) {
113
+ PyObject *coerced1 = operand1;
114
+ PyObject *coerced2 = operand2;
115
+
116
+ int err = c1(&coerced1, &coerced2);
117
+
118
+ if (unlikely(err < 0)) {
119
+ goto exit_binary_exception;
120
+ }
121
+
122
+ if (err == 0) {
123
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
124
+
125
+ if (likely(mv == NULL)) {
126
+ binaryfunc slot = mv->nb_rshift;
127
+
128
+ if (likely(slot != NULL)) {
129
+ PyObject *x = slot(coerced1, coerced2);
130
+
131
+ Py_DECREF(coerced1);
132
+ Py_DECREF(coerced2);
133
+
134
+ obj_result = x;
135
+ goto exit_binary_result_object;
136
+ }
137
+ }
138
+
139
+ // nb_coerce took a reference.
140
+ Py_DECREF(coerced1);
141
+ Py_DECREF(coerced2);
142
+ }
143
+ }
144
+ coercion c2 = PyLong_Type.tp_as_number->nb_coerce;
145
+
146
+ if (c2 != NULL) {
147
+ PyObject *coerced1 = operand1;
148
+ PyObject *coerced2 = operand2;
149
+
150
+ int err = c2(&coerced2, &coerced1);
151
+
152
+ if (unlikely(err < 0)) {
153
+ goto exit_binary_exception;
154
+ }
155
+
156
+ if (err == 0) {
157
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
158
+
159
+ if (likely(mv == NULL)) {
160
+ binaryfunc slot = mv->nb_rshift;
161
+
162
+ if (likely(slot != NULL)) {
163
+ PyObject *x = slot(coerced1, coerced2);
164
+
165
+ Py_DECREF(coerced1);
166
+ Py_DECREF(coerced2);
167
+
168
+ obj_result = x;
169
+ goto exit_binary_result_object;
170
+ }
171
+ }
172
+
173
+ // nb_coerce took a reference.
174
+ Py_DECREF(coerced1);
175
+ Py_DECREF(coerced2);
176
+ }
177
+ }
178
+ }
179
+ #endif
180
+
181
+ #if PYTHON_VERSION < 0x300
182
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'long'", type1->tp_name);
183
+ #else
184
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'int'", type1->tp_name);
185
+ #endif
186
+ goto exit_binary_exception;
187
+
188
+ exit_binary_result_object:
189
+ return obj_result;
190
+
191
+ exit_binary_exception:
192
+ return NULL;
193
+ }
194
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *operand2) {
195
+ CHECK_OBJECT(operand1);
196
+ CHECK_OBJECT(operand2);
197
+ assert(PyLong_CheckExact(operand2));
198
+
199
+ PyTypeObject *type1 = Py_TYPE(operand1);
200
+
201
+ if (type1 == &PyLong_Type) {
202
+ PyObject *result;
203
+
204
+ // return _BINARY_OPERATION_RSHIFT_OBJECT_LONG_LONG(operand1, operand2);
205
+
206
+ // Not every code path will make use of all possible results.
207
+ #ifdef _MSC_VER
208
+ #pragma warning(push)
209
+ #pragma warning(disable : 4101)
210
+ #endif
211
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
212
+ NUITKA_MAY_BE_UNUSED long clong_result;
213
+ #ifdef _MSC_VER
214
+ #pragma warning(pop)
215
+ #endif
216
+
217
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
218
+ assert(x != Py_NotImplemented);
219
+
220
+ obj_result = x;
221
+ goto exit_result_object;
222
+
223
+ exit_result_object:
224
+ if (unlikely(obj_result == NULL)) {
225
+ goto exit_result_exception;
226
+ }
227
+ result = obj_result;
228
+ goto exit_result_ok;
229
+
230
+ exit_result_ok:
231
+ return result;
232
+
233
+ exit_result_exception:
234
+ return NULL;
235
+ }
236
+
237
+ return __BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_LONG(operand1, operand2);
238
+ }
239
+
240
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *operand2) {
241
+ return _BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_LONG(operand1, operand2);
242
+ }
243
+
244
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
245
+ static HEDLEY_NEVER_INLINE PyObject *__BINARY_OPERATION_RSHIFT_OBJECT_LONG_OBJECT(PyObject *operand1,
246
+ PyObject *operand2) {
247
+ PyTypeObject *type2 = Py_TYPE(operand2);
248
+
249
+ #ifdef _MSC_VER
250
+ #pragma warning(push)
251
+ #pragma warning(disable : 4101)
252
+ #endif
253
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
254
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
255
+ #ifdef _MSC_VER
256
+ #pragma warning(pop)
257
+ #endif
258
+
259
+ binaryfunc slot1 = PyLong_Type.tp_as_number->nb_rshift;
260
+ binaryfunc slot2 = NULL;
261
+
262
+ if (!(&PyLong_Type == type2)) {
263
+ // Different types, need to consider second value slot.
264
+
265
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
266
+
267
+ if (slot1 == slot2) {
268
+ slot2 = NULL;
269
+ }
270
+ }
271
+
272
+ if (slot1 != NULL) {
273
+ if (slot2 != NULL) {
274
+ if (Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
275
+ PyObject *x = slot2(operand1, operand2);
276
+
277
+ if (x != Py_NotImplemented) {
278
+ obj_result = x;
279
+ goto exit_binary_result_object;
280
+ }
281
+
282
+ Py_DECREF_IMMORTAL(x);
283
+ slot2 = NULL;
284
+ }
285
+ }
286
+
287
+ PyObject *x = slot1(operand1, operand2);
288
+
289
+ if (x != Py_NotImplemented) {
290
+ obj_result = x;
291
+ goto exit_binary_result_object;
292
+ }
293
+
294
+ Py_DECREF_IMMORTAL(x);
295
+ }
296
+
297
+ if (slot2 != NULL) {
298
+ PyObject *x = slot2(operand1, operand2);
299
+
300
+ if (x != Py_NotImplemented) {
301
+ obj_result = x;
302
+ goto exit_binary_result_object;
303
+ }
304
+
305
+ Py_DECREF_IMMORTAL(x);
306
+ }
307
+
308
+ #if PYTHON_VERSION < 0x300
309
+ if (!1 || !NEW_STYLE_NUMBER_TYPE(type2)) {
310
+ coercion c1 = PyLong_Type.tp_as_number->nb_coerce;
311
+
312
+ if (c1 != NULL) {
313
+ PyObject *coerced1 = operand1;
314
+ PyObject *coerced2 = operand2;
315
+
316
+ int err = c1(&coerced1, &coerced2);
317
+
318
+ if (unlikely(err < 0)) {
319
+ goto exit_binary_exception;
320
+ }
321
+
322
+ if (err == 0) {
323
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
324
+
325
+ if (likely(mv == NULL)) {
326
+ binaryfunc slot = mv->nb_rshift;
327
+
328
+ if (likely(slot != NULL)) {
329
+ PyObject *x = slot(coerced1, coerced2);
330
+
331
+ Py_DECREF(coerced1);
332
+ Py_DECREF(coerced2);
333
+
334
+ obj_result = x;
335
+ goto exit_binary_result_object;
336
+ }
337
+ }
338
+
339
+ // nb_coerce took a reference.
340
+ Py_DECREF(coerced1);
341
+ Py_DECREF(coerced2);
342
+ }
343
+ }
344
+ coercion c2 =
345
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
346
+
347
+ if (c2 != NULL) {
348
+ PyObject *coerced1 = operand1;
349
+ PyObject *coerced2 = operand2;
350
+
351
+ int err = c2(&coerced2, &coerced1);
352
+
353
+ if (unlikely(err < 0)) {
354
+ goto exit_binary_exception;
355
+ }
356
+
357
+ if (err == 0) {
358
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
359
+
360
+ if (likely(mv == NULL)) {
361
+ binaryfunc slot = mv->nb_rshift;
362
+
363
+ if (likely(slot != NULL)) {
364
+ PyObject *x = slot(coerced1, coerced2);
365
+
366
+ Py_DECREF(coerced1);
367
+ Py_DECREF(coerced2);
368
+
369
+ obj_result = x;
370
+ goto exit_binary_result_object;
371
+ }
372
+ }
373
+
374
+ // nb_coerce took a reference.
375
+ Py_DECREF(coerced1);
376
+ Py_DECREF(coerced2);
377
+ }
378
+ }
379
+ }
380
+ #endif
381
+
382
+ #if PYTHON_VERSION < 0x300
383
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'long' and '%s'", type2->tp_name);
384
+ #else
385
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and '%s'", type2->tp_name);
386
+ #endif
387
+ goto exit_binary_exception;
388
+
389
+ exit_binary_result_object:
390
+ return obj_result;
391
+
392
+ exit_binary_exception:
393
+ return NULL;
394
+ }
395
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *operand2) {
396
+ CHECK_OBJECT(operand1);
397
+ assert(PyLong_CheckExact(operand1));
398
+ CHECK_OBJECT(operand2);
399
+
400
+ PyTypeObject *type2 = Py_TYPE(operand2);
401
+
402
+ if (&PyLong_Type == type2) {
403
+ PyObject *result;
404
+
405
+ // return _BINARY_OPERATION_RSHIFT_OBJECT_LONG_LONG(operand1, operand2);
406
+
407
+ // Not every code path will make use of all possible results.
408
+ #ifdef _MSC_VER
409
+ #pragma warning(push)
410
+ #pragma warning(disable : 4101)
411
+ #endif
412
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
413
+ NUITKA_MAY_BE_UNUSED long clong_result;
414
+ #ifdef _MSC_VER
415
+ #pragma warning(pop)
416
+ #endif
417
+
418
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
419
+ assert(x != Py_NotImplemented);
420
+
421
+ obj_result = x;
422
+ goto exit_result_object;
423
+
424
+ exit_result_object:
425
+ if (unlikely(obj_result == NULL)) {
426
+ goto exit_result_exception;
427
+ }
428
+ result = obj_result;
429
+ goto exit_result_ok;
430
+
431
+ exit_result_ok:
432
+ return result;
433
+
434
+ exit_result_exception:
435
+ return NULL;
436
+ }
437
+
438
+ return __BINARY_OPERATION_RSHIFT_OBJECT_LONG_OBJECT(operand1, operand2);
439
+ }
440
+
441
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *operand2) {
442
+ return _BINARY_OPERATION_RSHIFT_OBJECT_LONG_OBJECT(operand1, operand2);
443
+ }
444
+
445
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
446
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
447
+ CHECK_OBJECT(operand1);
448
+ assert(PyLong_CheckExact(operand1));
449
+ CHECK_OBJECT(operand2);
450
+ assert(PyLong_CheckExact(operand2));
451
+
452
+ nuitka_bool result;
453
+
454
+ // Not every code path will make use of all possible results.
455
+ #ifdef _MSC_VER
456
+ #pragma warning(push)
457
+ #pragma warning(disable : 4101)
458
+ #endif
459
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
460
+ NUITKA_MAY_BE_UNUSED long clong_result;
461
+ #ifdef _MSC_VER
462
+ #pragma warning(pop)
463
+ #endif
464
+
465
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
466
+ assert(x != Py_NotImplemented);
467
+
468
+ obj_result = x;
469
+ goto exit_result_object;
470
+
471
+ exit_result_object:
472
+ if (unlikely(obj_result == NULL)) {
473
+ goto exit_result_exception;
474
+ }
475
+ result = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
476
+ Py_DECREF(obj_result);
477
+ goto exit_result_ok;
478
+
479
+ exit_result_ok:
480
+ return result;
481
+
482
+ exit_result_exception:
483
+ return NUITKA_BOOL_EXCEPTION;
484
+ }
485
+
486
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
487
+ return _BINARY_OPERATION_RSHIFT_NBOOL_LONG_LONG(operand1, operand2);
488
+ }
489
+
490
+ /* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
491
+ static HEDLEY_NEVER_INLINE nuitka_bool __BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_LONG(PyObject *operand1,
492
+ PyObject *operand2) {
493
+ PyTypeObject *type1 = Py_TYPE(operand1);
494
+
495
+ #ifdef _MSC_VER
496
+ #pragma warning(push)
497
+ #pragma warning(disable : 4101)
498
+ #endif
499
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
500
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
501
+ #ifdef _MSC_VER
502
+ #pragma warning(pop)
503
+ #endif
504
+
505
+ binaryfunc slot1 =
506
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
507
+ binaryfunc slot2 = NULL;
508
+
509
+ if (!(type1 == &PyLong_Type)) {
510
+ // Different types, need to consider second value slot.
511
+
512
+ slot2 = PyLong_Type.tp_as_number->nb_rshift;
513
+
514
+ if (slot1 == slot2) {
515
+ slot2 = NULL;
516
+ }
517
+ }
518
+
519
+ if (slot1 != NULL) {
520
+ PyObject *x = slot1(operand1, operand2);
521
+
522
+ if (x != Py_NotImplemented) {
523
+ obj_result = x;
524
+ goto exit_binary_result_object;
525
+ }
526
+
527
+ Py_DECREF_IMMORTAL(x);
528
+ }
529
+
530
+ if (slot2 != NULL) {
531
+ PyObject *x = slot2(operand1, operand2);
532
+
533
+ if (x != Py_NotImplemented) {
534
+ obj_result = x;
535
+ goto exit_binary_result_object;
536
+ }
537
+
538
+ Py_DECREF_IMMORTAL(x);
539
+ }
540
+
541
+ #if PYTHON_VERSION < 0x300
542
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !1) {
543
+ coercion c1 =
544
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
545
+
546
+ if (c1 != NULL) {
547
+ PyObject *coerced1 = operand1;
548
+ PyObject *coerced2 = operand2;
549
+
550
+ int err = c1(&coerced1, &coerced2);
551
+
552
+ if (unlikely(err < 0)) {
553
+ goto exit_binary_exception;
554
+ }
555
+
556
+ if (err == 0) {
557
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
558
+
559
+ if (likely(mv == NULL)) {
560
+ binaryfunc slot = mv->nb_rshift;
561
+
562
+ if (likely(slot != NULL)) {
563
+ PyObject *x = slot(coerced1, coerced2);
564
+
565
+ Py_DECREF(coerced1);
566
+ Py_DECREF(coerced2);
567
+
568
+ obj_result = x;
569
+ goto exit_binary_result_object;
570
+ }
571
+ }
572
+
573
+ // nb_coerce took a reference.
574
+ Py_DECREF(coerced1);
575
+ Py_DECREF(coerced2);
576
+ }
577
+ }
578
+ coercion c2 = PyLong_Type.tp_as_number->nb_coerce;
579
+
580
+ if (c2 != NULL) {
581
+ PyObject *coerced1 = operand1;
582
+ PyObject *coerced2 = operand2;
583
+
584
+ int err = c2(&coerced2, &coerced1);
585
+
586
+ if (unlikely(err < 0)) {
587
+ goto exit_binary_exception;
588
+ }
589
+
590
+ if (err == 0) {
591
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
592
+
593
+ if (likely(mv == NULL)) {
594
+ binaryfunc slot = mv->nb_rshift;
595
+
596
+ if (likely(slot != NULL)) {
597
+ PyObject *x = slot(coerced1, coerced2);
598
+
599
+ Py_DECREF(coerced1);
600
+ Py_DECREF(coerced2);
601
+
602
+ obj_result = x;
603
+ goto exit_binary_result_object;
604
+ }
605
+ }
606
+
607
+ // nb_coerce took a reference.
608
+ Py_DECREF(coerced1);
609
+ Py_DECREF(coerced2);
610
+ }
611
+ }
612
+ }
613
+ #endif
614
+
615
+ #if PYTHON_VERSION < 0x300
616
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'long'", type1->tp_name);
617
+ #else
618
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'int'", type1->tp_name);
619
+ #endif
620
+ goto exit_binary_exception;
621
+
622
+ exit_binary_result_object:
623
+ if (unlikely(obj_result == NULL)) {
624
+ return NUITKA_BOOL_EXCEPTION;
625
+ }
626
+
627
+ {
628
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
629
+ Py_DECREF(obj_result);
630
+ return r;
631
+ }
632
+
633
+ exit_binary_exception:
634
+ return NUITKA_BOOL_EXCEPTION;
635
+ }
636
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *operand2) {
637
+ CHECK_OBJECT(operand1);
638
+ CHECK_OBJECT(operand2);
639
+ assert(PyLong_CheckExact(operand2));
640
+
641
+ PyTypeObject *type1 = Py_TYPE(operand1);
642
+
643
+ if (type1 == &PyLong_Type) {
644
+ nuitka_bool result;
645
+
646
+ // return _BINARY_OPERATION_RSHIFT_NBOOL_LONG_LONG(operand1, operand2);
647
+
648
+ // Not every code path will make use of all possible results.
649
+ #ifdef _MSC_VER
650
+ #pragma warning(push)
651
+ #pragma warning(disable : 4101)
652
+ #endif
653
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
654
+ NUITKA_MAY_BE_UNUSED long clong_result;
655
+ #ifdef _MSC_VER
656
+ #pragma warning(pop)
657
+ #endif
658
+
659
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
660
+ assert(x != Py_NotImplemented);
661
+
662
+ obj_result = x;
663
+ goto exit_result_object;
664
+
665
+ exit_result_object:
666
+ if (unlikely(obj_result == NULL)) {
667
+ goto exit_result_exception;
668
+ }
669
+ result = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
670
+ Py_DECREF(obj_result);
671
+ goto exit_result_ok;
672
+
673
+ exit_result_ok:
674
+ return result;
675
+
676
+ exit_result_exception:
677
+ return NUITKA_BOOL_EXCEPTION;
678
+ }
679
+
680
+ return __BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_LONG(operand1, operand2);
681
+ }
682
+
683
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *operand2) {
684
+ return _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_LONG(operand1, operand2);
685
+ }
686
+
687
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
688
+ static HEDLEY_NEVER_INLINE nuitka_bool __BINARY_OPERATION_RSHIFT_NBOOL_LONG_OBJECT(PyObject *operand1,
689
+ PyObject *operand2) {
690
+ PyTypeObject *type2 = Py_TYPE(operand2);
691
+
692
+ #ifdef _MSC_VER
693
+ #pragma warning(push)
694
+ #pragma warning(disable : 4101)
695
+ #endif
696
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
697
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
698
+ #ifdef _MSC_VER
699
+ #pragma warning(pop)
700
+ #endif
701
+
702
+ binaryfunc slot1 = PyLong_Type.tp_as_number->nb_rshift;
703
+ binaryfunc slot2 = NULL;
704
+
705
+ if (!(&PyLong_Type == type2)) {
706
+ // Different types, need to consider second value slot.
707
+
708
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
709
+
710
+ if (slot1 == slot2) {
711
+ slot2 = NULL;
712
+ }
713
+ }
714
+
715
+ if (slot1 != NULL) {
716
+ if (slot2 != NULL) {
717
+ if (Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
718
+ PyObject *x = slot2(operand1, operand2);
719
+
720
+ if (x != Py_NotImplemented) {
721
+ obj_result = x;
722
+ goto exit_binary_result_object;
723
+ }
724
+
725
+ Py_DECREF_IMMORTAL(x);
726
+ slot2 = NULL;
727
+ }
728
+ }
729
+
730
+ PyObject *x = slot1(operand1, operand2);
731
+
732
+ if (x != Py_NotImplemented) {
733
+ obj_result = x;
734
+ goto exit_binary_result_object;
735
+ }
736
+
737
+ Py_DECREF_IMMORTAL(x);
738
+ }
739
+
740
+ if (slot2 != NULL) {
741
+ PyObject *x = slot2(operand1, operand2);
742
+
743
+ if (x != Py_NotImplemented) {
744
+ obj_result = x;
745
+ goto exit_binary_result_object;
746
+ }
747
+
748
+ Py_DECREF_IMMORTAL(x);
749
+ }
750
+
751
+ #if PYTHON_VERSION < 0x300
752
+ if (!1 || !NEW_STYLE_NUMBER_TYPE(type2)) {
753
+ coercion c1 = PyLong_Type.tp_as_number->nb_coerce;
754
+
755
+ if (c1 != NULL) {
756
+ PyObject *coerced1 = operand1;
757
+ PyObject *coerced2 = operand2;
758
+
759
+ int err = c1(&coerced1, &coerced2);
760
+
761
+ if (unlikely(err < 0)) {
762
+ goto exit_binary_exception;
763
+ }
764
+
765
+ if (err == 0) {
766
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
767
+
768
+ if (likely(mv == NULL)) {
769
+ binaryfunc slot = mv->nb_rshift;
770
+
771
+ if (likely(slot != NULL)) {
772
+ PyObject *x = slot(coerced1, coerced2);
773
+
774
+ Py_DECREF(coerced1);
775
+ Py_DECREF(coerced2);
776
+
777
+ obj_result = x;
778
+ goto exit_binary_result_object;
779
+ }
780
+ }
781
+
782
+ // nb_coerce took a reference.
783
+ Py_DECREF(coerced1);
784
+ Py_DECREF(coerced2);
785
+ }
786
+ }
787
+ coercion c2 =
788
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
789
+
790
+ if (c2 != NULL) {
791
+ PyObject *coerced1 = operand1;
792
+ PyObject *coerced2 = operand2;
793
+
794
+ int err = c2(&coerced2, &coerced1);
795
+
796
+ if (unlikely(err < 0)) {
797
+ goto exit_binary_exception;
798
+ }
799
+
800
+ if (err == 0) {
801
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
802
+
803
+ if (likely(mv == NULL)) {
804
+ binaryfunc slot = mv->nb_rshift;
805
+
806
+ if (likely(slot != NULL)) {
807
+ PyObject *x = slot(coerced1, coerced2);
808
+
809
+ Py_DECREF(coerced1);
810
+ Py_DECREF(coerced2);
811
+
812
+ obj_result = x;
813
+ goto exit_binary_result_object;
814
+ }
815
+ }
816
+
817
+ // nb_coerce took a reference.
818
+ Py_DECREF(coerced1);
819
+ Py_DECREF(coerced2);
820
+ }
821
+ }
822
+ }
823
+ #endif
824
+
825
+ #if PYTHON_VERSION < 0x300
826
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'long' and '%s'", type2->tp_name);
827
+ #else
828
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and '%s'", type2->tp_name);
829
+ #endif
830
+ goto exit_binary_exception;
831
+
832
+ exit_binary_result_object:
833
+ if (unlikely(obj_result == NULL)) {
834
+ return NUITKA_BOOL_EXCEPTION;
835
+ }
836
+
837
+ {
838
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
839
+ Py_DECREF(obj_result);
840
+ return r;
841
+ }
842
+
843
+ exit_binary_exception:
844
+ return NUITKA_BOOL_EXCEPTION;
845
+ }
846
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *operand2) {
847
+ CHECK_OBJECT(operand1);
848
+ assert(PyLong_CheckExact(operand1));
849
+ CHECK_OBJECT(operand2);
850
+
851
+ PyTypeObject *type2 = Py_TYPE(operand2);
852
+
853
+ if (&PyLong_Type == type2) {
854
+ nuitka_bool result;
855
+
856
+ // return _BINARY_OPERATION_RSHIFT_NBOOL_LONG_LONG(operand1, operand2);
857
+
858
+ // Not every code path will make use of all possible results.
859
+ #ifdef _MSC_VER
860
+ #pragma warning(push)
861
+ #pragma warning(disable : 4101)
862
+ #endif
863
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
864
+ NUITKA_MAY_BE_UNUSED long clong_result;
865
+ #ifdef _MSC_VER
866
+ #pragma warning(pop)
867
+ #endif
868
+
869
+ PyObject *x = PyLong_Type.tp_as_number->nb_rshift(operand1, operand2);
870
+ assert(x != Py_NotImplemented);
871
+
872
+ obj_result = x;
873
+ goto exit_result_object;
874
+
875
+ exit_result_object:
876
+ if (unlikely(obj_result == NULL)) {
877
+ goto exit_result_exception;
878
+ }
879
+ result = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
880
+ Py_DECREF(obj_result);
881
+ goto exit_result_ok;
882
+
883
+ exit_result_ok:
884
+ return result;
885
+
886
+ exit_result_exception:
887
+ return NUITKA_BOOL_EXCEPTION;
888
+ }
889
+
890
+ return __BINARY_OPERATION_RSHIFT_NBOOL_LONG_OBJECT(operand1, operand2);
891
+ }
892
+
893
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *operand2) {
894
+ return _BINARY_OPERATION_RSHIFT_NBOOL_LONG_OBJECT(operand1, operand2);
895
+ }
896
+
897
+ #if PYTHON_VERSION < 0x300
898
+ /* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
899
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_INT_INT(PyObject *operand1, PyObject *operand2) {
900
+ CHECK_OBJECT(operand1);
901
+ assert(PyInt_CheckExact(operand1));
902
+ CHECK_OBJECT(operand2);
903
+ assert(PyInt_CheckExact(operand2));
904
+
905
+ PyObject *result;
906
+
907
+ // Not every code path will make use of all possible results.
908
+ #ifdef _MSC_VER
909
+ #pragma warning(push)
910
+ #pragma warning(disable : 4101)
911
+ #endif
912
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
913
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
914
+ NUITKA_MAY_BE_UNUSED long clong_result;
915
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
916
+ #ifdef _MSC_VER
917
+ #pragma warning(pop)
918
+ #endif
919
+
920
+ CHECK_OBJECT(operand1);
921
+ assert(PyInt_CheckExact(operand1));
922
+ CHECK_OBJECT(operand2);
923
+ assert(PyInt_CheckExact(operand2));
924
+
925
+ const long a = PyInt_AS_LONG(operand1);
926
+ const long b = PyInt_AS_LONG(operand2);
927
+
928
+ if (unlikely(b < 0)) {
929
+ PyThreadState *tstate = PyThreadState_GET();
930
+
931
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
932
+ goto exit_result_exception;
933
+ }
934
+
935
+ /* Short cut for zero shift or shifting zero. */
936
+ if (a == 0 || b == 0) {
937
+ goto exit_result_ok_left;
938
+ } else if (b >= LONG_BIT) {
939
+ if (a < 0) {
940
+ goto exit_result_ok_const_int_neg_1;
941
+ } else {
942
+ goto exit_result_ok_const_int_0;
943
+ }
944
+ } else {
945
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
946
+
947
+ clong_result = r;
948
+ goto exit_result_ok_clong;
949
+ }
950
+
951
+ exit_result_ok_clong:
952
+ result = Nuitka_PyInt_FromLong(clong_result);
953
+ goto exit_result_ok;
954
+
955
+ exit_result_ok_left:
956
+ result = operand1;
957
+ Py_INCREF(result);
958
+ goto exit_result_ok;
959
+
960
+ exit_result_ok_const_int_0:
961
+ Py_INCREF(const_int_0);
962
+ result = const_int_0;
963
+ goto exit_result_ok;
964
+
965
+ exit_result_ok_const_int_neg_1:
966
+ Py_INCREF(const_int_neg_1);
967
+ result = const_int_neg_1;
968
+ goto exit_result_ok;
969
+
970
+ exit_result_ok:
971
+ return result;
972
+
973
+ exit_result_exception:
974
+ return NULL;
975
+ }
976
+
977
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_INT_INT(PyObject *operand1, PyObject *operand2) {
978
+ return _BINARY_OPERATION_RSHIFT_OBJECT_INT_INT(operand1, operand2);
979
+ }
980
+ #endif
981
+
982
+ #if PYTHON_VERSION < 0x300
983
+ /* Code referring to "OBJECT" corresponds to any Python object and "INT" to Python2 'int'. */
984
+ static HEDLEY_NEVER_INLINE PyObject *__BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_INT(PyObject *operand1,
985
+ PyObject *operand2) {
986
+ PyTypeObject *type1 = Py_TYPE(operand1);
987
+
988
+ #ifdef _MSC_VER
989
+ #pragma warning(push)
990
+ #pragma warning(disable : 4101)
991
+ #endif
992
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
993
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
994
+ #ifdef _MSC_VER
995
+ #pragma warning(pop)
996
+ #endif
997
+
998
+ binaryfunc slot1 =
999
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
1000
+ binaryfunc slot2 = NULL;
1001
+
1002
+ if (!(type1 == &PyInt_Type)) {
1003
+ // Different types, need to consider second value slot.
1004
+
1005
+ slot2 = PyInt_Type.tp_as_number->nb_rshift;
1006
+
1007
+ if (slot1 == slot2) {
1008
+ slot2 = NULL;
1009
+ }
1010
+ }
1011
+
1012
+ if (slot1 != NULL) {
1013
+ PyObject *x = slot1(operand1, operand2);
1014
+
1015
+ if (x != Py_NotImplemented) {
1016
+ obj_result = x;
1017
+ goto exit_binary_result_object;
1018
+ }
1019
+
1020
+ Py_DECREF_IMMORTAL(x);
1021
+ }
1022
+
1023
+ if (slot2 != NULL) {
1024
+ PyObject *x = slot2(operand1, operand2);
1025
+
1026
+ if (x != Py_NotImplemented) {
1027
+ obj_result = x;
1028
+ goto exit_binary_result_object;
1029
+ }
1030
+
1031
+ Py_DECREF_IMMORTAL(x);
1032
+ }
1033
+
1034
+ #if PYTHON_VERSION < 0x300
1035
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !1) {
1036
+ coercion c1 =
1037
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
1038
+
1039
+ if (c1 != NULL) {
1040
+ PyObject *coerced1 = operand1;
1041
+ PyObject *coerced2 = operand2;
1042
+
1043
+ int err = c1(&coerced1, &coerced2);
1044
+
1045
+ if (unlikely(err < 0)) {
1046
+ goto exit_binary_exception;
1047
+ }
1048
+
1049
+ if (err == 0) {
1050
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1051
+
1052
+ if (likely(mv == NULL)) {
1053
+ binaryfunc slot = mv->nb_rshift;
1054
+
1055
+ if (likely(slot != NULL)) {
1056
+ PyObject *x = slot(coerced1, coerced2);
1057
+
1058
+ Py_DECREF(coerced1);
1059
+ Py_DECREF(coerced2);
1060
+
1061
+ obj_result = x;
1062
+ goto exit_binary_result_object;
1063
+ }
1064
+ }
1065
+
1066
+ // nb_coerce took a reference.
1067
+ Py_DECREF(coerced1);
1068
+ Py_DECREF(coerced2);
1069
+ }
1070
+ }
1071
+ coercion c2 = PyInt_Type.tp_as_number->nb_coerce;
1072
+
1073
+ if (c2 != NULL) {
1074
+ PyObject *coerced1 = operand1;
1075
+ PyObject *coerced2 = operand2;
1076
+
1077
+ int err = c2(&coerced2, &coerced1);
1078
+
1079
+ if (unlikely(err < 0)) {
1080
+ goto exit_binary_exception;
1081
+ }
1082
+
1083
+ if (err == 0) {
1084
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1085
+
1086
+ if (likely(mv == NULL)) {
1087
+ binaryfunc slot = mv->nb_rshift;
1088
+
1089
+ if (likely(slot != NULL)) {
1090
+ PyObject *x = slot(coerced1, coerced2);
1091
+
1092
+ Py_DECREF(coerced1);
1093
+ Py_DECREF(coerced2);
1094
+
1095
+ obj_result = x;
1096
+ goto exit_binary_result_object;
1097
+ }
1098
+ }
1099
+
1100
+ // nb_coerce took a reference.
1101
+ Py_DECREF(coerced1);
1102
+ Py_DECREF(coerced2);
1103
+ }
1104
+ }
1105
+ }
1106
+ #endif
1107
+
1108
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'int'", type1->tp_name);
1109
+ goto exit_binary_exception;
1110
+
1111
+ exit_binary_result_object:
1112
+ return obj_result;
1113
+
1114
+ exit_binary_exception:
1115
+ return NULL;
1116
+ }
1117
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operand2) {
1118
+ CHECK_OBJECT(operand1);
1119
+ CHECK_OBJECT(operand2);
1120
+ assert(PyInt_CheckExact(operand2));
1121
+
1122
+ PyTypeObject *type1 = Py_TYPE(operand1);
1123
+
1124
+ if (type1 == &PyInt_Type) {
1125
+ PyObject *result;
1126
+
1127
+ // return _BINARY_OPERATION_RSHIFT_OBJECT_INT_INT(operand1, operand2);
1128
+
1129
+ // Not every code path will make use of all possible results.
1130
+ #ifdef _MSC_VER
1131
+ #pragma warning(push)
1132
+ #pragma warning(disable : 4101)
1133
+ #endif
1134
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1135
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1136
+ NUITKA_MAY_BE_UNUSED long clong_result;
1137
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
1138
+ #ifdef _MSC_VER
1139
+ #pragma warning(pop)
1140
+ #endif
1141
+
1142
+ CHECK_OBJECT(operand1);
1143
+ assert(PyInt_CheckExact(operand1));
1144
+ CHECK_OBJECT(operand2);
1145
+ assert(PyInt_CheckExact(operand2));
1146
+
1147
+ const long a = PyInt_AS_LONG(operand1);
1148
+ const long b = PyInt_AS_LONG(operand2);
1149
+
1150
+ if (unlikely(b < 0)) {
1151
+ PyThreadState *tstate = PyThreadState_GET();
1152
+
1153
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
1154
+ goto exit_result_exception;
1155
+ }
1156
+
1157
+ /* Short cut for zero shift or shifting zero. */
1158
+ if (a == 0 || b == 0) {
1159
+ goto exit_result_ok_left;
1160
+ } else if (b >= LONG_BIT) {
1161
+ if (a < 0) {
1162
+ goto exit_result_ok_const_int_neg_1;
1163
+ } else {
1164
+ goto exit_result_ok_const_int_0;
1165
+ }
1166
+ } else {
1167
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
1168
+
1169
+ clong_result = r;
1170
+ goto exit_result_ok_clong;
1171
+ }
1172
+
1173
+ exit_result_ok_clong:
1174
+ result = Nuitka_PyInt_FromLong(clong_result);
1175
+ goto exit_result_ok;
1176
+
1177
+ exit_result_ok_left:
1178
+ result = operand1;
1179
+ Py_INCREF(result);
1180
+ goto exit_result_ok;
1181
+
1182
+ exit_result_ok_const_int_0:
1183
+ Py_INCREF(const_int_0);
1184
+ result = const_int_0;
1185
+ goto exit_result_ok;
1186
+
1187
+ exit_result_ok_const_int_neg_1:
1188
+ Py_INCREF(const_int_neg_1);
1189
+ result = const_int_neg_1;
1190
+ goto exit_result_ok;
1191
+
1192
+ exit_result_ok:
1193
+ return result;
1194
+
1195
+ exit_result_exception:
1196
+ return NULL;
1197
+ }
1198
+
1199
+ return __BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_INT(operand1, operand2);
1200
+ }
1201
+
1202
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operand2) {
1203
+ return _BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_INT(operand1, operand2);
1204
+ }
1205
+ #endif
1206
+
1207
+ #if PYTHON_VERSION < 0x300
1208
+ /* Code referring to "INT" corresponds to Python2 'int' and "OBJECT" to any Python object. */
1209
+ static HEDLEY_NEVER_INLINE PyObject *__BINARY_OPERATION_RSHIFT_OBJECT_INT_OBJECT(PyObject *operand1,
1210
+ PyObject *operand2) {
1211
+ PyTypeObject *type2 = Py_TYPE(operand2);
1212
+
1213
+ #ifdef _MSC_VER
1214
+ #pragma warning(push)
1215
+ #pragma warning(disable : 4101)
1216
+ #endif
1217
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1218
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1219
+ #ifdef _MSC_VER
1220
+ #pragma warning(pop)
1221
+ #endif
1222
+
1223
+ binaryfunc slot1 = PyInt_Type.tp_as_number->nb_rshift;
1224
+ binaryfunc slot2 = NULL;
1225
+
1226
+ if (!(&PyInt_Type == type2)) {
1227
+ // Different types, need to consider second value slot.
1228
+
1229
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
1230
+
1231
+ if (slot1 == slot2) {
1232
+ slot2 = NULL;
1233
+ }
1234
+ }
1235
+
1236
+ if (slot1 != NULL) {
1237
+ if (slot2 != NULL) {
1238
+ if (Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
1239
+ PyObject *x = slot2(operand1, operand2);
1240
+
1241
+ if (x != Py_NotImplemented) {
1242
+ obj_result = x;
1243
+ goto exit_binary_result_object;
1244
+ }
1245
+
1246
+ Py_DECREF_IMMORTAL(x);
1247
+ slot2 = NULL;
1248
+ }
1249
+ }
1250
+
1251
+ PyObject *x = slot1(operand1, operand2);
1252
+
1253
+ if (x != Py_NotImplemented) {
1254
+ obj_result = x;
1255
+ goto exit_binary_result_object;
1256
+ }
1257
+
1258
+ Py_DECREF_IMMORTAL(x);
1259
+ }
1260
+
1261
+ if (slot2 != NULL) {
1262
+ PyObject *x = slot2(operand1, operand2);
1263
+
1264
+ if (x != Py_NotImplemented) {
1265
+ obj_result = x;
1266
+ goto exit_binary_result_object;
1267
+ }
1268
+
1269
+ Py_DECREF_IMMORTAL(x);
1270
+ }
1271
+
1272
+ #if PYTHON_VERSION < 0x300
1273
+ if (!1 || !NEW_STYLE_NUMBER_TYPE(type2)) {
1274
+ coercion c1 = PyInt_Type.tp_as_number->nb_coerce;
1275
+
1276
+ if (c1 != NULL) {
1277
+ PyObject *coerced1 = operand1;
1278
+ PyObject *coerced2 = operand2;
1279
+
1280
+ int err = c1(&coerced1, &coerced2);
1281
+
1282
+ if (unlikely(err < 0)) {
1283
+ goto exit_binary_exception;
1284
+ }
1285
+
1286
+ if (err == 0) {
1287
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1288
+
1289
+ if (likely(mv == NULL)) {
1290
+ binaryfunc slot = mv->nb_rshift;
1291
+
1292
+ if (likely(slot != NULL)) {
1293
+ PyObject *x = slot(coerced1, coerced2);
1294
+
1295
+ Py_DECREF(coerced1);
1296
+ Py_DECREF(coerced2);
1297
+
1298
+ obj_result = x;
1299
+ goto exit_binary_result_object;
1300
+ }
1301
+ }
1302
+
1303
+ // nb_coerce took a reference.
1304
+ Py_DECREF(coerced1);
1305
+ Py_DECREF(coerced2);
1306
+ }
1307
+ }
1308
+ coercion c2 =
1309
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
1310
+
1311
+ if (c2 != NULL) {
1312
+ PyObject *coerced1 = operand1;
1313
+ PyObject *coerced2 = operand2;
1314
+
1315
+ int err = c2(&coerced2, &coerced1);
1316
+
1317
+ if (unlikely(err < 0)) {
1318
+ goto exit_binary_exception;
1319
+ }
1320
+
1321
+ if (err == 0) {
1322
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1323
+
1324
+ if (likely(mv == NULL)) {
1325
+ binaryfunc slot = mv->nb_rshift;
1326
+
1327
+ if (likely(slot != NULL)) {
1328
+ PyObject *x = slot(coerced1, coerced2);
1329
+
1330
+ Py_DECREF(coerced1);
1331
+ Py_DECREF(coerced2);
1332
+
1333
+ obj_result = x;
1334
+ goto exit_binary_result_object;
1335
+ }
1336
+ }
1337
+
1338
+ // nb_coerce took a reference.
1339
+ Py_DECREF(coerced1);
1340
+ Py_DECREF(coerced2);
1341
+ }
1342
+ }
1343
+ }
1344
+ #endif
1345
+
1346
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and '%s'", type2->tp_name);
1347
+ goto exit_binary_exception;
1348
+
1349
+ exit_binary_result_object:
1350
+ return obj_result;
1351
+
1352
+ exit_binary_exception:
1353
+ return NULL;
1354
+ }
1355
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operand2) {
1356
+ CHECK_OBJECT(operand1);
1357
+ assert(PyInt_CheckExact(operand1));
1358
+ CHECK_OBJECT(operand2);
1359
+
1360
+ PyTypeObject *type2 = Py_TYPE(operand2);
1361
+
1362
+ if (&PyInt_Type == type2) {
1363
+ PyObject *result;
1364
+
1365
+ // return _BINARY_OPERATION_RSHIFT_OBJECT_INT_INT(operand1, operand2);
1366
+
1367
+ // Not every code path will make use of all possible results.
1368
+ #ifdef _MSC_VER
1369
+ #pragma warning(push)
1370
+ #pragma warning(disable : 4101)
1371
+ #endif
1372
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1373
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1374
+ NUITKA_MAY_BE_UNUSED long clong_result;
1375
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
1376
+ #ifdef _MSC_VER
1377
+ #pragma warning(pop)
1378
+ #endif
1379
+
1380
+ CHECK_OBJECT(operand1);
1381
+ assert(PyInt_CheckExact(operand1));
1382
+ CHECK_OBJECT(operand2);
1383
+ assert(PyInt_CheckExact(operand2));
1384
+
1385
+ const long a = PyInt_AS_LONG(operand1);
1386
+ const long b = PyInt_AS_LONG(operand2);
1387
+
1388
+ if (unlikely(b < 0)) {
1389
+ PyThreadState *tstate = PyThreadState_GET();
1390
+
1391
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
1392
+ goto exit_result_exception;
1393
+ }
1394
+
1395
+ /* Short cut for zero shift or shifting zero. */
1396
+ if (a == 0 || b == 0) {
1397
+ goto exit_result_ok_left;
1398
+ } else if (b >= LONG_BIT) {
1399
+ if (a < 0) {
1400
+ goto exit_result_ok_const_int_neg_1;
1401
+ } else {
1402
+ goto exit_result_ok_const_int_0;
1403
+ }
1404
+ } else {
1405
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
1406
+
1407
+ clong_result = r;
1408
+ goto exit_result_ok_clong;
1409
+ }
1410
+
1411
+ exit_result_ok_clong:
1412
+ result = Nuitka_PyInt_FromLong(clong_result);
1413
+ goto exit_result_ok;
1414
+
1415
+ exit_result_ok_left:
1416
+ result = operand1;
1417
+ Py_INCREF(result);
1418
+ goto exit_result_ok;
1419
+
1420
+ exit_result_ok_const_int_0:
1421
+ Py_INCREF(const_int_0);
1422
+ result = const_int_0;
1423
+ goto exit_result_ok;
1424
+
1425
+ exit_result_ok_const_int_neg_1:
1426
+ Py_INCREF(const_int_neg_1);
1427
+ result = const_int_neg_1;
1428
+ goto exit_result_ok;
1429
+
1430
+ exit_result_ok:
1431
+ return result;
1432
+
1433
+ exit_result_exception:
1434
+ return NULL;
1435
+ }
1436
+
1437
+ return __BINARY_OPERATION_RSHIFT_OBJECT_INT_OBJECT(operand1, operand2);
1438
+ }
1439
+
1440
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operand2) {
1441
+ return _BINARY_OPERATION_RSHIFT_OBJECT_INT_OBJECT(operand1, operand2);
1442
+ }
1443
+ #endif
1444
+
1445
+ #if PYTHON_VERSION < 0x300
1446
+ /* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
1447
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_INT_INT(PyObject *operand1, PyObject *operand2) {
1448
+ CHECK_OBJECT(operand1);
1449
+ assert(PyInt_CheckExact(operand1));
1450
+ CHECK_OBJECT(operand2);
1451
+ assert(PyInt_CheckExact(operand2));
1452
+
1453
+ nuitka_bool result;
1454
+
1455
+ // Not every code path will make use of all possible results.
1456
+ #ifdef _MSC_VER
1457
+ #pragma warning(push)
1458
+ #pragma warning(disable : 4101)
1459
+ #endif
1460
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1461
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1462
+ NUITKA_MAY_BE_UNUSED long clong_result;
1463
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
1464
+ #ifdef _MSC_VER
1465
+ #pragma warning(pop)
1466
+ #endif
1467
+
1468
+ CHECK_OBJECT(operand1);
1469
+ assert(PyInt_CheckExact(operand1));
1470
+ CHECK_OBJECT(operand2);
1471
+ assert(PyInt_CheckExact(operand2));
1472
+
1473
+ const long a = PyInt_AS_LONG(operand1);
1474
+ const long b = PyInt_AS_LONG(operand2);
1475
+
1476
+ if (unlikely(b < 0)) {
1477
+ PyThreadState *tstate = PyThreadState_GET();
1478
+
1479
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
1480
+ goto exit_result_exception;
1481
+ }
1482
+
1483
+ /* Short cut for zero shift or shifting zero. */
1484
+ if (a == 0 || b == 0) {
1485
+ goto exit_result_ok_left;
1486
+ } else if (b >= LONG_BIT) {
1487
+ if (a < 0) {
1488
+ goto exit_result_ok_const_int_neg_1;
1489
+ } else {
1490
+ goto exit_result_ok_const_int_0;
1491
+ }
1492
+ } else {
1493
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
1494
+
1495
+ clong_result = r;
1496
+ goto exit_result_ok_clong;
1497
+ }
1498
+
1499
+ exit_result_ok_clong:
1500
+ result = clong_result != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1501
+ goto exit_result_ok;
1502
+
1503
+ exit_result_ok_left:
1504
+ result = PyInt_AS_LONG(operand1) != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1505
+ goto exit_result_ok;
1506
+
1507
+ exit_result_ok_const_int_0:
1508
+ result = 0 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1509
+ goto exit_result_ok;
1510
+
1511
+ exit_result_ok_const_int_neg_1:
1512
+ result = -1 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1513
+ goto exit_result_ok;
1514
+
1515
+ exit_result_ok:
1516
+ return result;
1517
+
1518
+ exit_result_exception:
1519
+ return NUITKA_BOOL_EXCEPTION;
1520
+ }
1521
+
1522
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_INT_INT(PyObject *operand1, PyObject *operand2) {
1523
+ return _BINARY_OPERATION_RSHIFT_NBOOL_INT_INT(operand1, operand2);
1524
+ }
1525
+ #endif
1526
+
1527
+ #if PYTHON_VERSION < 0x300
1528
+ /* Code referring to "OBJECT" corresponds to any Python object and "INT" to Python2 'int'. */
1529
+ static HEDLEY_NEVER_INLINE nuitka_bool __BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_INT(PyObject *operand1,
1530
+ PyObject *operand2) {
1531
+ PyTypeObject *type1 = Py_TYPE(operand1);
1532
+
1533
+ #ifdef _MSC_VER
1534
+ #pragma warning(push)
1535
+ #pragma warning(disable : 4101)
1536
+ #endif
1537
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1538
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1539
+ #ifdef _MSC_VER
1540
+ #pragma warning(pop)
1541
+ #endif
1542
+
1543
+ binaryfunc slot1 =
1544
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
1545
+ binaryfunc slot2 = NULL;
1546
+
1547
+ if (!(type1 == &PyInt_Type)) {
1548
+ // Different types, need to consider second value slot.
1549
+
1550
+ slot2 = PyInt_Type.tp_as_number->nb_rshift;
1551
+
1552
+ if (slot1 == slot2) {
1553
+ slot2 = NULL;
1554
+ }
1555
+ }
1556
+
1557
+ if (slot1 != NULL) {
1558
+ PyObject *x = slot1(operand1, operand2);
1559
+
1560
+ if (x != Py_NotImplemented) {
1561
+ obj_result = x;
1562
+ goto exit_binary_result_object;
1563
+ }
1564
+
1565
+ Py_DECREF_IMMORTAL(x);
1566
+ }
1567
+
1568
+ if (slot2 != NULL) {
1569
+ PyObject *x = slot2(operand1, operand2);
1570
+
1571
+ if (x != Py_NotImplemented) {
1572
+ obj_result = x;
1573
+ goto exit_binary_result_object;
1574
+ }
1575
+
1576
+ Py_DECREF_IMMORTAL(x);
1577
+ }
1578
+
1579
+ #if PYTHON_VERSION < 0x300
1580
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !1) {
1581
+ coercion c1 =
1582
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
1583
+
1584
+ if (c1 != NULL) {
1585
+ PyObject *coerced1 = operand1;
1586
+ PyObject *coerced2 = operand2;
1587
+
1588
+ int err = c1(&coerced1, &coerced2);
1589
+
1590
+ if (unlikely(err < 0)) {
1591
+ goto exit_binary_exception;
1592
+ }
1593
+
1594
+ if (err == 0) {
1595
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1596
+
1597
+ if (likely(mv == NULL)) {
1598
+ binaryfunc slot = mv->nb_rshift;
1599
+
1600
+ if (likely(slot != NULL)) {
1601
+ PyObject *x = slot(coerced1, coerced2);
1602
+
1603
+ Py_DECREF(coerced1);
1604
+ Py_DECREF(coerced2);
1605
+
1606
+ obj_result = x;
1607
+ goto exit_binary_result_object;
1608
+ }
1609
+ }
1610
+
1611
+ // nb_coerce took a reference.
1612
+ Py_DECREF(coerced1);
1613
+ Py_DECREF(coerced2);
1614
+ }
1615
+ }
1616
+ coercion c2 = PyInt_Type.tp_as_number->nb_coerce;
1617
+
1618
+ if (c2 != NULL) {
1619
+ PyObject *coerced1 = operand1;
1620
+ PyObject *coerced2 = operand2;
1621
+
1622
+ int err = c2(&coerced2, &coerced1);
1623
+
1624
+ if (unlikely(err < 0)) {
1625
+ goto exit_binary_exception;
1626
+ }
1627
+
1628
+ if (err == 0) {
1629
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1630
+
1631
+ if (likely(mv == NULL)) {
1632
+ binaryfunc slot = mv->nb_rshift;
1633
+
1634
+ if (likely(slot != NULL)) {
1635
+ PyObject *x = slot(coerced1, coerced2);
1636
+
1637
+ Py_DECREF(coerced1);
1638
+ Py_DECREF(coerced2);
1639
+
1640
+ obj_result = x;
1641
+ goto exit_binary_result_object;
1642
+ }
1643
+ }
1644
+
1645
+ // nb_coerce took a reference.
1646
+ Py_DECREF(coerced1);
1647
+ Py_DECREF(coerced2);
1648
+ }
1649
+ }
1650
+ }
1651
+ #endif
1652
+
1653
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and 'int'", type1->tp_name);
1654
+ goto exit_binary_exception;
1655
+
1656
+ exit_binary_result_object:
1657
+ if (unlikely(obj_result == NULL)) {
1658
+ return NUITKA_BOOL_EXCEPTION;
1659
+ }
1660
+
1661
+ {
1662
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1663
+ Py_DECREF(obj_result);
1664
+ return r;
1665
+ }
1666
+
1667
+ exit_binary_exception:
1668
+ return NUITKA_BOOL_EXCEPTION;
1669
+ }
1670
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *operand2) {
1671
+ CHECK_OBJECT(operand1);
1672
+ CHECK_OBJECT(operand2);
1673
+ assert(PyInt_CheckExact(operand2));
1674
+
1675
+ PyTypeObject *type1 = Py_TYPE(operand1);
1676
+
1677
+ if (type1 == &PyInt_Type) {
1678
+ nuitka_bool result;
1679
+
1680
+ // return _BINARY_OPERATION_RSHIFT_NBOOL_INT_INT(operand1, operand2);
1681
+
1682
+ // Not every code path will make use of all possible results.
1683
+ #ifdef _MSC_VER
1684
+ #pragma warning(push)
1685
+ #pragma warning(disable : 4101)
1686
+ #endif
1687
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1688
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1689
+ NUITKA_MAY_BE_UNUSED long clong_result;
1690
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
1691
+ #ifdef _MSC_VER
1692
+ #pragma warning(pop)
1693
+ #endif
1694
+
1695
+ CHECK_OBJECT(operand1);
1696
+ assert(PyInt_CheckExact(operand1));
1697
+ CHECK_OBJECT(operand2);
1698
+ assert(PyInt_CheckExact(operand2));
1699
+
1700
+ const long a = PyInt_AS_LONG(operand1);
1701
+ const long b = PyInt_AS_LONG(operand2);
1702
+
1703
+ if (unlikely(b < 0)) {
1704
+ PyThreadState *tstate = PyThreadState_GET();
1705
+
1706
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
1707
+ goto exit_result_exception;
1708
+ }
1709
+
1710
+ /* Short cut for zero shift or shifting zero. */
1711
+ if (a == 0 || b == 0) {
1712
+ goto exit_result_ok_left;
1713
+ } else if (b >= LONG_BIT) {
1714
+ if (a < 0) {
1715
+ goto exit_result_ok_const_int_neg_1;
1716
+ } else {
1717
+ goto exit_result_ok_const_int_0;
1718
+ }
1719
+ } else {
1720
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
1721
+
1722
+ clong_result = r;
1723
+ goto exit_result_ok_clong;
1724
+ }
1725
+
1726
+ exit_result_ok_clong:
1727
+ result = clong_result != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1728
+ goto exit_result_ok;
1729
+
1730
+ exit_result_ok_left:
1731
+ result = PyInt_AS_LONG(operand1) != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1732
+ goto exit_result_ok;
1733
+
1734
+ exit_result_ok_const_int_0:
1735
+ result = 0 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1736
+ goto exit_result_ok;
1737
+
1738
+ exit_result_ok_const_int_neg_1:
1739
+ result = -1 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1740
+ goto exit_result_ok;
1741
+
1742
+ exit_result_ok:
1743
+ return result;
1744
+
1745
+ exit_result_exception:
1746
+ return NUITKA_BOOL_EXCEPTION;
1747
+ }
1748
+
1749
+ return __BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_INT(operand1, operand2);
1750
+ }
1751
+
1752
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *operand2) {
1753
+ return _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_INT(operand1, operand2);
1754
+ }
1755
+ #endif
1756
+
1757
+ #if PYTHON_VERSION < 0x300
1758
+ /* Code referring to "INT" corresponds to Python2 'int' and "OBJECT" to any Python object. */
1759
+ static HEDLEY_NEVER_INLINE nuitka_bool __BINARY_OPERATION_RSHIFT_NBOOL_INT_OBJECT(PyObject *operand1,
1760
+ PyObject *operand2) {
1761
+ PyTypeObject *type2 = Py_TYPE(operand2);
1762
+
1763
+ #ifdef _MSC_VER
1764
+ #pragma warning(push)
1765
+ #pragma warning(disable : 4101)
1766
+ #endif
1767
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1768
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1769
+ #ifdef _MSC_VER
1770
+ #pragma warning(pop)
1771
+ #endif
1772
+
1773
+ binaryfunc slot1 = PyInt_Type.tp_as_number->nb_rshift;
1774
+ binaryfunc slot2 = NULL;
1775
+
1776
+ if (!(&PyInt_Type == type2)) {
1777
+ // Different types, need to consider second value slot.
1778
+
1779
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
1780
+
1781
+ if (slot1 == slot2) {
1782
+ slot2 = NULL;
1783
+ }
1784
+ }
1785
+
1786
+ if (slot1 != NULL) {
1787
+ if (slot2 != NULL) {
1788
+ if (Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
1789
+ PyObject *x = slot2(operand1, operand2);
1790
+
1791
+ if (x != Py_NotImplemented) {
1792
+ obj_result = x;
1793
+ goto exit_binary_result_object;
1794
+ }
1795
+
1796
+ Py_DECREF_IMMORTAL(x);
1797
+ slot2 = NULL;
1798
+ }
1799
+ }
1800
+
1801
+ PyObject *x = slot1(operand1, operand2);
1802
+
1803
+ if (x != Py_NotImplemented) {
1804
+ obj_result = x;
1805
+ goto exit_binary_result_object;
1806
+ }
1807
+
1808
+ Py_DECREF_IMMORTAL(x);
1809
+ }
1810
+
1811
+ if (slot2 != NULL) {
1812
+ PyObject *x = slot2(operand1, operand2);
1813
+
1814
+ if (x != Py_NotImplemented) {
1815
+ obj_result = x;
1816
+ goto exit_binary_result_object;
1817
+ }
1818
+
1819
+ Py_DECREF_IMMORTAL(x);
1820
+ }
1821
+
1822
+ #if PYTHON_VERSION < 0x300
1823
+ if (!1 || !NEW_STYLE_NUMBER_TYPE(type2)) {
1824
+ coercion c1 = PyInt_Type.tp_as_number->nb_coerce;
1825
+
1826
+ if (c1 != NULL) {
1827
+ PyObject *coerced1 = operand1;
1828
+ PyObject *coerced2 = operand2;
1829
+
1830
+ int err = c1(&coerced1, &coerced2);
1831
+
1832
+ if (unlikely(err < 0)) {
1833
+ goto exit_binary_exception;
1834
+ }
1835
+
1836
+ if (err == 0) {
1837
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1838
+
1839
+ if (likely(mv == NULL)) {
1840
+ binaryfunc slot = mv->nb_rshift;
1841
+
1842
+ if (likely(slot != NULL)) {
1843
+ PyObject *x = slot(coerced1, coerced2);
1844
+
1845
+ Py_DECREF(coerced1);
1846
+ Py_DECREF(coerced2);
1847
+
1848
+ obj_result = x;
1849
+ goto exit_binary_result_object;
1850
+ }
1851
+ }
1852
+
1853
+ // nb_coerce took a reference.
1854
+ Py_DECREF(coerced1);
1855
+ Py_DECREF(coerced2);
1856
+ }
1857
+ }
1858
+ coercion c2 =
1859
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
1860
+
1861
+ if (c2 != NULL) {
1862
+ PyObject *coerced1 = operand1;
1863
+ PyObject *coerced2 = operand2;
1864
+
1865
+ int err = c2(&coerced2, &coerced1);
1866
+
1867
+ if (unlikely(err < 0)) {
1868
+ goto exit_binary_exception;
1869
+ }
1870
+
1871
+ if (err == 0) {
1872
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
1873
+
1874
+ if (likely(mv == NULL)) {
1875
+ binaryfunc slot = mv->nb_rshift;
1876
+
1877
+ if (likely(slot != NULL)) {
1878
+ PyObject *x = slot(coerced1, coerced2);
1879
+
1880
+ Py_DECREF(coerced1);
1881
+ Py_DECREF(coerced2);
1882
+
1883
+ obj_result = x;
1884
+ goto exit_binary_result_object;
1885
+ }
1886
+ }
1887
+
1888
+ // nb_coerce took a reference.
1889
+ Py_DECREF(coerced1);
1890
+ Py_DECREF(coerced2);
1891
+ }
1892
+ }
1893
+ }
1894
+ #endif
1895
+
1896
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and '%s'", type2->tp_name);
1897
+ goto exit_binary_exception;
1898
+
1899
+ exit_binary_result_object:
1900
+ if (unlikely(obj_result == NULL)) {
1901
+ return NUITKA_BOOL_EXCEPTION;
1902
+ }
1903
+
1904
+ {
1905
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1906
+ Py_DECREF(obj_result);
1907
+ return r;
1908
+ }
1909
+
1910
+ exit_binary_exception:
1911
+ return NUITKA_BOOL_EXCEPTION;
1912
+ }
1913
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *operand2) {
1914
+ CHECK_OBJECT(operand1);
1915
+ assert(PyInt_CheckExact(operand1));
1916
+ CHECK_OBJECT(operand2);
1917
+
1918
+ PyTypeObject *type2 = Py_TYPE(operand2);
1919
+
1920
+ if (&PyInt_Type == type2) {
1921
+ nuitka_bool result;
1922
+
1923
+ // return _BINARY_OPERATION_RSHIFT_NBOOL_INT_INT(operand1, operand2);
1924
+
1925
+ // Not every code path will make use of all possible results.
1926
+ #ifdef _MSC_VER
1927
+ #pragma warning(push)
1928
+ #pragma warning(disable : 4101)
1929
+ #endif
1930
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
1931
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
1932
+ NUITKA_MAY_BE_UNUSED long clong_result;
1933
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
1934
+ #ifdef _MSC_VER
1935
+ #pragma warning(pop)
1936
+ #endif
1937
+
1938
+ CHECK_OBJECT(operand1);
1939
+ assert(PyInt_CheckExact(operand1));
1940
+ CHECK_OBJECT(operand2);
1941
+ assert(PyInt_CheckExact(operand2));
1942
+
1943
+ const long a = PyInt_AS_LONG(operand1);
1944
+ const long b = PyInt_AS_LONG(operand2);
1945
+
1946
+ if (unlikely(b < 0)) {
1947
+ PyThreadState *tstate = PyThreadState_GET();
1948
+
1949
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
1950
+ goto exit_result_exception;
1951
+ }
1952
+
1953
+ /* Short cut for zero shift or shifting zero. */
1954
+ if (a == 0 || b == 0) {
1955
+ goto exit_result_ok_left;
1956
+ } else if (b >= LONG_BIT) {
1957
+ if (a < 0) {
1958
+ goto exit_result_ok_const_int_neg_1;
1959
+ } else {
1960
+ goto exit_result_ok_const_int_0;
1961
+ }
1962
+ } else {
1963
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
1964
+
1965
+ clong_result = r;
1966
+ goto exit_result_ok_clong;
1967
+ }
1968
+
1969
+ exit_result_ok_clong:
1970
+ result = clong_result != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1971
+ goto exit_result_ok;
1972
+
1973
+ exit_result_ok_left:
1974
+ result = PyInt_AS_LONG(operand1) != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1975
+ goto exit_result_ok;
1976
+
1977
+ exit_result_ok_const_int_0:
1978
+ result = 0 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1979
+ goto exit_result_ok;
1980
+
1981
+ exit_result_ok_const_int_neg_1:
1982
+ result = -1 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
1983
+ goto exit_result_ok;
1984
+
1985
+ exit_result_ok:
1986
+ return result;
1987
+
1988
+ exit_result_exception:
1989
+ return NUITKA_BOOL_EXCEPTION;
1990
+ }
1991
+
1992
+ return __BINARY_OPERATION_RSHIFT_NBOOL_INT_OBJECT(operand1, operand2);
1993
+ }
1994
+
1995
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *operand2) {
1996
+ return _BINARY_OPERATION_RSHIFT_NBOOL_INT_OBJECT(operand1, operand2);
1997
+ }
1998
+ #endif
1999
+
2000
+ #if PYTHON_VERSION < 0x300
2001
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
2002
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
2003
+ CHECK_OBJECT(operand1);
2004
+ assert(PyLong_CheckExact(operand1));
2005
+ CHECK_OBJECT(operand2);
2006
+ assert(PyInt_CheckExact(operand2));
2007
+
2008
+ #ifdef _MSC_VER
2009
+ #pragma warning(push)
2010
+ #pragma warning(disable : 4101)
2011
+ #endif
2012
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2013
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2014
+ #ifdef _MSC_VER
2015
+ #pragma warning(pop)
2016
+ #endif
2017
+
2018
+ binaryfunc slot1 = PyLong_Type.tp_as_number->nb_rshift;
2019
+ // Slot2 ignored on purpose, type1 takes precedence.
2020
+
2021
+ if (slot1 != NULL) {
2022
+ PyObject *x = slot1(operand1, operand2);
2023
+
2024
+ if (x != Py_NotImplemented) {
2025
+ obj_result = x;
2026
+ goto exit_binary_result_object;
2027
+ }
2028
+
2029
+ Py_DECREF_IMMORTAL(x);
2030
+ }
2031
+
2032
+ // Statically recognized that coercion is not possible with these types
2033
+
2034
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'long' and 'int'");
2035
+ goto exit_binary_exception;
2036
+
2037
+ exit_binary_result_object:
2038
+ return obj_result;
2039
+
2040
+ exit_binary_exception:
2041
+ return NULL;
2042
+ }
2043
+
2044
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
2045
+ return _BINARY_OPERATION_RSHIFT_OBJECT_LONG_INT(operand1, operand2);
2046
+ }
2047
+ #endif
2048
+
2049
+ #if PYTHON_VERSION < 0x300
2050
+ /* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
2051
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_INT_LONG(PyObject *operand1, PyObject *operand2) {
2052
+ CHECK_OBJECT(operand1);
2053
+ assert(PyInt_CheckExact(operand1));
2054
+ CHECK_OBJECT(operand2);
2055
+ assert(PyLong_CheckExact(operand2));
2056
+
2057
+ #ifdef _MSC_VER
2058
+ #pragma warning(push)
2059
+ #pragma warning(disable : 4101)
2060
+ #endif
2061
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2062
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2063
+ #ifdef _MSC_VER
2064
+ #pragma warning(pop)
2065
+ #endif
2066
+
2067
+ // Slot1 ignored on purpose, type2 takes precedence.
2068
+ binaryfunc slot2 = NULL;
2069
+
2070
+ if (!(0)) {
2071
+ // Different types, need to consider second value slot.
2072
+
2073
+ slot2 = PyLong_Type.tp_as_number->nb_rshift;
2074
+ }
2075
+
2076
+ if (slot2 != NULL) {
2077
+ PyObject *x = slot2(operand1, operand2);
2078
+
2079
+ if (x != Py_NotImplemented) {
2080
+ obj_result = x;
2081
+ goto exit_binary_result_object;
2082
+ }
2083
+
2084
+ Py_DECREF_IMMORTAL(x);
2085
+ }
2086
+
2087
+ // Statically recognized that coercion is not possible with these types
2088
+
2089
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and 'long'");
2090
+ goto exit_binary_exception;
2091
+
2092
+ exit_binary_result_object:
2093
+ return obj_result;
2094
+
2095
+ exit_binary_exception:
2096
+ return NULL;
2097
+ }
2098
+
2099
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_INT_LONG(PyObject *operand1, PyObject *operand2) {
2100
+ return _BINARY_OPERATION_RSHIFT_OBJECT_INT_LONG(operand1, operand2);
2101
+ }
2102
+ #endif
2103
+
2104
+ #if PYTHON_VERSION < 0x300
2105
+ /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
2106
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
2107
+ CHECK_OBJECT(operand1);
2108
+ assert(PyLong_CheckExact(operand1));
2109
+ CHECK_OBJECT(operand2);
2110
+ assert(PyInt_CheckExact(operand2));
2111
+
2112
+ #ifdef _MSC_VER
2113
+ #pragma warning(push)
2114
+ #pragma warning(disable : 4101)
2115
+ #endif
2116
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2117
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2118
+ #ifdef _MSC_VER
2119
+ #pragma warning(pop)
2120
+ #endif
2121
+
2122
+ binaryfunc slot1 = PyLong_Type.tp_as_number->nb_rshift;
2123
+ // Slot2 ignored on purpose, type1 takes precedence.
2124
+
2125
+ if (slot1 != NULL) {
2126
+ PyObject *x = slot1(operand1, operand2);
2127
+
2128
+ if (x != Py_NotImplemented) {
2129
+ obj_result = x;
2130
+ goto exit_binary_result_object;
2131
+ }
2132
+
2133
+ Py_DECREF_IMMORTAL(x);
2134
+ }
2135
+
2136
+ // Statically recognized that coercion is not possible with these types
2137
+
2138
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'long' and 'int'");
2139
+ goto exit_binary_exception;
2140
+
2141
+ exit_binary_result_object:
2142
+ if (unlikely(obj_result == NULL)) {
2143
+ return NUITKA_BOOL_EXCEPTION;
2144
+ }
2145
+
2146
+ {
2147
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2148
+ Py_DECREF(obj_result);
2149
+ return r;
2150
+ }
2151
+
2152
+ exit_binary_exception:
2153
+ return NUITKA_BOOL_EXCEPTION;
2154
+ }
2155
+
2156
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
2157
+ return _BINARY_OPERATION_RSHIFT_NBOOL_LONG_INT(operand1, operand2);
2158
+ }
2159
+ #endif
2160
+
2161
+ #if PYTHON_VERSION < 0x300
2162
+ /* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
2163
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_INT_LONG(PyObject *operand1, PyObject *operand2) {
2164
+ CHECK_OBJECT(operand1);
2165
+ assert(PyInt_CheckExact(operand1));
2166
+ CHECK_OBJECT(operand2);
2167
+ assert(PyLong_CheckExact(operand2));
2168
+
2169
+ #ifdef _MSC_VER
2170
+ #pragma warning(push)
2171
+ #pragma warning(disable : 4101)
2172
+ #endif
2173
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2174
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2175
+ #ifdef _MSC_VER
2176
+ #pragma warning(pop)
2177
+ #endif
2178
+
2179
+ // Slot1 ignored on purpose, type2 takes precedence.
2180
+ binaryfunc slot2 = NULL;
2181
+
2182
+ if (!(0)) {
2183
+ // Different types, need to consider second value slot.
2184
+
2185
+ slot2 = PyLong_Type.tp_as_number->nb_rshift;
2186
+ }
2187
+
2188
+ if (slot2 != NULL) {
2189
+ PyObject *x = slot2(operand1, operand2);
2190
+
2191
+ if (x != Py_NotImplemented) {
2192
+ obj_result = x;
2193
+ goto exit_binary_result_object;
2194
+ }
2195
+
2196
+ Py_DECREF_IMMORTAL(x);
2197
+ }
2198
+
2199
+ // Statically recognized that coercion is not possible with these types
2200
+
2201
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: 'int' and 'long'");
2202
+ goto exit_binary_exception;
2203
+
2204
+ exit_binary_result_object:
2205
+ if (unlikely(obj_result == NULL)) {
2206
+ return NUITKA_BOOL_EXCEPTION;
2207
+ }
2208
+
2209
+ {
2210
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2211
+ Py_DECREF(obj_result);
2212
+ return r;
2213
+ }
2214
+
2215
+ exit_binary_exception:
2216
+ return NUITKA_BOOL_EXCEPTION;
2217
+ }
2218
+
2219
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_INT_LONG(PyObject *operand1, PyObject *operand2) {
2220
+ return _BINARY_OPERATION_RSHIFT_NBOOL_INT_LONG(operand1, operand2);
2221
+ }
2222
+ #endif
2223
+
2224
+ /* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
2225
+ static PyObject *_BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2) {
2226
+ CHECK_OBJECT(operand1);
2227
+ CHECK_OBJECT(operand2);
2228
+
2229
+ #if PYTHON_VERSION < 0x300
2230
+ if (PyInt_CheckExact(operand1) && PyInt_CheckExact(operand2)) {
2231
+ PyObject *result;
2232
+
2233
+ // Not every code path will make use of all possible results.
2234
+ #ifdef _MSC_VER
2235
+ #pragma warning(push)
2236
+ #pragma warning(disable : 4101)
2237
+ #endif
2238
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2239
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2240
+ NUITKA_MAY_BE_UNUSED long clong_result;
2241
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
2242
+ #ifdef _MSC_VER
2243
+ #pragma warning(pop)
2244
+ #endif
2245
+
2246
+ CHECK_OBJECT(operand1);
2247
+ assert(PyInt_CheckExact(operand1));
2248
+ CHECK_OBJECT(operand2);
2249
+ assert(PyInt_CheckExact(operand2));
2250
+
2251
+ const long a = PyInt_AS_LONG(operand1);
2252
+ const long b = PyInt_AS_LONG(operand2);
2253
+
2254
+ if (unlikely(b < 0)) {
2255
+ PyThreadState *tstate = PyThreadState_GET();
2256
+
2257
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
2258
+ goto exit_result_exception;
2259
+ }
2260
+
2261
+ /* Short cut for zero shift or shifting zero. */
2262
+ if (a == 0 || b == 0) {
2263
+ goto exit_result_ok_left;
2264
+ } else if (b >= LONG_BIT) {
2265
+ if (a < 0) {
2266
+ goto exit_result_ok_const_int_neg_1;
2267
+ } else {
2268
+ goto exit_result_ok_const_int_0;
2269
+ }
2270
+ } else {
2271
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
2272
+
2273
+ clong_result = r;
2274
+ goto exit_result_ok_clong;
2275
+ }
2276
+
2277
+ exit_result_ok_clong:
2278
+ result = Nuitka_PyInt_FromLong(clong_result);
2279
+ goto exit_result_ok;
2280
+
2281
+ exit_result_ok_left:
2282
+ result = operand1;
2283
+ Py_INCREF(result);
2284
+ goto exit_result_ok;
2285
+
2286
+ exit_result_ok_const_int_0:
2287
+ Py_INCREF(const_int_0);
2288
+ result = const_int_0;
2289
+ goto exit_result_ok;
2290
+
2291
+ exit_result_ok_const_int_neg_1:
2292
+ Py_INCREF(const_int_neg_1);
2293
+ result = const_int_neg_1;
2294
+ goto exit_result_ok;
2295
+
2296
+ exit_result_ok:
2297
+ return result;
2298
+
2299
+ exit_result_exception:
2300
+ return NULL;
2301
+ }
2302
+ #endif
2303
+
2304
+ PyTypeObject *type1 = Py_TYPE(operand1);
2305
+ PyTypeObject *type2 = Py_TYPE(operand2);
2306
+
2307
+ #ifdef _MSC_VER
2308
+ #pragma warning(push)
2309
+ #pragma warning(disable : 4101)
2310
+ #endif
2311
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2312
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2313
+ #ifdef _MSC_VER
2314
+ #pragma warning(pop)
2315
+ #endif
2316
+
2317
+ binaryfunc slot1 =
2318
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
2319
+ binaryfunc slot2 = NULL;
2320
+
2321
+ if (!(type1 == type2)) {
2322
+ // Different types, need to consider second value slot.
2323
+
2324
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
2325
+
2326
+ if (slot1 == slot2) {
2327
+ slot2 = NULL;
2328
+ }
2329
+ }
2330
+
2331
+ if (slot1 != NULL) {
2332
+ if (slot2 != NULL) {
2333
+ if (Nuitka_Type_IsSubtype(type2, type1)) {
2334
+ PyObject *x = slot2(operand1, operand2);
2335
+
2336
+ if (x != Py_NotImplemented) {
2337
+ obj_result = x;
2338
+ goto exit_binary_result_object;
2339
+ }
2340
+
2341
+ Py_DECREF_IMMORTAL(x);
2342
+ slot2 = NULL;
2343
+ }
2344
+ }
2345
+
2346
+ PyObject *x = slot1(operand1, operand2);
2347
+
2348
+ if (x != Py_NotImplemented) {
2349
+ obj_result = x;
2350
+ goto exit_binary_result_object;
2351
+ }
2352
+
2353
+ Py_DECREF_IMMORTAL(x);
2354
+ }
2355
+
2356
+ if (slot2 != NULL) {
2357
+ PyObject *x = slot2(operand1, operand2);
2358
+
2359
+ if (x != Py_NotImplemented) {
2360
+ obj_result = x;
2361
+ goto exit_binary_result_object;
2362
+ }
2363
+
2364
+ Py_DECREF_IMMORTAL(x);
2365
+ }
2366
+
2367
+ #if PYTHON_VERSION < 0x300
2368
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !NEW_STYLE_NUMBER_TYPE(type2)) {
2369
+ coercion c1 =
2370
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
2371
+
2372
+ if (c1 != NULL) {
2373
+ PyObject *coerced1 = operand1;
2374
+ PyObject *coerced2 = operand2;
2375
+
2376
+ int err = c1(&coerced1, &coerced2);
2377
+
2378
+ if (unlikely(err < 0)) {
2379
+ goto exit_binary_exception;
2380
+ }
2381
+
2382
+ if (err == 0) {
2383
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
2384
+
2385
+ if (likely(mv == NULL)) {
2386
+ binaryfunc slot = mv->nb_rshift;
2387
+
2388
+ if (likely(slot != NULL)) {
2389
+ PyObject *x = slot(coerced1, coerced2);
2390
+
2391
+ Py_DECREF(coerced1);
2392
+ Py_DECREF(coerced2);
2393
+
2394
+ obj_result = x;
2395
+ goto exit_binary_result_object;
2396
+ }
2397
+ }
2398
+
2399
+ // nb_coerce took a reference.
2400
+ Py_DECREF(coerced1);
2401
+ Py_DECREF(coerced2);
2402
+ }
2403
+ }
2404
+ coercion c2 =
2405
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
2406
+
2407
+ if (c2 != NULL) {
2408
+ PyObject *coerced1 = operand1;
2409
+ PyObject *coerced2 = operand2;
2410
+
2411
+ int err = c2(&coerced2, &coerced1);
2412
+
2413
+ if (unlikely(err < 0)) {
2414
+ goto exit_binary_exception;
2415
+ }
2416
+
2417
+ if (err == 0) {
2418
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
2419
+
2420
+ if (likely(mv == NULL)) {
2421
+ binaryfunc slot = mv->nb_rshift;
2422
+
2423
+ if (likely(slot != NULL)) {
2424
+ PyObject *x = slot(coerced1, coerced2);
2425
+
2426
+ Py_DECREF(coerced1);
2427
+ Py_DECREF(coerced2);
2428
+
2429
+ obj_result = x;
2430
+ goto exit_binary_result_object;
2431
+ }
2432
+ }
2433
+
2434
+ // nb_coerce took a reference.
2435
+ Py_DECREF(coerced1);
2436
+ Py_DECREF(coerced2);
2437
+ }
2438
+ }
2439
+ }
2440
+ #endif
2441
+
2442
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and '%s'", type1->tp_name, type2->tp_name);
2443
+ goto exit_binary_exception;
2444
+
2445
+ exit_binary_result_object:
2446
+ return obj_result;
2447
+
2448
+ exit_binary_exception:
2449
+ return NULL;
2450
+ }
2451
+
2452
+ PyObject *BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2) {
2453
+ return _BINARY_OPERATION_RSHIFT_OBJECT_OBJECT_OBJECT(operand1, operand2);
2454
+ }
2455
+
2456
+ /* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
2457
+ static nuitka_bool _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2) {
2458
+ CHECK_OBJECT(operand1);
2459
+ CHECK_OBJECT(operand2);
2460
+
2461
+ #if PYTHON_VERSION < 0x300
2462
+ if (PyInt_CheckExact(operand1) && PyInt_CheckExact(operand2)) {
2463
+ nuitka_bool result;
2464
+
2465
+ // Not every code path will make use of all possible results.
2466
+ #ifdef _MSC_VER
2467
+ #pragma warning(push)
2468
+ #pragma warning(disable : 4101)
2469
+ #endif
2470
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2471
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2472
+ NUITKA_MAY_BE_UNUSED long clong_result;
2473
+ NUITKA_MAY_BE_UNUSED double cfloat_result;
2474
+ #ifdef _MSC_VER
2475
+ #pragma warning(pop)
2476
+ #endif
2477
+
2478
+ CHECK_OBJECT(operand1);
2479
+ assert(PyInt_CheckExact(operand1));
2480
+ CHECK_OBJECT(operand2);
2481
+ assert(PyInt_CheckExact(operand2));
2482
+
2483
+ const long a = PyInt_AS_LONG(operand1);
2484
+ const long b = PyInt_AS_LONG(operand2);
2485
+
2486
+ if (unlikely(b < 0)) {
2487
+ PyThreadState *tstate = PyThreadState_GET();
2488
+
2489
+ SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "negative shift count");
2490
+ goto exit_result_exception;
2491
+ }
2492
+
2493
+ /* Short cut for zero shift or shifting zero. */
2494
+ if (a == 0 || b == 0) {
2495
+ goto exit_result_ok_left;
2496
+ } else if (b >= LONG_BIT) {
2497
+ if (a < 0) {
2498
+ goto exit_result_ok_const_int_neg_1;
2499
+ } else {
2500
+ goto exit_result_ok_const_int_0;
2501
+ }
2502
+ } else {
2503
+ long r = Py_ARITHMETIC_RIGHT_SHIFT(long, a, b);
2504
+
2505
+ clong_result = r;
2506
+ goto exit_result_ok_clong;
2507
+ }
2508
+
2509
+ exit_result_ok_clong:
2510
+ result = clong_result != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2511
+ goto exit_result_ok;
2512
+
2513
+ exit_result_ok_left:
2514
+ result = PyInt_AS_LONG(operand1) != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2515
+ goto exit_result_ok;
2516
+
2517
+ exit_result_ok_const_int_0:
2518
+ result = 0 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2519
+ goto exit_result_ok;
2520
+
2521
+ exit_result_ok_const_int_neg_1:
2522
+ result = -1 != 0 ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2523
+ goto exit_result_ok;
2524
+
2525
+ exit_result_ok:
2526
+ return result;
2527
+
2528
+ exit_result_exception:
2529
+ return NUITKA_BOOL_EXCEPTION;
2530
+ }
2531
+ #endif
2532
+
2533
+ PyTypeObject *type1 = Py_TYPE(operand1);
2534
+ PyTypeObject *type2 = Py_TYPE(operand2);
2535
+
2536
+ #ifdef _MSC_VER
2537
+ #pragma warning(push)
2538
+ #pragma warning(disable : 4101)
2539
+ #endif
2540
+ NUITKA_MAY_BE_UNUSED bool cbool_result;
2541
+ NUITKA_MAY_BE_UNUSED PyObject *obj_result;
2542
+ #ifdef _MSC_VER
2543
+ #pragma warning(pop)
2544
+ #endif
2545
+
2546
+ binaryfunc slot1 =
2547
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_rshift : NULL;
2548
+ binaryfunc slot2 = NULL;
2549
+
2550
+ if (!(type1 == type2)) {
2551
+ // Different types, need to consider second value slot.
2552
+
2553
+ slot2 = (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_rshift : NULL;
2554
+
2555
+ if (slot1 == slot2) {
2556
+ slot2 = NULL;
2557
+ }
2558
+ }
2559
+
2560
+ if (slot1 != NULL) {
2561
+ if (slot2 != NULL) {
2562
+ if (Nuitka_Type_IsSubtype(type2, type1)) {
2563
+ PyObject *x = slot2(operand1, operand2);
2564
+
2565
+ if (x != Py_NotImplemented) {
2566
+ obj_result = x;
2567
+ goto exit_binary_result_object;
2568
+ }
2569
+
2570
+ Py_DECREF_IMMORTAL(x);
2571
+ slot2 = NULL;
2572
+ }
2573
+ }
2574
+
2575
+ PyObject *x = slot1(operand1, operand2);
2576
+
2577
+ if (x != Py_NotImplemented) {
2578
+ obj_result = x;
2579
+ goto exit_binary_result_object;
2580
+ }
2581
+
2582
+ Py_DECREF_IMMORTAL(x);
2583
+ }
2584
+
2585
+ if (slot2 != NULL) {
2586
+ PyObject *x = slot2(operand1, operand2);
2587
+
2588
+ if (x != Py_NotImplemented) {
2589
+ obj_result = x;
2590
+ goto exit_binary_result_object;
2591
+ }
2592
+
2593
+ Py_DECREF_IMMORTAL(x);
2594
+ }
2595
+
2596
+ #if PYTHON_VERSION < 0x300
2597
+ if (!NEW_STYLE_NUMBER_TYPE(type1) || !NEW_STYLE_NUMBER_TYPE(type2)) {
2598
+ coercion c1 =
2599
+ (type1->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type1)) ? type1->tp_as_number->nb_coerce : NULL;
2600
+
2601
+ if (c1 != NULL) {
2602
+ PyObject *coerced1 = operand1;
2603
+ PyObject *coerced2 = operand2;
2604
+
2605
+ int err = c1(&coerced1, &coerced2);
2606
+
2607
+ if (unlikely(err < 0)) {
2608
+ goto exit_binary_exception;
2609
+ }
2610
+
2611
+ if (err == 0) {
2612
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
2613
+
2614
+ if (likely(mv == NULL)) {
2615
+ binaryfunc slot = mv->nb_rshift;
2616
+
2617
+ if (likely(slot != NULL)) {
2618
+ PyObject *x = slot(coerced1, coerced2);
2619
+
2620
+ Py_DECREF(coerced1);
2621
+ Py_DECREF(coerced2);
2622
+
2623
+ obj_result = x;
2624
+ goto exit_binary_result_object;
2625
+ }
2626
+ }
2627
+
2628
+ // nb_coerce took a reference.
2629
+ Py_DECREF(coerced1);
2630
+ Py_DECREF(coerced2);
2631
+ }
2632
+ }
2633
+ coercion c2 =
2634
+ (type2->tp_as_number != NULL && NEW_STYLE_NUMBER_TYPE(type2)) ? type2->tp_as_number->nb_coerce : NULL;
2635
+
2636
+ if (c2 != NULL) {
2637
+ PyObject *coerced1 = operand1;
2638
+ PyObject *coerced2 = operand2;
2639
+
2640
+ int err = c2(&coerced2, &coerced1);
2641
+
2642
+ if (unlikely(err < 0)) {
2643
+ goto exit_binary_exception;
2644
+ }
2645
+
2646
+ if (err == 0) {
2647
+ PyNumberMethods *mv = Py_TYPE(coerced1)->tp_as_number;
2648
+
2649
+ if (likely(mv == NULL)) {
2650
+ binaryfunc slot = mv->nb_rshift;
2651
+
2652
+ if (likely(slot != NULL)) {
2653
+ PyObject *x = slot(coerced1, coerced2);
2654
+
2655
+ Py_DECREF(coerced1);
2656
+ Py_DECREF(coerced2);
2657
+
2658
+ obj_result = x;
2659
+ goto exit_binary_result_object;
2660
+ }
2661
+ }
2662
+
2663
+ // nb_coerce took a reference.
2664
+ Py_DECREF(coerced1);
2665
+ Py_DECREF(coerced2);
2666
+ }
2667
+ }
2668
+ }
2669
+ #endif
2670
+
2671
+ PyErr_Format(PyExc_TypeError, "unsupported operand type(s) for >>: '%s' and '%s'", type1->tp_name, type2->tp_name);
2672
+ goto exit_binary_exception;
2673
+
2674
+ exit_binary_result_object:
2675
+ if (unlikely(obj_result == NULL)) {
2676
+ return NUITKA_BOOL_EXCEPTION;
2677
+ }
2678
+
2679
+ {
2680
+ nuitka_bool r = CHECK_IF_TRUE(obj_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
2681
+ Py_DECREF(obj_result);
2682
+ return r;
2683
+ }
2684
+
2685
+ exit_binary_exception:
2686
+ return NUITKA_BOOL_EXCEPTION;
2687
+ }
2688
+
2689
+ nuitka_bool BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2) {
2690
+ return _BINARY_OPERATION_RSHIFT_NBOOL_OBJECT_OBJECT(operand1, operand2);
2691
+ }
2692
+
2693
+ // Part of "Nuitka", an optimizing Python compiler that is compatible and
2694
+ // integrates with CPython, but also works on its own.
2695
+ //
2696
+ // Licensed under the Apache License, Version 2.0 (the "License");
2697
+ // you may not use this file except in compliance with the License.
2698
+ // You may obtain a copy of the License at
2699
+ //
2700
+ // http://www.apache.org/licenses/LICENSE-2.0
2701
+ //
2702
+ // Unless required by applicable law or agreed to in writing, software
2703
+ // distributed under the License is distributed on an "AS IS" BASIS,
2704
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2705
+ // See the License for the specific language governing permissions and
2706
+ // limitations under the License.