Nuitka-winsvc 2.5.6__cp311-cp311-win_amd64.whl → 2.6.5__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Nuitka-winsvc might be problematic. Click here for more details.
- {Nuitka_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka-run.cmd +1 -1
- {Nuitka_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka.cmd +1 -1
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/METADATA +36 -24
- Nuitka_winsvc-2.6.5.dist-info/RECORD +992 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +1 -1
- nuitka/BytecodeCaching.py +15 -4
- nuitka/Bytecodes.py +1 -1
- nuitka/CacheCleanup.py +1 -1
- nuitka/Constants.py +1 -1
- nuitka/Errors.py +1 -1
- nuitka/HardImportRegistry.py +1 -1
- nuitka/MainControl.py +93 -94
- nuitka/ModuleRegistry.py +19 -4
- nuitka/OptionParsing.py +86 -17
- nuitka/Options.py +230 -106
- nuitka/OutputDirectories.py +5 -3
- nuitka/PostProcessing.py +76 -27
- nuitka/Progress.py +1 -1
- nuitka/PythonFlavors.py +24 -3
- nuitka/PythonOperators.py +1 -1
- nuitka/PythonVersions.py +8 -4
- nuitka/Serialization.py +1 -1
- nuitka/SourceCodeReferences.py +1 -1
- nuitka/Tracing.py +2 -1
- nuitka/TreeXML.py +1 -1
- nuitka/Variables.py +1 -1
- nuitka/Version.py +2 -2
- nuitka/__init__.py +1 -1
- nuitka/__main__.py +4 -1
- nuitka/__past__.py +1 -1
- nuitka/build/Backend.scons +44 -66
- nuitka/build/CCompilerVersion.scons +2 -1
- nuitka/build/DataComposerInterface.py +2 -1
- nuitka/build/Offsets.scons +644 -0
- nuitka/build/Onefile.scons +5 -13
- nuitka/build/SconsCaching.py +9 -7
- nuitka/build/SconsCompilerSettings.py +57 -35
- nuitka/build/SconsHacks.py +3 -3
- nuitka/build/SconsInterface.py +86 -58
- nuitka/build/SconsProgress.py +12 -5
- nuitka/build/SconsSpawn.py +3 -3
- nuitka/build/SconsUtils.py +20 -1
- nuitka/build/__init__.py +1 -1
- nuitka/build/include/nuitka/allocator.h +3 -1
- nuitka/build/include/nuitka/builtins.h +1 -1
- nuitka/build/include/nuitka/calling.h +1 -1
- nuitka/build/include/nuitka/checkers.h +1 -1
- nuitka/build/include/nuitka/checksum_tools.h +1 -1
- nuitka/build/include/nuitka/compiled_asyncgen.h +4 -2
- nuitka/build/include/nuitka/compiled_cell.h +1 -1
- nuitka/build/include/nuitka/compiled_coroutine.h +3 -2
- nuitka/build/include/nuitka/compiled_frame.h +6 -13
- nuitka/build/include/nuitka/compiled_function.h +2 -3
- nuitka/build/include/nuitka/compiled_generator.h +3 -2
- nuitka/build/include/nuitka/compiled_method.h +1 -1
- nuitka/build/include/nuitka/constants.h +5 -1
- nuitka/build/include/nuitka/constants_blob.h +1 -1
- nuitka/build/include/nuitka/debug_settings.h +1 -1
- nuitka/build/include/nuitka/environment_variables.h +1 -1
- nuitka/build/include/nuitka/environment_variables_system.h +1 -1
- nuitka/build/include/nuitka/exception_groups.h +1 -1
- nuitka/build/include/nuitka/exceptions.h +2 -2
- nuitka/build/include/nuitka/filesystem_paths.h +4 -1
- nuitka/build/include/nuitka/freelists.h +2 -2
- nuitka/build/include/nuitka/helper/attributes.h +1 -1
- nuitka/build/include/nuitka/helper/boolean.h +1 -1
- nuitka/build/include/nuitka/helper/bytearrays.h +1 -1
- nuitka/build/include/nuitka/helper/bytes.h +1 -1
- nuitka/build/include/nuitka/helper/calling_generated.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ne.h +1 -1
- nuitka/build/include/nuitka/helper/complex.h +1 -1
- nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
- nuitka/build/include/nuitka/helper/floats.h +1 -1
- nuitka/build/include/nuitka/helper/import_hard.h +1 -1
- nuitka/build/include/nuitka/helper/indexes.h +1 -1
- nuitka/build/include/nuitka/helper/ints.h +1 -1
- nuitka/build/include/nuitka/helper/iterators.h +1 -1
- nuitka/build/include/nuitka/helper/lists.h +1 -1
- nuitka/build/include/nuitka/helper/lists_generated.h +1 -1
- nuitka/build/include/nuitka/helper/mappings.h +1 -1
- nuitka/build/include/nuitka/helper/operations.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/raising.h +1 -1
- nuitka/build/include/nuitka/helper/rangeobjects.h +1 -1
- nuitka/build/include/nuitka/helper/richcomparisons.h +1 -1
- nuitka/build/include/nuitka/helper/sequences.h +1 -1
- nuitka/build/include/nuitka/helper/sets.h +1 -1
- nuitka/build/include/nuitka/helper/slices.h +1 -1
- nuitka/build/include/nuitka/helper/strings.h +1 -1
- nuitka/build/include/nuitka/helper/subscripts.h +1 -1
- nuitka/build/include/nuitka/helper/tuples.h +1 -1
- nuitka/build/include/nuitka/helpers.h +1 -43
- nuitka/build/include/nuitka/importing.h +1 -1
- nuitka/build/include/nuitka/jit_sources.h +1 -1
- nuitka/build/include/nuitka/prelude.h +10 -10
- nuitka/build/include/nuitka/printing.h +1 -1
- nuitka/build/include/nuitka/python_pgo.h +1 -1
- nuitka/build/include/nuitka/safe_string_ops.h +1 -1
- nuitka/build/include/nuitka/threading.h +1 -1
- nuitka/build/include/nuitka/tracing.h +1 -1
- nuitka/build/include/nuitka/type_aliases.h +2 -2
- nuitka/build/include/nuitka/unfreezing.h +1 -1
- 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/static_src/CompiledAsyncgenType.c +80 -75
- nuitka/build/static_src/CompiledCellType.c +2 -1
- nuitka/build/static_src/CompiledCodeHelpers.c +10 -28
- nuitka/build/static_src/CompiledCoroutineType.c +30 -40
- nuitka/build/static_src/CompiledFrameType.c +63 -5
- nuitka/build/static_src/CompiledFunctionType.c +11 -13
- nuitka/build/static_src/CompiledGeneratorType.c +56 -13
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +1 -1
- nuitka/build/static_src/CompiledMethodType.c +2 -1
- nuitka/build/static_src/GenerateHeadersMain.c +30 -0
- nuitka/build/static_src/HelpersAllocator.c +1 -1
- nuitka/build/static_src/HelpersAttributes.c +5 -2
- nuitka/build/static_src/HelpersBuiltin.c +1 -1
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +1 -1
- nuitka/build/static_src/HelpersBytes.c +1 -1
- nuitka/build/static_src/HelpersCalling.c +1 -1
- nuitka/build/static_src/HelpersCallingGenerated.c +6 -16
- nuitka/build/static_src/HelpersChecksumTools.c +1 -1
- nuitka/build/static_src/HelpersClasses.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualNe.c +1 -1
- nuitka/build/static_src/HelpersComparisonEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
- nuitka/build/static_src/HelpersComparisonGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonNe.c +1 -1
- nuitka/build/static_src/HelpersConsole.c +2 -2
- nuitka/build/static_src/HelpersConstantsBlob.c +199 -50
- nuitka/build/static_src/HelpersDeepcopy.c +3 -1
- nuitka/build/static_src/HelpersDictionaries.c +1 -1
- nuitka/build/static_src/HelpersDictionariesGenerated.c +1 -1
- nuitka/build/static_src/HelpersDumpBacktraces.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariables.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +1 -1
- nuitka/build/static_src/HelpersExceptions.c +1 -1
- nuitka/build/static_src/HelpersFiles.c +18 -10
- nuitka/build/static_src/HelpersFilesystemPaths.c +36 -16
- nuitka/build/static_src/HelpersFloats.c +1 -1
- nuitka/build/static_src/HelpersHeapStorage.c +1 -1
- nuitka/build/static_src/HelpersImport.c +1 -1
- nuitka/build/static_src/HelpersImportHard.c +1 -1
- nuitka/build/static_src/HelpersJitSources.c +1 -1
- nuitka/build/static_src/HelpersLists.c +2 -1
- nuitka/build/static_src/HelpersListsGenerated.c +1 -1
- nuitka/build/static_src/HelpersMappings.c +1 -1
- nuitka/build/static_src/HelpersMatching.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPow.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinarySub.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMod.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplacePow.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceSub.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +1 -1
- nuitka/build/static_src/HelpersProfiling.c +1 -1
- nuitka/build/static_src/HelpersPythonPgo.c +5 -2
- nuitka/build/static_src/HelpersRaising.c +1 -1
- nuitka/build/static_src/HelpersSafeStrings.c +1 -1
- nuitka/build/static_src/HelpersSequences.c +1 -1
- nuitka/build/static_src/HelpersSlices.c +1 -1
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +1 -1
- nuitka/build/static_src/HelpersTypes.c +5 -5
- nuitka/build/static_src/InspectPatcher.c +2 -1
- nuitka/build/static_src/MainProgram.c +30 -6
- nuitka/build/static_src/MetaPathBasedLoader.c +19 -11
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +17 -4
- nuitka/build/static_src/OnefileBootstrap.c +6 -4
- nuitka/build/static_src/OnefileSplashScreen.cpp +1 -1
- nuitka/code_generation/AsyncgenCodes.py +5 -6
- nuitka/code_generation/AttributeCodes.py +1 -1
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +1 -1
- nuitka/code_generation/BranchCodes.py +1 -1
- nuitka/code_generation/BuiltinCodes.py +15 -5
- nuitka/code_generation/CallCodes.py +1 -1
- nuitka/code_generation/ClassCodes.py +1 -1
- nuitka/code_generation/CodeGeneration.py +23 -17
- nuitka/code_generation/CodeHelperSelection.py +1 -1
- nuitka/code_generation/CodeHelpers.py +1 -1
- nuitka/code_generation/CodeObjectCodes.py +19 -2
- nuitka/code_generation/ComparisonCodes.py +1 -1
- nuitka/code_generation/ComparisonHelperDefinitions.py +1 -1
- nuitka/code_generation/ConditionalCodes.py +1 -1
- nuitka/code_generation/ConstantCodes.py +1 -1
- nuitka/code_generation/Contexts.py +52 -39
- nuitka/code_generation/CoroutineCodes.py +4 -5
- nuitka/code_generation/CtypesCodes.py +1 -1
- nuitka/code_generation/DictCodes.py +1 -1
- nuitka/code_generation/Emission.py +1 -1
- nuitka/code_generation/ErrorCodes.py +1 -1
- nuitka/code_generation/EvalCodes.py +1 -1
- nuitka/code_generation/ExceptionCodes.py +1 -1
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -1
- nuitka/code_generation/ExpressionCodes.py +1 -1
- nuitka/code_generation/FrameCodes.py +26 -17
- nuitka/code_generation/FunctionCodes.py +9 -15
- nuitka/code_generation/GeneratorCodes.py +9 -10
- nuitka/code_generation/GlobalConstants.py +6 -4
- nuitka/code_generation/GlobalsLocalsCodes.py +1 -1
- nuitka/code_generation/IdCodes.py +1 -1
- nuitka/code_generation/ImportCodes.py +1 -1
- nuitka/code_generation/Indentation.py +1 -1
- nuitka/code_generation/IndexCodes.py +1 -1
- nuitka/code_generation/InjectCCodes.py +1 -1
- nuitka/code_generation/IntegerCodes.py +1 -1
- nuitka/code_generation/IteratorCodes.py +1 -1
- nuitka/code_generation/JitCodes.py +1 -1
- nuitka/code_generation/LabelCodes.py +1 -1
- nuitka/code_generation/LineNumberCodes.py +1 -1
- nuitka/code_generation/ListCodes.py +1 -1
- nuitka/code_generation/LoaderCodes.py +1 -1
- nuitka/code_generation/LocalsDictCodes.py +1 -1
- nuitka/code_generation/LoopCodes.py +1 -1
- nuitka/code_generation/MatchCodes.py +1 -1
- nuitka/code_generation/ModuleCodes.py +31 -4
- nuitka/code_generation/Namify.py +4 -1
- nuitka/code_generation/NetworkxCodes.py +1 -1
- nuitka/code_generation/OperationCodes.py +1 -1
- nuitka/code_generation/PackageResourceCodes.py +4 -10
- nuitka/code_generation/PrintCodes.py +1 -1
- nuitka/code_generation/PythonAPICodes.py +1 -1
- nuitka/code_generation/RaisingCodes.py +1 -1
- nuitka/code_generation/Reports.py +1 -1
- nuitka/code_generation/ReturnCodes.py +1 -1
- nuitka/code_generation/SetCodes.py +1 -1
- nuitka/code_generation/SliceCodes.py +1 -1
- nuitka/code_generation/StringCodes.py +1 -1
- nuitka/code_generation/SubscriptCodes.py +1 -1
- nuitka/code_generation/TensorflowCodes.py +1 -1
- nuitka/code_generation/TryCodes.py +1 -1
- nuitka/code_generation/TupleCodes.py +1 -1
- nuitka/code_generation/TypeAliasCodes.py +4 -3
- nuitka/code_generation/VariableCodes.py +1 -1
- nuitka/code_generation/VariableDeclarations.py +1 -1
- nuitka/code_generation/YieldCodes.py +1 -1
- nuitka/code_generation/__init__.py +1 -1
- nuitka/code_generation/c_types/CTypeBases.py +1 -1
- nuitka/code_generation/c_types/CTypeBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeCFloats.py +1 -1
- nuitka/code_generation/c_types/CTypeCLongs.py +1 -1
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +1 -1
- nuitka/code_generation/c_types/CTypeVoids.py +1 -1
- nuitka/code_generation/c_types/__init__.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesConstants.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesFrames.py +21 -25
- nuitka/code_generation/templates/CodeTemplatesFunction.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +3 -3
- nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesLoader.py +26 -3
- nuitka/code_generation/templates/CodeTemplatesModules.py +21 -8
- nuitka/code_generation/templates/CodeTemplatesVariables.py +1 -1
- nuitka/code_generation/templates/TemplateDebugWrapper.py +1 -1
- nuitka/code_generation/templates/__init__.py +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +21 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +1 -1
- nuitka/containers/Namedtuples.py +1 -1
- nuitka/containers/OrderedSetsFallback.py +1 -1
- nuitka/containers/__init__.py +1 -1
- nuitka/distutils/Build.py +1 -1
- nuitka/distutils/DistutilCommands.py +2 -2
- nuitka/distutils/__init__.py +1 -1
- nuitka/finalizations/Finalization.py +1 -1
- nuitka/finalizations/FinalizeMarkups.py +1 -1
- nuitka/finalizations/__init__.py +1 -1
- nuitka/freezer/DependsExe.py +2 -1
- nuitka/freezer/DllDependenciesCommon.py +1 -1
- nuitka/freezer/DllDependenciesMacOS.py +8 -3
- nuitka/freezer/DllDependenciesPosix.py +23 -4
- nuitka/freezer/DllDependenciesWin32.py +112 -25
- nuitka/freezer/ImportDetection.py +1 -1
- nuitka/freezer/IncludedDataFiles.py +2 -2
- nuitka/freezer/IncludedEntryPoints.py +9 -1
- nuitka/freezer/Onefile.py +13 -15
- nuitka/freezer/Standalone.py +16 -4
- nuitka/freezer/__init__.py +1 -1
- nuitka/importing/IgnoreListing.py +1 -1
- nuitka/importing/ImportCache.py +1 -1
- nuitka/importing/ImportResolving.py +1 -1
- nuitka/importing/Importing.py +6 -4
- nuitka/importing/PreloadedPackages.py +1 -1
- nuitka/importing/Recursion.py +37 -12
- nuitka/importing/StandardLibrary.py +1 -1
- nuitka/importing/__init__.py +1 -1
- nuitka/nodes/AsyncgenNodes.py +1 -1
- nuitka/nodes/AttributeLookupNodes.py +1 -1
- nuitka/nodes/AttributeNodes.py +1 -1
- nuitka/nodes/AttributeNodesGenerated.py +1 -1
- nuitka/nodes/BuiltinAllNodes.py +1 -1
- nuitka/nodes/BuiltinAnyNodes.py +1 -1
- nuitka/nodes/BuiltinComplexNodes.py +1 -1
- nuitka/nodes/BuiltinDecodingNodes.py +1 -1
- nuitka/nodes/BuiltinDecoratorNodes.py +1 -1
- nuitka/nodes/BuiltinDictNodes.py +1 -1
- nuitka/nodes/BuiltinFormatNodes.py +1 -1
- nuitka/nodes/BuiltinHashNodes.py +1 -1
- nuitka/nodes/BuiltinInputNodes.py +1 -1
- nuitka/nodes/BuiltinIntegerNodes.py +1 -1
- nuitka/nodes/BuiltinIteratorNodes.py +1 -1
- nuitka/nodes/BuiltinLenNodes.py +1 -1
- nuitka/nodes/BuiltinNextNodes.py +1 -1
- nuitka/nodes/BuiltinOpenNodes.py +1 -1
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +1 -1
- nuitka/nodes/BuiltinRangeNodes.py +1 -1
- nuitka/nodes/BuiltinRefNodes.py +1 -1
- nuitka/nodes/BuiltinSumNodes.py +1 -1
- nuitka/nodes/BuiltinTypeNodes.py +1 -1
- nuitka/nodes/BuiltinVarsNodes.py +1 -1
- nuitka/nodes/BytesNodes.py +1 -1
- nuitka/nodes/CallNodes.py +1 -1
- nuitka/nodes/Checkers.py +1 -1
- nuitka/nodes/ChildrenHavingMixins.py +240 -16
- nuitka/nodes/ClassNodes.py +1 -1
- nuitka/nodes/CodeObjectSpecs.py +4 -4
- nuitka/nodes/ComparisonNodes.py +1 -1
- nuitka/nodes/ConditionalNodes.py +1 -1
- nuitka/nodes/ConstantRefNodes.py +1 -1
- nuitka/nodes/ContainerMakingNodes.py +1 -1
- nuitka/nodes/ContainerOperationNodes.py +1 -1
- nuitka/nodes/CoroutineNodes.py +1 -1
- nuitka/nodes/CtypesNodes.py +1 -1
- nuitka/nodes/DictionaryNodes.py +1 -1
- nuitka/nodes/ExceptionNodes.py +1 -1
- nuitka/nodes/ExecEvalNodes.py +1 -1
- nuitka/nodes/ExpressionBases.py +1 -1
- nuitka/nodes/ExpressionBasesGenerated.py +1 -1
- nuitka/nodes/ExpressionShapeMixins.py +1 -1
- nuitka/nodes/FrameNodes.py +19 -7
- nuitka/nodes/FunctionAttributeNodes.py +1 -1
- nuitka/nodes/FunctionNodes.py +8 -1
- nuitka/nodes/FutureSpecs.py +34 -2
- nuitka/nodes/GeneratorNodes.py +1 -1
- nuitka/nodes/GlobalsLocalsNodes.py +1 -1
- nuitka/nodes/HardImportNodesGenerated.py +140 -56
- nuitka/nodes/ImportHardNodes.py +1 -1
- nuitka/nodes/ImportNodes.py +1 -1
- nuitka/nodes/IndicatorMixins.py +1 -1
- nuitka/nodes/InjectCNodes.py +1 -1
- nuitka/nodes/IterationHandles.py +1 -1
- nuitka/nodes/KeyValuePairNodes.py +1 -1
- nuitka/nodes/ListOperationNodes.py +1 -1
- nuitka/nodes/LocalsDictNodes.py +1 -1
- nuitka/nodes/LocalsScopes.py +1 -1
- nuitka/nodes/LoopNodes.py +1 -1
- nuitka/nodes/MatchNodes.py +1 -1
- nuitka/nodes/ModuleAttributeNodes.py +1 -1
- nuitka/nodes/ModuleNodes.py +23 -9
- nuitka/nodes/NetworkxNodes.py +1 -1
- nuitka/nodes/NodeBases.py +1 -1
- nuitka/nodes/NodeMakingHelpers.py +1 -1
- nuitka/nodes/NodeMetaClasses.py +1 -1
- nuitka/nodes/OperatorNodes.py +1 -1
- nuitka/nodes/OperatorNodesUnary.py +1 -1
- nuitka/nodes/OsSysNodes.py +1 -1
- nuitka/nodes/OutlineNodes.py +1 -1
- nuitka/nodes/PackageMetadataNodes.py +4 -2
- nuitka/nodes/PackageResourceNodes.py +42 -7
- nuitka/nodes/PrintNodes.py +1 -1
- nuitka/nodes/ReturnNodes.py +1 -1
- nuitka/nodes/SideEffectNodes.py +1 -1
- nuitka/nodes/SliceNodes.py +1 -1
- nuitka/nodes/StatementBasesGenerated.py +1 -1
- nuitka/nodes/StatementNodes.py +1 -1
- nuitka/nodes/StrNodes.py +1 -1
- nuitka/nodes/StringConcatenationNodes.py +1 -1
- nuitka/nodes/SubscriptNodes.py +1 -1
- nuitka/nodes/TensorflowNodes.py +1 -1
- nuitka/nodes/TryNodes.py +1 -1
- nuitka/nodes/TypeMatchNodes.py +1 -1
- nuitka/nodes/TypeNodes.py +4 -4
- nuitka/nodes/VariableAssignNodes.py +1 -1
- nuitka/nodes/VariableDelNodes.py +1 -1
- nuitka/nodes/VariableNameNodes.py +1 -1
- nuitka/nodes/VariableRefNodes.py +1 -1
- nuitka/nodes/VariableReleaseNodes.py +1 -1
- nuitka/nodes/YieldNodes.py +1 -1
- nuitka/nodes/__init__.py +1 -1
- nuitka/nodes/shapes/BuiltinTypeShapes.py +1 -1
- nuitka/nodes/shapes/ControlFlowDescriptions.py +1 -1
- nuitka/nodes/shapes/IteratorShapes.py +1 -1
- nuitka/nodes/shapes/ShapeMixins.py +1 -1
- nuitka/nodes/shapes/StandardShapes.py +1 -1
- nuitka/nodes/shapes/__init__.py +1 -1
- nuitka/optimizations/BytecodeDemotion.py +1 -1
- nuitka/optimizations/FunctionInlining.py +1 -1
- nuitka/optimizations/Graphs.py +1 -1
- nuitka/optimizations/Optimization.py +1 -1
- nuitka/optimizations/OptimizeBuiltinCalls.py +1 -1
- nuitka/optimizations/Tags.py +1 -1
- nuitka/optimizations/TraceCollections.py +1 -1
- nuitka/optimizations/ValueTraces.py +1 -1
- nuitka/optimizations/__init__.py +1 -1
- nuitka/pgo/PGO.py +1 -1
- nuitka/pgo/__init__.py +1 -1
- nuitka/plugins/PluginBase.py +91 -16
- nuitka/plugins/Plugins.py +58 -15
- nuitka/plugins/YamlPluginBase.py +1 -1
- nuitka/plugins/__init__.py +1 -1
- nuitka/plugins/standard/AntiBloatPlugin.py +138 -66
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +2 -1
- nuitka/plugins/standard/DataFilesPlugin.py +2 -2
- nuitka/plugins/standard/DelvewheelPlugin.py +2 -1
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +1 -1
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +1 -1
- nuitka/plugins/standard/DillPlugin.py +2 -2
- nuitka/plugins/standard/DllFilesPlugin.py +2 -12
- nuitka/plugins/standard/EnumPlugin.py +2 -2
- nuitka/plugins/standard/EventletPlugin.py +2 -1
- nuitka/plugins/standard/GeventPlugin.py +2 -1
- nuitka/plugins/standard/GiPlugin.py +2 -1
- nuitka/plugins/standard/GlfwPlugin.py +2 -1
- nuitka/plugins/standard/ImplicitImports.py +7 -6
- nuitka/plugins/standard/KivyPlugin.py +2 -1
- nuitka/plugins/standard/MatplotlibPlugin.py +2 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +2 -1
- nuitka/plugins/standard/NumpyPlugin.py +2 -1
- nuitka/plugins/standard/OptionsNannyPlugin.py +2 -2
- nuitka/plugins/standard/PbrPlugin.py +2 -2
- nuitka/plugins/standard/PkgResourcesPlugin.py +2 -1
- nuitka/plugins/standard/PlaywrightPlugin.py +10 -15
- nuitka/plugins/standard/PmwPlugin.py +2 -1
- nuitka/plugins/standard/PySidePyQtPlugin.py +25 -15
- nuitka/plugins/standard/PywebViewPlugin.py +2 -1
- nuitka/plugins/standard/SpacyPlugin.py +2 -1
- nuitka/plugins/standard/TensorflowPlugin.py +2 -1
- nuitka/plugins/standard/TkinterPlugin.py +15 -2
- nuitka/plugins/standard/TorchPlugin.py +2 -1
- nuitka/plugins/standard/TransformersPlugin.py +2 -2
- nuitka/plugins/standard/TrioPlugin.py +2 -1
- nuitka/plugins/standard/UpxPlugin.py +2 -1
- nuitka/plugins/standard/__init__.py +1 -1
- nuitka/plugins/standard/standard.nuitka-package.config.yml +257 -89
- nuitka/reports/CompilationReportReader.py +5 -1
- nuitka/reports/LicenseReport.rst.j2 +1 -1
- nuitka/reports/Reports.py +30 -3
- nuitka/reports/__init__.py +1 -1
- nuitka/specs/BuiltinBytesOperationSpecs.py +1 -1
- nuitka/specs/BuiltinDictOperationSpecs.py +1 -1
- nuitka/specs/BuiltinListOperationSpecs.py +1 -1
- nuitka/specs/BuiltinParameterSpecs.py +1 -1
- nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
- nuitka/specs/BuiltinTypeOperationSpecs.py +1 -1
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +1 -1
- nuitka/specs/HardImportSpecs.py +10 -2
- nuitka/specs/ParameterSpecs.py +17 -2
- nuitka/specs/__init__.py +1 -1
- nuitka/tools/Basics.py +1 -1
- nuitka/tools/__init__.py +1 -1
- nuitka/tools/commercial/__init__.py +1 -1
- nuitka/tools/data_composer/DataComposer.py +125 -1
- nuitka/tools/data_composer/__init__.py +1 -1
- nuitka/tools/data_composer/__main__.py +1 -1
- nuitka/tools/environments/CreateEnvironment.py +1 -1
- nuitka/tools/environments/Virtualenv.py +1 -1
- nuitka/tools/environments/__init__.py +1 -1
- nuitka/tools/general/__init__.py +1 -1
- nuitka/tools/general/dll_report/__init__.py +1 -1
- nuitka/tools/general/dll_report/__main__.py +1 -1
- nuitka/tools/general/find_module/FindModuleCode.py +6 -3
- nuitka/tools/general/find_module/__init__.py +1 -1
- nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
- nuitka/tools/general/generate_header/__init__.py +19 -0
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/onefile_compressor/__init__.py +1 -1
- nuitka/tools/onefile_compressor/__main__.py +1 -1
- nuitka/tools/podman/Podman.py +1 -1
- nuitka/tools/podman/__init__.py +1 -1
- nuitka/tools/podman/__main__.py +4 -2
- nuitka/tools/profiler/__init__.py +1 -1
- nuitka/tools/profiler/__main__.py +1 -1
- nuitka/tools/scanning/DisplayPackageDLLs.py +42 -20
- nuitka/tools/scanning/DisplayPackageData.py +1 -1
- nuitka/tools/scanning/__init__.py +1 -1
- nuitka/tools/specialize/CTypeDescriptions.py +1 -1
- nuitka/tools/specialize/Common.py +1 -1
- nuitka/tools/specialize/SpecializeC.py +1 -1
- nuitka/tools/specialize/SpecializePython.py +7 -3
- nuitka/tools/specialize/__init__.py +1 -1
- nuitka/tools/testing/Common.py +140 -19
- nuitka/tools/testing/Constructs.py +1 -1
- nuitka/tools/testing/OutputComparison.py +5 -4
- nuitka/tools/testing/Pythons.py +1 -1
- nuitka/tools/testing/RuntimeTracing.py +1 -1
- nuitka/tools/testing/SearchModes.py +1 -1
- nuitka/tools/testing/Valgrind.py +1 -1
- nuitka/tools/testing/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__main__.py +6 -2
- nuitka/tools/testing/compare_with_cpython/__init__.py +1 -1
- nuitka/tools/testing/compare_with_cpython/__main__.py +51 -14
- nuitka/tools/testing/find_sxs_modules/__init__.py +1 -1
- nuitka/tools/testing/find_sxs_modules/__main__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__init__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__main__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__init__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__main__.py +1 -1
- nuitka/tools/watch/AutoStage.py +1 -1
- nuitka/tools/watch/Common.py +55 -0
- nuitka/tools/watch/Conda.py +125 -0
- nuitka/tools/watch/GitHub.py +1 -1
- nuitka/tools/watch/Pacman.py +73 -0
- nuitka/tools/watch/Pipenv.py +143 -0
- nuitka/tools/watch/__init__.py +1 -1
- nuitka/tools/watch/__main__.py +124 -266
- nuitka/tree/Building.py +5 -7
- nuitka/tree/ComplexCallHelperFunctions.py +1 -1
- nuitka/tree/Extractions.py +1 -1
- nuitka/tree/FutureSpecState.py +71 -0
- nuitka/tree/InternalModule.py +1 -1
- nuitka/tree/Operations.py +1 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -1
- nuitka/tree/ReformulationAssignmentStatements.py +3 -3
- nuitka/tree/ReformulationBooleanExpressions.py +1 -1
- nuitka/tree/ReformulationCallExpressions.py +1 -1
- nuitka/tree/ReformulationClasses.py +1 -1
- nuitka/tree/ReformulationClasses3.py +1 -1
- nuitka/tree/ReformulationComparisonExpressions.py +1 -1
- nuitka/tree/ReformulationContractionExpressions.py +3 -1
- nuitka/tree/ReformulationDictionaryCreation.py +3 -3
- nuitka/tree/ReformulationExecStatements.py +1 -1
- nuitka/tree/ReformulationForLoopStatements.py +1 -1
- nuitka/tree/ReformulationFunctionStatements.py +2 -2
- nuitka/tree/ReformulationImportStatements.py +5 -52
- nuitka/tree/ReformulationLambdaExpressions.py +2 -1
- nuitka/tree/ReformulationMatchStatements.py +1 -1
- nuitka/tree/ReformulationMultidist.py +2 -2
- nuitka/tree/ReformulationNamespacePackages.py +28 -6
- nuitka/tree/ReformulationPrintStatements.py +1 -1
- nuitka/tree/ReformulationSequenceCreation.py +1 -1
- nuitka/tree/ReformulationSubscriptExpressions.py +1 -1
- nuitka/tree/ReformulationTryExceptStatements.py +1 -1
- nuitka/tree/ReformulationTryFinallyStatements.py +1 -1
- nuitka/tree/ReformulationWhileLoopStatements.py +1 -1
- nuitka/tree/ReformulationWithStatements.py +1 -1
- nuitka/tree/ReformulationYieldExpressions.py +1 -1
- nuitka/tree/SourceHandling.py +57 -18
- nuitka/tree/SyntaxErrors.py +1 -1
- nuitka/tree/TreeHelpers.py +24 -10
- nuitka/tree/VariableClosure.py +1 -1
- nuitka/tree/__init__.py +1 -1
- nuitka/utils/AppDirs.py +5 -2
- nuitka/utils/CStrings.py +1 -1
- nuitka/utils/CommandLineOptions.py +2 -2
- nuitka/utils/Distributions.py +197 -15
- nuitka/utils/Download.py +14 -6
- nuitka/utils/Execution.py +43 -14
- nuitka/utils/FileOperations.py +43 -10
- nuitka/utils/Hashing.py +1 -1
- nuitka/utils/Images.py +8 -2
- nuitka/utils/Importing.py +1 -1
- nuitka/utils/InlineCopies.py +1 -1
- nuitka/utils/InstalledPythons.py +1 -1
- nuitka/utils/InstanceCounters.py +1 -1
- nuitka/utils/Jinja2.py +1 -1
- nuitka/utils/Json.py +2 -2
- nuitka/utils/MacOSApp.py +4 -3
- nuitka/utils/MemoryUsage.py +1 -1
- nuitka/utils/ModuleNames.py +1 -1
- nuitka/utils/PackageResources.py +1 -1
- nuitka/utils/ReExecute.py +1 -1
- nuitka/utils/Rest.py +1 -1
- nuitka/utils/SharedLibraries.py +52 -7
- nuitka/utils/Shebang.py +1 -1
- nuitka/utils/Signing.py +2 -4
- nuitka/utils/SlotMetaClasses.py +1 -1
- nuitka/utils/StaticLibraries.py +29 -1
- nuitka/utils/ThreadedExecutor.py +1 -1
- nuitka/utils/Timing.py +1 -1
- nuitka/utils/Utils.py +1 -1
- nuitka/utils/WindowsFileUsage.py +1 -1
- nuitka/utils/WindowsResources.py +3 -1
- nuitka/utils/Yaml.py +1 -1
- nuitka/utils/__init__.py +1 -1
- Nuitka_winsvc-2.5.6.dist-info/RECORD +0 -978
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Built-in codes
|
|
@@ -462,6 +462,15 @@ def getBuiltinCallViaSpecCode(spec, to_name, called_name, expression, emit, cont
|
|
|
462
462
|
expression=expression, emit=emit, context=context
|
|
463
463
|
)
|
|
464
464
|
|
|
465
|
+
value_names = []
|
|
466
|
+
for arg_value_name in arg_value_names:
|
|
467
|
+
if arg_value_name is None:
|
|
468
|
+
value_names.append("NULL")
|
|
469
|
+
elif type(arg_value_name) is tuple:
|
|
470
|
+
value_names.extend(arg_value_name)
|
|
471
|
+
else:
|
|
472
|
+
value_names.append(arg_value_name)
|
|
473
|
+
|
|
465
474
|
with withObjectCodeTemporaryAssignment(
|
|
466
475
|
to_name, "%s_result" % spec.name.replace(".", "_"), expression, emit, context
|
|
467
476
|
) as value_name:
|
|
@@ -485,11 +494,10 @@ def getBuiltinCallViaSpecCode(spec, to_name, called_name, expression, emit, cont
|
|
|
485
494
|
"to_name": value_name,
|
|
486
495
|
"called_name": called_name,
|
|
487
496
|
"arg_names": ",".join(
|
|
488
|
-
'"%s"' % arg_name for arg_name in spec.
|
|
497
|
+
'"%s"' % arg_name for arg_name in spec.getParameterNames2()
|
|
489
498
|
),
|
|
490
499
|
"arg_value_names": ",".join(
|
|
491
|
-
|
|
492
|
-
for arg_value_name in arg_value_names
|
|
500
|
+
str(value_name) for value_name in value_names
|
|
493
501
|
),
|
|
494
502
|
"kw_only_count": spec.getKwOnlyParameterCount(),
|
|
495
503
|
}
|
|
@@ -497,11 +505,13 @@ def getBuiltinCallViaSpecCode(spec, to_name, called_name, expression, emit, cont
|
|
|
497
505
|
|
|
498
506
|
getErrorExitCode(
|
|
499
507
|
check_name=value_name,
|
|
500
|
-
release_names=[called_name] +
|
|
508
|
+
release_names=[called_name] + value_names,
|
|
501
509
|
emit=emit,
|
|
502
510
|
context=context,
|
|
503
511
|
)
|
|
504
512
|
|
|
513
|
+
context.addCleanupTempName(value_name)
|
|
514
|
+
|
|
505
515
|
|
|
506
516
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
507
517
|
# integrates with CPython, but also works on its own.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" The code generation.
|
|
@@ -404,21 +404,25 @@ def generateFunctionBodyCode(function_body, context):
|
|
|
404
404
|
needs_exception_exit = function_body.mayRaiseException(BaseException)
|
|
405
405
|
|
|
406
406
|
if function_body.isExpressionGeneratorObjectBody():
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
407
|
+
if function_body.subnode_body is not None:
|
|
408
|
+
function_code = getGeneratorObjectCode(
|
|
409
|
+
context=function_context,
|
|
410
|
+
function_identifier=function_identifier,
|
|
411
|
+
closure_variables=function_body.getClosureVariables(),
|
|
412
|
+
user_variables=function_body.getUserLocalVariables(),
|
|
413
|
+
outline_variables=function_body.getOutlineLocalVariables(),
|
|
414
|
+
temp_variables=function_body.getTempVariables(),
|
|
415
|
+
needs_exception_exit=needs_exception_exit,
|
|
416
|
+
needs_generator_return=function_body.needsGeneratorReturnExit(),
|
|
417
|
+
)
|
|
417
418
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
419
|
+
function_decl = getGeneratorObjectDeclCode(
|
|
420
|
+
function_identifier=function_identifier,
|
|
421
|
+
closure_variables=function_body.getClosureVariables(),
|
|
422
|
+
)
|
|
423
|
+
else:
|
|
424
|
+
function_code = None
|
|
425
|
+
function_decl = None
|
|
422
426
|
elif function_body.isExpressionCoroutineObjectBody():
|
|
423
427
|
function_code = getCoroutineObjectCode(
|
|
424
428
|
context=function_context,
|
|
@@ -535,7 +539,8 @@ def _generateModuleCode(module, data_filename):
|
|
|
535
539
|
function_body=function_body, context=context
|
|
536
540
|
)
|
|
537
541
|
|
|
538
|
-
|
|
542
|
+
if function_code is not None:
|
|
543
|
+
function_body_codes.append(function_code)
|
|
539
544
|
|
|
540
545
|
if function_decl is not None:
|
|
541
546
|
function_decl_codes.append(function_decl)
|
|
@@ -933,7 +938,8 @@ addExpressionDispatchDict(
|
|
|
933
938
|
"EXPRESSION_PKG_RESOURCES_RESOURCE_STRING_CALL": generatePkgResourcesResourceStringCallCode,
|
|
934
939
|
"EXPRESSION_PKG_RESOURCES_RESOURCE_STREAM_CALL": generatePkgResourcesResourceStreamCallCode,
|
|
935
940
|
"EXPRESSION_IMPORTLIB_RESOURCES_READ_BINARY_CALL": generateImportlibResourcesReadBinaryCallCode,
|
|
936
|
-
"
|
|
941
|
+
"EXPRESSION_IMPORTLIB_RESOURCES_READ_TEXT_BEFORE_313_CALL": generateImportlibResourcesReadTextCallCode,
|
|
942
|
+
"EXPRESSION_IMPORTLIB_RESOURCES_READ_TEXT_SINCE_313_CALL": generateImportlibResourcesReadTextCallCode,
|
|
937
943
|
"EXPRESSION_IMPORTLIB_RESOURCES_FILES_CALL": generateImportlibResourcesFilesCallCode,
|
|
938
944
|
"EXPRESSION_IMPORTLIB_RESOURCES_BACKPORT_FILES_CALL": generateImportlibResourcesFilesCallCode,
|
|
939
945
|
"EXPRESSION_IMPORTLIB_RESOURCES_FILES_CALL_FIXED": generateImportlibResourcesFilesCallCode,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Code generation for code objects.
|
|
@@ -9,11 +9,14 @@ Right now only the creation is done here. But more should be added later on.
|
|
|
9
9
|
import os
|
|
10
10
|
|
|
11
11
|
from nuitka.__past__ import unicode
|
|
12
|
-
from nuitka.Options import getFileReferenceMode
|
|
12
|
+
from nuitka.Options import getFileReferenceMode, isExperimental
|
|
13
13
|
from nuitka.PythonVersions import python_version
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def getCodeObjectsDeclCode(context):
|
|
17
|
+
if isExperimental("new-code-objects"):
|
|
18
|
+
return ()
|
|
19
|
+
|
|
17
20
|
statements = []
|
|
18
21
|
|
|
19
22
|
for _code_object_key, code_identifier in context.getCodeObjects():
|
|
@@ -34,6 +37,7 @@ def _getMakeCodeObjectArgs(code_object_handle, context):
|
|
|
34
37
|
This is also version dependent, but we hide this behind macros
|
|
35
38
|
that ignore some arguments.
|
|
36
39
|
"""
|
|
40
|
+
assert not isExperimental("new-code-objects")
|
|
37
41
|
|
|
38
42
|
co_flags = []
|
|
39
43
|
|
|
@@ -90,6 +94,9 @@ def getCodeObjectsInitCode(context):
|
|
|
90
94
|
# There is a bit of details to this, and we are making some optimizations as
|
|
91
95
|
# well as customization to what path should be put there.
|
|
92
96
|
|
|
97
|
+
if isExperimental("new-code-objects"):
|
|
98
|
+
return ()
|
|
99
|
+
|
|
93
100
|
statements = []
|
|
94
101
|
|
|
95
102
|
code_objects = context.getCodeObjects()
|
|
@@ -132,6 +139,16 @@ def getCodeObjectsInitCode(context):
|
|
|
132
139
|
return statements
|
|
133
140
|
|
|
134
141
|
|
|
142
|
+
def getCodeObjectAccessCode(code_object, context):
|
|
143
|
+
if isExperimental("new-code-objects"):
|
|
144
|
+
return (
|
|
145
|
+
"USE_CODE_OBJECT(tstate, %s, module_filename_obj)"
|
|
146
|
+
% context.getConstantCode(code_object)
|
|
147
|
+
)
|
|
148
|
+
else:
|
|
149
|
+
return context.getCodeObjectHandle(code_object)
|
|
150
|
+
|
|
151
|
+
|
|
135
152
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
136
153
|
# integrates with CPython, but also works on its own.
|
|
137
154
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Code generation contexts.
|
|
@@ -262,6 +262,8 @@ class TempMixin(object):
|
|
|
262
262
|
del self.cleanup_names[-1]
|
|
263
263
|
|
|
264
264
|
|
|
265
|
+
# TODO: Remove when isExperimental("new-code-objects") is becoming the
|
|
266
|
+
# standard.
|
|
265
267
|
CodeObjectHandle = collections.namedtuple(
|
|
266
268
|
"CodeObjectHandle",
|
|
267
269
|
(
|
|
@@ -284,43 +286,50 @@ CodeObjectHandle = collections.namedtuple(
|
|
|
284
286
|
)
|
|
285
287
|
|
|
286
288
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
289
|
+
if Options.isExperimental("new-code-objects"):
|
|
290
|
+
|
|
291
|
+
class CodeObjectsMixin(object):
|
|
292
|
+
__slots__ = ()
|
|
293
|
+
|
|
294
|
+
else:
|
|
295
|
+
|
|
296
|
+
class CodeObjectsMixin(object):
|
|
297
|
+
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
298
|
+
__slots__ = ()
|
|
299
|
+
|
|
300
|
+
def __init__(self):
|
|
301
|
+
# Code objects needed made unique by a key.
|
|
302
|
+
self.code_objects = {}
|
|
303
|
+
|
|
304
|
+
def getCodeObjects(self):
|
|
305
|
+
return sorted(iterItems(self.code_objects))
|
|
306
|
+
|
|
307
|
+
def getCodeObjectHandle(self, code_object):
|
|
308
|
+
key = CodeObjectHandle(
|
|
309
|
+
co_filename=code_object.getFilename(),
|
|
310
|
+
co_name=code_object.getCodeObjectName(),
|
|
311
|
+
co_qualname=code_object.getCodeObjectQualname(),
|
|
312
|
+
line_number=code_object.getLineNumber(),
|
|
313
|
+
co_varnames=code_object.getVarNames(),
|
|
314
|
+
co_argcount=code_object.getArgumentCount(),
|
|
315
|
+
co_freevars=code_object.getFreeVarNames(),
|
|
316
|
+
co_posonlyargcount=code_object.getPosOnlyParameterCount(),
|
|
317
|
+
co_kwonlyargcount=code_object.getKwOnlyParameterCount(),
|
|
318
|
+
co_kind=code_object.getCodeObjectKind(),
|
|
319
|
+
is_optimized=code_object.getFlagIsOptimizedValue(),
|
|
320
|
+
co_new_locals=code_object.getFlagNewLocalsValue(),
|
|
321
|
+
co_has_starlist=code_object.hasStarListArg(),
|
|
322
|
+
co_has_stardict=code_object.hasStarDictArg(),
|
|
323
|
+
future_flags=code_object.getFutureSpec().asFlags(),
|
|
324
|
+
)
|
|
316
325
|
|
|
317
|
-
|
|
318
|
-
|
|
326
|
+
if key not in self.code_objects:
|
|
327
|
+
self.code_objects[key] = "code_objects_%s" % self._calcHash(key)
|
|
319
328
|
|
|
320
|
-
|
|
329
|
+
return self.code_objects[key]
|
|
321
330
|
|
|
322
|
-
|
|
323
|
-
|
|
331
|
+
def _calcHash(self, key):
|
|
332
|
+
return getStringHash("-".join(str(s) for s in key))
|
|
324
333
|
|
|
325
334
|
|
|
326
335
|
class PythonContextBase(getMetaClassBase("Context", require_slots=True)):
|
|
@@ -591,7 +600,7 @@ class FrameDeclarationsMixin(object):
|
|
|
591
600
|
def getFrameHandle(self):
|
|
592
601
|
return self.frame_stack[-1]
|
|
593
602
|
|
|
594
|
-
def pushFrameHandle(self,
|
|
603
|
+
def pushFrameHandle(self, frame_code_name, is_light):
|
|
595
604
|
self.frames_used += 1
|
|
596
605
|
|
|
597
606
|
if is_light:
|
|
@@ -603,7 +612,7 @@ class FrameDeclarationsMixin(object):
|
|
|
603
612
|
)
|
|
604
613
|
|
|
605
614
|
else:
|
|
606
|
-
frame_handle =
|
|
615
|
+
frame_handle = "frame_" + frame_code_name
|
|
607
616
|
|
|
608
617
|
if self.frames_used > 1:
|
|
609
618
|
frame_handle += "_%d" % self.frames_used
|
|
@@ -789,6 +798,8 @@ class PythonModuleContext(
|
|
|
789
798
|
"exception_keepers",
|
|
790
799
|
"preserver_variable_declaration",
|
|
791
800
|
"cleanup_names",
|
|
801
|
+
# TODO: Remove when isExperimental("new-code-objects") is becoming the
|
|
802
|
+
# standard.
|
|
792
803
|
# CodeObjectsMixin
|
|
793
804
|
"code_objects",
|
|
794
805
|
# ReturnReleaseModeMixin
|
|
@@ -1139,6 +1150,8 @@ class PythonFunctionOutlineContext(
|
|
|
1139
1150
|
def popCleanupScope(self):
|
|
1140
1151
|
self.parent.popCleanupScope()
|
|
1141
1152
|
|
|
1153
|
+
# TODO: Remove when isExperimental("new-code-objects") is becoming the
|
|
1154
|
+
# standard.
|
|
1142
1155
|
def getCodeObjectHandle(self, code_object):
|
|
1143
1156
|
return self.parent.getCodeObjectHandle(code_object)
|
|
1144
1157
|
|
|
@@ -1175,8 +1188,8 @@ class PythonFunctionOutlineContext(
|
|
|
1175
1188
|
def getFrameHandle(self):
|
|
1176
1189
|
return self.parent.getFrameHandle()
|
|
1177
1190
|
|
|
1178
|
-
def pushFrameHandle(self,
|
|
1179
|
-
return self.parent.pushFrameHandle(
|
|
1191
|
+
def pushFrameHandle(self, code_object_access_code, is_light):
|
|
1192
|
+
return self.parent.pushFrameHandle(code_object_access_code, is_light)
|
|
1180
1193
|
|
|
1181
1194
|
def popFrameHandle(self):
|
|
1182
1195
|
return self.parent.popFrameHandle()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Code to generate and interact with compiled coroutine objects.
|
|
@@ -10,6 +10,7 @@ from .CodeHelpers import (
|
|
|
10
10
|
generateStatementSequenceCode,
|
|
11
11
|
withObjectCodeTemporaryAssignment,
|
|
12
12
|
)
|
|
13
|
+
from .CodeObjectCodes import getCodeObjectAccessCode
|
|
13
14
|
from .Emission import SourceCodeCollector
|
|
14
15
|
from .ErrorCodes import getErrorExitCode
|
|
15
16
|
from .FunctionCodes import (
|
|
@@ -43,7 +44,6 @@ def getCoroutineObjectDeclCode(function_identifier, closure_variables):
|
|
|
43
44
|
kw_defaults_name=None,
|
|
44
45
|
annotations_name=None,
|
|
45
46
|
closure_variables=closure_variables,
|
|
46
|
-
tstate=True,
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
return template_coroutine_object_maker % {
|
|
@@ -124,7 +124,6 @@ struct %(function_identifier)s_locals *coroutine_heap = \
|
|
|
124
124
|
kw_defaults_name=None,
|
|
125
125
|
annotations_name=None,
|
|
126
126
|
closure_variables=closure_variables,
|
|
127
|
-
tstate=True,
|
|
128
127
|
)
|
|
129
128
|
|
|
130
129
|
return template_coroutine_object_body % {
|
|
@@ -145,8 +144,8 @@ struct %(function_identifier)s_locals *coroutine_heap = \
|
|
|
145
144
|
"coroutine_qualname_obj": getFunctionQualnameObj(
|
|
146
145
|
coroutine_object_body, context
|
|
147
146
|
),
|
|
148
|
-
"code_identifier":
|
|
149
|
-
code_object=coroutine_object_body.getCodeObject()
|
|
147
|
+
"code_identifier": getCodeObjectAccessCode(
|
|
148
|
+
code_object=coroutine_object_body.getCodeObject(), context=context
|
|
150
149
|
),
|
|
151
150
|
"closure_name": "closure" if closure_variables else "NULL",
|
|
152
151
|
"closure_count": len(closure_variables),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Frame codes
|
|
@@ -11,6 +11,7 @@ from nuitka.PythonVersions import python_version
|
|
|
11
11
|
from nuitka.utils.Jinja2 import renderTemplateFromString
|
|
12
12
|
|
|
13
13
|
from .CodeHelpers import _generateStatementSequenceCode
|
|
14
|
+
from .CodeObjectCodes import getCodeObjectAccessCode
|
|
14
15
|
from .Emission import SourceCodeCollector
|
|
15
16
|
from .ErrorCodes import getFrameVariableTypeDescriptionCode
|
|
16
17
|
from .ExceptionCodes import getTracebackMakingIdentifier
|
|
@@ -69,7 +70,9 @@ def generateStatementsFrameCode(statement_sequence, emit, context):
|
|
|
69
70
|
guard_mode = statement_sequence.getGuardMode()
|
|
70
71
|
|
|
71
72
|
code_object = statement_sequence.getCodeObject()
|
|
72
|
-
|
|
73
|
+
code_object_access_code = getCodeObjectAccessCode(
|
|
74
|
+
code_object=code_object, context=context
|
|
75
|
+
)
|
|
73
76
|
|
|
74
77
|
parent_exception_exit = context.getExceptionEscape()
|
|
75
78
|
|
|
@@ -79,7 +82,9 @@ def generateStatementsFrameCode(statement_sequence, emit, context):
|
|
|
79
82
|
parent_exception_exit = context.allocateLabel("nested_frame_exit")
|
|
80
83
|
|
|
81
84
|
# Allow stacking of frame handles.
|
|
82
|
-
context.pushFrameHandle(
|
|
85
|
+
context.pushFrameHandle(
|
|
86
|
+
statement_sequence.getFrameCodeName(), statement_sequence.hasStructureMember()
|
|
87
|
+
)
|
|
83
88
|
|
|
84
89
|
context.setExceptionEscape(context.allocateLabel("frame_exception_exit"))
|
|
85
90
|
|
|
@@ -127,9 +132,12 @@ def generateStatementsFrameCode(statement_sequence, emit, context):
|
|
|
127
132
|
# TODO: This case should also care about "needs_preserve", as for
|
|
128
133
|
# Python3 it is actually not a stub of empty code.
|
|
129
134
|
|
|
135
|
+
# TODO: Rename "code_identifier" to "code_object_access_code" in these
|
|
136
|
+
# functions and make it work with function call result properly and not
|
|
137
|
+
# have to be a variable name.
|
|
130
138
|
getFrameGuardGeneratorCode(
|
|
131
139
|
frame_node=statement_sequence,
|
|
132
|
-
code_identifier=
|
|
140
|
+
code_identifier=code_object_access_code,
|
|
133
141
|
codes=local_emit.codes,
|
|
134
142
|
parent_exception_exit=parent_exception_exit,
|
|
135
143
|
frame_exception_exit=frame_exception_exit,
|
|
@@ -141,7 +149,7 @@ def generateStatementsFrameCode(statement_sequence, emit, context):
|
|
|
141
149
|
elif guard_mode in ("full", "once"):
|
|
142
150
|
getFrameGuardHeavyCode(
|
|
143
151
|
frame_node=statement_sequence,
|
|
144
|
-
code_identifier=
|
|
152
|
+
code_identifier=code_object_access_code,
|
|
145
153
|
parent_exception_exit=parent_exception_exit,
|
|
146
154
|
parent_return_exit=parent_return_exit,
|
|
147
155
|
frame_exception_exit=frame_exception_exit,
|
|
@@ -421,22 +429,23 @@ def getFrameGuardGeneratorCode(
|
|
|
421
429
|
|
|
422
430
|
if frame_exception_exit is not None:
|
|
423
431
|
emit(
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
+
renderTemplateFromString(
|
|
433
|
+
template_frame_guard_generator_exception_handler,
|
|
434
|
+
context_identifier=context_identifier,
|
|
435
|
+
frame_identifier=frame_identifier,
|
|
436
|
+
frame_cache_identifier=frame_cache_identifier,
|
|
437
|
+
exception_state_name=exception_state_name,
|
|
438
|
+
exception_lineno=exception_lineno,
|
|
439
|
+
tb_making=getTracebackMakingIdentifier(
|
|
432
440
|
context=context, lineno_name=exception_lineno
|
|
433
441
|
),
|
|
434
|
-
|
|
442
|
+
attach_locals=indented(
|
|
435
443
|
getFrameAttachLocalsCode(context, frame_identifier)
|
|
436
444
|
),
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
445
|
+
frame_exception_exit=frame_exception_exit,
|
|
446
|
+
parent_exception_exit=parent_exception_exit,
|
|
447
|
+
is_python3=python_version >= 0x300,
|
|
448
|
+
)
|
|
440
449
|
)
|
|
441
450
|
|
|
442
451
|
getLabelCode(no_exception_exit, emit)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Code to generate and interact with compiled function objects.
|
|
@@ -15,6 +15,7 @@ from .CodeHelpers import (
|
|
|
15
15
|
generateStatementSequenceCode,
|
|
16
16
|
withObjectCodeTemporaryAssignment,
|
|
17
17
|
)
|
|
18
|
+
from .CodeObjectCodes import getCodeObjectAccessCode
|
|
18
19
|
from .Contexts import PythonFunctionOutlineContext
|
|
19
20
|
from .Emission import SourceCodeCollector
|
|
20
21
|
from .ErrorCodes import getErrorExitCode, getMustNotGetHereCode, getReleaseCode
|
|
@@ -41,12 +42,9 @@ from .VariableCodes import (
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
def getFunctionCreationArgs(
|
|
44
|
-
defaults_name, kw_defaults_name, annotations_name, closure_variables
|
|
45
|
+
defaults_name, kw_defaults_name, annotations_name, closure_variables
|
|
45
46
|
):
|
|
46
|
-
result = []
|
|
47
|
-
|
|
48
|
-
if tstate:
|
|
49
|
-
result.append("PyThreadState *tstate")
|
|
47
|
+
result = ["PyThreadState *tstate"]
|
|
50
48
|
|
|
51
49
|
if defaults_name is not None:
|
|
52
50
|
result.append("PyObject *defaults")
|
|
@@ -75,7 +73,6 @@ def getFunctionMakerDecl(
|
|
|
75
73
|
kw_defaults_name=kw_defaults_name,
|
|
76
74
|
annotations_name=annotations_name,
|
|
77
75
|
closure_variables=closure_variables,
|
|
78
|
-
tstate=False,
|
|
79
76
|
)
|
|
80
77
|
|
|
81
78
|
return template_function_make_declaration % {
|
|
@@ -135,7 +132,6 @@ def getFunctionMakerCode(
|
|
|
135
132
|
kw_defaults_name=kw_defaults_name,
|
|
136
133
|
annotations_name=annotations_name,
|
|
137
134
|
closure_variables=closure_variables,
|
|
138
|
-
tstate=False,
|
|
139
135
|
)
|
|
140
136
|
|
|
141
137
|
if function_doc is None:
|
|
@@ -173,10 +169,6 @@ def getFunctionMakerCode(
|
|
|
173
169
|
function_identifier=function_identifier
|
|
174
170
|
)
|
|
175
171
|
|
|
176
|
-
code_identifier = context.getCodeObjectHandle(
|
|
177
|
-
code_object=function_body.getCodeObject()
|
|
178
|
-
)
|
|
179
|
-
|
|
180
172
|
module_identifier = getModuleAccessCode(context=context)
|
|
181
173
|
|
|
182
174
|
result = template_maker_function_body % {
|
|
@@ -187,7 +179,9 @@ def getFunctionMakerCode(
|
|
|
187
179
|
"function_maker_identifier": function_maker_identifier,
|
|
188
180
|
"function_impl_identifier": function_impl_identifier,
|
|
189
181
|
"function_creation_args": ", ".join(function_creation_args),
|
|
190
|
-
"code_identifier":
|
|
182
|
+
"code_identifier": getCodeObjectAccessCode(
|
|
183
|
+
code_object=function_body.getCodeObject(), context=context
|
|
184
|
+
),
|
|
191
185
|
"function_doc": function_doc,
|
|
192
186
|
"defaults": "defaults" if defaults_name else "NULL",
|
|
193
187
|
"kw_defaults": "kw_defaults" if kw_defaults_name else "NULL",
|
|
@@ -348,7 +342,7 @@ def getFunctionCreationCode(
|
|
|
348
342
|
emit,
|
|
349
343
|
context,
|
|
350
344
|
):
|
|
351
|
-
args = []
|
|
345
|
+
args = ["tstate"]
|
|
352
346
|
|
|
353
347
|
if defaults_name is not None:
|
|
354
348
|
getReferenceExportCode(defaults_name, emit, context)
|
|
@@ -734,7 +728,7 @@ def generateFunctionCallCode(to_name, expression, emit, context):
|
|
|
734
728
|
|
|
735
729
|
arg_names = []
|
|
736
730
|
for count, arg_value in enumerate(argument_values, 1):
|
|
737
|
-
arg_name = context.allocateTempName("
|
|
731
|
+
arg_name = context.allocateTempName("direct_call_arg%d" % count)
|
|
738
732
|
|
|
739
733
|
generateExpressionCode(
|
|
740
734
|
to_name=arg_name, expression=arg_value, emit=emit, context=context
|