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
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
#define NDEBUG
|
|
9
9
|
#endif
|
|
10
10
|
|
|
11
|
+
#include "nuitka/debug_settings.h"
|
|
12
|
+
|
|
11
13
|
#if defined(_WIN32)
|
|
12
14
|
// Note: Keep this separate line, must be included before other Windows headers.
|
|
13
15
|
#include <windows.h>
|
|
@@ -161,6 +163,7 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
161
163
|
// Uncompiled generator integration requires these.
|
|
162
164
|
#if PYTHON_VERSION >= 0x3b0
|
|
163
165
|
#if PYTHON_VERSION >= 0x3d0
|
|
166
|
+
#include <internal/pycore_opcode_utils.h>
|
|
164
167
|
#include <opcode_ids.h>
|
|
165
168
|
#else
|
|
166
169
|
#include <internal/pycore_opcode.h>
|
|
@@ -173,7 +176,8 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
173
176
|
#include <cpython/code.h>
|
|
174
177
|
#endif
|
|
175
178
|
|
|
176
|
-
#if
|
|
179
|
+
#if PYTHON_VERSION < 0x3c0
|
|
180
|
+
// Make sure we go the really fast variant, spell-checker: ignore gilstate
|
|
177
181
|
#undef PyThreadState_GET
|
|
178
182
|
#define _PyThreadState_Current _PyRuntime.gilstate.tstate_current
|
|
179
183
|
#define PyThreadState_GET() ((PyThreadState *)_Py_atomic_load_relaxed(&_PyThreadState_Current))
|
|
@@ -190,7 +194,10 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
190
194
|
#include <internal/pycore_freelist.h>
|
|
191
195
|
#include <internal/pycore_intrinsics.h>
|
|
192
196
|
#include <internal/pycore_modsupport.h>
|
|
197
|
+
#include <internal/pycore_parking_lot.h>
|
|
198
|
+
#include <internal/pycore_pyatomic_ft_wrappers.h>
|
|
193
199
|
#include <internal/pycore_setobject.h>
|
|
200
|
+
#include <internal/pycore_time.h>
|
|
194
201
|
#endif
|
|
195
202
|
|
|
196
203
|
#undef Py_BUILD_CORE
|
|
@@ -235,12 +242,15 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
235
242
|
#ifndef __NUITKA_NO_ASSERT__
|
|
236
243
|
#define NUITKA_CANNOT_GET_HERE(NAME) \
|
|
237
244
|
PRINT_FORMAT("%s : %s\n", __FUNCTION__, #NAME); \
|
|
238
|
-
assert(false); \
|
|
239
245
|
abort();
|
|
240
246
|
#else
|
|
241
247
|
#define NUITKA_CANNOT_GET_HERE(NAME) abort();
|
|
242
248
|
#endif
|
|
243
249
|
|
|
250
|
+
#define NUITKA_ERROR_EXIT(NAME) \
|
|
251
|
+
PRINT_FORMAT("%s : %s\n", __FUNCTION__, #NAME); \
|
|
252
|
+
abort();
|
|
253
|
+
|
|
244
254
|
#ifdef _MSC_VER
|
|
245
255
|
/* Using "_alloca" extension due to MSVC restrictions for array variables
|
|
246
256
|
* on the local stack.
|
|
@@ -256,7 +266,6 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
256
266
|
* of renaming PyObject_Unicode. Define this to be easily portable.
|
|
257
267
|
*/
|
|
258
268
|
#if PYTHON_VERSION >= 0x300
|
|
259
|
-
#define PyInt_FromLong PyLong_FromLong
|
|
260
269
|
#define PyInt_AsLong PyLong_AsLong
|
|
261
270
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|
262
271
|
|
|
@@ -270,6 +279,7 @@ NUITKA_MAY_BE_UNUSED static inline managed_static_type_state *Nuitka_PyStaticTyp
|
|
|
270
279
|
* which makes it easier to write portable code.
|
|
271
280
|
*/
|
|
272
281
|
#if PYTHON_VERSION < 0x300
|
|
282
|
+
#define PyUnicode_GET_LENGTH(x) (PyUnicode_GET_SIZE(x))
|
|
273
283
|
#define Nuitka_String_AsString PyString_AsString
|
|
274
284
|
#define Nuitka_String_AsString_Unchecked PyString_AS_STRING
|
|
275
285
|
#define Nuitka_String_Check PyString_Check
|
|
@@ -282,10 +292,28 @@ NUITKA_MAY_BE_UNUSED static inline bool Nuitka_StringOrUnicode_CheckExact(PyObje
|
|
|
282
292
|
#define Nuitka_String_FromStringAndSize PyString_FromStringAndSize
|
|
283
293
|
#define Nuitka_String_FromFormat PyString_FromFormat
|
|
284
294
|
#define PyUnicode_CHECK_INTERNED (0)
|
|
295
|
+
NUITKA_MAY_BE_UNUSED static Py_UNICODE *Nuitka_UnicodeAsWideString(PyObject *str, Py_ssize_t *size) {
|
|
296
|
+
PyObject *unicode;
|
|
297
|
+
|
|
298
|
+
if (!PyUnicode_Check(str)) {
|
|
299
|
+
// Leaking memory, but for usages its acceptable to
|
|
300
|
+
// achieve that the pointer remains valid.
|
|
301
|
+
unicode = PyObject_Unicode(str);
|
|
302
|
+
} else {
|
|
303
|
+
unicode = str;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (size != NULL) {
|
|
307
|
+
*size = (Py_ssize_t)PyUnicode_GET_LENGTH(unicode);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return PyUnicode_AsUnicode(unicode);
|
|
311
|
+
}
|
|
285
312
|
#else
|
|
286
313
|
#define Nuitka_String_AsString _PyUnicode_AsString
|
|
287
314
|
|
|
288
|
-
|
|
315
|
+
// Note: This private stuff from file "Objects/unicodeobject.c"
|
|
316
|
+
// spell-checker: ignore unicodeobject
|
|
289
317
|
#define _PyUnicode_UTF8(op) (((PyCompactUnicodeObject *)(op))->utf8)
|
|
290
318
|
#define PyUnicode_UTF8(op) \
|
|
291
319
|
(assert(PyUnicode_IS_READY(op)), \
|
|
@@ -306,10 +334,7 @@ NUITKA_MAY_BE_UNUSED static char const *Nuitka_String_AsString_Unchecked(PyObjec
|
|
|
306
334
|
#define Nuitka_String_FromString PyUnicode_FromString
|
|
307
335
|
#define Nuitka_String_FromStringAndSize PyUnicode_FromStringAndSize
|
|
308
336
|
#define Nuitka_String_FromFormat PyUnicode_FromFormat
|
|
309
|
-
#
|
|
310
|
-
|
|
311
|
-
#if PYTHON_VERSION < 0x300
|
|
312
|
-
#define PyUnicode_GET_LENGTH(x) (PyUnicode_GET_SIZE(x))
|
|
337
|
+
#define Nuitka_UnicodeAsWideString PyUnicode_AsWideCharString
|
|
313
338
|
#endif
|
|
314
339
|
|
|
315
340
|
// Wrap the type lookup for debug mode, to identify errors, and potentially
|
|
@@ -335,22 +360,6 @@ NUITKA_MAY_BE_UNUSED static PyObject *Nuitka_TypeLookup(PyTypeObject *type, PyOb
|
|
|
335
360
|
#define NUITKA_MODULE_ENTRY_FUNCTION PyObject *
|
|
336
361
|
#endif
|
|
337
362
|
|
|
338
|
-
/* Avoid gcc warnings about using an integer as a bool. This is a cherry-pick.
|
|
339
|
-
*
|
|
340
|
-
* This might apply to more versions. I am seeing this on 3.3.2, and it was
|
|
341
|
-
* fixed for Python 2.x only later. We could include more versions. This is
|
|
342
|
-
* only a problem with debug mode and therefore not too important maybe.
|
|
343
|
-
*/
|
|
344
|
-
#if PYTHON_VERSION >= 0x300 && PYTHON_VERSION < 0x340
|
|
345
|
-
|
|
346
|
-
#undef PyMem_MALLOC
|
|
347
|
-
#define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL : malloc(((n) != 0) ? (n) : 1))
|
|
348
|
-
|
|
349
|
-
#undef PyMem_REALLOC
|
|
350
|
-
#define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL : realloc((p), ((n) != 0) ? (n) : 1))
|
|
351
|
-
|
|
352
|
-
#endif
|
|
353
|
-
|
|
354
363
|
#if PYTHON_VERSION < 0x300
|
|
355
364
|
typedef long Py_hash_t;
|
|
356
365
|
#endif
|
|
@@ -470,7 +479,7 @@ extern bool Nuitka_Type_IsSubtype(PyTypeObject *a, PyTypeObject *b);
|
|
|
470
479
|
#include <longintrepr.h>
|
|
471
480
|
|
|
472
481
|
#if PYTHON_VERSION < 0x270
|
|
473
|
-
// Not present in Python2.6 yet
|
|
482
|
+
// Not present in Python2.6 yet, spell-checker: ignore sdigit
|
|
474
483
|
typedef signed int sdigit;
|
|
475
484
|
#endif
|
|
476
485
|
#endif
|
|
@@ -532,6 +541,8 @@ extern PyObject *Nuitka_dunder_compiled_value;
|
|
|
532
541
|
|
|
533
542
|
#define TRACE_FILE_LISTDIR(tstate, x, y) (false)
|
|
534
543
|
|
|
544
|
+
#define TRACE_FILE_STAT(tstate, x, y, z, r) (false)
|
|
545
|
+
|
|
535
546
|
#endif
|
|
536
547
|
|
|
537
548
|
#if _NUITKA_EXPERIMENTAL_INIT_PROGRAM
|
|
@@ -33,16 +33,18 @@ extern void PRINT_TRACEBACK(PyTracebackObject *traceback);
|
|
|
33
33
|
#endif
|
|
34
34
|
|
|
35
35
|
// Print the exception state, including NULL values.
|
|
36
|
-
|
|
36
|
+
extern void _PRINT_EXCEPTION3(PyObject *exception_type, PyObject *exception_value, PyTracebackObject *exception_tb);
|
|
37
|
+
extern void _PRINT_EXCEPTION1(PyObject *exception_value);
|
|
38
|
+
|
|
39
|
+
#if PYTHON_VERSION < 0x3c0
|
|
37
40
|
#define PRINT_EXCEPTION(exception_type, exception_value, exception_tb) \
|
|
38
|
-
|
|
41
|
+
_PRINT_EXCEPTION3(exception_type, exception_value, exception_tb)
|
|
39
42
|
#define PRINT_EXCEPTION_STATE(exception_state) \
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
_PRINT_EXCEPTION3((exception_state)->exception_type, (exception_state)->exception_value, \
|
|
44
|
+
(exception_state)->exception_tb)
|
|
42
45
|
#else
|
|
43
|
-
#define PRINT_EXCEPTION(exception_type, exception_value, exception_tb)
|
|
44
|
-
#define PRINT_EXCEPTION_STATE(exception_state)
|
|
45
|
-
extern void _PRINT_EXCEPTION(PyObject *exception_value);
|
|
46
|
+
#define PRINT_EXCEPTION(exception_type, exception_value, exception_tb) _PRINT_EXCEPTION1(exception_value)
|
|
47
|
+
#define PRINT_EXCEPTION_STATE(exception_state) _PRINT_EXCEPTION1((exception_state)->exception_value)
|
|
46
48
|
#endif
|
|
47
49
|
|
|
48
50
|
// Print the current exception state, including NULL values.
|
|
@@ -27,7 +27,7 @@ extern volatile int _Py_Ticker;
|
|
|
27
27
|
NUITKA_MAY_BE_UNUSED static inline bool CONSIDER_THREADING(PyThreadState *tstate) {
|
|
28
28
|
#if PYTHON_VERSION < 0x390
|
|
29
29
|
_PyRuntimeState *const runtime = &_PyRuntime;
|
|
30
|
-
#
|
|
30
|
+
#elif PYTHON_VERSION < 0x3d0
|
|
31
31
|
_PyRuntimeState *const runtime = tstate->interp->runtime;
|
|
32
32
|
#endif
|
|
33
33
|
|
|
@@ -72,6 +72,20 @@ NUITKA_MAY_BE_UNUSED static inline bool CONSIDER_THREADING(PyThreadState *tstate
|
|
|
72
72
|
|
|
73
73
|
return true;
|
|
74
74
|
}
|
|
75
|
+
#else
|
|
76
|
+
NUITKA_MAY_BE_UNUSED static inline bool CONSIDER_THREADING(PyThreadState *tstate) {
|
|
77
|
+
if (unlikely(tstate->async_exc != NULL)) {
|
|
78
|
+
PyObject *async_exc = tstate->async_exc;
|
|
79
|
+
tstate->async_exc = NULL;
|
|
80
|
+
|
|
81
|
+
SET_CURRENT_EXCEPTION_TYPE0(tstate, async_exc);
|
|
82
|
+
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
75
89
|
#endif
|
|
76
90
|
|
|
77
91
|
#else
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
#include "nuitka/prelude.h"
|
|
9
9
|
#endif
|
|
10
10
|
|
|
11
|
+
// Helpers for type aliases, type variables, and generic base classes.
|
|
11
12
|
extern PyObject *MAKE_TYPE_ALIAS(PyObject *name, PyObject *type_params, PyObject *compute_value);
|
|
13
|
+
extern PyObject *MAKE_TYPE_VAR(PyThreadState *tstate, PyObject *name);
|
|
14
|
+
extern PyObject *MAKE_TYPE_GENERIC(PyThreadState *tstate, PyObject *params);
|
|
12
15
|
|
|
13
16
|
#endif
|
|
14
17
|
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|