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
|
@@ -36,11 +36,12 @@ static PyMemberDef Nuitka_Frame_members[] = {
|
|
|
36
36
|
|
|
37
37
|
#if PYTHON_VERSION < 0x300
|
|
38
38
|
|
|
39
|
-
static PyObject *_Nuitka_Frame_get_exc_traceback(
|
|
40
|
-
assert(Nuitka_Frame_CheckExact(
|
|
41
|
-
CHECK_OBJECT(
|
|
42
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
39
|
+
static PyObject *_Nuitka_Frame_get_exc_traceback(PyObject *self, void *data) {
|
|
40
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
41
|
+
CHECK_OBJECT(self);
|
|
42
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
43
43
|
|
|
44
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
44
45
|
PyObject *result = frame->m_frame.f_exc_traceback;
|
|
45
46
|
|
|
46
47
|
if (result == NULL) {
|
|
@@ -51,11 +52,12 @@ static PyObject *_Nuitka_Frame_get_exc_traceback(struct Nuitka_FrameObject *fram
|
|
|
51
52
|
return result;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
static int _Nuitka_Frame_set_exc_traceback(
|
|
55
|
-
assert(Nuitka_Frame_CheckExact(
|
|
56
|
-
CHECK_OBJECT(
|
|
57
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
55
|
+
static int _Nuitka_Frame_set_exc_traceback(PyObject *self, PyObject *traceback, void *data) {
|
|
56
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
57
|
+
CHECK_OBJECT(self);
|
|
58
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
58
59
|
|
|
60
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
59
61
|
Py_XDECREF(frame->m_frame.f_exc_traceback);
|
|
60
62
|
|
|
61
63
|
if (traceback == Py_None) {
|
|
@@ -68,12 +70,13 @@ static int _Nuitka_Frame_set_exc_traceback(struct Nuitka_FrameObject *frame, PyO
|
|
|
68
70
|
return 0;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
static PyObject *_Nuitka_Frame_get_exc_type(
|
|
72
|
-
assert(Nuitka_Frame_CheckExact(
|
|
73
|
-
CHECK_OBJECT(
|
|
74
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
73
|
+
static PyObject *_Nuitka_Frame_get_exc_type(PyObject *self, void *data) {
|
|
74
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
75
|
+
CHECK_OBJECT(self);
|
|
76
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
75
77
|
|
|
76
78
|
PyObject *result;
|
|
79
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
77
80
|
|
|
78
81
|
if (frame->m_frame.f_exc_type != NULL) {
|
|
79
82
|
result = frame->m_frame.f_exc_type;
|
|
@@ -85,11 +88,12 @@ static PyObject *_Nuitka_Frame_get_exc_type(struct Nuitka_FrameObject *frame) {
|
|
|
85
88
|
return result;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
|
-
static int _Nuitka_Frame_set_exc_type(
|
|
89
|
-
assert(Nuitka_Frame_CheckExact(
|
|
90
|
-
CHECK_OBJECT(
|
|
91
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
91
|
+
static int _Nuitka_Frame_set_exc_type(PyObject *self, PyObject *exception_type, void *data) {
|
|
92
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
93
|
+
CHECK_OBJECT(self);
|
|
94
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
92
95
|
|
|
96
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
93
97
|
PyObject *old = frame->m_frame.f_exc_type;
|
|
94
98
|
|
|
95
99
|
if (exception_type == Py_None) {
|
|
@@ -104,12 +108,13 @@ static int _Nuitka_Frame_set_exc_type(struct Nuitka_FrameObject *frame, PyObject
|
|
|
104
108
|
return 0;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
static PyObject *_Nuitka_Frame_get_exc_value(
|
|
108
|
-
assert(Nuitka_Frame_CheckExact(
|
|
109
|
-
CHECK_OBJECT(
|
|
110
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
111
|
+
static PyObject *_Nuitka_Frame_get_exc_value(PyObject *self, void *data) {
|
|
112
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
113
|
+
CHECK_OBJECT(self);
|
|
114
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
111
115
|
|
|
112
116
|
PyObject *result;
|
|
117
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
113
118
|
|
|
114
119
|
if (frame->m_frame.f_exc_value != NULL) {
|
|
115
120
|
result = frame->m_frame.f_exc_value;
|
|
@@ -121,11 +126,12 @@ static PyObject *_Nuitka_Frame_get_exc_value(struct Nuitka_FrameObject *frame) {
|
|
|
121
126
|
return result;
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
static int _Nuitka_Frame_set_exc_value(
|
|
125
|
-
assert(Nuitka_Frame_CheckExact(
|
|
126
|
-
CHECK_OBJECT(
|
|
127
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
129
|
+
static int _Nuitka_Frame_set_exc_value(PyObject *self, PyObject *exception_value, void *data) {
|
|
130
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
131
|
+
CHECK_OBJECT(self);
|
|
132
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
128
133
|
|
|
134
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
129
135
|
PyObject *old = frame->m_frame.f_exc_value;
|
|
130
136
|
|
|
131
137
|
if (exception_value == Py_None) {
|
|
@@ -139,10 +145,10 @@ static int _Nuitka_Frame_set_exc_value(struct Nuitka_FrameObject *frame, PyObjec
|
|
|
139
145
|
return 0;
|
|
140
146
|
}
|
|
141
147
|
|
|
142
|
-
static PyObject *_Nuitka_Frame_get_restricted(
|
|
143
|
-
assert(Nuitka_Frame_CheckExact(
|
|
144
|
-
CHECK_OBJECT(
|
|
145
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
148
|
+
static PyObject *_Nuitka_Frame_get_restricted(PyObject *self, void *data) {
|
|
149
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
150
|
+
CHECK_OBJECT(self);
|
|
151
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
146
152
|
|
|
147
153
|
Py_INCREF_IMMORTAL(Py_False);
|
|
148
154
|
return Py_False;
|
|
@@ -150,13 +156,14 @@ static PyObject *_Nuitka_Frame_get_restricted(struct Nuitka_FrameObject *frame,
|
|
|
150
156
|
|
|
151
157
|
#endif
|
|
152
158
|
|
|
153
|
-
static PyObject *_Nuitka_Frame_get_locals(
|
|
154
|
-
assert(Nuitka_Frame_CheckExact(
|
|
155
|
-
CHECK_OBJECT(
|
|
156
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
159
|
+
static PyObject *_Nuitka_Frame_get_locals(PyObject *self, void *data) {
|
|
160
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
161
|
+
CHECK_OBJECT(self);
|
|
162
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
157
163
|
|
|
158
164
|
NUITKA_MAY_BE_UNUSED PyThreadState *tstate = PyThreadState_GET();
|
|
159
165
|
|
|
166
|
+
struct Nuitka_FrameObject *nuitka_frame = (struct Nuitka_FrameObject *)self;
|
|
160
167
|
if (nuitka_frame->m_type_description == NULL) {
|
|
161
168
|
#if PYTHON_VERSION < 0x3b0
|
|
162
169
|
PyFrameObject *locals_owner = &nuitka_frame->m_frame;
|
|
@@ -237,28 +244,30 @@ static PyObject *_Nuitka_Frame_get_locals(struct Nuitka_FrameObject *nuitka_fram
|
|
|
237
244
|
}
|
|
238
245
|
}
|
|
239
246
|
|
|
240
|
-
static PyObject *_Nuitka_Frame_get_lineno(
|
|
241
|
-
assert(Nuitka_Frame_CheckExact(
|
|
242
|
-
CHECK_OBJECT(
|
|
243
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
247
|
+
static PyObject *_Nuitka_Frame_get_lineno(PyObject *self, void *data) {
|
|
248
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
249
|
+
CHECK_OBJECT(self);
|
|
250
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
244
251
|
|
|
245
|
-
|
|
252
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
253
|
+
return Nuitka_PyInt_FromLong(frame->m_frame.f_lineno);
|
|
246
254
|
}
|
|
247
255
|
|
|
248
|
-
static PyObject *_Nuitka_Frame_get_trace(
|
|
249
|
-
assert(Nuitka_Frame_CheckExact(
|
|
250
|
-
CHECK_OBJECT(
|
|
251
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
256
|
+
static PyObject *_Nuitka_Frame_get_trace(PyObject *self, void *data) {
|
|
257
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
258
|
+
CHECK_OBJECT(self);
|
|
259
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
252
260
|
|
|
261
|
+
struct Nuitka_FrameObject *frame = (struct Nuitka_FrameObject *)self;
|
|
253
262
|
PyObject *result = frame->m_frame.f_trace;
|
|
254
263
|
Py_INCREF(result);
|
|
255
264
|
return result;
|
|
256
265
|
}
|
|
257
266
|
|
|
258
|
-
static int _Nuitka_Frame_set_trace(
|
|
259
|
-
assert(Nuitka_Frame_CheckExact(
|
|
260
|
-
CHECK_OBJECT(
|
|
261
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
267
|
+
static int _Nuitka_Frame_set_trace(PyObject *self, PyObject *value, void *data) {
|
|
268
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
269
|
+
CHECK_OBJECT(self);
|
|
270
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
262
271
|
|
|
263
272
|
PyThreadState *tstate = PyThreadState_GET();
|
|
264
273
|
|
|
@@ -267,20 +276,20 @@ static int _Nuitka_Frame_set_trace(struct Nuitka_FrameObject *frame, PyObject *v
|
|
|
267
276
|
}
|
|
268
277
|
|
|
269
278
|
#if PYTHON_VERSION >= 0x370
|
|
270
|
-
static PyObject *_Nuitka_Frame_get_trace_lines(
|
|
271
|
-
assert(Nuitka_Frame_CheckExact(
|
|
272
|
-
CHECK_OBJECT(
|
|
273
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
279
|
+
static PyObject *_Nuitka_Frame_get_trace_lines(PyObject *self, void *data) {
|
|
280
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
281
|
+
CHECK_OBJECT(self);
|
|
282
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
274
283
|
|
|
275
284
|
PyObject *result = Py_False;
|
|
276
285
|
Py_INCREF_IMMORTAL(result);
|
|
277
286
|
return result;
|
|
278
287
|
}
|
|
279
288
|
|
|
280
|
-
static int _Nuitka_Frame_set_trace_lines(
|
|
281
|
-
assert(Nuitka_Frame_CheckExact(
|
|
282
|
-
CHECK_OBJECT(
|
|
283
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
289
|
+
static int _Nuitka_Frame_set_trace_lines(PyObject *self, PyObject *value, void *data) {
|
|
290
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
291
|
+
CHECK_OBJECT(self);
|
|
292
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
284
293
|
|
|
285
294
|
PyThreadState *tstate = PyThreadState_GET();
|
|
286
295
|
|
|
@@ -288,20 +297,20 @@ static int _Nuitka_Frame_set_trace_lines(struct Nuitka_FrameObject *frame, PyObj
|
|
|
288
297
|
return -1;
|
|
289
298
|
}
|
|
290
299
|
|
|
291
|
-
static PyObject *_Nuitka_Frame_get_trace_opcodes(
|
|
292
|
-
assert(Nuitka_Frame_CheckExact(
|
|
293
|
-
CHECK_OBJECT(
|
|
294
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
300
|
+
static PyObject *_Nuitka_Frame_get_trace_opcodes(PyObject *self, void *data) {
|
|
301
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
302
|
+
CHECK_OBJECT(self);
|
|
303
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
295
304
|
|
|
296
305
|
PyObject *result = Py_False;
|
|
297
306
|
Py_INCREF_IMMORTAL(result);
|
|
298
307
|
return result;
|
|
299
308
|
}
|
|
300
309
|
|
|
301
|
-
static int _Nuitka_Frame_set_trace_opcodes(
|
|
302
|
-
assert(Nuitka_Frame_CheckExact(
|
|
303
|
-
CHECK_OBJECT(
|
|
304
|
-
assert(_PyObject_GC_IS_TRACKED(
|
|
310
|
+
static int _Nuitka_Frame_set_trace_opcodes(PyObject *self, PyObject *value, void *data) {
|
|
311
|
+
assert(Nuitka_Frame_CheckExact(self));
|
|
312
|
+
CHECK_OBJECT(self);
|
|
313
|
+
assert(_PyObject_GC_IS_TRACKED(self));
|
|
305
314
|
|
|
306
315
|
PyThreadState *tstate = PyThreadState_GET();
|
|
307
316
|
|
|
@@ -311,18 +320,18 @@ static int _Nuitka_Frame_set_trace_opcodes(struct Nuitka_FrameObject *frame, PyO
|
|
|
311
320
|
#endif
|
|
312
321
|
|
|
313
322
|
static PyGetSetDef Nuitka_Frame_tp_getset[] = {
|
|
314
|
-
{(char *)"f_locals",
|
|
315
|
-
{(char *)"f_lineno",
|
|
316
|
-
{(char *)"f_trace",
|
|
323
|
+
{(char *)"f_locals", _Nuitka_Frame_get_locals, NULL, NULL},
|
|
324
|
+
{(char *)"f_lineno", _Nuitka_Frame_get_lineno, NULL, NULL},
|
|
325
|
+
{(char *)"f_trace", _Nuitka_Frame_get_trace, _Nuitka_Frame_set_trace, NULL},
|
|
317
326
|
#if PYTHON_VERSION < 0x300
|
|
318
|
-
{(char *)"f_restricted",
|
|
319
|
-
{(char *)"f_exc_traceback",
|
|
320
|
-
{(char *)"f_exc_type",
|
|
321
|
-
{(char *)"f_exc_value",
|
|
327
|
+
{(char *)"f_restricted", _Nuitka_Frame_get_restricted, NULL, NULL},
|
|
328
|
+
{(char *)"f_exc_traceback", _Nuitka_Frame_get_exc_traceback, _Nuitka_Frame_set_exc_traceback, NULL},
|
|
329
|
+
{(char *)"f_exc_type", _Nuitka_Frame_get_exc_type, _Nuitka_Frame_set_exc_type, NULL},
|
|
330
|
+
{(char *)"f_exc_value", _Nuitka_Frame_get_exc_value, _Nuitka_Frame_set_exc_value, NULL},
|
|
322
331
|
#endif
|
|
323
332
|
#if PYTHON_VERSION >= 0x370
|
|
324
|
-
{(char *)"f_trace_lines",
|
|
325
|
-
{(char *)"f_trace_opcodes",
|
|
333
|
+
{(char *)"f_trace_lines", _Nuitka_Frame_get_trace_lines, _Nuitka_Frame_set_trace_lines, NULL},
|
|
334
|
+
{(char *)"f_trace_opcodes", _Nuitka_Frame_get_trace_opcodes, _Nuitka_Frame_set_trace_opcodes, NULL},
|
|
326
335
|
#endif
|
|
327
336
|
{NULL}};
|
|
328
337
|
|
|
@@ -354,7 +363,8 @@ static void Nuitka_Frame_tp_clear(struct Nuitka_FrameObject *frame) {
|
|
|
354
363
|
while (*w != 0) {
|
|
355
364
|
switch (*w) {
|
|
356
365
|
case NUITKA_TYPE_DESCRIPTION_OBJECT:
|
|
357
|
-
case NUITKA_TYPE_DESCRIPTION_OBJECT_PTR:
|
|
366
|
+
case NUITKA_TYPE_DESCRIPTION_OBJECT_PTR:
|
|
367
|
+
case NUITKA_TYPE_DESCRIPTION_NILONG: {
|
|
358
368
|
PyObject *value = *(PyObject **)t;
|
|
359
369
|
CHECK_OBJECT_X(value);
|
|
360
370
|
|
|
@@ -436,11 +446,13 @@ static void Nuitka_Frame_tp_dealloc(struct Nuitka_FrameObject *nuitka_frame) {
|
|
|
436
446
|
|
|
437
447
|
Nuitka_Frame_tp_clear(nuitka_frame);
|
|
438
448
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
449
|
+
if (Py_REFCNT(nuitka_frame) > 0) {
|
|
450
|
+
Py_SET_REFCNT(nuitka_frame, Py_REFCNT(nuitka_frame) - 1);
|
|
451
|
+
if (Py_REFCNT(nuitka_frame) >= 1) {
|
|
452
|
+
// TODO: Allow this in debug mode, for now we would like to reproduce it.
|
|
453
|
+
assert(false);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
444
456
|
}
|
|
445
457
|
|
|
446
458
|
#if PYTHON_VERSION >= 0x3b0
|
|
@@ -519,6 +531,7 @@ static int Nuitka_Frame_tp_traverse(struct Nuitka_FrameObject *frame, visitproc
|
|
|
519
531
|
break;
|
|
520
532
|
}
|
|
521
533
|
default:
|
|
534
|
+
NUITKA_CANNOT_GET_HERE("invalid type description");
|
|
522
535
|
assert(false);
|
|
523
536
|
}
|
|
524
537
|
|
|
@@ -530,7 +543,7 @@ static int Nuitka_Frame_tp_traverse(struct Nuitka_FrameObject *frame, visitproc
|
|
|
530
543
|
|
|
531
544
|
#if PYTHON_VERSION >= 0x300
|
|
532
545
|
|
|
533
|
-
static PyObject *Nuitka_Frame_clear(struct Nuitka_FrameObject *frame) {
|
|
546
|
+
static PyObject *Nuitka_Frame_clear(struct Nuitka_FrameObject *frame, PyObject *unused) {
|
|
534
547
|
assert(Nuitka_Frame_CheckExact((PyObject *)frame));
|
|
535
548
|
CHECK_OBJECT((PyObject *)frame);
|
|
536
549
|
assert(_PyObject_GC_IS_TRACKED(frame));
|
|
@@ -624,7 +637,7 @@ static inline Py_ssize_t Nuitka_Frame_GetSize(struct Nuitka_FrameObject *frame)
|
|
|
624
637
|
#endif
|
|
625
638
|
}
|
|
626
639
|
|
|
627
|
-
static PyObject *Nuitka_Frame_sizeof(struct Nuitka_FrameObject *frame) {
|
|
640
|
+
static PyObject *Nuitka_Frame_sizeof(struct Nuitka_FrameObject *frame, PyObject *unused) {
|
|
628
641
|
assert(Nuitka_Frame_CheckExact((PyObject *)frame));
|
|
629
642
|
CHECK_OBJECT((PyObject *)frame);
|
|
630
643
|
assert(_PyObject_GC_IS_TRACKED(frame));
|
|
@@ -774,7 +787,7 @@ static struct Nuitka_FrameObject *_MAKE_COMPILED_FRAME(PyCodeObject *code, PyObj
|
|
|
774
787
|
CHECK_OBJECT_X(f_locals);
|
|
775
788
|
locals_owner->f_locals = f_locals;
|
|
776
789
|
|
|
777
|
-
#if PYTHON_VERSION <
|
|
790
|
+
#if PYTHON_VERSION < 0x300
|
|
778
791
|
frame->f_tstate = PyThreadState_GET();
|
|
779
792
|
#endif
|
|
780
793
|
|
|
@@ -801,6 +814,8 @@ static struct Nuitka_FrameObject *_MAKE_COMPILED_FRAME(PyCodeObject *code, PyObj
|
|
|
801
814
|
#endif
|
|
802
815
|
#if PYTHON_VERSION < 0x3d0
|
|
803
816
|
result->m_interpreter_frame.prev_instr = _PyCode_CODE(code);
|
|
817
|
+
#else
|
|
818
|
+
result->m_interpreter_frame.instr_ptr = _PyCode_CODE(code);
|
|
804
819
|
#endif
|
|
805
820
|
result->m_frame.f_frame = &result->m_interpreter_frame;
|
|
806
821
|
|
|
@@ -945,8 +960,12 @@ PyCodeObject *makeCodeObject(PyObject *filename, int line, int flags, PyObject *
|
|
|
945
960
|
|
|
946
961
|
empty_code = PyObject_GetAttrString(empty_code_object, "co_code");
|
|
947
962
|
CHECK_OBJECT(empty_code);
|
|
963
|
+
#if PYTHON_VERSION >= 0x3c0
|
|
964
|
+
lnotab = ((PyCodeObject *)empty_code_object)->co_linetable; // spell-checker: ignore linetable
|
|
965
|
+
#else
|
|
948
966
|
lnotab = PyObject_GetAttrString(empty_code_object, "co_lnotab");
|
|
949
967
|
CHECK_OBJECT(lnotab);
|
|
968
|
+
#endif
|
|
950
969
|
consts = PyObject_GetAttrString(empty_code_object, "co_consts");
|
|
951
970
|
CHECK_OBJECT(consts);
|
|
952
971
|
names = PyObject_GetAttrString(empty_code_object, "co_names");
|
|
@@ -1100,7 +1119,19 @@ void Nuitka_Frame_AttachLocals(struct Nuitka_FrameObject *frame_object, char con
|
|
|
1100
1119
|
|
|
1101
1120
|
break;
|
|
1102
1121
|
}
|
|
1122
|
+
case NUITKA_TYPE_DESCRIPTION_NILONG: {
|
|
1123
|
+
nuitka_ilong value = va_arg(ap, nuitka_ilong);
|
|
1124
|
+
ENFORCE_NILONG_OBJECT_VALUE(&value);
|
|
1125
|
+
|
|
1126
|
+
CHECK_OBJECT(value.python_value);
|
|
1127
|
+
memcpy(t, &value.python_value, sizeof(PyObject *));
|
|
1128
|
+
Py_XINCREF(value.python_value);
|
|
1129
|
+
t += sizeof(PyObject *);
|
|
1130
|
+
|
|
1131
|
+
break;
|
|
1132
|
+
}
|
|
1103
1133
|
default:
|
|
1134
|
+
NUITKA_CANNOT_GET_HERE("invalid type description");
|
|
1104
1135
|
assert(false);
|
|
1105
1136
|
}
|
|
1106
1137
|
|