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,3419 @@
1
+ # Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
+
3
+
4
+ # We are not avoiding these in generated code at all
5
+ # pylint: disable=I0021,line-too-long,too-many-instance-attributes,too-many-lines
6
+ # pylint: disable=I0021,too-many-arguments,too-many-return-statements,too-many-statements
7
+
8
+
9
+ """Children having statement bases
10
+
11
+ WARNING, this code is GENERATED. Modify the template ChildrenHavingMixin.py.j2 instead!
12
+
13
+ spell-checker: ignore __prepare__ append args autograph capitalize casefold center chars
14
+ spell-checker: ignore clear copy count decode default delete dist distribution_name encode
15
+ spell-checker: ignore encoding end endswith errors exit_code expandtabs
16
+ spell-checker: ignore experimental_attributes experimental_autograph_options
17
+ spell-checker: ignore experimental_compile experimental_follow_type_hints
18
+ spell-checker: ignore experimental_implements experimental_relax_shapes extend fillchar
19
+ spell-checker: ignore find format format_map formatmap fromkeys func get group handle
20
+ spell-checker: ignore has_key haskey index input_signature insert isalnum isalpha isascii
21
+ spell-checker: ignore isdecimal isdigit isidentifier islower isnumeric isprintable isspace
22
+ spell-checker: ignore istitle isupper item items iterable iteritems iterkeys itervalues
23
+ spell-checker: ignore jit_compile join keepends key keys kwargs ljust lower lstrip
24
+ spell-checker: ignore maketrans maxsplit mode name new old p package
25
+ spell-checker: ignore package_or_requirement pairs partition path pop popitem prefix
26
+ spell-checker: ignore prepare reduce_retracing remove replace resource resource_name
27
+ spell-checker: ignore reverse rfind rindex rjust rpartition rsplit rstrip s sep setdefault
28
+ spell-checker: ignore sort split splitlines start startswith stop strip sub suffix
29
+ spell-checker: ignore swapcase table tabsize title translate update upper use_errno
30
+ spell-checker: ignore use_last_error value values viewitems viewkeys viewvalues width
31
+ spell-checker: ignore winmode zfill
32
+ """
33
+
34
+
35
+ # Loop unrolling over child names, pylint: disable=too-many-branches
36
+
37
+ from abc import abstractmethod
38
+
39
+ from .Checkers import (
40
+ checkStatementsSequence,
41
+ checkStatementsSequenceOrNone,
42
+ convertNoneConstantToNone,
43
+ )
44
+ from .NodeBases import StatementBase
45
+
46
+
47
+ class StatementNoChildHavingLocalsScopeMixin(StatementBase):
48
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
49
+ __slots__ = ()
50
+
51
+ # This is generated for use in
52
+ # StatementSetLocalsDictionary
53
+
54
+ def __init__(self, locals_scope, source_ref):
55
+ self.locals_scope = locals_scope
56
+
57
+ StatementBase.__init__(self, source_ref)
58
+
59
+ def getDetails(self):
60
+ return {
61
+ "locals_scope": self.locals_scope,
62
+ }
63
+
64
+ def getVisitableNodes(self):
65
+ """The visitable nodes, with tuple values flattened."""
66
+
67
+ return ()
68
+
69
+ def getVisitableNodesNamed(self):
70
+ """Named children dictionary.
71
+
72
+ For use in cloning nodes, debugging and XML output.
73
+ """
74
+
75
+ return ()
76
+
77
+ def replaceChild(self, old_node, new_node):
78
+ raise AssertionError("Didn't find child", old_node, "in", self)
79
+
80
+ def getCloneArgs(self):
81
+ """Get clones of all children to pass for a new node.
82
+
83
+ Needs to make clones of child nodes too.
84
+ """
85
+
86
+ values = {}
87
+
88
+ values.update(self.getDetails())
89
+
90
+ return values
91
+
92
+ def finalize(self):
93
+ del self.parent
94
+
95
+ del self.locals_scope
96
+
97
+ def collectVariableAccesses(self, emit_read, emit_write):
98
+ """Collect variable reads and writes of child nodes."""
99
+
100
+
101
+ # Assign the names that are easier to import with a stable name.
102
+ StatementSetLocalsDictionaryBase = StatementNoChildHavingLocalsScopeMixin
103
+
104
+
105
+ class StatementChildrenHavingConditionYesBranchOptionalStatementsOrNoneNoBranchOptionalStatementsOrNoneMixin(
106
+ StatementBase
107
+ ):
108
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
109
+ __slots__ = ()
110
+
111
+ # This is generated for use in
112
+ # StatementConditional
113
+
114
+ def __init__(self, condition, yes_branch, no_branch, source_ref):
115
+ condition.parent = self
116
+
117
+ self.subnode_condition = condition
118
+
119
+ yes_branch = checkStatementsSequenceOrNone(yes_branch)
120
+ if yes_branch is not None:
121
+ yes_branch.parent = self
122
+
123
+ self.subnode_yes_branch = yes_branch
124
+
125
+ no_branch = checkStatementsSequenceOrNone(no_branch)
126
+ if no_branch is not None:
127
+ no_branch.parent = self
128
+
129
+ self.subnode_no_branch = no_branch
130
+
131
+ StatementBase.__init__(self, source_ref)
132
+
133
+ def setChildNoBranch(self, value):
134
+ value = checkStatementsSequenceOrNone(value)
135
+ if value is not None:
136
+ value.parent = self
137
+
138
+ self.subnode_no_branch = value
139
+
140
+ def setChildYesBranch(self, value):
141
+ value = checkStatementsSequenceOrNone(value)
142
+ if value is not None:
143
+ value.parent = self
144
+
145
+ self.subnode_yes_branch = value
146
+
147
+ def getVisitableNodes(self):
148
+ """The visitable nodes, with tuple values flattened."""
149
+
150
+ result = []
151
+ result.append(self.subnode_condition)
152
+ value = self.subnode_yes_branch
153
+ if value is None:
154
+ pass
155
+ else:
156
+ result.append(value)
157
+ value = self.subnode_no_branch
158
+ if value is None:
159
+ pass
160
+ else:
161
+ result.append(value)
162
+ return tuple(result)
163
+
164
+ def getVisitableNodesNamed(self):
165
+ """Named children dictionary.
166
+
167
+ For use in cloning nodes, debugging and XML output.
168
+ """
169
+
170
+ return (
171
+ ("condition", self.subnode_condition),
172
+ ("yes_branch", self.subnode_yes_branch),
173
+ ("no_branch", self.subnode_no_branch),
174
+ )
175
+
176
+ def replaceChild(self, old_node, new_node):
177
+ value = self.subnode_condition
178
+ if old_node is value:
179
+ new_node.parent = self
180
+
181
+ self.subnode_condition = new_node
182
+
183
+ return
184
+
185
+ value = self.subnode_yes_branch
186
+ if old_node is value:
187
+ new_node = checkStatementsSequenceOrNone(new_node)
188
+ if new_node is not None:
189
+ new_node.parent = self
190
+
191
+ self.subnode_yes_branch = new_node
192
+
193
+ return
194
+
195
+ value = self.subnode_no_branch
196
+ if old_node is value:
197
+ new_node = checkStatementsSequenceOrNone(new_node)
198
+ if new_node is not None:
199
+ new_node.parent = self
200
+
201
+ self.subnode_no_branch = new_node
202
+
203
+ return
204
+
205
+ raise AssertionError("Didn't find child", old_node, "in", self)
206
+
207
+ def getCloneArgs(self):
208
+ """Get clones of all children to pass for a new node.
209
+
210
+ Needs to make clones of child nodes too.
211
+ """
212
+
213
+ values = {
214
+ "condition": self.subnode_condition.makeClone(),
215
+ "yes_branch": (
216
+ self.subnode_yes_branch.makeClone()
217
+ if self.subnode_yes_branch is not None
218
+ else None
219
+ ),
220
+ "no_branch": (
221
+ self.subnode_no_branch.makeClone()
222
+ if self.subnode_no_branch is not None
223
+ else None
224
+ ),
225
+ }
226
+
227
+ values.update(self.getDetails())
228
+
229
+ return values
230
+
231
+ def finalize(self):
232
+ del self.parent
233
+
234
+ self.subnode_condition.finalize()
235
+ del self.subnode_condition
236
+ if self.subnode_yes_branch is not None:
237
+ self.subnode_yes_branch.finalize()
238
+ del self.subnode_yes_branch
239
+ if self.subnode_no_branch is not None:
240
+ self.subnode_no_branch.finalize()
241
+ del self.subnode_no_branch
242
+
243
+ def collectVariableAccesses(self, emit_read, emit_write):
244
+ """Collect variable reads and writes of child nodes."""
245
+
246
+ self.subnode_condition.collectVariableAccesses(emit_read, emit_write)
247
+ subnode_yes_branch = self.subnode_yes_branch
248
+
249
+ if subnode_yes_branch is not None:
250
+ self.subnode_yes_branch.collectVariableAccesses(emit_read, emit_write)
251
+ subnode_no_branch = self.subnode_no_branch
252
+
253
+ if subnode_no_branch is not None:
254
+ self.subnode_no_branch.collectVariableAccesses(emit_read, emit_write)
255
+
256
+
257
+ # Assign the names that are easier to import with a stable name.
258
+ StatementConditionalBase = StatementChildrenHavingConditionYesBranchOptionalStatementsOrNoneNoBranchOptionalStatementsOrNoneMixin
259
+
260
+
261
+ class StatementChildHavingDestOptionalOperationMixin(StatementBase):
262
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
263
+ __slots__ = ()
264
+
265
+ # This is generated for use in
266
+ # StatementPrintNewline
267
+
268
+ def __init__(self, dest, source_ref):
269
+ if dest is not None:
270
+ dest.parent = self
271
+
272
+ self.subnode_dest = dest
273
+
274
+ StatementBase.__init__(self, source_ref)
275
+
276
+ def getVisitableNodes(self):
277
+ """The visitable nodes, with tuple values flattened."""
278
+
279
+ value = self.subnode_dest
280
+
281
+ if value is None:
282
+ return ()
283
+ else:
284
+ return (value,)
285
+
286
+ def getVisitableNodesNamed(self):
287
+ """Named children dictionary.
288
+
289
+ For use in cloning nodes, debugging and XML output.
290
+ """
291
+
292
+ return (("dest", self.subnode_dest),)
293
+
294
+ def replaceChild(self, old_node, new_node):
295
+ value = self.subnode_dest
296
+ if old_node is value:
297
+ if new_node is not None:
298
+ new_node.parent = self
299
+
300
+ self.subnode_dest = new_node
301
+
302
+ return
303
+
304
+ raise AssertionError("Didn't find child", old_node, "in", self)
305
+
306
+ def getCloneArgs(self):
307
+ """Get clones of all children to pass for a new node.
308
+
309
+ Needs to make clones of child nodes too.
310
+ """
311
+
312
+ values = {
313
+ "dest": (
314
+ self.subnode_dest.makeClone() if self.subnode_dest is not None else None
315
+ ),
316
+ }
317
+
318
+ values.update(self.getDetails())
319
+
320
+ return values
321
+
322
+ def finalize(self):
323
+ del self.parent
324
+
325
+ if self.subnode_dest is not None:
326
+ self.subnode_dest.finalize()
327
+ del self.subnode_dest
328
+
329
+ def computeStatement(self, trace_collection):
330
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
331
+ trace_collection=trace_collection
332
+ )
333
+
334
+ if result is not self:
335
+ return result, change_tags, change_desc
336
+
337
+ return self.computeStatementOperation(trace_collection)
338
+
339
+ @abstractmethod
340
+ def computeStatementOperation(self, trace_collection):
341
+ """Must be overloaded for non-final node."""
342
+
343
+ def collectVariableAccesses(self, emit_read, emit_write):
344
+ """Collect variable reads and writes of child nodes."""
345
+
346
+ subnode_dest = self.subnode_dest
347
+
348
+ if subnode_dest is not None:
349
+ self.subnode_dest.collectVariableAccesses(emit_read, emit_write)
350
+
351
+
352
+ # Assign the names that are easier to import with a stable name.
353
+ StatementPrintNewlineBase = StatementChildHavingDestOptionalOperationMixin
354
+
355
+
356
+ class StatementChildrenHavingDestOptionalValueOperationMixin(StatementBase):
357
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
358
+ __slots__ = ()
359
+
360
+ # This is generated for use in
361
+ # StatementPrintValue
362
+
363
+ def __init__(self, dest, value, source_ref):
364
+ if dest is not None:
365
+ dest.parent = self
366
+
367
+ self.subnode_dest = dest
368
+
369
+ value.parent = self
370
+
371
+ self.subnode_value = value
372
+
373
+ StatementBase.__init__(self, source_ref)
374
+
375
+ def setChildValue(self, value):
376
+ value.parent = self
377
+
378
+ self.subnode_value = value
379
+
380
+ def getVisitableNodes(self):
381
+ """The visitable nodes, with tuple values flattened."""
382
+
383
+ result = []
384
+ value = self.subnode_dest
385
+ if value is None:
386
+ pass
387
+ else:
388
+ result.append(value)
389
+ result.append(self.subnode_value)
390
+ return tuple(result)
391
+
392
+ def getVisitableNodesNamed(self):
393
+ """Named children dictionary.
394
+
395
+ For use in cloning nodes, debugging and XML output.
396
+ """
397
+
398
+ return (
399
+ ("dest", self.subnode_dest),
400
+ ("value", self.subnode_value),
401
+ )
402
+
403
+ def replaceChild(self, old_node, new_node):
404
+ value = self.subnode_dest
405
+ if old_node is value:
406
+ if new_node is not None:
407
+ new_node.parent = self
408
+
409
+ self.subnode_dest = new_node
410
+
411
+ return
412
+
413
+ value = self.subnode_value
414
+ if old_node is value:
415
+ new_node.parent = self
416
+
417
+ self.subnode_value = new_node
418
+
419
+ return
420
+
421
+ raise AssertionError("Didn't find child", old_node, "in", self)
422
+
423
+ def getCloneArgs(self):
424
+ """Get clones of all children to pass for a new node.
425
+
426
+ Needs to make clones of child nodes too.
427
+ """
428
+
429
+ values = {
430
+ "dest": (
431
+ self.subnode_dest.makeClone() if self.subnode_dest is not None else None
432
+ ),
433
+ "value": self.subnode_value.makeClone(),
434
+ }
435
+
436
+ values.update(self.getDetails())
437
+
438
+ return values
439
+
440
+ def finalize(self):
441
+ del self.parent
442
+
443
+ if self.subnode_dest is not None:
444
+ self.subnode_dest.finalize()
445
+ del self.subnode_dest
446
+ self.subnode_value.finalize()
447
+ del self.subnode_value
448
+
449
+ def computeStatement(self, trace_collection):
450
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
451
+ trace_collection=trace_collection
452
+ )
453
+
454
+ if result is not self:
455
+ return result, change_tags, change_desc
456
+
457
+ return self.computeStatementOperation(trace_collection)
458
+
459
+ @abstractmethod
460
+ def computeStatementOperation(self, trace_collection):
461
+ """Must be overloaded for non-final node."""
462
+
463
+ def collectVariableAccesses(self, emit_read, emit_write):
464
+ """Collect variable reads and writes of child nodes."""
465
+
466
+ subnode_dest = self.subnode_dest
467
+
468
+ if subnode_dest is not None:
469
+ self.subnode_dest.collectVariableAccesses(emit_read, emit_write)
470
+ self.subnode_value.collectVariableAccesses(emit_read, emit_write)
471
+
472
+
473
+ # Assign the names that are easier to import with a stable name.
474
+ StatementPrintValueBase = StatementChildrenHavingDestOptionalValueOperationMixin
475
+
476
+
477
+ class StatementChildrenHavingDictArgKeyOperationMixin(StatementBase):
478
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
479
+ __slots__ = ()
480
+
481
+ # This is generated for use in
482
+ # StatementDictOperationRemove
483
+
484
+ def __init__(self, dict_arg, key, source_ref):
485
+ dict_arg.parent = self
486
+
487
+ self.subnode_dict_arg = dict_arg
488
+
489
+ key.parent = self
490
+
491
+ self.subnode_key = key
492
+
493
+ StatementBase.__init__(self, source_ref)
494
+
495
+ def getVisitableNodes(self):
496
+ """The visitable nodes, with tuple values flattened."""
497
+
498
+ return (
499
+ self.subnode_dict_arg,
500
+ self.subnode_key,
501
+ )
502
+
503
+ def getVisitableNodesNamed(self):
504
+ """Named children dictionary.
505
+
506
+ For use in cloning nodes, debugging and XML output.
507
+ """
508
+
509
+ return (
510
+ ("dict_arg", self.subnode_dict_arg),
511
+ ("key", self.subnode_key),
512
+ )
513
+
514
+ def replaceChild(self, old_node, new_node):
515
+ value = self.subnode_dict_arg
516
+ if old_node is value:
517
+ new_node.parent = self
518
+
519
+ self.subnode_dict_arg = new_node
520
+
521
+ return
522
+
523
+ value = self.subnode_key
524
+ if old_node is value:
525
+ new_node.parent = self
526
+
527
+ self.subnode_key = new_node
528
+
529
+ return
530
+
531
+ raise AssertionError("Didn't find child", old_node, "in", self)
532
+
533
+ def getCloneArgs(self):
534
+ """Get clones of all children to pass for a new node.
535
+
536
+ Needs to make clones of child nodes too.
537
+ """
538
+
539
+ values = {
540
+ "dict_arg": self.subnode_dict_arg.makeClone(),
541
+ "key": self.subnode_key.makeClone(),
542
+ }
543
+
544
+ values.update(self.getDetails())
545
+
546
+ return values
547
+
548
+ def finalize(self):
549
+ del self.parent
550
+
551
+ self.subnode_dict_arg.finalize()
552
+ del self.subnode_dict_arg
553
+ self.subnode_key.finalize()
554
+ del self.subnode_key
555
+
556
+ def computeStatement(self, trace_collection):
557
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
558
+ trace_collection=trace_collection
559
+ )
560
+
561
+ if result is not self:
562
+ return result, change_tags, change_desc
563
+
564
+ return self.computeStatementOperation(trace_collection)
565
+
566
+ @abstractmethod
567
+ def computeStatementOperation(self, trace_collection):
568
+ """Must be overloaded for non-final node."""
569
+
570
+ def collectVariableAccesses(self, emit_read, emit_write):
571
+ """Collect variable reads and writes of child nodes."""
572
+
573
+ self.subnode_dict_arg.collectVariableAccesses(emit_read, emit_write)
574
+ self.subnode_key.collectVariableAccesses(emit_read, emit_write)
575
+
576
+
577
+ # Assign the names that are easier to import with a stable name.
578
+ StatementDictOperationRemoveBase = StatementChildrenHavingDictArgKeyOperationMixin
579
+
580
+
581
+ class StatementChildrenHavingDictArgValueOperationMixin(StatementBase):
582
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
583
+ __slots__ = ()
584
+
585
+ # This is generated for use in
586
+ # StatementDictOperationUpdate
587
+
588
+ def __init__(self, dict_arg, value, source_ref):
589
+ dict_arg.parent = self
590
+
591
+ self.subnode_dict_arg = dict_arg
592
+
593
+ value.parent = self
594
+
595
+ self.subnode_value = value
596
+
597
+ StatementBase.__init__(self, source_ref)
598
+
599
+ def getVisitableNodes(self):
600
+ """The visitable nodes, with tuple values flattened."""
601
+
602
+ return (
603
+ self.subnode_dict_arg,
604
+ self.subnode_value,
605
+ )
606
+
607
+ def getVisitableNodesNamed(self):
608
+ """Named children dictionary.
609
+
610
+ For use in cloning nodes, debugging and XML output.
611
+ """
612
+
613
+ return (
614
+ ("dict_arg", self.subnode_dict_arg),
615
+ ("value", self.subnode_value),
616
+ )
617
+
618
+ def replaceChild(self, old_node, new_node):
619
+ value = self.subnode_dict_arg
620
+ if old_node is value:
621
+ new_node.parent = self
622
+
623
+ self.subnode_dict_arg = new_node
624
+
625
+ return
626
+
627
+ value = self.subnode_value
628
+ if old_node is value:
629
+ new_node.parent = self
630
+
631
+ self.subnode_value = new_node
632
+
633
+ return
634
+
635
+ raise AssertionError("Didn't find child", old_node, "in", self)
636
+
637
+ def getCloneArgs(self):
638
+ """Get clones of all children to pass for a new node.
639
+
640
+ Needs to make clones of child nodes too.
641
+ """
642
+
643
+ values = {
644
+ "dict_arg": self.subnode_dict_arg.makeClone(),
645
+ "value": self.subnode_value.makeClone(),
646
+ }
647
+
648
+ values.update(self.getDetails())
649
+
650
+ return values
651
+
652
+ def finalize(self):
653
+ del self.parent
654
+
655
+ self.subnode_dict_arg.finalize()
656
+ del self.subnode_dict_arg
657
+ self.subnode_value.finalize()
658
+ del self.subnode_value
659
+
660
+ def computeStatement(self, trace_collection):
661
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
662
+ trace_collection=trace_collection
663
+ )
664
+
665
+ if result is not self:
666
+ return result, change_tags, change_desc
667
+
668
+ return self.computeStatementOperation(trace_collection)
669
+
670
+ @abstractmethod
671
+ def computeStatementOperation(self, trace_collection):
672
+ """Must be overloaded for non-final node."""
673
+
674
+ def collectVariableAccesses(self, emit_read, emit_write):
675
+ """Collect variable reads and writes of child nodes."""
676
+
677
+ self.subnode_dict_arg.collectVariableAccesses(emit_read, emit_write)
678
+ self.subnode_value.collectVariableAccesses(emit_read, emit_write)
679
+
680
+
681
+ # Assign the names that are easier to import with a stable name.
682
+ StatementDictOperationUpdateBase = StatementChildrenHavingDictArgValueOperationMixin
683
+
684
+
685
+ class StatementChildrenHavingExceptionTypeExceptionValueOptionalExceptionTraceOptionalExceptionCauseOptionalOperationPostInitMixin(
686
+ StatementBase
687
+ ):
688
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
689
+ __slots__ = ()
690
+
691
+ # This is generated for use in
692
+ # StatementRaiseException
693
+
694
+ def __init__(
695
+ self,
696
+ exception_type,
697
+ exception_value,
698
+ exception_trace,
699
+ exception_cause,
700
+ source_ref,
701
+ ):
702
+ exception_type.parent = self
703
+
704
+ self.subnode_exception_type = exception_type
705
+
706
+ if exception_value is not None:
707
+ exception_value.parent = self
708
+
709
+ self.subnode_exception_value = exception_value
710
+
711
+ if exception_trace is not None:
712
+ exception_trace.parent = self
713
+
714
+ self.subnode_exception_trace = exception_trace
715
+
716
+ if exception_cause is not None:
717
+ exception_cause.parent = self
718
+
719
+ self.subnode_exception_cause = exception_cause
720
+
721
+ StatementBase.__init__(self, source_ref)
722
+
723
+ self.postInitNode()
724
+
725
+ @abstractmethod
726
+ def postInitNode(self):
727
+ """For overload"""
728
+
729
+ def getVisitableNodes(self):
730
+ """The visitable nodes, with tuple values flattened."""
731
+
732
+ result = []
733
+ result.append(self.subnode_exception_type)
734
+ value = self.subnode_exception_value
735
+ if value is None:
736
+ pass
737
+ else:
738
+ result.append(value)
739
+ value = self.subnode_exception_trace
740
+ if value is None:
741
+ pass
742
+ else:
743
+ result.append(value)
744
+ value = self.subnode_exception_cause
745
+ if value is None:
746
+ pass
747
+ else:
748
+ result.append(value)
749
+ return tuple(result)
750
+
751
+ def getVisitableNodesNamed(self):
752
+ """Named children dictionary.
753
+
754
+ For use in cloning nodes, debugging and XML output.
755
+ """
756
+
757
+ return (
758
+ ("exception_type", self.subnode_exception_type),
759
+ ("exception_value", self.subnode_exception_value),
760
+ ("exception_trace", self.subnode_exception_trace),
761
+ ("exception_cause", self.subnode_exception_cause),
762
+ )
763
+
764
+ def replaceChild(self, old_node, new_node):
765
+ value = self.subnode_exception_type
766
+ if old_node is value:
767
+ new_node.parent = self
768
+
769
+ self.subnode_exception_type = new_node
770
+
771
+ return
772
+
773
+ value = self.subnode_exception_value
774
+ if old_node is value:
775
+ if new_node is not None:
776
+ new_node.parent = self
777
+
778
+ self.subnode_exception_value = new_node
779
+
780
+ return
781
+
782
+ value = self.subnode_exception_trace
783
+ if old_node is value:
784
+ if new_node is not None:
785
+ new_node.parent = self
786
+
787
+ self.subnode_exception_trace = new_node
788
+
789
+ return
790
+
791
+ value = self.subnode_exception_cause
792
+ if old_node is value:
793
+ if new_node is not None:
794
+ new_node.parent = self
795
+
796
+ self.subnode_exception_cause = new_node
797
+
798
+ return
799
+
800
+ raise AssertionError("Didn't find child", old_node, "in", self)
801
+
802
+ def getCloneArgs(self):
803
+ """Get clones of all children to pass for a new node.
804
+
805
+ Needs to make clones of child nodes too.
806
+ """
807
+
808
+ values = {
809
+ "exception_type": self.subnode_exception_type.makeClone(),
810
+ "exception_value": (
811
+ self.subnode_exception_value.makeClone()
812
+ if self.subnode_exception_value is not None
813
+ else None
814
+ ),
815
+ "exception_trace": (
816
+ self.subnode_exception_trace.makeClone()
817
+ if self.subnode_exception_trace is not None
818
+ else None
819
+ ),
820
+ "exception_cause": (
821
+ self.subnode_exception_cause.makeClone()
822
+ if self.subnode_exception_cause is not None
823
+ else None
824
+ ),
825
+ }
826
+
827
+ values.update(self.getDetails())
828
+
829
+ return values
830
+
831
+ def finalize(self):
832
+ del self.parent
833
+
834
+ self.subnode_exception_type.finalize()
835
+ del self.subnode_exception_type
836
+ if self.subnode_exception_value is not None:
837
+ self.subnode_exception_value.finalize()
838
+ del self.subnode_exception_value
839
+ if self.subnode_exception_trace is not None:
840
+ self.subnode_exception_trace.finalize()
841
+ del self.subnode_exception_trace
842
+ if self.subnode_exception_cause is not None:
843
+ self.subnode_exception_cause.finalize()
844
+ del self.subnode_exception_cause
845
+
846
+ def computeStatement(self, trace_collection):
847
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
848
+ trace_collection=trace_collection
849
+ )
850
+
851
+ if result is not self:
852
+ return result, change_tags, change_desc
853
+
854
+ return self.computeStatementOperation(trace_collection)
855
+
856
+ @abstractmethod
857
+ def computeStatementOperation(self, trace_collection):
858
+ """Must be overloaded for non-final node."""
859
+
860
+ def collectVariableAccesses(self, emit_read, emit_write):
861
+ """Collect variable reads and writes of child nodes."""
862
+
863
+ self.subnode_exception_type.collectVariableAccesses(emit_read, emit_write)
864
+ subnode_exception_value = self.subnode_exception_value
865
+
866
+ if subnode_exception_value is not None:
867
+ self.subnode_exception_value.collectVariableAccesses(emit_read, emit_write)
868
+ subnode_exception_trace = self.subnode_exception_trace
869
+
870
+ if subnode_exception_trace is not None:
871
+ self.subnode_exception_trace.collectVariableAccesses(emit_read, emit_write)
872
+ subnode_exception_cause = self.subnode_exception_cause
873
+
874
+ if subnode_exception_cause is not None:
875
+ self.subnode_exception_cause.collectVariableAccesses(emit_read, emit_write)
876
+
877
+
878
+ # Assign the names that are easier to import with a stable name.
879
+ StatementRaiseExceptionBase = StatementChildrenHavingExceptionTypeExceptionValueOptionalExceptionTraceOptionalExceptionCauseOptionalOperationPostInitMixin
880
+
881
+
882
+ class StatementChildHavingExpressionOperationAttributeNameMixin(StatementBase):
883
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
884
+ __slots__ = ()
885
+
886
+ # This is generated for use in
887
+ # StatementDelAttribute
888
+
889
+ def __init__(self, expression, attribute_name, source_ref):
890
+ expression.parent = self
891
+
892
+ self.subnode_expression = expression
893
+
894
+ self.attribute_name = attribute_name
895
+
896
+ StatementBase.__init__(self, source_ref)
897
+
898
+ def getDetails(self):
899
+ return {
900
+ "attribute_name": self.attribute_name,
901
+ }
902
+
903
+ def getVisitableNodes(self):
904
+ """The visitable nodes, with tuple values flattened."""
905
+
906
+ return (self.subnode_expression,)
907
+
908
+ def getVisitableNodesNamed(self):
909
+ """Named children dictionary.
910
+
911
+ For use in cloning nodes, debugging and XML output.
912
+ """
913
+
914
+ return (("expression", self.subnode_expression),)
915
+
916
+ def replaceChild(self, old_node, new_node):
917
+ value = self.subnode_expression
918
+ if old_node is value:
919
+ new_node.parent = self
920
+
921
+ self.subnode_expression = new_node
922
+
923
+ return
924
+
925
+ raise AssertionError("Didn't find child", old_node, "in", self)
926
+
927
+ def getCloneArgs(self):
928
+ """Get clones of all children to pass for a new node.
929
+
930
+ Needs to make clones of child nodes too.
931
+ """
932
+
933
+ values = {
934
+ "expression": self.subnode_expression.makeClone(),
935
+ }
936
+
937
+ values.update(self.getDetails())
938
+
939
+ return values
940
+
941
+ def finalize(self):
942
+ del self.parent
943
+
944
+ self.subnode_expression.finalize()
945
+ del self.subnode_expression
946
+
947
+ def computeStatement(self, trace_collection):
948
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
949
+ trace_collection=trace_collection
950
+ )
951
+
952
+ if result is not self:
953
+ return result, change_tags, change_desc
954
+
955
+ return self.computeStatementOperation(trace_collection)
956
+
957
+ @abstractmethod
958
+ def computeStatementOperation(self, trace_collection):
959
+ """Must be overloaded for non-final node."""
960
+
961
+ def collectVariableAccesses(self, emit_read, emit_write):
962
+ """Collect variable reads and writes of child nodes."""
963
+
964
+ self.subnode_expression.collectVariableAccesses(emit_read, emit_write)
965
+
966
+
967
+ # Assign the names that are easier to import with a stable name.
968
+ StatementDelAttributeBase = StatementChildHavingExpressionOperationAttributeNameMixin
969
+
970
+
971
+ class StatementChildHavingExpressionMixin(StatementBase):
972
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
973
+ __slots__ = ()
974
+
975
+ # This is generated for use in
976
+ # StatementExpressionOnly
977
+ # StatementGeneratorReturn
978
+ # StatementReturn
979
+
980
+ def __init__(self, expression, source_ref):
981
+ expression.parent = self
982
+
983
+ self.subnode_expression = expression
984
+
985
+ StatementBase.__init__(self, source_ref)
986
+
987
+ def getVisitableNodes(self):
988
+ """The visitable nodes, with tuple values flattened."""
989
+
990
+ return (self.subnode_expression,)
991
+
992
+ def getVisitableNodesNamed(self):
993
+ """Named children dictionary.
994
+
995
+ For use in cloning nodes, debugging and XML output.
996
+ """
997
+
998
+ return (("expression", self.subnode_expression),)
999
+
1000
+ def replaceChild(self, old_node, new_node):
1001
+ value = self.subnode_expression
1002
+ if old_node is value:
1003
+ new_node.parent = self
1004
+
1005
+ self.subnode_expression = new_node
1006
+
1007
+ return
1008
+
1009
+ raise AssertionError("Didn't find child", old_node, "in", self)
1010
+
1011
+ def getCloneArgs(self):
1012
+ """Get clones of all children to pass for a new node.
1013
+
1014
+ Needs to make clones of child nodes too.
1015
+ """
1016
+
1017
+ values = {
1018
+ "expression": self.subnode_expression.makeClone(),
1019
+ }
1020
+
1021
+ values.update(self.getDetails())
1022
+
1023
+ return values
1024
+
1025
+ def finalize(self):
1026
+ del self.parent
1027
+
1028
+ self.subnode_expression.finalize()
1029
+ del self.subnode_expression
1030
+
1031
+ def collectVariableAccesses(self, emit_read, emit_write):
1032
+ """Collect variable reads and writes of child nodes."""
1033
+
1034
+ self.subnode_expression.collectVariableAccesses(emit_read, emit_write)
1035
+
1036
+
1037
+ # Assign the names that are easier to import with a stable name.
1038
+ StatementExpressionOnlyBase = StatementChildHavingExpressionMixin
1039
+ StatementGeneratorReturnBase = StatementChildHavingExpressionMixin
1040
+ StatementReturnBase = StatementChildHavingExpressionMixin
1041
+
1042
+
1043
+ class StatementChildrenHavingExpressionLowerOptionalUpperOptionalMixin(StatementBase):
1044
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1045
+ __slots__ = ()
1046
+
1047
+ # This is generated for use in
1048
+ # StatementDelSlice
1049
+
1050
+ def __init__(self, expression, lower, upper, source_ref):
1051
+ expression.parent = self
1052
+
1053
+ self.subnode_expression = expression
1054
+
1055
+ if lower is not None:
1056
+ lower.parent = self
1057
+
1058
+ self.subnode_lower = lower
1059
+
1060
+ if upper is not None:
1061
+ upper.parent = self
1062
+
1063
+ self.subnode_upper = upper
1064
+
1065
+ StatementBase.__init__(self, source_ref)
1066
+
1067
+ def getVisitableNodes(self):
1068
+ """The visitable nodes, with tuple values flattened."""
1069
+
1070
+ result = []
1071
+ result.append(self.subnode_expression)
1072
+ value = self.subnode_lower
1073
+ if value is None:
1074
+ pass
1075
+ else:
1076
+ result.append(value)
1077
+ value = self.subnode_upper
1078
+ if value is None:
1079
+ pass
1080
+ else:
1081
+ result.append(value)
1082
+ return tuple(result)
1083
+
1084
+ def getVisitableNodesNamed(self):
1085
+ """Named children dictionary.
1086
+
1087
+ For use in cloning nodes, debugging and XML output.
1088
+ """
1089
+
1090
+ return (
1091
+ ("expression", self.subnode_expression),
1092
+ ("lower", self.subnode_lower),
1093
+ ("upper", self.subnode_upper),
1094
+ )
1095
+
1096
+ def replaceChild(self, old_node, new_node):
1097
+ value = self.subnode_expression
1098
+ if old_node is value:
1099
+ new_node.parent = self
1100
+
1101
+ self.subnode_expression = new_node
1102
+
1103
+ return
1104
+
1105
+ value = self.subnode_lower
1106
+ if old_node is value:
1107
+ if new_node is not None:
1108
+ new_node.parent = self
1109
+
1110
+ self.subnode_lower = new_node
1111
+
1112
+ return
1113
+
1114
+ value = self.subnode_upper
1115
+ if old_node is value:
1116
+ if new_node is not None:
1117
+ new_node.parent = self
1118
+
1119
+ self.subnode_upper = new_node
1120
+
1121
+ return
1122
+
1123
+ raise AssertionError("Didn't find child", old_node, "in", self)
1124
+
1125
+ def getCloneArgs(self):
1126
+ """Get clones of all children to pass for a new node.
1127
+
1128
+ Needs to make clones of child nodes too.
1129
+ """
1130
+
1131
+ values = {
1132
+ "expression": self.subnode_expression.makeClone(),
1133
+ "lower": (
1134
+ self.subnode_lower.makeClone()
1135
+ if self.subnode_lower is not None
1136
+ else None
1137
+ ),
1138
+ "upper": (
1139
+ self.subnode_upper.makeClone()
1140
+ if self.subnode_upper is not None
1141
+ else None
1142
+ ),
1143
+ }
1144
+
1145
+ values.update(self.getDetails())
1146
+
1147
+ return values
1148
+
1149
+ def finalize(self):
1150
+ del self.parent
1151
+
1152
+ self.subnode_expression.finalize()
1153
+ del self.subnode_expression
1154
+ if self.subnode_lower is not None:
1155
+ self.subnode_lower.finalize()
1156
+ del self.subnode_lower
1157
+ if self.subnode_upper is not None:
1158
+ self.subnode_upper.finalize()
1159
+ del self.subnode_upper
1160
+
1161
+ def collectVariableAccesses(self, emit_read, emit_write):
1162
+ """Collect variable reads and writes of child nodes."""
1163
+
1164
+ self.subnode_expression.collectVariableAccesses(emit_read, emit_write)
1165
+ subnode_lower = self.subnode_lower
1166
+
1167
+ if subnode_lower is not None:
1168
+ self.subnode_lower.collectVariableAccesses(emit_read, emit_write)
1169
+ subnode_upper = self.subnode_upper
1170
+
1171
+ if subnode_upper is not None:
1172
+ self.subnode_upper.collectVariableAccesses(emit_read, emit_write)
1173
+
1174
+
1175
+ # Assign the names that are easier to import with a stable name.
1176
+ StatementDelSliceBase = StatementChildrenHavingExpressionLowerOptionalUpperOptionalMixin
1177
+
1178
+
1179
+ class StatementChildHavingIteratedLengthOperationCountMixin(StatementBase):
1180
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1181
+ __slots__ = ()
1182
+
1183
+ # This is generated for use in
1184
+ # StatementSpecialUnpackCheckFromIterated
1185
+
1186
+ def __init__(self, iterated_length, count, source_ref):
1187
+ iterated_length.parent = self
1188
+
1189
+ self.subnode_iterated_length = iterated_length
1190
+
1191
+ self.count = count
1192
+
1193
+ StatementBase.__init__(self, source_ref)
1194
+
1195
+ def getDetails(self):
1196
+ return {
1197
+ "count": self.count,
1198
+ }
1199
+
1200
+ def getVisitableNodes(self):
1201
+ """The visitable nodes, with tuple values flattened."""
1202
+
1203
+ return (self.subnode_iterated_length,)
1204
+
1205
+ def getVisitableNodesNamed(self):
1206
+ """Named children dictionary.
1207
+
1208
+ For use in cloning nodes, debugging and XML output.
1209
+ """
1210
+
1211
+ return (("iterated_length", self.subnode_iterated_length),)
1212
+
1213
+ def replaceChild(self, old_node, new_node):
1214
+ value = self.subnode_iterated_length
1215
+ if old_node is value:
1216
+ new_node.parent = self
1217
+
1218
+ self.subnode_iterated_length = new_node
1219
+
1220
+ return
1221
+
1222
+ raise AssertionError("Didn't find child", old_node, "in", self)
1223
+
1224
+ def getCloneArgs(self):
1225
+ """Get clones of all children to pass for a new node.
1226
+
1227
+ Needs to make clones of child nodes too.
1228
+ """
1229
+
1230
+ values = {
1231
+ "iterated_length": self.subnode_iterated_length.makeClone(),
1232
+ }
1233
+
1234
+ values.update(self.getDetails())
1235
+
1236
+ return values
1237
+
1238
+ def finalize(self):
1239
+ del self.parent
1240
+
1241
+ self.subnode_iterated_length.finalize()
1242
+ del self.subnode_iterated_length
1243
+
1244
+ def computeStatement(self, trace_collection):
1245
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1246
+ trace_collection=trace_collection
1247
+ )
1248
+
1249
+ if result is not self:
1250
+ return result, change_tags, change_desc
1251
+
1252
+ return self.computeStatementOperation(trace_collection)
1253
+
1254
+ @abstractmethod
1255
+ def computeStatementOperation(self, trace_collection):
1256
+ """Must be overloaded for non-final node."""
1257
+
1258
+ def collectVariableAccesses(self, emit_read, emit_write):
1259
+ """Collect variable reads and writes of child nodes."""
1260
+
1261
+ self.subnode_iterated_length.collectVariableAccesses(emit_read, emit_write)
1262
+
1263
+
1264
+ # Assign the names that are easier to import with a stable name.
1265
+ StatementSpecialUnpackCheckFromIteratedBase = (
1266
+ StatementChildHavingIteratedLengthOperationCountMixin
1267
+ )
1268
+
1269
+
1270
+ class StatementChildHavingIteratorOperationCountMixin(StatementBase):
1271
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1272
+ __slots__ = ()
1273
+
1274
+ # This is generated for use in
1275
+ # StatementSpecialUnpackCheck
1276
+
1277
+ def __init__(self, iterator, count, source_ref):
1278
+ iterator.parent = self
1279
+
1280
+ self.subnode_iterator = iterator
1281
+
1282
+ self.count = count
1283
+
1284
+ StatementBase.__init__(self, source_ref)
1285
+
1286
+ def getDetails(self):
1287
+ return {
1288
+ "count": self.count,
1289
+ }
1290
+
1291
+ def getVisitableNodes(self):
1292
+ """The visitable nodes, with tuple values flattened."""
1293
+
1294
+ return (self.subnode_iterator,)
1295
+
1296
+ def getVisitableNodesNamed(self):
1297
+ """Named children dictionary.
1298
+
1299
+ For use in cloning nodes, debugging and XML output.
1300
+ """
1301
+
1302
+ return (("iterator", self.subnode_iterator),)
1303
+
1304
+ def replaceChild(self, old_node, new_node):
1305
+ value = self.subnode_iterator
1306
+ if old_node is value:
1307
+ new_node.parent = self
1308
+
1309
+ self.subnode_iterator = new_node
1310
+
1311
+ return
1312
+
1313
+ raise AssertionError("Didn't find child", old_node, "in", self)
1314
+
1315
+ def getCloneArgs(self):
1316
+ """Get clones of all children to pass for a new node.
1317
+
1318
+ Needs to make clones of child nodes too.
1319
+ """
1320
+
1321
+ values = {
1322
+ "iterator": self.subnode_iterator.makeClone(),
1323
+ }
1324
+
1325
+ values.update(self.getDetails())
1326
+
1327
+ return values
1328
+
1329
+ def finalize(self):
1330
+ del self.parent
1331
+
1332
+ self.subnode_iterator.finalize()
1333
+ del self.subnode_iterator
1334
+
1335
+ def computeStatement(self, trace_collection):
1336
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1337
+ trace_collection=trace_collection
1338
+ )
1339
+
1340
+ if result is not self:
1341
+ return result, change_tags, change_desc
1342
+
1343
+ return self.computeStatementOperation(trace_collection)
1344
+
1345
+ @abstractmethod
1346
+ def computeStatementOperation(self, trace_collection):
1347
+ """Must be overloaded for non-final node."""
1348
+
1349
+ def collectVariableAccesses(self, emit_read, emit_write):
1350
+ """Collect variable reads and writes of child nodes."""
1351
+
1352
+ self.subnode_iterator.collectVariableAccesses(emit_read, emit_write)
1353
+
1354
+
1355
+ # Assign the names that are easier to import with a stable name.
1356
+ StatementSpecialUnpackCheckBase = StatementChildHavingIteratorOperationCountMixin
1357
+
1358
+
1359
+ class StatementChildrenHavingListArgValueOperationMixin(StatementBase):
1360
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1361
+ __slots__ = ()
1362
+
1363
+ # This is generated for use in
1364
+ # StatementListOperationAppend
1365
+
1366
+ def __init__(self, list_arg, value, source_ref):
1367
+ list_arg.parent = self
1368
+
1369
+ self.subnode_list_arg = list_arg
1370
+
1371
+ value.parent = self
1372
+
1373
+ self.subnode_value = value
1374
+
1375
+ StatementBase.__init__(self, source_ref)
1376
+
1377
+ def getVisitableNodes(self):
1378
+ """The visitable nodes, with tuple values flattened."""
1379
+
1380
+ return (
1381
+ self.subnode_list_arg,
1382
+ self.subnode_value,
1383
+ )
1384
+
1385
+ def getVisitableNodesNamed(self):
1386
+ """Named children dictionary.
1387
+
1388
+ For use in cloning nodes, debugging and XML output.
1389
+ """
1390
+
1391
+ return (
1392
+ ("list_arg", self.subnode_list_arg),
1393
+ ("value", self.subnode_value),
1394
+ )
1395
+
1396
+ def replaceChild(self, old_node, new_node):
1397
+ value = self.subnode_list_arg
1398
+ if old_node is value:
1399
+ new_node.parent = self
1400
+
1401
+ self.subnode_list_arg = new_node
1402
+
1403
+ return
1404
+
1405
+ value = self.subnode_value
1406
+ if old_node is value:
1407
+ new_node.parent = self
1408
+
1409
+ self.subnode_value = new_node
1410
+
1411
+ return
1412
+
1413
+ raise AssertionError("Didn't find child", old_node, "in", self)
1414
+
1415
+ def getCloneArgs(self):
1416
+ """Get clones of all children to pass for a new node.
1417
+
1418
+ Needs to make clones of child nodes too.
1419
+ """
1420
+
1421
+ values = {
1422
+ "list_arg": self.subnode_list_arg.makeClone(),
1423
+ "value": self.subnode_value.makeClone(),
1424
+ }
1425
+
1426
+ values.update(self.getDetails())
1427
+
1428
+ return values
1429
+
1430
+ def finalize(self):
1431
+ del self.parent
1432
+
1433
+ self.subnode_list_arg.finalize()
1434
+ del self.subnode_list_arg
1435
+ self.subnode_value.finalize()
1436
+ del self.subnode_value
1437
+
1438
+ def computeStatement(self, trace_collection):
1439
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1440
+ trace_collection=trace_collection
1441
+ )
1442
+
1443
+ if result is not self:
1444
+ return result, change_tags, change_desc
1445
+
1446
+ return self.computeStatementOperation(trace_collection)
1447
+
1448
+ @abstractmethod
1449
+ def computeStatementOperation(self, trace_collection):
1450
+ """Must be overloaded for non-final node."""
1451
+
1452
+ def collectVariableAccesses(self, emit_read, emit_write):
1453
+ """Collect variable reads and writes of child nodes."""
1454
+
1455
+ self.subnode_list_arg.collectVariableAccesses(emit_read, emit_write)
1456
+ self.subnode_value.collectVariableAccesses(emit_read, emit_write)
1457
+
1458
+
1459
+ # Assign the names that are easier to import with a stable name.
1460
+ StatementListOperationAppendBase = StatementChildrenHavingListArgValueOperationMixin
1461
+
1462
+
1463
+ class StatementChildHavingLocalsArgOperationPostInitLocalsScopeMixin(StatementBase):
1464
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1465
+ __slots__ = ()
1466
+
1467
+ # This is generated for use in
1468
+ # StatementLocalsDictSync
1469
+
1470
+ def __init__(self, locals_arg, locals_scope, source_ref):
1471
+ locals_arg.parent = self
1472
+
1473
+ self.subnode_locals_arg = locals_arg
1474
+
1475
+ self.locals_scope = locals_scope
1476
+
1477
+ StatementBase.__init__(self, source_ref)
1478
+
1479
+ self.postInitNode()
1480
+
1481
+ @abstractmethod
1482
+ def postInitNode(self):
1483
+ """For overload"""
1484
+
1485
+ def getDetails(self):
1486
+ return {
1487
+ "locals_scope": self.locals_scope,
1488
+ }
1489
+
1490
+ def getVisitableNodes(self):
1491
+ """The visitable nodes, with tuple values flattened."""
1492
+
1493
+ return (self.subnode_locals_arg,)
1494
+
1495
+ def getVisitableNodesNamed(self):
1496
+ """Named children dictionary.
1497
+
1498
+ For use in cloning nodes, debugging and XML output.
1499
+ """
1500
+
1501
+ return (("locals_arg", self.subnode_locals_arg),)
1502
+
1503
+ def replaceChild(self, old_node, new_node):
1504
+ value = self.subnode_locals_arg
1505
+ if old_node is value:
1506
+ new_node.parent = self
1507
+
1508
+ self.subnode_locals_arg = new_node
1509
+
1510
+ return
1511
+
1512
+ raise AssertionError("Didn't find child", old_node, "in", self)
1513
+
1514
+ def getCloneArgs(self):
1515
+ """Get clones of all children to pass for a new node.
1516
+
1517
+ Needs to make clones of child nodes too.
1518
+ """
1519
+
1520
+ values = {
1521
+ "locals_arg": self.subnode_locals_arg.makeClone(),
1522
+ }
1523
+
1524
+ values.update(self.getDetails())
1525
+
1526
+ return values
1527
+
1528
+ def finalize(self):
1529
+ del self.parent
1530
+
1531
+ self.subnode_locals_arg.finalize()
1532
+ del self.subnode_locals_arg
1533
+
1534
+ del self.locals_scope
1535
+
1536
+ def computeStatement(self, trace_collection):
1537
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1538
+ trace_collection=trace_collection
1539
+ )
1540
+
1541
+ if result is not self:
1542
+ return result, change_tags, change_desc
1543
+
1544
+ return self.computeStatementOperation(trace_collection)
1545
+
1546
+ @abstractmethod
1547
+ def computeStatementOperation(self, trace_collection):
1548
+ """Must be overloaded for non-final node."""
1549
+
1550
+ def collectVariableAccesses(self, emit_read, emit_write):
1551
+ """Collect variable reads and writes of child nodes."""
1552
+
1553
+ self.subnode_locals_arg.collectVariableAccesses(emit_read, emit_write)
1554
+
1555
+
1556
+ # Assign the names that are easier to import with a stable name.
1557
+ StatementLocalsDictSyncBase = (
1558
+ StatementChildHavingLocalsArgOperationPostInitLocalsScopeMixin
1559
+ )
1560
+
1561
+
1562
+ class StatementChildHavingLoopBodyOptionalStatementsOrNonePostInitMixin(StatementBase):
1563
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1564
+ __slots__ = ()
1565
+
1566
+ # This is generated for use in
1567
+ # StatementLoop
1568
+
1569
+ def __init__(self, loop_body, source_ref):
1570
+ loop_body = checkStatementsSequenceOrNone(loop_body)
1571
+ if loop_body is not None:
1572
+ loop_body.parent = self
1573
+
1574
+ self.subnode_loop_body = loop_body
1575
+
1576
+ StatementBase.__init__(self, source_ref)
1577
+
1578
+ self.postInitNode()
1579
+
1580
+ @abstractmethod
1581
+ def postInitNode(self):
1582
+ """For overload"""
1583
+
1584
+ def setChildLoopBody(self, value):
1585
+ value = checkStatementsSequenceOrNone(value)
1586
+ if value is not None:
1587
+ value.parent = self
1588
+
1589
+ self.subnode_loop_body = value
1590
+
1591
+ def getVisitableNodes(self):
1592
+ """The visitable nodes, with tuple values flattened."""
1593
+
1594
+ value = self.subnode_loop_body
1595
+
1596
+ if value is None:
1597
+ return ()
1598
+ else:
1599
+ return (value,)
1600
+
1601
+ def getVisitableNodesNamed(self):
1602
+ """Named children dictionary.
1603
+
1604
+ For use in cloning nodes, debugging and XML output.
1605
+ """
1606
+
1607
+ return (("loop_body", self.subnode_loop_body),)
1608
+
1609
+ def replaceChild(self, old_node, new_node):
1610
+ value = self.subnode_loop_body
1611
+ if old_node is value:
1612
+ new_node = checkStatementsSequenceOrNone(new_node)
1613
+ if new_node is not None:
1614
+ new_node.parent = self
1615
+
1616
+ self.subnode_loop_body = new_node
1617
+
1618
+ return
1619
+
1620
+ raise AssertionError("Didn't find child", old_node, "in", self)
1621
+
1622
+ def getCloneArgs(self):
1623
+ """Get clones of all children to pass for a new node.
1624
+
1625
+ Needs to make clones of child nodes too.
1626
+ """
1627
+
1628
+ values = {
1629
+ "loop_body": (
1630
+ self.subnode_loop_body.makeClone()
1631
+ if self.subnode_loop_body is not None
1632
+ else None
1633
+ ),
1634
+ }
1635
+
1636
+ values.update(self.getDetails())
1637
+
1638
+ return values
1639
+
1640
+ def finalize(self):
1641
+ del self.parent
1642
+
1643
+ if self.subnode_loop_body is not None:
1644
+ self.subnode_loop_body.finalize()
1645
+ del self.subnode_loop_body
1646
+
1647
+ def collectVariableAccesses(self, emit_read, emit_write):
1648
+ """Collect variable reads and writes of child nodes."""
1649
+
1650
+ subnode_loop_body = self.subnode_loop_body
1651
+
1652
+ if subnode_loop_body is not None:
1653
+ self.subnode_loop_body.collectVariableAccesses(emit_read, emit_write)
1654
+
1655
+
1656
+ # Assign the names that are easier to import with a stable name.
1657
+ StatementLoopBase = StatementChildHavingLoopBodyOptionalStatementsOrNonePostInitMixin
1658
+
1659
+
1660
+ class StatementChildHavingModuleOperationPostInitTargetScopeMixin(StatementBase):
1661
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1662
+ __slots__ = ()
1663
+
1664
+ # This is generated for use in
1665
+ # StatementImportStar
1666
+
1667
+ def __init__(self, module, target_scope, source_ref):
1668
+ module.parent = self
1669
+
1670
+ self.subnode_module = module
1671
+
1672
+ self.target_scope = target_scope
1673
+
1674
+ StatementBase.__init__(self, source_ref)
1675
+
1676
+ self.postInitNode()
1677
+
1678
+ @abstractmethod
1679
+ def postInitNode(self):
1680
+ """For overload"""
1681
+
1682
+ def getDetails(self):
1683
+ return {
1684
+ "target_scope": self.target_scope,
1685
+ }
1686
+
1687
+ def getVisitableNodes(self):
1688
+ """The visitable nodes, with tuple values flattened."""
1689
+
1690
+ return (self.subnode_module,)
1691
+
1692
+ def getVisitableNodesNamed(self):
1693
+ """Named children dictionary.
1694
+
1695
+ For use in cloning nodes, debugging and XML output.
1696
+ """
1697
+
1698
+ return (("module", self.subnode_module),)
1699
+
1700
+ def replaceChild(self, old_node, new_node):
1701
+ value = self.subnode_module
1702
+ if old_node is value:
1703
+ new_node.parent = self
1704
+
1705
+ self.subnode_module = new_node
1706
+
1707
+ return
1708
+
1709
+ raise AssertionError("Didn't find child", old_node, "in", self)
1710
+
1711
+ def getCloneArgs(self):
1712
+ """Get clones of all children to pass for a new node.
1713
+
1714
+ Needs to make clones of child nodes too.
1715
+ """
1716
+
1717
+ values = {
1718
+ "module": self.subnode_module.makeClone(),
1719
+ }
1720
+
1721
+ values.update(self.getDetails())
1722
+
1723
+ return values
1724
+
1725
+ def finalize(self):
1726
+ del self.parent
1727
+
1728
+ self.subnode_module.finalize()
1729
+ del self.subnode_module
1730
+
1731
+ del self.target_scope
1732
+
1733
+ def computeStatement(self, trace_collection):
1734
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1735
+ trace_collection=trace_collection
1736
+ )
1737
+
1738
+ if result is not self:
1739
+ return result, change_tags, change_desc
1740
+
1741
+ return self.computeStatementOperation(trace_collection)
1742
+
1743
+ @abstractmethod
1744
+ def computeStatementOperation(self, trace_collection):
1745
+ """Must be overloaded for non-final node."""
1746
+
1747
+ def collectVariableAccesses(self, emit_read, emit_write):
1748
+ """Collect variable reads and writes of child nodes."""
1749
+
1750
+ self.subnode_module.collectVariableAccesses(emit_read, emit_write)
1751
+
1752
+
1753
+ # Assign the names that are easier to import with a stable name.
1754
+ StatementImportStarBase = StatementChildHavingModuleOperationPostInitTargetScopeMixin
1755
+
1756
+
1757
+ class StatementChildHavingNewLocalsOperationLocalsScopeMixin(StatementBase):
1758
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1759
+ __slots__ = ()
1760
+
1761
+ # This is generated for use in
1762
+ # StatementSetLocals
1763
+
1764
+ def __init__(self, new_locals, locals_scope, source_ref):
1765
+ new_locals.parent = self
1766
+
1767
+ self.subnode_new_locals = new_locals
1768
+
1769
+ self.locals_scope = locals_scope
1770
+
1771
+ StatementBase.__init__(self, source_ref)
1772
+
1773
+ def getDetails(self):
1774
+ return {
1775
+ "locals_scope": self.locals_scope,
1776
+ }
1777
+
1778
+ def getVisitableNodes(self):
1779
+ """The visitable nodes, with tuple values flattened."""
1780
+
1781
+ return (self.subnode_new_locals,)
1782
+
1783
+ def getVisitableNodesNamed(self):
1784
+ """Named children dictionary.
1785
+
1786
+ For use in cloning nodes, debugging and XML output.
1787
+ """
1788
+
1789
+ return (("new_locals", self.subnode_new_locals),)
1790
+
1791
+ def replaceChild(self, old_node, new_node):
1792
+ value = self.subnode_new_locals
1793
+ if old_node is value:
1794
+ new_node.parent = self
1795
+
1796
+ self.subnode_new_locals = new_node
1797
+
1798
+ return
1799
+
1800
+ raise AssertionError("Didn't find child", old_node, "in", self)
1801
+
1802
+ def getCloneArgs(self):
1803
+ """Get clones of all children to pass for a new node.
1804
+
1805
+ Needs to make clones of child nodes too.
1806
+ """
1807
+
1808
+ values = {
1809
+ "new_locals": self.subnode_new_locals.makeClone(),
1810
+ }
1811
+
1812
+ values.update(self.getDetails())
1813
+
1814
+ return values
1815
+
1816
+ def finalize(self):
1817
+ del self.parent
1818
+
1819
+ self.subnode_new_locals.finalize()
1820
+ del self.subnode_new_locals
1821
+
1822
+ del self.locals_scope
1823
+
1824
+ def computeStatement(self, trace_collection):
1825
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1826
+ trace_collection=trace_collection
1827
+ )
1828
+
1829
+ if result is not self:
1830
+ return result, change_tags, change_desc
1831
+
1832
+ return self.computeStatementOperation(trace_collection)
1833
+
1834
+ @abstractmethod
1835
+ def computeStatementOperation(self, trace_collection):
1836
+ """Must be overloaded for non-final node."""
1837
+
1838
+ def collectVariableAccesses(self, emit_read, emit_write):
1839
+ """Collect variable reads and writes of child nodes."""
1840
+
1841
+ self.subnode_new_locals.collectVariableAccesses(emit_read, emit_write)
1842
+
1843
+
1844
+ # Assign the names that are easier to import with a stable name.
1845
+ StatementSetLocalsBase = StatementChildHavingNewLocalsOperationLocalsScopeMixin
1846
+
1847
+
1848
+ class StatementChildrenHavingSetArgValueOperationMixin(StatementBase):
1849
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1850
+ __slots__ = ()
1851
+
1852
+ # This is generated for use in
1853
+ # StatementSetOperationAdd
1854
+
1855
+ def __init__(self, set_arg, value, source_ref):
1856
+ set_arg.parent = self
1857
+
1858
+ self.subnode_set_arg = set_arg
1859
+
1860
+ value.parent = self
1861
+
1862
+ self.subnode_value = value
1863
+
1864
+ StatementBase.__init__(self, source_ref)
1865
+
1866
+ def getVisitableNodes(self):
1867
+ """The visitable nodes, with tuple values flattened."""
1868
+
1869
+ return (
1870
+ self.subnode_set_arg,
1871
+ self.subnode_value,
1872
+ )
1873
+
1874
+ def getVisitableNodesNamed(self):
1875
+ """Named children dictionary.
1876
+
1877
+ For use in cloning nodes, debugging and XML output.
1878
+ """
1879
+
1880
+ return (
1881
+ ("set_arg", self.subnode_set_arg),
1882
+ ("value", self.subnode_value),
1883
+ )
1884
+
1885
+ def replaceChild(self, old_node, new_node):
1886
+ value = self.subnode_set_arg
1887
+ if old_node is value:
1888
+ new_node.parent = self
1889
+
1890
+ self.subnode_set_arg = new_node
1891
+
1892
+ return
1893
+
1894
+ value = self.subnode_value
1895
+ if old_node is value:
1896
+ new_node.parent = self
1897
+
1898
+ self.subnode_value = new_node
1899
+
1900
+ return
1901
+
1902
+ raise AssertionError("Didn't find child", old_node, "in", self)
1903
+
1904
+ def getCloneArgs(self):
1905
+ """Get clones of all children to pass for a new node.
1906
+
1907
+ Needs to make clones of child nodes too.
1908
+ """
1909
+
1910
+ values = {
1911
+ "set_arg": self.subnode_set_arg.makeClone(),
1912
+ "value": self.subnode_value.makeClone(),
1913
+ }
1914
+
1915
+ values.update(self.getDetails())
1916
+
1917
+ return values
1918
+
1919
+ def finalize(self):
1920
+ del self.parent
1921
+
1922
+ self.subnode_set_arg.finalize()
1923
+ del self.subnode_set_arg
1924
+ self.subnode_value.finalize()
1925
+ del self.subnode_value
1926
+
1927
+ def computeStatement(self, trace_collection):
1928
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
1929
+ trace_collection=trace_collection
1930
+ )
1931
+
1932
+ if result is not self:
1933
+ return result, change_tags, change_desc
1934
+
1935
+ return self.computeStatementOperation(trace_collection)
1936
+
1937
+ @abstractmethod
1938
+ def computeStatementOperation(self, trace_collection):
1939
+ """Must be overloaded for non-final node."""
1940
+
1941
+ def collectVariableAccesses(self, emit_read, emit_write):
1942
+ """Collect variable reads and writes of child nodes."""
1943
+
1944
+ self.subnode_set_arg.collectVariableAccesses(emit_read, emit_write)
1945
+ self.subnode_value.collectVariableAccesses(emit_read, emit_write)
1946
+
1947
+
1948
+ # Assign the names that are easier to import with a stable name.
1949
+ StatementSetOperationAddBase = StatementChildrenHavingSetArgValueOperationMixin
1950
+
1951
+
1952
+ class StatementChildHavingSourcePostInitProviderVariableNameMixin(StatementBase):
1953
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
1954
+ __slots__ = ()
1955
+
1956
+ # This is generated for use in
1957
+ # StatementAssignmentVariableName
1958
+
1959
+ def __init__(self, source, provider, variable_name, source_ref):
1960
+ source.parent = self
1961
+
1962
+ self.subnode_source = source
1963
+
1964
+ self.provider = provider
1965
+ self.variable_name = variable_name
1966
+
1967
+ StatementBase.__init__(self, source_ref)
1968
+
1969
+ self.postInitNode()
1970
+
1971
+ @abstractmethod
1972
+ def postInitNode(self):
1973
+ """For overload"""
1974
+
1975
+ def getDetails(self):
1976
+ return {
1977
+ "provider": self.provider,
1978
+ "variable_name": self.variable_name,
1979
+ }
1980
+
1981
+ def getVisitableNodes(self):
1982
+ """The visitable nodes, with tuple values flattened."""
1983
+
1984
+ return (self.subnode_source,)
1985
+
1986
+ def getVisitableNodesNamed(self):
1987
+ """Named children dictionary.
1988
+
1989
+ For use in cloning nodes, debugging and XML output.
1990
+ """
1991
+
1992
+ return (("source", self.subnode_source),)
1993
+
1994
+ def replaceChild(self, old_node, new_node):
1995
+ value = self.subnode_source
1996
+ if old_node is value:
1997
+ new_node.parent = self
1998
+
1999
+ self.subnode_source = new_node
2000
+
2001
+ return
2002
+
2003
+ raise AssertionError("Didn't find child", old_node, "in", self)
2004
+
2005
+ def getCloneArgs(self):
2006
+ """Get clones of all children to pass for a new node.
2007
+
2008
+ Needs to make clones of child nodes too.
2009
+ """
2010
+
2011
+ values = {
2012
+ "source": self.subnode_source.makeClone(),
2013
+ }
2014
+
2015
+ values.update(self.getDetails())
2016
+
2017
+ return values
2018
+
2019
+ def finalize(self):
2020
+ del self.parent
2021
+
2022
+ self.subnode_source.finalize()
2023
+ del self.subnode_source
2024
+
2025
+ def collectVariableAccesses(self, emit_read, emit_write):
2026
+ """Collect variable reads and writes of child nodes."""
2027
+
2028
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2029
+
2030
+
2031
+ # Assign the names that are easier to import with a stable name.
2032
+ StatementAssignmentVariableNameBase = (
2033
+ StatementChildHavingSourcePostInitProviderVariableNameMixin
2034
+ )
2035
+
2036
+
2037
+ class StatementChildHavingSourcePostInitVariableVariableVersionMixin(StatementBase):
2038
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2039
+ __slots__ = ()
2040
+
2041
+ # This is generated for use in
2042
+ # StatementAssignmentVariableConstantImmutable
2043
+ # StatementAssignmentVariableConstantImmutableTrusted
2044
+ # StatementAssignmentVariableConstantMutable
2045
+ # StatementAssignmentVariableConstantMutableTrusted
2046
+ # StatementAssignmentVariableFromTempVariable
2047
+ # StatementAssignmentVariableFromVariable
2048
+ # StatementAssignmentVariableGeneric
2049
+ # StatementAssignmentVariableHardValue
2050
+ # StatementAssignmentVariableIterator
2051
+
2052
+ def __init__(self, source, variable, variable_version, source_ref):
2053
+ source.parent = self
2054
+
2055
+ self.subnode_source = source
2056
+
2057
+ self.variable = variable
2058
+ self.variable_version = variable_version
2059
+
2060
+ StatementBase.__init__(self, source_ref)
2061
+
2062
+ self.postInitNode()
2063
+
2064
+ @abstractmethod
2065
+ def postInitNode(self):
2066
+ """For overload"""
2067
+
2068
+ def getDetails(self):
2069
+ return {
2070
+ "variable": self.variable,
2071
+ "variable_version": self.variable_version,
2072
+ }
2073
+
2074
+ def setChildSource(self, value):
2075
+ value.parent = self
2076
+
2077
+ self.subnode_source = value
2078
+
2079
+ def getVisitableNodes(self):
2080
+ """The visitable nodes, with tuple values flattened."""
2081
+
2082
+ return (self.subnode_source,)
2083
+
2084
+ def getVisitableNodesNamed(self):
2085
+ """Named children dictionary.
2086
+
2087
+ For use in cloning nodes, debugging and XML output.
2088
+ """
2089
+
2090
+ return (("source", self.subnode_source),)
2091
+
2092
+ def replaceChild(self, old_node, new_node):
2093
+ value = self.subnode_source
2094
+ if old_node is value:
2095
+ new_node.parent = self
2096
+
2097
+ self.subnode_source = new_node
2098
+
2099
+ return
2100
+
2101
+ raise AssertionError("Didn't find child", old_node, "in", self)
2102
+
2103
+ def getCloneArgs(self):
2104
+ """Get clones of all children to pass for a new node.
2105
+
2106
+ Needs to make clones of child nodes too.
2107
+ """
2108
+
2109
+ values = {
2110
+ "source": self.subnode_source.makeClone(),
2111
+ }
2112
+
2113
+ values.update(self.getDetails())
2114
+
2115
+ return values
2116
+
2117
+ def finalize(self):
2118
+ del self.parent
2119
+
2120
+ self.subnode_source.finalize()
2121
+ del self.subnode_source
2122
+
2123
+ del self.variable
2124
+
2125
+ def collectVariableAccesses(self, emit_read, emit_write):
2126
+ """Collect variable reads and writes of child nodes."""
2127
+
2128
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2129
+
2130
+
2131
+ # Assign the names that are easier to import with a stable name.
2132
+ StatementAssignmentVariableConstantImmutableBase = (
2133
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2134
+ )
2135
+ StatementAssignmentVariableConstantImmutableTrustedBase = (
2136
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2137
+ )
2138
+ StatementAssignmentVariableConstantMutableBase = (
2139
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2140
+ )
2141
+ StatementAssignmentVariableConstantMutableTrustedBase = (
2142
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2143
+ )
2144
+ StatementAssignmentVariableFromTempVariableBase = (
2145
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2146
+ )
2147
+ StatementAssignmentVariableFromVariableBase = (
2148
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2149
+ )
2150
+ StatementAssignmentVariableGenericBase = (
2151
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2152
+ )
2153
+ StatementAssignmentVariableHardValueBase = (
2154
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2155
+ )
2156
+ StatementAssignmentVariableIteratorBase = (
2157
+ StatementChildHavingSourcePostInitVariableVariableVersionMixin
2158
+ )
2159
+
2160
+
2161
+ class StatementChildHavingSourceOperationPostInitLocalsScopeVariableNameMixin(
2162
+ StatementBase
2163
+ ):
2164
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2165
+ __slots__ = ()
2166
+
2167
+ # This is generated for use in
2168
+ # StatementLocalsDictOperationSet
2169
+
2170
+ def __init__(self, source, locals_scope, variable_name, source_ref):
2171
+ source.parent = self
2172
+
2173
+ self.subnode_source = source
2174
+
2175
+ self.locals_scope = locals_scope
2176
+ self.variable_name = variable_name
2177
+
2178
+ StatementBase.__init__(self, source_ref)
2179
+
2180
+ self.postInitNode()
2181
+
2182
+ @abstractmethod
2183
+ def postInitNode(self):
2184
+ """For overload"""
2185
+
2186
+ def getDetails(self):
2187
+ return {
2188
+ "locals_scope": self.locals_scope,
2189
+ "variable_name": self.variable_name,
2190
+ }
2191
+
2192
+ def getVisitableNodes(self):
2193
+ """The visitable nodes, with tuple values flattened."""
2194
+
2195
+ return (self.subnode_source,)
2196
+
2197
+ def getVisitableNodesNamed(self):
2198
+ """Named children dictionary.
2199
+
2200
+ For use in cloning nodes, debugging and XML output.
2201
+ """
2202
+
2203
+ return (("source", self.subnode_source),)
2204
+
2205
+ def replaceChild(self, old_node, new_node):
2206
+ value = self.subnode_source
2207
+ if old_node is value:
2208
+ new_node.parent = self
2209
+
2210
+ self.subnode_source = new_node
2211
+
2212
+ return
2213
+
2214
+ raise AssertionError("Didn't find child", old_node, "in", self)
2215
+
2216
+ def getCloneArgs(self):
2217
+ """Get clones of all children to pass for a new node.
2218
+
2219
+ Needs to make clones of child nodes too.
2220
+ """
2221
+
2222
+ values = {
2223
+ "source": self.subnode_source.makeClone(),
2224
+ }
2225
+
2226
+ values.update(self.getDetails())
2227
+
2228
+ return values
2229
+
2230
+ def finalize(self):
2231
+ del self.parent
2232
+
2233
+ self.subnode_source.finalize()
2234
+ del self.subnode_source
2235
+
2236
+ del self.locals_scope
2237
+
2238
+ def computeStatement(self, trace_collection):
2239
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
2240
+ trace_collection=trace_collection
2241
+ )
2242
+
2243
+ if result is not self:
2244
+ return result, change_tags, change_desc
2245
+
2246
+ return self.computeStatementOperation(trace_collection)
2247
+
2248
+ @abstractmethod
2249
+ def computeStatementOperation(self, trace_collection):
2250
+ """Must be overloaded for non-final node."""
2251
+
2252
+ def collectVariableAccesses(self, emit_read, emit_write):
2253
+ """Collect variable reads and writes of child nodes."""
2254
+
2255
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2256
+
2257
+
2258
+ # Assign the names that are easier to import with a stable name.
2259
+ StatementLocalsDictOperationSetBase = (
2260
+ StatementChildHavingSourceOperationPostInitLocalsScopeVariableNameMixin
2261
+ )
2262
+
2263
+
2264
+ class StatementChildrenHavingSourceExpressionOperationAttributeNameMixin(StatementBase):
2265
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2266
+ __slots__ = ()
2267
+
2268
+ # This is generated for use in
2269
+ # StatementAssignmentAttribute
2270
+
2271
+ def __init__(self, source, expression, attribute_name, source_ref):
2272
+ source.parent = self
2273
+
2274
+ self.subnode_source = source
2275
+
2276
+ expression.parent = self
2277
+
2278
+ self.subnode_expression = expression
2279
+
2280
+ self.attribute_name = attribute_name
2281
+
2282
+ StatementBase.__init__(self, source_ref)
2283
+
2284
+ def getDetails(self):
2285
+ return {
2286
+ "attribute_name": self.attribute_name,
2287
+ }
2288
+
2289
+ def getVisitableNodes(self):
2290
+ """The visitable nodes, with tuple values flattened."""
2291
+
2292
+ return (
2293
+ self.subnode_source,
2294
+ self.subnode_expression,
2295
+ )
2296
+
2297
+ def getVisitableNodesNamed(self):
2298
+ """Named children dictionary.
2299
+
2300
+ For use in cloning nodes, debugging and XML output.
2301
+ """
2302
+
2303
+ return (
2304
+ ("source", self.subnode_source),
2305
+ ("expression", self.subnode_expression),
2306
+ )
2307
+
2308
+ def replaceChild(self, old_node, new_node):
2309
+ value = self.subnode_source
2310
+ if old_node is value:
2311
+ new_node.parent = self
2312
+
2313
+ self.subnode_source = new_node
2314
+
2315
+ return
2316
+
2317
+ value = self.subnode_expression
2318
+ if old_node is value:
2319
+ new_node.parent = self
2320
+
2321
+ self.subnode_expression = new_node
2322
+
2323
+ return
2324
+
2325
+ raise AssertionError("Didn't find child", old_node, "in", self)
2326
+
2327
+ def getCloneArgs(self):
2328
+ """Get clones of all children to pass for a new node.
2329
+
2330
+ Needs to make clones of child nodes too.
2331
+ """
2332
+
2333
+ values = {
2334
+ "source": self.subnode_source.makeClone(),
2335
+ "expression": self.subnode_expression.makeClone(),
2336
+ }
2337
+
2338
+ values.update(self.getDetails())
2339
+
2340
+ return values
2341
+
2342
+ def finalize(self):
2343
+ del self.parent
2344
+
2345
+ self.subnode_source.finalize()
2346
+ del self.subnode_source
2347
+ self.subnode_expression.finalize()
2348
+ del self.subnode_expression
2349
+
2350
+ def computeStatement(self, trace_collection):
2351
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
2352
+ trace_collection=trace_collection
2353
+ )
2354
+
2355
+ if result is not self:
2356
+ return result, change_tags, change_desc
2357
+
2358
+ return self.computeStatementOperation(trace_collection)
2359
+
2360
+ @abstractmethod
2361
+ def computeStatementOperation(self, trace_collection):
2362
+ """Must be overloaded for non-final node."""
2363
+
2364
+ def collectVariableAccesses(self, emit_read, emit_write):
2365
+ """Collect variable reads and writes of child nodes."""
2366
+
2367
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2368
+ self.subnode_expression.collectVariableAccesses(emit_read, emit_write)
2369
+
2370
+
2371
+ # Assign the names that are easier to import with a stable name.
2372
+ StatementAssignmentAttributeBase = (
2373
+ StatementChildrenHavingSourceExpressionOperationAttributeNameMixin
2374
+ )
2375
+
2376
+
2377
+ class StatementChildrenHavingSourceExpressionLowerOptionalUpperOptionalMixin(
2378
+ StatementBase
2379
+ ):
2380
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2381
+ __slots__ = ()
2382
+
2383
+ # This is generated for use in
2384
+ # StatementAssignmentSlice
2385
+
2386
+ def __init__(self, source, expression, lower, upper, source_ref):
2387
+ source.parent = self
2388
+
2389
+ self.subnode_source = source
2390
+
2391
+ expression.parent = self
2392
+
2393
+ self.subnode_expression = expression
2394
+
2395
+ if lower is not None:
2396
+ lower.parent = self
2397
+
2398
+ self.subnode_lower = lower
2399
+
2400
+ if upper is not None:
2401
+ upper.parent = self
2402
+
2403
+ self.subnode_upper = upper
2404
+
2405
+ StatementBase.__init__(self, source_ref)
2406
+
2407
+ def getVisitableNodes(self):
2408
+ """The visitable nodes, with tuple values flattened."""
2409
+
2410
+ result = []
2411
+ result.append(self.subnode_source)
2412
+ result.append(self.subnode_expression)
2413
+ value = self.subnode_lower
2414
+ if value is None:
2415
+ pass
2416
+ else:
2417
+ result.append(value)
2418
+ value = self.subnode_upper
2419
+ if value is None:
2420
+ pass
2421
+ else:
2422
+ result.append(value)
2423
+ return tuple(result)
2424
+
2425
+ def getVisitableNodesNamed(self):
2426
+ """Named children dictionary.
2427
+
2428
+ For use in cloning nodes, debugging and XML output.
2429
+ """
2430
+
2431
+ return (
2432
+ ("source", self.subnode_source),
2433
+ ("expression", self.subnode_expression),
2434
+ ("lower", self.subnode_lower),
2435
+ ("upper", self.subnode_upper),
2436
+ )
2437
+
2438
+ def replaceChild(self, old_node, new_node):
2439
+ value = self.subnode_source
2440
+ if old_node is value:
2441
+ new_node.parent = self
2442
+
2443
+ self.subnode_source = new_node
2444
+
2445
+ return
2446
+
2447
+ value = self.subnode_expression
2448
+ if old_node is value:
2449
+ new_node.parent = self
2450
+
2451
+ self.subnode_expression = new_node
2452
+
2453
+ return
2454
+
2455
+ value = self.subnode_lower
2456
+ if old_node is value:
2457
+ if new_node is not None:
2458
+ new_node.parent = self
2459
+
2460
+ self.subnode_lower = new_node
2461
+
2462
+ return
2463
+
2464
+ value = self.subnode_upper
2465
+ if old_node is value:
2466
+ if new_node is not None:
2467
+ new_node.parent = self
2468
+
2469
+ self.subnode_upper = new_node
2470
+
2471
+ return
2472
+
2473
+ raise AssertionError("Didn't find child", old_node, "in", self)
2474
+
2475
+ def getCloneArgs(self):
2476
+ """Get clones of all children to pass for a new node.
2477
+
2478
+ Needs to make clones of child nodes too.
2479
+ """
2480
+
2481
+ values = {
2482
+ "source": self.subnode_source.makeClone(),
2483
+ "expression": self.subnode_expression.makeClone(),
2484
+ "lower": (
2485
+ self.subnode_lower.makeClone()
2486
+ if self.subnode_lower is not None
2487
+ else None
2488
+ ),
2489
+ "upper": (
2490
+ self.subnode_upper.makeClone()
2491
+ if self.subnode_upper is not None
2492
+ else None
2493
+ ),
2494
+ }
2495
+
2496
+ values.update(self.getDetails())
2497
+
2498
+ return values
2499
+
2500
+ def finalize(self):
2501
+ del self.parent
2502
+
2503
+ self.subnode_source.finalize()
2504
+ del self.subnode_source
2505
+ self.subnode_expression.finalize()
2506
+ del self.subnode_expression
2507
+ if self.subnode_lower is not None:
2508
+ self.subnode_lower.finalize()
2509
+ del self.subnode_lower
2510
+ if self.subnode_upper is not None:
2511
+ self.subnode_upper.finalize()
2512
+ del self.subnode_upper
2513
+
2514
+ def collectVariableAccesses(self, emit_read, emit_write):
2515
+ """Collect variable reads and writes of child nodes."""
2516
+
2517
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2518
+ self.subnode_expression.collectVariableAccesses(emit_read, emit_write)
2519
+ subnode_lower = self.subnode_lower
2520
+
2521
+ if subnode_lower is not None:
2522
+ self.subnode_lower.collectVariableAccesses(emit_read, emit_write)
2523
+ subnode_upper = self.subnode_upper
2524
+
2525
+ if subnode_upper is not None:
2526
+ self.subnode_upper.collectVariableAccesses(emit_read, emit_write)
2527
+
2528
+
2529
+ # Assign the names that are easier to import with a stable name.
2530
+ StatementAssignmentSliceBase = (
2531
+ StatementChildrenHavingSourceExpressionLowerOptionalUpperOptionalMixin
2532
+ )
2533
+
2534
+
2535
+ class StatementChildrenHavingSourceSubscribedSubscriptOperationMixin(StatementBase):
2536
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2537
+ __slots__ = ()
2538
+
2539
+ # This is generated for use in
2540
+ # StatementAssignmentSubscript
2541
+
2542
+ def __init__(self, source, subscribed, subscript, source_ref):
2543
+ source.parent = self
2544
+
2545
+ self.subnode_source = source
2546
+
2547
+ subscribed.parent = self
2548
+
2549
+ self.subnode_subscribed = subscribed
2550
+
2551
+ subscript.parent = self
2552
+
2553
+ self.subnode_subscript = subscript
2554
+
2555
+ StatementBase.__init__(self, source_ref)
2556
+
2557
+ def getVisitableNodes(self):
2558
+ """The visitable nodes, with tuple values flattened."""
2559
+
2560
+ return (
2561
+ self.subnode_source,
2562
+ self.subnode_subscribed,
2563
+ self.subnode_subscript,
2564
+ )
2565
+
2566
+ def getVisitableNodesNamed(self):
2567
+ """Named children dictionary.
2568
+
2569
+ For use in cloning nodes, debugging and XML output.
2570
+ """
2571
+
2572
+ return (
2573
+ ("source", self.subnode_source),
2574
+ ("subscribed", self.subnode_subscribed),
2575
+ ("subscript", self.subnode_subscript),
2576
+ )
2577
+
2578
+ def replaceChild(self, old_node, new_node):
2579
+ value = self.subnode_source
2580
+ if old_node is value:
2581
+ new_node.parent = self
2582
+
2583
+ self.subnode_source = new_node
2584
+
2585
+ return
2586
+
2587
+ value = self.subnode_subscribed
2588
+ if old_node is value:
2589
+ new_node.parent = self
2590
+
2591
+ self.subnode_subscribed = new_node
2592
+
2593
+ return
2594
+
2595
+ value = self.subnode_subscript
2596
+ if old_node is value:
2597
+ new_node.parent = self
2598
+
2599
+ self.subnode_subscript = new_node
2600
+
2601
+ return
2602
+
2603
+ raise AssertionError("Didn't find child", old_node, "in", self)
2604
+
2605
+ def getCloneArgs(self):
2606
+ """Get clones of all children to pass for a new node.
2607
+
2608
+ Needs to make clones of child nodes too.
2609
+ """
2610
+
2611
+ values = {
2612
+ "source": self.subnode_source.makeClone(),
2613
+ "subscribed": self.subnode_subscribed.makeClone(),
2614
+ "subscript": self.subnode_subscript.makeClone(),
2615
+ }
2616
+
2617
+ values.update(self.getDetails())
2618
+
2619
+ return values
2620
+
2621
+ def finalize(self):
2622
+ del self.parent
2623
+
2624
+ self.subnode_source.finalize()
2625
+ del self.subnode_source
2626
+ self.subnode_subscribed.finalize()
2627
+ del self.subnode_subscribed
2628
+ self.subnode_subscript.finalize()
2629
+ del self.subnode_subscript
2630
+
2631
+ def computeStatement(self, trace_collection):
2632
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
2633
+ trace_collection=trace_collection
2634
+ )
2635
+
2636
+ if result is not self:
2637
+ return result, change_tags, change_desc
2638
+
2639
+ return self.computeStatementOperation(trace_collection)
2640
+
2641
+ @abstractmethod
2642
+ def computeStatementOperation(self, trace_collection):
2643
+ """Must be overloaded for non-final node."""
2644
+
2645
+ def collectVariableAccesses(self, emit_read, emit_write):
2646
+ """Collect variable reads and writes of child nodes."""
2647
+
2648
+ self.subnode_source.collectVariableAccesses(emit_read, emit_write)
2649
+ self.subnode_subscribed.collectVariableAccesses(emit_read, emit_write)
2650
+ self.subnode_subscript.collectVariableAccesses(emit_read, emit_write)
2651
+
2652
+
2653
+ # Assign the names that are easier to import with a stable name.
2654
+ StatementAssignmentSubscriptBase = (
2655
+ StatementChildrenHavingSourceSubscribedSubscriptOperationMixin
2656
+ )
2657
+
2658
+
2659
+ class StatementChildrenHavingSourceCodeGlobalsArgAutoNoneLocalsArgAutoNoneOperationMixin(
2660
+ StatementBase
2661
+ ):
2662
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2663
+ __slots__ = ()
2664
+
2665
+ # This is generated for use in
2666
+ # StatementExec
2667
+
2668
+ def __init__(self, source_code, globals_arg, locals_arg, source_ref):
2669
+ source_code.parent = self
2670
+
2671
+ self.subnode_source_code = source_code
2672
+
2673
+ globals_arg = convertNoneConstantToNone(globals_arg)
2674
+ if globals_arg is not None:
2675
+ globals_arg.parent = self
2676
+
2677
+ self.subnode_globals_arg = globals_arg
2678
+
2679
+ locals_arg = convertNoneConstantToNone(locals_arg)
2680
+ if locals_arg is not None:
2681
+ locals_arg.parent = self
2682
+
2683
+ self.subnode_locals_arg = locals_arg
2684
+
2685
+ StatementBase.__init__(self, source_ref)
2686
+
2687
+ def getVisitableNodes(self):
2688
+ """The visitable nodes, with tuple values flattened."""
2689
+
2690
+ result = []
2691
+ result.append(self.subnode_source_code)
2692
+ value = self.subnode_globals_arg
2693
+ if value is None:
2694
+ pass
2695
+ else:
2696
+ result.append(value)
2697
+ value = self.subnode_locals_arg
2698
+ if value is None:
2699
+ pass
2700
+ else:
2701
+ result.append(value)
2702
+ return tuple(result)
2703
+
2704
+ def getVisitableNodesNamed(self):
2705
+ """Named children dictionary.
2706
+
2707
+ For use in cloning nodes, debugging and XML output.
2708
+ """
2709
+
2710
+ return (
2711
+ ("source_code", self.subnode_source_code),
2712
+ ("globals_arg", self.subnode_globals_arg),
2713
+ ("locals_arg", self.subnode_locals_arg),
2714
+ )
2715
+
2716
+ def replaceChild(self, old_node, new_node):
2717
+ value = self.subnode_source_code
2718
+ if old_node is value:
2719
+ new_node.parent = self
2720
+
2721
+ self.subnode_source_code = new_node
2722
+
2723
+ return
2724
+
2725
+ value = self.subnode_globals_arg
2726
+ if old_node is value:
2727
+ new_node = convertNoneConstantToNone(new_node)
2728
+ if new_node is not None:
2729
+ new_node.parent = self
2730
+
2731
+ self.subnode_globals_arg = new_node
2732
+
2733
+ return
2734
+
2735
+ value = self.subnode_locals_arg
2736
+ if old_node is value:
2737
+ new_node = convertNoneConstantToNone(new_node)
2738
+ if new_node is not None:
2739
+ new_node.parent = self
2740
+
2741
+ self.subnode_locals_arg = new_node
2742
+
2743
+ return
2744
+
2745
+ raise AssertionError("Didn't find child", old_node, "in", self)
2746
+
2747
+ def getCloneArgs(self):
2748
+ """Get clones of all children to pass for a new node.
2749
+
2750
+ Needs to make clones of child nodes too.
2751
+ """
2752
+
2753
+ values = {
2754
+ "source_code": self.subnode_source_code.makeClone(),
2755
+ "globals_arg": (
2756
+ self.subnode_globals_arg.makeClone()
2757
+ if self.subnode_globals_arg is not None
2758
+ else None
2759
+ ),
2760
+ "locals_arg": (
2761
+ self.subnode_locals_arg.makeClone()
2762
+ if self.subnode_locals_arg is not None
2763
+ else None
2764
+ ),
2765
+ }
2766
+
2767
+ values.update(self.getDetails())
2768
+
2769
+ return values
2770
+
2771
+ def finalize(self):
2772
+ del self.parent
2773
+
2774
+ self.subnode_source_code.finalize()
2775
+ del self.subnode_source_code
2776
+ if self.subnode_globals_arg is not None:
2777
+ self.subnode_globals_arg.finalize()
2778
+ del self.subnode_globals_arg
2779
+ if self.subnode_locals_arg is not None:
2780
+ self.subnode_locals_arg.finalize()
2781
+ del self.subnode_locals_arg
2782
+
2783
+ def computeStatement(self, trace_collection):
2784
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
2785
+ trace_collection=trace_collection
2786
+ )
2787
+
2788
+ if result is not self:
2789
+ return result, change_tags, change_desc
2790
+
2791
+ return self.computeStatementOperation(trace_collection)
2792
+
2793
+ @abstractmethod
2794
+ def computeStatementOperation(self, trace_collection):
2795
+ """Must be overloaded for non-final node."""
2796
+
2797
+ def collectVariableAccesses(self, emit_read, emit_write):
2798
+ """Collect variable reads and writes of child nodes."""
2799
+
2800
+ self.subnode_source_code.collectVariableAccesses(emit_read, emit_write)
2801
+ subnode_globals_arg = self.subnode_globals_arg
2802
+
2803
+ if subnode_globals_arg is not None:
2804
+ self.subnode_globals_arg.collectVariableAccesses(emit_read, emit_write)
2805
+ subnode_locals_arg = self.subnode_locals_arg
2806
+
2807
+ if subnode_locals_arg is not None:
2808
+ self.subnode_locals_arg.collectVariableAccesses(emit_read, emit_write)
2809
+
2810
+
2811
+ # Assign the names that are easier to import with a stable name.
2812
+ StatementExecBase = (
2813
+ StatementChildrenHavingSourceCodeGlobalsArgAutoNoneLocalsArgAutoNoneOperationMixin
2814
+ )
2815
+
2816
+
2817
+ class StatementChildHavingStatementsTupleMixin(StatementBase):
2818
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2819
+ __slots__ = ()
2820
+
2821
+ # This is generated for use in
2822
+ # StatementsFrameAsyncgen
2823
+ # StatementsFrameClass
2824
+ # StatementsFrameCoroutine
2825
+ # StatementsFrameFunction
2826
+ # StatementsFrameGenerator
2827
+ # StatementsFrameModule
2828
+ # StatementsSequence
2829
+
2830
+ def __init__(self, statements, source_ref):
2831
+ assert type(statements) is tuple
2832
+
2833
+ for val in statements:
2834
+ val.parent = self
2835
+
2836
+ self.subnode_statements = statements
2837
+
2838
+ StatementBase.__init__(self, source_ref)
2839
+
2840
+ def setChildStatements(self, value):
2841
+ assert type(value) is tuple, type(value)
2842
+
2843
+ for val in value:
2844
+ val.parent = self
2845
+
2846
+ self.subnode_statements = value
2847
+
2848
+ def getVisitableNodes(self):
2849
+ """The visitable nodes, with tuple values flattened."""
2850
+
2851
+ return self.subnode_statements
2852
+
2853
+ def getVisitableNodesNamed(self):
2854
+ """Named children dictionary.
2855
+
2856
+ For use in cloning nodes, debugging and XML output.
2857
+ """
2858
+
2859
+ return (("statements", self.subnode_statements),)
2860
+
2861
+ def replaceChild(self, old_node, new_node):
2862
+ value = self.subnode_statements
2863
+ if old_node in value:
2864
+ if new_node is not None:
2865
+ new_node.parent = self
2866
+
2867
+ self.subnode_statements = tuple(
2868
+ (val if val is not old_node else new_node) for val in value
2869
+ )
2870
+ else:
2871
+ self.subnode_statements = tuple(
2872
+ val for val in value if val is not old_node
2873
+ )
2874
+
2875
+ return
2876
+
2877
+ raise AssertionError("Didn't find child", old_node, "in", self)
2878
+
2879
+ def getCloneArgs(self):
2880
+ """Get clones of all children to pass for a new node.
2881
+
2882
+ Needs to make clones of child nodes too.
2883
+ """
2884
+
2885
+ values = {
2886
+ "statements": tuple(v.makeClone() for v in self.subnode_statements),
2887
+ }
2888
+
2889
+ values.update(self.getDetails())
2890
+
2891
+ return values
2892
+
2893
+ def finalize(self):
2894
+ del self.parent
2895
+
2896
+ for c in self.subnode_statements:
2897
+ c.finalize()
2898
+ del self.subnode_statements
2899
+
2900
+ def collectVariableAccesses(self, emit_read, emit_write):
2901
+ """Collect variable reads and writes of child nodes."""
2902
+
2903
+ for element in self.subnode_statements:
2904
+ element.collectVariableAccesses(emit_read, emit_write)
2905
+
2906
+
2907
+ # Assign the names that are easier to import with a stable name.
2908
+ StatementsFrameAsyncgenBase = StatementChildHavingStatementsTupleMixin
2909
+ StatementsFrameClassBase = StatementChildHavingStatementsTupleMixin
2910
+ StatementsFrameCoroutineBase = StatementChildHavingStatementsTupleMixin
2911
+ StatementsFrameFunctionBase = StatementChildHavingStatementsTupleMixin
2912
+ StatementsFrameGeneratorBase = StatementChildHavingStatementsTupleMixin
2913
+ StatementsFrameModuleBase = StatementChildHavingStatementsTupleMixin
2914
+ StatementsSequenceBase = StatementChildHavingStatementsTupleMixin
2915
+
2916
+
2917
+ class StatementChildrenHavingSubscribedSubscriptOperationMixin(StatementBase):
2918
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
2919
+ __slots__ = ()
2920
+
2921
+ # This is generated for use in
2922
+ # StatementDelSubscript
2923
+
2924
+ def __init__(self, subscribed, subscript, source_ref):
2925
+ subscribed.parent = self
2926
+
2927
+ self.subnode_subscribed = subscribed
2928
+
2929
+ subscript.parent = self
2930
+
2931
+ self.subnode_subscript = subscript
2932
+
2933
+ StatementBase.__init__(self, source_ref)
2934
+
2935
+ def getVisitableNodes(self):
2936
+ """The visitable nodes, with tuple values flattened."""
2937
+
2938
+ return (
2939
+ self.subnode_subscribed,
2940
+ self.subnode_subscript,
2941
+ )
2942
+
2943
+ def getVisitableNodesNamed(self):
2944
+ """Named children dictionary.
2945
+
2946
+ For use in cloning nodes, debugging and XML output.
2947
+ """
2948
+
2949
+ return (
2950
+ ("subscribed", self.subnode_subscribed),
2951
+ ("subscript", self.subnode_subscript),
2952
+ )
2953
+
2954
+ def replaceChild(self, old_node, new_node):
2955
+ value = self.subnode_subscribed
2956
+ if old_node is value:
2957
+ new_node.parent = self
2958
+
2959
+ self.subnode_subscribed = new_node
2960
+
2961
+ return
2962
+
2963
+ value = self.subnode_subscript
2964
+ if old_node is value:
2965
+ new_node.parent = self
2966
+
2967
+ self.subnode_subscript = new_node
2968
+
2969
+ return
2970
+
2971
+ raise AssertionError("Didn't find child", old_node, "in", self)
2972
+
2973
+ def getCloneArgs(self):
2974
+ """Get clones of all children to pass for a new node.
2975
+
2976
+ Needs to make clones of child nodes too.
2977
+ """
2978
+
2979
+ values = {
2980
+ "subscribed": self.subnode_subscribed.makeClone(),
2981
+ "subscript": self.subnode_subscript.makeClone(),
2982
+ }
2983
+
2984
+ values.update(self.getDetails())
2985
+
2986
+ return values
2987
+
2988
+ def finalize(self):
2989
+ del self.parent
2990
+
2991
+ self.subnode_subscribed.finalize()
2992
+ del self.subnode_subscribed
2993
+ self.subnode_subscript.finalize()
2994
+ del self.subnode_subscript
2995
+
2996
+ def computeStatement(self, trace_collection):
2997
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
2998
+ trace_collection=trace_collection
2999
+ )
3000
+
3001
+ if result is not self:
3002
+ return result, change_tags, change_desc
3003
+
3004
+ return self.computeStatementOperation(trace_collection)
3005
+
3006
+ @abstractmethod
3007
+ def computeStatementOperation(self, trace_collection):
3008
+ """Must be overloaded for non-final node."""
3009
+
3010
+ def collectVariableAccesses(self, emit_read, emit_write):
3011
+ """Collect variable reads and writes of child nodes."""
3012
+
3013
+ self.subnode_subscribed.collectVariableAccesses(emit_read, emit_write)
3014
+ self.subnode_subscript.collectVariableAccesses(emit_read, emit_write)
3015
+
3016
+
3017
+ # Assign the names that are easier to import with a stable name.
3018
+ StatementDelSubscriptBase = StatementChildrenHavingSubscribedSubscriptOperationMixin
3019
+
3020
+
3021
+ class StatementChildrenHavingTriedStatementsExceptHandlerOptionalStatementsOrNoneBreakHandlerOptionalStatementsOrNoneContinueHandlerOptionalStatementsOrNoneReturnHandlerOptionalStatementsOrNonePostInitMixin(
3022
+ StatementBase
3023
+ ):
3024
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
3025
+ __slots__ = ()
3026
+
3027
+ # This is generated for use in
3028
+ # StatementTry
3029
+
3030
+ def __init__(
3031
+ self,
3032
+ tried,
3033
+ except_handler,
3034
+ break_handler,
3035
+ continue_handler,
3036
+ return_handler,
3037
+ source_ref,
3038
+ ):
3039
+ tried = checkStatementsSequence(tried)
3040
+ tried.parent = self
3041
+
3042
+ self.subnode_tried = tried
3043
+
3044
+ except_handler = checkStatementsSequenceOrNone(except_handler)
3045
+ if except_handler is not None:
3046
+ except_handler.parent = self
3047
+
3048
+ self.subnode_except_handler = except_handler
3049
+
3050
+ break_handler = checkStatementsSequenceOrNone(break_handler)
3051
+ if break_handler is not None:
3052
+ break_handler.parent = self
3053
+
3054
+ self.subnode_break_handler = break_handler
3055
+
3056
+ continue_handler = checkStatementsSequenceOrNone(continue_handler)
3057
+ if continue_handler is not None:
3058
+ continue_handler.parent = self
3059
+
3060
+ self.subnode_continue_handler = continue_handler
3061
+
3062
+ return_handler = checkStatementsSequenceOrNone(return_handler)
3063
+ if return_handler is not None:
3064
+ return_handler.parent = self
3065
+
3066
+ self.subnode_return_handler = return_handler
3067
+
3068
+ StatementBase.__init__(self, source_ref)
3069
+
3070
+ self.postInitNode()
3071
+
3072
+ @abstractmethod
3073
+ def postInitNode(self):
3074
+ """For overload"""
3075
+
3076
+ def setChildBreakHandler(self, value):
3077
+ value = checkStatementsSequenceOrNone(value)
3078
+ if value is not None:
3079
+ value.parent = self
3080
+
3081
+ self.subnode_break_handler = value
3082
+
3083
+ def setChildContinueHandler(self, value):
3084
+ value = checkStatementsSequenceOrNone(value)
3085
+ if value is not None:
3086
+ value.parent = self
3087
+
3088
+ self.subnode_continue_handler = value
3089
+
3090
+ def setChildExceptHandler(self, value):
3091
+ value = checkStatementsSequenceOrNone(value)
3092
+ if value is not None:
3093
+ value.parent = self
3094
+
3095
+ self.subnode_except_handler = value
3096
+
3097
+ def setChildReturnHandler(self, value):
3098
+ value = checkStatementsSequenceOrNone(value)
3099
+ if value is not None:
3100
+ value.parent = self
3101
+
3102
+ self.subnode_return_handler = value
3103
+
3104
+ def setChildTried(self, value):
3105
+ value = checkStatementsSequence(value)
3106
+ value.parent = self
3107
+
3108
+ self.subnode_tried = value
3109
+
3110
+ def getVisitableNodes(self):
3111
+ """The visitable nodes, with tuple values flattened."""
3112
+
3113
+ result = []
3114
+ result.append(self.subnode_tried)
3115
+ value = self.subnode_except_handler
3116
+ if value is None:
3117
+ pass
3118
+ else:
3119
+ result.append(value)
3120
+ value = self.subnode_break_handler
3121
+ if value is None:
3122
+ pass
3123
+ else:
3124
+ result.append(value)
3125
+ value = self.subnode_continue_handler
3126
+ if value is None:
3127
+ pass
3128
+ else:
3129
+ result.append(value)
3130
+ value = self.subnode_return_handler
3131
+ if value is None:
3132
+ pass
3133
+ else:
3134
+ result.append(value)
3135
+ return tuple(result)
3136
+
3137
+ def getVisitableNodesNamed(self):
3138
+ """Named children dictionary.
3139
+
3140
+ For use in cloning nodes, debugging and XML output.
3141
+ """
3142
+
3143
+ return (
3144
+ ("tried", self.subnode_tried),
3145
+ ("except_handler", self.subnode_except_handler),
3146
+ ("break_handler", self.subnode_break_handler),
3147
+ ("continue_handler", self.subnode_continue_handler),
3148
+ ("return_handler", self.subnode_return_handler),
3149
+ )
3150
+
3151
+ def replaceChild(self, old_node, new_node):
3152
+ value = self.subnode_tried
3153
+ if old_node is value:
3154
+ new_node = checkStatementsSequence(new_node)
3155
+ new_node.parent = self
3156
+
3157
+ self.subnode_tried = new_node
3158
+
3159
+ return
3160
+
3161
+ value = self.subnode_except_handler
3162
+ if old_node is value:
3163
+ new_node = checkStatementsSequenceOrNone(new_node)
3164
+ if new_node is not None:
3165
+ new_node.parent = self
3166
+
3167
+ self.subnode_except_handler = new_node
3168
+
3169
+ return
3170
+
3171
+ value = self.subnode_break_handler
3172
+ if old_node is value:
3173
+ new_node = checkStatementsSequenceOrNone(new_node)
3174
+ if new_node is not None:
3175
+ new_node.parent = self
3176
+
3177
+ self.subnode_break_handler = new_node
3178
+
3179
+ return
3180
+
3181
+ value = self.subnode_continue_handler
3182
+ if old_node is value:
3183
+ new_node = checkStatementsSequenceOrNone(new_node)
3184
+ if new_node is not None:
3185
+ new_node.parent = self
3186
+
3187
+ self.subnode_continue_handler = new_node
3188
+
3189
+ return
3190
+
3191
+ value = self.subnode_return_handler
3192
+ if old_node is value:
3193
+ new_node = checkStatementsSequenceOrNone(new_node)
3194
+ if new_node is not None:
3195
+ new_node.parent = self
3196
+
3197
+ self.subnode_return_handler = new_node
3198
+
3199
+ return
3200
+
3201
+ raise AssertionError("Didn't find child", old_node, "in", self)
3202
+
3203
+ def getCloneArgs(self):
3204
+ """Get clones of all children to pass for a new node.
3205
+
3206
+ Needs to make clones of child nodes too.
3207
+ """
3208
+
3209
+ values = {
3210
+ "tried": self.subnode_tried.makeClone(),
3211
+ "except_handler": (
3212
+ self.subnode_except_handler.makeClone()
3213
+ if self.subnode_except_handler is not None
3214
+ else None
3215
+ ),
3216
+ "break_handler": (
3217
+ self.subnode_break_handler.makeClone()
3218
+ if self.subnode_break_handler is not None
3219
+ else None
3220
+ ),
3221
+ "continue_handler": (
3222
+ self.subnode_continue_handler.makeClone()
3223
+ if self.subnode_continue_handler is not None
3224
+ else None
3225
+ ),
3226
+ "return_handler": (
3227
+ self.subnode_return_handler.makeClone()
3228
+ if self.subnode_return_handler is not None
3229
+ else None
3230
+ ),
3231
+ }
3232
+
3233
+ values.update(self.getDetails())
3234
+
3235
+ return values
3236
+
3237
+ def finalize(self):
3238
+ del self.parent
3239
+
3240
+ self.subnode_tried.finalize()
3241
+ del self.subnode_tried
3242
+ if self.subnode_except_handler is not None:
3243
+ self.subnode_except_handler.finalize()
3244
+ del self.subnode_except_handler
3245
+ if self.subnode_break_handler is not None:
3246
+ self.subnode_break_handler.finalize()
3247
+ del self.subnode_break_handler
3248
+ if self.subnode_continue_handler is not None:
3249
+ self.subnode_continue_handler.finalize()
3250
+ del self.subnode_continue_handler
3251
+ if self.subnode_return_handler is not None:
3252
+ self.subnode_return_handler.finalize()
3253
+ del self.subnode_return_handler
3254
+
3255
+ def collectVariableAccesses(self, emit_read, emit_write):
3256
+ """Collect variable reads and writes of child nodes."""
3257
+
3258
+ self.subnode_tried.collectVariableAccesses(emit_read, emit_write)
3259
+ subnode_except_handler = self.subnode_except_handler
3260
+
3261
+ if subnode_except_handler is not None:
3262
+ self.subnode_except_handler.collectVariableAccesses(emit_read, emit_write)
3263
+ subnode_break_handler = self.subnode_break_handler
3264
+
3265
+ if subnode_break_handler is not None:
3266
+ self.subnode_break_handler.collectVariableAccesses(emit_read, emit_write)
3267
+ subnode_continue_handler = self.subnode_continue_handler
3268
+
3269
+ if subnode_continue_handler is not None:
3270
+ self.subnode_continue_handler.collectVariableAccesses(emit_read, emit_write)
3271
+ subnode_return_handler = self.subnode_return_handler
3272
+
3273
+ if subnode_return_handler is not None:
3274
+ self.subnode_return_handler.collectVariableAccesses(emit_read, emit_write)
3275
+
3276
+
3277
+ # Assign the names that are easier to import with a stable name.
3278
+ StatementTryBase = StatementChildrenHavingTriedStatementsExceptHandlerOptionalStatementsOrNoneBreakHandlerOptionalStatementsOrNoneContinueHandlerOptionalStatementsOrNoneReturnHandlerOptionalStatementsOrNonePostInitMixin
3279
+
3280
+
3281
+ class StatementChildrenHavingValueDictArgKeyOperationMixin(StatementBase):
3282
+ # Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
3283
+ __slots__ = ()
3284
+
3285
+ # This is generated for use in
3286
+ # StatementDictOperationSet
3287
+ # StatementDictOperationSetKeyValue
3288
+
3289
+ def __init__(self, value, dict_arg, key, source_ref):
3290
+ value.parent = self
3291
+
3292
+ self.subnode_value = value
3293
+
3294
+ dict_arg.parent = self
3295
+
3296
+ self.subnode_dict_arg = dict_arg
3297
+
3298
+ key.parent = self
3299
+
3300
+ self.subnode_key = key
3301
+
3302
+ StatementBase.__init__(self, source_ref)
3303
+
3304
+ def getVisitableNodes(self):
3305
+ """The visitable nodes, with tuple values flattened."""
3306
+
3307
+ return (
3308
+ self.subnode_value,
3309
+ self.subnode_dict_arg,
3310
+ self.subnode_key,
3311
+ )
3312
+
3313
+ def getVisitableNodesNamed(self):
3314
+ """Named children dictionary.
3315
+
3316
+ For use in cloning nodes, debugging and XML output.
3317
+ """
3318
+
3319
+ return (
3320
+ ("value", self.subnode_value),
3321
+ ("dict_arg", self.subnode_dict_arg),
3322
+ ("key", self.subnode_key),
3323
+ )
3324
+
3325
+ def replaceChild(self, old_node, new_node):
3326
+ value = self.subnode_value
3327
+ if old_node is value:
3328
+ new_node.parent = self
3329
+
3330
+ self.subnode_value = new_node
3331
+
3332
+ return
3333
+
3334
+ value = self.subnode_dict_arg
3335
+ if old_node is value:
3336
+ new_node.parent = self
3337
+
3338
+ self.subnode_dict_arg = new_node
3339
+
3340
+ return
3341
+
3342
+ value = self.subnode_key
3343
+ if old_node is value:
3344
+ new_node.parent = self
3345
+
3346
+ self.subnode_key = new_node
3347
+
3348
+ return
3349
+
3350
+ raise AssertionError("Didn't find child", old_node, "in", self)
3351
+
3352
+ def getCloneArgs(self):
3353
+ """Get clones of all children to pass for a new node.
3354
+
3355
+ Needs to make clones of child nodes too.
3356
+ """
3357
+
3358
+ values = {
3359
+ "value": self.subnode_value.makeClone(),
3360
+ "dict_arg": self.subnode_dict_arg.makeClone(),
3361
+ "key": self.subnode_key.makeClone(),
3362
+ }
3363
+
3364
+ values.update(self.getDetails())
3365
+
3366
+ return values
3367
+
3368
+ def finalize(self):
3369
+ del self.parent
3370
+
3371
+ self.subnode_value.finalize()
3372
+ del self.subnode_value
3373
+ self.subnode_dict_arg.finalize()
3374
+ del self.subnode_dict_arg
3375
+ self.subnode_key.finalize()
3376
+ del self.subnode_key
3377
+
3378
+ def computeStatement(self, trace_collection):
3379
+ result, change_tags, change_desc = self.computeStatementSubExpressions(
3380
+ trace_collection=trace_collection
3381
+ )
3382
+
3383
+ if result is not self:
3384
+ return result, change_tags, change_desc
3385
+
3386
+ return self.computeStatementOperation(trace_collection)
3387
+
3388
+ @abstractmethod
3389
+ def computeStatementOperation(self, trace_collection):
3390
+ """Must be overloaded for non-final node."""
3391
+
3392
+ def collectVariableAccesses(self, emit_read, emit_write):
3393
+ """Collect variable reads and writes of child nodes."""
3394
+
3395
+ self.subnode_value.collectVariableAccesses(emit_read, emit_write)
3396
+ self.subnode_dict_arg.collectVariableAccesses(emit_read, emit_write)
3397
+ self.subnode_key.collectVariableAccesses(emit_read, emit_write)
3398
+
3399
+
3400
+ # Assign the names that are easier to import with a stable name.
3401
+ StatementDictOperationSetBase = StatementChildrenHavingValueDictArgKeyOperationMixin
3402
+ StatementDictOperationSetKeyValueBase = (
3403
+ StatementChildrenHavingValueDictArgKeyOperationMixin
3404
+ )
3405
+
3406
+ # Part of "Nuitka", an optimizing Python compiler that is compatible and
3407
+ # integrates with CPython, but also works on its own.
3408
+ #
3409
+ # Licensed under the Apache License, Version 2.0 (the "License");
3410
+ # you may not use this file except in compliance with the License.
3411
+ # You may obtain a copy of the License at
3412
+ #
3413
+ # http://www.apache.org/licenses/LICENSE-2.0
3414
+ #
3415
+ # Unless required by applicable law or agreed to in writing, software
3416
+ # distributed under the License is distributed on an "AS IS" BASIS,
3417
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3418
+ # See the License for the specific language governing permissions and
3419
+ # limitations under the License.