Nuitka-winsvc 2.4.11__cp311-cp311-win_amd64.whl → 2.5.6__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.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/METADATA +56 -109
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/RECORD +304 -280
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +31 -0
- nuitka/HardImportRegistry.py +8 -0
- nuitka/MainControl.py +9 -4
- nuitka/OptionParsing.py +108 -54
- nuitka/Options.py +69 -13
- nuitka/OutputDirectories.py +7 -2
- nuitka/PostProcessing.py +69 -38
- nuitka/Progress.py +16 -1
- nuitka/PythonVersions.py +2 -1
- nuitka/Serialization.py +4 -2
- nuitka/Tracing.py +69 -1
- nuitka/Version.py +2 -2
- nuitka/build/Backend.scons +45 -5
- nuitka/build/CCompilerVersion.scons +6 -0
- nuitka/build/Onefile.scons +6 -0
- nuitka/build/SconsCaching.py +4 -0
- nuitka/build/SconsCompilerSettings.py +14 -3
- nuitka/build/SconsInterface.py +3 -0
- nuitka/build/SconsUtils.py +5 -0
- nuitka/build/include/nuitka/allocator.h +124 -1
- nuitka/build/include/nuitka/calling.h +6 -6
- nuitka/build/include/nuitka/compiled_asyncgen.h +10 -7
- nuitka/build/include/nuitka/compiled_frame.h +2 -1
- nuitka/build/include/nuitka/constants.h +8 -0
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/exceptions.h +264 -121
- nuitka/build/include/nuitka/helper/attributes.h +0 -4
- nuitka/build/include/nuitka/helper/calling_generated.h +52 -52
- 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/dictionaries.h +75 -31
- nuitka/build/include/nuitka/helper/ints.h +86 -37
- nuitka/build/include/nuitka/helper/iterators.h +82 -34
- nuitka/build/include/nuitka/helper/operations.h +3 -0
- nuitka/build/include/nuitka/helper/operations_binary_add.h +6 -0
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +6 -0
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +3 -0
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +3 -0
- nuitka/build/include/nuitka/helper/raising.h +47 -28
- nuitka/build/include/nuitka/helper/richcomparisons.h +7 -0
- nuitka/build/include/nuitka/helper/tuples.h +12 -0
- nuitka/build/include/nuitka/helpers.h +12 -2
- nuitka/build/include/nuitka/prelude.h +36 -25
- nuitka/build/include/nuitka/printing.h +9 -7
- nuitka/build/include/nuitka/threading.h +15 -1
- nuitka/build/include/nuitka/type_aliases.h +3 -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 +307 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +45 -39
- nuitka/build/static_src/CompiledCellType.c +6 -4
- nuitka/build/static_src/CompiledCodeHelpers.c +106 -40
- nuitka/build/static_src/CompiledCoroutineType.c +41 -31
- nuitka/build/static_src/CompiledFrameType.c +110 -79
- nuitka/build/static_src/CompiledFunctionType.c +173 -151
- nuitka/build/static_src/CompiledGeneratorType.c +51 -49
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +433 -46
- nuitka/build/static_src/CompiledMethodType.c +6 -12
- nuitka/build/static_src/HelpersAllocator.c +266 -28
- nuitka/build/static_src/HelpersAttributes.c +0 -21
- nuitka/build/static_src/HelpersBuiltin.c +23 -14
- nuitka/build/static_src/HelpersCalling.c +7 -7
- nuitka/build/static_src/HelpersCallingGenerated.c +70 -70
- 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 +18 -4
- nuitka/build/static_src/HelpersComparisonGe.c +18 -4
- nuitka/build/static_src/HelpersComparisonGt.c +18 -4
- nuitka/build/static_src/HelpersComparisonLe.c +18 -4
- nuitka/build/static_src/HelpersComparisonLt.c +18 -4
- nuitka/build/static_src/HelpersComparisonNe.c +18 -4
- nuitka/build/static_src/HelpersConsole.c +34 -8
- nuitka/build/static_src/HelpersConstantsBlob.c +4 -2
- nuitka/build/static_src/HelpersDeepcopy.c +1 -0
- nuitka/build/static_src/HelpersDictionaries.c +195 -36
- nuitka/build/static_src/HelpersDictionariesGenerated.c +12 -107
- nuitka/build/static_src/HelpersExceptions.c +24 -50
- nuitka/build/static_src/HelpersFiles.c +79 -5
- nuitka/build/static_src/HelpersImport.c +13 -9
- nuitka/build/static_src/HelpersImportHard.c +23 -46
- nuitka/build/static_src/HelpersLists.c +98 -9
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +224 -6
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +3 -0
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +8 -2
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +14 -8
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +36 -36
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -0
- nuitka/build/static_src/HelpersOperationBinaryMod.c +22 -10
- nuitka/build/static_src/HelpersOperationBinaryMult.c +17 -7
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +14 -8
- nuitka/build/static_src/HelpersOperationBinaryPow.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +4 -4
- nuitka/build/static_src/HelpersOperationBinarySub.c +229 -8
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +8 -2
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +162 -10
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +20 -20
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -0
- nuitka/build/static_src/HelpersOperationInplaceMod.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceMult.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +11 -6
- nuitka/build/static_src/HelpersOperationInplacePow.c +20 -20
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +4 -4
- nuitka/build/static_src/HelpersOperationInplaceSub.c +163 -10
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +6 -1
- nuitka/build/static_src/HelpersProfiling.c +1 -1
- nuitka/build/static_src/HelpersRaising.c +255 -310
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +2 -2
- nuitka/build/static_src/HelpersTypes.c +98 -2
- nuitka/build/static_src/MainProgram.c +132 -28
- nuitka/build/static_src/MetaPathBasedLoader.c +18 -19
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +134 -11
- nuitka/build/static_src/OnefileBootstrap.c +6 -1
- nuitka/code_generation/AsyncgenCodes.py +2 -6
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +269 -167
- nuitka/code_generation/BuiltinCodes.py +9 -1
- nuitka/code_generation/CallCodes.py +16 -16
- nuitka/code_generation/CodeGeneration.py +14 -2
- nuitka/code_generation/CodeHelperSelection.py +1 -1
- nuitka/code_generation/CodeHelpers.py +4 -1
- nuitka/code_generation/CodeObjectCodes.py +2 -2
- nuitka/code_generation/ComparisonCodes.py +13 -2
- nuitka/code_generation/ComparisonHelperDefinitions.py +23 -8
- nuitka/code_generation/Contexts.py +28 -16
- nuitka/code_generation/CoroutineCodes.py +2 -6
- nuitka/code_generation/DictCodes.py +3 -3
- nuitka/code_generation/ErrorCodes.py +34 -50
- nuitka/code_generation/ExceptionCodes.py +165 -96
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +25 -10
- nuitka/code_generation/FrameCodes.py +4 -11
- nuitka/code_generation/FunctionCodes.py +2 -6
- nuitka/code_generation/GeneratorCodes.py +2 -6
- nuitka/code_generation/GlobalConstants.py +8 -2
- nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
- nuitka/code_generation/IteratorCodes.py +67 -54
- nuitka/code_generation/LineNumberCodes.py +1 -3
- nuitka/code_generation/ModuleCodes.py +28 -4
- nuitka/code_generation/OperationCodes.py +51 -20
- nuitka/code_generation/PackageResourceCodes.py +37 -0
- nuitka/code_generation/RaisingCodes.py +164 -90
- nuitka/code_generation/Reports.py +13 -5
- nuitka/code_generation/ReturnCodes.py +2 -16
- nuitka/code_generation/TryCodes.py +12 -24
- nuitka/code_generation/TypeAliasCodes.py +48 -0
- nuitka/code_generation/VariableCodes.py +99 -40
- nuitka/code_generation/VariableDeclarations.py +8 -8
- nuitka/code_generation/YieldCodes.py +1 -1
- nuitka/code_generation/c_types/CTypeBases.py +10 -2
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +3 -0
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +3 -4
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +70 -25
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +16 -6
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesConstants.py +11 -3
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +15 -16
- nuitka/code_generation/templates/CodeTemplatesFrames.py +18 -10
- nuitka/code_generation/templates/CodeTemplatesFunction.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -35
- nuitka/code_generation/templates/CodeTemplatesModules.py +34 -4
- nuitka/code_generation/templates/CodeTemplatesVariables.py +76 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +3 -3
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +4 -106
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -2
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- 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 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -4
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +31 -31
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
- nuitka/containers/Namedtuples.py +6 -0
- nuitka/containers/OrderedSets.py +105 -5
- nuitka/distutils/Build.py +14 -0
- nuitka/distutils/DistutilCommands.py +50 -10
- nuitka/finalizations/Finalization.py +3 -3
- nuitka/finalizations/FinalizeMarkups.py +10 -14
- nuitka/freezer/DependsExe.py +5 -2
- nuitka/freezer/DllDependenciesMacOS.py +18 -1
- nuitka/freezer/DllDependenciesWin32.py +26 -12
- nuitka/freezer/ImportDetection.py +6 -0
- nuitka/freezer/IncludedDataFiles.py +37 -6
- nuitka/freezer/Onefile.py +1 -0
- nuitka/freezer/Standalone.py +72 -18
- nuitka/importing/Importing.py +33 -6
- nuitka/importing/Recursion.py +5 -2
- nuitka/importing/StandardLibrary.py +57 -59
- nuitka/nodes/AsyncgenNodes.py +3 -6
- nuitka/nodes/BuiltinIteratorNodes.py +2 -2
- nuitka/nodes/BuiltinRefNodes.py +14 -30
- nuitka/nodes/ChildrenHavingMixins.py +439 -46
- nuitka/nodes/ConditionalNodes.py +3 -2
- nuitka/nodes/CoroutineNodes.py +3 -6
- nuitka/nodes/DictionaryNodes.py +1 -1
- nuitka/nodes/ExceptionNodes.py +102 -26
- nuitka/nodes/ExpressionBasesGenerated.py +288 -4
- nuitka/nodes/FrameNodes.py +22 -11
- nuitka/nodes/FunctionNodes.py +3 -3
- nuitka/nodes/GeneratorNodes.py +3 -6
- nuitka/nodes/HardImportNodesGenerated.py +182 -0
- nuitka/nodes/ImportNodes.py +2 -2
- nuitka/nodes/NodeBases.py +28 -1
- nuitka/nodes/NodeMakingHelpers.py +71 -50
- nuitka/nodes/OperatorNodesUnary.py +128 -3
- nuitka/nodes/OsSysNodes.py +37 -6
- nuitka/nodes/OutlineNodes.py +2 -2
- nuitka/nodes/StatementBasesGenerated.py +0 -2
- nuitka/nodes/StatementNodes.py +8 -7
- nuitka/nodes/SubscriptNodes.py +1 -1
- nuitka/nodes/TypeNodes.py +28 -1
- nuitka/nodes/VariableAssignNodes.py +2 -1
- nuitka/nodes/shapes/BuiltinTypeShapes.py +24 -7
- nuitka/nodes/shapes/IteratorShapes.py +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +18 -0
- nuitka/nodes/shapes/StandardShapes.py +47 -44
- nuitka/optimizations/BytecodeDemotion.py +2 -1
- nuitka/plugins/PluginBase.py +64 -22
- nuitka/plugins/Plugins.py +16 -3
- nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
- nuitka/plugins/standard/DllFilesPlugin.py +78 -2
- nuitka/plugins/standard/ImplicitImports.py +5 -15
- nuitka/plugins/standard/KivyPlugin.py +3 -12
- nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
- nuitka/plugins/standard/OptionsNannyPlugin.py +5 -4
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
- nuitka/plugins/standard/TkinterPlugin.py +23 -3
- nuitka/plugins/standard/TransformersPlugin.py +70 -275
- nuitka/plugins/standard/standard.nuitka-package.config.yml +413 -30
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +35 -2
- nuitka/reports/CompilationReportReader.py +12 -0
- nuitka/reports/Reports.py +11 -0
- nuitka/specs/BuiltinParameterSpecs.py +5 -1
- nuitka/specs/HardImportSpecs.py +7 -0
- nuitka/specs/ParameterSpecs.py +4 -4
- nuitka/tools/environments/Virtualenv.py +13 -5
- nuitka/tools/general/dll_report/__main__.py +10 -1
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/podman/__main__.py +4 -2
- nuitka/tools/specialize/CTypeDescriptions.py +158 -9
- nuitka/tools/specialize/SpecializeC.py +218 -56
- nuitka/tools/testing/Common.py +69 -62
- nuitka/tools/testing/compare_with_cpython/__main__.py +3 -1
- nuitka/tools/testing/measure_construct_performance/__main__.py +1 -8
- nuitka/tools/testing/run_nuitka_tests/__main__.py +77 -11
- nuitka/tools/watch/AutoStage.py +1 -0
- nuitka/tree/Building.py +10 -37
- nuitka/tree/ComplexCallHelperFunctions.py +4 -0
- nuitka/tree/ReformulationAssertStatements.py +31 -14
- nuitka/tree/ReformulationAssignmentStatements.py +5 -1
- nuitka/tree/ReformulationClasses3.py +94 -19
- nuitka/tree/ReformulationDictionaryCreation.py +1 -0
- nuitka/tree/ReformulationFunctionStatements.py +1 -1
- nuitka/tree/ReformulationMatchStatements.py +3 -1
- nuitka/tree/ReformulationYieldExpressions.py +23 -5
- nuitka/utils/CommandLineOptions.py +27 -3
- nuitka/utils/Download.py +2 -2
- nuitka/utils/Execution.py +36 -31
- nuitka/utils/FileOperations.py +18 -39
- nuitka/utils/Hashing.py +5 -1
- nuitka/utils/Importing.py +2 -14
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +9 -4
- nuitka/utils/Json.py +2 -2
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/SharedLibraries.py +24 -0
- nuitka/utils/Signing.py +9 -1
- nuitka/utils/Utils.py +1 -0
- {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka-run.cmd +0 -0
- {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka.cmd +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/top_level.txt +0 -0
|
@@ -6079,7 +6079,7 @@ ChildrenExpressionMakeSetLiteralMixin = ChildHavingElementsTupleMixin
|
|
|
6079
6079
|
ChildrenExpressionMakeTupleMixin = ChildHavingElementsTupleMixin
|
|
6080
6080
|
|
|
6081
6081
|
|
|
6082
|
-
class
|
|
6082
|
+
class ChildHavingExceptionTypeMixin(object):
|
|
6083
6083
|
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
6084
6084
|
__slots__ = ()
|
|
6085
6085
|
|
|
@@ -6089,23 +6089,15 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6089
6089
|
def __init__(
|
|
6090
6090
|
self,
|
|
6091
6091
|
exception_type,
|
|
6092
|
-
exception_value,
|
|
6093
6092
|
):
|
|
6094
6093
|
exception_type.parent = self
|
|
6095
6094
|
|
|
6096
6095
|
self.subnode_exception_type = exception_type
|
|
6097
6096
|
|
|
6098
|
-
exception_value.parent = self
|
|
6099
|
-
|
|
6100
|
-
self.subnode_exception_value = exception_value
|
|
6101
|
-
|
|
6102
6097
|
def getVisitableNodes(self):
|
|
6103
6098
|
"""The visitable nodes, with tuple values flattened."""
|
|
6104
6099
|
|
|
6105
|
-
return (
|
|
6106
|
-
self.subnode_exception_type,
|
|
6107
|
-
self.subnode_exception_value,
|
|
6108
|
-
)
|
|
6100
|
+
return (self.subnode_exception_type,)
|
|
6109
6101
|
|
|
6110
6102
|
def getVisitableNodesNamed(self):
|
|
6111
6103
|
"""Named children dictionary.
|
|
@@ -6113,10 +6105,7 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6113
6105
|
For use in cloning nodes, debugging and XML output.
|
|
6114
6106
|
"""
|
|
6115
6107
|
|
|
6116
|
-
return (
|
|
6117
|
-
("exception_type", self.subnode_exception_type),
|
|
6118
|
-
("exception_value", self.subnode_exception_value),
|
|
6119
|
-
)
|
|
6108
|
+
return (("exception_type", self.subnode_exception_type),)
|
|
6120
6109
|
|
|
6121
6110
|
def replaceChild(self, old_node, new_node):
|
|
6122
6111
|
value = self.subnode_exception_type
|
|
@@ -6127,14 +6116,6 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6127
6116
|
|
|
6128
6117
|
return
|
|
6129
6118
|
|
|
6130
|
-
value = self.subnode_exception_value
|
|
6131
|
-
if old_node is value:
|
|
6132
|
-
new_node.parent = self
|
|
6133
|
-
|
|
6134
|
-
self.subnode_exception_value = new_node
|
|
6135
|
-
|
|
6136
|
-
return
|
|
6137
|
-
|
|
6138
6119
|
raise AssertionError("Didn't find child", old_node, "in", self)
|
|
6139
6120
|
|
|
6140
6121
|
def getCloneArgs(self):
|
|
@@ -6145,7 +6126,6 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6145
6126
|
|
|
6146
6127
|
values = {
|
|
6147
6128
|
"exception_type": self.subnode_exception_type.makeClone(),
|
|
6148
|
-
"exception_value": self.subnode_exception_value.makeClone(),
|
|
6149
6129
|
}
|
|
6150
6130
|
|
|
6151
6131
|
values.update(self.getDetails())
|
|
@@ -6157,8 +6137,6 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6157
6137
|
|
|
6158
6138
|
self.subnode_exception_type.finalize()
|
|
6159
6139
|
del self.subnode_exception_type
|
|
6160
|
-
self.subnode_exception_value.finalize()
|
|
6161
|
-
del self.subnode_exception_value
|
|
6162
6140
|
|
|
6163
6141
|
def computeExpressionRaw(self, trace_collection):
|
|
6164
6142
|
"""Compute an expression.
|
|
@@ -6168,26 +6146,16 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6168
6146
|
be overloaded, e.g. conditional expressions.
|
|
6169
6147
|
"""
|
|
6170
6148
|
|
|
6171
|
-
# First apply the sub-
|
|
6172
|
-
|
|
6173
|
-
for count, sub_expression in enumerate(self.getVisitableNodes()):
|
|
6174
|
-
expression = trace_collection.onExpression(sub_expression)
|
|
6175
|
-
|
|
6176
|
-
if expression.willRaiseAnyException():
|
|
6177
|
-
sub_expressions = self.getVisitableNodes()
|
|
6178
|
-
|
|
6179
|
-
wrapped_expression = wrapExpressionWithSideEffects(
|
|
6180
|
-
side_effects=sub_expressions[:count],
|
|
6181
|
-
old_node=sub_expression,
|
|
6182
|
-
new_node=expression,
|
|
6183
|
-
)
|
|
6149
|
+
# First apply the sub-expression, as they it's evaluated before.
|
|
6150
|
+
expression = trace_collection.onExpression(self.subnode_exception_type)
|
|
6184
6151
|
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
)
|
|
6152
|
+
if expression.willRaiseAnyException():
|
|
6153
|
+
return (
|
|
6154
|
+
expression,
|
|
6155
|
+
"new_raise",
|
|
6156
|
+
lambda: "For '%s' the child expression '%s' will raise."
|
|
6157
|
+
% (self.getChildNameNice(), expression.getChildNameNice()),
|
|
6158
|
+
)
|
|
6191
6159
|
|
|
6192
6160
|
# Then ask ourselves to work on it.
|
|
6193
6161
|
return self.computeExpression(trace_collection)
|
|
@@ -6196,11 +6164,10 @@ class ChildrenHavingExceptionTypeExceptionValueMixin(object):
|
|
|
6196
6164
|
"""Collect variable reads and writes of child nodes."""
|
|
6197
6165
|
|
|
6198
6166
|
self.subnode_exception_type.collectVariableAccesses(emit_read, emit_write)
|
|
6199
|
-
self.subnode_exception_value.collectVariableAccesses(emit_read, emit_write)
|
|
6200
6167
|
|
|
6201
6168
|
|
|
6202
6169
|
# Assign the names that are easier to import with a stable name.
|
|
6203
|
-
ChildrenExpressionRaiseExceptionMixin =
|
|
6170
|
+
ChildrenExpressionRaiseExceptionMixin = ChildHavingExceptionTypeMixin
|
|
6204
6171
|
|
|
6205
6172
|
|
|
6206
6173
|
class ChildHavingExitCodeOptionalMixin(object):
|
|
@@ -13838,6 +13805,341 @@ class ChildHavingPathOptionalMixin(object):
|
|
|
13838
13805
|
ChildrenExpressionOsListdirMixin = ChildHavingPathOptionalMixin
|
|
13839
13806
|
|
|
13840
13807
|
|
|
13808
|
+
class ChildrenHavingPathOptionalDirFdOptionalMixin(object):
|
|
13809
|
+
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
13810
|
+
__slots__ = ()
|
|
13811
|
+
|
|
13812
|
+
# This is generated for use in
|
|
13813
|
+
# ExpressionOsLstat
|
|
13814
|
+
|
|
13815
|
+
def __init__(
|
|
13816
|
+
self,
|
|
13817
|
+
path,
|
|
13818
|
+
dir_fd,
|
|
13819
|
+
):
|
|
13820
|
+
if path is not None:
|
|
13821
|
+
path.parent = self
|
|
13822
|
+
|
|
13823
|
+
self.subnode_path = path
|
|
13824
|
+
|
|
13825
|
+
if dir_fd is not None:
|
|
13826
|
+
dir_fd.parent = self
|
|
13827
|
+
|
|
13828
|
+
self.subnode_dir_fd = dir_fd
|
|
13829
|
+
|
|
13830
|
+
def getVisitableNodes(self):
|
|
13831
|
+
"""The visitable nodes, with tuple values flattened."""
|
|
13832
|
+
|
|
13833
|
+
result = []
|
|
13834
|
+
value = self.subnode_path
|
|
13835
|
+
if value is None:
|
|
13836
|
+
pass
|
|
13837
|
+
else:
|
|
13838
|
+
result.append(value)
|
|
13839
|
+
value = self.subnode_dir_fd
|
|
13840
|
+
if value is None:
|
|
13841
|
+
pass
|
|
13842
|
+
else:
|
|
13843
|
+
result.append(value)
|
|
13844
|
+
return tuple(result)
|
|
13845
|
+
|
|
13846
|
+
def getVisitableNodesNamed(self):
|
|
13847
|
+
"""Named children dictionary.
|
|
13848
|
+
|
|
13849
|
+
For use in cloning nodes, debugging and XML output.
|
|
13850
|
+
"""
|
|
13851
|
+
|
|
13852
|
+
return (
|
|
13853
|
+
("path", self.subnode_path),
|
|
13854
|
+
("dir_fd", self.subnode_dir_fd),
|
|
13855
|
+
)
|
|
13856
|
+
|
|
13857
|
+
def replaceChild(self, old_node, new_node):
|
|
13858
|
+
value = self.subnode_path
|
|
13859
|
+
if old_node is value:
|
|
13860
|
+
if new_node is not None:
|
|
13861
|
+
new_node.parent = self
|
|
13862
|
+
|
|
13863
|
+
self.subnode_path = new_node
|
|
13864
|
+
|
|
13865
|
+
return
|
|
13866
|
+
|
|
13867
|
+
value = self.subnode_dir_fd
|
|
13868
|
+
if old_node is value:
|
|
13869
|
+
if new_node is not None:
|
|
13870
|
+
new_node.parent = self
|
|
13871
|
+
|
|
13872
|
+
self.subnode_dir_fd = new_node
|
|
13873
|
+
|
|
13874
|
+
return
|
|
13875
|
+
|
|
13876
|
+
raise AssertionError("Didn't find child", old_node, "in", self)
|
|
13877
|
+
|
|
13878
|
+
def getCloneArgs(self):
|
|
13879
|
+
"""Get clones of all children to pass for a new node.
|
|
13880
|
+
|
|
13881
|
+
Needs to make clones of child nodes too.
|
|
13882
|
+
"""
|
|
13883
|
+
|
|
13884
|
+
values = {
|
|
13885
|
+
"path": (
|
|
13886
|
+
self.subnode_path.makeClone() if self.subnode_path is not None else None
|
|
13887
|
+
),
|
|
13888
|
+
"dir_fd": (
|
|
13889
|
+
self.subnode_dir_fd.makeClone()
|
|
13890
|
+
if self.subnode_dir_fd is not None
|
|
13891
|
+
else None
|
|
13892
|
+
),
|
|
13893
|
+
}
|
|
13894
|
+
|
|
13895
|
+
values.update(self.getDetails())
|
|
13896
|
+
|
|
13897
|
+
return values
|
|
13898
|
+
|
|
13899
|
+
def finalize(self):
|
|
13900
|
+
del self.parent
|
|
13901
|
+
|
|
13902
|
+
if self.subnode_path is not None:
|
|
13903
|
+
self.subnode_path.finalize()
|
|
13904
|
+
del self.subnode_path
|
|
13905
|
+
if self.subnode_dir_fd is not None:
|
|
13906
|
+
self.subnode_dir_fd.finalize()
|
|
13907
|
+
del self.subnode_dir_fd
|
|
13908
|
+
|
|
13909
|
+
def computeExpressionRaw(self, trace_collection):
|
|
13910
|
+
"""Compute an expression.
|
|
13911
|
+
|
|
13912
|
+
Default behavior is to just visit the child expressions first, and
|
|
13913
|
+
then the node "computeExpression". For a few cases this needs to
|
|
13914
|
+
be overloaded, e.g. conditional expressions.
|
|
13915
|
+
"""
|
|
13916
|
+
|
|
13917
|
+
# First apply the sub-expressions, as they are evaluated before
|
|
13918
|
+
# the actual operation.
|
|
13919
|
+
for count, sub_expression in enumerate(self.getVisitableNodes()):
|
|
13920
|
+
expression = trace_collection.onExpression(sub_expression)
|
|
13921
|
+
|
|
13922
|
+
if expression.willRaiseAnyException():
|
|
13923
|
+
sub_expressions = self.getVisitableNodes()
|
|
13924
|
+
|
|
13925
|
+
wrapped_expression = wrapExpressionWithSideEffects(
|
|
13926
|
+
side_effects=sub_expressions[:count],
|
|
13927
|
+
old_node=sub_expression,
|
|
13928
|
+
new_node=expression,
|
|
13929
|
+
)
|
|
13930
|
+
|
|
13931
|
+
return (
|
|
13932
|
+
wrapped_expression,
|
|
13933
|
+
"new_raise",
|
|
13934
|
+
lambda: "For '%s' the child expression '%s' will raise."
|
|
13935
|
+
% (self.getChildNameNice(), expression.getChildNameNice()),
|
|
13936
|
+
)
|
|
13937
|
+
|
|
13938
|
+
# Then ask ourselves to work on it.
|
|
13939
|
+
return self.computeExpression(trace_collection)
|
|
13940
|
+
|
|
13941
|
+
def collectVariableAccesses(self, emit_read, emit_write):
|
|
13942
|
+
"""Collect variable reads and writes of child nodes."""
|
|
13943
|
+
|
|
13944
|
+
subnode_path = self.subnode_path
|
|
13945
|
+
|
|
13946
|
+
if subnode_path is not None:
|
|
13947
|
+
self.subnode_path.collectVariableAccesses(emit_read, emit_write)
|
|
13948
|
+
subnode_dir_fd = self.subnode_dir_fd
|
|
13949
|
+
|
|
13950
|
+
if subnode_dir_fd is not None:
|
|
13951
|
+
self.subnode_dir_fd.collectVariableAccesses(emit_read, emit_write)
|
|
13952
|
+
|
|
13953
|
+
|
|
13954
|
+
# Assign the names that are easier to import with a stable name.
|
|
13955
|
+
ChildrenExpressionOsLstatMixin = ChildrenHavingPathOptionalDirFdOptionalMixin
|
|
13956
|
+
|
|
13957
|
+
|
|
13958
|
+
class ChildrenHavingPathOptionalDirFdOptionalFollowSymlinksOptionalMixin(object):
|
|
13959
|
+
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
13960
|
+
__slots__ = ()
|
|
13961
|
+
|
|
13962
|
+
# This is generated for use in
|
|
13963
|
+
# ExpressionOsStat
|
|
13964
|
+
|
|
13965
|
+
def __init__(
|
|
13966
|
+
self,
|
|
13967
|
+
path,
|
|
13968
|
+
dir_fd,
|
|
13969
|
+
follow_symlinks,
|
|
13970
|
+
):
|
|
13971
|
+
if path is not None:
|
|
13972
|
+
path.parent = self
|
|
13973
|
+
|
|
13974
|
+
self.subnode_path = path
|
|
13975
|
+
|
|
13976
|
+
if dir_fd is not None:
|
|
13977
|
+
dir_fd.parent = self
|
|
13978
|
+
|
|
13979
|
+
self.subnode_dir_fd = dir_fd
|
|
13980
|
+
|
|
13981
|
+
if follow_symlinks is not None:
|
|
13982
|
+
follow_symlinks.parent = self
|
|
13983
|
+
|
|
13984
|
+
self.subnode_follow_symlinks = follow_symlinks
|
|
13985
|
+
|
|
13986
|
+
def getVisitableNodes(self):
|
|
13987
|
+
"""The visitable nodes, with tuple values flattened."""
|
|
13988
|
+
|
|
13989
|
+
result = []
|
|
13990
|
+
value = self.subnode_path
|
|
13991
|
+
if value is None:
|
|
13992
|
+
pass
|
|
13993
|
+
else:
|
|
13994
|
+
result.append(value)
|
|
13995
|
+
value = self.subnode_dir_fd
|
|
13996
|
+
if value is None:
|
|
13997
|
+
pass
|
|
13998
|
+
else:
|
|
13999
|
+
result.append(value)
|
|
14000
|
+
value = self.subnode_follow_symlinks
|
|
14001
|
+
if value is None:
|
|
14002
|
+
pass
|
|
14003
|
+
else:
|
|
14004
|
+
result.append(value)
|
|
14005
|
+
return tuple(result)
|
|
14006
|
+
|
|
14007
|
+
def getVisitableNodesNamed(self):
|
|
14008
|
+
"""Named children dictionary.
|
|
14009
|
+
|
|
14010
|
+
For use in cloning nodes, debugging and XML output.
|
|
14011
|
+
"""
|
|
14012
|
+
|
|
14013
|
+
return (
|
|
14014
|
+
("path", self.subnode_path),
|
|
14015
|
+
("dir_fd", self.subnode_dir_fd),
|
|
14016
|
+
("follow_symlinks", self.subnode_follow_symlinks),
|
|
14017
|
+
)
|
|
14018
|
+
|
|
14019
|
+
def replaceChild(self, old_node, new_node):
|
|
14020
|
+
value = self.subnode_path
|
|
14021
|
+
if old_node is value:
|
|
14022
|
+
if new_node is not None:
|
|
14023
|
+
new_node.parent = self
|
|
14024
|
+
|
|
14025
|
+
self.subnode_path = new_node
|
|
14026
|
+
|
|
14027
|
+
return
|
|
14028
|
+
|
|
14029
|
+
value = self.subnode_dir_fd
|
|
14030
|
+
if old_node is value:
|
|
14031
|
+
if new_node is not None:
|
|
14032
|
+
new_node.parent = self
|
|
14033
|
+
|
|
14034
|
+
self.subnode_dir_fd = new_node
|
|
14035
|
+
|
|
14036
|
+
return
|
|
14037
|
+
|
|
14038
|
+
value = self.subnode_follow_symlinks
|
|
14039
|
+
if old_node is value:
|
|
14040
|
+
if new_node is not None:
|
|
14041
|
+
new_node.parent = self
|
|
14042
|
+
|
|
14043
|
+
self.subnode_follow_symlinks = new_node
|
|
14044
|
+
|
|
14045
|
+
return
|
|
14046
|
+
|
|
14047
|
+
raise AssertionError("Didn't find child", old_node, "in", self)
|
|
14048
|
+
|
|
14049
|
+
def getCloneArgs(self):
|
|
14050
|
+
"""Get clones of all children to pass for a new node.
|
|
14051
|
+
|
|
14052
|
+
Needs to make clones of child nodes too.
|
|
14053
|
+
"""
|
|
14054
|
+
|
|
14055
|
+
values = {
|
|
14056
|
+
"path": (
|
|
14057
|
+
self.subnode_path.makeClone() if self.subnode_path is not None else None
|
|
14058
|
+
),
|
|
14059
|
+
"dir_fd": (
|
|
14060
|
+
self.subnode_dir_fd.makeClone()
|
|
14061
|
+
if self.subnode_dir_fd is not None
|
|
14062
|
+
else None
|
|
14063
|
+
),
|
|
14064
|
+
"follow_symlinks": (
|
|
14065
|
+
self.subnode_follow_symlinks.makeClone()
|
|
14066
|
+
if self.subnode_follow_symlinks is not None
|
|
14067
|
+
else None
|
|
14068
|
+
),
|
|
14069
|
+
}
|
|
14070
|
+
|
|
14071
|
+
values.update(self.getDetails())
|
|
14072
|
+
|
|
14073
|
+
return values
|
|
14074
|
+
|
|
14075
|
+
def finalize(self):
|
|
14076
|
+
del self.parent
|
|
14077
|
+
|
|
14078
|
+
if self.subnode_path is not None:
|
|
14079
|
+
self.subnode_path.finalize()
|
|
14080
|
+
del self.subnode_path
|
|
14081
|
+
if self.subnode_dir_fd is not None:
|
|
14082
|
+
self.subnode_dir_fd.finalize()
|
|
14083
|
+
del self.subnode_dir_fd
|
|
14084
|
+
if self.subnode_follow_symlinks is not None:
|
|
14085
|
+
self.subnode_follow_symlinks.finalize()
|
|
14086
|
+
del self.subnode_follow_symlinks
|
|
14087
|
+
|
|
14088
|
+
def computeExpressionRaw(self, trace_collection):
|
|
14089
|
+
"""Compute an expression.
|
|
14090
|
+
|
|
14091
|
+
Default behavior is to just visit the child expressions first, and
|
|
14092
|
+
then the node "computeExpression". For a few cases this needs to
|
|
14093
|
+
be overloaded, e.g. conditional expressions.
|
|
14094
|
+
"""
|
|
14095
|
+
|
|
14096
|
+
# First apply the sub-expressions, as they are evaluated before
|
|
14097
|
+
# the actual operation.
|
|
14098
|
+
for count, sub_expression in enumerate(self.getVisitableNodes()):
|
|
14099
|
+
expression = trace_collection.onExpression(sub_expression)
|
|
14100
|
+
|
|
14101
|
+
if expression.willRaiseAnyException():
|
|
14102
|
+
sub_expressions = self.getVisitableNodes()
|
|
14103
|
+
|
|
14104
|
+
wrapped_expression = wrapExpressionWithSideEffects(
|
|
14105
|
+
side_effects=sub_expressions[:count],
|
|
14106
|
+
old_node=sub_expression,
|
|
14107
|
+
new_node=expression,
|
|
14108
|
+
)
|
|
14109
|
+
|
|
14110
|
+
return (
|
|
14111
|
+
wrapped_expression,
|
|
14112
|
+
"new_raise",
|
|
14113
|
+
lambda: "For '%s' the child expression '%s' will raise."
|
|
14114
|
+
% (self.getChildNameNice(), expression.getChildNameNice()),
|
|
14115
|
+
)
|
|
14116
|
+
|
|
14117
|
+
# Then ask ourselves to work on it.
|
|
14118
|
+
return self.computeExpression(trace_collection)
|
|
14119
|
+
|
|
14120
|
+
def collectVariableAccesses(self, emit_read, emit_write):
|
|
14121
|
+
"""Collect variable reads and writes of child nodes."""
|
|
14122
|
+
|
|
14123
|
+
subnode_path = self.subnode_path
|
|
14124
|
+
|
|
14125
|
+
if subnode_path is not None:
|
|
14126
|
+
self.subnode_path.collectVariableAccesses(emit_read, emit_write)
|
|
14127
|
+
subnode_dir_fd = self.subnode_dir_fd
|
|
14128
|
+
|
|
14129
|
+
if subnode_dir_fd is not None:
|
|
14130
|
+
self.subnode_dir_fd.collectVariableAccesses(emit_read, emit_write)
|
|
14131
|
+
subnode_follow_symlinks = self.subnode_follow_symlinks
|
|
14132
|
+
|
|
14133
|
+
if subnode_follow_symlinks is not None:
|
|
14134
|
+
self.subnode_follow_symlinks.collectVariableAccesses(emit_read, emit_write)
|
|
14135
|
+
|
|
14136
|
+
|
|
14137
|
+
# Assign the names that are easier to import with a stable name.
|
|
14138
|
+
ChildrenExpressionOsStatMixin = (
|
|
14139
|
+
ChildrenHavingPathOptionalDirFdOptionalFollowSymlinksOptionalMixin
|
|
14140
|
+
)
|
|
14141
|
+
|
|
14142
|
+
|
|
13841
14143
|
class ChildrenHavingPosArgOptionalPairsTupleMixin(object):
|
|
13842
14144
|
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
13843
14145
|
__slots__ = ()
|
|
@@ -19927,6 +20229,97 @@ class ChildrenHavingTypeNameBasesDictArgMixin(object):
|
|
|
19927
20229
|
ChildrenExpressionBuiltinType3Mixin = ChildrenHavingTypeNameBasesDictArgMixin
|
|
19928
20230
|
|
|
19929
20231
|
|
|
20232
|
+
class ChildHavingTypeParamsMixin(object):
|
|
20233
|
+
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
20234
|
+
__slots__ = ()
|
|
20235
|
+
|
|
20236
|
+
# This is generated for use in
|
|
20237
|
+
# ExpressionTypeMakeGeneric
|
|
20238
|
+
|
|
20239
|
+
def __init__(
|
|
20240
|
+
self,
|
|
20241
|
+
type_params,
|
|
20242
|
+
):
|
|
20243
|
+
type_params.parent = self
|
|
20244
|
+
|
|
20245
|
+
self.subnode_type_params = type_params
|
|
20246
|
+
|
|
20247
|
+
def getVisitableNodes(self):
|
|
20248
|
+
"""The visitable nodes, with tuple values flattened."""
|
|
20249
|
+
|
|
20250
|
+
return (self.subnode_type_params,)
|
|
20251
|
+
|
|
20252
|
+
def getVisitableNodesNamed(self):
|
|
20253
|
+
"""Named children dictionary.
|
|
20254
|
+
|
|
20255
|
+
For use in cloning nodes, debugging and XML output.
|
|
20256
|
+
"""
|
|
20257
|
+
|
|
20258
|
+
return (("type_params", self.subnode_type_params),)
|
|
20259
|
+
|
|
20260
|
+
def replaceChild(self, old_node, new_node):
|
|
20261
|
+
value = self.subnode_type_params
|
|
20262
|
+
if old_node is value:
|
|
20263
|
+
new_node.parent = self
|
|
20264
|
+
|
|
20265
|
+
self.subnode_type_params = new_node
|
|
20266
|
+
|
|
20267
|
+
return
|
|
20268
|
+
|
|
20269
|
+
raise AssertionError("Didn't find child", old_node, "in", self)
|
|
20270
|
+
|
|
20271
|
+
def getCloneArgs(self):
|
|
20272
|
+
"""Get clones of all children to pass for a new node.
|
|
20273
|
+
|
|
20274
|
+
Needs to make clones of child nodes too.
|
|
20275
|
+
"""
|
|
20276
|
+
|
|
20277
|
+
values = {
|
|
20278
|
+
"type_params": self.subnode_type_params.makeClone(),
|
|
20279
|
+
}
|
|
20280
|
+
|
|
20281
|
+
values.update(self.getDetails())
|
|
20282
|
+
|
|
20283
|
+
return values
|
|
20284
|
+
|
|
20285
|
+
def finalize(self):
|
|
20286
|
+
del self.parent
|
|
20287
|
+
|
|
20288
|
+
self.subnode_type_params.finalize()
|
|
20289
|
+
del self.subnode_type_params
|
|
20290
|
+
|
|
20291
|
+
def computeExpressionRaw(self, trace_collection):
|
|
20292
|
+
"""Compute an expression.
|
|
20293
|
+
|
|
20294
|
+
Default behavior is to just visit the child expressions first, and
|
|
20295
|
+
then the node "computeExpression". For a few cases this needs to
|
|
20296
|
+
be overloaded, e.g. conditional expressions.
|
|
20297
|
+
"""
|
|
20298
|
+
|
|
20299
|
+
# First apply the sub-expression, as they it's evaluated before.
|
|
20300
|
+
expression = trace_collection.onExpression(self.subnode_type_params)
|
|
20301
|
+
|
|
20302
|
+
if expression.willRaiseAnyException():
|
|
20303
|
+
return (
|
|
20304
|
+
expression,
|
|
20305
|
+
"new_raise",
|
|
20306
|
+
lambda: "For '%s' the child expression '%s' will raise."
|
|
20307
|
+
% (self.getChildNameNice(), expression.getChildNameNice()),
|
|
20308
|
+
)
|
|
20309
|
+
|
|
20310
|
+
# Then ask ourselves to work on it.
|
|
20311
|
+
return self.computeExpression(trace_collection)
|
|
20312
|
+
|
|
20313
|
+
def collectVariableAccesses(self, emit_read, emit_write):
|
|
20314
|
+
"""Collect variable reads and writes of child nodes."""
|
|
20315
|
+
|
|
20316
|
+
self.subnode_type_params.collectVariableAccesses(emit_read, emit_write)
|
|
20317
|
+
|
|
20318
|
+
|
|
20319
|
+
# Assign the names that are easier to import with a stable name.
|
|
20320
|
+
ChildrenExpressionTypeMakeGenericMixin = ChildHavingTypeParamsMixin
|
|
20321
|
+
|
|
20322
|
+
|
|
19930
20323
|
class ChildrenHavingTypeParamsTupleComputeValueMixin(object):
|
|
19931
20324
|
# Mixins are not allowed to specify slots, pylint: disable=assigning-non-slot
|
|
19932
20325
|
__slots__ = ()
|
nuitka/nodes/ConditionalNodes.py
CHANGED
|
@@ -25,7 +25,8 @@ from .NodeMakingHelpers import (
|
|
|
25
25
|
wrapStatementWithSideEffects,
|
|
26
26
|
)
|
|
27
27
|
from .OperatorNodesUnary import ExpressionOperationNot
|
|
28
|
-
from .shapes.BuiltinTypeShapes import tshape_bool
|
|
28
|
+
from .shapes.BuiltinTypeShapes import tshape_bool
|
|
29
|
+
from .shapes.StandardShapes import tshape_unknown
|
|
29
30
|
from .StatementBasesGenerated import StatementConditionalBase
|
|
30
31
|
from .StatementNodes import StatementsSequence
|
|
31
32
|
|
|
@@ -754,7 +755,7 @@ Removed conditional statement without effect.""",
|
|
|
754
755
|
new_statement,
|
|
755
756
|
"new_statements",
|
|
756
757
|
"""\
|
|
757
|
-
Condition for branch statement was predicted to be always %s."""
|
|
758
|
+
Condition for branch statement was predicted to be always '%s'."""
|
|
758
759
|
% choice,
|
|
759
760
|
)
|
|
760
761
|
|
nuitka/nodes/CoroutineNodes.py
CHANGED
|
@@ -79,14 +79,11 @@ class ExpressionCoroutineObjectBody(ExpressionFunctionEntryPointBase):
|
|
|
79
79
|
def getFunctionName(self):
|
|
80
80
|
return self.name
|
|
81
81
|
|
|
82
|
-
def markAsNeedsGeneratorReturnHandling(self
|
|
83
|
-
self.needs_generator_return_exit =
|
|
84
|
-
|
|
85
|
-
def needsGeneratorReturnHandling(self):
|
|
86
|
-
return self.needs_generator_return_exit == 2
|
|
82
|
+
def markAsNeedsGeneratorReturnHandling(self):
|
|
83
|
+
self.needs_generator_return_exit = True
|
|
87
84
|
|
|
88
85
|
def needsGeneratorReturnExit(self):
|
|
89
|
-
return
|
|
86
|
+
return self.needs_generator_return_exit
|
|
90
87
|
|
|
91
88
|
@staticmethod
|
|
92
89
|
def needsCreation():
|
nuitka/nodes/DictionaryNodes.py
CHANGED
|
@@ -61,7 +61,7 @@ from .NodeMakingHelpers import (
|
|
|
61
61
|
makeStatementOnlyNodesFromExpressions,
|
|
62
62
|
wrapExpressionWithSideEffects,
|
|
63
63
|
)
|
|
64
|
-
from .shapes.
|
|
64
|
+
from .shapes.IteratorShapes import tshape_iterator
|
|
65
65
|
from .StatementBasesGenerated import (
|
|
66
66
|
StatementDictOperationRemoveBase,
|
|
67
67
|
StatementDictOperationSetBase,
|