Nuitka-winsvc 1.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-1.8.data/scripts/nuitka-run.bat → Nuitka_winsvc-2.5.1.data/scripts/nuitka-run.cmd +9 -9
- Nuitka_winsvc-1.8.data/scripts/nuitka.bat → Nuitka_winsvc-2.5.1.data/scripts/nuitka.cmd +15 -15
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/METADATA +5 -3
- Nuitka_winsvc-2.5.1.dist-info/RECORD +977 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +49 -17
- nuitka/BytecodeCaching.py +24 -20
- nuitka/Bytecodes.py +23 -19
- nuitka/CacheCleanup.py +28 -23
- nuitka/Constants.py +19 -17
- nuitka/Errors.py +23 -17
- nuitka/HardImportRegistry.py +408 -0
- nuitka/MainControl.py +209 -116
- nuitka/ModuleRegistry.py +83 -20
- nuitka/OptionParsing.py +467 -221
- nuitka/Options.py +701 -225
- nuitka/OutputDirectories.py +47 -23
- nuitka/PostProcessing.py +133 -79
- nuitka/Progress.py +73 -24
- nuitka/PythonFlavors.py +141 -32
- nuitka/PythonOperators.py +18 -17
- nuitka/PythonVersions.py +107 -19
- nuitka/Serialization.py +70 -55
- nuitka/SourceCodeReferences.py +19 -17
- nuitka/Tracing.py +176 -70
- nuitka/TreeXML.py +31 -26
- nuitka/Variables.py +39 -41
- nuitka/Version.py +22 -8
- nuitka/__init__.py +5 -4
- nuitka/__main__.py +95 -29
- nuitka/__past__.py +44 -34
- nuitka/build/Backend.scons +243 -141
- nuitka/build/CCompilerVersion.scons +45 -31
- nuitka/build/DataComposerInterface.py +20 -17
- nuitka/build/Onefile.scons +56 -54
- nuitka/build/SconsCaching.py +105 -92
- nuitka/build/SconsCompilerSettings.py +167 -68
- nuitka/build/SconsHacks.py +25 -19
- nuitka/build/SconsInterface.py +155 -54
- nuitka/build/SconsProgress.py +19 -18
- nuitka/build/SconsSpawn.py +62 -33
- nuitka/build/SconsUtils.py +152 -55
- nuitka/build/__init__.py +5 -4
- nuitka/build/include/nuitka/allocator.h +228 -22
- nuitka/build/include/nuitka/builtins.h +17 -17
- nuitka/build/include/nuitka/calling.h +24 -24
- nuitka/build/include/nuitka/checkers.h +17 -18
- nuitka/build/include/nuitka/checksum_tools.h +14 -19
- nuitka/build/include/nuitka/compiled_asyncgen.h +28 -25
- nuitka/build/include/nuitka/compiled_cell.h +33 -18
- nuitka/build/include/nuitka/compiled_coroutine.h +18 -18
- nuitka/build/include/nuitka/compiled_frame.h +93 -54
- nuitka/build/include/nuitka/compiled_function.h +42 -20
- nuitka/build/include/nuitka/compiled_generator.h +24 -18
- nuitka/build/include/nuitka/compiled_method.h +17 -18
- nuitka/build/include/nuitka/constants.h +35 -18
- nuitka/build/include/nuitka/constants_blob.h +17 -17
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/environment_variables.h +30 -0
- nuitka/build/include/nuitka/environment_variables_system.h +45 -0
- nuitka/build/include/nuitka/exception_groups.h +23 -26
- nuitka/build/include/nuitka/exceptions.h +717 -171
- nuitka/build/include/nuitka/filesystem_paths.h +26 -20
- nuitka/build/include/nuitka/freelists.h +38 -18
- nuitka/build/include/nuitka/helper/attributes.h +24 -22
- nuitka/build/include/nuitka/helper/boolean.h +17 -17
- nuitka/build/include/nuitka/helper/bytearrays.h +17 -17
- nuitka/build/include/nuitka/helper/bytes.h +14 -15
- nuitka/build/include/nuitka/helper/calling_generated.h +69 -69
- 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/comparisons_eq.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_ge.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_gt.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_le.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_lt.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_ne.h +17 -17
- nuitka/build/include/nuitka/helper/complex.h +17 -17
- nuitka/build/include/nuitka/helper/dictionaries.h +89 -51
- nuitka/build/include/nuitka/helper/floats.h +17 -18
- nuitka/build/include/nuitka/helper/import_hard.h +25 -17
- nuitka/build/include/nuitka/helper/indexes.h +17 -18
- nuitka/build/include/nuitka/helper/ints.h +115 -54
- nuitka/build/include/nuitka/helper/iterators.h +99 -51
- nuitka/build/include/nuitka/helper/lists.h +26 -24
- nuitka/build/include/nuitka/helper/lists_generated.h +22 -22
- nuitka/build/include/nuitka/helper/mappings.h +17 -18
- nuitka/build/include/nuitka/helper/operations.h +20 -17
- nuitka/build/include/nuitka/helper/operations_binary_add.h +23 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +23 -17
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +20 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +20 -17
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +17 -17
- nuitka/build/include/nuitka/helper/raising.h +68 -37
- nuitka/build/include/nuitka/helper/rangeobjects.h +17 -17
- nuitka/build/include/nuitka/helper/richcomparisons.h +21 -14
- nuitka/build/include/nuitka/helper/sequences.h +19 -13
- nuitka/build/include/nuitka/helper/sets.h +11 -12
- nuitka/build/include/nuitka/helper/slices.h +31 -25
- nuitka/build/include/nuitka/helper/strings.h +16 -17
- nuitka/build/include/nuitka/helper/subscripts.h +18 -201
- nuitka/build/include/nuitka/helper/tuples.h +64 -52
- nuitka/build/include/nuitka/helpers.h +50 -22
- nuitka/build/include/nuitka/importing.h +28 -21
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +163 -71
- nuitka/build/include/nuitka/printing.h +29 -22
- nuitka/build/include/nuitka/python_pgo.h +19 -18
- nuitka/build/include/nuitka/safe_string_ops.h +20 -18
- nuitka/build/include/nuitka/threading.h +45 -32
- nuitka/build/include/nuitka/tracing.h +28 -18
- nuitka/build/include/nuitka/type_aliases.h +30 -0
- nuitka/build/include/nuitka/unfreezing.h +29 -23
- nuitka/build/inline_copy/bin/scons.py +14 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +6 -6
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
- nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -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/inline_copy/tqdm/tqdm/__init__.py +2 -2
- nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +4 -1
- nuitka/build/inline_copy/tqdm/tqdm/utils.py +14 -8
- nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -8
- nuitka/build/inline_copy/zlib/LICENSE +22 -0
- nuitka/build/inline_copy/zlib/crc32.c +1049 -0
- nuitka/build/inline_copy/zlib/crc32.h +9446 -0
- nuitka/build/inline_copy/zlib/zconf.h +551 -0
- nuitka/build/inline_copy/zlib/zlib.h +1938 -0
- nuitka/build/inline_copy/zlib/zutil.h +275 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +221 -221
- nuitka/build/static_src/CompiledCellType.c +69 -44
- nuitka/build/static_src/CompiledCodeHelpers.c +276 -159
- nuitka/build/static_src/CompiledCoroutineType.c +229 -226
- nuitka/build/static_src/CompiledFrameType.c +323 -138
- nuitka/build/static_src/CompiledFunctionType.c +547 -231
- nuitka/build/static_src/CompiledGeneratorType.c +416 -290
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +593 -228
- nuitka/build/static_src/CompiledMethodType.c +91 -82
- nuitka/build/static_src/HelpersAllocator.c +352 -45
- nuitka/build/static_src/HelpersAttributes.c +30 -72
- nuitka/build/static_src/HelpersBuiltin.c +65 -46
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +17 -17
- nuitka/build/static_src/HelpersBytes.c +19 -20
- nuitka/build/static_src/HelpersCalling.c +40 -37
- nuitka/build/static_src/HelpersCallingGenerated.c +1061 -242
- nuitka/build/static_src/HelpersChecksumTools.c +35 -21
- nuitka/build/static_src/HelpersClasses.c +17 -17
- 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 +536 -496
- nuitka/build/static_src/HelpersComparisonEqUtils.c +22 -19
- nuitka/build/static_src/HelpersComparisonGe.c +531 -501
- nuitka/build/static_src/HelpersComparisonGt.c +530 -500
- nuitka/build/static_src/HelpersComparisonLe.c +531 -501
- nuitka/build/static_src/HelpersComparisonLt.c +530 -500
- nuitka/build/static_src/HelpersComparisonNe.c +538 -496
- nuitka/build/static_src/HelpersConsole.c +122 -0
- nuitka/build/static_src/HelpersConstantsBlob.c +550 -521
- nuitka/build/static_src/HelpersDeepcopy.c +33 -33
- nuitka/build/static_src/HelpersDictionaries.c +232 -63
- nuitka/build/static_src/HelpersDictionariesGenerated.c +130 -127
- nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
- nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +93 -0
- nuitka/build/static_src/HelpersExceptions.c +147 -62
- nuitka/build/static_src/HelpersFiles.c +116 -22
- nuitka/build/static_src/HelpersFilesystemPaths.c +292 -181
- nuitka/build/static_src/HelpersFloats.c +37 -31
- nuitka/build/static_src/HelpersHeapStorage.c +21 -17
- nuitka/build/static_src/HelpersImport.c +61 -29
- nuitka/build/static_src/HelpersImportHard.c +74 -61
- nuitka/build/static_src/HelpersJitSources.c +46 -0
- nuitka/build/static_src/HelpersLists.c +237 -58
- nuitka/build/static_src/HelpersListsGenerated.c +41 -41
- nuitka/build/static_src/HelpersMappings.c +17 -17
- nuitka/build/static_src/HelpersMatching.c +137 -51
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +397 -152
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +102 -52
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +49 -43
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +17 -17
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +55 -49
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +20 -21
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +83 -83
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +25 -24
- nuitka/build/static_src/HelpersOperationBinaryMod.c +129 -117
- nuitka/build/static_src/HelpersOperationBinaryMult.c +98 -82
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +33 -30
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +55 -49
- nuitka/build/static_src/HelpersOperationBinaryPow.c +68 -68
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +12 -12
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +51 -51
- nuitka/build/static_src/HelpersOperationBinarySub.c +309 -88
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +49 -43
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +333 -163
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +24 -22
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +73 -68
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +64 -64
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +38 -37
- nuitka/build/static_src/HelpersOperationInplaceMod.c +145 -140
- nuitka/build/static_src/HelpersOperationInplaceMult.c +89 -84
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +73 -68
- nuitka/build/static_src/HelpersOperationInplacePow.c +82 -82
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +48 -48
- nuitka/build/static_src/HelpersOperationInplaceSub.c +275 -122
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +68 -63
- nuitka/build/static_src/HelpersProfiling.c +25 -24
- nuitka/build/static_src/HelpersPythonPgo.c +22 -22
- nuitka/build/static_src/HelpersRaising.c +296 -283
- nuitka/build/static_src/HelpersSafeStrings.c +34 -22
- nuitka/build/static_src/HelpersSequences.c +18 -19
- nuitka/build/static_src/HelpersSlices.c +29 -23
- nuitka/build/static_src/HelpersStrings.c +235 -38
- nuitka/build/static_src/HelpersTuples.c +46 -34
- nuitka/build/static_src/HelpersTypes.c +166 -25
- nuitka/build/static_src/InspectPatcher.c +108 -27
- nuitka/build/static_src/MainProgram.c +464 -280
- nuitka/build/static_src/MetaPathBasedLoader.c +381 -257
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +39 -26
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +17 -18
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +227 -29
- nuitka/build/static_src/OnefileBootstrap.c +281 -164
- nuitka/build/static_src/OnefileSplashScreen.cpp +51 -27
- nuitka/code_generation/AsyncgenCodes.py +21 -23
- nuitka/code_generation/AttributeCodes.py +31 -27
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +290 -184
- nuitka/code_generation/BranchCodes.py +19 -17
- nuitka/code_generation/BuiltinCodes.py +29 -18
- nuitka/code_generation/CallCodes.py +35 -33
- nuitka/code_generation/ClassCodes.py +19 -17
- nuitka/code_generation/CodeGeneration.py +61 -28
- nuitka/code_generation/CodeHelperSelection.py +20 -18
- nuitka/code_generation/CodeHelpers.py +28 -21
- nuitka/code_generation/CodeObjectCodes.py +36 -26
- nuitka/code_generation/ComparisonCodes.py +51 -22
- nuitka/code_generation/ComparisonHelperDefinitions.py +42 -25
- nuitka/code_generation/ConditionalCodes.py +19 -17
- nuitka/code_generation/ConstantCodes.py +82 -28
- nuitka/code_generation/Contexts.py +180 -42
- nuitka/code_generation/CoroutineCodes.py +21 -23
- nuitka/code_generation/CtypesCodes.py +19 -17
- nuitka/code_generation/DictCodes.py +28 -26
- nuitka/code_generation/Emission.py +21 -18
- nuitka/code_generation/ErrorCodes.py +57 -79
- nuitka/code_generation/EvalCodes.py +24 -20
- nuitka/code_generation/ExceptionCodes.py +182 -104
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +45 -27
- nuitka/code_generation/ExpressionCodes.py +19 -17
- nuitka/code_generation/FrameCodes.py +28 -31
- nuitka/code_generation/FunctionCodes.py +26 -27
- nuitka/code_generation/GeneratorCodes.py +25 -26
- nuitka/code_generation/GlobalConstants.py +51 -25
- nuitka/code_generation/GlobalsLocalsCodes.py +23 -21
- nuitka/code_generation/IdCodes.py +19 -17
- nuitka/code_generation/ImportCodes.py +90 -50
- nuitka/code_generation/Indentation.py +23 -22
- nuitka/code_generation/IndexCodes.py +19 -17
- nuitka/code_generation/InjectCCodes.py +14 -12
- nuitka/code_generation/IntegerCodes.py +19 -17
- nuitka/code_generation/IteratorCodes.py +86 -71
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/LabelCodes.py +19 -17
- nuitka/code_generation/LineNumberCodes.py +20 -20
- nuitka/code_generation/ListCodes.py +32 -36
- nuitka/code_generation/LoaderCodes.py +22 -17
- nuitka/code_generation/LocalsDictCodes.py +56 -32
- nuitka/code_generation/LoopCodes.py +19 -17
- nuitka/code_generation/MatchCodes.py +42 -22
- nuitka/code_generation/ModuleCodes.py +71 -29
- nuitka/code_generation/Namify.py +27 -23
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +80 -51
- nuitka/code_generation/PackageResourceCodes.py +96 -23
- nuitka/code_generation/PrintCodes.py +19 -17
- nuitka/code_generation/PythonAPICodes.py +19 -17
- nuitka/code_generation/RaisingCodes.py +183 -107
- nuitka/code_generation/Reports.py +32 -22
- nuitka/code_generation/ReturnCodes.py +20 -32
- nuitka/code_generation/SetCodes.py +19 -17
- nuitka/code_generation/SliceCodes.py +22 -20
- nuitka/code_generation/StringCodes.py +19 -17
- nuitka/code_generation/SubscriptCodes.py +24 -30
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TryCodes.py +31 -41
- nuitka/code_generation/TupleCodes.py +20 -18
- nuitka/code_generation/TypeAliasCodes.py +119 -0
- nuitka/code_generation/VariableCodes.py +118 -55
- nuitka/code_generation/VariableDeclarations.py +28 -25
- nuitka/code_generation/YieldCodes.py +23 -21
- nuitka/code_generation/__init__.py +5 -4
- nuitka/code_generation/c_types/CTypeBases.py +29 -19
- nuitka/code_generation/c_types/CTypeBooleans.py +19 -17
- nuitka/code_generation/c_types/CTypeCFloats.py +19 -17
- nuitka/code_generation/c_types/CTypeCLongs.py +19 -18
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +22 -17
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +22 -21
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +89 -43
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +20 -18
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +43 -31
- nuitka/code_generation/c_types/CTypeVoids.py +20 -17
- nuitka/code_generation/c_types/__init__.py +5 -4
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesConstants.py +143 -39
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +33 -33
- nuitka/code_generation/templates/CodeTemplatesFrames.py +36 -27
- nuitka/code_generation/templates/CodeTemplatesFunction.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +21 -19
- nuitka/code_generation/templates/CodeTemplatesIterators.py +19 -53
- nuitka/code_generation/templates/CodeTemplatesLoader.py +25 -19
- nuitka/code_generation/templates/CodeTemplatesModules.py +278 -169
- nuitka/code_generation/templates/CodeTemplatesVariables.py +115 -27
- nuitka/code_generation/templates/TemplateDebugWrapper.py +19 -18
- nuitka/code_generation/templates/__init__.py +5 -4
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +19 -19
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +21 -21
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +79 -28
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +22 -22
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +19 -19
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +19 -19
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +74 -106
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +19 -20
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +19 -19
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +6 -6
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +23 -23
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +35 -35
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +37 -37
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +18 -18
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +50 -38
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +27 -27
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +37 -37
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +31 -31
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +35 -31
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +20 -20
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +28 -28
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +48 -48
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +21 -18
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +27 -25
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +21 -18
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +17 -17
- nuitka/containers/Namedtuples.py +25 -18
- nuitka/containers/OrderedSets.py +105 -5
- nuitka/containers/OrderedSetsFallback.py +19 -17
- nuitka/containers/__init__.py +5 -4
- nuitka/distutils/Build.py +33 -18
- nuitka/distutils/DistutilCommands.py +84 -33
- nuitka/distutils/__init__.py +5 -4
- nuitka/finalizations/Finalization.py +21 -18
- nuitka/finalizations/FinalizeMarkups.py +31 -55
- nuitka/finalizations/__init__.py +5 -4
- nuitka/freezer/DependsExe.py +60 -30
- nuitka/freezer/DllDependenciesCommon.py +47 -20
- nuitka/freezer/DllDependenciesMacOS.py +165 -58
- nuitka/freezer/DllDependenciesPosix.py +29 -19
- nuitka/freezer/DllDependenciesWin32.py +55 -33
- nuitka/freezer/ImportDetection.py +23 -17
- nuitka/freezer/IncludedDataFiles.py +142 -48
- nuitka/freezer/IncludedEntryPoints.py +104 -39
- nuitka/freezer/Onefile.py +32 -22
- nuitka/freezer/Standalone.py +166 -53
- nuitka/freezer/__init__.py +5 -4
- nuitka/importing/IgnoreListing.py +19 -17
- nuitka/importing/ImportCache.py +24 -21
- nuitka/importing/ImportResolving.py +103 -95
- nuitka/importing/Importing.py +319 -98
- nuitka/importing/PreloadedPackages.py +21 -18
- nuitka/importing/Recursion.py +142 -47
- nuitka/importing/StandardLibrary.py +96 -80
- nuitka/importing/__init__.py +5 -4
- nuitka/nodes/AsyncgenNodes.py +22 -23
- nuitka/nodes/AttributeLookupNodes.py +19 -17
- nuitka/nodes/AttributeNodes.py +19 -17
- nuitka/nodes/AttributeNodesGenerated.py +49 -24
- nuitka/nodes/BuiltinAllNodes.py +19 -17
- nuitka/nodes/BuiltinAnyNodes.py +19 -17
- nuitka/nodes/BuiltinComplexNodes.py +20 -17
- nuitka/nodes/BuiltinDecodingNodes.py +19 -17
- nuitka/nodes/BuiltinDecoratorNodes.py +19 -17
- nuitka/nodes/BuiltinDictNodes.py +19 -17
- nuitka/nodes/BuiltinFormatNodes.py +20 -17
- nuitka/nodes/BuiltinHashNodes.py +19 -17
- nuitka/nodes/BuiltinInputNodes.py +19 -17
- nuitka/nodes/BuiltinIntegerNodes.py +19 -17
- nuitka/nodes/BuiltinIteratorNodes.py +25 -21
- nuitka/nodes/BuiltinLenNodes.py +19 -17
- nuitka/nodes/BuiltinNextNodes.py +19 -17
- nuitka/nodes/BuiltinOpenNodes.py +52 -18
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +40 -23
- nuitka/nodes/BuiltinRangeNodes.py +21 -19
- nuitka/nodes/BuiltinRefNodes.py +73 -40
- nuitka/nodes/BuiltinSumNodes.py +20 -18
- nuitka/nodes/BuiltinTypeNodes.py +19 -17
- nuitka/nodes/BuiltinVarsNodes.py +19 -18
- nuitka/nodes/BytesNodes.py +19 -17
- nuitka/nodes/CallNodes.py +19 -17
- nuitka/nodes/Checkers.py +19 -17
- nuitka/nodes/ChildrenHavingMixins.py +1624 -283
- nuitka/nodes/ClassNodes.py +49 -29
- nuitka/nodes/CodeObjectSpecs.py +29 -18
- nuitka/nodes/ComparisonNodes.py +19 -17
- nuitka/nodes/ConditionalNodes.py +24 -25
- nuitka/nodes/ConstantRefNodes.py +57 -17
- nuitka/nodes/ContainerMakingNodes.py +19 -17
- nuitka/nodes/ContainerOperationNodes.py +19 -17
- nuitka/nodes/CoroutineNodes.py +22 -23
- nuitka/nodes/CtypesNodes.py +19 -18
- nuitka/nodes/DictionaryNodes.py +19 -18
- nuitka/nodes/ExceptionNodes.py +131 -43
- nuitka/nodes/ExecEvalNodes.py +19 -17
- nuitka/nodes/ExpressionBases.py +34 -26
- nuitka/nodes/ExpressionBasesGenerated.py +341 -35
- nuitka/nodes/ExpressionShapeMixins.py +19 -17
- nuitka/nodes/FrameNodes.py +41 -28
- nuitka/nodes/FunctionAttributeNodes.py +19 -17
- nuitka/nodes/FunctionNodes.py +84 -38
- nuitka/nodes/FutureSpecs.py +35 -20
- nuitka/nodes/GeneratorNodes.py +24 -25
- nuitka/nodes/GlobalsLocalsNodes.py +22 -17
- nuitka/nodes/HardImportNodesGenerated.py +746 -148
- nuitka/nodes/ImportHardNodes.py +46 -38
- nuitka/nodes/ImportNodes.py +438 -448
- nuitka/nodes/IndicatorMixins.py +19 -17
- nuitka/nodes/InjectCNodes.py +19 -18
- nuitka/nodes/IterationHandles.py +55 -34
- nuitka/nodes/KeyValuePairNodes.py +19 -17
- nuitka/nodes/ListOperationNodes.py +33 -21
- nuitka/nodes/LocalsDictNodes.py +19 -17
- nuitka/nodes/LocalsScopes.py +41 -41
- nuitka/nodes/LoopNodes.py +28 -17
- nuitka/nodes/MatchNodes.py +37 -24
- nuitka/nodes/ModuleAttributeNodes.py +18 -35
- nuitka/nodes/ModuleNodes.py +90 -31
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/NodeBases.py +73 -44
- nuitka/nodes/NodeMakingHelpers.py +92 -69
- nuitka/nodes/NodeMetaClasses.py +45 -28
- nuitka/nodes/OperatorNodes.py +28 -26
- nuitka/nodes/OperatorNodesUnary.py +148 -20
- nuitka/nodes/OsSysNodes.py +97 -18
- nuitka/nodes/OutlineNodes.py +24 -22
- nuitka/nodes/PackageMetadataNodes.py +37 -27
- nuitka/nodes/PackageResourceNodes.py +29 -23
- nuitka/nodes/PrintNodes.py +19 -17
- nuitka/nodes/ReturnNodes.py +20 -18
- nuitka/nodes/SideEffectNodes.py +19 -17
- nuitka/nodes/SliceNodes.py +20 -18
- nuitka/nodes/StatementBasesGenerated.py +125 -79
- nuitka/nodes/StatementNodes.py +27 -24
- nuitka/nodes/StrNodes.py +19 -17
- nuitka/nodes/StringConcatenationNodes.py +20 -17
- nuitka/nodes/SubscriptNodes.py +27 -25
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TryNodes.py +19 -17
- nuitka/nodes/TypeMatchNodes.py +19 -17
- nuitka/nodes/TypeNodes.py +68 -18
- nuitka/nodes/VariableAssignNodes.py +122 -64
- nuitka/nodes/VariableDelNodes.py +19 -17
- nuitka/nodes/VariableNameNodes.py +19 -17
- nuitka/nodes/VariableRefNodes.py +63 -26
- nuitka/nodes/VariableReleaseNodes.py +19 -17
- nuitka/nodes/YieldNodes.py +21 -19
- nuitka/nodes/__init__.py +5 -4
- nuitka/nodes/shapes/BuiltinTypeShapes.py +169 -46
- nuitka/nodes/shapes/ControlFlowDescriptions.py +19 -17
- nuitka/nodes/shapes/ShapeMixins.py +57 -17
- nuitka/nodes/shapes/StandardShapes.py +80 -21
- nuitka/nodes/shapes/__init__.py +5 -4
- nuitka/optimizations/BytecodeDemotion.py +21 -18
- nuitka/optimizations/FunctionInlining.py +22 -23
- nuitka/optimizations/Graphs.py +19 -17
- nuitka/optimizations/Optimization.py +39 -35
- nuitka/optimizations/OptimizeBuiltinCalls.py +31 -27
- nuitka/optimizations/Tags.py +19 -18
- nuitka/optimizations/TraceCollections.py +67 -24
- nuitka/optimizations/ValueTraces.py +92 -25
- nuitka/optimizations/__init__.py +5 -4
- nuitka/pgo/PGO.py +33 -23
- nuitka/pgo/__init__.py +5 -4
- nuitka/plugins/PluginBase.py +655 -112
- nuitka/plugins/Plugins.py +247 -61
- nuitka/plugins/YamlPluginBase.py +121 -0
- nuitka/plugins/__init__.py +5 -4
- nuitka/plugins/standard/AntiBloatPlugin.py +374 -135
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +20 -19
- nuitka/plugins/standard/DataFilesPlugin.py +65 -29
- nuitka/plugins/standard/DelvewheelPlugin.py +32 -24
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +256 -0
- nuitka/plugins/standard/DillPlugin.py +42 -134
- nuitka/plugins/standard/DllFilesPlugin.py +125 -42
- nuitka/plugins/standard/EnumPlugin.py +19 -17
- nuitka/plugins/standard/EventletPlugin.py +19 -17
- nuitka/plugins/standard/GeventPlugin.py +19 -17
- nuitka/plugins/standard/GiPlugin.py +44 -28
- nuitka/plugins/standard/GlfwPlugin.py +20 -17
- nuitka/plugins/standard/ImplicitImports.py +403 -54
- nuitka/plugins/standard/KivyPlugin.py +24 -20
- nuitka/plugins/standard/MatplotlibPlugin.py +99 -42
- nuitka/plugins/standard/MultiprocessingPlugin.py +35 -39
- nuitka/plugins/standard/NumpyPlugin.py +19 -17
- nuitka/plugins/standard/OptionsNannyPlugin.py +48 -76
- nuitka/plugins/standard/PbrPlugin.py +21 -19
- nuitka/plugins/standard/PkgResourcesPlugin.py +34 -23
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PmwPlugin.py +30 -27
- nuitka/plugins/standard/PySidePyQtPlugin.py +82 -80
- nuitka/plugins/standard/PywebViewPlugin.py +19 -17
- nuitka/plugins/standard/SpacyPlugin.py +136 -0
- nuitka/plugins/standard/TensorflowPlugin.py +20 -17
- nuitka/plugins/standard/TkinterPlugin.py +102 -108
- nuitka/plugins/standard/TorchPlugin.py +20 -17
- nuitka/plugins/standard/TransformersPlugin.py +90 -231
- nuitka/plugins/standard/TrioPlugin.py +18 -15
- nuitka/plugins/standard/UpxPlugin.py +21 -19
- nuitka/plugins/standard/__init__.py +5 -4
- nuitka/plugins/standard/standard.nuitka-package.config.yml +3925 -1293
- nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +14 -14
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +154 -66
- nuitka/reports/CompilationReportReader.py +79 -0
- nuitka/reports/LicenseReport.rst.j2 +21 -21
- nuitka/reports/Reports.py +363 -76
- nuitka/reports/__init__.py +5 -4
- nuitka/specs/BuiltinBytesOperationSpecs.py +18 -17
- nuitka/specs/BuiltinDictOperationSpecs.py +18 -17
- nuitka/specs/BuiltinListOperationSpecs.py +18 -17
- nuitka/specs/BuiltinParameterSpecs.py +35 -21
- nuitka/specs/BuiltinStrOperationSpecs.py +19 -18
- nuitka/specs/BuiltinTypeOperationSpecs.py +18 -18
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +18 -17
- nuitka/specs/HardImportSpecs.py +74 -22
- nuitka/specs/ParameterSpecs.py +60 -45
- nuitka/specs/__init__.py +5 -4
- nuitka/tools/Basics.py +20 -18
- nuitka/tools/__init__.py +5 -4
- nuitka/tools/commercial/__init__.py +7 -6
- nuitka/tools/data_composer/DataComposer.py +78 -62
- nuitka/tools/data_composer/__init__.py +5 -4
- nuitka/tools/data_composer/__main__.py +18 -17
- nuitka/tools/environments/CreateEnvironment.py +20 -17
- nuitka/tools/environments/Virtualenv.py +60 -32
- nuitka/tools/environments/__init__.py +5 -4
- nuitka/tools/general/__init__.py +5 -4
- nuitka/tools/general/dll_report/__init__.py +5 -4
- nuitka/tools/general/dll_report/__main__.py +29 -22
- nuitka/tools/general/find_module/FindModuleCode.py +35 -22
- nuitka/tools/general/find_module/__init__.py +5 -4
- nuitka/tools/onefile_compressor/OnefileCompressor.py +213 -131
- nuitka/tools/onefile_compressor/__init__.py +5 -4
- nuitka/tools/onefile_compressor/__main__.py +18 -17
- nuitka/tools/podman/Podman.py +19 -17
- nuitka/tools/podman/__init__.py +5 -4
- nuitka/tools/podman/__main__.py +35 -19
- nuitka/tools/profiler/__init__.py +5 -4
- nuitka/tools/profiler/__main__.py +18 -17
- nuitka/tools/scanning/DisplayPackageDLLs.py +47 -22
- nuitka/tools/scanning/DisplayPackageData.py +31 -19
- nuitka/tools/scanning/__init__.py +5 -4
- nuitka/tools/specialize/CTypeDescriptions.py +251 -80
- nuitka/tools/specialize/Common.py +18 -17
- nuitka/tools/specialize/SpecializeC.py +248 -82
- nuitka/tools/specialize/SpecializePython.py +108 -45
- nuitka/tools/specialize/__init__.py +5 -4
- nuitka/tools/testing/Common.py +175 -114
- nuitka/tools/testing/Constructs.py +19 -17
- nuitka/tools/testing/OutputComparison.py +54 -18
- nuitka/tools/testing/Pythons.py +19 -18
- nuitka/tools/testing/RuntimeTracing.py +20 -19
- nuitka/tools/testing/SearchModes.py +26 -20
- nuitka/tools/testing/Valgrind.py +19 -17
- nuitka/tools/testing/__init__.py +5 -4
- nuitka/tools/testing/check_reference_counts/__init__.py +5 -4
- nuitka/tools/testing/check_reference_counts/__main__.py +18 -18
- nuitka/tools/testing/compare_with_cpython/__init__.py +5 -4
- nuitka/tools/testing/compare_with_cpython/__main__.py +39 -30
- nuitka/tools/testing/find_sxs_modules/__init__.py +5 -4
- nuitka/tools/testing/find_sxs_modules/__main__.py +17 -17
- nuitka/tools/testing/measure_construct_performance/__init__.py +5 -4
- nuitka/tools/testing/measure_construct_performance/__main__.py +23 -33
- nuitka/tools/testing/run_nuitka_tests/__init__.py +5 -4
- nuitka/tools/testing/run_nuitka_tests/__main__.py +134 -51
- nuitka/tools/watch/AutoStage.py +145 -0
- nuitka/tools/watch/GitHub.py +113 -0
- nuitka/tools/watch/__init__.py +5 -4
- nuitka/tools/watch/__main__.py +322 -91
- nuitka/tree/Building.py +184 -182
- nuitka/tree/ComplexCallHelperFunctions.py +84 -58
- nuitka/tree/Extractions.py +19 -17
- nuitka/tree/InternalModule.py +29 -20
- nuitka/tree/Operations.py +19 -17
- nuitka/tree/ReformulationAssertStatements.py +51 -31
- nuitka/tree/ReformulationAssignmentStatements.py +96 -91
- nuitka/tree/ReformulationBooleanExpressions.py +19 -17
- nuitka/tree/ReformulationCallExpressions.py +20 -18
- nuitka/tree/ReformulationClasses.py +45 -39
- nuitka/tree/ReformulationClasses3.py +239 -116
- nuitka/tree/ReformulationComparisonExpressions.py +29 -35
- nuitka/tree/ReformulationContractionExpressions.py +58 -55
- nuitka/tree/ReformulationDictionaryCreation.py +41 -35
- nuitka/tree/ReformulationExecStatements.py +42 -39
- nuitka/tree/ReformulationForLoopStatements.py +30 -34
- nuitka/tree/ReformulationFunctionStatements.py +59 -55
- nuitka/tree/ReformulationImportStatements.py +34 -29
- nuitka/tree/ReformulationLambdaExpressions.py +23 -24
- nuitka/tree/ReformulationMatchStatements.py +246 -92
- nuitka/tree/ReformulationMultidist.py +22 -18
- nuitka/tree/ReformulationNamespacePackages.py +55 -46
- nuitka/tree/ReformulationPrintStatements.py +23 -24
- nuitka/tree/ReformulationSequenceCreation.py +50 -49
- nuitka/tree/ReformulationSubscriptExpressions.py +19 -17
- nuitka/tree/ReformulationTryExceptStatements.py +19 -17
- nuitka/tree/ReformulationTryFinallyStatements.py +34 -17
- nuitka/tree/ReformulationWhileLoopStatements.py +19 -17
- nuitka/tree/ReformulationWithStatements.py +39 -41
- nuitka/tree/ReformulationYieldExpressions.py +44 -24
- nuitka/tree/SourceHandling.py +76 -31
- nuitka/tree/SyntaxErrors.py +19 -17
- nuitka/tree/TreeHelpers.py +33 -20
- nuitka/tree/VariableClosure.py +35 -39
- nuitka/tree/__init__.py +5 -4
- nuitka/utils/AppDirs.py +41 -20
- nuitka/utils/CStrings.py +66 -21
- nuitka/utils/CommandLineOptions.py +111 -22
- nuitka/utils/Distributions.py +445 -54
- nuitka/utils/Download.py +89 -57
- nuitka/utils/Execution.py +102 -58
- nuitka/utils/FileOperations.py +357 -128
- nuitka/utils/Hashing.py +55 -33
- nuitka/utils/Images.py +26 -19
- nuitka/utils/Importing.py +119 -37
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +85 -75
- nuitka/utils/InstanceCounters.py +20 -17
- nuitka/utils/Jinja2.py +30 -22
- nuitka/utils/Json.py +21 -19
- nuitka/utils/MacOSApp.py +26 -18
- nuitka/utils/MemoryUsage.py +20 -18
- nuitka/utils/ModuleNames.py +42 -26
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/ReExecute.py +50 -28
- nuitka/utils/Rest.py +20 -17
- nuitka/utils/SharedLibraries.py +161 -75
- nuitka/utils/Shebang.py +20 -17
- nuitka/utils/Signing.py +63 -18
- nuitka/utils/SlotMetaClasses.py +57 -0
- nuitka/utils/StaticLibraries.py +83 -56
- nuitka/utils/ThreadedExecutor.py +18 -17
- nuitka/utils/Timing.py +22 -20
- nuitka/utils/Utils.py +132 -25
- nuitka/utils/WindowsFileUsage.py +22 -20
- nuitka/utils/WindowsResources.py +25 -18
- nuitka/utils/Yaml.py +62 -24
- nuitka/utils/__init__.py +5 -4
- Nuitka_winsvc-1.8.dist-info/RECORD +0 -905
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_gui.py +0 -9
- nuitka/build/inline_copy/tqdm/tqdm/gui.py +0 -191
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/top_level.txt +0 -0
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
// Copyright
|
|
2
|
-
|
|
3
|
-
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
4
|
-
// integrates with CPython, but also works on its own.
|
|
5
|
-
//
|
|
6
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
// you may not use this file except in compliance with the License.
|
|
8
|
-
// You may obtain a copy of the License at
|
|
9
|
-
//
|
|
10
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
//
|
|
12
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
// See the License for the specific language governing permissions and
|
|
16
|
-
// limitations under the License.
|
|
17
|
-
//
|
|
1
|
+
// Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
18
3
|
/* WARNING, this code is GENERATED. Modify the template HelperOperationComparison.c.j2 instead! */
|
|
19
4
|
|
|
20
5
|
/* This file is included from another C file, help IDEs to still parse it on its own. */
|
|
@@ -38,7 +23,7 @@ static PyObject *COMPARE_LE_OBJECT_INT_INT(PyObject *operand1, PyObject *operand
|
|
|
38
23
|
|
|
39
24
|
// Convert to target type.
|
|
40
25
|
PyObject *result = BOOL_FROM(r);
|
|
41
|
-
|
|
26
|
+
Py_INCREF_IMMORTAL(result);
|
|
42
27
|
return result;
|
|
43
28
|
}
|
|
44
29
|
#endif
|
|
@@ -73,7 +58,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
73
58
|
if (operand1 == operand2 && IS_SANE_TYPE(Py_TYPE(operand1))) {
|
|
74
59
|
bool r = true;
|
|
75
60
|
PyObject *result = BOOL_FROM(r);
|
|
76
|
-
|
|
61
|
+
Py_INCREF_IMMORTAL(result);
|
|
77
62
|
return result;
|
|
78
63
|
}
|
|
79
64
|
|
|
@@ -94,7 +79,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
94
79
|
// If the types are equal, we may get away immediately except for instances.
|
|
95
80
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
96
81
|
|
|
97
|
-
richcmpfunc frich =
|
|
82
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
98
83
|
|
|
99
84
|
if (frich != NULL) {
|
|
100
85
|
PyObject *result = (*frich)(operand1, operand2, Py_LE);
|
|
@@ -105,7 +90,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
105
90
|
return result;
|
|
106
91
|
}
|
|
107
92
|
|
|
108
|
-
|
|
93
|
+
Py_DECREF_IMMORTAL(result);
|
|
109
94
|
}
|
|
110
95
|
|
|
111
96
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -146,7 +131,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
146
131
|
|
|
147
132
|
bool r = c != 0;
|
|
148
133
|
PyObject *result = BOOL_FROM(r);
|
|
149
|
-
|
|
134
|
+
Py_INCREF_IMMORTAL(result);
|
|
150
135
|
return result;
|
|
151
136
|
}
|
|
152
137
|
}
|
|
@@ -155,7 +140,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
155
140
|
richcmpfunc f;
|
|
156
141
|
|
|
157
142
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
158
|
-
f =
|
|
143
|
+
f = TP_RICHCOMPARE(type2);
|
|
159
144
|
|
|
160
145
|
if (f != NULL) {
|
|
161
146
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -166,11 +151,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
166
151
|
return result;
|
|
167
152
|
}
|
|
168
153
|
|
|
169
|
-
|
|
154
|
+
Py_DECREF_IMMORTAL(result);
|
|
170
155
|
}
|
|
171
156
|
}
|
|
172
157
|
|
|
173
|
-
f =
|
|
158
|
+
f = TP_RICHCOMPARE(type1);
|
|
174
159
|
if (f != NULL) {
|
|
175
160
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
176
161
|
|
|
@@ -180,10 +165,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
180
165
|
return result;
|
|
181
166
|
}
|
|
182
167
|
|
|
183
|
-
|
|
168
|
+
Py_DECREF_IMMORTAL(result);
|
|
184
169
|
}
|
|
185
170
|
|
|
186
|
-
f =
|
|
171
|
+
f = TP_RICHCOMPARE(type2);
|
|
187
172
|
if (f != NULL) {
|
|
188
173
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
189
174
|
|
|
@@ -193,7 +178,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
193
178
|
return result;
|
|
194
179
|
}
|
|
195
180
|
|
|
196
|
-
|
|
181
|
+
Py_DECREF_IMMORTAL(result);
|
|
197
182
|
}
|
|
198
183
|
|
|
199
184
|
int c;
|
|
@@ -281,14 +266,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
281
266
|
|
|
282
267
|
bool r = c != 0;
|
|
283
268
|
PyObject *result = BOOL_FROM(r);
|
|
284
|
-
|
|
269
|
+
Py_INCREF_IMMORTAL(result);
|
|
285
270
|
return result;
|
|
286
271
|
#else
|
|
287
272
|
bool checked_reverse_op = false;
|
|
288
273
|
richcmpfunc f;
|
|
289
274
|
|
|
290
275
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
291
|
-
f =
|
|
276
|
+
f = TP_RICHCOMPARE(type2);
|
|
292
277
|
|
|
293
278
|
if (f != NULL) {
|
|
294
279
|
checked_reverse_op = true;
|
|
@@ -301,11 +286,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
301
286
|
return result;
|
|
302
287
|
}
|
|
303
288
|
|
|
304
|
-
|
|
289
|
+
Py_DECREF_IMMORTAL(result);
|
|
305
290
|
}
|
|
306
291
|
}
|
|
307
292
|
|
|
308
|
-
f =
|
|
293
|
+
f = TP_RICHCOMPARE(type1);
|
|
309
294
|
|
|
310
295
|
if (f != NULL) {
|
|
311
296
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -316,11 +301,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
316
301
|
return result;
|
|
317
302
|
}
|
|
318
303
|
|
|
319
|
-
|
|
304
|
+
Py_DECREF_IMMORTAL(result);
|
|
320
305
|
}
|
|
321
306
|
|
|
322
307
|
if (checked_reverse_op == false) {
|
|
323
|
-
f =
|
|
308
|
+
f = TP_RICHCOMPARE(type2);
|
|
324
309
|
|
|
325
310
|
if (f != NULL) {
|
|
326
311
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -331,7 +316,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
331
316
|
return result;
|
|
332
317
|
}
|
|
333
318
|
|
|
334
|
-
|
|
319
|
+
Py_DECREF_IMMORTAL(result);
|
|
335
320
|
}
|
|
336
321
|
}
|
|
337
322
|
|
|
@@ -343,13 +328,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
343
328
|
case Py_EQ: {
|
|
344
329
|
bool r = operand1 == operand2;
|
|
345
330
|
PyObject *result = BOOL_FROM(r);
|
|
346
|
-
|
|
331
|
+
Py_INCREF_IMMORTAL(result);
|
|
347
332
|
return result;
|
|
348
333
|
}
|
|
349
334
|
case Py_NE: {
|
|
350
335
|
bool r = operand1 != operand2;
|
|
351
336
|
PyObject *result = BOOL_FROM(r);
|
|
352
|
-
|
|
337
|
+
Py_INCREF_IMMORTAL(result);
|
|
353
338
|
return result;
|
|
354
339
|
}
|
|
355
340
|
default:
|
|
@@ -398,7 +383,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
398
383
|
// If the types are equal, we may get away immediately except for instances.
|
|
399
384
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
400
385
|
|
|
401
|
-
richcmpfunc frich =
|
|
386
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
402
387
|
|
|
403
388
|
if (frich != NULL) {
|
|
404
389
|
PyObject *result = (*frich)(operand1, operand2, Py_LE);
|
|
@@ -417,7 +402,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
417
402
|
}
|
|
418
403
|
}
|
|
419
404
|
|
|
420
|
-
|
|
405
|
+
Py_DECREF_IMMORTAL(result);
|
|
421
406
|
}
|
|
422
407
|
|
|
423
408
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -467,7 +452,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
467
452
|
richcmpfunc f;
|
|
468
453
|
|
|
469
454
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
470
|
-
f =
|
|
455
|
+
f = TP_RICHCOMPARE(type2);
|
|
471
456
|
|
|
472
457
|
if (f != NULL) {
|
|
473
458
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -486,11 +471,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
486
471
|
}
|
|
487
472
|
}
|
|
488
473
|
|
|
489
|
-
|
|
474
|
+
Py_DECREF_IMMORTAL(result);
|
|
490
475
|
}
|
|
491
476
|
}
|
|
492
477
|
|
|
493
|
-
f =
|
|
478
|
+
f = TP_RICHCOMPARE(type1);
|
|
494
479
|
if (f != NULL) {
|
|
495
480
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
496
481
|
|
|
@@ -508,10 +493,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
508
493
|
}
|
|
509
494
|
}
|
|
510
495
|
|
|
511
|
-
|
|
496
|
+
Py_DECREF_IMMORTAL(result);
|
|
512
497
|
}
|
|
513
498
|
|
|
514
|
-
f =
|
|
499
|
+
f = TP_RICHCOMPARE(type2);
|
|
515
500
|
if (f != NULL) {
|
|
516
501
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
517
502
|
|
|
@@ -529,7 +514,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
529
514
|
}
|
|
530
515
|
}
|
|
531
516
|
|
|
532
|
-
|
|
517
|
+
Py_DECREF_IMMORTAL(result);
|
|
533
518
|
}
|
|
534
519
|
|
|
535
520
|
int c;
|
|
@@ -624,7 +609,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
624
609
|
richcmpfunc f;
|
|
625
610
|
|
|
626
611
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
627
|
-
f =
|
|
612
|
+
f = TP_RICHCOMPARE(type2);
|
|
628
613
|
|
|
629
614
|
if (f != NULL) {
|
|
630
615
|
checked_reverse_op = true;
|
|
@@ -645,11 +630,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
645
630
|
}
|
|
646
631
|
}
|
|
647
632
|
|
|
648
|
-
|
|
633
|
+
Py_DECREF_IMMORTAL(result);
|
|
649
634
|
}
|
|
650
635
|
}
|
|
651
636
|
|
|
652
|
-
f =
|
|
637
|
+
f = TP_RICHCOMPARE(type1);
|
|
653
638
|
|
|
654
639
|
if (f != NULL) {
|
|
655
640
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -668,11 +653,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
668
653
|
}
|
|
669
654
|
}
|
|
670
655
|
|
|
671
|
-
|
|
656
|
+
Py_DECREF_IMMORTAL(result);
|
|
672
657
|
}
|
|
673
658
|
|
|
674
659
|
if (checked_reverse_op == false) {
|
|
675
|
-
f =
|
|
660
|
+
f = TP_RICHCOMPARE(type2);
|
|
676
661
|
|
|
677
662
|
if (f != NULL) {
|
|
678
663
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -691,7 +676,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
691
676
|
}
|
|
692
677
|
}
|
|
693
678
|
|
|
694
|
-
|
|
679
|
+
Py_DECREF_IMMORTAL(result);
|
|
695
680
|
}
|
|
696
681
|
}
|
|
697
682
|
|
|
@@ -740,7 +725,7 @@ static PyObject *COMPARE_LE_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
740
725
|
|
|
741
726
|
// Convert to target type.
|
|
742
727
|
PyObject *result = BOOL_FROM(r);
|
|
743
|
-
|
|
728
|
+
Py_INCREF_IMMORTAL(result);
|
|
744
729
|
return result;
|
|
745
730
|
}
|
|
746
731
|
|
|
@@ -768,9 +753,11 @@ static PyObject *COMPARE_LE_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
768
753
|
|
|
769
754
|
// Convert to target type.
|
|
770
755
|
PyObject *result = BOOL_FROM(c != 0);
|
|
771
|
-
|
|
756
|
+
Py_INCREF_IMMORTAL(result);
|
|
772
757
|
return result;
|
|
773
758
|
}
|
|
759
|
+
#endif
|
|
760
|
+
#if PYTHON_VERSION < 0x300
|
|
774
761
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
775
762
|
PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
776
763
|
|
|
@@ -805,7 +792,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
805
792
|
return result;
|
|
806
793
|
}
|
|
807
794
|
|
|
808
|
-
|
|
795
|
+
Py_DECREF_IMMORTAL(result);
|
|
809
796
|
}
|
|
810
797
|
|
|
811
798
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -846,7 +833,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
846
833
|
|
|
847
834
|
bool r = c != 0;
|
|
848
835
|
PyObject *result = BOOL_FROM(r);
|
|
849
|
-
|
|
836
|
+
Py_INCREF_IMMORTAL(result);
|
|
850
837
|
return result;
|
|
851
838
|
}
|
|
852
839
|
}
|
|
@@ -866,11 +853,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
866
853
|
return result;
|
|
867
854
|
}
|
|
868
855
|
|
|
869
|
-
|
|
856
|
+
Py_DECREF_IMMORTAL(result);
|
|
870
857
|
}
|
|
871
858
|
}
|
|
872
859
|
|
|
873
|
-
f =
|
|
860
|
+
f = TP_RICHCOMPARE(type1);
|
|
874
861
|
if (f != NULL) {
|
|
875
862
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
876
863
|
|
|
@@ -880,7 +867,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
880
867
|
return result;
|
|
881
868
|
}
|
|
882
869
|
|
|
883
|
-
|
|
870
|
+
Py_DECREF_IMMORTAL(result);
|
|
884
871
|
}
|
|
885
872
|
|
|
886
873
|
f = PyString_Type.tp_richcompare;
|
|
@@ -893,7 +880,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
893
880
|
return result;
|
|
894
881
|
}
|
|
895
882
|
|
|
896
|
-
|
|
883
|
+
Py_DECREF_IMMORTAL(result);
|
|
897
884
|
}
|
|
898
885
|
|
|
899
886
|
int c;
|
|
@@ -981,7 +968,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
981
968
|
|
|
982
969
|
bool r = c != 0;
|
|
983
970
|
PyObject *result = BOOL_FROM(r);
|
|
984
|
-
|
|
971
|
+
Py_INCREF_IMMORTAL(result);
|
|
985
972
|
return result;
|
|
986
973
|
#else
|
|
987
974
|
bool checked_reverse_op = false;
|
|
@@ -1001,11 +988,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1001
988
|
return result;
|
|
1002
989
|
}
|
|
1003
990
|
|
|
1004
|
-
|
|
991
|
+
Py_DECREF_IMMORTAL(result);
|
|
1005
992
|
}
|
|
1006
993
|
}
|
|
1007
994
|
|
|
1008
|
-
f =
|
|
995
|
+
f = TP_RICHCOMPARE(type1);
|
|
1009
996
|
|
|
1010
997
|
if (f != NULL) {
|
|
1011
998
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -1016,7 +1003,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1016
1003
|
return result;
|
|
1017
1004
|
}
|
|
1018
1005
|
|
|
1019
|
-
|
|
1006
|
+
Py_DECREF_IMMORTAL(result);
|
|
1020
1007
|
}
|
|
1021
1008
|
|
|
1022
1009
|
if (checked_reverse_op == false) {
|
|
@@ -1031,7 +1018,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1031
1018
|
return result;
|
|
1032
1019
|
}
|
|
1033
1020
|
|
|
1034
|
-
|
|
1021
|
+
Py_DECREF_IMMORTAL(result);
|
|
1035
1022
|
}
|
|
1036
1023
|
}
|
|
1037
1024
|
|
|
@@ -1043,13 +1030,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1043
1030
|
case Py_EQ: {
|
|
1044
1031
|
bool r = operand1 == operand2;
|
|
1045
1032
|
PyObject *result = BOOL_FROM(r);
|
|
1046
|
-
|
|
1033
|
+
Py_INCREF_IMMORTAL(result);
|
|
1047
1034
|
return result;
|
|
1048
1035
|
}
|
|
1049
1036
|
case Py_NE: {
|
|
1050
1037
|
bool r = operand1 != operand2;
|
|
1051
1038
|
PyObject *result = BOOL_FROM(r);
|
|
1052
|
-
|
|
1039
|
+
Py_INCREF_IMMORTAL(result);
|
|
1053
1040
|
return result;
|
|
1054
1041
|
}
|
|
1055
1042
|
default:
|
|
@@ -1099,7 +1086,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1099
1086
|
return result;
|
|
1100
1087
|
}
|
|
1101
1088
|
|
|
1102
|
-
|
|
1089
|
+
Py_DECREF_IMMORTAL(result);
|
|
1103
1090
|
}
|
|
1104
1091
|
|
|
1105
1092
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1140,7 +1127,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1140
1127
|
|
|
1141
1128
|
bool r = c != 0;
|
|
1142
1129
|
PyObject *result = BOOL_FROM(r);
|
|
1143
|
-
|
|
1130
|
+
Py_INCREF_IMMORTAL(result);
|
|
1144
1131
|
return result;
|
|
1145
1132
|
}
|
|
1146
1133
|
}
|
|
@@ -1149,7 +1136,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1149
1136
|
richcmpfunc f;
|
|
1150
1137
|
|
|
1151
1138
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1152
|
-
f =
|
|
1139
|
+
f = TP_RICHCOMPARE(type2);
|
|
1153
1140
|
|
|
1154
1141
|
if (f != NULL) {
|
|
1155
1142
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -1160,7 +1147,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1160
1147
|
return result;
|
|
1161
1148
|
}
|
|
1162
1149
|
|
|
1163
|
-
|
|
1150
|
+
Py_DECREF_IMMORTAL(result);
|
|
1164
1151
|
}
|
|
1165
1152
|
}
|
|
1166
1153
|
|
|
@@ -1174,10 +1161,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1174
1161
|
return result;
|
|
1175
1162
|
}
|
|
1176
1163
|
|
|
1177
|
-
|
|
1164
|
+
Py_DECREF_IMMORTAL(result);
|
|
1178
1165
|
}
|
|
1179
1166
|
|
|
1180
|
-
f =
|
|
1167
|
+
f = TP_RICHCOMPARE(type2);
|
|
1181
1168
|
if (f != NULL) {
|
|
1182
1169
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
1183
1170
|
|
|
@@ -1187,7 +1174,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1187
1174
|
return result;
|
|
1188
1175
|
}
|
|
1189
1176
|
|
|
1190
|
-
|
|
1177
|
+
Py_DECREF_IMMORTAL(result);
|
|
1191
1178
|
}
|
|
1192
1179
|
|
|
1193
1180
|
int c;
|
|
@@ -1275,14 +1262,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1275
1262
|
|
|
1276
1263
|
bool r = c != 0;
|
|
1277
1264
|
PyObject *result = BOOL_FROM(r);
|
|
1278
|
-
|
|
1265
|
+
Py_INCREF_IMMORTAL(result);
|
|
1279
1266
|
return result;
|
|
1280
1267
|
#else
|
|
1281
1268
|
bool checked_reverse_op = false;
|
|
1282
1269
|
richcmpfunc f;
|
|
1283
1270
|
|
|
1284
1271
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1285
|
-
f =
|
|
1272
|
+
f = TP_RICHCOMPARE(type2);
|
|
1286
1273
|
|
|
1287
1274
|
if (f != NULL) {
|
|
1288
1275
|
checked_reverse_op = true;
|
|
@@ -1295,7 +1282,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1295
1282
|
return result;
|
|
1296
1283
|
}
|
|
1297
1284
|
|
|
1298
|
-
|
|
1285
|
+
Py_DECREF_IMMORTAL(result);
|
|
1299
1286
|
}
|
|
1300
1287
|
}
|
|
1301
1288
|
|
|
@@ -1310,11 +1297,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1310
1297
|
return result;
|
|
1311
1298
|
}
|
|
1312
1299
|
|
|
1313
|
-
|
|
1300
|
+
Py_DECREF_IMMORTAL(result);
|
|
1314
1301
|
}
|
|
1315
1302
|
|
|
1316
1303
|
if (checked_reverse_op == false) {
|
|
1317
|
-
f =
|
|
1304
|
+
f = TP_RICHCOMPARE(type2);
|
|
1318
1305
|
|
|
1319
1306
|
if (f != NULL) {
|
|
1320
1307
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -1325,7 +1312,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1325
1312
|
return result;
|
|
1326
1313
|
}
|
|
1327
1314
|
|
|
1328
|
-
|
|
1315
|
+
Py_DECREF_IMMORTAL(result);
|
|
1329
1316
|
}
|
|
1330
1317
|
}
|
|
1331
1318
|
|
|
@@ -1337,13 +1324,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1337
1324
|
case Py_EQ: {
|
|
1338
1325
|
bool r = operand1 == operand2;
|
|
1339
1326
|
PyObject *result = BOOL_FROM(r);
|
|
1340
|
-
|
|
1327
|
+
Py_INCREF_IMMORTAL(result);
|
|
1341
1328
|
return result;
|
|
1342
1329
|
}
|
|
1343
1330
|
case Py_NE: {
|
|
1344
1331
|
bool r = operand1 != operand2;
|
|
1345
1332
|
PyObject *result = BOOL_FROM(r);
|
|
1346
|
-
|
|
1333
|
+
Py_INCREF_IMMORTAL(result);
|
|
1347
1334
|
return result;
|
|
1348
1335
|
}
|
|
1349
1336
|
default:
|
|
@@ -1413,6 +1400,8 @@ static bool COMPARE_LE_CBOOL_STR_STR(PyObject *operand1, PyObject *operand2) {
|
|
|
1413
1400
|
|
|
1414
1401
|
return result;
|
|
1415
1402
|
}
|
|
1403
|
+
#endif
|
|
1404
|
+
#if PYTHON_VERSION < 0x300
|
|
1416
1405
|
/* Code referring to "STR" corresponds to Python2 'str' and "STR" to Python2 'str'. */
|
|
1417
1406
|
bool RICH_COMPARE_LE_CBOOL_STR_STR(PyObject *operand1, PyObject *operand2) {
|
|
1418
1407
|
|
|
@@ -1463,7 +1452,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1463
1452
|
}
|
|
1464
1453
|
}
|
|
1465
1454
|
|
|
1466
|
-
|
|
1455
|
+
Py_DECREF_IMMORTAL(result);
|
|
1467
1456
|
}
|
|
1468
1457
|
|
|
1469
1458
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1532,11 +1521,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1532
1521
|
}
|
|
1533
1522
|
}
|
|
1534
1523
|
|
|
1535
|
-
|
|
1524
|
+
Py_DECREF_IMMORTAL(result);
|
|
1536
1525
|
}
|
|
1537
1526
|
}
|
|
1538
1527
|
|
|
1539
|
-
f =
|
|
1528
|
+
f = TP_RICHCOMPARE(type1);
|
|
1540
1529
|
if (f != NULL) {
|
|
1541
1530
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
1542
1531
|
|
|
@@ -1554,7 +1543,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1554
1543
|
}
|
|
1555
1544
|
}
|
|
1556
1545
|
|
|
1557
|
-
|
|
1546
|
+
Py_DECREF_IMMORTAL(result);
|
|
1558
1547
|
}
|
|
1559
1548
|
|
|
1560
1549
|
f = PyString_Type.tp_richcompare;
|
|
@@ -1575,7 +1564,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1575
1564
|
}
|
|
1576
1565
|
}
|
|
1577
1566
|
|
|
1578
|
-
|
|
1567
|
+
Py_DECREF_IMMORTAL(result);
|
|
1579
1568
|
}
|
|
1580
1569
|
|
|
1581
1570
|
int c;
|
|
@@ -1691,11 +1680,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1691
1680
|
}
|
|
1692
1681
|
}
|
|
1693
1682
|
|
|
1694
|
-
|
|
1683
|
+
Py_DECREF_IMMORTAL(result);
|
|
1695
1684
|
}
|
|
1696
1685
|
}
|
|
1697
1686
|
|
|
1698
|
-
f =
|
|
1687
|
+
f = TP_RICHCOMPARE(type1);
|
|
1699
1688
|
|
|
1700
1689
|
if (f != NULL) {
|
|
1701
1690
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -1714,7 +1703,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1714
1703
|
}
|
|
1715
1704
|
}
|
|
1716
1705
|
|
|
1717
|
-
|
|
1706
|
+
Py_DECREF_IMMORTAL(result);
|
|
1718
1707
|
}
|
|
1719
1708
|
|
|
1720
1709
|
if (checked_reverse_op == false) {
|
|
@@ -1737,7 +1726,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1737
1726
|
}
|
|
1738
1727
|
}
|
|
1739
1728
|
|
|
1740
|
-
|
|
1729
|
+
Py_DECREF_IMMORTAL(result);
|
|
1741
1730
|
}
|
|
1742
1731
|
}
|
|
1743
1732
|
|
|
@@ -1813,7 +1802,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1813
1802
|
}
|
|
1814
1803
|
}
|
|
1815
1804
|
|
|
1816
|
-
|
|
1805
|
+
Py_DECREF_IMMORTAL(result);
|
|
1817
1806
|
}
|
|
1818
1807
|
|
|
1819
1808
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1863,7 +1852,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1863
1852
|
richcmpfunc f;
|
|
1864
1853
|
|
|
1865
1854
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1866
|
-
f =
|
|
1855
|
+
f = TP_RICHCOMPARE(type2);
|
|
1867
1856
|
|
|
1868
1857
|
if (f != NULL) {
|
|
1869
1858
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -1882,7 +1871,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1882
1871
|
}
|
|
1883
1872
|
}
|
|
1884
1873
|
|
|
1885
|
-
|
|
1874
|
+
Py_DECREF_IMMORTAL(result);
|
|
1886
1875
|
}
|
|
1887
1876
|
}
|
|
1888
1877
|
|
|
@@ -1904,10 +1893,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1904
1893
|
}
|
|
1905
1894
|
}
|
|
1906
1895
|
|
|
1907
|
-
|
|
1896
|
+
Py_DECREF_IMMORTAL(result);
|
|
1908
1897
|
}
|
|
1909
1898
|
|
|
1910
|
-
f =
|
|
1899
|
+
f = TP_RICHCOMPARE(type2);
|
|
1911
1900
|
if (f != NULL) {
|
|
1912
1901
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
1913
1902
|
|
|
@@ -1925,7 +1914,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1925
1914
|
}
|
|
1926
1915
|
}
|
|
1927
1916
|
|
|
1928
|
-
|
|
1917
|
+
Py_DECREF_IMMORTAL(result);
|
|
1929
1918
|
}
|
|
1930
1919
|
|
|
1931
1920
|
int c;
|
|
@@ -2020,7 +2009,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2020
2009
|
richcmpfunc f;
|
|
2021
2010
|
|
|
2022
2011
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
2023
|
-
f =
|
|
2012
|
+
f = TP_RICHCOMPARE(type2);
|
|
2024
2013
|
|
|
2025
2014
|
if (f != NULL) {
|
|
2026
2015
|
checked_reverse_op = true;
|
|
@@ -2041,7 +2030,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2041
2030
|
}
|
|
2042
2031
|
}
|
|
2043
2032
|
|
|
2044
|
-
|
|
2033
|
+
Py_DECREF_IMMORTAL(result);
|
|
2045
2034
|
}
|
|
2046
2035
|
}
|
|
2047
2036
|
|
|
@@ -2064,11 +2053,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2064
2053
|
}
|
|
2065
2054
|
}
|
|
2066
2055
|
|
|
2067
|
-
|
|
2056
|
+
Py_DECREF_IMMORTAL(result);
|
|
2068
2057
|
}
|
|
2069
2058
|
|
|
2070
2059
|
if (checked_reverse_op == false) {
|
|
2071
|
-
f =
|
|
2060
|
+
f = TP_RICHCOMPARE(type2);
|
|
2072
2061
|
|
|
2073
2062
|
if (f != NULL) {
|
|
2074
2063
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -2087,7 +2076,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2087
2076
|
}
|
|
2088
2077
|
}
|
|
2089
2078
|
|
|
2090
|
-
|
|
2079
|
+
Py_DECREF_IMMORTAL(result);
|
|
2091
2080
|
}
|
|
2092
2081
|
}
|
|
2093
2082
|
|
|
@@ -2135,7 +2124,7 @@ static PyObject *COMPARE_LE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2135
2124
|
|
|
2136
2125
|
// Convert to target type.
|
|
2137
2126
|
PyObject *result = BOOL_FROM(r);
|
|
2138
|
-
|
|
2127
|
+
Py_INCREF_IMMORTAL(result);
|
|
2139
2128
|
return result;
|
|
2140
2129
|
}
|
|
2141
2130
|
|
|
@@ -2178,7 +2167,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2178
2167
|
return result;
|
|
2179
2168
|
}
|
|
2180
2169
|
|
|
2181
|
-
|
|
2170
|
+
Py_DECREF_IMMORTAL(result);
|
|
2182
2171
|
}
|
|
2183
2172
|
|
|
2184
2173
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2219,7 +2208,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2219
2208
|
|
|
2220
2209
|
bool r = c != 0;
|
|
2221
2210
|
PyObject *result = BOOL_FROM(r);
|
|
2222
|
-
|
|
2211
|
+
Py_INCREF_IMMORTAL(result);
|
|
2223
2212
|
return result;
|
|
2224
2213
|
}
|
|
2225
2214
|
}
|
|
@@ -2239,11 +2228,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2239
2228
|
return result;
|
|
2240
2229
|
}
|
|
2241
2230
|
|
|
2242
|
-
|
|
2231
|
+
Py_DECREF_IMMORTAL(result);
|
|
2243
2232
|
}
|
|
2244
2233
|
}
|
|
2245
2234
|
|
|
2246
|
-
f =
|
|
2235
|
+
f = TP_RICHCOMPARE(type1);
|
|
2247
2236
|
if (f != NULL) {
|
|
2248
2237
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
2249
2238
|
|
|
@@ -2253,7 +2242,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2253
2242
|
return result;
|
|
2254
2243
|
}
|
|
2255
2244
|
|
|
2256
|
-
|
|
2245
|
+
Py_DECREF_IMMORTAL(result);
|
|
2257
2246
|
}
|
|
2258
2247
|
|
|
2259
2248
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2266,7 +2255,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2266
2255
|
return result;
|
|
2267
2256
|
}
|
|
2268
2257
|
|
|
2269
|
-
|
|
2258
|
+
Py_DECREF_IMMORTAL(result);
|
|
2270
2259
|
}
|
|
2271
2260
|
|
|
2272
2261
|
int c;
|
|
@@ -2354,7 +2343,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2354
2343
|
|
|
2355
2344
|
bool r = c != 0;
|
|
2356
2345
|
PyObject *result = BOOL_FROM(r);
|
|
2357
|
-
|
|
2346
|
+
Py_INCREF_IMMORTAL(result);
|
|
2358
2347
|
return result;
|
|
2359
2348
|
#else
|
|
2360
2349
|
bool checked_reverse_op = false;
|
|
@@ -2374,11 +2363,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2374
2363
|
return result;
|
|
2375
2364
|
}
|
|
2376
2365
|
|
|
2377
|
-
|
|
2366
|
+
Py_DECREF_IMMORTAL(result);
|
|
2378
2367
|
}
|
|
2379
2368
|
}
|
|
2380
2369
|
|
|
2381
|
-
f =
|
|
2370
|
+
f = TP_RICHCOMPARE(type1);
|
|
2382
2371
|
|
|
2383
2372
|
if (f != NULL) {
|
|
2384
2373
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -2389,7 +2378,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2389
2378
|
return result;
|
|
2390
2379
|
}
|
|
2391
2380
|
|
|
2392
|
-
|
|
2381
|
+
Py_DECREF_IMMORTAL(result);
|
|
2393
2382
|
}
|
|
2394
2383
|
|
|
2395
2384
|
if (checked_reverse_op == false) {
|
|
@@ -2404,7 +2393,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2404
2393
|
return result;
|
|
2405
2394
|
}
|
|
2406
2395
|
|
|
2407
|
-
|
|
2396
|
+
Py_DECREF_IMMORTAL(result);
|
|
2408
2397
|
}
|
|
2409
2398
|
}
|
|
2410
2399
|
|
|
@@ -2416,13 +2405,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2416
2405
|
case Py_EQ: {
|
|
2417
2406
|
bool r = operand1 == operand2;
|
|
2418
2407
|
PyObject *result = BOOL_FROM(r);
|
|
2419
|
-
|
|
2408
|
+
Py_INCREF_IMMORTAL(result);
|
|
2420
2409
|
return result;
|
|
2421
2410
|
}
|
|
2422
2411
|
case Py_NE: {
|
|
2423
2412
|
bool r = operand1 != operand2;
|
|
2424
2413
|
PyObject *result = BOOL_FROM(r);
|
|
2425
|
-
|
|
2414
|
+
Py_INCREF_IMMORTAL(result);
|
|
2426
2415
|
return result;
|
|
2427
2416
|
}
|
|
2428
2417
|
default:
|
|
@@ -2472,7 +2461,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2472
2461
|
return result;
|
|
2473
2462
|
}
|
|
2474
2463
|
|
|
2475
|
-
|
|
2464
|
+
Py_DECREF_IMMORTAL(result);
|
|
2476
2465
|
}
|
|
2477
2466
|
|
|
2478
2467
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2513,7 +2502,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2513
2502
|
|
|
2514
2503
|
bool r = c != 0;
|
|
2515
2504
|
PyObject *result = BOOL_FROM(r);
|
|
2516
|
-
|
|
2505
|
+
Py_INCREF_IMMORTAL(result);
|
|
2517
2506
|
return result;
|
|
2518
2507
|
}
|
|
2519
2508
|
}
|
|
@@ -2522,7 +2511,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2522
2511
|
richcmpfunc f;
|
|
2523
2512
|
|
|
2524
2513
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2525
|
-
f =
|
|
2514
|
+
f = TP_RICHCOMPARE(type2);
|
|
2526
2515
|
|
|
2527
2516
|
if (f != NULL) {
|
|
2528
2517
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -2533,7 +2522,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2533
2522
|
return result;
|
|
2534
2523
|
}
|
|
2535
2524
|
|
|
2536
|
-
|
|
2525
|
+
Py_DECREF_IMMORTAL(result);
|
|
2537
2526
|
}
|
|
2538
2527
|
}
|
|
2539
2528
|
|
|
@@ -2547,10 +2536,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2547
2536
|
return result;
|
|
2548
2537
|
}
|
|
2549
2538
|
|
|
2550
|
-
|
|
2539
|
+
Py_DECREF_IMMORTAL(result);
|
|
2551
2540
|
}
|
|
2552
2541
|
|
|
2553
|
-
f =
|
|
2542
|
+
f = TP_RICHCOMPARE(type2);
|
|
2554
2543
|
if (f != NULL) {
|
|
2555
2544
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
2556
2545
|
|
|
@@ -2560,7 +2549,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2560
2549
|
return result;
|
|
2561
2550
|
}
|
|
2562
2551
|
|
|
2563
|
-
|
|
2552
|
+
Py_DECREF_IMMORTAL(result);
|
|
2564
2553
|
}
|
|
2565
2554
|
|
|
2566
2555
|
int c;
|
|
@@ -2648,14 +2637,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2648
2637
|
|
|
2649
2638
|
bool r = c != 0;
|
|
2650
2639
|
PyObject *result = BOOL_FROM(r);
|
|
2651
|
-
|
|
2640
|
+
Py_INCREF_IMMORTAL(result);
|
|
2652
2641
|
return result;
|
|
2653
2642
|
#else
|
|
2654
2643
|
bool checked_reverse_op = false;
|
|
2655
2644
|
richcmpfunc f;
|
|
2656
2645
|
|
|
2657
2646
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2658
|
-
f =
|
|
2647
|
+
f = TP_RICHCOMPARE(type2);
|
|
2659
2648
|
|
|
2660
2649
|
if (f != NULL) {
|
|
2661
2650
|
checked_reverse_op = true;
|
|
@@ -2668,7 +2657,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2668
2657
|
return result;
|
|
2669
2658
|
}
|
|
2670
2659
|
|
|
2671
|
-
|
|
2660
|
+
Py_DECREF_IMMORTAL(result);
|
|
2672
2661
|
}
|
|
2673
2662
|
}
|
|
2674
2663
|
|
|
@@ -2683,11 +2672,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2683
2672
|
return result;
|
|
2684
2673
|
}
|
|
2685
2674
|
|
|
2686
|
-
|
|
2675
|
+
Py_DECREF_IMMORTAL(result);
|
|
2687
2676
|
}
|
|
2688
2677
|
|
|
2689
2678
|
if (checked_reverse_op == false) {
|
|
2690
|
-
f =
|
|
2679
|
+
f = TP_RICHCOMPARE(type2);
|
|
2691
2680
|
|
|
2692
2681
|
if (f != NULL) {
|
|
2693
2682
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -2698,7 +2687,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2698
2687
|
return result;
|
|
2699
2688
|
}
|
|
2700
2689
|
|
|
2701
|
-
|
|
2690
|
+
Py_DECREF_IMMORTAL(result);
|
|
2702
2691
|
}
|
|
2703
2692
|
}
|
|
2704
2693
|
|
|
@@ -2710,13 +2699,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2710
2699
|
case Py_EQ: {
|
|
2711
2700
|
bool r = operand1 == operand2;
|
|
2712
2701
|
PyObject *result = BOOL_FROM(r);
|
|
2713
|
-
|
|
2702
|
+
Py_INCREF_IMMORTAL(result);
|
|
2714
2703
|
return result;
|
|
2715
2704
|
}
|
|
2716
2705
|
case Py_NE: {
|
|
2717
2706
|
bool r = operand1 != operand2;
|
|
2718
2707
|
PyObject *result = BOOL_FROM(r);
|
|
2719
|
-
|
|
2708
|
+
Py_INCREF_IMMORTAL(result);
|
|
2720
2709
|
return result;
|
|
2721
2710
|
}
|
|
2722
2711
|
default:
|
|
@@ -2763,7 +2752,7 @@ static bool COMPARE_LE_CBOOL_UNICODE_UNICODE(PyObject *operand1, PyObject *opera
|
|
|
2763
2752
|
|
|
2764
2753
|
// Convert to target type if necessary
|
|
2765
2754
|
bool result = r == Py_True;
|
|
2766
|
-
|
|
2755
|
+
Py_DECREF_IMMORTAL(r);
|
|
2767
2756
|
|
|
2768
2757
|
return result;
|
|
2769
2758
|
}
|
|
@@ -2816,7 +2805,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2816
2805
|
}
|
|
2817
2806
|
}
|
|
2818
2807
|
|
|
2819
|
-
|
|
2808
|
+
Py_DECREF_IMMORTAL(result);
|
|
2820
2809
|
}
|
|
2821
2810
|
|
|
2822
2811
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2885,11 +2874,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2885
2874
|
}
|
|
2886
2875
|
}
|
|
2887
2876
|
|
|
2888
|
-
|
|
2877
|
+
Py_DECREF_IMMORTAL(result);
|
|
2889
2878
|
}
|
|
2890
2879
|
}
|
|
2891
2880
|
|
|
2892
|
-
f =
|
|
2881
|
+
f = TP_RICHCOMPARE(type1);
|
|
2893
2882
|
if (f != NULL) {
|
|
2894
2883
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
2895
2884
|
|
|
@@ -2907,7 +2896,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2907
2896
|
}
|
|
2908
2897
|
}
|
|
2909
2898
|
|
|
2910
|
-
|
|
2899
|
+
Py_DECREF_IMMORTAL(result);
|
|
2911
2900
|
}
|
|
2912
2901
|
|
|
2913
2902
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2928,7 +2917,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2928
2917
|
}
|
|
2929
2918
|
}
|
|
2930
2919
|
|
|
2931
|
-
|
|
2920
|
+
Py_DECREF_IMMORTAL(result);
|
|
2932
2921
|
}
|
|
2933
2922
|
|
|
2934
2923
|
int c;
|
|
@@ -3044,11 +3033,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3044
3033
|
}
|
|
3045
3034
|
}
|
|
3046
3035
|
|
|
3047
|
-
|
|
3036
|
+
Py_DECREF_IMMORTAL(result);
|
|
3048
3037
|
}
|
|
3049
3038
|
}
|
|
3050
3039
|
|
|
3051
|
-
f =
|
|
3040
|
+
f = TP_RICHCOMPARE(type1);
|
|
3052
3041
|
|
|
3053
3042
|
if (f != NULL) {
|
|
3054
3043
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -3067,7 +3056,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3067
3056
|
}
|
|
3068
3057
|
}
|
|
3069
3058
|
|
|
3070
|
-
|
|
3059
|
+
Py_DECREF_IMMORTAL(result);
|
|
3071
3060
|
}
|
|
3072
3061
|
|
|
3073
3062
|
if (checked_reverse_op == false) {
|
|
@@ -3090,7 +3079,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3090
3079
|
}
|
|
3091
3080
|
}
|
|
3092
3081
|
|
|
3093
|
-
|
|
3082
|
+
Py_DECREF_IMMORTAL(result);
|
|
3094
3083
|
}
|
|
3095
3084
|
}
|
|
3096
3085
|
|
|
@@ -3166,7 +3155,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3166
3155
|
}
|
|
3167
3156
|
}
|
|
3168
3157
|
|
|
3169
|
-
|
|
3158
|
+
Py_DECREF_IMMORTAL(result);
|
|
3170
3159
|
}
|
|
3171
3160
|
|
|
3172
3161
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3216,7 +3205,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3216
3205
|
richcmpfunc f;
|
|
3217
3206
|
|
|
3218
3207
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3219
|
-
f =
|
|
3208
|
+
f = TP_RICHCOMPARE(type2);
|
|
3220
3209
|
|
|
3221
3210
|
if (f != NULL) {
|
|
3222
3211
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -3235,7 +3224,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3235
3224
|
}
|
|
3236
3225
|
}
|
|
3237
3226
|
|
|
3238
|
-
|
|
3227
|
+
Py_DECREF_IMMORTAL(result);
|
|
3239
3228
|
}
|
|
3240
3229
|
}
|
|
3241
3230
|
|
|
@@ -3257,10 +3246,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3257
3246
|
}
|
|
3258
3247
|
}
|
|
3259
3248
|
|
|
3260
|
-
|
|
3249
|
+
Py_DECREF_IMMORTAL(result);
|
|
3261
3250
|
}
|
|
3262
3251
|
|
|
3263
|
-
f =
|
|
3252
|
+
f = TP_RICHCOMPARE(type2);
|
|
3264
3253
|
if (f != NULL) {
|
|
3265
3254
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
3266
3255
|
|
|
@@ -3278,7 +3267,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3278
3267
|
}
|
|
3279
3268
|
}
|
|
3280
3269
|
|
|
3281
|
-
|
|
3270
|
+
Py_DECREF_IMMORTAL(result);
|
|
3282
3271
|
}
|
|
3283
3272
|
|
|
3284
3273
|
int c;
|
|
@@ -3373,7 +3362,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3373
3362
|
richcmpfunc f;
|
|
3374
3363
|
|
|
3375
3364
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3376
|
-
f =
|
|
3365
|
+
f = TP_RICHCOMPARE(type2);
|
|
3377
3366
|
|
|
3378
3367
|
if (f != NULL) {
|
|
3379
3368
|
checked_reverse_op = true;
|
|
@@ -3394,7 +3383,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3394
3383
|
}
|
|
3395
3384
|
}
|
|
3396
3385
|
|
|
3397
|
-
|
|
3386
|
+
Py_DECREF_IMMORTAL(result);
|
|
3398
3387
|
}
|
|
3399
3388
|
}
|
|
3400
3389
|
|
|
@@ -3417,11 +3406,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3417
3406
|
}
|
|
3418
3407
|
}
|
|
3419
3408
|
|
|
3420
|
-
|
|
3409
|
+
Py_DECREF_IMMORTAL(result);
|
|
3421
3410
|
}
|
|
3422
3411
|
|
|
3423
3412
|
if (checked_reverse_op == false) {
|
|
3424
|
-
f =
|
|
3413
|
+
f = TP_RICHCOMPARE(type2);
|
|
3425
3414
|
|
|
3426
3415
|
if (f != NULL) {
|
|
3427
3416
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -3440,7 +3429,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3440
3429
|
}
|
|
3441
3430
|
}
|
|
3442
3431
|
|
|
3443
|
-
|
|
3432
|
+
Py_DECREF_IMMORTAL(result);
|
|
3444
3433
|
}
|
|
3445
3434
|
}
|
|
3446
3435
|
|
|
@@ -3490,7 +3479,7 @@ static PyObject *COMPARE_LE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3490
3479
|
|
|
3491
3480
|
// Convert to target type.
|
|
3492
3481
|
PyObject *result = BOOL_FROM(r);
|
|
3493
|
-
|
|
3482
|
+
Py_INCREF_IMMORTAL(result);
|
|
3494
3483
|
return result;
|
|
3495
3484
|
}
|
|
3496
3485
|
|
|
@@ -3518,9 +3507,11 @@ static PyObject *COMPARE_LE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3518
3507
|
|
|
3519
3508
|
// Convert to target type.
|
|
3520
3509
|
PyObject *result = BOOL_FROM(c != 0);
|
|
3521
|
-
|
|
3510
|
+
Py_INCREF_IMMORTAL(result);
|
|
3522
3511
|
return result;
|
|
3523
3512
|
}
|
|
3513
|
+
#endif
|
|
3514
|
+
#if PYTHON_VERSION >= 0x300
|
|
3524
3515
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
3525
3516
|
PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
3526
3517
|
|
|
@@ -3555,7 +3546,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3555
3546
|
return result;
|
|
3556
3547
|
}
|
|
3557
3548
|
|
|
3558
|
-
|
|
3549
|
+
Py_DECREF_IMMORTAL(result);
|
|
3559
3550
|
}
|
|
3560
3551
|
|
|
3561
3552
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3596,7 +3587,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3596
3587
|
|
|
3597
3588
|
bool r = c != 0;
|
|
3598
3589
|
PyObject *result = BOOL_FROM(r);
|
|
3599
|
-
|
|
3590
|
+
Py_INCREF_IMMORTAL(result);
|
|
3600
3591
|
return result;
|
|
3601
3592
|
}
|
|
3602
3593
|
}
|
|
@@ -3616,11 +3607,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3616
3607
|
return result;
|
|
3617
3608
|
}
|
|
3618
3609
|
|
|
3619
|
-
|
|
3610
|
+
Py_DECREF_IMMORTAL(result);
|
|
3620
3611
|
}
|
|
3621
3612
|
}
|
|
3622
3613
|
|
|
3623
|
-
f =
|
|
3614
|
+
f = TP_RICHCOMPARE(type1);
|
|
3624
3615
|
if (f != NULL) {
|
|
3625
3616
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
3626
3617
|
|
|
@@ -3630,7 +3621,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3630
3621
|
return result;
|
|
3631
3622
|
}
|
|
3632
3623
|
|
|
3633
|
-
|
|
3624
|
+
Py_DECREF_IMMORTAL(result);
|
|
3634
3625
|
}
|
|
3635
3626
|
|
|
3636
3627
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -3643,7 +3634,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3643
3634
|
return result;
|
|
3644
3635
|
}
|
|
3645
3636
|
|
|
3646
|
-
|
|
3637
|
+
Py_DECREF_IMMORTAL(result);
|
|
3647
3638
|
}
|
|
3648
3639
|
|
|
3649
3640
|
int c;
|
|
@@ -3731,7 +3722,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3731
3722
|
|
|
3732
3723
|
bool r = c != 0;
|
|
3733
3724
|
PyObject *result = BOOL_FROM(r);
|
|
3734
|
-
|
|
3725
|
+
Py_INCREF_IMMORTAL(result);
|
|
3735
3726
|
return result;
|
|
3736
3727
|
#else
|
|
3737
3728
|
bool checked_reverse_op = false;
|
|
@@ -3751,11 +3742,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3751
3742
|
return result;
|
|
3752
3743
|
}
|
|
3753
3744
|
|
|
3754
|
-
|
|
3745
|
+
Py_DECREF_IMMORTAL(result);
|
|
3755
3746
|
}
|
|
3756
3747
|
}
|
|
3757
3748
|
|
|
3758
|
-
f =
|
|
3749
|
+
f = TP_RICHCOMPARE(type1);
|
|
3759
3750
|
|
|
3760
3751
|
if (f != NULL) {
|
|
3761
3752
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -3766,7 +3757,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3766
3757
|
return result;
|
|
3767
3758
|
}
|
|
3768
3759
|
|
|
3769
|
-
|
|
3760
|
+
Py_DECREF_IMMORTAL(result);
|
|
3770
3761
|
}
|
|
3771
3762
|
|
|
3772
3763
|
if (checked_reverse_op == false) {
|
|
@@ -3781,7 +3772,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3781
3772
|
return result;
|
|
3782
3773
|
}
|
|
3783
3774
|
|
|
3784
|
-
|
|
3775
|
+
Py_DECREF_IMMORTAL(result);
|
|
3785
3776
|
}
|
|
3786
3777
|
}
|
|
3787
3778
|
|
|
@@ -3793,13 +3784,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3793
3784
|
case Py_EQ: {
|
|
3794
3785
|
bool r = operand1 == operand2;
|
|
3795
3786
|
PyObject *result = BOOL_FROM(r);
|
|
3796
|
-
|
|
3787
|
+
Py_INCREF_IMMORTAL(result);
|
|
3797
3788
|
return result;
|
|
3798
3789
|
}
|
|
3799
3790
|
case Py_NE: {
|
|
3800
3791
|
bool r = operand1 != operand2;
|
|
3801
3792
|
PyObject *result = BOOL_FROM(r);
|
|
3802
|
-
|
|
3793
|
+
Py_INCREF_IMMORTAL(result);
|
|
3803
3794
|
return result;
|
|
3804
3795
|
}
|
|
3805
3796
|
default:
|
|
@@ -3849,7 +3840,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3849
3840
|
return result;
|
|
3850
3841
|
}
|
|
3851
3842
|
|
|
3852
|
-
|
|
3843
|
+
Py_DECREF_IMMORTAL(result);
|
|
3853
3844
|
}
|
|
3854
3845
|
|
|
3855
3846
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3890,7 +3881,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3890
3881
|
|
|
3891
3882
|
bool r = c != 0;
|
|
3892
3883
|
PyObject *result = BOOL_FROM(r);
|
|
3893
|
-
|
|
3884
|
+
Py_INCREF_IMMORTAL(result);
|
|
3894
3885
|
return result;
|
|
3895
3886
|
}
|
|
3896
3887
|
}
|
|
@@ -3899,7 +3890,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3899
3890
|
richcmpfunc f;
|
|
3900
3891
|
|
|
3901
3892
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
3902
|
-
f =
|
|
3893
|
+
f = TP_RICHCOMPARE(type2);
|
|
3903
3894
|
|
|
3904
3895
|
if (f != NULL) {
|
|
3905
3896
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -3910,7 +3901,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3910
3901
|
return result;
|
|
3911
3902
|
}
|
|
3912
3903
|
|
|
3913
|
-
|
|
3904
|
+
Py_DECREF_IMMORTAL(result);
|
|
3914
3905
|
}
|
|
3915
3906
|
}
|
|
3916
3907
|
|
|
@@ -3924,10 +3915,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3924
3915
|
return result;
|
|
3925
3916
|
}
|
|
3926
3917
|
|
|
3927
|
-
|
|
3918
|
+
Py_DECREF_IMMORTAL(result);
|
|
3928
3919
|
}
|
|
3929
3920
|
|
|
3930
|
-
f =
|
|
3921
|
+
f = TP_RICHCOMPARE(type2);
|
|
3931
3922
|
if (f != NULL) {
|
|
3932
3923
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
3933
3924
|
|
|
@@ -3937,7 +3928,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3937
3928
|
return result;
|
|
3938
3929
|
}
|
|
3939
3930
|
|
|
3940
|
-
|
|
3931
|
+
Py_DECREF_IMMORTAL(result);
|
|
3941
3932
|
}
|
|
3942
3933
|
|
|
3943
3934
|
int c;
|
|
@@ -4025,14 +4016,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4025
4016
|
|
|
4026
4017
|
bool r = c != 0;
|
|
4027
4018
|
PyObject *result = BOOL_FROM(r);
|
|
4028
|
-
|
|
4019
|
+
Py_INCREF_IMMORTAL(result);
|
|
4029
4020
|
return result;
|
|
4030
4021
|
#else
|
|
4031
4022
|
bool checked_reverse_op = false;
|
|
4032
4023
|
richcmpfunc f;
|
|
4033
4024
|
|
|
4034
4025
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4035
|
-
f =
|
|
4026
|
+
f = TP_RICHCOMPARE(type2);
|
|
4036
4027
|
|
|
4037
4028
|
if (f != NULL) {
|
|
4038
4029
|
checked_reverse_op = true;
|
|
@@ -4045,7 +4036,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4045
4036
|
return result;
|
|
4046
4037
|
}
|
|
4047
4038
|
|
|
4048
|
-
|
|
4039
|
+
Py_DECREF_IMMORTAL(result);
|
|
4049
4040
|
}
|
|
4050
4041
|
}
|
|
4051
4042
|
|
|
@@ -4060,11 +4051,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4060
4051
|
return result;
|
|
4061
4052
|
}
|
|
4062
4053
|
|
|
4063
|
-
|
|
4054
|
+
Py_DECREF_IMMORTAL(result);
|
|
4064
4055
|
}
|
|
4065
4056
|
|
|
4066
4057
|
if (checked_reverse_op == false) {
|
|
4067
|
-
f =
|
|
4058
|
+
f = TP_RICHCOMPARE(type2);
|
|
4068
4059
|
|
|
4069
4060
|
if (f != NULL) {
|
|
4070
4061
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -4075,7 +4066,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4075
4066
|
return result;
|
|
4076
4067
|
}
|
|
4077
4068
|
|
|
4078
|
-
|
|
4069
|
+
Py_DECREF_IMMORTAL(result);
|
|
4079
4070
|
}
|
|
4080
4071
|
}
|
|
4081
4072
|
|
|
@@ -4087,13 +4078,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4087
4078
|
case Py_EQ: {
|
|
4088
4079
|
bool r = operand1 == operand2;
|
|
4089
4080
|
PyObject *result = BOOL_FROM(r);
|
|
4090
|
-
|
|
4081
|
+
Py_INCREF_IMMORTAL(result);
|
|
4091
4082
|
return result;
|
|
4092
4083
|
}
|
|
4093
4084
|
case Py_NE: {
|
|
4094
4085
|
bool r = operand1 != operand2;
|
|
4095
4086
|
PyObject *result = BOOL_FROM(r);
|
|
4096
|
-
|
|
4087
|
+
Py_INCREF_IMMORTAL(result);
|
|
4097
4088
|
return result;
|
|
4098
4089
|
}
|
|
4099
4090
|
default:
|
|
@@ -4163,6 +4154,8 @@ static bool COMPARE_LE_CBOOL_BYTES_BYTES(PyObject *operand1, PyObject *operand2)
|
|
|
4163
4154
|
|
|
4164
4155
|
return result;
|
|
4165
4156
|
}
|
|
4157
|
+
#endif
|
|
4158
|
+
#if PYTHON_VERSION >= 0x300
|
|
4166
4159
|
/* Code referring to "BYTES" corresponds to Python3 'bytes' and "BYTES" to Python3 'bytes'. */
|
|
4167
4160
|
bool RICH_COMPARE_LE_CBOOL_BYTES_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
4168
4161
|
|
|
@@ -4213,7 +4206,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4213
4206
|
}
|
|
4214
4207
|
}
|
|
4215
4208
|
|
|
4216
|
-
|
|
4209
|
+
Py_DECREF_IMMORTAL(result);
|
|
4217
4210
|
}
|
|
4218
4211
|
|
|
4219
4212
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4282,11 +4275,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4282
4275
|
}
|
|
4283
4276
|
}
|
|
4284
4277
|
|
|
4285
|
-
|
|
4278
|
+
Py_DECREF_IMMORTAL(result);
|
|
4286
4279
|
}
|
|
4287
4280
|
}
|
|
4288
4281
|
|
|
4289
|
-
f =
|
|
4282
|
+
f = TP_RICHCOMPARE(type1);
|
|
4290
4283
|
if (f != NULL) {
|
|
4291
4284
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
4292
4285
|
|
|
@@ -4304,7 +4297,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4304
4297
|
}
|
|
4305
4298
|
}
|
|
4306
4299
|
|
|
4307
|
-
|
|
4300
|
+
Py_DECREF_IMMORTAL(result);
|
|
4308
4301
|
}
|
|
4309
4302
|
|
|
4310
4303
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -4325,7 +4318,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4325
4318
|
}
|
|
4326
4319
|
}
|
|
4327
4320
|
|
|
4328
|
-
|
|
4321
|
+
Py_DECREF_IMMORTAL(result);
|
|
4329
4322
|
}
|
|
4330
4323
|
|
|
4331
4324
|
int c;
|
|
@@ -4441,11 +4434,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4441
4434
|
}
|
|
4442
4435
|
}
|
|
4443
4436
|
|
|
4444
|
-
|
|
4437
|
+
Py_DECREF_IMMORTAL(result);
|
|
4445
4438
|
}
|
|
4446
4439
|
}
|
|
4447
4440
|
|
|
4448
|
-
f =
|
|
4441
|
+
f = TP_RICHCOMPARE(type1);
|
|
4449
4442
|
|
|
4450
4443
|
if (f != NULL) {
|
|
4451
4444
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -4464,7 +4457,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4464
4457
|
}
|
|
4465
4458
|
}
|
|
4466
4459
|
|
|
4467
|
-
|
|
4460
|
+
Py_DECREF_IMMORTAL(result);
|
|
4468
4461
|
}
|
|
4469
4462
|
|
|
4470
4463
|
if (checked_reverse_op == false) {
|
|
@@ -4487,7 +4480,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4487
4480
|
}
|
|
4488
4481
|
}
|
|
4489
4482
|
|
|
4490
|
-
|
|
4483
|
+
Py_DECREF_IMMORTAL(result);
|
|
4491
4484
|
}
|
|
4492
4485
|
}
|
|
4493
4486
|
|
|
@@ -4563,7 +4556,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4563
4556
|
}
|
|
4564
4557
|
}
|
|
4565
4558
|
|
|
4566
|
-
|
|
4559
|
+
Py_DECREF_IMMORTAL(result);
|
|
4567
4560
|
}
|
|
4568
4561
|
|
|
4569
4562
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4613,7 +4606,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4613
4606
|
richcmpfunc f;
|
|
4614
4607
|
|
|
4615
4608
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4616
|
-
f =
|
|
4609
|
+
f = TP_RICHCOMPARE(type2);
|
|
4617
4610
|
|
|
4618
4611
|
if (f != NULL) {
|
|
4619
4612
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -4632,7 +4625,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4632
4625
|
}
|
|
4633
4626
|
}
|
|
4634
4627
|
|
|
4635
|
-
|
|
4628
|
+
Py_DECREF_IMMORTAL(result);
|
|
4636
4629
|
}
|
|
4637
4630
|
}
|
|
4638
4631
|
|
|
@@ -4654,10 +4647,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4654
4647
|
}
|
|
4655
4648
|
}
|
|
4656
4649
|
|
|
4657
|
-
|
|
4650
|
+
Py_DECREF_IMMORTAL(result);
|
|
4658
4651
|
}
|
|
4659
4652
|
|
|
4660
|
-
f =
|
|
4653
|
+
f = TP_RICHCOMPARE(type2);
|
|
4661
4654
|
if (f != NULL) {
|
|
4662
4655
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
4663
4656
|
|
|
@@ -4675,7 +4668,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4675
4668
|
}
|
|
4676
4669
|
}
|
|
4677
4670
|
|
|
4678
|
-
|
|
4671
|
+
Py_DECREF_IMMORTAL(result);
|
|
4679
4672
|
}
|
|
4680
4673
|
|
|
4681
4674
|
int c;
|
|
@@ -4770,7 +4763,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4770
4763
|
richcmpfunc f;
|
|
4771
4764
|
|
|
4772
4765
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4773
|
-
f =
|
|
4766
|
+
f = TP_RICHCOMPARE(type2);
|
|
4774
4767
|
|
|
4775
4768
|
if (f != NULL) {
|
|
4776
4769
|
checked_reverse_op = true;
|
|
@@ -4791,7 +4784,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4791
4784
|
}
|
|
4792
4785
|
}
|
|
4793
4786
|
|
|
4794
|
-
|
|
4787
|
+
Py_DECREF_IMMORTAL(result);
|
|
4795
4788
|
}
|
|
4796
4789
|
}
|
|
4797
4790
|
|
|
@@ -4814,11 +4807,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4814
4807
|
}
|
|
4815
4808
|
}
|
|
4816
4809
|
|
|
4817
|
-
|
|
4810
|
+
Py_DECREF_IMMORTAL(result);
|
|
4818
4811
|
}
|
|
4819
4812
|
|
|
4820
4813
|
if (checked_reverse_op == false) {
|
|
4821
|
-
f =
|
|
4814
|
+
f = TP_RICHCOMPARE(type2);
|
|
4822
4815
|
|
|
4823
4816
|
if (f != NULL) {
|
|
4824
4817
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -4837,7 +4830,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4837
4830
|
}
|
|
4838
4831
|
}
|
|
4839
4832
|
|
|
4840
|
-
|
|
4833
|
+
Py_DECREF_IMMORTAL(result);
|
|
4841
4834
|
}
|
|
4842
4835
|
}
|
|
4843
4836
|
|
|
@@ -4905,7 +4898,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4905
4898
|
return result;
|
|
4906
4899
|
}
|
|
4907
4900
|
|
|
4908
|
-
|
|
4901
|
+
Py_DECREF_IMMORTAL(result);
|
|
4909
4902
|
}
|
|
4910
4903
|
|
|
4911
4904
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4946,7 +4939,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4946
4939
|
|
|
4947
4940
|
bool r = c != 0;
|
|
4948
4941
|
PyObject *result = BOOL_FROM(r);
|
|
4949
|
-
|
|
4942
|
+
Py_INCREF_IMMORTAL(result);
|
|
4950
4943
|
return result;
|
|
4951
4944
|
}
|
|
4952
4945
|
}
|
|
@@ -4966,11 +4959,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4966
4959
|
return result;
|
|
4967
4960
|
}
|
|
4968
4961
|
|
|
4969
|
-
|
|
4962
|
+
Py_DECREF_IMMORTAL(result);
|
|
4970
4963
|
}
|
|
4971
4964
|
}
|
|
4972
4965
|
|
|
4973
|
-
f =
|
|
4966
|
+
f = TP_RICHCOMPARE(type1);
|
|
4974
4967
|
if (f != NULL) {
|
|
4975
4968
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
4976
4969
|
|
|
@@ -4980,7 +4973,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4980
4973
|
return result;
|
|
4981
4974
|
}
|
|
4982
4975
|
|
|
4983
|
-
|
|
4976
|
+
Py_DECREF_IMMORTAL(result);
|
|
4984
4977
|
}
|
|
4985
4978
|
|
|
4986
4979
|
f = NULL;
|
|
@@ -4993,7 +4986,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4993
4986
|
return result;
|
|
4994
4987
|
}
|
|
4995
4988
|
|
|
4996
|
-
|
|
4989
|
+
Py_DECREF_IMMORTAL(result);
|
|
4997
4990
|
}
|
|
4998
4991
|
|
|
4999
4992
|
int c;
|
|
@@ -5081,7 +5074,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5081
5074
|
|
|
5082
5075
|
bool r = c != 0;
|
|
5083
5076
|
PyObject *result = BOOL_FROM(r);
|
|
5084
|
-
|
|
5077
|
+
Py_INCREF_IMMORTAL(result);
|
|
5085
5078
|
return result;
|
|
5086
5079
|
#else
|
|
5087
5080
|
bool checked_reverse_op = false;
|
|
@@ -5101,11 +5094,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5101
5094
|
return result;
|
|
5102
5095
|
}
|
|
5103
5096
|
|
|
5104
|
-
|
|
5097
|
+
Py_DECREF_IMMORTAL(result);
|
|
5105
5098
|
}
|
|
5106
5099
|
}
|
|
5107
5100
|
|
|
5108
|
-
f =
|
|
5101
|
+
f = TP_RICHCOMPARE(type1);
|
|
5109
5102
|
|
|
5110
5103
|
if (f != NULL) {
|
|
5111
5104
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -5116,7 +5109,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5116
5109
|
return result;
|
|
5117
5110
|
}
|
|
5118
5111
|
|
|
5119
|
-
|
|
5112
|
+
Py_DECREF_IMMORTAL(result);
|
|
5120
5113
|
}
|
|
5121
5114
|
|
|
5122
5115
|
if (checked_reverse_op == false) {
|
|
@@ -5131,7 +5124,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5131
5124
|
return result;
|
|
5132
5125
|
}
|
|
5133
5126
|
|
|
5134
|
-
|
|
5127
|
+
Py_DECREF_IMMORTAL(result);
|
|
5135
5128
|
}
|
|
5136
5129
|
}
|
|
5137
5130
|
|
|
@@ -5143,13 +5136,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5143
5136
|
case Py_EQ: {
|
|
5144
5137
|
bool r = operand1 == operand2;
|
|
5145
5138
|
PyObject *result = BOOL_FROM(r);
|
|
5146
|
-
|
|
5139
|
+
Py_INCREF_IMMORTAL(result);
|
|
5147
5140
|
return result;
|
|
5148
5141
|
}
|
|
5149
5142
|
case Py_NE: {
|
|
5150
5143
|
bool r = operand1 != operand2;
|
|
5151
5144
|
PyObject *result = BOOL_FROM(r);
|
|
5152
|
-
|
|
5145
|
+
Py_INCREF_IMMORTAL(result);
|
|
5153
5146
|
return result;
|
|
5154
5147
|
}
|
|
5155
5148
|
default:
|
|
@@ -5199,7 +5192,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5199
5192
|
return result;
|
|
5200
5193
|
}
|
|
5201
5194
|
|
|
5202
|
-
|
|
5195
|
+
Py_DECREF_IMMORTAL(result);
|
|
5203
5196
|
}
|
|
5204
5197
|
|
|
5205
5198
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5240,7 +5233,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5240
5233
|
|
|
5241
5234
|
bool r = c != 0;
|
|
5242
5235
|
PyObject *result = BOOL_FROM(r);
|
|
5243
|
-
|
|
5236
|
+
Py_INCREF_IMMORTAL(result);
|
|
5244
5237
|
return result;
|
|
5245
5238
|
}
|
|
5246
5239
|
}
|
|
@@ -5249,7 +5242,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5249
5242
|
richcmpfunc f;
|
|
5250
5243
|
|
|
5251
5244
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5252
|
-
f =
|
|
5245
|
+
f = TP_RICHCOMPARE(type2);
|
|
5253
5246
|
|
|
5254
5247
|
if (f != NULL) {
|
|
5255
5248
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -5260,7 +5253,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5260
5253
|
return result;
|
|
5261
5254
|
}
|
|
5262
5255
|
|
|
5263
|
-
|
|
5256
|
+
Py_DECREF_IMMORTAL(result);
|
|
5264
5257
|
}
|
|
5265
5258
|
}
|
|
5266
5259
|
|
|
@@ -5274,10 +5267,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5274
5267
|
return result;
|
|
5275
5268
|
}
|
|
5276
5269
|
|
|
5277
|
-
|
|
5270
|
+
Py_DECREF_IMMORTAL(result);
|
|
5278
5271
|
}
|
|
5279
5272
|
|
|
5280
|
-
f =
|
|
5273
|
+
f = TP_RICHCOMPARE(type2);
|
|
5281
5274
|
if (f != NULL) {
|
|
5282
5275
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
5283
5276
|
|
|
@@ -5287,7 +5280,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5287
5280
|
return result;
|
|
5288
5281
|
}
|
|
5289
5282
|
|
|
5290
|
-
|
|
5283
|
+
Py_DECREF_IMMORTAL(result);
|
|
5291
5284
|
}
|
|
5292
5285
|
|
|
5293
5286
|
int c;
|
|
@@ -5375,14 +5368,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5375
5368
|
|
|
5376
5369
|
bool r = c != 0;
|
|
5377
5370
|
PyObject *result = BOOL_FROM(r);
|
|
5378
|
-
|
|
5371
|
+
Py_INCREF_IMMORTAL(result);
|
|
5379
5372
|
return result;
|
|
5380
5373
|
#else
|
|
5381
5374
|
bool checked_reverse_op = false;
|
|
5382
5375
|
richcmpfunc f;
|
|
5383
5376
|
|
|
5384
5377
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5385
|
-
f =
|
|
5378
|
+
f = TP_RICHCOMPARE(type2);
|
|
5386
5379
|
|
|
5387
5380
|
if (f != NULL) {
|
|
5388
5381
|
checked_reverse_op = true;
|
|
@@ -5395,7 +5388,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5395
5388
|
return result;
|
|
5396
5389
|
}
|
|
5397
5390
|
|
|
5398
|
-
|
|
5391
|
+
Py_DECREF_IMMORTAL(result);
|
|
5399
5392
|
}
|
|
5400
5393
|
}
|
|
5401
5394
|
|
|
@@ -5410,11 +5403,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5410
5403
|
return result;
|
|
5411
5404
|
}
|
|
5412
5405
|
|
|
5413
|
-
|
|
5406
|
+
Py_DECREF_IMMORTAL(result);
|
|
5414
5407
|
}
|
|
5415
5408
|
|
|
5416
5409
|
if (checked_reverse_op == false) {
|
|
5417
|
-
f =
|
|
5410
|
+
f = TP_RICHCOMPARE(type2);
|
|
5418
5411
|
|
|
5419
5412
|
if (f != NULL) {
|
|
5420
5413
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -5425,7 +5418,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5425
5418
|
return result;
|
|
5426
5419
|
}
|
|
5427
5420
|
|
|
5428
|
-
|
|
5421
|
+
Py_DECREF_IMMORTAL(result);
|
|
5429
5422
|
}
|
|
5430
5423
|
}
|
|
5431
5424
|
|
|
@@ -5437,13 +5430,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5437
5430
|
case Py_EQ: {
|
|
5438
5431
|
bool r = operand1 == operand2;
|
|
5439
5432
|
PyObject *result = BOOL_FROM(r);
|
|
5440
|
-
|
|
5433
|
+
Py_INCREF_IMMORTAL(result);
|
|
5441
5434
|
return result;
|
|
5442
5435
|
}
|
|
5443
5436
|
case Py_NE: {
|
|
5444
5437
|
bool r = operand1 != operand2;
|
|
5445
5438
|
PyObject *result = BOOL_FROM(r);
|
|
5446
|
-
|
|
5439
|
+
Py_INCREF_IMMORTAL(result);
|
|
5447
5440
|
return result;
|
|
5448
5441
|
}
|
|
5449
5442
|
default:
|
|
@@ -5517,7 +5510,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5517
5510
|
}
|
|
5518
5511
|
}
|
|
5519
5512
|
|
|
5520
|
-
|
|
5513
|
+
Py_DECREF_IMMORTAL(result);
|
|
5521
5514
|
}
|
|
5522
5515
|
|
|
5523
5516
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5586,11 +5579,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5586
5579
|
}
|
|
5587
5580
|
}
|
|
5588
5581
|
|
|
5589
|
-
|
|
5582
|
+
Py_DECREF_IMMORTAL(result);
|
|
5590
5583
|
}
|
|
5591
5584
|
}
|
|
5592
5585
|
|
|
5593
|
-
f =
|
|
5586
|
+
f = TP_RICHCOMPARE(type1);
|
|
5594
5587
|
if (f != NULL) {
|
|
5595
5588
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
5596
5589
|
|
|
@@ -5608,7 +5601,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5608
5601
|
}
|
|
5609
5602
|
}
|
|
5610
5603
|
|
|
5611
|
-
|
|
5604
|
+
Py_DECREF_IMMORTAL(result);
|
|
5612
5605
|
}
|
|
5613
5606
|
|
|
5614
5607
|
f = NULL;
|
|
@@ -5629,7 +5622,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5629
5622
|
}
|
|
5630
5623
|
}
|
|
5631
5624
|
|
|
5632
|
-
|
|
5625
|
+
Py_DECREF_IMMORTAL(result);
|
|
5633
5626
|
}
|
|
5634
5627
|
|
|
5635
5628
|
int c;
|
|
@@ -5745,11 +5738,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5745
5738
|
}
|
|
5746
5739
|
}
|
|
5747
5740
|
|
|
5748
|
-
|
|
5741
|
+
Py_DECREF_IMMORTAL(result);
|
|
5749
5742
|
}
|
|
5750
5743
|
}
|
|
5751
5744
|
|
|
5752
|
-
f =
|
|
5745
|
+
f = TP_RICHCOMPARE(type1);
|
|
5753
5746
|
|
|
5754
5747
|
if (f != NULL) {
|
|
5755
5748
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -5768,7 +5761,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5768
5761
|
}
|
|
5769
5762
|
}
|
|
5770
5763
|
|
|
5771
|
-
|
|
5764
|
+
Py_DECREF_IMMORTAL(result);
|
|
5772
5765
|
}
|
|
5773
5766
|
|
|
5774
5767
|
if (checked_reverse_op == false) {
|
|
@@ -5791,7 +5784,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5791
5784
|
}
|
|
5792
5785
|
}
|
|
5793
5786
|
|
|
5794
|
-
|
|
5787
|
+
Py_DECREF_IMMORTAL(result);
|
|
5795
5788
|
}
|
|
5796
5789
|
}
|
|
5797
5790
|
|
|
@@ -5867,7 +5860,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5867
5860
|
}
|
|
5868
5861
|
}
|
|
5869
5862
|
|
|
5870
|
-
|
|
5863
|
+
Py_DECREF_IMMORTAL(result);
|
|
5871
5864
|
}
|
|
5872
5865
|
|
|
5873
5866
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5917,7 +5910,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5917
5910
|
richcmpfunc f;
|
|
5918
5911
|
|
|
5919
5912
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5920
|
-
f =
|
|
5913
|
+
f = TP_RICHCOMPARE(type2);
|
|
5921
5914
|
|
|
5922
5915
|
if (f != NULL) {
|
|
5923
5916
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -5936,7 +5929,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5936
5929
|
}
|
|
5937
5930
|
}
|
|
5938
5931
|
|
|
5939
|
-
|
|
5932
|
+
Py_DECREF_IMMORTAL(result);
|
|
5940
5933
|
}
|
|
5941
5934
|
}
|
|
5942
5935
|
|
|
@@ -5958,10 +5951,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5958
5951
|
}
|
|
5959
5952
|
}
|
|
5960
5953
|
|
|
5961
|
-
|
|
5954
|
+
Py_DECREF_IMMORTAL(result);
|
|
5962
5955
|
}
|
|
5963
5956
|
|
|
5964
|
-
f =
|
|
5957
|
+
f = TP_RICHCOMPARE(type2);
|
|
5965
5958
|
if (f != NULL) {
|
|
5966
5959
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
5967
5960
|
|
|
@@ -5979,7 +5972,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5979
5972
|
}
|
|
5980
5973
|
}
|
|
5981
5974
|
|
|
5982
|
-
|
|
5975
|
+
Py_DECREF_IMMORTAL(result);
|
|
5983
5976
|
}
|
|
5984
5977
|
|
|
5985
5978
|
int c;
|
|
@@ -6074,7 +6067,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6074
6067
|
richcmpfunc f;
|
|
6075
6068
|
|
|
6076
6069
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
6077
|
-
f =
|
|
6070
|
+
f = TP_RICHCOMPARE(type2);
|
|
6078
6071
|
|
|
6079
6072
|
if (f != NULL) {
|
|
6080
6073
|
checked_reverse_op = true;
|
|
@@ -6095,7 +6088,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6095
6088
|
}
|
|
6096
6089
|
}
|
|
6097
6090
|
|
|
6098
|
-
|
|
6091
|
+
Py_DECREF_IMMORTAL(result);
|
|
6099
6092
|
}
|
|
6100
6093
|
}
|
|
6101
6094
|
|
|
@@ -6118,11 +6111,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6118
6111
|
}
|
|
6119
6112
|
}
|
|
6120
6113
|
|
|
6121
|
-
|
|
6114
|
+
Py_DECREF_IMMORTAL(result);
|
|
6122
6115
|
}
|
|
6123
6116
|
|
|
6124
6117
|
if (checked_reverse_op == false) {
|
|
6125
|
-
f =
|
|
6118
|
+
f = TP_RICHCOMPARE(type2);
|
|
6126
6119
|
|
|
6127
6120
|
if (f != NULL) {
|
|
6128
6121
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -6141,7 +6134,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6141
6134
|
}
|
|
6142
6135
|
}
|
|
6143
6136
|
|
|
6144
|
-
|
|
6137
|
+
Py_DECREF_IMMORTAL(result);
|
|
6145
6138
|
}
|
|
6146
6139
|
}
|
|
6147
6140
|
|
|
@@ -6188,15 +6181,19 @@ static PyObject *COMPARE_LE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6188
6181
|
|
|
6189
6182
|
if (operand1_long_object == operand2_long_object) {
|
|
6190
6183
|
r = true;
|
|
6191
|
-
} else if (
|
|
6192
|
-
|
|
6184
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6185
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6186
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) <
|
|
6187
|
+
0;
|
|
6193
6188
|
} else {
|
|
6194
|
-
Py_ssize_t i =
|
|
6189
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6195
6190
|
r = true;
|
|
6196
6191
|
while (--i >= 0) {
|
|
6197
|
-
if (operand1_long_object
|
|
6198
|
-
|
|
6199
|
-
|
|
6192
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6193
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6194
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] <
|
|
6195
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6196
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6200
6197
|
r = !r;
|
|
6201
6198
|
}
|
|
6202
6199
|
break;
|
|
@@ -6206,7 +6203,7 @@ static PyObject *COMPARE_LE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6206
6203
|
|
|
6207
6204
|
// Convert to target type.
|
|
6208
6205
|
PyObject *result = BOOL_FROM(r);
|
|
6209
|
-
|
|
6206
|
+
Py_INCREF_IMMORTAL(result);
|
|
6210
6207
|
return result;
|
|
6211
6208
|
}
|
|
6212
6209
|
/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
|
|
@@ -6243,7 +6240,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6243
6240
|
return result;
|
|
6244
6241
|
}
|
|
6245
6242
|
|
|
6246
|
-
|
|
6243
|
+
Py_DECREF_IMMORTAL(result);
|
|
6247
6244
|
}
|
|
6248
6245
|
|
|
6249
6246
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6284,7 +6281,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6284
6281
|
|
|
6285
6282
|
bool r = c != 0;
|
|
6286
6283
|
PyObject *result = BOOL_FROM(r);
|
|
6287
|
-
|
|
6284
|
+
Py_INCREF_IMMORTAL(result);
|
|
6288
6285
|
return result;
|
|
6289
6286
|
}
|
|
6290
6287
|
}
|
|
@@ -6304,11 +6301,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6304
6301
|
return result;
|
|
6305
6302
|
}
|
|
6306
6303
|
|
|
6307
|
-
|
|
6304
|
+
Py_DECREF_IMMORTAL(result);
|
|
6308
6305
|
}
|
|
6309
6306
|
}
|
|
6310
6307
|
|
|
6311
|
-
f =
|
|
6308
|
+
f = TP_RICHCOMPARE(type1);
|
|
6312
6309
|
if (f != NULL) {
|
|
6313
6310
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
6314
6311
|
|
|
@@ -6318,7 +6315,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6318
6315
|
return result;
|
|
6319
6316
|
}
|
|
6320
6317
|
|
|
6321
|
-
|
|
6318
|
+
Py_DECREF_IMMORTAL(result);
|
|
6322
6319
|
}
|
|
6323
6320
|
|
|
6324
6321
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6331,7 +6328,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6331
6328
|
return result;
|
|
6332
6329
|
}
|
|
6333
6330
|
|
|
6334
|
-
|
|
6331
|
+
Py_DECREF_IMMORTAL(result);
|
|
6335
6332
|
}
|
|
6336
6333
|
|
|
6337
6334
|
int c;
|
|
@@ -6419,7 +6416,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6419
6416
|
|
|
6420
6417
|
bool r = c != 0;
|
|
6421
6418
|
PyObject *result = BOOL_FROM(r);
|
|
6422
|
-
|
|
6419
|
+
Py_INCREF_IMMORTAL(result);
|
|
6423
6420
|
return result;
|
|
6424
6421
|
#else
|
|
6425
6422
|
bool checked_reverse_op = false;
|
|
@@ -6439,11 +6436,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6439
6436
|
return result;
|
|
6440
6437
|
}
|
|
6441
6438
|
|
|
6442
|
-
|
|
6439
|
+
Py_DECREF_IMMORTAL(result);
|
|
6443
6440
|
}
|
|
6444
6441
|
}
|
|
6445
6442
|
|
|
6446
|
-
f =
|
|
6443
|
+
f = TP_RICHCOMPARE(type1);
|
|
6447
6444
|
|
|
6448
6445
|
if (f != NULL) {
|
|
6449
6446
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -6454,7 +6451,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6454
6451
|
return result;
|
|
6455
6452
|
}
|
|
6456
6453
|
|
|
6457
|
-
|
|
6454
|
+
Py_DECREF_IMMORTAL(result);
|
|
6458
6455
|
}
|
|
6459
6456
|
|
|
6460
6457
|
if (checked_reverse_op == false) {
|
|
@@ -6469,7 +6466,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6469
6466
|
return result;
|
|
6470
6467
|
}
|
|
6471
6468
|
|
|
6472
|
-
|
|
6469
|
+
Py_DECREF_IMMORTAL(result);
|
|
6473
6470
|
}
|
|
6474
6471
|
}
|
|
6475
6472
|
|
|
@@ -6481,13 +6478,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6481
6478
|
case Py_EQ: {
|
|
6482
6479
|
bool r = operand1 == operand2;
|
|
6483
6480
|
PyObject *result = BOOL_FROM(r);
|
|
6484
|
-
|
|
6481
|
+
Py_INCREF_IMMORTAL(result);
|
|
6485
6482
|
return result;
|
|
6486
6483
|
}
|
|
6487
6484
|
case Py_NE: {
|
|
6488
6485
|
bool r = operand1 != operand2;
|
|
6489
6486
|
PyObject *result = BOOL_FROM(r);
|
|
6490
|
-
|
|
6487
|
+
Py_INCREF_IMMORTAL(result);
|
|
6491
6488
|
return result;
|
|
6492
6489
|
}
|
|
6493
6490
|
default:
|
|
@@ -6537,7 +6534,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6537
6534
|
return result;
|
|
6538
6535
|
}
|
|
6539
6536
|
|
|
6540
|
-
|
|
6537
|
+
Py_DECREF_IMMORTAL(result);
|
|
6541
6538
|
}
|
|
6542
6539
|
|
|
6543
6540
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6578,7 +6575,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6578
6575
|
|
|
6579
6576
|
bool r = c != 0;
|
|
6580
6577
|
PyObject *result = BOOL_FROM(r);
|
|
6581
|
-
|
|
6578
|
+
Py_INCREF_IMMORTAL(result);
|
|
6582
6579
|
return result;
|
|
6583
6580
|
}
|
|
6584
6581
|
}
|
|
@@ -6587,7 +6584,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6587
6584
|
richcmpfunc f;
|
|
6588
6585
|
|
|
6589
6586
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6590
|
-
f =
|
|
6587
|
+
f = TP_RICHCOMPARE(type2);
|
|
6591
6588
|
|
|
6592
6589
|
if (f != NULL) {
|
|
6593
6590
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -6598,7 +6595,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6598
6595
|
return result;
|
|
6599
6596
|
}
|
|
6600
6597
|
|
|
6601
|
-
|
|
6598
|
+
Py_DECREF_IMMORTAL(result);
|
|
6602
6599
|
}
|
|
6603
6600
|
}
|
|
6604
6601
|
|
|
@@ -6612,10 +6609,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6612
6609
|
return result;
|
|
6613
6610
|
}
|
|
6614
6611
|
|
|
6615
|
-
|
|
6612
|
+
Py_DECREF_IMMORTAL(result);
|
|
6616
6613
|
}
|
|
6617
6614
|
|
|
6618
|
-
f =
|
|
6615
|
+
f = TP_RICHCOMPARE(type2);
|
|
6619
6616
|
if (f != NULL) {
|
|
6620
6617
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
6621
6618
|
|
|
@@ -6625,7 +6622,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6625
6622
|
return result;
|
|
6626
6623
|
}
|
|
6627
6624
|
|
|
6628
|
-
|
|
6625
|
+
Py_DECREF_IMMORTAL(result);
|
|
6629
6626
|
}
|
|
6630
6627
|
|
|
6631
6628
|
int c;
|
|
@@ -6713,14 +6710,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6713
6710
|
|
|
6714
6711
|
bool r = c != 0;
|
|
6715
6712
|
PyObject *result = BOOL_FROM(r);
|
|
6716
|
-
|
|
6713
|
+
Py_INCREF_IMMORTAL(result);
|
|
6717
6714
|
return result;
|
|
6718
6715
|
#else
|
|
6719
6716
|
bool checked_reverse_op = false;
|
|
6720
6717
|
richcmpfunc f;
|
|
6721
6718
|
|
|
6722
6719
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6723
|
-
f =
|
|
6720
|
+
f = TP_RICHCOMPARE(type2);
|
|
6724
6721
|
|
|
6725
6722
|
if (f != NULL) {
|
|
6726
6723
|
checked_reverse_op = true;
|
|
@@ -6733,7 +6730,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6733
6730
|
return result;
|
|
6734
6731
|
}
|
|
6735
6732
|
|
|
6736
|
-
|
|
6733
|
+
Py_DECREF_IMMORTAL(result);
|
|
6737
6734
|
}
|
|
6738
6735
|
}
|
|
6739
6736
|
|
|
@@ -6748,11 +6745,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6748
6745
|
return result;
|
|
6749
6746
|
}
|
|
6750
6747
|
|
|
6751
|
-
|
|
6748
|
+
Py_DECREF_IMMORTAL(result);
|
|
6752
6749
|
}
|
|
6753
6750
|
|
|
6754
6751
|
if (checked_reverse_op == false) {
|
|
6755
|
-
f =
|
|
6752
|
+
f = TP_RICHCOMPARE(type2);
|
|
6756
6753
|
|
|
6757
6754
|
if (f != NULL) {
|
|
6758
6755
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -6763,7 +6760,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6763
6760
|
return result;
|
|
6764
6761
|
}
|
|
6765
6762
|
|
|
6766
|
-
|
|
6763
|
+
Py_DECREF_IMMORTAL(result);
|
|
6767
6764
|
}
|
|
6768
6765
|
}
|
|
6769
6766
|
|
|
@@ -6775,13 +6772,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6775
6772
|
case Py_EQ: {
|
|
6776
6773
|
bool r = operand1 == operand2;
|
|
6777
6774
|
PyObject *result = BOOL_FROM(r);
|
|
6778
|
-
|
|
6775
|
+
Py_INCREF_IMMORTAL(result);
|
|
6779
6776
|
return result;
|
|
6780
6777
|
}
|
|
6781
6778
|
case Py_NE: {
|
|
6782
6779
|
bool r = operand1 != operand2;
|
|
6783
6780
|
PyObject *result = BOOL_FROM(r);
|
|
6784
|
-
|
|
6781
|
+
Py_INCREF_IMMORTAL(result);
|
|
6785
6782
|
return result;
|
|
6786
6783
|
}
|
|
6787
6784
|
default:
|
|
@@ -6817,15 +6814,19 @@ static bool COMPARE_LE_CBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
|
|
|
6817
6814
|
|
|
6818
6815
|
if (operand1_long_object == operand2_long_object) {
|
|
6819
6816
|
r = true;
|
|
6820
|
-
} else if (
|
|
6821
|
-
|
|
6817
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6818
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6819
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) <
|
|
6820
|
+
0;
|
|
6822
6821
|
} else {
|
|
6823
|
-
Py_ssize_t i =
|
|
6822
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6824
6823
|
r = true;
|
|
6825
6824
|
while (--i >= 0) {
|
|
6826
|
-
if (operand1_long_object
|
|
6827
|
-
|
|
6828
|
-
|
|
6825
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6826
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6827
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] <
|
|
6828
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6829
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6829
6830
|
r = !r;
|
|
6830
6831
|
}
|
|
6831
6832
|
break;
|
|
@@ -6886,7 +6887,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6886
6887
|
}
|
|
6887
6888
|
}
|
|
6888
6889
|
|
|
6889
|
-
|
|
6890
|
+
Py_DECREF_IMMORTAL(result);
|
|
6890
6891
|
}
|
|
6891
6892
|
|
|
6892
6893
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6955,11 +6956,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6955
6956
|
}
|
|
6956
6957
|
}
|
|
6957
6958
|
|
|
6958
|
-
|
|
6959
|
+
Py_DECREF_IMMORTAL(result);
|
|
6959
6960
|
}
|
|
6960
6961
|
}
|
|
6961
6962
|
|
|
6962
|
-
f =
|
|
6963
|
+
f = TP_RICHCOMPARE(type1);
|
|
6963
6964
|
if (f != NULL) {
|
|
6964
6965
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
6965
6966
|
|
|
@@ -6977,7 +6978,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6977
6978
|
}
|
|
6978
6979
|
}
|
|
6979
6980
|
|
|
6980
|
-
|
|
6981
|
+
Py_DECREF_IMMORTAL(result);
|
|
6981
6982
|
}
|
|
6982
6983
|
|
|
6983
6984
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6998,7 +6999,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6998
6999
|
}
|
|
6999
7000
|
}
|
|
7000
7001
|
|
|
7001
|
-
|
|
7002
|
+
Py_DECREF_IMMORTAL(result);
|
|
7002
7003
|
}
|
|
7003
7004
|
|
|
7004
7005
|
int c;
|
|
@@ -7114,11 +7115,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7114
7115
|
}
|
|
7115
7116
|
}
|
|
7116
7117
|
|
|
7117
|
-
|
|
7118
|
+
Py_DECREF_IMMORTAL(result);
|
|
7118
7119
|
}
|
|
7119
7120
|
}
|
|
7120
7121
|
|
|
7121
|
-
f =
|
|
7122
|
+
f = TP_RICHCOMPARE(type1);
|
|
7122
7123
|
|
|
7123
7124
|
if (f != NULL) {
|
|
7124
7125
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -7137,7 +7138,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7137
7138
|
}
|
|
7138
7139
|
}
|
|
7139
7140
|
|
|
7140
|
-
|
|
7141
|
+
Py_DECREF_IMMORTAL(result);
|
|
7141
7142
|
}
|
|
7142
7143
|
|
|
7143
7144
|
if (checked_reverse_op == false) {
|
|
@@ -7160,7 +7161,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7160
7161
|
}
|
|
7161
7162
|
}
|
|
7162
7163
|
|
|
7163
|
-
|
|
7164
|
+
Py_DECREF_IMMORTAL(result);
|
|
7164
7165
|
}
|
|
7165
7166
|
}
|
|
7166
7167
|
|
|
@@ -7236,7 +7237,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7236
7237
|
}
|
|
7237
7238
|
}
|
|
7238
7239
|
|
|
7239
|
-
|
|
7240
|
+
Py_DECREF_IMMORTAL(result);
|
|
7240
7241
|
}
|
|
7241
7242
|
|
|
7242
7243
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7286,7 +7287,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7286
7287
|
richcmpfunc f;
|
|
7287
7288
|
|
|
7288
7289
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7289
|
-
f =
|
|
7290
|
+
f = TP_RICHCOMPARE(type2);
|
|
7290
7291
|
|
|
7291
7292
|
if (f != NULL) {
|
|
7292
7293
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -7305,7 +7306,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7305
7306
|
}
|
|
7306
7307
|
}
|
|
7307
7308
|
|
|
7308
|
-
|
|
7309
|
+
Py_DECREF_IMMORTAL(result);
|
|
7309
7310
|
}
|
|
7310
7311
|
}
|
|
7311
7312
|
|
|
@@ -7327,10 +7328,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7327
7328
|
}
|
|
7328
7329
|
}
|
|
7329
7330
|
|
|
7330
|
-
|
|
7331
|
+
Py_DECREF_IMMORTAL(result);
|
|
7331
7332
|
}
|
|
7332
7333
|
|
|
7333
|
-
f =
|
|
7334
|
+
f = TP_RICHCOMPARE(type2);
|
|
7334
7335
|
if (f != NULL) {
|
|
7335
7336
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
7336
7337
|
|
|
@@ -7348,7 +7349,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7348
7349
|
}
|
|
7349
7350
|
}
|
|
7350
7351
|
|
|
7351
|
-
|
|
7352
|
+
Py_DECREF_IMMORTAL(result);
|
|
7352
7353
|
}
|
|
7353
7354
|
|
|
7354
7355
|
int c;
|
|
@@ -7443,7 +7444,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7443
7444
|
richcmpfunc f;
|
|
7444
7445
|
|
|
7445
7446
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7446
|
-
f =
|
|
7447
|
+
f = TP_RICHCOMPARE(type2);
|
|
7447
7448
|
|
|
7448
7449
|
if (f != NULL) {
|
|
7449
7450
|
checked_reverse_op = true;
|
|
@@ -7464,7 +7465,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7464
7465
|
}
|
|
7465
7466
|
}
|
|
7466
7467
|
|
|
7467
|
-
|
|
7468
|
+
Py_DECREF_IMMORTAL(result);
|
|
7468
7469
|
}
|
|
7469
7470
|
}
|
|
7470
7471
|
|
|
@@ -7487,11 +7488,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7487
7488
|
}
|
|
7488
7489
|
}
|
|
7489
7490
|
|
|
7490
|
-
|
|
7491
|
+
Py_DECREF_IMMORTAL(result);
|
|
7491
7492
|
}
|
|
7492
7493
|
|
|
7493
7494
|
if (checked_reverse_op == false) {
|
|
7494
|
-
f =
|
|
7495
|
+
f = TP_RICHCOMPARE(type2);
|
|
7495
7496
|
|
|
7496
7497
|
if (f != NULL) {
|
|
7497
7498
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -7510,7 +7511,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7510
7511
|
}
|
|
7511
7512
|
}
|
|
7512
7513
|
|
|
7513
|
-
|
|
7514
|
+
Py_DECREF_IMMORTAL(result);
|
|
7514
7515
|
}
|
|
7515
7516
|
}
|
|
7516
7517
|
|
|
@@ -7557,7 +7558,7 @@ static PyObject *COMPARE_LE_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
7557
7558
|
|
|
7558
7559
|
// Convert to target type.
|
|
7559
7560
|
PyObject *result = BOOL_FROM(r);
|
|
7560
|
-
|
|
7561
|
+
Py_INCREF_IMMORTAL(result);
|
|
7561
7562
|
return result;
|
|
7562
7563
|
}
|
|
7563
7564
|
/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
|
|
@@ -7594,7 +7595,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7594
7595
|
return result;
|
|
7595
7596
|
}
|
|
7596
7597
|
|
|
7597
|
-
|
|
7598
|
+
Py_DECREF_IMMORTAL(result);
|
|
7598
7599
|
}
|
|
7599
7600
|
|
|
7600
7601
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7635,7 +7636,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7635
7636
|
|
|
7636
7637
|
bool r = c != 0;
|
|
7637
7638
|
PyObject *result = BOOL_FROM(r);
|
|
7638
|
-
|
|
7639
|
+
Py_INCREF_IMMORTAL(result);
|
|
7639
7640
|
return result;
|
|
7640
7641
|
}
|
|
7641
7642
|
}
|
|
@@ -7655,11 +7656,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7655
7656
|
return result;
|
|
7656
7657
|
}
|
|
7657
7658
|
|
|
7658
|
-
|
|
7659
|
+
Py_DECREF_IMMORTAL(result);
|
|
7659
7660
|
}
|
|
7660
7661
|
}
|
|
7661
7662
|
|
|
7662
|
-
f =
|
|
7663
|
+
f = TP_RICHCOMPARE(type1);
|
|
7663
7664
|
if (f != NULL) {
|
|
7664
7665
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
7665
7666
|
|
|
@@ -7669,7 +7670,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7669
7670
|
return result;
|
|
7670
7671
|
}
|
|
7671
7672
|
|
|
7672
|
-
|
|
7673
|
+
Py_DECREF_IMMORTAL(result);
|
|
7673
7674
|
}
|
|
7674
7675
|
|
|
7675
7676
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -7682,7 +7683,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7682
7683
|
return result;
|
|
7683
7684
|
}
|
|
7684
7685
|
|
|
7685
|
-
|
|
7686
|
+
Py_DECREF_IMMORTAL(result);
|
|
7686
7687
|
}
|
|
7687
7688
|
|
|
7688
7689
|
int c;
|
|
@@ -7770,7 +7771,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7770
7771
|
|
|
7771
7772
|
bool r = c != 0;
|
|
7772
7773
|
PyObject *result = BOOL_FROM(r);
|
|
7773
|
-
|
|
7774
|
+
Py_INCREF_IMMORTAL(result);
|
|
7774
7775
|
return result;
|
|
7775
7776
|
#else
|
|
7776
7777
|
bool checked_reverse_op = false;
|
|
@@ -7790,11 +7791,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7790
7791
|
return result;
|
|
7791
7792
|
}
|
|
7792
7793
|
|
|
7793
|
-
|
|
7794
|
+
Py_DECREF_IMMORTAL(result);
|
|
7794
7795
|
}
|
|
7795
7796
|
}
|
|
7796
7797
|
|
|
7797
|
-
f =
|
|
7798
|
+
f = TP_RICHCOMPARE(type1);
|
|
7798
7799
|
|
|
7799
7800
|
if (f != NULL) {
|
|
7800
7801
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -7805,7 +7806,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7805
7806
|
return result;
|
|
7806
7807
|
}
|
|
7807
7808
|
|
|
7808
|
-
|
|
7809
|
+
Py_DECREF_IMMORTAL(result);
|
|
7809
7810
|
}
|
|
7810
7811
|
|
|
7811
7812
|
if (checked_reverse_op == false) {
|
|
@@ -7820,7 +7821,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7820
7821
|
return result;
|
|
7821
7822
|
}
|
|
7822
7823
|
|
|
7823
|
-
|
|
7824
|
+
Py_DECREF_IMMORTAL(result);
|
|
7824
7825
|
}
|
|
7825
7826
|
}
|
|
7826
7827
|
|
|
@@ -7832,13 +7833,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7832
7833
|
case Py_EQ: {
|
|
7833
7834
|
bool r = operand1 == operand2;
|
|
7834
7835
|
PyObject *result = BOOL_FROM(r);
|
|
7835
|
-
|
|
7836
|
+
Py_INCREF_IMMORTAL(result);
|
|
7836
7837
|
return result;
|
|
7837
7838
|
}
|
|
7838
7839
|
case Py_NE: {
|
|
7839
7840
|
bool r = operand1 != operand2;
|
|
7840
7841
|
PyObject *result = BOOL_FROM(r);
|
|
7841
|
-
|
|
7842
|
+
Py_INCREF_IMMORTAL(result);
|
|
7842
7843
|
return result;
|
|
7843
7844
|
}
|
|
7844
7845
|
default:
|
|
@@ -7886,7 +7887,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7886
7887
|
return result;
|
|
7887
7888
|
}
|
|
7888
7889
|
|
|
7889
|
-
|
|
7890
|
+
Py_DECREF_IMMORTAL(result);
|
|
7890
7891
|
}
|
|
7891
7892
|
|
|
7892
7893
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7927,7 +7928,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7927
7928
|
|
|
7928
7929
|
bool r = c != 0;
|
|
7929
7930
|
PyObject *result = BOOL_FROM(r);
|
|
7930
|
-
|
|
7931
|
+
Py_INCREF_IMMORTAL(result);
|
|
7931
7932
|
return result;
|
|
7932
7933
|
}
|
|
7933
7934
|
}
|
|
@@ -7936,7 +7937,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7936
7937
|
richcmpfunc f;
|
|
7937
7938
|
|
|
7938
7939
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7939
|
-
f =
|
|
7940
|
+
f = TP_RICHCOMPARE(type2);
|
|
7940
7941
|
|
|
7941
7942
|
if (f != NULL) {
|
|
7942
7943
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -7947,7 +7948,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7947
7948
|
return result;
|
|
7948
7949
|
}
|
|
7949
7950
|
|
|
7950
|
-
|
|
7951
|
+
Py_DECREF_IMMORTAL(result);
|
|
7951
7952
|
}
|
|
7952
7953
|
}
|
|
7953
7954
|
|
|
@@ -7961,10 +7962,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7961
7962
|
return result;
|
|
7962
7963
|
}
|
|
7963
7964
|
|
|
7964
|
-
|
|
7965
|
+
Py_DECREF_IMMORTAL(result);
|
|
7965
7966
|
}
|
|
7966
7967
|
|
|
7967
|
-
f =
|
|
7968
|
+
f = TP_RICHCOMPARE(type2);
|
|
7968
7969
|
if (f != NULL) {
|
|
7969
7970
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
7970
7971
|
|
|
@@ -7974,7 +7975,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7974
7975
|
return result;
|
|
7975
7976
|
}
|
|
7976
7977
|
|
|
7977
|
-
|
|
7978
|
+
Py_DECREF_IMMORTAL(result);
|
|
7978
7979
|
}
|
|
7979
7980
|
|
|
7980
7981
|
int c;
|
|
@@ -8062,14 +8063,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8062
8063
|
|
|
8063
8064
|
bool r = c != 0;
|
|
8064
8065
|
PyObject *result = BOOL_FROM(r);
|
|
8065
|
-
|
|
8066
|
+
Py_INCREF_IMMORTAL(result);
|
|
8066
8067
|
return result;
|
|
8067
8068
|
#else
|
|
8068
8069
|
bool checked_reverse_op = false;
|
|
8069
8070
|
richcmpfunc f;
|
|
8070
8071
|
|
|
8071
8072
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8072
|
-
f =
|
|
8073
|
+
f = TP_RICHCOMPARE(type2);
|
|
8073
8074
|
|
|
8074
8075
|
if (f != NULL) {
|
|
8075
8076
|
checked_reverse_op = true;
|
|
@@ -8082,7 +8083,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8082
8083
|
return result;
|
|
8083
8084
|
}
|
|
8084
8085
|
|
|
8085
|
-
|
|
8086
|
+
Py_DECREF_IMMORTAL(result);
|
|
8086
8087
|
}
|
|
8087
8088
|
}
|
|
8088
8089
|
|
|
@@ -8097,11 +8098,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8097
8098
|
return result;
|
|
8098
8099
|
}
|
|
8099
8100
|
|
|
8100
|
-
|
|
8101
|
+
Py_DECREF_IMMORTAL(result);
|
|
8101
8102
|
}
|
|
8102
8103
|
|
|
8103
8104
|
if (checked_reverse_op == false) {
|
|
8104
|
-
f =
|
|
8105
|
+
f = TP_RICHCOMPARE(type2);
|
|
8105
8106
|
|
|
8106
8107
|
if (f != NULL) {
|
|
8107
8108
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -8112,7 +8113,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8112
8113
|
return result;
|
|
8113
8114
|
}
|
|
8114
8115
|
|
|
8115
|
-
|
|
8116
|
+
Py_DECREF_IMMORTAL(result);
|
|
8116
8117
|
}
|
|
8117
8118
|
}
|
|
8118
8119
|
|
|
@@ -8124,13 +8125,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8124
8125
|
case Py_EQ: {
|
|
8125
8126
|
bool r = operand1 == operand2;
|
|
8126
8127
|
PyObject *result = BOOL_FROM(r);
|
|
8127
|
-
|
|
8128
|
+
Py_INCREF_IMMORTAL(result);
|
|
8128
8129
|
return result;
|
|
8129
8130
|
}
|
|
8130
8131
|
case Py_NE: {
|
|
8131
8132
|
bool r = operand1 != operand2;
|
|
8132
8133
|
PyObject *result = BOOL_FROM(r);
|
|
8133
|
-
|
|
8134
|
+
Py_INCREF_IMMORTAL(result);
|
|
8134
8135
|
return result;
|
|
8135
8136
|
}
|
|
8136
8137
|
default:
|
|
@@ -8214,7 +8215,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8214
8215
|
}
|
|
8215
8216
|
}
|
|
8216
8217
|
|
|
8217
|
-
|
|
8218
|
+
Py_DECREF_IMMORTAL(result);
|
|
8218
8219
|
}
|
|
8219
8220
|
|
|
8220
8221
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8283,11 +8284,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8283
8284
|
}
|
|
8284
8285
|
}
|
|
8285
8286
|
|
|
8286
|
-
|
|
8287
|
+
Py_DECREF_IMMORTAL(result);
|
|
8287
8288
|
}
|
|
8288
8289
|
}
|
|
8289
8290
|
|
|
8290
|
-
f =
|
|
8291
|
+
f = TP_RICHCOMPARE(type1);
|
|
8291
8292
|
if (f != NULL) {
|
|
8292
8293
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
8293
8294
|
|
|
@@ -8305,7 +8306,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8305
8306
|
}
|
|
8306
8307
|
}
|
|
8307
8308
|
|
|
8308
|
-
|
|
8309
|
+
Py_DECREF_IMMORTAL(result);
|
|
8309
8310
|
}
|
|
8310
8311
|
|
|
8311
8312
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -8326,7 +8327,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8326
8327
|
}
|
|
8327
8328
|
}
|
|
8328
8329
|
|
|
8329
|
-
|
|
8330
|
+
Py_DECREF_IMMORTAL(result);
|
|
8330
8331
|
}
|
|
8331
8332
|
|
|
8332
8333
|
int c;
|
|
@@ -8442,11 +8443,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8442
8443
|
}
|
|
8443
8444
|
}
|
|
8444
8445
|
|
|
8445
|
-
|
|
8446
|
+
Py_DECREF_IMMORTAL(result);
|
|
8446
8447
|
}
|
|
8447
8448
|
}
|
|
8448
8449
|
|
|
8449
|
-
f =
|
|
8450
|
+
f = TP_RICHCOMPARE(type1);
|
|
8450
8451
|
|
|
8451
8452
|
if (f != NULL) {
|
|
8452
8453
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -8465,7 +8466,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8465
8466
|
}
|
|
8466
8467
|
}
|
|
8467
8468
|
|
|
8468
|
-
|
|
8469
|
+
Py_DECREF_IMMORTAL(result);
|
|
8469
8470
|
}
|
|
8470
8471
|
|
|
8471
8472
|
if (checked_reverse_op == false) {
|
|
@@ -8488,7 +8489,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8488
8489
|
}
|
|
8489
8490
|
}
|
|
8490
8491
|
|
|
8491
|
-
|
|
8492
|
+
Py_DECREF_IMMORTAL(result);
|
|
8492
8493
|
}
|
|
8493
8494
|
}
|
|
8494
8495
|
|
|
@@ -8562,7 +8563,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8562
8563
|
}
|
|
8563
8564
|
}
|
|
8564
8565
|
|
|
8565
|
-
|
|
8566
|
+
Py_DECREF_IMMORTAL(result);
|
|
8566
8567
|
}
|
|
8567
8568
|
|
|
8568
8569
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8612,7 +8613,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8612
8613
|
richcmpfunc f;
|
|
8613
8614
|
|
|
8614
8615
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8615
|
-
f =
|
|
8616
|
+
f = TP_RICHCOMPARE(type2);
|
|
8616
8617
|
|
|
8617
8618
|
if (f != NULL) {
|
|
8618
8619
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -8631,7 +8632,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8631
8632
|
}
|
|
8632
8633
|
}
|
|
8633
8634
|
|
|
8634
|
-
|
|
8635
|
+
Py_DECREF_IMMORTAL(result);
|
|
8635
8636
|
}
|
|
8636
8637
|
}
|
|
8637
8638
|
|
|
@@ -8653,10 +8654,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8653
8654
|
}
|
|
8654
8655
|
}
|
|
8655
8656
|
|
|
8656
|
-
|
|
8657
|
+
Py_DECREF_IMMORTAL(result);
|
|
8657
8658
|
}
|
|
8658
8659
|
|
|
8659
|
-
f =
|
|
8660
|
+
f = TP_RICHCOMPARE(type2);
|
|
8660
8661
|
if (f != NULL) {
|
|
8661
8662
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
8662
8663
|
|
|
@@ -8674,7 +8675,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8674
8675
|
}
|
|
8675
8676
|
}
|
|
8676
8677
|
|
|
8677
|
-
|
|
8678
|
+
Py_DECREF_IMMORTAL(result);
|
|
8678
8679
|
}
|
|
8679
8680
|
|
|
8680
8681
|
int c;
|
|
@@ -8769,7 +8770,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8769
8770
|
richcmpfunc f;
|
|
8770
8771
|
|
|
8771
8772
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8772
|
-
f =
|
|
8773
|
+
f = TP_RICHCOMPARE(type2);
|
|
8773
8774
|
|
|
8774
8775
|
if (f != NULL) {
|
|
8775
8776
|
checked_reverse_op = true;
|
|
@@ -8790,7 +8791,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8790
8791
|
}
|
|
8791
8792
|
}
|
|
8792
8793
|
|
|
8793
|
-
|
|
8794
|
+
Py_DECREF_IMMORTAL(result);
|
|
8794
8795
|
}
|
|
8795
8796
|
}
|
|
8796
8797
|
|
|
@@ -8813,11 +8814,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8813
8814
|
}
|
|
8814
8815
|
}
|
|
8815
8816
|
|
|
8816
|
-
|
|
8817
|
+
Py_DECREF_IMMORTAL(result);
|
|
8817
8818
|
}
|
|
8818
8819
|
|
|
8819
8820
|
if (checked_reverse_op == false) {
|
|
8820
|
-
f =
|
|
8821
|
+
f = TP_RICHCOMPARE(type2);
|
|
8821
8822
|
|
|
8822
8823
|
if (f != NULL) {
|
|
8823
8824
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -8836,7 +8837,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8836
8837
|
}
|
|
8837
8838
|
}
|
|
8838
8839
|
|
|
8839
|
-
|
|
8840
|
+
Py_DECREF_IMMORTAL(result);
|
|
8840
8841
|
}
|
|
8841
8842
|
}
|
|
8842
8843
|
|
|
@@ -8909,7 +8910,7 @@ static PyObject *COMPARE_LE_OBJECT_TUPLE_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
8909
8910
|
|
|
8910
8911
|
// Convert to target type.
|
|
8911
8912
|
PyObject *result = BOOL_FROM(r);
|
|
8912
|
-
|
|
8913
|
+
Py_INCREF_IMMORTAL(result);
|
|
8913
8914
|
return result;
|
|
8914
8915
|
}
|
|
8915
8916
|
|
|
@@ -8949,7 +8950,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8949
8950
|
return result;
|
|
8950
8951
|
}
|
|
8951
8952
|
|
|
8952
|
-
|
|
8953
|
+
Py_DECREF_IMMORTAL(result);
|
|
8953
8954
|
}
|
|
8954
8955
|
|
|
8955
8956
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8990,7 +8991,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8990
8991
|
|
|
8991
8992
|
bool r = c != 0;
|
|
8992
8993
|
PyObject *result = BOOL_FROM(r);
|
|
8993
|
-
|
|
8994
|
+
Py_INCREF_IMMORTAL(result);
|
|
8994
8995
|
return result;
|
|
8995
8996
|
}
|
|
8996
8997
|
}
|
|
@@ -9010,11 +9011,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9010
9011
|
return result;
|
|
9011
9012
|
}
|
|
9012
9013
|
|
|
9013
|
-
|
|
9014
|
+
Py_DECREF_IMMORTAL(result);
|
|
9014
9015
|
}
|
|
9015
9016
|
}
|
|
9016
9017
|
|
|
9017
|
-
f =
|
|
9018
|
+
f = TP_RICHCOMPARE(type1);
|
|
9018
9019
|
if (f != NULL) {
|
|
9019
9020
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
9020
9021
|
|
|
@@ -9024,7 +9025,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9024
9025
|
return result;
|
|
9025
9026
|
}
|
|
9026
9027
|
|
|
9027
|
-
|
|
9028
|
+
Py_DECREF_IMMORTAL(result);
|
|
9028
9029
|
}
|
|
9029
9030
|
|
|
9030
9031
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9037,7 +9038,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9037
9038
|
return result;
|
|
9038
9039
|
}
|
|
9039
9040
|
|
|
9040
|
-
|
|
9041
|
+
Py_DECREF_IMMORTAL(result);
|
|
9041
9042
|
}
|
|
9042
9043
|
|
|
9043
9044
|
int c;
|
|
@@ -9125,7 +9126,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9125
9126
|
|
|
9126
9127
|
bool r = c != 0;
|
|
9127
9128
|
PyObject *result = BOOL_FROM(r);
|
|
9128
|
-
|
|
9129
|
+
Py_INCREF_IMMORTAL(result);
|
|
9129
9130
|
return result;
|
|
9130
9131
|
#else
|
|
9131
9132
|
bool checked_reverse_op = false;
|
|
@@ -9145,11 +9146,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9145
9146
|
return result;
|
|
9146
9147
|
}
|
|
9147
9148
|
|
|
9148
|
-
|
|
9149
|
+
Py_DECREF_IMMORTAL(result);
|
|
9149
9150
|
}
|
|
9150
9151
|
}
|
|
9151
9152
|
|
|
9152
|
-
f =
|
|
9153
|
+
f = TP_RICHCOMPARE(type1);
|
|
9153
9154
|
|
|
9154
9155
|
if (f != NULL) {
|
|
9155
9156
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -9160,7 +9161,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9160
9161
|
return result;
|
|
9161
9162
|
}
|
|
9162
9163
|
|
|
9163
|
-
|
|
9164
|
+
Py_DECREF_IMMORTAL(result);
|
|
9164
9165
|
}
|
|
9165
9166
|
|
|
9166
9167
|
if (checked_reverse_op == false) {
|
|
@@ -9175,7 +9176,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9175
9176
|
return result;
|
|
9176
9177
|
}
|
|
9177
9178
|
|
|
9178
|
-
|
|
9179
|
+
Py_DECREF_IMMORTAL(result);
|
|
9179
9180
|
}
|
|
9180
9181
|
}
|
|
9181
9182
|
|
|
@@ -9187,13 +9188,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9187
9188
|
case Py_EQ: {
|
|
9188
9189
|
bool r = operand1 == operand2;
|
|
9189
9190
|
PyObject *result = BOOL_FROM(r);
|
|
9190
|
-
|
|
9191
|
+
Py_INCREF_IMMORTAL(result);
|
|
9191
9192
|
return result;
|
|
9192
9193
|
}
|
|
9193
9194
|
case Py_NE: {
|
|
9194
9195
|
bool r = operand1 != operand2;
|
|
9195
9196
|
PyObject *result = BOOL_FROM(r);
|
|
9196
|
-
|
|
9197
|
+
Py_INCREF_IMMORTAL(result);
|
|
9197
9198
|
return result;
|
|
9198
9199
|
}
|
|
9199
9200
|
default:
|
|
@@ -9241,7 +9242,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9241
9242
|
return result;
|
|
9242
9243
|
}
|
|
9243
9244
|
|
|
9244
|
-
|
|
9245
|
+
Py_DECREF_IMMORTAL(result);
|
|
9245
9246
|
}
|
|
9246
9247
|
|
|
9247
9248
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9282,7 +9283,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9282
9283
|
|
|
9283
9284
|
bool r = c != 0;
|
|
9284
9285
|
PyObject *result = BOOL_FROM(r);
|
|
9285
|
-
|
|
9286
|
+
Py_INCREF_IMMORTAL(result);
|
|
9286
9287
|
return result;
|
|
9287
9288
|
}
|
|
9288
9289
|
}
|
|
@@ -9291,7 +9292,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9291
9292
|
richcmpfunc f;
|
|
9292
9293
|
|
|
9293
9294
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9294
|
-
f =
|
|
9295
|
+
f = TP_RICHCOMPARE(type2);
|
|
9295
9296
|
|
|
9296
9297
|
if (f != NULL) {
|
|
9297
9298
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -9302,7 +9303,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9302
9303
|
return result;
|
|
9303
9304
|
}
|
|
9304
9305
|
|
|
9305
|
-
|
|
9306
|
+
Py_DECREF_IMMORTAL(result);
|
|
9306
9307
|
}
|
|
9307
9308
|
}
|
|
9308
9309
|
|
|
@@ -9316,10 +9317,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9316
9317
|
return result;
|
|
9317
9318
|
}
|
|
9318
9319
|
|
|
9319
|
-
|
|
9320
|
+
Py_DECREF_IMMORTAL(result);
|
|
9320
9321
|
}
|
|
9321
9322
|
|
|
9322
|
-
f =
|
|
9323
|
+
f = TP_RICHCOMPARE(type2);
|
|
9323
9324
|
if (f != NULL) {
|
|
9324
9325
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
9325
9326
|
|
|
@@ -9329,7 +9330,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9329
9330
|
return result;
|
|
9330
9331
|
}
|
|
9331
9332
|
|
|
9332
|
-
|
|
9333
|
+
Py_DECREF_IMMORTAL(result);
|
|
9333
9334
|
}
|
|
9334
9335
|
|
|
9335
9336
|
int c;
|
|
@@ -9417,14 +9418,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9417
9418
|
|
|
9418
9419
|
bool r = c != 0;
|
|
9419
9420
|
PyObject *result = BOOL_FROM(r);
|
|
9420
|
-
|
|
9421
|
+
Py_INCREF_IMMORTAL(result);
|
|
9421
9422
|
return result;
|
|
9422
9423
|
#else
|
|
9423
9424
|
bool checked_reverse_op = false;
|
|
9424
9425
|
richcmpfunc f;
|
|
9425
9426
|
|
|
9426
9427
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9427
|
-
f =
|
|
9428
|
+
f = TP_RICHCOMPARE(type2);
|
|
9428
9429
|
|
|
9429
9430
|
if (f != NULL) {
|
|
9430
9431
|
checked_reverse_op = true;
|
|
@@ -9437,7 +9438,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9437
9438
|
return result;
|
|
9438
9439
|
}
|
|
9439
9440
|
|
|
9440
|
-
|
|
9441
|
+
Py_DECREF_IMMORTAL(result);
|
|
9441
9442
|
}
|
|
9442
9443
|
}
|
|
9443
9444
|
|
|
@@ -9452,11 +9453,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9452
9453
|
return result;
|
|
9453
9454
|
}
|
|
9454
9455
|
|
|
9455
|
-
|
|
9456
|
+
Py_DECREF_IMMORTAL(result);
|
|
9456
9457
|
}
|
|
9457
9458
|
|
|
9458
9459
|
if (checked_reverse_op == false) {
|
|
9459
|
-
f =
|
|
9460
|
+
f = TP_RICHCOMPARE(type2);
|
|
9460
9461
|
|
|
9461
9462
|
if (f != NULL) {
|
|
9462
9463
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -9467,7 +9468,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9467
9468
|
return result;
|
|
9468
9469
|
}
|
|
9469
9470
|
|
|
9470
|
-
|
|
9471
|
+
Py_DECREF_IMMORTAL(result);
|
|
9471
9472
|
}
|
|
9472
9473
|
}
|
|
9473
9474
|
|
|
@@ -9479,13 +9480,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9479
9480
|
case Py_EQ: {
|
|
9480
9481
|
bool r = operand1 == operand2;
|
|
9481
9482
|
PyObject *result = BOOL_FROM(r);
|
|
9482
|
-
|
|
9483
|
+
Py_INCREF_IMMORTAL(result);
|
|
9483
9484
|
return result;
|
|
9484
9485
|
}
|
|
9485
9486
|
case Py_NE: {
|
|
9486
9487
|
bool r = operand1 != operand2;
|
|
9487
9488
|
PyObject *result = BOOL_FROM(r);
|
|
9488
|
-
|
|
9489
|
+
Py_INCREF_IMMORTAL(result);
|
|
9489
9490
|
return result;
|
|
9490
9491
|
}
|
|
9491
9492
|
default:
|
|
@@ -9594,7 +9595,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9594
9595
|
}
|
|
9595
9596
|
}
|
|
9596
9597
|
|
|
9597
|
-
|
|
9598
|
+
Py_DECREF_IMMORTAL(result);
|
|
9598
9599
|
}
|
|
9599
9600
|
|
|
9600
9601
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9663,11 +9664,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9663
9664
|
}
|
|
9664
9665
|
}
|
|
9665
9666
|
|
|
9666
|
-
|
|
9667
|
+
Py_DECREF_IMMORTAL(result);
|
|
9667
9668
|
}
|
|
9668
9669
|
}
|
|
9669
9670
|
|
|
9670
|
-
f =
|
|
9671
|
+
f = TP_RICHCOMPARE(type1);
|
|
9671
9672
|
if (f != NULL) {
|
|
9672
9673
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
9673
9674
|
|
|
@@ -9685,7 +9686,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9685
9686
|
}
|
|
9686
9687
|
}
|
|
9687
9688
|
|
|
9688
|
-
|
|
9689
|
+
Py_DECREF_IMMORTAL(result);
|
|
9689
9690
|
}
|
|
9690
9691
|
|
|
9691
9692
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9706,7 +9707,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9706
9707
|
}
|
|
9707
9708
|
}
|
|
9708
9709
|
|
|
9709
|
-
|
|
9710
|
+
Py_DECREF_IMMORTAL(result);
|
|
9710
9711
|
}
|
|
9711
9712
|
|
|
9712
9713
|
int c;
|
|
@@ -9822,11 +9823,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9822
9823
|
}
|
|
9823
9824
|
}
|
|
9824
9825
|
|
|
9825
|
-
|
|
9826
|
+
Py_DECREF_IMMORTAL(result);
|
|
9826
9827
|
}
|
|
9827
9828
|
}
|
|
9828
9829
|
|
|
9829
|
-
f =
|
|
9830
|
+
f = TP_RICHCOMPARE(type1);
|
|
9830
9831
|
|
|
9831
9832
|
if (f != NULL) {
|
|
9832
9833
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -9845,7 +9846,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9845
9846
|
}
|
|
9846
9847
|
}
|
|
9847
9848
|
|
|
9848
|
-
|
|
9849
|
+
Py_DECREF_IMMORTAL(result);
|
|
9849
9850
|
}
|
|
9850
9851
|
|
|
9851
9852
|
if (checked_reverse_op == false) {
|
|
@@ -9868,7 +9869,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9868
9869
|
}
|
|
9869
9870
|
}
|
|
9870
9871
|
|
|
9871
|
-
|
|
9872
|
+
Py_DECREF_IMMORTAL(result);
|
|
9872
9873
|
}
|
|
9873
9874
|
}
|
|
9874
9875
|
|
|
@@ -9942,7 +9943,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9942
9943
|
}
|
|
9943
9944
|
}
|
|
9944
9945
|
|
|
9945
|
-
|
|
9946
|
+
Py_DECREF_IMMORTAL(result);
|
|
9946
9947
|
}
|
|
9947
9948
|
|
|
9948
9949
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9992,7 +9993,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9992
9993
|
richcmpfunc f;
|
|
9993
9994
|
|
|
9994
9995
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9995
|
-
f =
|
|
9996
|
+
f = TP_RICHCOMPARE(type2);
|
|
9996
9997
|
|
|
9997
9998
|
if (f != NULL) {
|
|
9998
9999
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -10011,7 +10012,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10011
10012
|
}
|
|
10012
10013
|
}
|
|
10013
10014
|
|
|
10014
|
-
|
|
10015
|
+
Py_DECREF_IMMORTAL(result);
|
|
10015
10016
|
}
|
|
10016
10017
|
}
|
|
10017
10018
|
|
|
@@ -10033,10 +10034,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10033
10034
|
}
|
|
10034
10035
|
}
|
|
10035
10036
|
|
|
10036
|
-
|
|
10037
|
+
Py_DECREF_IMMORTAL(result);
|
|
10037
10038
|
}
|
|
10038
10039
|
|
|
10039
|
-
f =
|
|
10040
|
+
f = TP_RICHCOMPARE(type2);
|
|
10040
10041
|
if (f != NULL) {
|
|
10041
10042
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
10042
10043
|
|
|
@@ -10054,7 +10055,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10054
10055
|
}
|
|
10055
10056
|
}
|
|
10056
10057
|
|
|
10057
|
-
|
|
10058
|
+
Py_DECREF_IMMORTAL(result);
|
|
10058
10059
|
}
|
|
10059
10060
|
|
|
10060
10061
|
int c;
|
|
@@ -10149,7 +10150,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10149
10150
|
richcmpfunc f;
|
|
10150
10151
|
|
|
10151
10152
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
10152
|
-
f =
|
|
10153
|
+
f = TP_RICHCOMPARE(type2);
|
|
10153
10154
|
|
|
10154
10155
|
if (f != NULL) {
|
|
10155
10156
|
checked_reverse_op = true;
|
|
@@ -10170,7 +10171,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10170
10171
|
}
|
|
10171
10172
|
}
|
|
10172
10173
|
|
|
10173
|
-
|
|
10174
|
+
Py_DECREF_IMMORTAL(result);
|
|
10174
10175
|
}
|
|
10175
10176
|
}
|
|
10176
10177
|
|
|
@@ -10193,11 +10194,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10193
10194
|
}
|
|
10194
10195
|
}
|
|
10195
10196
|
|
|
10196
|
-
|
|
10197
|
+
Py_DECREF_IMMORTAL(result);
|
|
10197
10198
|
}
|
|
10198
10199
|
|
|
10199
10200
|
if (checked_reverse_op == false) {
|
|
10200
|
-
f =
|
|
10201
|
+
f = TP_RICHCOMPARE(type2);
|
|
10201
10202
|
|
|
10202
10203
|
if (f != NULL) {
|
|
10203
10204
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -10216,7 +10217,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10216
10217
|
}
|
|
10217
10218
|
}
|
|
10218
10219
|
|
|
10219
|
-
|
|
10220
|
+
Py_DECREF_IMMORTAL(result);
|
|
10220
10221
|
}
|
|
10221
10222
|
}
|
|
10222
10223
|
|
|
@@ -10263,14 +10264,11 @@ static PyObject *COMPARE_LE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10263
10264
|
PyListObject *a = (PyListObject *)operand1;
|
|
10264
10265
|
PyListObject *b = (PyListObject *)operand2;
|
|
10265
10266
|
|
|
10266
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10267
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10268
|
-
|
|
10269
10267
|
bool found = false;
|
|
10270
10268
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10271
10269
|
|
|
10272
10270
|
Py_ssize_t i;
|
|
10273
|
-
for (i = 0; i <
|
|
10271
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10274
10272
|
PyObject *aa = a->ob_item[i];
|
|
10275
10273
|
PyObject *bb = b->ob_item[i];
|
|
10276
10274
|
|
|
@@ -10278,7 +10276,11 @@ static PyObject *COMPARE_LE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10278
10276
|
continue;
|
|
10279
10277
|
}
|
|
10280
10278
|
|
|
10279
|
+
Py_INCREF(aa);
|
|
10280
|
+
Py_INCREF(bb);
|
|
10281
10281
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10282
|
+
Py_DECREF(aa);
|
|
10283
|
+
Py_DECREF(bb);
|
|
10282
10284
|
|
|
10283
10285
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10284
10286
|
return NULL;
|
|
@@ -10291,11 +10293,11 @@ static PyObject *COMPARE_LE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10291
10293
|
}
|
|
10292
10294
|
|
|
10293
10295
|
if (found == false) {
|
|
10294
|
-
bool r =
|
|
10296
|
+
bool r = Py_SIZE(a) <= Py_SIZE(b);
|
|
10295
10297
|
|
|
10296
10298
|
// Convert to target type.
|
|
10297
10299
|
PyObject *result = BOOL_FROM(r);
|
|
10298
|
-
|
|
10300
|
+
Py_INCREF_IMMORTAL(result);
|
|
10299
10301
|
return result;
|
|
10300
10302
|
}
|
|
10301
10303
|
|
|
@@ -10335,7 +10337,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10335
10337
|
return result;
|
|
10336
10338
|
}
|
|
10337
10339
|
|
|
10338
|
-
|
|
10340
|
+
Py_DECREF_IMMORTAL(result);
|
|
10339
10341
|
}
|
|
10340
10342
|
|
|
10341
10343
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10376,7 +10378,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10376
10378
|
|
|
10377
10379
|
bool r = c != 0;
|
|
10378
10380
|
PyObject *result = BOOL_FROM(r);
|
|
10379
|
-
|
|
10381
|
+
Py_INCREF_IMMORTAL(result);
|
|
10380
10382
|
return result;
|
|
10381
10383
|
}
|
|
10382
10384
|
}
|
|
@@ -10396,11 +10398,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10396
10398
|
return result;
|
|
10397
10399
|
}
|
|
10398
10400
|
|
|
10399
|
-
|
|
10401
|
+
Py_DECREF_IMMORTAL(result);
|
|
10400
10402
|
}
|
|
10401
10403
|
}
|
|
10402
10404
|
|
|
10403
|
-
f =
|
|
10405
|
+
f = TP_RICHCOMPARE(type1);
|
|
10404
10406
|
if (f != NULL) {
|
|
10405
10407
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
10406
10408
|
|
|
@@ -10410,7 +10412,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10410
10412
|
return result;
|
|
10411
10413
|
}
|
|
10412
10414
|
|
|
10413
|
-
|
|
10415
|
+
Py_DECREF_IMMORTAL(result);
|
|
10414
10416
|
}
|
|
10415
10417
|
|
|
10416
10418
|
f = PyList_Type.tp_richcompare;
|
|
@@ -10423,7 +10425,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10423
10425
|
return result;
|
|
10424
10426
|
}
|
|
10425
10427
|
|
|
10426
|
-
|
|
10428
|
+
Py_DECREF_IMMORTAL(result);
|
|
10427
10429
|
}
|
|
10428
10430
|
|
|
10429
10431
|
int c;
|
|
@@ -10511,7 +10513,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10511
10513
|
|
|
10512
10514
|
bool r = c != 0;
|
|
10513
10515
|
PyObject *result = BOOL_FROM(r);
|
|
10514
|
-
|
|
10516
|
+
Py_INCREF_IMMORTAL(result);
|
|
10515
10517
|
return result;
|
|
10516
10518
|
#else
|
|
10517
10519
|
bool checked_reverse_op = false;
|
|
@@ -10531,11 +10533,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10531
10533
|
return result;
|
|
10532
10534
|
}
|
|
10533
10535
|
|
|
10534
|
-
|
|
10536
|
+
Py_DECREF_IMMORTAL(result);
|
|
10535
10537
|
}
|
|
10536
10538
|
}
|
|
10537
10539
|
|
|
10538
|
-
f =
|
|
10540
|
+
f = TP_RICHCOMPARE(type1);
|
|
10539
10541
|
|
|
10540
10542
|
if (f != NULL) {
|
|
10541
10543
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -10546,7 +10548,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10546
10548
|
return result;
|
|
10547
10549
|
}
|
|
10548
10550
|
|
|
10549
|
-
|
|
10551
|
+
Py_DECREF_IMMORTAL(result);
|
|
10550
10552
|
}
|
|
10551
10553
|
|
|
10552
10554
|
if (checked_reverse_op == false) {
|
|
@@ -10561,7 +10563,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10561
10563
|
return result;
|
|
10562
10564
|
}
|
|
10563
10565
|
|
|
10564
|
-
|
|
10566
|
+
Py_DECREF_IMMORTAL(result);
|
|
10565
10567
|
}
|
|
10566
10568
|
}
|
|
10567
10569
|
|
|
@@ -10573,13 +10575,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10573
10575
|
case Py_EQ: {
|
|
10574
10576
|
bool r = operand1 == operand2;
|
|
10575
10577
|
PyObject *result = BOOL_FROM(r);
|
|
10576
|
-
|
|
10578
|
+
Py_INCREF_IMMORTAL(result);
|
|
10577
10579
|
return result;
|
|
10578
10580
|
}
|
|
10579
10581
|
case Py_NE: {
|
|
10580
10582
|
bool r = operand1 != operand2;
|
|
10581
10583
|
PyObject *result = BOOL_FROM(r);
|
|
10582
|
-
|
|
10584
|
+
Py_INCREF_IMMORTAL(result);
|
|
10583
10585
|
return result;
|
|
10584
10586
|
}
|
|
10585
10587
|
default:
|
|
@@ -10627,7 +10629,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10627
10629
|
return result;
|
|
10628
10630
|
}
|
|
10629
10631
|
|
|
10630
|
-
|
|
10632
|
+
Py_DECREF_IMMORTAL(result);
|
|
10631
10633
|
}
|
|
10632
10634
|
|
|
10633
10635
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10668,7 +10670,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10668
10670
|
|
|
10669
10671
|
bool r = c != 0;
|
|
10670
10672
|
PyObject *result = BOOL_FROM(r);
|
|
10671
|
-
|
|
10673
|
+
Py_INCREF_IMMORTAL(result);
|
|
10672
10674
|
return result;
|
|
10673
10675
|
}
|
|
10674
10676
|
}
|
|
@@ -10677,7 +10679,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10677
10679
|
richcmpfunc f;
|
|
10678
10680
|
|
|
10679
10681
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10680
|
-
f =
|
|
10682
|
+
f = TP_RICHCOMPARE(type2);
|
|
10681
10683
|
|
|
10682
10684
|
if (f != NULL) {
|
|
10683
10685
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -10688,7 +10690,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10688
10690
|
return result;
|
|
10689
10691
|
}
|
|
10690
10692
|
|
|
10691
|
-
|
|
10693
|
+
Py_DECREF_IMMORTAL(result);
|
|
10692
10694
|
}
|
|
10693
10695
|
}
|
|
10694
10696
|
|
|
@@ -10702,10 +10704,10 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10702
10704
|
return result;
|
|
10703
10705
|
}
|
|
10704
10706
|
|
|
10705
|
-
|
|
10707
|
+
Py_DECREF_IMMORTAL(result);
|
|
10706
10708
|
}
|
|
10707
10709
|
|
|
10708
|
-
f =
|
|
10710
|
+
f = TP_RICHCOMPARE(type2);
|
|
10709
10711
|
if (f != NULL) {
|
|
10710
10712
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
10711
10713
|
|
|
@@ -10715,7 +10717,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10715
10717
|
return result;
|
|
10716
10718
|
}
|
|
10717
10719
|
|
|
10718
|
-
|
|
10720
|
+
Py_DECREF_IMMORTAL(result);
|
|
10719
10721
|
}
|
|
10720
10722
|
|
|
10721
10723
|
int c;
|
|
@@ -10803,14 +10805,14 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10803
10805
|
|
|
10804
10806
|
bool r = c != 0;
|
|
10805
10807
|
PyObject *result = BOOL_FROM(r);
|
|
10806
|
-
|
|
10808
|
+
Py_INCREF_IMMORTAL(result);
|
|
10807
10809
|
return result;
|
|
10808
10810
|
#else
|
|
10809
10811
|
bool checked_reverse_op = false;
|
|
10810
10812
|
richcmpfunc f;
|
|
10811
10813
|
|
|
10812
10814
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10813
|
-
f =
|
|
10815
|
+
f = TP_RICHCOMPARE(type2);
|
|
10814
10816
|
|
|
10815
10817
|
if (f != NULL) {
|
|
10816
10818
|
checked_reverse_op = true;
|
|
@@ -10823,7 +10825,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10823
10825
|
return result;
|
|
10824
10826
|
}
|
|
10825
10827
|
|
|
10826
|
-
|
|
10828
|
+
Py_DECREF_IMMORTAL(result);
|
|
10827
10829
|
}
|
|
10828
10830
|
}
|
|
10829
10831
|
|
|
@@ -10838,11 +10840,11 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10838
10840
|
return result;
|
|
10839
10841
|
}
|
|
10840
10842
|
|
|
10841
|
-
|
|
10843
|
+
Py_DECREF_IMMORTAL(result);
|
|
10842
10844
|
}
|
|
10843
10845
|
|
|
10844
10846
|
if (checked_reverse_op == false) {
|
|
10845
|
-
f =
|
|
10847
|
+
f = TP_RICHCOMPARE(type2);
|
|
10846
10848
|
|
|
10847
10849
|
if (f != NULL) {
|
|
10848
10850
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -10853,7 +10855,7 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10853
10855
|
return result;
|
|
10854
10856
|
}
|
|
10855
10857
|
|
|
10856
|
-
|
|
10858
|
+
Py_DECREF_IMMORTAL(result);
|
|
10857
10859
|
}
|
|
10858
10860
|
}
|
|
10859
10861
|
|
|
@@ -10865,13 +10867,13 @@ PyObject *RICH_COMPARE_LE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10865
10867
|
case Py_EQ: {
|
|
10866
10868
|
bool r = operand1 == operand2;
|
|
10867
10869
|
PyObject *result = BOOL_FROM(r);
|
|
10868
|
-
|
|
10870
|
+
Py_INCREF_IMMORTAL(result);
|
|
10869
10871
|
return result;
|
|
10870
10872
|
}
|
|
10871
10873
|
case Py_NE: {
|
|
10872
10874
|
bool r = operand1 != operand2;
|
|
10873
10875
|
PyObject *result = BOOL_FROM(r);
|
|
10874
|
-
|
|
10876
|
+
Py_INCREF_IMMORTAL(result);
|
|
10875
10877
|
return result;
|
|
10876
10878
|
}
|
|
10877
10879
|
default:
|
|
@@ -10900,14 +10902,11 @@ static nuitka_bool COMPARE_LE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10900
10902
|
PyListObject *a = (PyListObject *)operand1;
|
|
10901
10903
|
PyListObject *b = (PyListObject *)operand2;
|
|
10902
10904
|
|
|
10903
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10904
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10905
|
-
|
|
10906
10905
|
bool found = false;
|
|
10907
10906
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10908
10907
|
|
|
10909
10908
|
Py_ssize_t i;
|
|
10910
|
-
for (i = 0; i <
|
|
10909
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10911
10910
|
PyObject *aa = a->ob_item[i];
|
|
10912
10911
|
PyObject *bb = b->ob_item[i];
|
|
10913
10912
|
|
|
@@ -10915,7 +10914,11 @@ static nuitka_bool COMPARE_LE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10915
10914
|
continue;
|
|
10916
10915
|
}
|
|
10917
10916
|
|
|
10917
|
+
Py_INCREF(aa);
|
|
10918
|
+
Py_INCREF(bb);
|
|
10918
10919
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10920
|
+
Py_DECREF(aa);
|
|
10921
|
+
Py_DECREF(bb);
|
|
10919
10922
|
|
|
10920
10923
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10921
10924
|
return NUITKA_BOOL_EXCEPTION;
|
|
@@ -10928,7 +10931,7 @@ static nuitka_bool COMPARE_LE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10928
10931
|
}
|
|
10929
10932
|
|
|
10930
10933
|
if (found == false) {
|
|
10931
|
-
bool r =
|
|
10934
|
+
bool r = Py_SIZE(a) <= Py_SIZE(b);
|
|
10932
10935
|
|
|
10933
10936
|
// Convert to target type.
|
|
10934
10937
|
nuitka_bool result = r ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
|
@@ -10980,7 +10983,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10980
10983
|
}
|
|
10981
10984
|
}
|
|
10982
10985
|
|
|
10983
|
-
|
|
10986
|
+
Py_DECREF_IMMORTAL(result);
|
|
10984
10987
|
}
|
|
10985
10988
|
|
|
10986
10989
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11049,11 +11052,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11049
11052
|
}
|
|
11050
11053
|
}
|
|
11051
11054
|
|
|
11052
|
-
|
|
11055
|
+
Py_DECREF_IMMORTAL(result);
|
|
11053
11056
|
}
|
|
11054
11057
|
}
|
|
11055
11058
|
|
|
11056
|
-
f =
|
|
11059
|
+
f = TP_RICHCOMPARE(type1);
|
|
11057
11060
|
if (f != NULL) {
|
|
11058
11061
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
11059
11062
|
|
|
@@ -11071,7 +11074,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11071
11074
|
}
|
|
11072
11075
|
}
|
|
11073
11076
|
|
|
11074
|
-
|
|
11077
|
+
Py_DECREF_IMMORTAL(result);
|
|
11075
11078
|
}
|
|
11076
11079
|
|
|
11077
11080
|
f = PyList_Type.tp_richcompare;
|
|
@@ -11092,7 +11095,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11092
11095
|
}
|
|
11093
11096
|
}
|
|
11094
11097
|
|
|
11095
|
-
|
|
11098
|
+
Py_DECREF_IMMORTAL(result);
|
|
11096
11099
|
}
|
|
11097
11100
|
|
|
11098
11101
|
int c;
|
|
@@ -11208,11 +11211,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11208
11211
|
}
|
|
11209
11212
|
}
|
|
11210
11213
|
|
|
11211
|
-
|
|
11214
|
+
Py_DECREF_IMMORTAL(result);
|
|
11212
11215
|
}
|
|
11213
11216
|
}
|
|
11214
11217
|
|
|
11215
|
-
f =
|
|
11218
|
+
f = TP_RICHCOMPARE(type1);
|
|
11216
11219
|
|
|
11217
11220
|
if (f != NULL) {
|
|
11218
11221
|
PyObject *result = (*f)(operand1, operand2, Py_LE);
|
|
@@ -11231,7 +11234,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11231
11234
|
}
|
|
11232
11235
|
}
|
|
11233
11236
|
|
|
11234
|
-
|
|
11237
|
+
Py_DECREF_IMMORTAL(result);
|
|
11235
11238
|
}
|
|
11236
11239
|
|
|
11237
11240
|
if (checked_reverse_op == false) {
|
|
@@ -11254,7 +11257,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11254
11257
|
}
|
|
11255
11258
|
}
|
|
11256
11259
|
|
|
11257
|
-
|
|
11260
|
+
Py_DECREF_IMMORTAL(result);
|
|
11258
11261
|
}
|
|
11259
11262
|
}
|
|
11260
11263
|
|
|
@@ -11328,7 +11331,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11328
11331
|
}
|
|
11329
11332
|
}
|
|
11330
11333
|
|
|
11331
|
-
|
|
11334
|
+
Py_DECREF_IMMORTAL(result);
|
|
11332
11335
|
}
|
|
11333
11336
|
|
|
11334
11337
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11378,7 +11381,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11378
11381
|
richcmpfunc f;
|
|
11379
11382
|
|
|
11380
11383
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11381
|
-
f =
|
|
11384
|
+
f = TP_RICHCOMPARE(type2);
|
|
11382
11385
|
|
|
11383
11386
|
if (f != NULL) {
|
|
11384
11387
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -11397,7 +11400,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11397
11400
|
}
|
|
11398
11401
|
}
|
|
11399
11402
|
|
|
11400
|
-
|
|
11403
|
+
Py_DECREF_IMMORTAL(result);
|
|
11401
11404
|
}
|
|
11402
11405
|
}
|
|
11403
11406
|
|
|
@@ -11419,10 +11422,10 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11419
11422
|
}
|
|
11420
11423
|
}
|
|
11421
11424
|
|
|
11422
|
-
|
|
11425
|
+
Py_DECREF_IMMORTAL(result);
|
|
11423
11426
|
}
|
|
11424
11427
|
|
|
11425
|
-
f =
|
|
11428
|
+
f = TP_RICHCOMPARE(type2);
|
|
11426
11429
|
if (f != NULL) {
|
|
11427
11430
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
11428
11431
|
|
|
@@ -11440,7 +11443,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11440
11443
|
}
|
|
11441
11444
|
}
|
|
11442
11445
|
|
|
11443
|
-
|
|
11446
|
+
Py_DECREF_IMMORTAL(result);
|
|
11444
11447
|
}
|
|
11445
11448
|
|
|
11446
11449
|
int c;
|
|
@@ -11535,7 +11538,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11535
11538
|
richcmpfunc f;
|
|
11536
11539
|
|
|
11537
11540
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11538
|
-
f =
|
|
11541
|
+
f = TP_RICHCOMPARE(type2);
|
|
11539
11542
|
|
|
11540
11543
|
if (f != NULL) {
|
|
11541
11544
|
checked_reverse_op = true;
|
|
@@ -11556,7 +11559,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11556
11559
|
}
|
|
11557
11560
|
}
|
|
11558
11561
|
|
|
11559
|
-
|
|
11562
|
+
Py_DECREF_IMMORTAL(result);
|
|
11560
11563
|
}
|
|
11561
11564
|
}
|
|
11562
11565
|
|
|
@@ -11579,11 +11582,11 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11579
11582
|
}
|
|
11580
11583
|
}
|
|
11581
11584
|
|
|
11582
|
-
|
|
11585
|
+
Py_DECREF_IMMORTAL(result);
|
|
11583
11586
|
}
|
|
11584
11587
|
|
|
11585
11588
|
if (checked_reverse_op == false) {
|
|
11586
|
-
f =
|
|
11589
|
+
f = TP_RICHCOMPARE(type2);
|
|
11587
11590
|
|
|
11588
11591
|
if (f != NULL) {
|
|
11589
11592
|
PyObject *result = (*f)(operand2, operand1, Py_GE);
|
|
@@ -11602,7 +11605,7 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11602
11605
|
}
|
|
11603
11606
|
}
|
|
11604
11607
|
|
|
11605
|
-
|
|
11608
|
+
Py_DECREF_IMMORTAL(result);
|
|
11606
11609
|
}
|
|
11607
11610
|
}
|
|
11608
11611
|
|
|
@@ -11640,7 +11643,6 @@ nuitka_bool RICH_COMPARE_LE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *operan
|
|
|
11640
11643
|
return COMPARE_LE_NBOOL_LIST_LIST(operand1, operand2);
|
|
11641
11644
|
}
|
|
11642
11645
|
|
|
11643
|
-
#if PYTHON_VERSION < 0x300
|
|
11644
11646
|
static PyObject *COMPARE_LE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11645
11647
|
CHECK_OBJECT(operand1);
|
|
11646
11648
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11659,7 +11661,7 @@ static PyObject *COMPARE_LE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11659
11661
|
}
|
|
11660
11662
|
|
|
11661
11663
|
Py_ssize_t operand2_digit_count = 0;
|
|
11662
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11664
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11663
11665
|
{
|
|
11664
11666
|
unsigned long t = operand2_abs_ival;
|
|
11665
11667
|
|
|
@@ -11672,19 +11674,20 @@ static PyObject *COMPARE_LE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11672
11674
|
}
|
|
11673
11675
|
}
|
|
11674
11676
|
|
|
11675
|
-
Py_ssize_t operand2_size =
|
|
11677
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11678
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11676
11679
|
|
|
11677
11680
|
bool r;
|
|
11678
11681
|
|
|
11679
|
-
if (
|
|
11680
|
-
r =
|
|
11682
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11683
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size < 0;
|
|
11681
11684
|
} else {
|
|
11682
|
-
Py_ssize_t i =
|
|
11685
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11683
11686
|
r = true;
|
|
11684
11687
|
while (--i >= 0) {
|
|
11685
|
-
if (operand1_long_object
|
|
11686
|
-
r = operand1_long_object
|
|
11687
|
-
if (
|
|
11688
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11689
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] < operand2_digits[i];
|
|
11690
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11688
11691
|
r = !r;
|
|
11689
11692
|
}
|
|
11690
11693
|
break;
|
|
@@ -11694,9 +11697,10 @@ static PyObject *COMPARE_LE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11694
11697
|
|
|
11695
11698
|
// Convert to target type.
|
|
11696
11699
|
PyObject *result = BOOL_FROM(r);
|
|
11697
|
-
|
|
11700
|
+
Py_INCREF_IMMORTAL(result);
|
|
11698
11701
|
return result;
|
|
11699
11702
|
}
|
|
11703
|
+
#if PYTHON_VERSION < 0x300
|
|
11700
11704
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11701
11705
|
PyObject *RICH_COMPARE_LE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11702
11706
|
|
|
@@ -11704,7 +11708,6 @@ PyObject *RICH_COMPARE_LE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2
|
|
|
11704
11708
|
}
|
|
11705
11709
|
#endif
|
|
11706
11710
|
|
|
11707
|
-
#if PYTHON_VERSION < 0x300
|
|
11708
11711
|
static bool COMPARE_LE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11709
11712
|
CHECK_OBJECT(operand1);
|
|
11710
11713
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11723,7 +11726,7 @@ static bool COMPARE_LE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11723
11726
|
}
|
|
11724
11727
|
|
|
11725
11728
|
Py_ssize_t operand2_digit_count = 0;
|
|
11726
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11729
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11727
11730
|
{
|
|
11728
11731
|
unsigned long t = operand2_abs_ival;
|
|
11729
11732
|
|
|
@@ -11736,19 +11739,20 @@ static bool COMPARE_LE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11736
11739
|
}
|
|
11737
11740
|
}
|
|
11738
11741
|
|
|
11739
|
-
Py_ssize_t operand2_size =
|
|
11742
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11743
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11740
11744
|
|
|
11741
11745
|
bool r;
|
|
11742
11746
|
|
|
11743
|
-
if (
|
|
11744
|
-
r =
|
|
11747
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11748
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size < 0;
|
|
11745
11749
|
} else {
|
|
11746
|
-
Py_ssize_t i =
|
|
11750
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11747
11751
|
r = true;
|
|
11748
11752
|
while (--i >= 0) {
|
|
11749
|
-
if (operand1_long_object
|
|
11750
|
-
r = operand1_long_object
|
|
11751
|
-
if (
|
|
11753
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11754
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] < operand2_digits[i];
|
|
11755
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11752
11756
|
r = !r;
|
|
11753
11757
|
}
|
|
11754
11758
|
break;
|
|
@@ -11761,6 +11765,7 @@ static bool COMPARE_LE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11761
11765
|
|
|
11762
11766
|
return result;
|
|
11763
11767
|
}
|
|
11768
|
+
#if PYTHON_VERSION < 0x300
|
|
11764
11769
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11765
11770
|
bool RICH_COMPARE_LE_CBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11766
11771
|
|
|
@@ -11780,9 +11785,11 @@ static PyObject *COMPARE_LE_OBJECT_INT_CLONG(PyObject *operand1, long operand2)
|
|
|
11780
11785
|
|
|
11781
11786
|
// Convert to target type.
|
|
11782
11787
|
PyObject *result = BOOL_FROM(r);
|
|
11783
|
-
|
|
11788
|
+
Py_INCREF_IMMORTAL(result);
|
|
11784
11789
|
return result;
|
|
11785
11790
|
}
|
|
11791
|
+
#endif
|
|
11792
|
+
#if PYTHON_VERSION < 0x300
|
|
11786
11793
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11787
11794
|
PyObject *RICH_COMPARE_LE_OBJECT_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11788
11795
|
|
|
@@ -11805,6 +11812,8 @@ static bool COMPARE_LE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
|
11805
11812
|
|
|
11806
11813
|
return result;
|
|
11807
11814
|
}
|
|
11815
|
+
#endif
|
|
11816
|
+
#if PYTHON_VERSION < 0x300
|
|
11808
11817
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11809
11818
|
bool RICH_COMPARE_LE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11810
11819
|
|
|
@@ -11821,15 +11830,18 @@ static PyObject *COMPARE_LE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11821
11830
|
|
|
11822
11831
|
bool r;
|
|
11823
11832
|
|
|
11824
|
-
if (
|
|
11825
|
-
|
|
11833
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11834
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11835
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11836
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) <
|
|
11837
|
+
0;
|
|
11826
11838
|
} else {
|
|
11827
|
-
Py_ssize_t i =
|
|
11839
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11828
11840
|
r = true;
|
|
11829
11841
|
while (--i >= 0) {
|
|
11830
|
-
if (operand1_long_object
|
|
11831
|
-
r = operand1_long_object
|
|
11832
|
-
if (
|
|
11842
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11843
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] < (digit)Py_ABS(operand2);
|
|
11844
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11833
11845
|
r = !r;
|
|
11834
11846
|
}
|
|
11835
11847
|
break;
|
|
@@ -11839,7 +11851,7 @@ static PyObject *COMPARE_LE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11839
11851
|
|
|
11840
11852
|
// Convert to target type.
|
|
11841
11853
|
PyObject *result = BOOL_FROM(r);
|
|
11842
|
-
|
|
11854
|
+
Py_INCREF_IMMORTAL(result);
|
|
11843
11855
|
return result;
|
|
11844
11856
|
}
|
|
11845
11857
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "DIGIT" to C platform digit value for long
|
|
@@ -11858,15 +11870,18 @@ static bool COMPARE_LE_CBOOL_LONG_DIGIT(PyObject *operand1, long operand2) {
|
|
|
11858
11870
|
|
|
11859
11871
|
bool r;
|
|
11860
11872
|
|
|
11861
|
-
if (
|
|
11862
|
-
|
|
11873
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11874
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11875
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11876
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) <
|
|
11877
|
+
0;
|
|
11863
11878
|
} else {
|
|
11864
|
-
Py_ssize_t i =
|
|
11879
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11865
11880
|
r = true;
|
|
11866
11881
|
while (--i >= 0) {
|
|
11867
|
-
if (operand1_long_object
|
|
11868
|
-
r = operand1_long_object
|
|
11869
|
-
if (
|
|
11882
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11883
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] < (digit)Py_ABS(operand2);
|
|
11884
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11870
11885
|
r = !r;
|
|
11871
11886
|
}
|
|
11872
11887
|
break;
|
|
@@ -11897,7 +11912,7 @@ static PyObject *COMPARE_LE_OBJECT_FLOAT_CFLOAT(PyObject *operand1, double opera
|
|
|
11897
11912
|
|
|
11898
11913
|
// Convert to target type.
|
|
11899
11914
|
PyObject *result = BOOL_FROM(r);
|
|
11900
|
-
|
|
11915
|
+
Py_INCREF_IMMORTAL(result);
|
|
11901
11916
|
return result;
|
|
11902
11917
|
}
|
|
11903
11918
|
/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
|
|
@@ -11925,3 +11940,18 @@ bool RICH_COMPARE_LE_CBOOL_FLOAT_CFLOAT(PyObject *operand1, double operand2) {
|
|
|
11925
11940
|
|
|
11926
11941
|
return COMPARE_LE_CBOOL_FLOAT_CFLOAT(operand1, operand2);
|
|
11927
11942
|
}
|
|
11943
|
+
|
|
11944
|
+
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
11945
|
+
// integrates with CPython, but also works on its own.
|
|
11946
|
+
//
|
|
11947
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
11948
|
+
// you may not use this file except in compliance with the License.
|
|
11949
|
+
// You may obtain a copy of the License at
|
|
11950
|
+
//
|
|
11951
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11952
|
+
//
|
|
11953
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11954
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11955
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11956
|
+
// See the License for the specific language governing permissions and
|
|
11957
|
+
// limitations under the License.
|