Nuitka-winsvc 2.4.8__cp311-cp311-win_amd64.whl → 2.5.1__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.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/METADATA +2 -1
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/RECORD +294 -271
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +31 -0
- nuitka/HardImportRegistry.py +8 -0
- nuitka/MainControl.py +9 -4
- nuitka/OptionParsing.py +105 -52
- nuitka/Options.py +73 -16
- 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 +12 -2
- nuitka/build/SconsCompilerSettings.py +17 -6
- nuitka/build/SconsInterface.py +1 -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 +6 -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 +65 -29
- 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/helpers.h +12 -2
- nuitka/build/include/nuitka/prelude.h +35 -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 +104 -40
- nuitka/build/static_src/CompiledCoroutineType.c +40 -30
- 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 +424 -46
- nuitka/build/static_src/CompiledMethodType.c +10 -13
- nuitka/build/static_src/HelpersAllocator.c +270 -32
- nuitka/build/static_src/HelpersAttributes.c +0 -21
- nuitka/build/static_src/HelpersBuiltin.c +22 -13
- 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/HelpersComparisonEqUtils.c +1 -0
- 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 +10 -4
- nuitka/build/static_src/HelpersDictionaries.c +181 -34
- nuitka/build/static_src/HelpersDictionariesGenerated.c +0 -106
- 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/HelpersMatching.c +1 -1
- 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 +1 -1
- nuitka/build/static_src/HelpersTypes.c +98 -2
- nuitka/build/static_src/MainProgram.c +117 -29
- 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 +73 -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 +0 -105
- 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 +13 -3
- nuitka/freezer/DllDependenciesMacOS.py +18 -1
- nuitka/freezer/DllDependenciesWin32.py +26 -12
- nuitka/freezer/ImportDetection.py +3 -0
- nuitka/freezer/IncludedDataFiles.py +31 -8
- nuitka/freezer/IncludedEntryPoints.py +3 -2
- nuitka/freezer/Standalone.py +76 -18
- nuitka/importing/Importing.py +33 -6
- nuitka/importing/Recursion.py +12 -1
- nuitka/importing/StandardLibrary.py +57 -59
- nuitka/nodes/AsyncgenNodes.py +3 -6
- nuitka/nodes/BuiltinIteratorNodes.py +1 -1
- 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/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/shapes/BuiltinTypeShapes.py +24 -7
- nuitka/nodes/shapes/ShapeMixins.py +17 -0
- nuitka/nodes/shapes/StandardShapes.py +53 -1
- nuitka/optimizations/BytecodeDemotion.py +2 -1
- nuitka/plugins/PluginBase.py +64 -22
- nuitka/plugins/Plugins.py +6 -3
- nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
- nuitka/plugins/standard/ImplicitImports.py +1 -13
- nuitka/plugins/standard/KivyPlugin.py +3 -12
- nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
- nuitka/plugins/standard/TkinterPlugin.py +0 -56
- nuitka/plugins/standard/TransformersPlugin.py +70 -275
- nuitka/plugins/standard/standard.nuitka-package.config.yml +510 -28
- 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/general/dll_report/__main__.py +10 -1
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/specialize/CTypeDescriptions.py +158 -9
- nuitka/tools/specialize/SpecializeC.py +218 -56
- nuitka/tools/testing/Common.py +70 -63
- 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 +39 -54
- 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/Utils.py +17 -0
- {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka-run.cmd +0 -0
- {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka.cmd +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/top_level.txt +0 -0
|
@@ -307,7 +307,6 @@ Py_CLEAR(%(frame_identifier)s->m_frame.f_locals);
|
|
|
307
307
|
frame_init_code=frame_init_code,
|
|
308
308
|
frame_exit_code=frame_exit_code,
|
|
309
309
|
context_identifier=context_identifier,
|
|
310
|
-
is_python34_or_later=python_version >= 0x340,
|
|
311
310
|
is_python3=python_version >= 0x300,
|
|
312
311
|
)
|
|
313
312
|
)
|
|
@@ -326,9 +325,7 @@ Py_CLEAR(%(frame_identifier)s->m_frame.f_locals);
|
|
|
326
325
|
|
|
327
326
|
if frame_exception_exit is not None:
|
|
328
327
|
(
|
|
329
|
-
|
|
330
|
-
_exception_value,
|
|
331
|
-
exception_tb,
|
|
328
|
+
exception_state_name,
|
|
332
329
|
exception_lineno,
|
|
333
330
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
334
331
|
|
|
@@ -345,7 +342,7 @@ Py_CLEAR(%(frame_identifier)s->m_frame.f_locals);
|
|
|
345
342
|
frame_exception_exit=frame_exception_exit,
|
|
346
343
|
frame_exit_code=frame_exit_code,
|
|
347
344
|
needs_preserve=needs_preserve,
|
|
348
|
-
|
|
345
|
+
exception_state_name=exception_state_name,
|
|
349
346
|
exception_lineno=exception_lineno,
|
|
350
347
|
)
|
|
351
348
|
)
|
|
@@ -367,9 +364,7 @@ def getFrameGuardGeneratorCode(
|
|
|
367
364
|
# We really need this many parameters here and it gets very
|
|
368
365
|
# detail rich, pylint: disable=too-many-locals
|
|
369
366
|
(
|
|
370
|
-
|
|
371
|
-
_exception_value,
|
|
372
|
-
exception_tb,
|
|
367
|
+
exception_state_name,
|
|
373
368
|
exception_lineno,
|
|
374
369
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
375
370
|
|
|
@@ -410,7 +405,6 @@ def getFrameGuardGeneratorCode(
|
|
|
410
405
|
frame_init_code=frame_init_code,
|
|
411
406
|
frame_exit_code=frame_exit_code,
|
|
412
407
|
is_generator=is_generator,
|
|
413
|
-
is_python34_or_later=python_version >= 0x340,
|
|
414
408
|
is_python3=python_version >= 0x300,
|
|
415
409
|
)
|
|
416
410
|
)
|
|
@@ -432,8 +426,7 @@ def getFrameGuardGeneratorCode(
|
|
|
432
426
|
"context_identifier": context_identifier,
|
|
433
427
|
"frame_identifier": frame_identifier,
|
|
434
428
|
"frame_cache_identifier": frame_cache_identifier,
|
|
435
|
-
"
|
|
436
|
-
"exception_tb": exception_tb,
|
|
429
|
+
"exception_state_name": exception_state_name,
|
|
437
430
|
"exception_lineno": exception_lineno,
|
|
438
431
|
"tb_making": getTracebackMakingIdentifier(
|
|
439
432
|
context=context, lineno_name=exception_lineno
|
|
@@ -662,17 +662,13 @@ def _getFunctionCode(
|
|
|
662
662
|
|
|
663
663
|
if needs_exception_exit:
|
|
664
664
|
(
|
|
665
|
-
|
|
666
|
-
exception_value,
|
|
667
|
-
exception_tb,
|
|
665
|
+
exception_state_name,
|
|
668
666
|
_exception_lineno,
|
|
669
667
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
670
668
|
|
|
671
669
|
function_exit += template_function_exception_exit % {
|
|
672
670
|
"function_cleanup": indented(function_cleanup),
|
|
673
|
-
"
|
|
674
|
-
"exception_value": exception_value,
|
|
675
|
-
"exception_tb": exception_tb,
|
|
671
|
+
"exception_state_name": exception_state_name,
|
|
676
672
|
}
|
|
677
673
|
|
|
678
674
|
if context.hasTempName("return_value"):
|
|
@@ -82,17 +82,13 @@ def getGeneratorObjectCode(
|
|
|
82
82
|
|
|
83
83
|
if needs_exception_exit:
|
|
84
84
|
(
|
|
85
|
-
|
|
86
|
-
exception_value,
|
|
87
|
-
exception_tb,
|
|
85
|
+
exception_state_name,
|
|
88
86
|
_exception_lineno,
|
|
89
87
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
90
88
|
|
|
91
89
|
generator_exit = template_generator_exception_exit % {
|
|
92
90
|
"function_cleanup": indented(function_cleanup),
|
|
93
|
-
"
|
|
94
|
-
"exception_value": exception_value,
|
|
95
|
-
"exception_tb": exception_tb,
|
|
91
|
+
"exception_state_name": exception_state_name,
|
|
96
92
|
}
|
|
97
93
|
else:
|
|
98
94
|
generator_exit = template_generator_noexception_exit % {
|
|
@@ -92,6 +92,8 @@ def getConstantDefaultPopulation():
|
|
|
92
92
|
# Meta path based loader.
|
|
93
93
|
"read",
|
|
94
94
|
"rb",
|
|
95
|
+
"w",
|
|
96
|
+
"b",
|
|
95
97
|
# File handling
|
|
96
98
|
"/",
|
|
97
99
|
"\\",
|
|
@@ -105,10 +107,15 @@ def getConstantDefaultPopulation():
|
|
|
105
107
|
"isdir",
|
|
106
108
|
"isfile",
|
|
107
109
|
"listdir",
|
|
110
|
+
"stat",
|
|
111
|
+
"close",
|
|
108
112
|
]
|
|
109
113
|
|
|
114
|
+
if python_version < 0x300:
|
|
115
|
+
result += ("lstat",)
|
|
116
|
+
|
|
110
117
|
# Pickling of instance methods.
|
|
111
|
-
if python_version <
|
|
118
|
+
if python_version < 0x300:
|
|
112
119
|
result += ("__newobj__",)
|
|
113
120
|
else:
|
|
114
121
|
result += ("getattr",)
|
|
@@ -143,7 +150,6 @@ def getConstantDefaultPopulation():
|
|
|
143
150
|
result += (
|
|
144
151
|
# YIELD_FROM uses this
|
|
145
152
|
"throw",
|
|
146
|
-
"close",
|
|
147
153
|
)
|
|
148
154
|
|
|
149
155
|
if python_version < 0x300:
|
|
@@ -22,7 +22,7 @@ from .templates.CodeTemplatesVariables import (
|
|
|
22
22
|
)
|
|
23
23
|
from .VariableCodes import (
|
|
24
24
|
getLocalVariableDeclaration,
|
|
25
|
-
|
|
25
|
+
getNonModuleVariableReferenceCode,
|
|
26
26
|
)
|
|
27
27
|
from .VariableDeclarations import VariableDeclaration
|
|
28
28
|
|
|
@@ -118,7 +118,7 @@ def _getVariableDictUpdateCode(
|
|
|
118
118
|
|
|
119
119
|
access_code = SourceCodeCollector()
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
getNonModuleVariableReferenceCode(
|
|
122
122
|
to_name=VariableDeclaration("PyObject *", "value", None, None),
|
|
123
123
|
variable=variable,
|
|
124
124
|
variable_trace=variable_trace,
|
|
@@ -26,10 +26,7 @@ from .ErrorCodes import (
|
|
|
26
26
|
from .Indentation import indented
|
|
27
27
|
from .LineNumberCodes import getErrorLineNumberUpdateCode
|
|
28
28
|
from .PythonAPICodes import generateCAPIObjectCode
|
|
29
|
-
from .templates.CodeTemplatesIterators import
|
|
30
|
-
template_iterator_check,
|
|
31
|
-
template_loop_break_next,
|
|
32
|
-
)
|
|
29
|
+
from .templates.CodeTemplatesIterators import template_loop_break_next
|
|
33
30
|
|
|
34
31
|
|
|
35
32
|
def generateBuiltinNext1Code(to_name, expression, emit, context):
|
|
@@ -37,15 +34,38 @@ def generateBuiltinNext1Code(to_name, expression, emit, context):
|
|
|
37
34
|
expression=expression, emit=emit, context=context
|
|
38
35
|
)
|
|
39
36
|
|
|
37
|
+
(
|
|
38
|
+
exception_state_name,
|
|
39
|
+
_exception_lineno,
|
|
40
|
+
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
41
|
+
|
|
40
42
|
with withObjectCodeTemporaryAssignment(
|
|
41
43
|
to_name, "next_value", expression, emit, context
|
|
42
44
|
) as result_name:
|
|
43
|
-
|
|
45
|
+
# TODO: Make use of "ITERATOR_NEXT_ITERATOR" in case of known type shape
|
|
46
|
+
# iterator.
|
|
47
|
+
emit(
|
|
48
|
+
"""\
|
|
49
|
+
%(to_name)s = ITERATOR_NEXT(%(iterator_name)s);
|
|
50
|
+
if (%(to_name)s == NULL) {
|
|
51
|
+
FETCH_ERROR_OCCURRED_STATE(tstate, &%(exception_state_name)s);
|
|
52
|
+
|
|
53
|
+
if (!HAS_EXCEPTION_STATE(&%(exception_state_name)s)) {
|
|
54
|
+
SET_EXCEPTION_PRESERVATION_STATE_STOP_ITERATION_EMPTY(tstate, &%(exception_state_name)s);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
"""
|
|
58
|
+
% {
|
|
59
|
+
"to_name": result_name,
|
|
60
|
+
"iterator_name": value_name,
|
|
61
|
+
"exception_state_name": exception_state_name,
|
|
62
|
+
}
|
|
63
|
+
)
|
|
44
64
|
|
|
45
65
|
getErrorExitCode(
|
|
46
66
|
check_name=result_name,
|
|
47
67
|
release_name=value_name,
|
|
48
|
-
|
|
68
|
+
fetched_exception=True,
|
|
49
69
|
emit=emit,
|
|
50
70
|
context=context,
|
|
51
71
|
)
|
|
@@ -53,8 +73,11 @@ def generateBuiltinNext1Code(to_name, expression, emit, context):
|
|
|
53
73
|
context.addCleanupTempName(result_name)
|
|
54
74
|
|
|
55
75
|
|
|
56
|
-
def getBuiltinLoopBreakNextCode(to_name, value, emit, context):
|
|
57
|
-
|
|
76
|
+
def getBuiltinLoopBreakNextCode(expression, to_name, value, emit, context):
|
|
77
|
+
if expression.getTypeShape().isShapeIterator():
|
|
78
|
+
emit("%s = %s;" % (to_name, "ITERATOR_NEXT_ITERATOR(%s)" % value))
|
|
79
|
+
else:
|
|
80
|
+
emit("%s = %s;" % (to_name, "ITERATOR_NEXT(%s)" % value))
|
|
58
81
|
|
|
59
82
|
getReleaseCode(release_name=value, emit=emit, context=context)
|
|
60
83
|
|
|
@@ -66,9 +89,7 @@ def getBuiltinLoopBreakNextCode(to_name, value, emit, context):
|
|
|
66
89
|
break_indicator_code = ""
|
|
67
90
|
|
|
68
91
|
(
|
|
69
|
-
|
|
70
|
-
exception_value,
|
|
71
|
-
exception_tb,
|
|
92
|
+
exception_state_name,
|
|
72
93
|
_exception_lineno,
|
|
73
94
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
74
95
|
|
|
@@ -78,15 +99,13 @@ def getBuiltinLoopBreakNextCode(to_name, value, emit, context):
|
|
|
78
99
|
"to_name": to_name,
|
|
79
100
|
"break_indicator_code": break_indicator_code,
|
|
80
101
|
"break_target": break_target,
|
|
81
|
-
"release_temps": indented(getErrorExitReleaseCode(context),
|
|
102
|
+
"release_temps": indented(getErrorExitReleaseCode(context), 8),
|
|
82
103
|
"var_description_code": indented(
|
|
83
|
-
getFrameVariableTypeDescriptionCode(context),
|
|
104
|
+
getFrameVariableTypeDescriptionCode(context), 8
|
|
84
105
|
),
|
|
85
|
-
"line_number_code": indented(getErrorLineNumberUpdateCode(context),
|
|
106
|
+
"line_number_code": indented(getErrorLineNumberUpdateCode(context), 8),
|
|
86
107
|
"exception_target": context.getExceptionEscape(),
|
|
87
|
-
"
|
|
88
|
-
"exception_value": exception_value,
|
|
89
|
-
"exception_tb": exception_tb,
|
|
108
|
+
"exception_state_name": exception_state_name,
|
|
90
109
|
}
|
|
91
110
|
)
|
|
92
111
|
|
|
@@ -111,19 +130,35 @@ def generateSpecialUnpackCode(to_name, expression, emit, context):
|
|
|
111
130
|
if not needs_check:
|
|
112
131
|
emit("%s = UNPACK_NEXT_INFALLIBLE(%s);" % (result_name, value_name))
|
|
113
132
|
elif python_version < 0x350:
|
|
133
|
+
(
|
|
134
|
+
exception_state_name,
|
|
135
|
+
_exception_lineno,
|
|
136
|
+
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
137
|
+
|
|
114
138
|
emit(
|
|
115
|
-
"%s = UNPACK_NEXT(tstate, %s, %s);"
|
|
116
|
-
% (
|
|
139
|
+
"%s = UNPACK_NEXT(tstate, &%s, %s, %s);"
|
|
140
|
+
% (
|
|
141
|
+
result_name,
|
|
142
|
+
exception_state_name,
|
|
143
|
+
value_name,
|
|
144
|
+
expression.getCount() - 1,
|
|
145
|
+
)
|
|
117
146
|
)
|
|
118
147
|
else:
|
|
119
148
|
starred = expression.getStarred()
|
|
120
149
|
expected = expression.getExpected()
|
|
121
150
|
|
|
151
|
+
(
|
|
152
|
+
exception_state_name,
|
|
153
|
+
_exception_lineno,
|
|
154
|
+
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
155
|
+
|
|
122
156
|
emit(
|
|
123
|
-
"%s = UNPACK_NEXT%s(tstate, %s, %s, %s);"
|
|
157
|
+
"%s = UNPACK_NEXT%s(tstate, &%s, %s, %s, %s);"
|
|
124
158
|
% (
|
|
125
159
|
result_name,
|
|
126
160
|
"_STARRED" if starred else "",
|
|
161
|
+
exception_state_name,
|
|
127
162
|
value_name,
|
|
128
163
|
expression.getCount() - 1,
|
|
129
164
|
expected,
|
|
@@ -133,8 +168,8 @@ def generateSpecialUnpackCode(to_name, expression, emit, context):
|
|
|
133
168
|
getErrorExitCode(
|
|
134
169
|
check_name=result_name,
|
|
135
170
|
release_name=value_name,
|
|
136
|
-
quick_exception="StopIteration",
|
|
137
171
|
needs_check=needs_check,
|
|
172
|
+
fetched_exception=True,
|
|
138
173
|
emit=emit,
|
|
139
174
|
context=context,
|
|
140
175
|
)
|
|
@@ -152,47 +187,25 @@ def generateUnpackCheckCode(statement, emit, context):
|
|
|
152
187
|
context=context,
|
|
153
188
|
)
|
|
154
189
|
|
|
155
|
-
# These variable cannot collide, as it's used very locally.
|
|
156
|
-
attempt_name = context.allocateTempName("iterator_attempt", unique=True)
|
|
157
|
-
|
|
158
|
-
release_code = getErrorExitReleaseCode(context)
|
|
159
|
-
var_description_code = getFrameVariableTypeDescriptionCode(context)
|
|
160
|
-
|
|
161
190
|
with context.withCurrentSourceCodeReference(statement.getSourceReference()):
|
|
162
191
|
(
|
|
163
|
-
|
|
164
|
-
exception_value,
|
|
165
|
-
exception_tb,
|
|
192
|
+
exception_state_name,
|
|
166
193
|
_exception_lineno,
|
|
167
194
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
168
195
|
|
|
196
|
+
res_name = context.getBoolResName()
|
|
197
|
+
|
|
169
198
|
emit(
|
|
170
|
-
|
|
171
|
-
%
|
|
172
|
-
"iterator_name": iterator_name,
|
|
173
|
-
"attempt_name": attempt_name,
|
|
174
|
-
"exception_exit": context.getExceptionEscape(),
|
|
175
|
-
"release_temps_1": indented(release_code, 3),
|
|
176
|
-
"line_number_code_1": indented(
|
|
177
|
-
getErrorLineNumberUpdateCode(context), 3
|
|
178
|
-
),
|
|
179
|
-
"var_description_code_1": indented(var_description_code, 3),
|
|
180
|
-
"release_temps_2": indented(release_code),
|
|
181
|
-
"var_description_code_2": indented(var_description_code),
|
|
182
|
-
"line_number_code_2": indented(getErrorLineNumberUpdateCode(context)),
|
|
183
|
-
"exception_type": exception_type,
|
|
184
|
-
"exception_value": exception_value,
|
|
185
|
-
"exception_tb": exception_tb,
|
|
186
|
-
"too_many_values_error": context.getConstantCode(
|
|
187
|
-
"too many values to unpack"
|
|
188
|
-
if python_version < 0x300
|
|
189
|
-
else "too many values to unpack (expected %d)"
|
|
190
|
-
% statement.getCount()
|
|
191
|
-
),
|
|
192
|
-
}
|
|
199
|
+
"%s = UNPACK_ITERATOR_CHECK(tstate, &%s, %s, %d);"
|
|
200
|
+
% (res_name, exception_state_name, iterator_name, statement.getCount())
|
|
193
201
|
)
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
getErrorExitBoolCode(
|
|
204
|
+
condition="%s == false" % res_name,
|
|
205
|
+
fetched_exception=True,
|
|
206
|
+
emit=emit,
|
|
207
|
+
context=context,
|
|
208
|
+
)
|
|
196
209
|
|
|
197
210
|
|
|
198
211
|
def generateUnpackCheckFromIteratedCode(statement, emit, context):
|
|
@@ -33,9 +33,7 @@ def getLineNumberUpdateCode(context):
|
|
|
33
33
|
|
|
34
34
|
def getErrorLineNumberUpdateCode(context):
|
|
35
35
|
(
|
|
36
|
-
|
|
37
|
-
_exception_value,
|
|
38
|
-
_exception_tb,
|
|
36
|
+
_exception_state,
|
|
39
37
|
exception_lineno,
|
|
40
38
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
41
39
|
|
|
@@ -25,7 +25,13 @@ from .templates.CodeTemplatesModules import (
|
|
|
25
25
|
template_module_external_entry_point,
|
|
26
26
|
template_module_no_exception_exit,
|
|
27
27
|
)
|
|
28
|
-
from .
|
|
28
|
+
from .templates.CodeTemplatesVariables import (
|
|
29
|
+
template_module_variable_accessor_function,
|
|
30
|
+
)
|
|
31
|
+
from .VariableCodes import (
|
|
32
|
+
getModuleVariableAccessorCodeName,
|
|
33
|
+
getModuleVariableReferenceCode,
|
|
34
|
+
)
|
|
29
35
|
|
|
30
36
|
|
|
31
37
|
def getModuleAccessCode(context):
|
|
@@ -133,6 +139,22 @@ def getModuleCode(
|
|
|
133
139
|
module_dll_entry_point_prefix + module_dll_entry_point.decode("ascii")
|
|
134
140
|
)
|
|
135
141
|
|
|
142
|
+
module_variable_accessor_codes = []
|
|
143
|
+
for module_variable_name, caching in sorted(
|
|
144
|
+
context.getModuleVariableAccessors().items()
|
|
145
|
+
):
|
|
146
|
+
module_variable_accessor_codes.append(
|
|
147
|
+
template_module_variable_accessor_function
|
|
148
|
+
% {
|
|
149
|
+
"accessor_function_name": getModuleVariableAccessorCodeName(
|
|
150
|
+
module_identifier, module_variable_name
|
|
151
|
+
),
|
|
152
|
+
"var_name": context.getConstantCode(constant=module_variable_name),
|
|
153
|
+
"module_identifier": module_identifier,
|
|
154
|
+
"caching": "1" if caching else "0",
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
|
|
136
158
|
return template % {
|
|
137
159
|
"module_name_cstr": encodePythonStringToC(
|
|
138
160
|
module_name.asString().encode("utf8")
|
|
@@ -148,6 +170,8 @@ def getModuleCode(
|
|
|
148
170
|
"module_functions_code": function_body_codes,
|
|
149
171
|
"module_function_table_entries": indented(function_table_entries_decl),
|
|
150
172
|
"temps_decl": indented(local_var_inits),
|
|
173
|
+
"module_variable_accessors": indented(module_variable_accessor_codes, 0),
|
|
174
|
+
"module_variable_accessors_count": len(module_variable_accessor_codes),
|
|
151
175
|
"module_init_codes": indented(context.getModuleInitCodes()),
|
|
152
176
|
"module_codes": indented(module_codes.codes),
|
|
153
177
|
"module_exit": module_exit,
|
|
@@ -169,10 +193,10 @@ def generateModuleAttributeFileCode(to_name, expression, emit, context):
|
|
|
169
193
|
|
|
170
194
|
|
|
171
195
|
def generateModuleAttributeCode(to_name, expression, emit, context):
|
|
172
|
-
|
|
196
|
+
getModuleVariableReferenceCode(
|
|
173
197
|
to_name=to_name,
|
|
174
|
-
|
|
175
|
-
|
|
198
|
+
variable_name=expression.getVariable().getName(),
|
|
199
|
+
use_caching=False,
|
|
176
200
|
needs_check=False,
|
|
177
201
|
conversion_check=decideConversionCheckNeeded(to_name, expression),
|
|
178
202
|
emit=emit,
|
|
@@ -82,7 +82,7 @@ def generateOperationUnaryCode(to_name, expression, emit, context):
|
|
|
82
82
|
expression=expression,
|
|
83
83
|
operator=expression.getOperator(),
|
|
84
84
|
arg_name=arg_name,
|
|
85
|
-
needs_check=expression.
|
|
85
|
+
needs_check=expression.mayRaiseExceptionOperation(),
|
|
86
86
|
emit=emit,
|
|
87
87
|
context=context,
|
|
88
88
|
)
|
|
@@ -113,6 +113,7 @@ def _getBinaryOperationCode(
|
|
|
113
113
|
else "never"
|
|
114
114
|
)
|
|
115
115
|
),
|
|
116
|
+
context=context,
|
|
116
117
|
)
|
|
117
118
|
|
|
118
119
|
prefix = "%s_OPERATION_%s" % (
|
|
@@ -146,13 +147,13 @@ def _getBinaryOperationCode(
|
|
|
146
147
|
# can really raise. Once we have expression for types depending on the
|
|
147
148
|
# value to raise or not, this will get us into trouble, due to using a
|
|
148
149
|
# fallback
|
|
150
|
+
# helper_type = CTypeBool
|
|
149
151
|
|
|
150
152
|
# TODO: For now to achieve old behavior, we are going to change to
|
|
151
153
|
# CBOOL for those that cannot raise later.
|
|
152
154
|
if helper_type is CTypeVoid:
|
|
153
155
|
helper_type = CTypeNuitkaBoolEnum
|
|
154
|
-
|
|
155
|
-
report_missing = False
|
|
156
|
+
report_missing = False
|
|
156
157
|
|
|
157
158
|
# If a more specific C type was picked that "PyObject *" then we can use that to have the helper.
|
|
158
159
|
helper_type, helper_function = selectCodeHelper(
|
|
@@ -253,9 +254,13 @@ def _getBinaryOperationCode(
|
|
|
253
254
|
if needs_argument_swap:
|
|
254
255
|
arg1_name = right_name
|
|
255
256
|
arg2_name = left_name
|
|
257
|
+
arg1_c_type = right_c_type
|
|
258
|
+
arg2_c_type = left_c_type
|
|
256
259
|
else:
|
|
257
260
|
arg1_name = left_name
|
|
258
261
|
arg2_name = right_name
|
|
262
|
+
arg1_c_type = left_c_type
|
|
263
|
+
arg2_c_type = right_c_type
|
|
259
264
|
|
|
260
265
|
# May need to convert return value.
|
|
261
266
|
if helper_type is not target_type:
|
|
@@ -267,36 +272,62 @@ def _getBinaryOperationCode(
|
|
|
267
272
|
else:
|
|
268
273
|
value_name = to_name
|
|
269
274
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
if helper_type.isDualType():
|
|
276
|
+
res_name = context.getBoolResName()
|
|
277
|
+
|
|
278
|
+
# TODO: If possible, pass variable storage directly to avoid useless
|
|
279
|
+
# copy.
|
|
280
|
+
emit(
|
|
281
|
+
"%s = %s(&%s, %s%s, %s%s);"
|
|
282
|
+
% (
|
|
283
|
+
res_name,
|
|
284
|
+
helper_function,
|
|
285
|
+
value_name,
|
|
286
|
+
"&" if arg1_c_type.isDualType() else "",
|
|
287
|
+
arg1_name,
|
|
288
|
+
"&" if arg2_c_type.isDualType() else "",
|
|
289
|
+
arg2_name,
|
|
290
|
+
)
|
|
277
291
|
)
|
|
278
|
-
)
|
|
279
292
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
check_name=value_name,
|
|
293
|
+
getErrorExitBoolCode(
|
|
294
|
+
condition="%s == false" % res_name,
|
|
283
295
|
release_names=(left_name, right_name),
|
|
284
296
|
needs_check=needs_check,
|
|
285
297
|
emit=emit,
|
|
286
298
|
context=context,
|
|
287
299
|
)
|
|
288
300
|
else:
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
301
|
+
emit(
|
|
302
|
+
"%s = %s(%s, %s);"
|
|
303
|
+
% (
|
|
304
|
+
value_name,
|
|
305
|
+
helper_function,
|
|
306
|
+
arg1_name,
|
|
307
|
+
arg2_name,
|
|
308
|
+
)
|
|
294
309
|
)
|
|
295
310
|
|
|
311
|
+
if value_name.getCType().hasErrorIndicator():
|
|
312
|
+
getErrorExitCode(
|
|
313
|
+
check_name=value_name,
|
|
314
|
+
release_names=(left_name, right_name),
|
|
315
|
+
needs_check=needs_check,
|
|
316
|
+
emit=emit,
|
|
317
|
+
context=context,
|
|
318
|
+
)
|
|
319
|
+
else:
|
|
320
|
+
# Otherwise we picked the wrong kind of helper.
|
|
321
|
+
assert not needs_check, value_name.getCType()
|
|
322
|
+
|
|
323
|
+
getReleaseCodes(
|
|
324
|
+
release_names=(left_name, right_name), emit=emit, context=context
|
|
325
|
+
)
|
|
326
|
+
|
|
296
327
|
# TODO: Depending on operation, we could not produce a reference, if result *must*
|
|
297
328
|
# be boolean, but then we would have some helpers that do it, and some that do not
|
|
298
329
|
# do it.
|
|
299
|
-
if helper_type
|
|
330
|
+
if helper_type.hasReleaseCode():
|
|
300
331
|
context.addCleanupTempName(value_name)
|
|
301
332
|
|
|
302
333
|
if value_name is not to_name:
|
|
@@ -939,6 +939,43 @@ def generateOsListdirCallCode(to_name, expression, emit, context):
|
|
|
939
939
|
)
|
|
940
940
|
|
|
941
941
|
|
|
942
|
+
def generateOsStatCallCode(to_name, expression, emit, context):
|
|
943
|
+
generateCAPIObjectCode(
|
|
944
|
+
to_name=to_name,
|
|
945
|
+
capi="OS_STAT",
|
|
946
|
+
tstate=True,
|
|
947
|
+
arg_desc=(
|
|
948
|
+
("path_arg", expression.subnode_path),
|
|
949
|
+
("dir_fd_arg", expression.subnode_dir_fd),
|
|
950
|
+
("follow_symlinks_arg", expression.subnode_follow_symlinks),
|
|
951
|
+
),
|
|
952
|
+
may_raise=expression.mayRaiseException(BaseException),
|
|
953
|
+
conversion_check=decideConversionCheckNeeded(to_name, expression),
|
|
954
|
+
source_ref=expression.getCompatibleSourceReference(),
|
|
955
|
+
none_null=True,
|
|
956
|
+
emit=emit,
|
|
957
|
+
context=context,
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
def generateOsLstatCallCode(to_name, expression, emit, context):
|
|
962
|
+
generateCAPIObjectCode(
|
|
963
|
+
to_name=to_name,
|
|
964
|
+
capi="OS_LSTAT",
|
|
965
|
+
tstate=True,
|
|
966
|
+
arg_desc=(
|
|
967
|
+
("path_arg", expression.subnode_path),
|
|
968
|
+
("dir_fd_arg", expression.subnode_dir_fd),
|
|
969
|
+
),
|
|
970
|
+
may_raise=expression.mayRaiseException(BaseException),
|
|
971
|
+
conversion_check=decideConversionCheckNeeded(to_name, expression),
|
|
972
|
+
source_ref=expression.getCompatibleSourceReference(),
|
|
973
|
+
none_null=True,
|
|
974
|
+
emit=emit,
|
|
975
|
+
context=context,
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
|
|
942
979
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
943
980
|
# integrates with CPython, but also works on its own.
|
|
944
981
|
#
|