Nuitka-winsvc 2.1.5__cp311-cp311-win_amd64.whl → 2.2.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.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/METADATA +1 -1
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/RECORD +234 -225
- nuitka/Errors.py +4 -0
- nuitka/HardImportRegistry.py +18 -1
- nuitka/MainControl.py +27 -30
- nuitka/OptionParsing.py +32 -30
- nuitka/Options.py +26 -13
- nuitka/OutputDirectories.py +7 -4
- nuitka/PostProcessing.py +9 -7
- nuitka/Progress.py +3 -3
- nuitka/PythonVersions.py +2 -2
- nuitka/TreeXML.py +1 -1
- nuitka/Version.py +1 -1
- nuitka/build/Backend.scons +2 -1
- nuitka/build/DataComposerInterface.py +1 -0
- nuitka/build/Onefile.scons +2 -1
- nuitka/build/SconsCaching.py +64 -46
- nuitka/build/SconsCompilerSettings.py +19 -6
- nuitka/build/SconsHacks.py +0 -1
- nuitka/build/SconsInterface.py +84 -5
- nuitka/build/SconsProgress.py +0 -1
- nuitka/build/SconsUtils.py +9 -5
- nuitka/build/include/nuitka/allocator.h +8 -3
- nuitka/build/include/nuitka/compiled_cell.h +8 -0
- nuitka/build/include/nuitka/constants.h +2 -0
- nuitka/build/include/nuitka/exceptions.h +554 -179
- nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
- nuitka/build/include/nuitka/helper/import_hard.h +3 -0
- nuitka/build/include/nuitka/helper/ints.h +15 -2
- nuitka/build/include/nuitka/helper/lists.h +4 -1
- nuitka/build/include/nuitka/helper/raising.h +12 -0
- nuitka/build/include/nuitka/helper/tuples.h +5 -1
- nuitka/build/include/nuitka/helpers.h +5 -0
- nuitka/build/include/nuitka/importing.h +3 -4
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +38 -11
- nuitka/build/include/nuitka/printing.h +3 -0
- nuitka/build/include/nuitka/threading.h +2 -6
- nuitka/build/include/nuitka/type_aliases.h +27 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
- nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -4
- nuitka/build/static_src/CompiledAsyncgenType.c +99 -114
- nuitka/build/static_src/CompiledCodeHelpers.c +24 -14
- nuitka/build/static_src/CompiledCoroutineType.c +96 -114
- nuitka/build/static_src/CompiledFrameType.c +14 -11
- nuitka/build/static_src/CompiledFunctionType.c +34 -7
- nuitka/build/static_src/CompiledGeneratorType.c +248 -142
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +60 -70
- nuitka/build/static_src/CompiledMethodType.c +8 -7
- nuitka/build/static_src/HelpersAttributes.c +2 -19
- nuitka/build/static_src/HelpersBuiltin.c +2 -1
- nuitka/build/static_src/HelpersComparisonEq.c +32 -18
- nuitka/build/static_src/HelpersComparisonGe.c +50 -36
- nuitka/build/static_src/HelpersComparisonGt.c +50 -36
- nuitka/build/static_src/HelpersComparisonLe.c +50 -36
- nuitka/build/static_src/HelpersComparisonLt.c +50 -36
- nuitka/build/static_src/HelpersComparisonNe.c +32 -18
- nuitka/build/static_src/HelpersDeepcopy.c +6 -8
- nuitka/build/static_src/HelpersDictionaries.c +8 -3
- nuitka/build/static_src/HelpersExceptions.c +36 -22
- nuitka/build/static_src/HelpersFiles.c +9 -0
- nuitka/build/static_src/HelpersFilesystemPaths.c +7 -7
- nuitka/build/static_src/HelpersImportHard.c +15 -0
- nuitka/build/static_src/HelpersJitSources.c +46 -0
- nuitka/build/static_src/HelpersLists.c +40 -0
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +66 -66
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +80 -33
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +16 -13
- nuitka/build/static_src/HelpersOperationBinarySub.c +39 -39
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +54 -54
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceSub.c +50 -50
- nuitka/build/static_src/HelpersProfiling.c +3 -4
- nuitka/build/static_src/HelpersRaising.c +62 -1
- nuitka/build/static_src/HelpersStrings.c +203 -8
- nuitka/build/static_src/HelpersTypes.c +42 -0
- nuitka/build/static_src/MainProgram.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
- nuitka/build/static_src/OnefileBootstrap.c +3 -3
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +5 -3
- nuitka/code_generation/BuiltinCodes.py +1 -0
- nuitka/code_generation/CodeGeneration.py +11 -0
- nuitka/code_generation/CodeHelpers.py +5 -3
- nuitka/code_generation/CodeObjectCodes.py +10 -6
- nuitka/code_generation/ComparisonCodes.py +19 -3
- nuitka/code_generation/ConstantCodes.py +5 -0
- nuitka/code_generation/Contexts.py +22 -6
- nuitka/code_generation/Emission.py +1 -0
- nuitka/code_generation/ErrorCodes.py +8 -16
- nuitka/code_generation/EvalCodes.py +5 -3
- nuitka/code_generation/ExceptionCodes.py +8 -1
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -0
- nuitka/code_generation/FrameCodes.py +5 -3
- nuitka/code_generation/FunctionCodes.py +0 -1
- nuitka/code_generation/GeneratorCodes.py +3 -3
- nuitka/code_generation/GlobalConstants.py +1 -2
- nuitka/code_generation/ImportCodes.py +2 -0
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/ListCodes.py +11 -17
- nuitka/code_generation/MatchCodes.py +0 -1
- nuitka/code_generation/ModuleCodes.py +2 -1
- nuitka/code_generation/Namify.py +0 -1
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +8 -6
- nuitka/code_generation/PackageResourceCodes.py +7 -5
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TypeAliasCodes.py +71 -0
- nuitka/code_generation/VariableCodes.py +7 -5
- nuitka/code_generation/VariableDeclarations.py +1 -0
- nuitka/code_generation/c_types/CTypeCLongs.py +0 -1
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +0 -1
- nuitka/code_generation/c_types/CTypeVoids.py +1 -0
- nuitka/code_generation/templates/CodeTemplatesConstants.py +15 -0
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesIterators.py +0 -1
- nuitka/code_generation/templates/CodeTemplatesLoader.py +0 -1
- nuitka/code_generation/templates/CodeTemplatesModules.py +4 -1
- nuitka/code_generation/templates/CodeTemplatesVariables.py +8 -8
- nuitka/code_generation/templates/TemplateDebugWrapper.py +0 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -0
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +9 -7
- nuitka/containers/Namedtuples.py +0 -1
- nuitka/finalizations/Finalization.py +1 -0
- nuitka/finalizations/FinalizeMarkups.py +0 -1
- nuitka/freezer/DllDependenciesMacOS.py +60 -13
- nuitka/freezer/DllDependenciesPosix.py +0 -1
- nuitka/freezer/IncludedDataFiles.py +46 -15
- nuitka/freezer/IncludedEntryPoints.py +5 -3
- nuitka/freezer/Standalone.py +6 -1
- nuitka/importing/ImportCache.py +2 -2
- nuitka/importing/ImportResolving.py +80 -78
- nuitka/importing/Importing.py +34 -1
- nuitka/nodes/AttributeNodesGenerated.py +21 -6
- nuitka/nodes/BuiltinComplexNodes.py +1 -0
- nuitka/nodes/BuiltinFormatNodes.py +1 -0
- nuitka/nodes/BuiltinIteratorNodes.py +5 -3
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +21 -6
- nuitka/nodes/BuiltinRefNodes.py +8 -1
- nuitka/nodes/BuiltinVarsNodes.py +0 -1
- nuitka/nodes/ChildrenHavingMixins.py +906 -186
- nuitka/nodes/CodeObjectSpecs.py +1 -1
- nuitka/nodes/ConstantRefNodes.py +38 -0
- nuitka/nodes/CtypesNodes.py +0 -1
- nuitka/nodes/DictionaryNodes.py +0 -1
- nuitka/nodes/ExceptionNodes.py +10 -0
- nuitka/nodes/ExpressionBases.py +15 -9
- nuitka/nodes/ExpressionBasesGenerated.py +32 -15
- nuitka/nodes/FunctionNodes.py +50 -5
- nuitka/nodes/HardImportNodesGenerated.py +245 -60
- nuitka/nodes/ImportHardNodes.py +27 -13
- nuitka/nodes/ImportNodes.py +90 -70
- nuitka/nodes/InjectCNodes.py +0 -1
- nuitka/nodes/ModuleNodes.py +10 -5
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/OperatorNodesUnary.py +1 -0
- nuitka/nodes/OsSysNodes.py +0 -1
- nuitka/nodes/PackageMetadataNodes.py +0 -1
- nuitka/nodes/PackageResourceNodes.py +10 -6
- nuitka/nodes/StatementBasesGenerated.py +107 -60
- nuitka/nodes/StringConcatenationNodes.py +1 -0
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TypeNodes.py +21 -0
- nuitka/nodes/VariableRefNodes.py +1 -0
- nuitka/nodes/shapes/BuiltinTypeShapes.py +25 -15
- nuitka/optimizations/Optimization.py +7 -6
- nuitka/optimizations/OptimizeBuiltinCalls.py +11 -9
- nuitka/optimizations/Tags.py +0 -1
- nuitka/optimizations/TraceCollections.py +6 -55
- nuitka/optimizations/ValueTraces.py +49 -1
- nuitka/plugins/PluginBase.py +26 -4
- nuitka/plugins/Plugins.py +49 -12
- nuitka/plugins/standard/AntiBloatPlugin.py +12 -2
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +0 -1
- nuitka/plugins/standard/DataFilesPlugin.py +2 -6
- nuitka/plugins/standard/DillPlugin.py +3 -3
- nuitka/plugins/standard/DllFilesPlugin.py +29 -23
- nuitka/plugins/standard/GiPlugin.py +1 -0
- nuitka/plugins/standard/ImplicitImports.py +9 -7
- nuitka/plugins/standard/MatplotlibPlugin.py +1 -0
- nuitka/plugins/standard/OptionsNannyPlugin.py +3 -7
- nuitka/plugins/standard/PkgResourcesPlugin.py +0 -1
- nuitka/plugins/standard/PmwPlugin.py +10 -9
- nuitka/plugins/standard/PySidePyQtPlugin.py +0 -28
- nuitka/plugins/standard/TensorflowPlugin.py +1 -0
- nuitka/plugins/standard/TorchPlugin.py +1 -0
- nuitka/plugins/standard/TrioPlugin.py +1 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +242 -54
- nuitka/reports/CompilationReportReader.py +0 -1
- nuitka/reports/Reports.py +49 -5
- nuitka/specs/BuiltinParameterSpecs.py +10 -2
- nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
- nuitka/specs/BuiltinTypeOperationSpecs.py +0 -1
- nuitka/specs/HardImportSpecs.py +34 -1
- nuitka/specs/ParameterSpecs.py +11 -9
- nuitka/tools/environments/Virtualenv.py +0 -1
- nuitka/tools/specialize/CTypeDescriptions.py +15 -11
- nuitka/tools/specialize/SpecializeC.py +11 -9
- nuitka/tools/specialize/SpecializePython.py +57 -30
- nuitka/tools/testing/Common.py +24 -7
- nuitka/tools/testing/OutputComparison.py +4 -0
- nuitka/tools/testing/Pythons.py +0 -1
- nuitka/tools/testing/compare_with_cpython/__main__.py +0 -4
- nuitka/tools/watch/GitHub.py +4 -1
- nuitka/tools/watch/__main__.py +22 -1
- nuitka/tree/Building.py +3 -0
- nuitka/tree/InternalModule.py +0 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -0
- nuitka/tree/ReformulationAssignmentStatements.py +26 -3
- nuitka/tree/ReformulationClasses3.py +23 -26
- nuitka/tree/ReformulationContractionExpressions.py +5 -3
- nuitka/tree/ReformulationDictionaryCreation.py +6 -5
- nuitka/tree/ReformulationExecStatements.py +8 -6
- nuitka/tree/ReformulationFunctionStatements.py +10 -6
- nuitka/tree/SourceHandling.py +8 -0
- nuitka/tree/TreeHelpers.py +6 -3
- nuitka/utils/AppDirs.py +6 -2
- nuitka/utils/CStrings.py +1 -1
- nuitka/utils/CommandLineOptions.py +0 -1
- nuitka/utils/Distributions.py +3 -3
- nuitka/utils/Download.py +5 -1
- nuitka/utils/Execution.py +6 -3
- nuitka/utils/FileOperations.py +62 -35
- nuitka/utils/Importing.py +4 -4
- nuitka/utils/InstanceCounters.py +1 -0
- nuitka/utils/MacOSApp.py +1 -0
- nuitka/utils/Shebang.py +1 -0
- nuitka/utils/Utils.py +39 -1
- nuitka/utils/WindowsFileUsage.py +4 -3
- {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka-run.bat +0 -0
- {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka.bat +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/WHEEL +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/top_level.txt +0 -0
|
@@ -537,8 +537,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
|
|
|
537
537
|
|
|
538
538
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
539
539
|
|
|
540
|
-
if (
|
|
541
|
-
long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
|
|
540
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
541
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
|
|
542
542
|
|
|
543
543
|
clong_result = r;
|
|
544
544
|
goto exit_result_ok_clong;
|
|
@@ -547,12 +547,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
|
|
|
547
547
|
{
|
|
548
548
|
PyLongObject *z;
|
|
549
549
|
|
|
550
|
-
digit const *a_digits = operand1_long_object
|
|
551
|
-
Py_ssize_t a_digit_count =
|
|
552
|
-
bool a_negative =
|
|
553
|
-
digit const *b_digits = operand2_long_object
|
|
554
|
-
Py_ssize_t b_digit_count =
|
|
555
|
-
bool b_negative =
|
|
550
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
551
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
552
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
553
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
554
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
555
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
556
556
|
|
|
557
557
|
if (a_negative) {
|
|
558
558
|
if (b_negative) {
|
|
@@ -561,7 +561,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
|
|
|
561
561
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
|
|
564
|
+
Nuitka_LongFlipSign(z);
|
|
565
565
|
} else {
|
|
566
566
|
if (b_negative) {
|
|
567
567
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
@@ -760,8 +760,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
|
|
|
760
760
|
|
|
761
761
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
762
762
|
|
|
763
|
-
if (
|
|
764
|
-
long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
|
|
763
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
764
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
|
|
765
765
|
|
|
766
766
|
clong_result = r;
|
|
767
767
|
goto exit_result_ok_clong;
|
|
@@ -770,12 +770,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
|
|
|
770
770
|
{
|
|
771
771
|
PyLongObject *z;
|
|
772
772
|
|
|
773
|
-
digit const *a_digits = operand1_long_object
|
|
774
|
-
Py_ssize_t a_digit_count =
|
|
775
|
-
bool a_negative =
|
|
776
|
-
digit const *b_digits = operand2_long_object
|
|
777
|
-
Py_ssize_t b_digit_count =
|
|
778
|
-
bool b_negative =
|
|
773
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
774
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
775
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
776
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
777
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
778
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
779
779
|
|
|
780
780
|
if (a_negative) {
|
|
781
781
|
if (b_negative) {
|
|
@@ -784,7 +784,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
|
|
|
784
784
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
785
785
|
}
|
|
786
786
|
|
|
787
|
-
|
|
787
|
+
Nuitka_LongFlipSign(z);
|
|
788
788
|
} else {
|
|
789
789
|
if (b_negative) {
|
|
790
790
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
@@ -999,8 +999,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
|
|
|
999
999
|
|
|
1000
1000
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
1001
1001
|
|
|
1002
|
-
if (
|
|
1003
|
-
long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
|
|
1002
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
1003
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
|
|
1004
1004
|
|
|
1005
1005
|
clong_result = r;
|
|
1006
1006
|
goto exit_result_ok_clong;
|
|
@@ -1009,12 +1009,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
|
|
|
1009
1009
|
{
|
|
1010
1010
|
PyLongObject *z;
|
|
1011
1011
|
|
|
1012
|
-
digit const *a_digits = operand1_long_object
|
|
1013
|
-
Py_ssize_t a_digit_count =
|
|
1014
|
-
bool a_negative =
|
|
1015
|
-
digit const *b_digits = operand2_long_object
|
|
1016
|
-
Py_ssize_t b_digit_count =
|
|
1017
|
-
bool b_negative =
|
|
1012
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
1013
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
1014
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
1015
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
1016
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
1017
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
1018
1018
|
|
|
1019
1019
|
if (a_negative) {
|
|
1020
1020
|
if (b_negative) {
|
|
@@ -1023,7 +1023,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
|
|
|
1023
1023
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
|
|
1026
|
+
Nuitka_LongFlipSign(z);
|
|
1027
1027
|
} else {
|
|
1028
1028
|
if (b_negative) {
|
|
1029
1029
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
@@ -1969,8 +1969,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
|
|
|
1969
1969
|
|
|
1970
1970
|
PyLongObject *operand1_long_object = (PyLongObject *)operand1;
|
|
1971
1971
|
|
|
1972
|
-
if (
|
|
1973
|
-
long r = MEDIUM_VALUE(operand1_long_object) - (sdigit)operand2;
|
|
1972
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
|
|
1973
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) - (sdigit)operand2);
|
|
1974
1974
|
|
|
1975
1975
|
clong_result = r;
|
|
1976
1976
|
goto exit_result_ok_clong;
|
|
@@ -1979,9 +1979,9 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
|
|
|
1979
1979
|
{
|
|
1980
1980
|
PyLongObject *z;
|
|
1981
1981
|
|
|
1982
|
-
digit const *a_digits = operand1_long_object
|
|
1983
|
-
Py_ssize_t a_digit_count =
|
|
1984
|
-
bool a_negative =
|
|
1982
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
1983
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
1984
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
1985
1985
|
digit const *b_digits = (digit *)&operand2;
|
|
1986
1986
|
Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
|
|
1987
1987
|
bool b_negative = operand2 < 0;
|
|
@@ -1993,7 +1993,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
|
|
|
1993
1993
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
1994
1994
|
}
|
|
1995
1995
|
|
|
1996
|
-
|
|
1996
|
+
Nuitka_LongFlipSign(z);
|
|
1997
1997
|
} else {
|
|
1998
1998
|
if (b_negative) {
|
|
1999
1999
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
@@ -2050,8 +2050,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
|
|
|
2050
2050
|
|
|
2051
2051
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
2052
2052
|
|
|
2053
|
-
if ((operand1 == 0 ? 0 : 1) <= 1 &&
|
|
2054
|
-
long r = (sdigit)operand1 - MEDIUM_VALUE(operand2_long_object);
|
|
2053
|
+
if ((operand1 == 0 ? 0 : 1) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
2054
|
+
long r = (long)((sdigit)operand1 - MEDIUM_VALUE(operand2_long_object));
|
|
2055
2055
|
|
|
2056
2056
|
clong_result = r;
|
|
2057
2057
|
goto exit_result_ok_clong;
|
|
@@ -2063,9 +2063,9 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
|
|
|
2063
2063
|
digit const *a_digits = (digit *)&operand1;
|
|
2064
2064
|
Py_ssize_t a_digit_count = (operand1 == 0 ? 0 : 1);
|
|
2065
2065
|
bool a_negative = operand1 < 0;
|
|
2066
|
-
digit const *b_digits = operand2_long_object
|
|
2067
|
-
Py_ssize_t b_digit_count =
|
|
2068
|
-
bool b_negative =
|
|
2066
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
2067
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
2068
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
2069
2069
|
|
|
2070
2070
|
if (a_negative) {
|
|
2071
2071
|
if (b_negative) {
|
|
@@ -2074,7 +2074,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
|
|
|
2074
2074
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
2075
2075
|
}
|
|
2076
2076
|
|
|
2077
|
-
|
|
2077
|
+
Nuitka_LongFlipSign(z);
|
|
2078
2078
|
} else {
|
|
2079
2079
|
if (b_negative) {
|
|
2080
2080
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
@@ -627,11 +627,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
|
|
|
627
627
|
|
|
628
628
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
629
629
|
|
|
630
|
-
if (
|
|
631
|
-
long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
|
|
630
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
631
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
|
|
632
632
|
|
|
633
633
|
if (Py_REFCNT(*operand1) == 1) {
|
|
634
|
-
Nuitka_LongUpdateFromCLong(&*operand1, r);
|
|
634
|
+
Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
|
|
635
635
|
goto exit_result_ok;
|
|
636
636
|
} else {
|
|
637
637
|
PyObject *obj = Nuitka_LongFromCLong(r);
|
|
@@ -644,16 +644,16 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
if (Py_REFCNT(*operand1) == 1) {
|
|
647
|
-
digit const *b_digits = operand2_long_object
|
|
648
|
-
Py_ssize_t b_digit_count =
|
|
647
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
648
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
649
649
|
|
|
650
|
-
bool a_negative =
|
|
651
|
-
bool b_negative =
|
|
650
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
651
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
652
652
|
|
|
653
653
|
if (a_negative) {
|
|
654
654
|
if (b_negative) {
|
|
655
655
|
*operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
|
|
656
|
-
|
|
656
|
+
Nuitka_LongSetSignNegative(*operand1);
|
|
657
657
|
} else {
|
|
658
658
|
*operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
|
|
659
659
|
}
|
|
@@ -670,17 +670,17 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
|
|
|
670
670
|
{
|
|
671
671
|
PyLongObject *z;
|
|
672
672
|
|
|
673
|
-
digit const *a_digits = operand1_long_object
|
|
674
|
-
Py_ssize_t a_digit_count =
|
|
675
|
-
bool a_negative =
|
|
676
|
-
digit const *b_digits = operand2_long_object
|
|
677
|
-
Py_ssize_t b_digit_count =
|
|
678
|
-
bool b_negative =
|
|
673
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
674
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
675
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
676
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
677
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
678
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
679
679
|
|
|
680
680
|
if (a_negative) {
|
|
681
681
|
if (b_negative) {
|
|
682
682
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
683
|
-
|
|
683
|
+
Nuitka_LongFlipSign(z);
|
|
684
684
|
} else {
|
|
685
685
|
z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
|
|
686
686
|
}
|
|
@@ -932,11 +932,11 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
|
|
|
932
932
|
|
|
933
933
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
934
934
|
|
|
935
|
-
if (
|
|
936
|
-
long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
|
|
935
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
936
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
|
|
937
937
|
|
|
938
938
|
if (Py_REFCNT(*operand1) == 1) {
|
|
939
|
-
Nuitka_LongUpdateFromCLong(&*operand1, r);
|
|
939
|
+
Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
|
|
940
940
|
goto exit_result_ok;
|
|
941
941
|
} else {
|
|
942
942
|
PyObject *obj = Nuitka_LongFromCLong(r);
|
|
@@ -949,16 +949,16 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
|
|
|
949
949
|
}
|
|
950
950
|
|
|
951
951
|
if (Py_REFCNT(*operand1) == 1) {
|
|
952
|
-
digit const *b_digits = operand2_long_object
|
|
953
|
-
Py_ssize_t b_digit_count =
|
|
952
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
953
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
954
954
|
|
|
955
|
-
bool a_negative =
|
|
956
|
-
bool b_negative =
|
|
955
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
956
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
957
957
|
|
|
958
958
|
if (a_negative) {
|
|
959
959
|
if (b_negative) {
|
|
960
960
|
*operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
|
|
961
|
-
|
|
961
|
+
Nuitka_LongSetSignNegative(*operand1);
|
|
962
962
|
} else {
|
|
963
963
|
*operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
|
|
964
964
|
}
|
|
@@ -975,17 +975,17 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
|
|
|
975
975
|
{
|
|
976
976
|
PyLongObject *z;
|
|
977
977
|
|
|
978
|
-
digit const *a_digits = operand1_long_object
|
|
979
|
-
Py_ssize_t a_digit_count =
|
|
980
|
-
bool a_negative =
|
|
981
|
-
digit const *b_digits = operand2_long_object
|
|
982
|
-
Py_ssize_t b_digit_count =
|
|
983
|
-
bool b_negative =
|
|
978
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
979
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
980
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
981
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
982
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
983
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
984
984
|
|
|
985
985
|
if (a_negative) {
|
|
986
986
|
if (b_negative) {
|
|
987
987
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
988
|
-
|
|
988
|
+
Nuitka_LongFlipSign(z);
|
|
989
989
|
} else {
|
|
990
990
|
z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
|
|
991
991
|
}
|
|
@@ -1231,11 +1231,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
|
|
|
1231
1231
|
|
|
1232
1232
|
PyLongObject *operand2_long_object = (PyLongObject *)operand2;
|
|
1233
1233
|
|
|
1234
|
-
if (
|
|
1235
|
-
long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
|
|
1234
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
|
|
1235
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
|
|
1236
1236
|
|
|
1237
1237
|
if (Py_REFCNT(*operand1) == 1) {
|
|
1238
|
-
Nuitka_LongUpdateFromCLong(&*operand1, r);
|
|
1238
|
+
Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
|
|
1239
1239
|
goto exit_result_ok;
|
|
1240
1240
|
} else {
|
|
1241
1241
|
PyObject *obj = Nuitka_LongFromCLong(r);
|
|
@@ -1248,16 +1248,16 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
|
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
if (Py_REFCNT(*operand1) == 1) {
|
|
1251
|
-
digit const *b_digits = operand2_long_object
|
|
1252
|
-
Py_ssize_t b_digit_count =
|
|
1251
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
1252
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
1253
1253
|
|
|
1254
|
-
bool a_negative =
|
|
1255
|
-
bool b_negative =
|
|
1254
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
1255
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
1256
1256
|
|
|
1257
1257
|
if (a_negative) {
|
|
1258
1258
|
if (b_negative) {
|
|
1259
1259
|
*operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
|
|
1260
|
-
|
|
1260
|
+
Nuitka_LongSetSignNegative(*operand1);
|
|
1261
1261
|
} else {
|
|
1262
1262
|
*operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
|
|
1263
1263
|
}
|
|
@@ -1274,17 +1274,17 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
|
|
|
1274
1274
|
{
|
|
1275
1275
|
PyLongObject *z;
|
|
1276
1276
|
|
|
1277
|
-
digit const *a_digits = operand1_long_object
|
|
1278
|
-
Py_ssize_t a_digit_count =
|
|
1279
|
-
bool a_negative =
|
|
1280
|
-
digit const *b_digits = operand2_long_object
|
|
1281
|
-
Py_ssize_t b_digit_count =
|
|
1282
|
-
bool b_negative =
|
|
1277
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
1278
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
1279
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
1280
|
+
digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
|
|
1281
|
+
Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
|
|
1282
|
+
bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
|
|
1283
1283
|
|
|
1284
1284
|
if (a_negative) {
|
|
1285
1285
|
if (b_negative) {
|
|
1286
1286
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
1287
|
-
|
|
1287
|
+
Nuitka_LongFlipSign(z);
|
|
1288
1288
|
} else {
|
|
1289
1289
|
z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
|
|
1290
1290
|
}
|
|
@@ -2393,11 +2393,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
|
|
|
2393
2393
|
|
|
2394
2394
|
PyLongObject *operand1_long_object = (PyLongObject *)*operand1;
|
|
2395
2395
|
|
|
2396
|
-
if (
|
|
2397
|
-
long r = MEDIUM_VALUE(operand1_long_object) + (sdigit)operand2;
|
|
2396
|
+
if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
|
|
2397
|
+
long r = (long)(MEDIUM_VALUE(operand1_long_object) + (sdigit)operand2);
|
|
2398
2398
|
|
|
2399
2399
|
if (Py_REFCNT(*operand1) == 1) {
|
|
2400
|
-
Nuitka_LongUpdateFromCLong(&*operand1, r);
|
|
2400
|
+
Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
|
|
2401
2401
|
goto exit_result_ok;
|
|
2402
2402
|
} else {
|
|
2403
2403
|
PyObject *obj = Nuitka_LongFromCLong(r);
|
|
@@ -2413,13 +2413,13 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
|
|
|
2413
2413
|
digit const *b_digits = (digit *)&operand2;
|
|
2414
2414
|
Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
|
|
2415
2415
|
|
|
2416
|
-
bool a_negative =
|
|
2416
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
2417
2417
|
bool b_negative = operand2 < 0;
|
|
2418
2418
|
|
|
2419
2419
|
if (a_negative) {
|
|
2420
2420
|
if (b_negative) {
|
|
2421
2421
|
*operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
|
|
2422
|
-
|
|
2422
|
+
Nuitka_LongSetSignNegative(*operand1);
|
|
2423
2423
|
} else {
|
|
2424
2424
|
*operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
|
|
2425
2425
|
}
|
|
@@ -2436,9 +2436,9 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
|
|
|
2436
2436
|
{
|
|
2437
2437
|
PyLongObject *z;
|
|
2438
2438
|
|
|
2439
|
-
digit const *a_digits = operand1_long_object
|
|
2440
|
-
Py_ssize_t a_digit_count =
|
|
2441
|
-
bool a_negative =
|
|
2439
|
+
digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
|
|
2440
|
+
Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
2441
|
+
bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
|
|
2442
2442
|
digit const *b_digits = (digit *)&operand2;
|
|
2443
2443
|
Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
|
|
2444
2444
|
bool b_negative = operand2 < 0;
|
|
@@ -2446,7 +2446,7 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
|
|
|
2446
2446
|
if (a_negative) {
|
|
2447
2447
|
if (b_negative) {
|
|
2448
2448
|
z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
|
|
2449
|
-
|
|
2449
|
+
Nuitka_LongFlipSign(z);
|
|
2450
2450
|
} else {
|
|
2451
2451
|
z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
|
|
2452
2452
|
}
|
|
@@ -96,7 +96,7 @@ NUITKA_MAY_BE_UNUSED static bool BYTES_ADD_INCREMENTAL(PyObject **operand1, PyOb
|
|
|
96
96
|
|
|
97
97
|
NUITKA_MAY_BE_UNUSED static bool UNICODE_ADD_INCREMENTAL(PyThreadState *tstate, PyObject **operand1,
|
|
98
98
|
PyObject *operand2) {
|
|
99
|
-
Py_ssize_t operand2_size =
|
|
99
|
+
Py_ssize_t operand2_size = PyUnicode_GET_LENGTH(operand2);
|
|
100
100
|
if (operand2_size == 0) {
|
|
101
101
|
return true;
|
|
102
102
|
}
|