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.
- nuitka/Builtins.py +259 -0
- nuitka/BytecodeCaching.py +184 -0
- nuitka/Bytecodes.py +109 -0
- nuitka/CacheCleanup.py +54 -0
- nuitka/Constants.py +425 -0
- nuitka/Errors.py +93 -0
- nuitka/HardImportRegistry.py +408 -0
- nuitka/MainControl.py +1201 -0
- nuitka/ModuleRegistry.py +364 -0
- nuitka/OptionParsing.py +2473 -0
- nuitka/Options.py +2948 -0
- nuitka/OutputDirectories.py +201 -0
- nuitka/PostProcessing.py +551 -0
- nuitka/Progress.py +252 -0
- nuitka/PythonFlavors.py +426 -0
- nuitka/PythonOperators.py +146 -0
- nuitka/PythonVersions.py +513 -0
- nuitka/Serialization.py +291 -0
- nuitka/SourceCodeReferences.py +176 -0
- nuitka/Tracing.py +579 -0
- nuitka/TreeXML.py +141 -0
- nuitka/Variables.py +515 -0
- nuitka/Version.py +88 -0
- nuitka/__init__.py +19 -0
- nuitka/__main__.py +224 -0
- nuitka/__past__.py +217 -0
- nuitka/build/Backend.scons +1111 -0
- nuitka/build/CCompilerVersion.scons +281 -0
- nuitka/build/DataComposerInterface.py +116 -0
- nuitka/build/Offsets.scons +626 -0
- nuitka/build/Onefile.scons +564 -0
- nuitka/build/SconsCaching.py +451 -0
- nuitka/build/SconsCompilerSettings.py +1133 -0
- nuitka/build/SconsHacks.py +215 -0
- nuitka/build/SconsInterface.py +664 -0
- nuitka/build/SconsProgress.py +100 -0
- nuitka/build/SconsSpawn.py +436 -0
- nuitka/build/SconsUtils.py +939 -0
- nuitka/build/__init__.py +19 -0
- nuitka/build/include/nuitka/allocator.h +450 -0
- nuitka/build/include/nuitka/builtins.h +97 -0
- nuitka/build/include/nuitka/calling.h +123 -0
- nuitka/build/include/nuitka/checkers.h +39 -0
- nuitka/build/include/nuitka/checksum_tools.h +28 -0
- nuitka/build/include/nuitka/compiled_asyncgen.h +281 -0
- nuitka/build/include/nuitka/compiled_cell.h +64 -0
- nuitka/build/include/nuitka/compiled_coroutine.h +271 -0
- nuitka/build/include/nuitka/compiled_frame.h +502 -0
- nuitka/build/include/nuitka/compiled_function.h +170 -0
- nuitka/build/include/nuitka/compiled_generator.h +287 -0
- nuitka/build/include/nuitka/compiled_method.h +54 -0
- nuitka/build/include/nuitka/constants.h +251 -0
- nuitka/build/include/nuitka/constants_blob.h +34 -0
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/environment_variables.h +30 -0
- nuitka/build/include/nuitka/environment_variables_system.h +51 -0
- nuitka/build/include/nuitka/exception_groups.h +167 -0
- nuitka/build/include/nuitka/exceptions.h +1458 -0
- nuitka/build/include/nuitka/filesystem_paths.h +117 -0
- nuitka/build/include/nuitka/freelists.h +92 -0
- nuitka/build/include/nuitka/hedley.h +1774 -0
- nuitka/build/include/nuitka/helper/attributes.h +90 -0
- nuitka/build/include/nuitka/helper/boolean.h +86 -0
- nuitka/build/include/nuitka/helper/bytearrays.h +34 -0
- nuitka/build/include/nuitka/helper/bytes.h +28 -0
- nuitka/build/include/nuitka/helper/calling_generated.h +132 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_eq.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_ge.h +197 -0
- nuitka/build/include/nuitka/helper/comparisons_gt.h +197 -0
- nuitka/build/include/nuitka/helper/comparisons_le.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_lt.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_ne.h +197 -0
- nuitka/build/include/nuitka/helper/complex.h +46 -0
- nuitka/build/include/nuitka/helper/dictionaries.h +481 -0
- nuitka/build/include/nuitka/helper/floats.h +32 -0
- nuitka/build/include/nuitka/helper/import_hard.h +121 -0
- nuitka/build/include/nuitka/helper/indexes.h +47 -0
- nuitka/build/include/nuitka/helper/ints.h +165 -0
- nuitka/build/include/nuitka/helper/iterators.h +376 -0
- nuitka/build/include/nuitka/helper/lists.h +94 -0
- nuitka/build/include/nuitka/helper/lists_generated.h +36 -0
- nuitka/build/include/nuitka/helper/mappings.h +39 -0
- nuitka/build/include/nuitka/helper/operations.h +114 -0
- nuitka/build/include/nuitka/helper/operations_binary_add.h +240 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +103 -0
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +103 -0
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +99 -0
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +60 -0
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +304 -0
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +247 -0
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +125 -0
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +90 -0
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +99 -0
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +117 -0
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +103 -0
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +247 -0
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +173 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +95 -0
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +62 -0
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +60 -0
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +218 -0
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +184 -0
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +115 -0
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +87 -0
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +62 -0
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +102 -0
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +95 -0
- nuitka/build/include/nuitka/helper/raising.h +114 -0
- nuitka/build/include/nuitka/helper/rangeobjects.h +66 -0
- nuitka/build/include/nuitka/helper/richcomparisons.h +35 -0
- nuitka/build/include/nuitka/helper/sequences.h +33 -0
- nuitka/build/include/nuitka/helper/sets.h +25 -0
- nuitka/build/include/nuitka/helper/slices.h +314 -0
- nuitka/build/include/nuitka/helper/strings.h +30 -0
- nuitka/build/include/nuitka/helper/subscripts.h +390 -0
- nuitka/build/include/nuitka/helper/tuples.h +187 -0
- nuitka/build/include/nuitka/helpers.h +417 -0
- nuitka/build/include/nuitka/importing.h +149 -0
- nuitka/build/include/nuitka/incbin.h +402 -0
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +626 -0
- nuitka/build/include/nuitka/printing.h +84 -0
- nuitka/build/include/nuitka/python_pgo.h +57 -0
- nuitka/build/include/nuitka/safe_string_ops.h +57 -0
- nuitka/build/include/nuitka/threading.h +142 -0
- nuitka/build/include/nuitka/tracing.h +82 -0
- nuitka/build/include/nuitka/type_aliases.h +30 -0
- nuitka/build/include/nuitka/unfreezing.h +91 -0
- nuitka/build/inline_copy/appdirs/LICENSE.txt +23 -0
- nuitka/build/inline_copy/appdirs/appdirs.py +611 -0
- nuitka/build/inline_copy/atomicwrites/LICENSE +19 -0
- nuitka/build/inline_copy/atomicwrites/atomicwrites.py +226 -0
- nuitka/build/inline_copy/bin/scons.py +58 -0
- nuitka/build/inline_copy/clcache/clcache/LICENSE +30 -0
- nuitka/build/inline_copy/clcache/clcache/__init__.py +4 -0
- nuitka/build/inline_copy/clcache/clcache/caching.py +2008 -0
- nuitka/build/inline_copy/colorama/LICENSE.txt +27 -0
- nuitka/build/inline_copy/colorama/colorama/__init__.py +6 -0
- nuitka/build/inline_copy/colorama/colorama/ansi.py +102 -0
- nuitka/build/inline_copy/colorama/colorama/ansitowin32.py +258 -0
- nuitka/build/inline_copy/colorama/colorama/initialise.py +80 -0
- nuitka/build/inline_copy/colorama/colorama/win32.py +152 -0
- nuitka/build/inline_copy/colorama/colorama/winterm.py +169 -0
- nuitka/build/inline_copy/glob2/LICENSE +27 -0
- nuitka/build/inline_copy/glob2/glob2/__init__.py +5 -0
- nuitka/build/inline_copy/glob2/glob2/compat.py +167 -0
- nuitka/build/inline_copy/glob2/glob2/fnmatch.py +141 -0
- nuitka/build/inline_copy/glob2/glob2/impl.py +216 -0
- nuitka/build/inline_copy/jinja2/LICENSE.rst +28 -0
- nuitka/build/inline_copy/jinja2/README.rst +2 -0
- nuitka/build/inline_copy/jinja2/jinja2/__init__.py +72 -0
- nuitka/build/inline_copy/jinja2/jinja2/_compat.py +105 -0
- nuitka/build/inline_copy/jinja2/jinja2/_identifier.py +2 -0
- nuitka/build/inline_copy/jinja2/jinja2/bccache.py +361 -0
- nuitka/build/inline_copy/jinja2/jinja2/compiler.py +1721 -0
- nuitka/build/inline_copy/jinja2/jinja2/constants.py +32 -0
- nuitka/build/inline_copy/jinja2/jinja2/debug.py +378 -0
- nuitka/build/inline_copy/jinja2/jinja2/defaults.py +56 -0
- nuitka/build/inline_copy/jinja2/jinja2/environment.py +1276 -0
- nuitka/build/inline_copy/jinja2/jinja2/exceptions.py +146 -0
- nuitka/build/inline_copy/jinja2/jinja2/ext.py +627 -0
- nuitka/build/inline_copy/jinja2/jinja2/filters.py +1190 -0
- nuitka/build/inline_copy/jinja2/jinja2/idtracking.py +286 -0
- nuitka/build/inline_copy/jinja2/jinja2/lexer.py +739 -0
- nuitka/build/inline_copy/jinja2/jinja2/loaders.py +483 -0
- nuitka/build/inline_copy/jinja2/jinja2/meta.py +106 -0
- nuitka/build/inline_copy/jinja2/jinja2/nativetypes.py +220 -0
- nuitka/build/inline_copy/jinja2/jinja2/nodes.py +999 -0
- nuitka/build/inline_copy/jinja2/jinja2/optimizer.py +49 -0
- nuitka/build/inline_copy/jinja2/jinja2/parser.py +903 -0
- nuitka/build/inline_copy/jinja2/jinja2/runtime.py +808 -0
- nuitka/build/inline_copy/jinja2/jinja2/sandbox.py +488 -0
- nuitka/build/inline_copy/jinja2/jinja2/tests.py +174 -0
- nuitka/build/inline_copy/jinja2/jinja2/utils.py +642 -0
- nuitka/build/inline_copy/jinja2/jinja2/visitor.py +87 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Action.py +1475 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Builder.py +905 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/CacheDir.py +314 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Conftest.py +805 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Debug.py +251 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Defaults.py +646 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Environment.py +2561 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/EnvironmentValues.py +119 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Errors.py +222 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Executor.py +660 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Job.py +439 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Memoize.py +242 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Alias.py +176 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/FS.py +3861 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Python.py +195 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/__init__.py +1784 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py +224 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/__init__.py +341 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/aix.py +81 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/cygwin.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/darwin.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/hpux.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/irix.py +41 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/mingw.py +33 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/os2.py +55 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/posix.py +124 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/sunos.py +47 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/virtualenv.py +115 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/win32.py +429 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConf.py +1119 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConsign.py +453 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/C.py +226 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Dir.py +131 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Prog.py +114 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/RC.py +57 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/__init__.py +436 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Interactive.py +372 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Main.py +1469 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConsOptions.py +1071 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConscript.py +686 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/__init__.py +425 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Subst.py +979 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Taskmaster.py +1062 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/386asm.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/GettextCommon.py +429 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/__init__.py +52 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/arch.py +66 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/common.py +371 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/netframework.py +83 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/sdk.py +411 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vc.py +994 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vs.py +608 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/PharLapCommon.py +116 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/__init__.py +882 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixc++.py +43 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcc.py +74 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcxx.py +77 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixlink.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/applelink.py +209 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ar.py +63 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/as.py +49 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/asm.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/bcc32.py +81 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/c++.py +44 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cc.py +105 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clang.py +91 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangCommon/__init__.py +18 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangxx.py +99 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cxx.py +95 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cyglink.py +212 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/default.py +50 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/filesystem.py +98 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/g++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gas.py +56 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gcc.py +110 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gettext_tool.py +69 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gnulink.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gxx.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpc++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcc.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcxx.py +88 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hplink.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icc.py +59 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icl.py +52 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink.py +55 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink32.py +60 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/install.py +510 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/intelc.py +617 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/link.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/LoadableModule.py +131 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/SharedLibrary.py +218 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/__init__.py +171 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkloc.py +112 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/m4.py +63 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/masm.py +77 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mingw.py +232 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgfmt.py +132 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msginit.py +137 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgmerge.py +125 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslib.py +73 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslink.py +339 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mssdk.py +50 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvc.py +325 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvs.py +2116 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwcc.py +207 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwld.py +108 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/nasm.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rmic.py +139 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rpcgen.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgiar.py +68 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgic++.py +43 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicc.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicxx.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgilink.py +59 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunar.py +64 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunc++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncc.py +58 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncxx.py +153 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunlink.py +79 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tar.py +73 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/textfile.py +198 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tlib.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/wix.py +104 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/xgettext.py +337 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/zip.py +120 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Util.py +2134 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/ConfigureCache.py +171 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/__init__.py +0 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/sconsign.py +494 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/BoolVariable.py +96 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/EnumVariable.py +110 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +152 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PackageVariable.py +107 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PathVariable.py +158 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/__init__.py +334 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Warnings.py +238 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/__init__.py +9 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/__init__.py +104 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/_scons_dbm.py +42 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/win32.py +101 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/cpp.py +640 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/dblite.py +295 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/exitfuncs.py +59 -0
- nuitka/build/inline_copy/markupsafe/LICENSE.rst +28 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/__init__.py +327 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_compat.py +33 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_constants.py +264 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_native.py +69 -0
- nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
- nuitka/build/inline_copy/pefile/ordlookup/__init__.py +41 -0
- nuitka/build/inline_copy/pefile/ordlookup/oleaut32.py +400 -0
- nuitka/build/inline_copy/pefile/ordlookup/ws2_32.py +120 -0
- nuitka/build/inline_copy/pefile/pefile.py +8034 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +3272 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/py31compat.py +21 -0
- nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
- nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
- nuitka/build/inline_copy/stubgen/six.py +998 -0
- nuitka/build/inline_copy/stubgen/stubgen.py +484 -0
- nuitka/build/inline_copy/tqdm/tqdm/__init__.py +40 -0
- nuitka/build/inline_copy/tqdm/tqdm/_main.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +97 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_notebook.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_pandas.py +24 -0
- nuitka/build/inline_copy/tqdm/tqdm/_utils.py +12 -0
- nuitka/build/inline_copy/tqdm/tqdm/auto.py +44 -0
- nuitka/build/inline_copy/tqdm/tqdm/autonotebook.py +28 -0
- nuitka/build/inline_copy/tqdm/tqdm/dask.py +46 -0
- nuitka/build/inline_copy/tqdm/tqdm/notebook.py +316 -0
- nuitka/build/inline_copy/tqdm/tqdm/std.py +1524 -0
- nuitka/build/inline_copy/tqdm/tqdm/tk.py +207 -0
- nuitka/build/inline_copy/tqdm/tqdm/utils.py +351 -0
- nuitka/build/inline_copy/tqdm/tqdm/version.py +2 -0
- nuitka/build/inline_copy/yaml/LICENSE +20 -0
- nuitka/build/inline_copy/yaml/yaml/__init__.py +427 -0
- nuitka/build/inline_copy/yaml/yaml/composer.py +139 -0
- nuitka/build/inline_copy/yaml/yaml/constructor.py +748 -0
- nuitka/build/inline_copy/yaml/yaml/cyaml.py +101 -0
- nuitka/build/inline_copy/yaml/yaml/dumper.py +62 -0
- nuitka/build/inline_copy/yaml/yaml/emitter.py +1137 -0
- nuitka/build/inline_copy/yaml/yaml/error.py +75 -0
- nuitka/build/inline_copy/yaml/yaml/events.py +86 -0
- nuitka/build/inline_copy/yaml/yaml/loader.py +63 -0
- nuitka/build/inline_copy/yaml/yaml/nodes.py +49 -0
- nuitka/build/inline_copy/yaml/yaml/parser.py +589 -0
- nuitka/build/inline_copy/yaml/yaml/reader.py +185 -0
- nuitka/build/inline_copy/yaml/yaml/representer.py +389 -0
- nuitka/build/inline_copy/yaml/yaml/resolver.py +227 -0
- nuitka/build/inline_copy/yaml/yaml/scanner.py +1435 -0
- nuitka/build/inline_copy/yaml/yaml/serializer.py +111 -0
- nuitka/build/inline_copy/yaml/yaml/tokens.py +104 -0
- nuitka/build/inline_copy/zlib/LICENSE +22 -0
- nuitka/build/inline_copy/zlib/crc32.c +1049 -0
- nuitka/build/inline_copy/zlib/crc32.h +9446 -0
- nuitka/build/inline_copy/zlib/zconf.h +551 -0
- nuitka/build/inline_copy/zlib/zlib.h +1938 -0
- nuitka/build/inline_copy/zlib/zutil.h +275 -0
- nuitka/build/inline_copy/zstd/LICENSE.txt +30 -0
- nuitka/build/inline_copy/zstd/common/bitstream.h +463 -0
- nuitka/build/inline_copy/zstd/common/compiler.h +288 -0
- nuitka/build/inline_copy/zstd/common/cpu.h +213 -0
- nuitka/build/inline_copy/zstd/common/debug.h +107 -0
- nuitka/build/inline_copy/zstd/common/entropy_common.c +360 -0
- nuitka/build/inline_copy/zstd/common/error_private.c +56 -0
- nuitka/build/inline_copy/zstd/common/error_private.h +80 -0
- nuitka/build/inline_copy/zstd/common/fse.h +715 -0
- nuitka/build/inline_copy/zstd/common/fse_decompress.c +393 -0
- nuitka/build/inline_copy/zstd/common/huf.h +361 -0
- nuitka/build/inline_copy/zstd/common/mem.h +426 -0
- nuitka/build/inline_copy/zstd/common/xxhash.c +826 -0
- nuitka/build/inline_copy/zstd/common/xxhash.h +285 -0
- nuitka/build/inline_copy/zstd/common/zstd_common.c +83 -0
- nuitka/build/inline_copy/zstd/common/zstd_deps.h +111 -0
- nuitka/build/inline_copy/zstd/common/zstd_errors.h +95 -0
- nuitka/build/inline_copy/zstd/common/zstd_internal.h +478 -0
- nuitka/build/inline_copy/zstd/decompress/huf_decompress.c +1350 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_ddict.c +244 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_ddict.h +44 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress.c +1930 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.c +1540 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.h +62 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_internal.h +190 -0
- nuitka/build/inline_copy/zstd/zstd.h +2391 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +2211 -0
- nuitka/build/static_src/CompiledCellType.c +300 -0
- nuitka/build/static_src/CompiledCodeHelpers.c +2160 -0
- nuitka/build/static_src/CompiledCoroutineType.c +1946 -0
- nuitka/build/static_src/CompiledFrameType.c +1337 -0
- nuitka/build/static_src/CompiledFunctionType.c +3320 -0
- nuitka/build/static_src/CompiledGeneratorType.c +1997 -0
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2117 -0
- nuitka/build/static_src/CompiledMethodType.c +614 -0
- nuitka/build/static_src/GenerateHeadersMain.c +30 -0
- nuitka/build/static_src/HelpersAllocator.c +939 -0
- nuitka/build/static_src/HelpersAttributes.c +1241 -0
- nuitka/build/static_src/HelpersBuiltin.c +901 -0
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +3594 -0
- nuitka/build/static_src/HelpersBytes.c +107 -0
- nuitka/build/static_src/HelpersCalling.c +397 -0
- nuitka/build/static_src/HelpersCallingGenerated.c +14361 -0
- nuitka/build/static_src/HelpersChecksumTools.c +59 -0
- nuitka/build/static_src/HelpersClasses.c +91 -0
- nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
- nuitka/build/static_src/HelpersComparisonEq.c +12070 -0
- nuitka/build/static_src/HelpersComparisonEqUtils.c +169 -0
- nuitka/build/static_src/HelpersComparisonGe.c +11871 -0
- nuitka/build/static_src/HelpersComparisonGt.c +11855 -0
- nuitka/build/static_src/HelpersComparisonLe.c +11957 -0
- nuitka/build/static_src/HelpersComparisonLt.c +11941 -0
- nuitka/build/static_src/HelpersComparisonNe.c +11979 -0
- nuitka/build/static_src/HelpersConsole.c +124 -0
- nuitka/build/static_src/HelpersConstantsBlob.c +1487 -0
- nuitka/build/static_src/HelpersDeepcopy.c +636 -0
- nuitka/build/static_src/HelpersDictionaries.c +1739 -0
- nuitka/build/static_src/HelpersDictionariesGenerated.c +738 -0
- nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
- nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +97 -0
- nuitka/build/static_src/HelpersExceptions.c +298 -0
- nuitka/build/static_src/HelpersFiles.c +353 -0
- nuitka/build/static_src/HelpersFilesystemPaths.c +1322 -0
- nuitka/build/static_src/HelpersFloats.c +92 -0
- nuitka/build/static_src/HelpersHeapStorage.c +68 -0
- nuitka/build/static_src/HelpersImport.c +506 -0
- nuitka/build/static_src/HelpersImportHard.c +526 -0
- nuitka/build/static_src/HelpersJitSources.c +48 -0
- nuitka/build/static_src/HelpersLists.c +899 -0
- nuitka/build/static_src/HelpersListsGenerated.c +564 -0
- nuitka/build/static_src/HelpersMappings.c +46 -0
- nuitka/build/static_src/HelpersMatching.c +192 -0
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +6477 -0
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +703 -0
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +2406 -0
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +33 -0
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +2422 -0
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +220 -0
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +2846 -0
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +453 -0
- nuitka/build/static_src/HelpersOperationBinaryMod.c +6549 -0
- nuitka/build/static_src/HelpersOperationBinaryMult.c +6438 -0
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +125 -0
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +2355 -0
- nuitka/build/static_src/HelpersOperationBinaryPow.c +2743 -0
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +26 -0
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +2706 -0
- nuitka/build/static_src/HelpersOperationBinarySub.c +2649 -0
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +2415 -0
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +5211 -0
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +144 -0
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +2605 -0
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +1594 -0
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +603 -0
- nuitka/build/static_src/HelpersOperationInplaceMod.c +4762 -0
- nuitka/build/static_src/HelpersOperationInplaceMult.c +4689 -0
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +2553 -0
- nuitka/build/static_src/HelpersOperationInplacePow.c +2807 -0
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +1534 -0
- nuitka/build/static_src/HelpersOperationInplaceSub.c +2894 -0
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +2612 -0
- nuitka/build/static_src/HelpersProfiling.c +104 -0
- nuitka/build/static_src/HelpersPythonPgo.c +113 -0
- nuitka/build/static_src/HelpersRaising.c +447 -0
- nuitka/build/static_src/HelpersSafeStrings.c +185 -0
- nuitka/build/static_src/HelpersSequences.c +134 -0
- nuitka/build/static_src/HelpersSlices.c +73 -0
- nuitka/build/static_src/HelpersStrings.c +998 -0
- nuitka/build/static_src/HelpersTuples.c +148 -0
- nuitka/build/static_src/HelpersTypes.c +329 -0
- nuitka/build/static_src/InspectPatcher.c +439 -0
- nuitka/build/static_src/MainProgram.c +2060 -0
- nuitka/build/static_src/MetaPathBasedLoader.c +2290 -0
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +125 -0
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +158 -0
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +785 -0
- nuitka/build/static_src/OnefileBootstrap.c +1580 -0
- nuitka/build/static_src/OnefileSplashScreen.cpp +275 -0
- nuitka/code_generation/AsyncgenCodes.py +186 -0
- nuitka/code_generation/AttributeCodes.py +357 -0
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +720 -0
- nuitka/code_generation/BranchCodes.py +67 -0
- nuitka/code_generation/BuiltinCodes.py +529 -0
- nuitka/code_generation/CallCodes.py +1186 -0
- nuitka/code_generation/ClassCodes.py +156 -0
- nuitka/code_generation/CodeGeneration.py +1078 -0
- nuitka/code_generation/CodeHelperSelection.py +81 -0
- nuitka/code_generation/CodeHelpers.py +455 -0
- nuitka/code_generation/CodeObjectCodes.py +165 -0
- nuitka/code_generation/ComparisonCodes.py +569 -0
- nuitka/code_generation/ComparisonHelperDefinitions.py +146 -0
- nuitka/code_generation/ConditionalCodes.py +236 -0
- nuitka/code_generation/ConstantCodes.py +243 -0
- nuitka/code_generation/Contexts.py +1248 -0
- nuitka/code_generation/CoroutineCodes.py +253 -0
- nuitka/code_generation/CtypesCodes.py +46 -0
- nuitka/code_generation/DictCodes.py +918 -0
- nuitka/code_generation/Emission.py +75 -0
- nuitka/code_generation/ErrorCodes.py +281 -0
- nuitka/code_generation/EvalCodes.py +444 -0
- nuitka/code_generation/ExceptionCodes.py +337 -0
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +227 -0
- nuitka/code_generation/ExpressionCodes.py +61 -0
- nuitka/code_generation/FrameCodes.py +518 -0
- nuitka/code_generation/FunctionCodes.py +858 -0
- nuitka/code_generation/GeneratorCodes.py +218 -0
- nuitka/code_generation/GlobalConstants.py +249 -0
- nuitka/code_generation/GlobalsLocalsCodes.py +211 -0
- nuitka/code_generation/IdCodes.py +53 -0
- nuitka/code_generation/ImportCodes.py +468 -0
- nuitka/code_generation/Indentation.py +45 -0
- nuitka/code_generation/IndexCodes.py +50 -0
- nuitka/code_generation/InjectCCodes.py +28 -0
- nuitka/code_generation/IntegerCodes.py +110 -0
- nuitka/code_generation/IteratorCodes.py +378 -0
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/LabelCodes.py +68 -0
- nuitka/code_generation/LineNumberCodes.py +91 -0
- nuitka/code_generation/ListCodes.py +502 -0
- nuitka/code_generation/LoaderCodes.py +193 -0
- nuitka/code_generation/LocalsDictCodes.py +359 -0
- nuitka/code_generation/LoopCodes.py +88 -0
- nuitka/code_generation/MatchCodes.py +67 -0
- nuitka/code_generation/ModuleCodes.py +247 -0
- nuitka/code_generation/Namify.py +260 -0
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +398 -0
- nuitka/code_generation/PackageResourceCodes.py +986 -0
- nuitka/code_generation/PrintCodes.py +93 -0
- nuitka/code_generation/PythonAPICodes.py +215 -0
- nuitka/code_generation/RaisingCodes.py +481 -0
- nuitka/code_generation/Reports.py +115 -0
- nuitka/code_generation/ReturnCodes.py +143 -0
- nuitka/code_generation/SetCodes.py +196 -0
- nuitka/code_generation/SliceCodes.py +465 -0
- nuitka/code_generation/StringCodes.py +303 -0
- nuitka/code_generation/SubscriptCodes.py +263 -0
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TryCodes.py +326 -0
- nuitka/code_generation/TupleCodes.py +115 -0
- nuitka/code_generation/TypeAliasCodes.py +120 -0
- nuitka/code_generation/VariableCodes.py +519 -0
- nuitka/code_generation/VariableDeclarations.py +279 -0
- nuitka/code_generation/YieldCodes.py +253 -0
- nuitka/code_generation/__init__.py +19 -0
- nuitka/code_generation/c_types/CTypeBases.py +177 -0
- nuitka/code_generation/c_types/CTypeBooleans.py +104 -0
- nuitka/code_generation/c_types/CTypeCFloats.py +57 -0
- nuitka/code_generation/c_types/CTypeCLongs.py +45 -0
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +109 -0
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +150 -0
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +200 -0
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +107 -0
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +572 -0
- nuitka/code_generation/c_types/CTypeVoids.py +92 -0
- nuitka/code_generation/c_types/__init__.py +19 -0
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +106 -0
- nuitka/code_generation/templates/CodeTemplatesConstants.py +296 -0
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +109 -0
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +84 -0
- nuitka/code_generation/templates/CodeTemplatesFrames.py +235 -0
- nuitka/code_generation/templates/CodeTemplatesFunction.py +117 -0
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +130 -0
- nuitka/code_generation/templates/CodeTemplatesIterators.py +40 -0
- nuitka/code_generation/templates/CodeTemplatesLoader.py +180 -0
- nuitka/code_generation/templates/CodeTemplatesModules.py +710 -0
- nuitka/code_generation/templates/CodeTemplatesVariables.py +388 -0
- nuitka/code_generation/templates/TemplateDebugWrapper.py +80 -0
- nuitka/code_generation/templates/__init__.py +19 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +321 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +143 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +677 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +165 -0
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +38 -0
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +41 -0
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +53 -0
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +364 -0
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +37 -0
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +53 -0
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +20 -0
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +148 -0
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +352 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +31 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +32 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +112 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +157 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +99 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +281 -0
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +420 -0
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +51 -0
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +71 -0
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +327 -0
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +411 -0
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +59 -0
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +229 -0
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +47 -0
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +55 -0
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +58 -0
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +62 -0
- nuitka/containers/Namedtuples.py +51 -0
- nuitka/containers/OrderedDicts.py +191 -0
- nuitka/containers/OrderedSets.py +123 -0
- nuitka/containers/OrderedSetsFallback.py +139 -0
- nuitka/containers/__init__.py +19 -0
- nuitka/distutils/Build.py +76 -0
- nuitka/distutils/DistutilCommands.py +438 -0
- nuitka/distutils/__init__.py +19 -0
- nuitka/finalizations/Finalization.py +35 -0
- nuitka/finalizations/FinalizeMarkups.py +136 -0
- nuitka/finalizations/__init__.py +19 -0
- nuitka/freezer/DependsExe.py +257 -0
- nuitka/freezer/DllDependenciesCommon.py +97 -0
- nuitka/freezer/DllDependenciesMacOS.py +444 -0
- nuitka/freezer/DllDependenciesPosix.py +242 -0
- nuitka/freezer/DllDependenciesWin32.py +315 -0
- nuitka/freezer/ImportDetection.py +359 -0
- nuitka/freezer/IncludedDataFiles.py +689 -0
- nuitka/freezer/IncludedEntryPoints.py +376 -0
- nuitka/freezer/Onefile.py +296 -0
- nuitka/freezer/Standalone.py +520 -0
- nuitka/freezer/__init__.py +19 -0
- nuitka/importing/IgnoreListing.py +449 -0
- nuitka/importing/ImportCache.py +95 -0
- nuitka/importing/ImportResolving.py +186 -0
- nuitka/importing/Importing.py +1200 -0
- nuitka/importing/PreloadedPackages.py +164 -0
- nuitka/importing/Recursion.py +611 -0
- nuitka/importing/StandardLibrary.py +429 -0
- nuitka/importing/__init__.py +19 -0
- nuitka/nodes/AsyncgenNodes.py +107 -0
- nuitka/nodes/AttributeLookupNodes.py +124 -0
- nuitka/nodes/AttributeNodes.py +386 -0
- nuitka/nodes/AttributeNodesGenerated.py +10734 -0
- nuitka/nodes/BuiltinAllNodes.py +115 -0
- nuitka/nodes/BuiltinAnyNodes.py +124 -0
- nuitka/nodes/BuiltinComplexNodes.py +83 -0
- nuitka/nodes/BuiltinDecodingNodes.py +52 -0
- nuitka/nodes/BuiltinDecoratorNodes.py +85 -0
- nuitka/nodes/BuiltinDictNodes.py +140 -0
- nuitka/nodes/BuiltinFormatNodes.py +159 -0
- nuitka/nodes/BuiltinHashNodes.py +63 -0
- nuitka/nodes/BuiltinInputNodes.py +39 -0
- nuitka/nodes/BuiltinIntegerNodes.py +170 -0
- nuitka/nodes/BuiltinIteratorNodes.py +391 -0
- nuitka/nodes/BuiltinLenNodes.py +61 -0
- nuitka/nodes/BuiltinNextNodes.py +111 -0
- nuitka/nodes/BuiltinOpenNodes.py +148 -0
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +7367 -0
- nuitka/nodes/BuiltinRangeNodes.py +690 -0
- nuitka/nodes/BuiltinRefNodes.py +314 -0
- nuitka/nodes/BuiltinSumNodes.py +104 -0
- nuitka/nodes/BuiltinTypeNodes.py +454 -0
- nuitka/nodes/BuiltinVarsNodes.py +44 -0
- nuitka/nodes/BytesNodes.py +829 -0
- nuitka/nodes/CallNodes.py +217 -0
- nuitka/nodes/Checkers.py +55 -0
- nuitka/nodes/ChildrenHavingMixins.py +21576 -0
- nuitka/nodes/ClassNodes.py +286 -0
- nuitka/nodes/CodeObjectSpecs.py +230 -0
- nuitka/nodes/ComparisonNodes.py +687 -0
- nuitka/nodes/ConditionalNodes.py +884 -0
- nuitka/nodes/ConstantRefNodes.py +1717 -0
- nuitka/nodes/ContainerMakingNodes.py +408 -0
- nuitka/nodes/ContainerOperationNodes.py +87 -0
- nuitka/nodes/CoroutineNodes.py +144 -0
- nuitka/nodes/CtypesNodes.py +51 -0
- nuitka/nodes/DictionaryNodes.py +1513 -0
- nuitka/nodes/ExceptionNodes.py +393 -0
- nuitka/nodes/ExecEvalNodes.py +229 -0
- nuitka/nodes/ExpressionBases.py +1301 -0
- nuitka/nodes/ExpressionBasesGenerated.py +2103 -0
- nuitka/nodes/ExpressionShapeMixins.py +886 -0
- nuitka/nodes/FrameNodes.py +413 -0
- nuitka/nodes/FunctionAttributeNodes.py +102 -0
- nuitka/nodes/FunctionNodes.py +1303 -0
- nuitka/nodes/FutureSpecs.py +224 -0
- nuitka/nodes/GeneratorNodes.py +201 -0
- nuitka/nodes/GlobalsLocalsNodes.py +209 -0
- nuitka/nodes/HardImportNodesGenerated.py +3599 -0
- nuitka/nodes/ImportHardNodes.py +185 -0
- nuitka/nodes/ImportNodes.py +1366 -0
- nuitka/nodes/IndicatorMixins.py +79 -0
- nuitka/nodes/InjectCNodes.py +51 -0
- nuitka/nodes/IterationHandles.py +407 -0
- nuitka/nodes/KeyValuePairNodes.py +378 -0
- nuitka/nodes/ListOperationNodes.py +525 -0
- nuitka/nodes/LocalsDictNodes.py +717 -0
- nuitka/nodes/LocalsScopes.py +505 -0
- nuitka/nodes/LoopNodes.py +445 -0
- nuitka/nodes/MatchNodes.py +60 -0
- nuitka/nodes/ModuleAttributeNodes.py +180 -0
- nuitka/nodes/ModuleNodes.py +1137 -0
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/NodeBases.py +890 -0
- nuitka/nodes/NodeMakingHelpers.py +481 -0
- nuitka/nodes/NodeMetaClasses.py +172 -0
- nuitka/nodes/OperatorNodes.py +944 -0
- nuitka/nodes/OperatorNodesUnary.py +403 -0
- nuitka/nodes/OsSysNodes.py +215 -0
- nuitka/nodes/OutlineNodes.py +372 -0
- nuitka/nodes/PackageMetadataNodes.py +982 -0
- nuitka/nodes/PackageResourceNodes.py +424 -0
- nuitka/nodes/PrintNodes.py +105 -0
- nuitka/nodes/ReturnNodes.py +255 -0
- nuitka/nodes/SideEffectNodes.py +139 -0
- nuitka/nodes/SliceNodes.py +386 -0
- nuitka/nodes/StatementBasesGenerated.py +3419 -0
- nuitka/nodes/StatementNodes.py +316 -0
- nuitka/nodes/StrNodes.py +919 -0
- nuitka/nodes/StringConcatenationNodes.py +103 -0
- nuitka/nodes/SubscriptNodes.py +245 -0
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TryNodes.py +519 -0
- nuitka/nodes/TypeMatchNodes.py +65 -0
- nuitka/nodes/TypeNodes.py +390 -0
- nuitka/nodes/VariableAssignNodes.py +1177 -0
- nuitka/nodes/VariableDelNodes.py +320 -0
- nuitka/nodes/VariableNameNodes.py +153 -0
- nuitka/nodes/VariableRefNodes.py +895 -0
- nuitka/nodes/VariableReleaseNodes.py +153 -0
- nuitka/nodes/YieldNodes.py +121 -0
- nuitka/nodes/__init__.py +19 -0
- nuitka/nodes/shapes/BuiltinTypeShapes.py +4290 -0
- nuitka/nodes/shapes/ControlFlowDescriptions.py +199 -0
- nuitka/nodes/shapes/IteratorShapes.py +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +255 -0
- nuitka/nodes/shapes/StandardShapes.py +1384 -0
- nuitka/nodes/shapes/__init__.py +19 -0
- nuitka/optimizations/BytecodeDemotion.py +105 -0
- nuitka/optimizations/FunctionInlining.py +110 -0
- nuitka/optimizations/Graphs.py +70 -0
- nuitka/optimizations/Optimization.py +363 -0
- nuitka/optimizations/OptimizeBuiltinCalls.py +1582 -0
- nuitka/optimizations/Tags.py +76 -0
- nuitka/optimizations/TraceCollections.py +1257 -0
- nuitka/optimizations/ValueTraces.py +980 -0
- nuitka/optimizations/__init__.py +19 -0
- nuitka/pgo/PGO.py +160 -0
- nuitka/pgo/__init__.py +19 -0
- nuitka/plugins/PluginBase.py +1924 -0
- nuitka/plugins/Plugins.py +2007 -0
- nuitka/plugins/YamlPluginBase.py +121 -0
- nuitka/plugins/__init__.py +19 -0
- nuitka/plugins/standard/AntiBloatPlugin.py +1024 -0
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +95 -0
- nuitka/plugins/standard/DataFilesPlugin.py +311 -0
- nuitka/plugins/standard/DelvewheelPlugin.py +150 -0
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
- nuitka/plugins/standard/DillPlugin/cloudpickle-postLoad.py +67 -0
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +223 -0
- nuitka/plugins/standard/DillPlugin.py +137 -0
- nuitka/plugins/standard/DllFilesPlugin.py +527 -0
- nuitka/plugins/standard/EnumPlugin.py +64 -0
- nuitka/plugins/standard/EventletPlugin.py +57 -0
- nuitka/plugins/standard/GeventPlugin.py +64 -0
- nuitka/plugins/standard/GiPlugin.py +118 -0
- nuitka/plugins/standard/GlfwPlugin.py +138 -0
- nuitka/plugins/standard/ImplicitImports.py +845 -0
- nuitka/plugins/standard/KivyPlugin.py +141 -0
- nuitka/plugins/standard/MatplotlibPlugin.py +256 -0
- nuitka/plugins/standard/MultiprocessingPlugin.py +199 -0
- nuitka/plugins/standard/NumpyPlugin.py +35 -0
- nuitka/plugins/standard/OptionsNannyPlugin.py +158 -0
- nuitka/plugins/standard/PbrPlugin.py +62 -0
- nuitka/plugins/standard/PkgResourcesPlugin.py +162 -0
- nuitka/plugins/standard/PlaywrightPlugin.py +179 -0
- nuitka/plugins/standard/PmwPlugin.py +248 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +1666 -0
- nuitka/plugins/standard/PywebViewPlugin.py +81 -0
- nuitka/plugins/standard/SpacyPlugin.py +137 -0
- nuitka/plugins/standard/TensorflowPlugin.py +35 -0
- nuitka/plugins/standard/TkinterPlugin.py +416 -0
- nuitka/plugins/standard/TorchPlugin.py +35 -0
- nuitka/plugins/standard/TransformersPlugin.py +121 -0
- nuitka/plugins/standard/TrioPlugin.py +33 -0
- nuitka/plugins/standard/UpxPlugin.py +174 -0
- nuitka/plugins/standard/__init__.py +19 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +9313 -0
- nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +78 -0
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +468 -0
- nuitka/reports/CompilationReportReader.py +83 -0
- nuitka/reports/LicenseReport.rst.j2 +41 -0
- nuitka/reports/Reports.py +961 -0
- nuitka/reports/__init__.py +19 -0
- nuitka/specs/BuiltinBytesOperationSpecs.py +180 -0
- nuitka/specs/BuiltinDictOperationSpecs.py +82 -0
- nuitka/specs/BuiltinListOperationSpecs.py +80 -0
- nuitka/specs/BuiltinParameterSpecs.py +831 -0
- nuitka/specs/BuiltinStrOperationSpecs.py +181 -0
- nuitka/specs/BuiltinTypeOperationSpecs.py +34 -0
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +123 -0
- nuitka/specs/HardImportSpecs.py +236 -0
- nuitka/specs/ParameterSpecs.py +630 -0
- nuitka/specs/__init__.py +19 -0
- nuitka/tools/Basics.py +55 -0
- nuitka/tools/__init__.py +19 -0
- nuitka/tools/commercial/__init__.py +21 -0
- nuitka/tools/data_composer/DataComposer.py +593 -0
- nuitka/tools/data_composer/__init__.py +19 -0
- nuitka/tools/data_composer/__main__.py +41 -0
- nuitka/tools/environments/CreateEnvironment.py +69 -0
- nuitka/tools/environments/Virtualenv.py +158 -0
- nuitka/tools/environments/__init__.py +19 -0
- nuitka/tools/general/__init__.py +19 -0
- nuitka/tools/general/dll_report/__init__.py +19 -0
- nuitka/tools/general/dll_report/__main__.py +83 -0
- nuitka/tools/general/find_module/FindModuleCode.py +127 -0
- nuitka/tools/general/find_module/__init__.py +19 -0
- nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
- nuitka/tools/general/generate_header/__init__.py +19 -0
- nuitka/tools/onefile_compressor/OnefileCompressor.py +390 -0
- nuitka/tools/onefile_compressor/__init__.py +19 -0
- nuitka/tools/onefile_compressor/__main__.py +41 -0
- nuitka/tools/podman/Podman.py +55 -0
- nuitka/tools/podman/__init__.py +19 -0
- nuitka/tools/podman/__main__.py +425 -0
- nuitka/tools/profiler/__init__.py +19 -0
- nuitka/tools/profiler/__main__.py +93 -0
- nuitka/tools/scanning/DisplayDistributions.py +39 -0
- nuitka/tools/scanning/DisplayPackageDLLs.py +151 -0
- nuitka/tools/scanning/DisplayPackageData.py +73 -0
- nuitka/tools/scanning/__init__.py +19 -0
- nuitka/tools/specialize/CTypeDescriptions.py +1928 -0
- nuitka/tools/specialize/Common.py +380 -0
- nuitka/tools/specialize/SpecializeC.py +1483 -0
- nuitka/tools/specialize/SpecializePython.py +1151 -0
- nuitka/tools/specialize/__init__.py +19 -0
- nuitka/tools/testing/Common.py +2007 -0
- nuitka/tools/testing/Constructs.py +53 -0
- nuitka/tools/testing/DocTests.py +156 -0
- nuitka/tools/testing/OutputComparison.py +313 -0
- nuitka/tools/testing/Pythons.py +34 -0
- nuitka/tools/testing/RuntimeTracing.py +260 -0
- nuitka/tools/testing/SearchModes.py +208 -0
- nuitka/tools/testing/Valgrind.py +103 -0
- nuitka/tools/testing/__init__.py +19 -0
- nuitka/tools/testing/check_reference_counts/__init__.py +19 -0
- nuitka/tools/testing/check_reference_counts/__main__.py +107 -0
- nuitka/tools/testing/compare_with_cpython/__init__.py +19 -0
- nuitka/tools/testing/compare_with_cpython/__main__.py +942 -0
- nuitka/tools/testing/find_sxs_modules/__init__.py +19 -0
- nuitka/tools/testing/find_sxs_modules/__main__.py +73 -0
- nuitka/tools/testing/measure_construct_performance/__init__.py +19 -0
- nuitka/tools/testing/measure_construct_performance/__main__.py +288 -0
- nuitka/tools/testing/run_nuitka_tests/__init__.py +19 -0
- nuitka/tools/testing/run_nuitka_tests/__main__.py +1091 -0
- nuitka/tools/watch/AutoStage.py +145 -0
- nuitka/tools/watch/Common.py +55 -0
- nuitka/tools/watch/Conda.py +125 -0
- nuitka/tools/watch/GitHub.py +113 -0
- nuitka/tools/watch/Pacman.py +73 -0
- nuitka/tools/watch/Pipenv.py +145 -0
- nuitka/tools/watch/__init__.py +19 -0
- nuitka/tools/watch/__main__.py +615 -0
- nuitka/tree/Building.py +1459 -0
- nuitka/tree/ComplexCallHelperFunctions.py +2150 -0
- nuitka/tree/Extractions.py +48 -0
- nuitka/tree/FutureSpecState.py +71 -0
- nuitka/tree/InternalModule.py +96 -0
- nuitka/tree/Operations.py +45 -0
- nuitka/tree/ReformulationAssertStatements.py +97 -0
- nuitka/tree/ReformulationAssignmentStatements.py +1260 -0
- nuitka/tree/ReformulationBooleanExpressions.py +97 -0
- nuitka/tree/ReformulationCallExpressions.py +314 -0
- nuitka/tree/ReformulationClasses.py +407 -0
- nuitka/tree/ReformulationClasses3.py +1149 -0
- nuitka/tree/ReformulationComparisonExpressions.py +174 -0
- nuitka/tree/ReformulationContractionExpressions.py +676 -0
- nuitka/tree/ReformulationDictionaryCreation.py +304 -0
- nuitka/tree/ReformulationExecStatements.py +386 -0
- nuitka/tree/ReformulationForLoopStatements.py +215 -0
- nuitka/tree/ReformulationFunctionStatements.py +931 -0
- nuitka/tree/ReformulationImportStatements.py +333 -0
- nuitka/tree/ReformulationLambdaExpressions.py +185 -0
- nuitka/tree/ReformulationMatchStatements.py +797 -0
- nuitka/tree/ReformulationMultidist.py +80 -0
- nuitka/tree/ReformulationNamespacePackages.py +239 -0
- nuitka/tree/ReformulationPrintStatements.py +127 -0
- nuitka/tree/ReformulationSequenceCreation.py +438 -0
- nuitka/tree/ReformulationSubscriptExpressions.py +123 -0
- nuitka/tree/ReformulationTryExceptStatements.py +418 -0
- nuitka/tree/ReformulationTryFinallyStatements.py +239 -0
- nuitka/tree/ReformulationWhileLoopStatements.py +160 -0
- nuitka/tree/ReformulationWithStatements.py +382 -0
- nuitka/tree/ReformulationYieldExpressions.py +133 -0
- nuitka/tree/SourceHandling.py +476 -0
- nuitka/tree/SyntaxErrors.py +143 -0
- nuitka/tree/TreeHelpers.py +720 -0
- nuitka/tree/VariableClosure.py +483 -0
- nuitka/tree/__init__.py +19 -0
- nuitka/utils/AppDirs.py +104 -0
- nuitka/utils/CStrings.py +208 -0
- nuitka/utils/CommandLineOptions.py +207 -0
- nuitka/utils/Distributions.py +728 -0
- nuitka/utils/Download.py +217 -0
- nuitka/utils/Execution.py +517 -0
- nuitka/utils/FileOperations.py +1587 -0
- nuitka/utils/Hashing.py +137 -0
- nuitka/utils/Images.py +79 -0
- nuitka/utils/Importing.py +335 -0
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +254 -0
- nuitka/utils/InstanceCounters.py +86 -0
- nuitka/utils/Jinja2.py +158 -0
- nuitka/utils/Json.py +40 -0
- nuitka/utils/MacOSApp.py +134 -0
- nuitka/utils/MemoryUsage.py +165 -0
- nuitka/utils/ModuleNames.py +317 -0
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/ReExecute.py +152 -0
- nuitka/utils/Rest.py +60 -0
- nuitka/utils/SharedLibraries.py +1014 -0
- nuitka/utils/Shebang.py +113 -0
- nuitka/utils/Signing.py +144 -0
- nuitka/utils/SlotMetaClasses.py +57 -0
- nuitka/utils/StaticLibraries.py +260 -0
- nuitka/utils/ThreadedExecutor.py +87 -0
- nuitka/utils/Timing.py +102 -0
- nuitka/utils/Utils.py +483 -0
- nuitka/utils/WindowsFileUsage.py +337 -0
- nuitka/utils/WindowsResources.py +652 -0
- nuitka/utils/Yaml.py +247 -0
- nuitka/utils/__init__.py +19 -0
- nuitka_winsvc-2.7.7.data/scripts/nuitka-run.cmd +24 -0
- nuitka_winsvc-2.7.7.data/scripts/nuitka.cmd +30 -0
- nuitka_winsvc-2.7.7.dist-info/METADATA +115 -0
- nuitka_winsvc-2.7.7.dist-info/RECORD +995 -0
- nuitka_winsvc-2.7.7.dist-info/WHEEL +5 -0
- nuitka_winsvc-2.7.7.dist-info/entry_points.txt +7 -0
- nuitka_winsvc-2.7.7.dist-info/licenses/LICENSE.txt +202 -0
- nuitka_winsvc-2.7.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1717 @@
|
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
""" Node for constant expressions. Can be all common built-in types.
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
from abc import abstractmethod
|
|
10
|
+
|
|
11
|
+
from nuitka import Options
|
|
12
|
+
from nuitka.__past__ import (
|
|
13
|
+
GenericAlias,
|
|
14
|
+
UnionType,
|
|
15
|
+
iterItems,
|
|
16
|
+
long,
|
|
17
|
+
unicode,
|
|
18
|
+
xrange,
|
|
19
|
+
)
|
|
20
|
+
from nuitka.Builtins import (
|
|
21
|
+
builtin_anon_values,
|
|
22
|
+
builtin_exception_values_list,
|
|
23
|
+
builtin_named_values,
|
|
24
|
+
)
|
|
25
|
+
from nuitka.Constants import (
|
|
26
|
+
getUnhashableConstant,
|
|
27
|
+
isConstant,
|
|
28
|
+
isHashable,
|
|
29
|
+
isMutable,
|
|
30
|
+
the_empty_dict,
|
|
31
|
+
the_empty_frozenset,
|
|
32
|
+
the_empty_list,
|
|
33
|
+
the_empty_set,
|
|
34
|
+
the_empty_tuple,
|
|
35
|
+
the_empty_unicode,
|
|
36
|
+
)
|
|
37
|
+
from nuitka.PythonVersions import python_version
|
|
38
|
+
from nuitka.Tracing import optimization_logger
|
|
39
|
+
|
|
40
|
+
from .ExpressionBases import CompileTimeConstantExpressionBase
|
|
41
|
+
from .ExpressionShapeMixins import (
|
|
42
|
+
ExpressionBoolShapeExactMixin,
|
|
43
|
+
ExpressionBytearrayShapeExactMixin,
|
|
44
|
+
ExpressionBytesShapeExactMixin,
|
|
45
|
+
ExpressionComplexShapeExactMixin,
|
|
46
|
+
ExpressionDictShapeExactMixin,
|
|
47
|
+
ExpressionEllipsisShapeExactMixin,
|
|
48
|
+
ExpressionFloatShapeExactMixin,
|
|
49
|
+
ExpressionFrozensetShapeExactMixin,
|
|
50
|
+
ExpressionIntShapeExactMixin,
|
|
51
|
+
ExpressionListShapeExactMixin,
|
|
52
|
+
ExpressionLongShapeExactMixin,
|
|
53
|
+
ExpressionNoneShapeExactMixin,
|
|
54
|
+
ExpressionSetShapeExactMixin,
|
|
55
|
+
ExpressionSliceShapeExactMixin,
|
|
56
|
+
ExpressionStrShapeExactMixin,
|
|
57
|
+
ExpressionTupleShapeExactMixin,
|
|
58
|
+
ExpressionUnicodeShapeExactMixin,
|
|
59
|
+
)
|
|
60
|
+
from .IterationHandles import (
|
|
61
|
+
ConstantBytearrayIterationHandle,
|
|
62
|
+
ConstantBytesIterationHandle,
|
|
63
|
+
ConstantDictIterationHandle,
|
|
64
|
+
ConstantFrozensetIterationHandle,
|
|
65
|
+
ConstantListIterationHandle,
|
|
66
|
+
ConstantRangeIterationHandle,
|
|
67
|
+
ConstantSetIterationHandle,
|
|
68
|
+
ConstantStrIterationHandle,
|
|
69
|
+
ConstantTupleIterationHandle,
|
|
70
|
+
ConstantUnicodeIterationHandle,
|
|
71
|
+
)
|
|
72
|
+
from .NodeMakingHelpers import (
|
|
73
|
+
makeRaiseExceptionReplacementExpression,
|
|
74
|
+
wrapExpressionWithSideEffects,
|
|
75
|
+
)
|
|
76
|
+
from .shapes.BuiltinTypeShapes import (
|
|
77
|
+
tshape_namedtuple,
|
|
78
|
+
tshape_type,
|
|
79
|
+
tshape_xrange,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class ExpressionConstantUntrackedRefBase(CompileTimeConstantExpressionBase):
|
|
84
|
+
__slots__ = ("constant",)
|
|
85
|
+
|
|
86
|
+
def __init__(self, constant, source_ref):
|
|
87
|
+
CompileTimeConstantExpressionBase.__init__(self, source_ref)
|
|
88
|
+
|
|
89
|
+
self.constant = constant
|
|
90
|
+
|
|
91
|
+
def finalize(self):
|
|
92
|
+
del self.parent
|
|
93
|
+
del self.constant
|
|
94
|
+
|
|
95
|
+
def __repr__(self):
|
|
96
|
+
return "<Node %s value %r at %s>" % (
|
|
97
|
+
self.kind,
|
|
98
|
+
self.constant,
|
|
99
|
+
self.source_ref.getAsString(),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
def getDetails(self):
|
|
103
|
+
return {"constant": self.constant}
|
|
104
|
+
|
|
105
|
+
def getDetailsForDisplay(self):
|
|
106
|
+
result = self.getDetails()
|
|
107
|
+
|
|
108
|
+
if "constant" in result:
|
|
109
|
+
result["constant"] = repr(result["constant"])
|
|
110
|
+
|
|
111
|
+
return result
|
|
112
|
+
|
|
113
|
+
@staticmethod
|
|
114
|
+
def isExpressionConstantRef():
|
|
115
|
+
return True
|
|
116
|
+
|
|
117
|
+
def computeExpressionRaw(self, trace_collection):
|
|
118
|
+
# Cannot compute any further, this is already the best.
|
|
119
|
+
return self, None, None
|
|
120
|
+
|
|
121
|
+
# Note: For computedExpressionResult to work, TODO: needed more generally?
|
|
122
|
+
def computeExpression(self, trace_collection):
|
|
123
|
+
# Cannot compute any further, this is already the best.
|
|
124
|
+
return self, None, None
|
|
125
|
+
|
|
126
|
+
def computeExpressionCall(self, call_node, call_args, call_kw, trace_collection):
|
|
127
|
+
trace_collection.onExceptionRaiseExit(TypeError)
|
|
128
|
+
|
|
129
|
+
# The arguments don't matter. All constant values cannot be called, and
|
|
130
|
+
# we just need to make and error out of that.
|
|
131
|
+
new_node = wrapExpressionWithSideEffects(
|
|
132
|
+
new_node=makeRaiseExceptionReplacementExpression(
|
|
133
|
+
expression=self,
|
|
134
|
+
exception_type="TypeError",
|
|
135
|
+
exception_value="'%s' object is not callable"
|
|
136
|
+
% type(self.constant).__name__,
|
|
137
|
+
),
|
|
138
|
+
old_node=call_node,
|
|
139
|
+
side_effects=call_node.extractSideEffectsPreCall(),
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
new_node,
|
|
144
|
+
"new_raise",
|
|
145
|
+
"Predicted call of constant %s value to exception raise."
|
|
146
|
+
% type(self.constant),
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
def computeExpressionCallViaVariable(
|
|
150
|
+
self, call_node, variable_ref_node, call_args, call_kw, trace_collection
|
|
151
|
+
):
|
|
152
|
+
return self.computeExpressionCall(
|
|
153
|
+
call_node=call_node,
|
|
154
|
+
call_args=call_args,
|
|
155
|
+
call_kw=call_kw,
|
|
156
|
+
trace_collection=trace_collection,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
def getCompileTimeConstant(self):
|
|
160
|
+
return self.constant
|
|
161
|
+
|
|
162
|
+
# TODO: Push this to singletons for being static functions
|
|
163
|
+
def getComparisonValue(self):
|
|
164
|
+
return True, self.constant
|
|
165
|
+
|
|
166
|
+
@staticmethod
|
|
167
|
+
def getIterationHandle():
|
|
168
|
+
return None
|
|
169
|
+
|
|
170
|
+
def isMutable(self):
|
|
171
|
+
# This is expected to be overloaded by child classes.
|
|
172
|
+
assert False, self
|
|
173
|
+
|
|
174
|
+
def isKnownToBeHashable(self):
|
|
175
|
+
# This is expected to be overloaded by child classes.
|
|
176
|
+
assert False, self
|
|
177
|
+
|
|
178
|
+
def extractUnhashableNodeType(self):
|
|
179
|
+
value = getUnhashableConstant(self.constant)
|
|
180
|
+
|
|
181
|
+
if value is not None:
|
|
182
|
+
return makeConstantRefNode(constant=type(value), source_ref=self.source_ref)
|
|
183
|
+
|
|
184
|
+
@staticmethod
|
|
185
|
+
def isNumberConstant():
|
|
186
|
+
# This is expected to be overloaded by child classes that disagree, bool, int, long and float
|
|
187
|
+
return False
|
|
188
|
+
|
|
189
|
+
@staticmethod
|
|
190
|
+
def isIndexConstant():
|
|
191
|
+
# This is expected to be overloaded by child classes that disagree, bool, int, long and float
|
|
192
|
+
return False
|
|
193
|
+
|
|
194
|
+
def isIndexable(self):
|
|
195
|
+
# TODO: Suspiciously this doesn't use isIndexConstant, which includes float, bug?
|
|
196
|
+
return self.constant is None or self.isNumberConstant()
|
|
197
|
+
|
|
198
|
+
def isKnownToBeIterable(self, count):
|
|
199
|
+
if self.isIterableConstant():
|
|
200
|
+
return count is None or len(self.constant) == count
|
|
201
|
+
else:
|
|
202
|
+
return False
|
|
203
|
+
|
|
204
|
+
def isKnownToBeIterableAtMin(self, count):
|
|
205
|
+
length = self.getIterationLength()
|
|
206
|
+
|
|
207
|
+
return length is not None and length >= count
|
|
208
|
+
|
|
209
|
+
def canPredictIterationValues(self):
|
|
210
|
+
return self.isKnownToBeIterable(None)
|
|
211
|
+
|
|
212
|
+
def getIterationValue(self, count):
|
|
213
|
+
assert count < len(self.constant)
|
|
214
|
+
|
|
215
|
+
return makeConstantRefNode(
|
|
216
|
+
constant=self.constant[count], source_ref=self.source_ref
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
def getIterationValueRange(self, start, stop):
|
|
220
|
+
return [
|
|
221
|
+
makeConstantRefNode(constant=value, source_ref=self.source_ref)
|
|
222
|
+
for value in self.constant[start:stop]
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
def getIterationValues(self):
|
|
226
|
+
source_ref = self.source_ref
|
|
227
|
+
|
|
228
|
+
return tuple(
|
|
229
|
+
makeConstantRefNode(
|
|
230
|
+
constant=value, source_ref=source_ref, user_provided=self.user_provided
|
|
231
|
+
)
|
|
232
|
+
for value in self.constant
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
def getIntegerValue(self):
|
|
236
|
+
if self.isNumberConstant():
|
|
237
|
+
return int(self.constant)
|
|
238
|
+
else:
|
|
239
|
+
return None
|
|
240
|
+
|
|
241
|
+
@abstractmethod
|
|
242
|
+
def isIterableConstant(self):
|
|
243
|
+
"""Is the constant type iterable."""
|
|
244
|
+
# This is expected to be overloaded by child classes, but it's actually wasteful
|
|
245
|
+
# to use it, we should have overloads of using methods too.
|
|
246
|
+
|
|
247
|
+
def getIterationLength(self):
|
|
248
|
+
# This is expected to be overloaded by child classes if they are iterable
|
|
249
|
+
assert not self.isIterableConstant(), self
|
|
250
|
+
|
|
251
|
+
return None
|
|
252
|
+
|
|
253
|
+
def getStrValue(self):
|
|
254
|
+
return makeConstantRefNode(
|
|
255
|
+
constant=str(self.constant),
|
|
256
|
+
user_provided=False,
|
|
257
|
+
source_ref=self.source_ref,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
261
|
+
# Note, this is overloaded for all the others.
|
|
262
|
+
assert not self.isIterableConstant()
|
|
263
|
+
|
|
264
|
+
# TODO: Raise static exception.
|
|
265
|
+
|
|
266
|
+
return iter_node, None, None
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class ExpressionConstantRefBase(ExpressionConstantUntrackedRefBase):
|
|
270
|
+
"""Constants reference base class.
|
|
271
|
+
|
|
272
|
+
Use this for cases, for which it makes sense to track origin, e.g.
|
|
273
|
+
large lists are from computation or from user literals.
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
# Base classes can be abstract, pylint: disable=I0021,abstract-method
|
|
277
|
+
|
|
278
|
+
__slots__ = ("user_provided",)
|
|
279
|
+
|
|
280
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
281
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
282
|
+
self, constant=constant, source_ref=source_ref
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
self.user_provided = user_provided
|
|
286
|
+
|
|
287
|
+
if not user_provided and Options.is_debug:
|
|
288
|
+
try:
|
|
289
|
+
if type(constant) in (str, unicode, bytes):
|
|
290
|
+
max_size = 1000
|
|
291
|
+
elif type(constant) is xrange:
|
|
292
|
+
max_size = None
|
|
293
|
+
else:
|
|
294
|
+
max_size = 256
|
|
295
|
+
|
|
296
|
+
if max_size is not None and len(constant) > max_size:
|
|
297
|
+
optimization_logger.warning(
|
|
298
|
+
"Too large constant (%s %d) encountered at %s."
|
|
299
|
+
% (
|
|
300
|
+
type(constant),
|
|
301
|
+
len(constant),
|
|
302
|
+
source_ref.getAsString(),
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
except TypeError:
|
|
306
|
+
pass
|
|
307
|
+
|
|
308
|
+
def getDetails(self):
|
|
309
|
+
return {"constant": self.constant, "user_provided": self.user_provided}
|
|
310
|
+
|
|
311
|
+
def __repr__(self):
|
|
312
|
+
return "<Node %s value %r at %s %s>" % (
|
|
313
|
+
self.kind,
|
|
314
|
+
self.constant,
|
|
315
|
+
self.source_ref.getAsString(),
|
|
316
|
+
self.user_provided,
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
def getStrValue(self):
|
|
320
|
+
try:
|
|
321
|
+
return makeConstantRefNode(
|
|
322
|
+
constant=str(self.constant),
|
|
323
|
+
user_provided=self.user_provided,
|
|
324
|
+
source_ref=self.source_ref,
|
|
325
|
+
)
|
|
326
|
+
except UnicodeEncodeError:
|
|
327
|
+
# Unicode constants may not be possible to encode.
|
|
328
|
+
return None
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class ExpressionConstantNoneRef(
|
|
332
|
+
ExpressionNoneShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
333
|
+
):
|
|
334
|
+
kind = "EXPRESSION_CONSTANT_NONE_REF"
|
|
335
|
+
|
|
336
|
+
__slots__ = ()
|
|
337
|
+
|
|
338
|
+
def __init__(self, source_ref):
|
|
339
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
340
|
+
self, constant=None, source_ref=source_ref
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
@staticmethod
|
|
344
|
+
def getDetails():
|
|
345
|
+
return {}
|
|
346
|
+
|
|
347
|
+
@staticmethod
|
|
348
|
+
def isMutable():
|
|
349
|
+
return False
|
|
350
|
+
|
|
351
|
+
@staticmethod
|
|
352
|
+
def isIterableConstant():
|
|
353
|
+
return False
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class ExpressionConstantBoolRefBase(
|
|
357
|
+
ExpressionBoolShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
358
|
+
):
|
|
359
|
+
@staticmethod
|
|
360
|
+
def isExpressionConstantBoolRef():
|
|
361
|
+
return True
|
|
362
|
+
|
|
363
|
+
@staticmethod
|
|
364
|
+
def computeExpressionBool(trace_collection):
|
|
365
|
+
# Best case already, None indicated no action.
|
|
366
|
+
return None, None, None
|
|
367
|
+
|
|
368
|
+
@staticmethod
|
|
369
|
+
def getDetails():
|
|
370
|
+
return {}
|
|
371
|
+
|
|
372
|
+
@staticmethod
|
|
373
|
+
def isMutable():
|
|
374
|
+
return False
|
|
375
|
+
|
|
376
|
+
@staticmethod
|
|
377
|
+
def isKnownToBeHashable():
|
|
378
|
+
return True
|
|
379
|
+
|
|
380
|
+
@staticmethod
|
|
381
|
+
def isNumberConstant():
|
|
382
|
+
return True
|
|
383
|
+
|
|
384
|
+
@staticmethod
|
|
385
|
+
def isIndexConstant():
|
|
386
|
+
return True
|
|
387
|
+
|
|
388
|
+
@staticmethod
|
|
389
|
+
def isIterableConstant():
|
|
390
|
+
return False
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class ExpressionConstantTrueRef(ExpressionConstantBoolRefBase):
|
|
394
|
+
kind = "EXPRESSION_CONSTANT_TRUE_REF"
|
|
395
|
+
|
|
396
|
+
__slots__ = ()
|
|
397
|
+
|
|
398
|
+
def __init__(self, source_ref):
|
|
399
|
+
ExpressionConstantBoolRefBase.__init__(
|
|
400
|
+
self, constant=True, source_ref=source_ref
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
@staticmethod
|
|
404
|
+
def getTruthValue():
|
|
405
|
+
"""Return known truth value."""
|
|
406
|
+
|
|
407
|
+
return True
|
|
408
|
+
|
|
409
|
+
@staticmethod
|
|
410
|
+
def getIndexValue():
|
|
411
|
+
return 1
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
class ExpressionConstantFalseRef(ExpressionConstantBoolRefBase):
|
|
415
|
+
kind = "EXPRESSION_CONSTANT_FALSE_REF"
|
|
416
|
+
|
|
417
|
+
__slots__ = ()
|
|
418
|
+
|
|
419
|
+
def __init__(self, source_ref):
|
|
420
|
+
ExpressionConstantBoolRefBase.__init__(
|
|
421
|
+
self, constant=False, source_ref=source_ref
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
@staticmethod
|
|
425
|
+
def getTruthValue():
|
|
426
|
+
"""Return known truth value."""
|
|
427
|
+
|
|
428
|
+
return False
|
|
429
|
+
|
|
430
|
+
@staticmethod
|
|
431
|
+
def getIndexValue():
|
|
432
|
+
return 0
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
class ExpressionConstantEllipsisRef(
|
|
436
|
+
ExpressionEllipsisShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
437
|
+
):
|
|
438
|
+
kind = "EXPRESSION_CONSTANT_ELLIPSIS_REF"
|
|
439
|
+
|
|
440
|
+
__slots__ = ()
|
|
441
|
+
|
|
442
|
+
def __init__(self, source_ref):
|
|
443
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
444
|
+
self, constant=Ellipsis, source_ref=source_ref
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
@staticmethod
|
|
448
|
+
def getDetails():
|
|
449
|
+
return {}
|
|
450
|
+
|
|
451
|
+
@staticmethod
|
|
452
|
+
def isMutable():
|
|
453
|
+
return False
|
|
454
|
+
|
|
455
|
+
@staticmethod
|
|
456
|
+
def isIterableConstant():
|
|
457
|
+
return False
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
class ExpressionConstantDictRef(
|
|
461
|
+
ExpressionDictShapeExactMixin, ExpressionConstantRefBase
|
|
462
|
+
):
|
|
463
|
+
kind = "EXPRESSION_CONSTANT_DICT_REF"
|
|
464
|
+
|
|
465
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
466
|
+
ExpressionConstantRefBase.__init__(
|
|
467
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
@staticmethod
|
|
471
|
+
def isExpressionConstantDictRef():
|
|
472
|
+
return True
|
|
473
|
+
|
|
474
|
+
@staticmethod
|
|
475
|
+
def isMutable():
|
|
476
|
+
return True
|
|
477
|
+
|
|
478
|
+
@staticmethod
|
|
479
|
+
def isKnownToBeHashable():
|
|
480
|
+
return False
|
|
481
|
+
|
|
482
|
+
@staticmethod
|
|
483
|
+
def isIterableConstant():
|
|
484
|
+
return True
|
|
485
|
+
|
|
486
|
+
def getIterationHandle(self):
|
|
487
|
+
return ConstantDictIterationHandle(self)
|
|
488
|
+
|
|
489
|
+
def getIterationLength(self):
|
|
490
|
+
return len(self.constant)
|
|
491
|
+
|
|
492
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
493
|
+
result = makeConstantRefNode(
|
|
494
|
+
constant=tuple(self.constant),
|
|
495
|
+
user_provided=self.user_provided,
|
|
496
|
+
source_ref=self.source_ref,
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
self.parent.replaceChild(self, result)
|
|
500
|
+
self.finalize()
|
|
501
|
+
|
|
502
|
+
return (
|
|
503
|
+
iter_node,
|
|
504
|
+
"new_constant",
|
|
505
|
+
"""Iteration over constant dict lowered to tuple.""",
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
def isMappingWithConstantStringKeys(self):
|
|
509
|
+
return all(type(key) in (str, unicode) for key in self.constant)
|
|
510
|
+
|
|
511
|
+
def getMappingStringKeyPairs(self):
|
|
512
|
+
pairs = []
|
|
513
|
+
|
|
514
|
+
for key, value in iterItems(self.constant):
|
|
515
|
+
pairs.append(
|
|
516
|
+
(
|
|
517
|
+
key,
|
|
518
|
+
makeConstantRefNode(
|
|
519
|
+
constant=value,
|
|
520
|
+
user_provided=self.user_provided,
|
|
521
|
+
source_ref=self.source_ref,
|
|
522
|
+
),
|
|
523
|
+
)
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
return pairs
|
|
527
|
+
|
|
528
|
+
@staticmethod
|
|
529
|
+
def getTruthValue():
|
|
530
|
+
"""Return known truth value.
|
|
531
|
+
|
|
532
|
+
The empty dict is not allowed here, so we can hardcode it.
|
|
533
|
+
"""
|
|
534
|
+
|
|
535
|
+
return True
|
|
536
|
+
|
|
537
|
+
def getExpressionDictInConstant(self, value):
|
|
538
|
+
return value in self.constant
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
class EmptyContainerMixin(object):
|
|
542
|
+
__slots__ = ()
|
|
543
|
+
|
|
544
|
+
def getDetails(self):
|
|
545
|
+
return {"user_provided": self.user_provided}
|
|
546
|
+
|
|
547
|
+
@staticmethod
|
|
548
|
+
def getIterationLength():
|
|
549
|
+
return 0
|
|
550
|
+
|
|
551
|
+
@staticmethod
|
|
552
|
+
def getTruthValue():
|
|
553
|
+
"""Return known truth value.
|
|
554
|
+
|
|
555
|
+
The empty container is false, so we can hardcode it.
|
|
556
|
+
"""
|
|
557
|
+
|
|
558
|
+
return False
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
class ExpressionConstantDictEmptyRef(EmptyContainerMixin, ExpressionConstantDictRef):
|
|
562
|
+
kind = "EXPRESSION_CONSTANT_DICT_EMPTY_REF"
|
|
563
|
+
|
|
564
|
+
__slots__ = ()
|
|
565
|
+
|
|
566
|
+
def __init__(self, user_provided, source_ref):
|
|
567
|
+
ExpressionConstantDictRef.__init__(
|
|
568
|
+
self,
|
|
569
|
+
constant=the_empty_dict,
|
|
570
|
+
user_provided=user_provided,
|
|
571
|
+
source_ref=source_ref,
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
class ExpressionConstantTupleRef(
|
|
576
|
+
ExpressionTupleShapeExactMixin, ExpressionConstantRefBase
|
|
577
|
+
):
|
|
578
|
+
kind = "EXPRESSION_CONSTANT_TUPLE_REF"
|
|
579
|
+
|
|
580
|
+
__slots__ = ()
|
|
581
|
+
|
|
582
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
583
|
+
ExpressionConstantRefBase.__init__(
|
|
584
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
@staticmethod
|
|
588
|
+
def isExpressionConstantTupleRef():
|
|
589
|
+
return True
|
|
590
|
+
|
|
591
|
+
@staticmethod
|
|
592
|
+
def isMutable():
|
|
593
|
+
return False
|
|
594
|
+
|
|
595
|
+
def isKnownToBeHashable(self):
|
|
596
|
+
# There are a few exceptions, where non-mutable can be non-hashable, e.g. slice.
|
|
597
|
+
return isHashable(self.constant)
|
|
598
|
+
|
|
599
|
+
@staticmethod
|
|
600
|
+
def isIterableConstant():
|
|
601
|
+
return True
|
|
602
|
+
|
|
603
|
+
def getIterationHandle(self):
|
|
604
|
+
return ConstantTupleIterationHandle(self)
|
|
605
|
+
|
|
606
|
+
def getIterationLength(self):
|
|
607
|
+
return len(self.constant)
|
|
608
|
+
|
|
609
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
610
|
+
# Note: Tuples are as good as it gets.
|
|
611
|
+
return iter_node, None, None
|
|
612
|
+
|
|
613
|
+
@staticmethod
|
|
614
|
+
def getTruthValue():
|
|
615
|
+
"""Return known truth value.
|
|
616
|
+
|
|
617
|
+
The empty dict is not allowed here, so we can hardcode it.
|
|
618
|
+
"""
|
|
619
|
+
|
|
620
|
+
return True
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
class ExpressionConstantTupleMutableRef(ExpressionConstantTupleRef):
|
|
624
|
+
kind = "EXPRESSION_CONSTANT_TUPLE_MUTABLE_REF"
|
|
625
|
+
|
|
626
|
+
__slots__ = ()
|
|
627
|
+
|
|
628
|
+
@staticmethod
|
|
629
|
+
def isMutable():
|
|
630
|
+
return True
|
|
631
|
+
|
|
632
|
+
@staticmethod
|
|
633
|
+
def isKnownToBeHashable():
|
|
634
|
+
return False
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
class ExpressionConstantTupleEmptyRef(EmptyContainerMixin, ExpressionConstantTupleRef):
|
|
638
|
+
kind = "EXPRESSION_CONSTANT_TUPLE_EMPTY_REF"
|
|
639
|
+
|
|
640
|
+
__slots__ = ()
|
|
641
|
+
|
|
642
|
+
def __init__(self, user_provided, source_ref):
|
|
643
|
+
ExpressionConstantTupleRef.__init__(
|
|
644
|
+
self,
|
|
645
|
+
constant=the_empty_tuple,
|
|
646
|
+
user_provided=user_provided,
|
|
647
|
+
source_ref=source_ref,
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
class ExpressionConstantListRef(
|
|
652
|
+
ExpressionListShapeExactMixin, ExpressionConstantRefBase
|
|
653
|
+
):
|
|
654
|
+
kind = "EXPRESSION_CONSTANT_LIST_REF"
|
|
655
|
+
|
|
656
|
+
__slots__ = ()
|
|
657
|
+
|
|
658
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
659
|
+
ExpressionConstantRefBase.__init__(
|
|
660
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
661
|
+
)
|
|
662
|
+
|
|
663
|
+
@staticmethod
|
|
664
|
+
def isExpressionConstantListRef():
|
|
665
|
+
return True
|
|
666
|
+
|
|
667
|
+
@staticmethod
|
|
668
|
+
def isMutable():
|
|
669
|
+
return True
|
|
670
|
+
|
|
671
|
+
@staticmethod
|
|
672
|
+
def isIterableConstant():
|
|
673
|
+
return True
|
|
674
|
+
|
|
675
|
+
def getIterationHandle(self):
|
|
676
|
+
return ConstantListIterationHandle(self)
|
|
677
|
+
|
|
678
|
+
def getIterationLength(self):
|
|
679
|
+
return len(self.constant)
|
|
680
|
+
|
|
681
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
682
|
+
result = makeConstantRefNode(
|
|
683
|
+
constant=tuple(self.constant),
|
|
684
|
+
user_provided=self.user_provided,
|
|
685
|
+
source_ref=self.source_ref,
|
|
686
|
+
)
|
|
687
|
+
|
|
688
|
+
self.parent.replaceChild(self, result)
|
|
689
|
+
self.finalize()
|
|
690
|
+
|
|
691
|
+
return (
|
|
692
|
+
iter_node,
|
|
693
|
+
"new_constant",
|
|
694
|
+
"""Iteration over constant list lowered to tuple.""",
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
def computeExpressionComparisonIn(self, in_node, value_node, trace_collection):
|
|
698
|
+
result = makeConstantRefNode(
|
|
699
|
+
constant=tuple(self.constant),
|
|
700
|
+
user_provided=self.user_provided,
|
|
701
|
+
source_ref=self.source_ref,
|
|
702
|
+
)
|
|
703
|
+
|
|
704
|
+
self.parent.replaceChild(self, result)
|
|
705
|
+
self.finalize()
|
|
706
|
+
|
|
707
|
+
# We did not know this before
|
|
708
|
+
trace_collection.onExceptionRaiseExit(BaseException)
|
|
709
|
+
|
|
710
|
+
return (
|
|
711
|
+
in_node,
|
|
712
|
+
"new_constant",
|
|
713
|
+
"""Contains test over constant list lowered to tuple.""",
|
|
714
|
+
)
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
class ExpressionConstantListEmptyRef(EmptyContainerMixin, ExpressionConstantListRef):
|
|
718
|
+
kind = "EXPRESSION_CONSTANT_LIST_EMPTY_REF"
|
|
719
|
+
|
|
720
|
+
__slots__ = ()
|
|
721
|
+
|
|
722
|
+
def __init__(self, user_provided, source_ref):
|
|
723
|
+
ExpressionConstantListRef.__init__(
|
|
724
|
+
self,
|
|
725
|
+
constant=the_empty_list,
|
|
726
|
+
user_provided=user_provided,
|
|
727
|
+
source_ref=source_ref,
|
|
728
|
+
)
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
class ExpressionConstantSetRef(ExpressionSetShapeExactMixin, ExpressionConstantRefBase):
|
|
732
|
+
kind = "EXPRESSION_CONSTANT_SET_REF"
|
|
733
|
+
|
|
734
|
+
__slots__ = ()
|
|
735
|
+
|
|
736
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
737
|
+
ExpressionConstantRefBase.__init__(
|
|
738
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
739
|
+
)
|
|
740
|
+
|
|
741
|
+
@staticmethod
|
|
742
|
+
def isExpressionConstantSetRef():
|
|
743
|
+
return True
|
|
744
|
+
|
|
745
|
+
@staticmethod
|
|
746
|
+
def isMutable():
|
|
747
|
+
return True
|
|
748
|
+
|
|
749
|
+
@staticmethod
|
|
750
|
+
def isKnownToBeHashable():
|
|
751
|
+
return False
|
|
752
|
+
|
|
753
|
+
@staticmethod
|
|
754
|
+
def isIterableConstant():
|
|
755
|
+
return True
|
|
756
|
+
|
|
757
|
+
def getIterationHandle(self):
|
|
758
|
+
return ConstantSetIterationHandle(self)
|
|
759
|
+
|
|
760
|
+
def getIterationLength(self):
|
|
761
|
+
return len(self.constant)
|
|
762
|
+
|
|
763
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
764
|
+
result = makeConstantRefNode(
|
|
765
|
+
constant=tuple(self.constant),
|
|
766
|
+
user_provided=self.user_provided,
|
|
767
|
+
source_ref=self.source_ref,
|
|
768
|
+
)
|
|
769
|
+
|
|
770
|
+
self.parent.replaceChild(self, result)
|
|
771
|
+
self.finalize()
|
|
772
|
+
|
|
773
|
+
return (
|
|
774
|
+
iter_node,
|
|
775
|
+
"new_constant",
|
|
776
|
+
"""Iteration over constant set lowered to tuple.""",
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
def computeExpressionComparisonIn(self, in_node, value_node, trace_collection):
|
|
780
|
+
result = makeConstantRefNode(
|
|
781
|
+
constant=frozenset(self.constant),
|
|
782
|
+
user_provided=self.user_provided,
|
|
783
|
+
source_ref=self.source_ref,
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
self.parent.replaceChild(self, result)
|
|
787
|
+
self.finalize()
|
|
788
|
+
|
|
789
|
+
# We did not know this before
|
|
790
|
+
trace_collection.onExceptionRaiseExit(BaseException)
|
|
791
|
+
|
|
792
|
+
return (
|
|
793
|
+
in_node,
|
|
794
|
+
"new_constant",
|
|
795
|
+
"""Contains test over constant set lowered to frozenset.""",
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
class ExpressionConstantSetEmptyRef(EmptyContainerMixin, ExpressionConstantSetRef):
|
|
800
|
+
kind = "EXPRESSION_CONSTANT_SET_EMPTY_REF"
|
|
801
|
+
|
|
802
|
+
__slots__ = ()
|
|
803
|
+
|
|
804
|
+
def __init__(self, user_provided, source_ref):
|
|
805
|
+
ExpressionConstantSetRef.__init__(
|
|
806
|
+
self,
|
|
807
|
+
constant=the_empty_set,
|
|
808
|
+
user_provided=user_provided,
|
|
809
|
+
source_ref=source_ref,
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
class ExpressionConstantFrozensetRef(
|
|
814
|
+
ExpressionFrozensetShapeExactMixin, ExpressionConstantRefBase
|
|
815
|
+
):
|
|
816
|
+
kind = "EXPRESSION_CONSTANT_FROZENSET_REF"
|
|
817
|
+
|
|
818
|
+
__slots__ = ()
|
|
819
|
+
|
|
820
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
821
|
+
ExpressionConstantRefBase.__init__(
|
|
822
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
@staticmethod
|
|
826
|
+
def isExpressionConstantFrozensetRef():
|
|
827
|
+
return True
|
|
828
|
+
|
|
829
|
+
@staticmethod
|
|
830
|
+
def isMutable():
|
|
831
|
+
return False
|
|
832
|
+
|
|
833
|
+
@staticmethod
|
|
834
|
+
def isIterableConstant():
|
|
835
|
+
return True
|
|
836
|
+
|
|
837
|
+
def getIterationHandle(self):
|
|
838
|
+
return ConstantFrozensetIterationHandle(self)
|
|
839
|
+
|
|
840
|
+
def getIterationLength(self):
|
|
841
|
+
return len(self.constant)
|
|
842
|
+
|
|
843
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
844
|
+
result = makeConstantRefNode(
|
|
845
|
+
constant=tuple(self.constant),
|
|
846
|
+
user_provided=self.user_provided,
|
|
847
|
+
source_ref=self.source_ref,
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
self.parent.replaceChild(self, result)
|
|
851
|
+
self.finalize()
|
|
852
|
+
|
|
853
|
+
return (
|
|
854
|
+
iter_node,
|
|
855
|
+
"new_constant",
|
|
856
|
+
"""Iteration over constant frozenset lowered to tuple.""",
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
class ExpressionConstantFrozensetEmptyRef(
|
|
861
|
+
EmptyContainerMixin, ExpressionConstantFrozensetRef
|
|
862
|
+
):
|
|
863
|
+
kind = "EXPRESSION_CONSTANT_FROZENSET_EMPTY_REF"
|
|
864
|
+
|
|
865
|
+
__slots__ = ()
|
|
866
|
+
|
|
867
|
+
def __init__(self, user_provided, source_ref):
|
|
868
|
+
ExpressionConstantFrozensetRef.__init__(
|
|
869
|
+
self,
|
|
870
|
+
constant=the_empty_frozenset,
|
|
871
|
+
user_provided=user_provided,
|
|
872
|
+
source_ref=source_ref,
|
|
873
|
+
)
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
class ExpressionConstantIntRef(
|
|
877
|
+
ExpressionIntShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
878
|
+
):
|
|
879
|
+
kind = "EXPRESSION_CONSTANT_INT_REF"
|
|
880
|
+
|
|
881
|
+
__slots__ = ()
|
|
882
|
+
|
|
883
|
+
def __init__(self, constant, source_ref):
|
|
884
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
885
|
+
self, constant=constant, source_ref=source_ref
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
@staticmethod
|
|
889
|
+
def isExpressionConstantIntRef():
|
|
890
|
+
return True
|
|
891
|
+
|
|
892
|
+
@staticmethod
|
|
893
|
+
def isMutable():
|
|
894
|
+
return False
|
|
895
|
+
|
|
896
|
+
@staticmethod
|
|
897
|
+
def isNumberConstant():
|
|
898
|
+
return True
|
|
899
|
+
|
|
900
|
+
@staticmethod
|
|
901
|
+
def isIndexConstant():
|
|
902
|
+
return True
|
|
903
|
+
|
|
904
|
+
def getIndexValue(self):
|
|
905
|
+
return self.constant
|
|
906
|
+
|
|
907
|
+
@staticmethod
|
|
908
|
+
def isIterableConstant():
|
|
909
|
+
return False
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
class ExpressionConstantLongRef(
|
|
913
|
+
ExpressionLongShapeExactMixin, ExpressionConstantRefBase
|
|
914
|
+
):
|
|
915
|
+
kind = "EXPRESSION_CONSTANT_LONG_REF"
|
|
916
|
+
|
|
917
|
+
__slots__ = ()
|
|
918
|
+
|
|
919
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
920
|
+
ExpressionConstantRefBase.__init__(
|
|
921
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
922
|
+
)
|
|
923
|
+
|
|
924
|
+
@staticmethod
|
|
925
|
+
def isExpressionConstantLongRef():
|
|
926
|
+
return True
|
|
927
|
+
|
|
928
|
+
@staticmethod
|
|
929
|
+
def isMutable():
|
|
930
|
+
return False
|
|
931
|
+
|
|
932
|
+
@staticmethod
|
|
933
|
+
def isNumberConstant():
|
|
934
|
+
return True
|
|
935
|
+
|
|
936
|
+
@staticmethod
|
|
937
|
+
def isIndexConstant():
|
|
938
|
+
return True
|
|
939
|
+
|
|
940
|
+
def getIndexValue(self):
|
|
941
|
+
# Use the int value if possible, otherwise that remains a long, which is
|
|
942
|
+
# also OK, but often unnecessary.
|
|
943
|
+
return int(self.constant)
|
|
944
|
+
|
|
945
|
+
@staticmethod
|
|
946
|
+
def isIterableConstant():
|
|
947
|
+
return False
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
class ExpressionConstantStrRef(ExpressionStrShapeExactMixin, ExpressionConstantRefBase):
|
|
951
|
+
kind = "EXPRESSION_CONSTANT_STR_REF"
|
|
952
|
+
|
|
953
|
+
__slots__ = ()
|
|
954
|
+
|
|
955
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
956
|
+
ExpressionConstantRefBase.__init__(
|
|
957
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
@staticmethod
|
|
961
|
+
def isExpressionConstantStrRef():
|
|
962
|
+
return True
|
|
963
|
+
|
|
964
|
+
@staticmethod
|
|
965
|
+
def isMutable():
|
|
966
|
+
return False
|
|
967
|
+
|
|
968
|
+
@staticmethod
|
|
969
|
+
def isIterableConstant():
|
|
970
|
+
return True
|
|
971
|
+
|
|
972
|
+
def getIterationHandle(self):
|
|
973
|
+
return ConstantStrIterationHandle(self)
|
|
974
|
+
|
|
975
|
+
def getIterationLength(self):
|
|
976
|
+
return len(self.constant)
|
|
977
|
+
|
|
978
|
+
def getStrValue(self):
|
|
979
|
+
return self
|
|
980
|
+
|
|
981
|
+
def getStringValue(self):
|
|
982
|
+
return self.constant
|
|
983
|
+
|
|
984
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
985
|
+
# Note: str are as good as it gets.
|
|
986
|
+
return iter_node, None, None
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
class ExpressionConstantStrEmptyRef(EmptyContainerMixin, ExpressionConstantStrRef):
|
|
990
|
+
kind = "EXPRESSION_CONSTANT_STR_EMPTY_REF"
|
|
991
|
+
|
|
992
|
+
__slots__ = ()
|
|
993
|
+
|
|
994
|
+
def __init__(self, user_provided, source_ref):
|
|
995
|
+
ExpressionConstantStrRef.__init__(
|
|
996
|
+
self,
|
|
997
|
+
constant="",
|
|
998
|
+
user_provided=user_provided,
|
|
999
|
+
source_ref=source_ref,
|
|
1000
|
+
)
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
class ExpressionConstantUnicodeRef(
|
|
1004
|
+
ExpressionUnicodeShapeExactMixin, ExpressionConstantRefBase
|
|
1005
|
+
):
|
|
1006
|
+
kind = "EXPRESSION_CONSTANT_UNICODE_REF"
|
|
1007
|
+
|
|
1008
|
+
__slots__ = ()
|
|
1009
|
+
|
|
1010
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
1011
|
+
ExpressionConstantRefBase.__init__(
|
|
1012
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
@staticmethod
|
|
1016
|
+
def isExpressionConstantUnicodeRef():
|
|
1017
|
+
return True
|
|
1018
|
+
|
|
1019
|
+
@staticmethod
|
|
1020
|
+
def isMutable():
|
|
1021
|
+
return False
|
|
1022
|
+
|
|
1023
|
+
@staticmethod
|
|
1024
|
+
def isIterableConstant():
|
|
1025
|
+
return True
|
|
1026
|
+
|
|
1027
|
+
def getIterationHandle(self):
|
|
1028
|
+
return ConstantUnicodeIterationHandle(self)
|
|
1029
|
+
|
|
1030
|
+
def getIterationLength(self):
|
|
1031
|
+
return len(self.constant)
|
|
1032
|
+
|
|
1033
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
1034
|
+
# Note: unicode are as good as it gets
|
|
1035
|
+
return iter_node, None, None
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
class ExpressionConstantUnicodeEmptyRef(
|
|
1039
|
+
EmptyContainerMixin, ExpressionConstantUnicodeRef
|
|
1040
|
+
):
|
|
1041
|
+
kind = "EXPRESSION_CONSTANT_UNICODE_EMPTY_REF"
|
|
1042
|
+
|
|
1043
|
+
__slots__ = ()
|
|
1044
|
+
|
|
1045
|
+
def __init__(self, user_provided, source_ref):
|
|
1046
|
+
ExpressionConstantUnicodeRef.__init__(
|
|
1047
|
+
self,
|
|
1048
|
+
constant=the_empty_unicode,
|
|
1049
|
+
user_provided=user_provided,
|
|
1050
|
+
source_ref=source_ref,
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
class ExpressionConstantBytesRef(
|
|
1055
|
+
ExpressionBytesShapeExactMixin, ExpressionConstantRefBase
|
|
1056
|
+
):
|
|
1057
|
+
kind = "EXPRESSION_CONSTANT_BYTES_REF"
|
|
1058
|
+
|
|
1059
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
1060
|
+
ExpressionConstantRefBase.__init__(
|
|
1061
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
1062
|
+
)
|
|
1063
|
+
|
|
1064
|
+
@staticmethod
|
|
1065
|
+
def isExpressionConstantBytesRef():
|
|
1066
|
+
return True
|
|
1067
|
+
|
|
1068
|
+
@staticmethod
|
|
1069
|
+
def isMutable():
|
|
1070
|
+
return False
|
|
1071
|
+
|
|
1072
|
+
@staticmethod
|
|
1073
|
+
def isIterableConstant():
|
|
1074
|
+
return True
|
|
1075
|
+
|
|
1076
|
+
def getIterationHandle(self):
|
|
1077
|
+
return ConstantBytesIterationHandle(self)
|
|
1078
|
+
|
|
1079
|
+
def getIterationLength(self):
|
|
1080
|
+
return len(self.constant)
|
|
1081
|
+
|
|
1082
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
1083
|
+
# Note: bytes are as good as it gets
|
|
1084
|
+
return iter_node, None, None
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
class ExpressionConstantBytesEmptyRef(EmptyContainerMixin, ExpressionConstantBytesRef):
|
|
1088
|
+
kind = "EXPRESSION_CONSTANT_BYTES_EMPTY_REF"
|
|
1089
|
+
|
|
1090
|
+
__slots__ = ()
|
|
1091
|
+
|
|
1092
|
+
def __init__(self, user_provided, source_ref):
|
|
1093
|
+
ExpressionConstantBytesRef.__init__(
|
|
1094
|
+
self,
|
|
1095
|
+
constant=b"",
|
|
1096
|
+
user_provided=user_provided,
|
|
1097
|
+
source_ref=source_ref,
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
class ExpressionConstantBytearrayRef(
|
|
1102
|
+
ExpressionBytearrayShapeExactMixin, ExpressionConstantRefBase
|
|
1103
|
+
):
|
|
1104
|
+
kind = "EXPRESSION_CONSTANT_BYTEARRAY_REF"
|
|
1105
|
+
|
|
1106
|
+
def __init__(self, constant, user_provided, source_ref):
|
|
1107
|
+
ExpressionConstantRefBase.__init__(
|
|
1108
|
+
self, constant=constant, user_provided=user_provided, source_ref=source_ref
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
@staticmethod
|
|
1112
|
+
def isExpressionConstantBytearrayRef():
|
|
1113
|
+
return True
|
|
1114
|
+
|
|
1115
|
+
@staticmethod
|
|
1116
|
+
def isMutable():
|
|
1117
|
+
return True
|
|
1118
|
+
|
|
1119
|
+
@staticmethod
|
|
1120
|
+
def isIterableConstant():
|
|
1121
|
+
return True
|
|
1122
|
+
|
|
1123
|
+
def getIterationHandle(self):
|
|
1124
|
+
return ConstantBytearrayIterationHandle(self)
|
|
1125
|
+
|
|
1126
|
+
def getIterationLength(self):
|
|
1127
|
+
return len(self.constant)
|
|
1128
|
+
|
|
1129
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
1130
|
+
result = makeConstantRefNode(
|
|
1131
|
+
constant=bytes(self.constant),
|
|
1132
|
+
user_provided=self.user_provided,
|
|
1133
|
+
source_ref=self.source_ref,
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
self.parent.replaceChild(self, result)
|
|
1137
|
+
self.finalize()
|
|
1138
|
+
|
|
1139
|
+
return (
|
|
1140
|
+
iter_node,
|
|
1141
|
+
"new_constant",
|
|
1142
|
+
"""Iteration over constant bytearray lowered to bytes.""",
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
class ExpressionConstantFloatRef(
|
|
1147
|
+
ExpressionFloatShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
1148
|
+
):
|
|
1149
|
+
kind = "EXPRESSION_CONSTANT_FLOAT_REF"
|
|
1150
|
+
|
|
1151
|
+
__slots__ = ()
|
|
1152
|
+
|
|
1153
|
+
def __init__(self, constant, source_ref):
|
|
1154
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
1155
|
+
self, constant=constant, source_ref=source_ref
|
|
1156
|
+
)
|
|
1157
|
+
|
|
1158
|
+
@staticmethod
|
|
1159
|
+
def isExpressionConstantFloatRef():
|
|
1160
|
+
return True
|
|
1161
|
+
|
|
1162
|
+
@staticmethod
|
|
1163
|
+
def isMutable():
|
|
1164
|
+
return False
|
|
1165
|
+
|
|
1166
|
+
@staticmethod
|
|
1167
|
+
def isNumberConstant():
|
|
1168
|
+
return True
|
|
1169
|
+
|
|
1170
|
+
@staticmethod
|
|
1171
|
+
def isIterableConstant():
|
|
1172
|
+
return False
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
class ExpressionConstantComplexRef(
|
|
1176
|
+
ExpressionComplexShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
1177
|
+
):
|
|
1178
|
+
kind = "EXPRESSION_CONSTANT_COMPLEX_REF"
|
|
1179
|
+
|
|
1180
|
+
__slots__ = ()
|
|
1181
|
+
|
|
1182
|
+
def __init__(self, constant, source_ref):
|
|
1183
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
1184
|
+
self, constant=constant, source_ref=source_ref
|
|
1185
|
+
)
|
|
1186
|
+
|
|
1187
|
+
@staticmethod
|
|
1188
|
+
def isExpressionConstantComplexRef():
|
|
1189
|
+
return True
|
|
1190
|
+
|
|
1191
|
+
@staticmethod
|
|
1192
|
+
def isMutable():
|
|
1193
|
+
return False
|
|
1194
|
+
|
|
1195
|
+
@staticmethod
|
|
1196
|
+
def isIterableConstant():
|
|
1197
|
+
return False
|
|
1198
|
+
|
|
1199
|
+
# Overload what ExpressionComplexShapeExactMixin says, for a given instance we know all.
|
|
1200
|
+
@staticmethod
|
|
1201
|
+
def isKnownToHaveAttribute(attribute_name):
|
|
1202
|
+
return hasattr(0j, attribute_name)
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
class ExpressionConstantSliceRef(
|
|
1206
|
+
ExpressionSliceShapeExactMixin, ExpressionConstantUntrackedRefBase
|
|
1207
|
+
):
|
|
1208
|
+
kind = "EXPRESSION_CONSTANT_SLICE_REF"
|
|
1209
|
+
|
|
1210
|
+
__slots__ = ()
|
|
1211
|
+
|
|
1212
|
+
def __init__(self, constant, source_ref):
|
|
1213
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
1214
|
+
self, constant=constant, source_ref=source_ref
|
|
1215
|
+
)
|
|
1216
|
+
|
|
1217
|
+
@staticmethod
|
|
1218
|
+
def isExpressionConstantSliceRef():
|
|
1219
|
+
return True
|
|
1220
|
+
|
|
1221
|
+
@staticmethod
|
|
1222
|
+
def isMutable():
|
|
1223
|
+
return False
|
|
1224
|
+
|
|
1225
|
+
@staticmethod
|
|
1226
|
+
def isIterableConstant():
|
|
1227
|
+
return False
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
class ExpressionConstantXrangeRef(ExpressionConstantUntrackedRefBase):
|
|
1231
|
+
kind = "EXPRESSION_CONSTANT_XRANGE_REF"
|
|
1232
|
+
|
|
1233
|
+
__slots__ = ()
|
|
1234
|
+
|
|
1235
|
+
def __init__(self, constant, source_ref):
|
|
1236
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
1237
|
+
self, constant=constant, source_ref=source_ref
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
@staticmethod
|
|
1241
|
+
def isExpressionConstantXrangeRef():
|
|
1242
|
+
return True
|
|
1243
|
+
|
|
1244
|
+
@staticmethod
|
|
1245
|
+
def getTypeShape():
|
|
1246
|
+
return tshape_xrange
|
|
1247
|
+
|
|
1248
|
+
@staticmethod
|
|
1249
|
+
def isMutable():
|
|
1250
|
+
return False
|
|
1251
|
+
|
|
1252
|
+
@staticmethod
|
|
1253
|
+
def isKnownToBeHashable():
|
|
1254
|
+
return True
|
|
1255
|
+
|
|
1256
|
+
@staticmethod
|
|
1257
|
+
def isIterableConstant():
|
|
1258
|
+
return True
|
|
1259
|
+
|
|
1260
|
+
def getIterationHandle(self):
|
|
1261
|
+
return ConstantRangeIterationHandle(self)
|
|
1262
|
+
|
|
1263
|
+
def getIterationLength(self):
|
|
1264
|
+
return len(self.constant)
|
|
1265
|
+
|
|
1266
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
1267
|
+
# Note: xrange are as good as it gets.
|
|
1268
|
+
return iter_node, None, None
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
class ExpressionConstantTypeRef(ExpressionConstantUntrackedRefBase):
|
|
1272
|
+
kind = "EXPRESSION_CONSTANT_TYPE_REF"
|
|
1273
|
+
|
|
1274
|
+
__slots__ = ()
|
|
1275
|
+
|
|
1276
|
+
@staticmethod
|
|
1277
|
+
def isExpressionConstantTypeRef():
|
|
1278
|
+
return True
|
|
1279
|
+
|
|
1280
|
+
@staticmethod
|
|
1281
|
+
def getTypeShape():
|
|
1282
|
+
return tshape_type
|
|
1283
|
+
|
|
1284
|
+
def computeExpressionCall(self, call_node, call_args, call_kw, trace_collection):
|
|
1285
|
+
# Anything may happen. On next pass, if replaced, we might be better
|
|
1286
|
+
# but not now.
|
|
1287
|
+
trace_collection.onExceptionRaiseExit(BaseException)
|
|
1288
|
+
|
|
1289
|
+
if call_kw is not None and not call_kw.isMappingWithConstantStringKeys():
|
|
1290
|
+
return call_node, None, None
|
|
1291
|
+
else:
|
|
1292
|
+
from nuitka.optimizations.OptimizeBuiltinCalls import (
|
|
1293
|
+
computeBuiltinCall,
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
new_node, tags, message = computeBuiltinCall(
|
|
1297
|
+
builtin_name=self.constant.__name__, call_node=call_node
|
|
1298
|
+
)
|
|
1299
|
+
|
|
1300
|
+
return new_node, tags, message
|
|
1301
|
+
|
|
1302
|
+
def computeExpressionCallViaVariable(
|
|
1303
|
+
self, call_node, variable_ref_node, call_args, call_kw, trace_collection
|
|
1304
|
+
):
|
|
1305
|
+
return self.computeExpressionCall(
|
|
1306
|
+
call_node=call_node,
|
|
1307
|
+
call_args=call_args,
|
|
1308
|
+
call_kw=call_kw,
|
|
1309
|
+
trace_collection=trace_collection,
|
|
1310
|
+
)
|
|
1311
|
+
|
|
1312
|
+
@staticmethod
|
|
1313
|
+
def isMutable():
|
|
1314
|
+
return False
|
|
1315
|
+
|
|
1316
|
+
@staticmethod
|
|
1317
|
+
def isKnownToBeHashable():
|
|
1318
|
+
return True
|
|
1319
|
+
|
|
1320
|
+
@staticmethod
|
|
1321
|
+
def isIterableConstant():
|
|
1322
|
+
return False
|
|
1323
|
+
|
|
1324
|
+
@staticmethod
|
|
1325
|
+
def getTruthValue():
|
|
1326
|
+
return True
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
class ExpressionConstantTypeSubscriptableMixin(object):
|
|
1330
|
+
__slots__ = ()
|
|
1331
|
+
|
|
1332
|
+
if python_version >= 0x390:
|
|
1333
|
+
|
|
1334
|
+
def computeExpressionSubscript(self, lookup_node, subscript, trace_collection):
|
|
1335
|
+
if subscript.isCompileTimeConstant():
|
|
1336
|
+
return trace_collection.getCompileTimeComputationResult(
|
|
1337
|
+
node=lookup_node,
|
|
1338
|
+
computation=lambda: self.getCompileTimeConstant()[
|
|
1339
|
+
subscript.getCompileTimeConstant()
|
|
1340
|
+
],
|
|
1341
|
+
description="Subscript of subscriptable type with constant value.",
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
# TODO: Not true, in fact these should become GenericAlias always.
|
|
1345
|
+
trace_collection.onExceptionRaiseExit(BaseException)
|
|
1346
|
+
|
|
1347
|
+
return lookup_node, None, None
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
class ExpressionConstantConcreteTypeMixin(object):
|
|
1351
|
+
__slots__ = ()
|
|
1352
|
+
|
|
1353
|
+
@staticmethod
|
|
1354
|
+
def getDetails():
|
|
1355
|
+
return {}
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
class ExpressionConstantTypeDictRef(
|
|
1359
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1360
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1361
|
+
ExpressionConstantTypeRef,
|
|
1362
|
+
):
|
|
1363
|
+
kind = "EXPRESSION_CONSTANT_TYPE_DICT_REF"
|
|
1364
|
+
|
|
1365
|
+
def __init__(self, source_ref):
|
|
1366
|
+
ExpressionConstantTypeRef.__init__(self, constant=dict, source_ref=source_ref)
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
class ExpressionConstantTypeSetRef(
|
|
1370
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1371
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1372
|
+
ExpressionConstantTypeRef,
|
|
1373
|
+
):
|
|
1374
|
+
kind = "EXPRESSION_CONSTANT_TYPE_SET_REF"
|
|
1375
|
+
|
|
1376
|
+
def __init__(self, source_ref):
|
|
1377
|
+
ExpressionConstantTypeRef.__init__(self, constant=set, source_ref=source_ref)
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
class ExpressionConstantTypeFrozensetRef(
|
|
1381
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1382
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1383
|
+
ExpressionConstantTypeRef,
|
|
1384
|
+
):
|
|
1385
|
+
kind = "EXPRESSION_CONSTANT_TYPE_FROZENSET_REF"
|
|
1386
|
+
|
|
1387
|
+
def __init__(self, source_ref):
|
|
1388
|
+
ExpressionConstantTypeRef.__init__(
|
|
1389
|
+
self, constant=frozenset, source_ref=source_ref
|
|
1390
|
+
)
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
class ExpressionConstantTypeListRef(
|
|
1394
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1395
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1396
|
+
ExpressionConstantTypeRef,
|
|
1397
|
+
):
|
|
1398
|
+
kind = "EXPRESSION_CONSTANT_TYPE_LIST_REF"
|
|
1399
|
+
|
|
1400
|
+
def __init__(self, source_ref):
|
|
1401
|
+
ExpressionConstantTypeRef.__init__(self, constant=list, source_ref=source_ref)
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
class ExpressionConstantTypeTupleRef(
|
|
1405
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1406
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1407
|
+
ExpressionConstantTypeRef,
|
|
1408
|
+
):
|
|
1409
|
+
kind = "EXPRESSION_CONSTANT_TYPE_TUPLE_REF"
|
|
1410
|
+
|
|
1411
|
+
def __init__(self, source_ref):
|
|
1412
|
+
ExpressionConstantTypeRef.__init__(self, constant=tuple, source_ref=source_ref)
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
class ExpressionConstantTypeTypeRef(
|
|
1416
|
+
ExpressionConstantConcreteTypeMixin,
|
|
1417
|
+
ExpressionConstantTypeSubscriptableMixin,
|
|
1418
|
+
ExpressionConstantTypeRef,
|
|
1419
|
+
):
|
|
1420
|
+
kind = "EXPRESSION_CONSTANT_TYPE_TYPE_REF"
|
|
1421
|
+
|
|
1422
|
+
def __init__(self, source_ref):
|
|
1423
|
+
ExpressionConstantTypeRef.__init__(self, constant=type, source_ref=source_ref)
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
def makeConstantRefNode(constant, source_ref, user_provided=False):
|
|
1427
|
+
# This is dispatching per constant value and types, every case
|
|
1428
|
+
# to be a return statement, pylint: disable=too-many-branches,too-many-return-statements,too-many-statements
|
|
1429
|
+
|
|
1430
|
+
# Dispatch based on constants first.
|
|
1431
|
+
if constant is None:
|
|
1432
|
+
return ExpressionConstantNoneRef(source_ref=source_ref)
|
|
1433
|
+
elif constant is True:
|
|
1434
|
+
return ExpressionConstantTrueRef(source_ref=source_ref)
|
|
1435
|
+
elif constant is False:
|
|
1436
|
+
return ExpressionConstantFalseRef(source_ref=source_ref)
|
|
1437
|
+
elif constant is Ellipsis:
|
|
1438
|
+
return ExpressionConstantEllipsisRef(source_ref=source_ref)
|
|
1439
|
+
|
|
1440
|
+
# Next, dispatch based on type.
|
|
1441
|
+
constant_type = type(constant)
|
|
1442
|
+
|
|
1443
|
+
if constant_type is int:
|
|
1444
|
+
return ExpressionConstantIntRef(constant=constant, source_ref=source_ref)
|
|
1445
|
+
elif constant_type is str:
|
|
1446
|
+
if constant:
|
|
1447
|
+
return ExpressionConstantStrRef(
|
|
1448
|
+
constant=constant,
|
|
1449
|
+
user_provided=user_provided,
|
|
1450
|
+
source_ref=source_ref,
|
|
1451
|
+
)
|
|
1452
|
+
else:
|
|
1453
|
+
return ExpressionConstantStrEmptyRef(
|
|
1454
|
+
user_provided=user_provided,
|
|
1455
|
+
source_ref=source_ref,
|
|
1456
|
+
)
|
|
1457
|
+
elif constant_type is float:
|
|
1458
|
+
return ExpressionConstantFloatRef(constant=constant, source_ref=source_ref)
|
|
1459
|
+
elif constant_type is long:
|
|
1460
|
+
return ExpressionConstantLongRef(
|
|
1461
|
+
constant=constant,
|
|
1462
|
+
user_provided=user_provided,
|
|
1463
|
+
source_ref=source_ref,
|
|
1464
|
+
)
|
|
1465
|
+
elif constant_type is unicode:
|
|
1466
|
+
if constant:
|
|
1467
|
+
return ExpressionConstantUnicodeRef(
|
|
1468
|
+
constant=constant,
|
|
1469
|
+
user_provided=user_provided,
|
|
1470
|
+
source_ref=source_ref,
|
|
1471
|
+
)
|
|
1472
|
+
else:
|
|
1473
|
+
return ExpressionConstantUnicodeEmptyRef(
|
|
1474
|
+
user_provided=user_provided,
|
|
1475
|
+
source_ref=source_ref,
|
|
1476
|
+
)
|
|
1477
|
+
elif constant_type is bytes:
|
|
1478
|
+
if constant:
|
|
1479
|
+
return ExpressionConstantBytesRef(
|
|
1480
|
+
constant=constant,
|
|
1481
|
+
user_provided=user_provided,
|
|
1482
|
+
source_ref=source_ref,
|
|
1483
|
+
)
|
|
1484
|
+
else:
|
|
1485
|
+
return ExpressionConstantBytesEmptyRef(
|
|
1486
|
+
user_provided=user_provided,
|
|
1487
|
+
source_ref=source_ref,
|
|
1488
|
+
)
|
|
1489
|
+
elif constant_type is dict:
|
|
1490
|
+
if constant:
|
|
1491
|
+
assert isConstant(constant), repr(constant)
|
|
1492
|
+
|
|
1493
|
+
return ExpressionConstantDictRef(
|
|
1494
|
+
constant=constant,
|
|
1495
|
+
user_provided=user_provided,
|
|
1496
|
+
source_ref=source_ref,
|
|
1497
|
+
)
|
|
1498
|
+
else:
|
|
1499
|
+
return ExpressionConstantDictEmptyRef(
|
|
1500
|
+
user_provided=user_provided,
|
|
1501
|
+
source_ref=source_ref,
|
|
1502
|
+
)
|
|
1503
|
+
elif constant_type is tuple:
|
|
1504
|
+
if constant:
|
|
1505
|
+
assert isConstant(constant), repr(constant)
|
|
1506
|
+
|
|
1507
|
+
if isMutable(constant):
|
|
1508
|
+
return ExpressionConstantTupleMutableRef(
|
|
1509
|
+
constant=constant,
|
|
1510
|
+
user_provided=user_provided,
|
|
1511
|
+
source_ref=source_ref,
|
|
1512
|
+
)
|
|
1513
|
+
else:
|
|
1514
|
+
return ExpressionConstantTupleRef(
|
|
1515
|
+
constant=constant,
|
|
1516
|
+
user_provided=user_provided,
|
|
1517
|
+
source_ref=source_ref,
|
|
1518
|
+
)
|
|
1519
|
+
else:
|
|
1520
|
+
return ExpressionConstantTupleEmptyRef(
|
|
1521
|
+
user_provided=user_provided,
|
|
1522
|
+
source_ref=source_ref,
|
|
1523
|
+
)
|
|
1524
|
+
elif constant_type is list:
|
|
1525
|
+
if constant:
|
|
1526
|
+
assert isConstant(constant), repr(constant)
|
|
1527
|
+
|
|
1528
|
+
return ExpressionConstantListRef(
|
|
1529
|
+
constant=constant,
|
|
1530
|
+
user_provided=user_provided,
|
|
1531
|
+
source_ref=source_ref,
|
|
1532
|
+
)
|
|
1533
|
+
else:
|
|
1534
|
+
return ExpressionConstantListEmptyRef(
|
|
1535
|
+
user_provided=user_provided,
|
|
1536
|
+
source_ref=source_ref,
|
|
1537
|
+
)
|
|
1538
|
+
elif constant_type is set:
|
|
1539
|
+
if constant:
|
|
1540
|
+
assert isConstant(constant), repr(constant)
|
|
1541
|
+
|
|
1542
|
+
return ExpressionConstantSetRef(
|
|
1543
|
+
constant=constant,
|
|
1544
|
+
user_provided=user_provided,
|
|
1545
|
+
source_ref=source_ref,
|
|
1546
|
+
)
|
|
1547
|
+
else:
|
|
1548
|
+
return ExpressionConstantSetEmptyRef(
|
|
1549
|
+
user_provided=user_provided,
|
|
1550
|
+
source_ref=source_ref,
|
|
1551
|
+
)
|
|
1552
|
+
elif constant_type is frozenset:
|
|
1553
|
+
if constant:
|
|
1554
|
+
assert isConstant(constant), repr(constant)
|
|
1555
|
+
|
|
1556
|
+
return ExpressionConstantFrozensetRef(
|
|
1557
|
+
constant=constant,
|
|
1558
|
+
user_provided=user_provided,
|
|
1559
|
+
source_ref=source_ref,
|
|
1560
|
+
)
|
|
1561
|
+
else:
|
|
1562
|
+
return ExpressionConstantFrozensetEmptyRef(
|
|
1563
|
+
user_provided=user_provided,
|
|
1564
|
+
source_ref=source_ref,
|
|
1565
|
+
)
|
|
1566
|
+
elif constant_type is complex:
|
|
1567
|
+
return ExpressionConstantComplexRef(
|
|
1568
|
+
constant=constant,
|
|
1569
|
+
source_ref=source_ref,
|
|
1570
|
+
)
|
|
1571
|
+
elif constant_type is slice:
|
|
1572
|
+
return ExpressionConstantSliceRef(
|
|
1573
|
+
constant=constant,
|
|
1574
|
+
source_ref=source_ref,
|
|
1575
|
+
)
|
|
1576
|
+
elif constant_type is type:
|
|
1577
|
+
if constant is dict:
|
|
1578
|
+
return ExpressionConstantTypeDictRef(source_ref=source_ref)
|
|
1579
|
+
if constant is set:
|
|
1580
|
+
return ExpressionConstantTypeSetRef(source_ref=source_ref)
|
|
1581
|
+
if constant is frozenset:
|
|
1582
|
+
return ExpressionConstantTypeFrozensetRef(source_ref=source_ref)
|
|
1583
|
+
if constant is tuple:
|
|
1584
|
+
return ExpressionConstantTypeTupleRef(source_ref=source_ref)
|
|
1585
|
+
if constant is list:
|
|
1586
|
+
return ExpressionConstantTypeListRef(source_ref=source_ref)
|
|
1587
|
+
if constant is type:
|
|
1588
|
+
return ExpressionConstantTypeTypeRef(source_ref=source_ref)
|
|
1589
|
+
|
|
1590
|
+
# TODO: Need to get rid of these, and be sure we have complete coverage for
|
|
1591
|
+
# code generation of all types. This lets constants be created that may not
|
|
1592
|
+
# work. Needed for isExperimental("assume-type-complete") to be workable.
|
|
1593
|
+
return ExpressionConstantTypeRef(constant=constant, source_ref=source_ref)
|
|
1594
|
+
elif constant_type is xrange:
|
|
1595
|
+
return ExpressionConstantXrangeRef(
|
|
1596
|
+
constant=constant,
|
|
1597
|
+
source_ref=source_ref,
|
|
1598
|
+
)
|
|
1599
|
+
elif constant_type is bytearray:
|
|
1600
|
+
return ExpressionConstantBytearrayRef(
|
|
1601
|
+
constant=constant,
|
|
1602
|
+
user_provided=user_provided,
|
|
1603
|
+
source_ref=source_ref,
|
|
1604
|
+
)
|
|
1605
|
+
elif constant_type is GenericAlias:
|
|
1606
|
+
from .BuiltinTypeNodes import ExpressionConstantGenericAlias
|
|
1607
|
+
|
|
1608
|
+
return ExpressionConstantGenericAlias(
|
|
1609
|
+
generic_alias=constant, source_ref=source_ref
|
|
1610
|
+
)
|
|
1611
|
+
elif constant_type is UnionType:
|
|
1612
|
+
from .BuiltinTypeNodes import ExpressionConstantUnionType
|
|
1613
|
+
|
|
1614
|
+
return ExpressionConstantUnionType(union_type=constant, source_ref=source_ref)
|
|
1615
|
+
elif constant is sys.version_info:
|
|
1616
|
+
return ExpressionConstantSysVersionInfoRef(source_ref=source_ref)
|
|
1617
|
+
elif constant in builtin_anon_values:
|
|
1618
|
+
from .BuiltinRefNodes import ExpressionBuiltinAnonymousRef
|
|
1619
|
+
|
|
1620
|
+
return ExpressionBuiltinAnonymousRef(
|
|
1621
|
+
builtin_name=builtin_anon_values[constant],
|
|
1622
|
+
source_ref=source_ref,
|
|
1623
|
+
)
|
|
1624
|
+
elif constant in builtin_named_values:
|
|
1625
|
+
from .BuiltinRefNodes import ExpressionBuiltinRef
|
|
1626
|
+
|
|
1627
|
+
return ExpressionBuiltinRef(
|
|
1628
|
+
builtin_name=builtin_named_values[constant], source_ref=source_ref
|
|
1629
|
+
)
|
|
1630
|
+
elif constant in builtin_exception_values_list:
|
|
1631
|
+
from .BuiltinRefNodes import ExpressionBuiltinExceptionRef
|
|
1632
|
+
|
|
1633
|
+
if constant is NotImplemented:
|
|
1634
|
+
exception_name = "NotImplemented"
|
|
1635
|
+
else:
|
|
1636
|
+
exception_name = constant.__name__
|
|
1637
|
+
|
|
1638
|
+
return ExpressionBuiltinExceptionRef(
|
|
1639
|
+
exception_name=exception_name, source_ref=source_ref
|
|
1640
|
+
)
|
|
1641
|
+
else:
|
|
1642
|
+
# Missing constant type, ought to not happen, please report.
|
|
1643
|
+
assert False, (constant, constant_type)
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
class ExpressionConstantSysVersionInfoRef(ExpressionConstantUntrackedRefBase):
|
|
1647
|
+
kind = "EXPRESSION_CONSTANT_SYS_VERSION_INFO_REF"
|
|
1648
|
+
|
|
1649
|
+
__slots__ = ()
|
|
1650
|
+
|
|
1651
|
+
def __init__(self, source_ref):
|
|
1652
|
+
ExpressionConstantUntrackedRefBase.__init__(
|
|
1653
|
+
self, constant=sys.version_info, source_ref=source_ref
|
|
1654
|
+
)
|
|
1655
|
+
|
|
1656
|
+
@staticmethod
|
|
1657
|
+
def getDetails():
|
|
1658
|
+
return {}
|
|
1659
|
+
|
|
1660
|
+
@staticmethod
|
|
1661
|
+
def getTypeShape():
|
|
1662
|
+
return tshape_namedtuple
|
|
1663
|
+
|
|
1664
|
+
@staticmethod
|
|
1665
|
+
def isMutable():
|
|
1666
|
+
return False
|
|
1667
|
+
|
|
1668
|
+
@staticmethod
|
|
1669
|
+
def isKnownToBeHashable():
|
|
1670
|
+
return True
|
|
1671
|
+
|
|
1672
|
+
@staticmethod
|
|
1673
|
+
def isIterableConstant():
|
|
1674
|
+
return True
|
|
1675
|
+
|
|
1676
|
+
def getIterationHandle(self):
|
|
1677
|
+
return ConstantTupleIterationHandle(self)
|
|
1678
|
+
|
|
1679
|
+
def getIterationLength(self):
|
|
1680
|
+
return len(self.constant)
|
|
1681
|
+
|
|
1682
|
+
def computeExpressionIter1(self, iter_node, trace_collection):
|
|
1683
|
+
# For iteration, we are just a normal tuple.
|
|
1684
|
+
result = makeConstantRefNode(
|
|
1685
|
+
constant=tuple(self.constant),
|
|
1686
|
+
user_provided=True,
|
|
1687
|
+
source_ref=self.source_ref,
|
|
1688
|
+
)
|
|
1689
|
+
|
|
1690
|
+
self.parent.replaceChild(self, result)
|
|
1691
|
+
self.finalize()
|
|
1692
|
+
|
|
1693
|
+
return (
|
|
1694
|
+
iter_node,
|
|
1695
|
+
"new_constant",
|
|
1696
|
+
"""Iteration over constant 'sys.version_info' lowered to tuple.""",
|
|
1697
|
+
)
|
|
1698
|
+
|
|
1699
|
+
@staticmethod
|
|
1700
|
+
def getTruthValue():
|
|
1701
|
+
return True
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
1705
|
+
# integrates with CPython, but also works on its own.
|
|
1706
|
+
#
|
|
1707
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
1708
|
+
# you may not use this file except in compliance with the License.
|
|
1709
|
+
# You may obtain a copy of the License at
|
|
1710
|
+
#
|
|
1711
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
1712
|
+
#
|
|
1713
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
1714
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
1715
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1716
|
+
# See the License for the specific language governing permissions and
|
|
1717
|
+
# limitations under the License.
|