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
|
@@ -61,6 +61,7 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_INT_INT(PyObject *operand1, PyO
|
|
|
61
61
|
obj_result = r;
|
|
62
62
|
goto exit_result_object;
|
|
63
63
|
}
|
|
64
|
+
|
|
64
65
|
{
|
|
65
66
|
PyObject *operand1_object = operand1;
|
|
66
67
|
PyObject *operand2_object = operand2;
|
|
@@ -279,6 +280,7 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_OBJECT_INT(PyObject *operand1,
|
|
|
279
280
|
obj_result = r;
|
|
280
281
|
goto exit_result_object;
|
|
281
282
|
}
|
|
283
|
+
|
|
282
284
|
{
|
|
283
285
|
PyObject *operand1_object = operand1;
|
|
284
286
|
PyObject *operand2_object = operand2;
|
|
@@ -513,6 +515,7 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_INT_OBJECT(PyObject *operand1,
|
|
|
513
515
|
obj_result = r;
|
|
514
516
|
goto exit_result_object;
|
|
515
517
|
}
|
|
518
|
+
|
|
516
519
|
{
|
|
517
520
|
PyObject *operand1_object = operand1;
|
|
518
521
|
PyObject *operand2_object = operand2;
|
|
@@ -1884,9 +1887,10 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_INT_CLONG(PyObject *operand1, l
|
|
|
1884
1887
|
obj_result = r;
|
|
1885
1888
|
goto exit_result_object;
|
|
1886
1889
|
}
|
|
1890
|
+
|
|
1887
1891
|
{
|
|
1888
1892
|
PyObject *operand1_object = operand1;
|
|
1889
|
-
PyObject *operand2_object =
|
|
1893
|
+
PyObject *operand2_object = Nuitka_PyLong_FromLong(operand2);
|
|
1890
1894
|
|
|
1891
1895
|
PyObject *r = PyLong_Type.tp_as_number->nb_divmod(operand1_object, operand2_object);
|
|
1892
1896
|
assert(r != Py_NotImplemented);
|
|
@@ -1964,8 +1968,9 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_CLONG_INT(long operand1, PyObje
|
|
|
1964
1968
|
obj_result = r;
|
|
1965
1969
|
goto exit_result_object;
|
|
1966
1970
|
}
|
|
1971
|
+
|
|
1967
1972
|
{
|
|
1968
|
-
PyObject *operand1_object =
|
|
1973
|
+
PyObject *operand1_object = Nuitka_PyLong_FromLong(operand1);
|
|
1969
1974
|
PyObject *operand2_object = operand2;
|
|
1970
1975
|
|
|
1971
1976
|
PyObject *r = PyLong_Type.tp_as_number->nb_divmod(operand1_object, operand2_object);
|
|
@@ -2205,6 +2210,7 @@ static PyObject *_BINARY_OPERATION_DIVMOD_OBJECT_OBJECT_OBJECT(PyObject *operand
|
|
|
2205
2210
|
obj_result = r;
|
|
2206
2211
|
goto exit_result_object;
|
|
2207
2212
|
}
|
|
2213
|
+
|
|
2208
2214
|
{
|
|
2209
2215
|
PyObject *operand1_object = operand1;
|
|
2210
2216
|
PyObject *operand2_object = operand2;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
3
|
+
/* WARNING, this code is GENERATED. Modify the template HelperOperationBinaryDual.c.j2 instead! */
|
|
4
|
+
|
|
5
|
+
/* This file is included from another C file, help IDEs to still parse it on its own. */
|
|
6
|
+
#ifdef __IDE_ONLY__
|
|
7
|
+
#include "nuitka/prelude.h"
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
/* C helpers for type specialized "+" (ADD) operations */
|
|
11
|
+
|
|
12
|
+
/* Code referring to "NILONG" corresponds to Nuitka int/long/C long value and "NILONG" to Nuitka int/long/C long value.
|
|
13
|
+
*/
|
|
14
|
+
bool BINARY_OPERATION_ADD_NILONG_NILONG_NILONG(nuitka_ilong *result, nuitka_ilong *operand1, nuitka_ilong *operand2) {
|
|
15
|
+
CHECK_NILONG_OBJECT(operand1);
|
|
16
|
+
CHECK_NILONG_OBJECT(operand2);
|
|
17
|
+
|
|
18
|
+
bool left_c_usable = IS_NILONG_C_VALUE_VALID(operand1);
|
|
19
|
+
bool right_c_usable = IS_NILONG_C_VALUE_VALID(operand2);
|
|
20
|
+
|
|
21
|
+
if (left_c_usable && right_c_usable) {
|
|
22
|
+
// Not every code path will make use of all possible results.
|
|
23
|
+
#ifdef _MSC_VER
|
|
24
|
+
#pragma warning(push)
|
|
25
|
+
#pragma warning(disable : 4101)
|
|
26
|
+
#endif
|
|
27
|
+
NUITKA_MAY_BE_UNUSED bool cbool_result;
|
|
28
|
+
NUITKA_MAY_BE_UNUSED PyObject *obj_result;
|
|
29
|
+
NUITKA_MAY_BE_UNUSED long clong_result;
|
|
30
|
+
NUITKA_MAY_BE_UNUSED double cfloat_result;
|
|
31
|
+
#ifdef _MSC_VER
|
|
32
|
+
#pragma warning(pop)
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
CHECK_NILONG_OBJECT(operand1);
|
|
36
|
+
CHECK_NILONG_OBJECT(operand2);
|
|
37
|
+
|
|
38
|
+
const long a = GET_NILONG_C_VALUE(operand1);
|
|
39
|
+
const long b = GET_NILONG_C_VALUE(operand2);
|
|
40
|
+
|
|
41
|
+
const long x = (long)((unsigned long)a + b);
|
|
42
|
+
bool no_overflow = ((x ^ a) >= 0 || (x ^ b) >= 0);
|
|
43
|
+
if (likely(no_overflow)) {
|
|
44
|
+
clong_result = x;
|
|
45
|
+
goto exit_result_ok_clong;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
ENFORCE_NILONG_OBJECT_VALUE(operand1);
|
|
49
|
+
obj_result = BINARY_OPERATION_ADD_OBJECT_LONG_CLONG(operand1->python_value, operand2->c_value);
|
|
50
|
+
|
|
51
|
+
if (unlikely(result == NULL)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
SET_NILONG_OBJECT_VALUE(result, obj_result);
|
|
56
|
+
return true;
|
|
57
|
+
|
|
58
|
+
exit_result_ok_clong:
|
|
59
|
+
SET_NILONG_C_VALUE(result, clong_result);
|
|
60
|
+
return true;
|
|
61
|
+
|
|
62
|
+
} else if (left_c_usable == false && right_c_usable) {
|
|
63
|
+
PyObject *python_result = BINARY_OPERATION_ADD_OBJECT_LONG_CLONG(operand1->python_value, operand2->c_value);
|
|
64
|
+
|
|
65
|
+
if (unlikely(python_result == NULL)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
SET_NILONG_OBJECT_VALUE(result, python_result);
|
|
70
|
+
return true;
|
|
71
|
+
} else if (left_c_usable && right_c_usable == false) {
|
|
72
|
+
PyObject *python_result = BINARY_OPERATION_ADD_OBJECT_LONG_CLONG(operand2->python_value, operand1->c_value);
|
|
73
|
+
|
|
74
|
+
if (unlikely(python_result == NULL)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
SET_NILONG_OBJECT_VALUE(result, python_result);
|
|
79
|
+
|
|
80
|
+
return true;
|
|
81
|
+
} else {
|
|
82
|
+
PyObject *python_result = BINARY_OPERATION_ADD_OBJECT_LONG_LONG(operand1->python_value, operand1->python_value);
|
|
83
|
+
|
|
84
|
+
if (unlikely(python_result == NULL)) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
SET_NILONG_OBJECT_VALUE(result, python_result);
|
|
89
|
+
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Code referring to "NILONG" corresponds to Nuitka int/long/C long value and "DIGIT" to C platform digit value for long
|
|
95
|
+
* Python objects. */
|
|
96
|
+
bool BINARY_OPERATION_ADD_NILONG_NILONG_DIGIT(nuitka_ilong *result, nuitka_ilong *operand1, long operand2) {
|
|
97
|
+
CHECK_NILONG_OBJECT(operand1);
|
|
98
|
+
assert(Py_ABS(operand2) < (1 << PyLong_SHIFT));
|
|
99
|
+
|
|
100
|
+
bool left_c_usable = IS_NILONG_C_VALUE_VALID(operand1);
|
|
101
|
+
bool right_c_usable = true;
|
|
102
|
+
|
|
103
|
+
if (left_c_usable && right_c_usable) {
|
|
104
|
+
// Not every code path will make use of all possible results.
|
|
105
|
+
#ifdef _MSC_VER
|
|
106
|
+
#pragma warning(push)
|
|
107
|
+
#pragma warning(disable : 4101)
|
|
108
|
+
#endif
|
|
109
|
+
NUITKA_MAY_BE_UNUSED bool cbool_result;
|
|
110
|
+
NUITKA_MAY_BE_UNUSED PyObject *obj_result;
|
|
111
|
+
NUITKA_MAY_BE_UNUSED long clong_result;
|
|
112
|
+
NUITKA_MAY_BE_UNUSED double cfloat_result;
|
|
113
|
+
#ifdef _MSC_VER
|
|
114
|
+
#pragma warning(pop)
|
|
115
|
+
#endif
|
|
116
|
+
|
|
117
|
+
CHECK_NILONG_OBJECT(operand1);
|
|
118
|
+
assert(Py_ABS(operand2) < (1 << PyLong_SHIFT));
|
|
119
|
+
|
|
120
|
+
const long a = GET_NILONG_C_VALUE(operand1);
|
|
121
|
+
const long b = (long)(operand2);
|
|
122
|
+
|
|
123
|
+
const long x = (long)((unsigned long)a + b);
|
|
124
|
+
bool no_overflow = ((x ^ a) >= 0 || (x ^ b) >= 0);
|
|
125
|
+
if (likely(no_overflow)) {
|
|
126
|
+
clong_result = x;
|
|
127
|
+
goto exit_result_ok_clong;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
ENFORCE_NILONG_OBJECT_VALUE(operand1);
|
|
131
|
+
obj_result = BINARY_OPERATION_ADD_OBJECT_LONG_DIGIT(operand1->python_value, operand2);
|
|
132
|
+
|
|
133
|
+
if (unlikely(result == NULL)) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
SET_NILONG_OBJECT_VALUE(result, obj_result);
|
|
138
|
+
return true;
|
|
139
|
+
|
|
140
|
+
exit_result_ok_clong:
|
|
141
|
+
SET_NILONG_C_VALUE(result, clong_result);
|
|
142
|
+
return true;
|
|
143
|
+
|
|
144
|
+
} else if (left_c_usable == false && right_c_usable) {
|
|
145
|
+
PyObject *python_result = BINARY_OPERATION_ADD_OBJECT_LONG_DIGIT(operand1->python_value, operand2);
|
|
146
|
+
|
|
147
|
+
if (unlikely(python_result == NULL)) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
SET_NILONG_OBJECT_VALUE(result, python_result);
|
|
152
|
+
return true;
|
|
153
|
+
} else {
|
|
154
|
+
NUITKA_CANNOT_GET_HERE("cannot happen with types NILONG DIGIT");
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
160
|
+
// integrates with CPython, but also works on its own.
|
|
161
|
+
//
|
|
162
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
163
|
+
// you may not use this file except in compliance with the License.
|
|
164
|
+
// You may obtain a copy of the License at
|
|
165
|
+
//
|
|
166
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
167
|
+
//
|
|
168
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
169
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
170
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
171
|
+
// See the License for the specific language governing permissions and
|
|
172
|
+
// limitations under the License.
|
|
@@ -65,6 +65,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_INT(PyObject *operand1, P
|
|
|
65
65
|
clong_result = a_div_b;
|
|
66
66
|
goto exit_result_ok_clong;
|
|
67
67
|
}
|
|
68
|
+
|
|
68
69
|
{
|
|
69
70
|
PyObject *operand1_object = operand1;
|
|
70
71
|
PyObject *operand2_object = operand2;
|
|
@@ -77,7 +78,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_INT(PyObject *operand1, P
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
exit_result_ok_clong:
|
|
80
|
-
result =
|
|
81
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
81
82
|
goto exit_result_ok;
|
|
82
83
|
|
|
83
84
|
exit_result_object:
|
|
@@ -292,6 +293,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_OBJECT_INT(PyObject *operand1
|
|
|
292
293
|
clong_result = a_div_b;
|
|
293
294
|
goto exit_result_ok_clong;
|
|
294
295
|
}
|
|
296
|
+
|
|
295
297
|
{
|
|
296
298
|
PyObject *operand1_object = operand1;
|
|
297
299
|
PyObject *operand2_object = operand2;
|
|
@@ -304,7 +306,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_OBJECT_INT(PyObject *operand1
|
|
|
304
306
|
}
|
|
305
307
|
|
|
306
308
|
exit_result_ok_clong:
|
|
307
|
-
result =
|
|
309
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
308
310
|
goto exit_result_ok;
|
|
309
311
|
|
|
310
312
|
exit_result_object:
|
|
@@ -536,6 +538,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_OBJECT(PyObject *operand1
|
|
|
536
538
|
clong_result = a_div_b;
|
|
537
539
|
goto exit_result_ok_clong;
|
|
538
540
|
}
|
|
541
|
+
|
|
539
542
|
{
|
|
540
543
|
PyObject *operand1_object = operand1;
|
|
541
544
|
PyObject *operand2_object = operand2;
|
|
@@ -548,7 +551,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_OBJECT(PyObject *operand1
|
|
|
548
551
|
}
|
|
549
552
|
|
|
550
553
|
exit_result_ok_clong:
|
|
551
|
-
result =
|
|
554
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
552
555
|
goto exit_result_ok;
|
|
553
556
|
|
|
554
557
|
exit_result_object:
|
|
@@ -1894,9 +1897,10 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_CLONG(PyObject *operand1,
|
|
|
1894
1897
|
clong_result = a_div_b;
|
|
1895
1898
|
goto exit_result_ok_clong;
|
|
1896
1899
|
}
|
|
1900
|
+
|
|
1897
1901
|
{
|
|
1898
1902
|
PyObject *operand1_object = operand1;
|
|
1899
|
-
PyObject *operand2_object =
|
|
1903
|
+
PyObject *operand2_object = Nuitka_PyLong_FromLong(operand2);
|
|
1900
1904
|
|
|
1901
1905
|
PyObject *r = PyLong_Type.tp_as_number->nb_floor_divide(operand1_object, operand2_object);
|
|
1902
1906
|
assert(r != Py_NotImplemented);
|
|
@@ -1908,7 +1912,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_INT_CLONG(PyObject *operand1,
|
|
|
1908
1912
|
}
|
|
1909
1913
|
|
|
1910
1914
|
exit_result_ok_clong:
|
|
1911
|
-
result =
|
|
1915
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
1912
1916
|
goto exit_result_ok;
|
|
1913
1917
|
|
|
1914
1918
|
exit_result_object:
|
|
@@ -1983,8 +1987,9 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_CLONG_INT(long operand1, PyOb
|
|
|
1983
1987
|
clong_result = a_div_b;
|
|
1984
1988
|
goto exit_result_ok_clong;
|
|
1985
1989
|
}
|
|
1990
|
+
|
|
1986
1991
|
{
|
|
1987
|
-
PyObject *operand1_object =
|
|
1992
|
+
PyObject *operand1_object = Nuitka_PyLong_FromLong(operand1);
|
|
1988
1993
|
PyObject *operand2_object = operand2;
|
|
1989
1994
|
|
|
1990
1995
|
PyObject *r = PyLong_Type.tp_as_number->nb_floor_divide(operand1_object, operand2_object);
|
|
@@ -1997,7 +2002,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_CLONG_INT(long operand1, PyOb
|
|
|
1997
2002
|
}
|
|
1998
2003
|
|
|
1999
2004
|
exit_result_ok_clong:
|
|
2000
|
-
result =
|
|
2005
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
2001
2006
|
goto exit_result_ok;
|
|
2002
2007
|
|
|
2003
2008
|
exit_result_object:
|
|
@@ -2217,6 +2222,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_OBJECT_OBJECT(PyObject *opera
|
|
|
2217
2222
|
clong_result = a_div_b;
|
|
2218
2223
|
goto exit_result_ok_clong;
|
|
2219
2224
|
}
|
|
2225
|
+
|
|
2220
2226
|
{
|
|
2221
2227
|
PyObject *operand1_object = operand1;
|
|
2222
2228
|
PyObject *operand2_object = operand2;
|
|
@@ -2229,7 +2235,7 @@ static PyObject *_BINARY_OPERATION_FLOORDIV_OBJECT_OBJECT_OBJECT(PyObject *opera
|
|
|
2229
2235
|
}
|
|
2230
2236
|
|
|
2231
2237
|
exit_result_ok_clong:
|
|
2232
|
-
result =
|
|
2238
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
2233
2239
|
goto exit_result_ok;
|
|
2234
2240
|
|
|
2235
2241
|
exit_result_object:
|
|
@@ -935,8 +935,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_INT(PyObject *operand1, PyO
|
|
|
935
935
|
if (a == 0 || b == 0) {
|
|
936
936
|
goto exit_result_ok_left;
|
|
937
937
|
} else if (b >= LONG_BIT) {
|
|
938
|
-
PyObject *operand1_long =
|
|
939
|
-
PyObject *operand2_long =
|
|
938
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
939
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
940
940
|
|
|
941
941
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
942
942
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -950,8 +950,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_INT(PyObject *operand1, PyO
|
|
|
950
950
|
long c = a << b;
|
|
951
951
|
|
|
952
952
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
953
|
-
PyObject *operand1_long =
|
|
954
|
-
PyObject *operand2_long =
|
|
953
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
954
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
955
955
|
|
|
956
956
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
957
957
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -968,7 +968,7 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_INT(PyObject *operand1, PyO
|
|
|
968
968
|
}
|
|
969
969
|
|
|
970
970
|
exit_result_ok_clong:
|
|
971
|
-
result =
|
|
971
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
972
972
|
goto exit_result_ok;
|
|
973
973
|
|
|
974
974
|
exit_result_ok_left:
|
|
@@ -1173,8 +1173,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_INT(PyObject *operand1,
|
|
|
1173
1173
|
if (a == 0 || b == 0) {
|
|
1174
1174
|
goto exit_result_ok_left;
|
|
1175
1175
|
} else if (b >= LONG_BIT) {
|
|
1176
|
-
PyObject *operand1_long =
|
|
1177
|
-
PyObject *operand2_long =
|
|
1176
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1177
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1178
1178
|
|
|
1179
1179
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1180
1180
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1188,8 +1188,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_INT(PyObject *operand1,
|
|
|
1188
1188
|
long c = a << b;
|
|
1189
1189
|
|
|
1190
1190
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
1191
|
-
PyObject *operand1_long =
|
|
1192
|
-
PyObject *operand2_long =
|
|
1191
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1192
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1193
1193
|
|
|
1194
1194
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1195
1195
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1206,7 +1206,7 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_INT(PyObject *operand1,
|
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
1208
|
exit_result_ok_clong:
|
|
1209
|
-
result =
|
|
1209
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
1210
1210
|
goto exit_result_ok;
|
|
1211
1211
|
|
|
1212
1212
|
exit_result_ok_left:
|
|
@@ -1427,8 +1427,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_OBJECT(PyObject *operand1,
|
|
|
1427
1427
|
if (a == 0 || b == 0) {
|
|
1428
1428
|
goto exit_result_ok_left;
|
|
1429
1429
|
} else if (b >= LONG_BIT) {
|
|
1430
|
-
PyObject *operand1_long =
|
|
1431
|
-
PyObject *operand2_long =
|
|
1430
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1431
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1432
1432
|
|
|
1433
1433
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1434
1434
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1442,8 +1442,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_OBJECT(PyObject *operand1,
|
|
|
1442
1442
|
long c = a << b;
|
|
1443
1443
|
|
|
1444
1444
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
1445
|
-
PyObject *operand1_long =
|
|
1446
|
-
PyObject *operand2_long =
|
|
1445
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1446
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1447
1447
|
|
|
1448
1448
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1449
1449
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1460,7 +1460,7 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_INT_OBJECT(PyObject *operand1,
|
|
|
1460
1460
|
}
|
|
1461
1461
|
|
|
1462
1462
|
exit_result_ok_clong:
|
|
1463
|
-
result =
|
|
1463
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
1464
1464
|
goto exit_result_ok;
|
|
1465
1465
|
|
|
1466
1466
|
exit_result_ok_left:
|
|
@@ -1531,8 +1531,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_INT_INT(PyObject *operand1, Py
|
|
|
1531
1531
|
if (a == 0 || b == 0) {
|
|
1532
1532
|
goto exit_result_ok_left;
|
|
1533
1533
|
} else if (b >= LONG_BIT) {
|
|
1534
|
-
PyObject *operand1_long =
|
|
1535
|
-
PyObject *operand2_long =
|
|
1534
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1535
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1536
1536
|
|
|
1537
1537
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1538
1538
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1546,8 +1546,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_INT_INT(PyObject *operand1, Py
|
|
|
1546
1546
|
long c = a << b;
|
|
1547
1547
|
|
|
1548
1548
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
1549
|
-
PyObject *operand1_long =
|
|
1550
|
-
PyObject *operand2_long =
|
|
1549
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1550
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1551
1551
|
|
|
1552
1552
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1553
1553
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1777,8 +1777,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_OBJECT_INT(PyObject *operand1,
|
|
|
1777
1777
|
if (a == 0 || b == 0) {
|
|
1778
1778
|
goto exit_result_ok_left;
|
|
1779
1779
|
} else if (b >= LONG_BIT) {
|
|
1780
|
-
PyObject *operand1_long =
|
|
1781
|
-
PyObject *operand2_long =
|
|
1780
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1781
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1782
1782
|
|
|
1783
1783
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1784
1784
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -1792,8 +1792,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_OBJECT_INT(PyObject *operand1,
|
|
|
1792
1792
|
long c = a << b;
|
|
1793
1793
|
|
|
1794
1794
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
1795
|
-
PyObject *operand1_long =
|
|
1796
|
-
PyObject *operand2_long =
|
|
1795
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
1796
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
1797
1797
|
|
|
1798
1798
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
1799
1799
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2039,8 +2039,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_INT_OBJECT(PyObject *operand1,
|
|
|
2039
2039
|
if (a == 0 || b == 0) {
|
|
2040
2040
|
goto exit_result_ok_left;
|
|
2041
2041
|
} else if (b >= LONG_BIT) {
|
|
2042
|
-
PyObject *operand1_long =
|
|
2043
|
-
PyObject *operand2_long =
|
|
2042
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2043
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2044
2044
|
|
|
2045
2045
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2046
2046
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2054,8 +2054,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_INT_OBJECT(PyObject *operand1,
|
|
|
2054
2054
|
long c = a << b;
|
|
2055
2055
|
|
|
2056
2056
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
2057
|
-
PyObject *operand1_long =
|
|
2058
|
-
PyObject *operand2_long =
|
|
2057
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2058
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2059
2059
|
|
|
2060
2060
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2061
2061
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2366,8 +2366,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_OBJECT(PyObject *operand
|
|
|
2366
2366
|
if (a == 0 || b == 0) {
|
|
2367
2367
|
goto exit_result_ok_left;
|
|
2368
2368
|
} else if (b >= LONG_BIT) {
|
|
2369
|
-
PyObject *operand1_long =
|
|
2370
|
-
PyObject *operand2_long =
|
|
2369
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2370
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2371
2371
|
|
|
2372
2372
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2373
2373
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2381,8 +2381,8 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_OBJECT(PyObject *operand
|
|
|
2381
2381
|
long c = a << b;
|
|
2382
2382
|
|
|
2383
2383
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
2384
|
-
PyObject *operand1_long =
|
|
2385
|
-
PyObject *operand2_long =
|
|
2384
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2385
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2386
2386
|
|
|
2387
2387
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2388
2388
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2399,7 +2399,7 @@ static PyObject *_BINARY_OPERATION_LSHIFT_OBJECT_OBJECT_OBJECT(PyObject *operand
|
|
|
2399
2399
|
}
|
|
2400
2400
|
|
|
2401
2401
|
exit_result_ok_clong:
|
|
2402
|
-
result =
|
|
2402
|
+
result = Nuitka_PyInt_FromLong(clong_result);
|
|
2403
2403
|
goto exit_result_ok;
|
|
2404
2404
|
|
|
2405
2405
|
exit_result_ok_left:
|
|
@@ -2614,8 +2614,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_OBJECT_OBJECT(PyObject *operan
|
|
|
2614
2614
|
if (a == 0 || b == 0) {
|
|
2615
2615
|
goto exit_result_ok_left;
|
|
2616
2616
|
} else if (b >= LONG_BIT) {
|
|
2617
|
-
PyObject *operand1_long =
|
|
2618
|
-
PyObject *operand2_long =
|
|
2617
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2618
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2619
2619
|
|
|
2620
2620
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2621
2621
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -2629,8 +2629,8 @@ static nuitka_bool _BINARY_OPERATION_LSHIFT_NBOOL_OBJECT_OBJECT(PyObject *operan
|
|
|
2629
2629
|
long c = a << b;
|
|
2630
2630
|
|
|
2631
2631
|
if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
|
|
2632
|
-
PyObject *operand1_long =
|
|
2633
|
-
PyObject *operand2_long =
|
|
2632
|
+
PyObject *operand1_long = Nuitka_PyLong_FromLong(a);
|
|
2633
|
+
PyObject *operand2_long = Nuitka_PyLong_FromLong(b);
|
|
2634
2634
|
|
|
2635
2635
|
// TODO: Change this to using CLONG once we specialize that too.
|
|
2636
2636
|
PyObject *r = _BINARY_OPERATION_LSHIFT_OBJECT_LONG_LONG(operand1_long, operand2_long);
|
|
@@ -329,6 +329,7 @@ static PyObject *_BINARY_OPERATION_MATMULT_OBJECT_OBJECT_OBJECT(PyObject *operan
|
|
|
329
329
|
const long b = PyInt_AS_LONG(operand2);
|
|
330
330
|
|
|
331
331
|
#error Operator @ not implemented
|
|
332
|
+
|
|
332
333
|
{
|
|
333
334
|
PyObject *operand1_object = operand1;
|
|
334
335
|
PyObject *operand2_object = operand2;
|