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_GE_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_GE_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_GE_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_GE);
|
|
@@ -105,7 +90,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_LE);
|
|
@@ -166,11 +151,11 @@ PyObject *RICH_COMPARE_GE_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_GE);
|
|
176
161
|
|
|
@@ -180,10 +165,10 @@ PyObject *RICH_COMPARE_GE_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_LE);
|
|
189
174
|
|
|
@@ -193,7 +178,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE);
|
|
@@ -316,11 +301,11 @@ PyObject *RICH_COMPARE_GE_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_LE);
|
|
@@ -331,7 +316,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE);
|
|
@@ -417,7 +402,7 @@ nuitka_bool RICH_COMPARE_GE_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_GE_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_LE);
|
|
@@ -486,11 +471,11 @@ nuitka_bool RICH_COMPARE_GE_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_GE);
|
|
496
481
|
|
|
@@ -508,10 +493,10 @@ nuitka_bool RICH_COMPARE_GE_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_LE);
|
|
517
502
|
|
|
@@ -529,7 +514,7 @@ nuitka_bool RICH_COMPARE_GE_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_GE_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_GE_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_GE);
|
|
@@ -668,11 +653,11 @@ nuitka_bool RICH_COMPARE_GE_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_LE);
|
|
@@ -691,7 +676,7 @@ nuitka_bool RICH_COMPARE_GE_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_GE_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_GE_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_GE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
776
763
|
|
|
@@ -805,7 +792,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE);
|
|
876
863
|
|
|
@@ -880,7 +867,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE_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_GE);
|
|
@@ -1016,7 +1003,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE_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_GE_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_GE_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_LE);
|
|
@@ -1160,7 +1147,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_LE);
|
|
1183
1170
|
|
|
@@ -1187,7 +1174,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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_GE_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_GE_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_LE);
|
|
@@ -1325,7 +1312,7 @@ PyObject *RICH_COMPARE_GE_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_GE_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:
|
|
@@ -1405,6 +1392,8 @@ static bool COMPARE_GE_CBOOL_STR_STR(PyObject *operand1, PyObject *operand2) {
|
|
|
1405
1392
|
|
|
1406
1393
|
return result;
|
|
1407
1394
|
}
|
|
1395
|
+
#endif
|
|
1396
|
+
#if PYTHON_VERSION < 0x300
|
|
1408
1397
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
1409
1398
|
nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
1410
1399
|
|
|
@@ -1447,7 +1436,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1447
1436
|
}
|
|
1448
1437
|
}
|
|
1449
1438
|
|
|
1450
|
-
|
|
1439
|
+
Py_DECREF_IMMORTAL(result);
|
|
1451
1440
|
}
|
|
1452
1441
|
|
|
1453
1442
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1516,11 +1505,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1516
1505
|
}
|
|
1517
1506
|
}
|
|
1518
1507
|
|
|
1519
|
-
|
|
1508
|
+
Py_DECREF_IMMORTAL(result);
|
|
1520
1509
|
}
|
|
1521
1510
|
}
|
|
1522
1511
|
|
|
1523
|
-
f =
|
|
1512
|
+
f = TP_RICHCOMPARE(type1);
|
|
1524
1513
|
if (f != NULL) {
|
|
1525
1514
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
1526
1515
|
|
|
@@ -1538,7 +1527,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1538
1527
|
}
|
|
1539
1528
|
}
|
|
1540
1529
|
|
|
1541
|
-
|
|
1530
|
+
Py_DECREF_IMMORTAL(result);
|
|
1542
1531
|
}
|
|
1543
1532
|
|
|
1544
1533
|
f = PyString_Type.tp_richcompare;
|
|
@@ -1559,7 +1548,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1559
1548
|
}
|
|
1560
1549
|
}
|
|
1561
1550
|
|
|
1562
|
-
|
|
1551
|
+
Py_DECREF_IMMORTAL(result);
|
|
1563
1552
|
}
|
|
1564
1553
|
|
|
1565
1554
|
int c;
|
|
@@ -1675,11 +1664,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1675
1664
|
}
|
|
1676
1665
|
}
|
|
1677
1666
|
|
|
1678
|
-
|
|
1667
|
+
Py_DECREF_IMMORTAL(result);
|
|
1679
1668
|
}
|
|
1680
1669
|
}
|
|
1681
1670
|
|
|
1682
|
-
f =
|
|
1671
|
+
f = TP_RICHCOMPARE(type1);
|
|
1683
1672
|
|
|
1684
1673
|
if (f != NULL) {
|
|
1685
1674
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -1698,7 +1687,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1698
1687
|
}
|
|
1699
1688
|
}
|
|
1700
1689
|
|
|
1701
|
-
|
|
1690
|
+
Py_DECREF_IMMORTAL(result);
|
|
1702
1691
|
}
|
|
1703
1692
|
|
|
1704
1693
|
if (checked_reverse_op == false) {
|
|
@@ -1721,7 +1710,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1721
1710
|
}
|
|
1722
1711
|
}
|
|
1723
1712
|
|
|
1724
|
-
|
|
1713
|
+
Py_DECREF_IMMORTAL(result);
|
|
1725
1714
|
}
|
|
1726
1715
|
}
|
|
1727
1716
|
|
|
@@ -1797,7 +1786,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1797
1786
|
}
|
|
1798
1787
|
}
|
|
1799
1788
|
|
|
1800
|
-
|
|
1789
|
+
Py_DECREF_IMMORTAL(result);
|
|
1801
1790
|
}
|
|
1802
1791
|
|
|
1803
1792
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1847,7 +1836,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1847
1836
|
richcmpfunc f;
|
|
1848
1837
|
|
|
1849
1838
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1850
|
-
f =
|
|
1839
|
+
f = TP_RICHCOMPARE(type2);
|
|
1851
1840
|
|
|
1852
1841
|
if (f != NULL) {
|
|
1853
1842
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -1866,7 +1855,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1866
1855
|
}
|
|
1867
1856
|
}
|
|
1868
1857
|
|
|
1869
|
-
|
|
1858
|
+
Py_DECREF_IMMORTAL(result);
|
|
1870
1859
|
}
|
|
1871
1860
|
}
|
|
1872
1861
|
|
|
@@ -1888,10 +1877,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1888
1877
|
}
|
|
1889
1878
|
}
|
|
1890
1879
|
|
|
1891
|
-
|
|
1880
|
+
Py_DECREF_IMMORTAL(result);
|
|
1892
1881
|
}
|
|
1893
1882
|
|
|
1894
|
-
f =
|
|
1883
|
+
f = TP_RICHCOMPARE(type2);
|
|
1895
1884
|
if (f != NULL) {
|
|
1896
1885
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
1897
1886
|
|
|
@@ -1909,7 +1898,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1909
1898
|
}
|
|
1910
1899
|
}
|
|
1911
1900
|
|
|
1912
|
-
|
|
1901
|
+
Py_DECREF_IMMORTAL(result);
|
|
1913
1902
|
}
|
|
1914
1903
|
|
|
1915
1904
|
int c;
|
|
@@ -2004,7 +1993,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2004
1993
|
richcmpfunc f;
|
|
2005
1994
|
|
|
2006
1995
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
2007
|
-
f =
|
|
1996
|
+
f = TP_RICHCOMPARE(type2);
|
|
2008
1997
|
|
|
2009
1998
|
if (f != NULL) {
|
|
2010
1999
|
checked_reverse_op = true;
|
|
@@ -2025,7 +2014,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2025
2014
|
}
|
|
2026
2015
|
}
|
|
2027
2016
|
|
|
2028
|
-
|
|
2017
|
+
Py_DECREF_IMMORTAL(result);
|
|
2029
2018
|
}
|
|
2030
2019
|
}
|
|
2031
2020
|
|
|
@@ -2048,11 +2037,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2048
2037
|
}
|
|
2049
2038
|
}
|
|
2050
2039
|
|
|
2051
|
-
|
|
2040
|
+
Py_DECREF_IMMORTAL(result);
|
|
2052
2041
|
}
|
|
2053
2042
|
|
|
2054
2043
|
if (checked_reverse_op == false) {
|
|
2055
|
-
f =
|
|
2044
|
+
f = TP_RICHCOMPARE(type2);
|
|
2056
2045
|
|
|
2057
2046
|
if (f != NULL) {
|
|
2058
2047
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -2071,7 +2060,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2071
2060
|
}
|
|
2072
2061
|
}
|
|
2073
2062
|
|
|
2074
|
-
|
|
2063
|
+
Py_DECREF_IMMORTAL(result);
|
|
2075
2064
|
}
|
|
2076
2065
|
}
|
|
2077
2066
|
|
|
@@ -2119,7 +2108,7 @@ static PyObject *COMPARE_GE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2119
2108
|
|
|
2120
2109
|
// Convert to target type.
|
|
2121
2110
|
PyObject *result = BOOL_FROM(r);
|
|
2122
|
-
|
|
2111
|
+
Py_INCREF_IMMORTAL(result);
|
|
2123
2112
|
return result;
|
|
2124
2113
|
}
|
|
2125
2114
|
|
|
@@ -2162,7 +2151,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2162
2151
|
return result;
|
|
2163
2152
|
}
|
|
2164
2153
|
|
|
2165
|
-
|
|
2154
|
+
Py_DECREF_IMMORTAL(result);
|
|
2166
2155
|
}
|
|
2167
2156
|
|
|
2168
2157
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2203,7 +2192,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2203
2192
|
|
|
2204
2193
|
bool r = c != 0;
|
|
2205
2194
|
PyObject *result = BOOL_FROM(r);
|
|
2206
|
-
|
|
2195
|
+
Py_INCREF_IMMORTAL(result);
|
|
2207
2196
|
return result;
|
|
2208
2197
|
}
|
|
2209
2198
|
}
|
|
@@ -2223,11 +2212,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2223
2212
|
return result;
|
|
2224
2213
|
}
|
|
2225
2214
|
|
|
2226
|
-
|
|
2215
|
+
Py_DECREF_IMMORTAL(result);
|
|
2227
2216
|
}
|
|
2228
2217
|
}
|
|
2229
2218
|
|
|
2230
|
-
f =
|
|
2219
|
+
f = TP_RICHCOMPARE(type1);
|
|
2231
2220
|
if (f != NULL) {
|
|
2232
2221
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
2233
2222
|
|
|
@@ -2237,7 +2226,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2237
2226
|
return result;
|
|
2238
2227
|
}
|
|
2239
2228
|
|
|
2240
|
-
|
|
2229
|
+
Py_DECREF_IMMORTAL(result);
|
|
2241
2230
|
}
|
|
2242
2231
|
|
|
2243
2232
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2250,7 +2239,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2250
2239
|
return result;
|
|
2251
2240
|
}
|
|
2252
2241
|
|
|
2253
|
-
|
|
2242
|
+
Py_DECREF_IMMORTAL(result);
|
|
2254
2243
|
}
|
|
2255
2244
|
|
|
2256
2245
|
int c;
|
|
@@ -2338,7 +2327,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2338
2327
|
|
|
2339
2328
|
bool r = c != 0;
|
|
2340
2329
|
PyObject *result = BOOL_FROM(r);
|
|
2341
|
-
|
|
2330
|
+
Py_INCREF_IMMORTAL(result);
|
|
2342
2331
|
return result;
|
|
2343
2332
|
#else
|
|
2344
2333
|
bool checked_reverse_op = false;
|
|
@@ -2358,11 +2347,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2358
2347
|
return result;
|
|
2359
2348
|
}
|
|
2360
2349
|
|
|
2361
|
-
|
|
2350
|
+
Py_DECREF_IMMORTAL(result);
|
|
2362
2351
|
}
|
|
2363
2352
|
}
|
|
2364
2353
|
|
|
2365
|
-
f =
|
|
2354
|
+
f = TP_RICHCOMPARE(type1);
|
|
2366
2355
|
|
|
2367
2356
|
if (f != NULL) {
|
|
2368
2357
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -2373,7 +2362,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2373
2362
|
return result;
|
|
2374
2363
|
}
|
|
2375
2364
|
|
|
2376
|
-
|
|
2365
|
+
Py_DECREF_IMMORTAL(result);
|
|
2377
2366
|
}
|
|
2378
2367
|
|
|
2379
2368
|
if (checked_reverse_op == false) {
|
|
@@ -2388,7 +2377,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2388
2377
|
return result;
|
|
2389
2378
|
}
|
|
2390
2379
|
|
|
2391
|
-
|
|
2380
|
+
Py_DECREF_IMMORTAL(result);
|
|
2392
2381
|
}
|
|
2393
2382
|
}
|
|
2394
2383
|
|
|
@@ -2400,13 +2389,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2400
2389
|
case Py_EQ: {
|
|
2401
2390
|
bool r = operand1 == operand2;
|
|
2402
2391
|
PyObject *result = BOOL_FROM(r);
|
|
2403
|
-
|
|
2392
|
+
Py_INCREF_IMMORTAL(result);
|
|
2404
2393
|
return result;
|
|
2405
2394
|
}
|
|
2406
2395
|
case Py_NE: {
|
|
2407
2396
|
bool r = operand1 != operand2;
|
|
2408
2397
|
PyObject *result = BOOL_FROM(r);
|
|
2409
|
-
|
|
2398
|
+
Py_INCREF_IMMORTAL(result);
|
|
2410
2399
|
return result;
|
|
2411
2400
|
}
|
|
2412
2401
|
default:
|
|
@@ -2456,7 +2445,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2456
2445
|
return result;
|
|
2457
2446
|
}
|
|
2458
2447
|
|
|
2459
|
-
|
|
2448
|
+
Py_DECREF_IMMORTAL(result);
|
|
2460
2449
|
}
|
|
2461
2450
|
|
|
2462
2451
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2497,7 +2486,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2497
2486
|
|
|
2498
2487
|
bool r = c != 0;
|
|
2499
2488
|
PyObject *result = BOOL_FROM(r);
|
|
2500
|
-
|
|
2489
|
+
Py_INCREF_IMMORTAL(result);
|
|
2501
2490
|
return result;
|
|
2502
2491
|
}
|
|
2503
2492
|
}
|
|
@@ -2506,7 +2495,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2506
2495
|
richcmpfunc f;
|
|
2507
2496
|
|
|
2508
2497
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2509
|
-
f =
|
|
2498
|
+
f = TP_RICHCOMPARE(type2);
|
|
2510
2499
|
|
|
2511
2500
|
if (f != NULL) {
|
|
2512
2501
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -2517,7 +2506,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2517
2506
|
return result;
|
|
2518
2507
|
}
|
|
2519
2508
|
|
|
2520
|
-
|
|
2509
|
+
Py_DECREF_IMMORTAL(result);
|
|
2521
2510
|
}
|
|
2522
2511
|
}
|
|
2523
2512
|
|
|
@@ -2531,10 +2520,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2531
2520
|
return result;
|
|
2532
2521
|
}
|
|
2533
2522
|
|
|
2534
|
-
|
|
2523
|
+
Py_DECREF_IMMORTAL(result);
|
|
2535
2524
|
}
|
|
2536
2525
|
|
|
2537
|
-
f =
|
|
2526
|
+
f = TP_RICHCOMPARE(type2);
|
|
2538
2527
|
if (f != NULL) {
|
|
2539
2528
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
2540
2529
|
|
|
@@ -2544,7 +2533,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2544
2533
|
return result;
|
|
2545
2534
|
}
|
|
2546
2535
|
|
|
2547
|
-
|
|
2536
|
+
Py_DECREF_IMMORTAL(result);
|
|
2548
2537
|
}
|
|
2549
2538
|
|
|
2550
2539
|
int c;
|
|
@@ -2632,14 +2621,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2632
2621
|
|
|
2633
2622
|
bool r = c != 0;
|
|
2634
2623
|
PyObject *result = BOOL_FROM(r);
|
|
2635
|
-
|
|
2624
|
+
Py_INCREF_IMMORTAL(result);
|
|
2636
2625
|
return result;
|
|
2637
2626
|
#else
|
|
2638
2627
|
bool checked_reverse_op = false;
|
|
2639
2628
|
richcmpfunc f;
|
|
2640
2629
|
|
|
2641
2630
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2642
|
-
f =
|
|
2631
|
+
f = TP_RICHCOMPARE(type2);
|
|
2643
2632
|
|
|
2644
2633
|
if (f != NULL) {
|
|
2645
2634
|
checked_reverse_op = true;
|
|
@@ -2652,7 +2641,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2652
2641
|
return result;
|
|
2653
2642
|
}
|
|
2654
2643
|
|
|
2655
|
-
|
|
2644
|
+
Py_DECREF_IMMORTAL(result);
|
|
2656
2645
|
}
|
|
2657
2646
|
}
|
|
2658
2647
|
|
|
@@ -2667,11 +2656,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2667
2656
|
return result;
|
|
2668
2657
|
}
|
|
2669
2658
|
|
|
2670
|
-
|
|
2659
|
+
Py_DECREF_IMMORTAL(result);
|
|
2671
2660
|
}
|
|
2672
2661
|
|
|
2673
2662
|
if (checked_reverse_op == false) {
|
|
2674
|
-
f =
|
|
2663
|
+
f = TP_RICHCOMPARE(type2);
|
|
2675
2664
|
|
|
2676
2665
|
if (f != NULL) {
|
|
2677
2666
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -2682,7 +2671,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2682
2671
|
return result;
|
|
2683
2672
|
}
|
|
2684
2673
|
|
|
2685
|
-
|
|
2674
|
+
Py_DECREF_IMMORTAL(result);
|
|
2686
2675
|
}
|
|
2687
2676
|
}
|
|
2688
2677
|
|
|
@@ -2694,13 +2683,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2694
2683
|
case Py_EQ: {
|
|
2695
2684
|
bool r = operand1 == operand2;
|
|
2696
2685
|
PyObject *result = BOOL_FROM(r);
|
|
2697
|
-
|
|
2686
|
+
Py_INCREF_IMMORTAL(result);
|
|
2698
2687
|
return result;
|
|
2699
2688
|
}
|
|
2700
2689
|
case Py_NE: {
|
|
2701
2690
|
bool r = operand1 != operand2;
|
|
2702
2691
|
PyObject *result = BOOL_FROM(r);
|
|
2703
|
-
|
|
2692
|
+
Py_INCREF_IMMORTAL(result);
|
|
2704
2693
|
return result;
|
|
2705
2694
|
}
|
|
2706
2695
|
default:
|
|
@@ -2740,7 +2729,7 @@ static bool COMPARE_GE_CBOOL_UNICODE_UNICODE(PyObject *operand1, PyObject *opera
|
|
|
2740
2729
|
|
|
2741
2730
|
// Convert to target type if necessary
|
|
2742
2731
|
bool result = r == Py_True;
|
|
2743
|
-
|
|
2732
|
+
Py_DECREF_IMMORTAL(r);
|
|
2744
2733
|
|
|
2745
2734
|
return result;
|
|
2746
2735
|
}
|
|
@@ -2786,7 +2775,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2786
2775
|
}
|
|
2787
2776
|
}
|
|
2788
2777
|
|
|
2789
|
-
|
|
2778
|
+
Py_DECREF_IMMORTAL(result);
|
|
2790
2779
|
}
|
|
2791
2780
|
|
|
2792
2781
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2855,11 +2844,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2855
2844
|
}
|
|
2856
2845
|
}
|
|
2857
2846
|
|
|
2858
|
-
|
|
2847
|
+
Py_DECREF_IMMORTAL(result);
|
|
2859
2848
|
}
|
|
2860
2849
|
}
|
|
2861
2850
|
|
|
2862
|
-
f =
|
|
2851
|
+
f = TP_RICHCOMPARE(type1);
|
|
2863
2852
|
if (f != NULL) {
|
|
2864
2853
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
2865
2854
|
|
|
@@ -2877,7 +2866,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2877
2866
|
}
|
|
2878
2867
|
}
|
|
2879
2868
|
|
|
2880
|
-
|
|
2869
|
+
Py_DECREF_IMMORTAL(result);
|
|
2881
2870
|
}
|
|
2882
2871
|
|
|
2883
2872
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2898,7 +2887,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2898
2887
|
}
|
|
2899
2888
|
}
|
|
2900
2889
|
|
|
2901
|
-
|
|
2890
|
+
Py_DECREF_IMMORTAL(result);
|
|
2902
2891
|
}
|
|
2903
2892
|
|
|
2904
2893
|
int c;
|
|
@@ -3014,11 +3003,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3014
3003
|
}
|
|
3015
3004
|
}
|
|
3016
3005
|
|
|
3017
|
-
|
|
3006
|
+
Py_DECREF_IMMORTAL(result);
|
|
3018
3007
|
}
|
|
3019
3008
|
}
|
|
3020
3009
|
|
|
3021
|
-
f =
|
|
3010
|
+
f = TP_RICHCOMPARE(type1);
|
|
3022
3011
|
|
|
3023
3012
|
if (f != NULL) {
|
|
3024
3013
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -3037,7 +3026,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3037
3026
|
}
|
|
3038
3027
|
}
|
|
3039
3028
|
|
|
3040
|
-
|
|
3029
|
+
Py_DECREF_IMMORTAL(result);
|
|
3041
3030
|
}
|
|
3042
3031
|
|
|
3043
3032
|
if (checked_reverse_op == false) {
|
|
@@ -3060,7 +3049,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3060
3049
|
}
|
|
3061
3050
|
}
|
|
3062
3051
|
|
|
3063
|
-
|
|
3052
|
+
Py_DECREF_IMMORTAL(result);
|
|
3064
3053
|
}
|
|
3065
3054
|
}
|
|
3066
3055
|
|
|
@@ -3136,7 +3125,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3136
3125
|
}
|
|
3137
3126
|
}
|
|
3138
3127
|
|
|
3139
|
-
|
|
3128
|
+
Py_DECREF_IMMORTAL(result);
|
|
3140
3129
|
}
|
|
3141
3130
|
|
|
3142
3131
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3186,7 +3175,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3186
3175
|
richcmpfunc f;
|
|
3187
3176
|
|
|
3188
3177
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3189
|
-
f =
|
|
3178
|
+
f = TP_RICHCOMPARE(type2);
|
|
3190
3179
|
|
|
3191
3180
|
if (f != NULL) {
|
|
3192
3181
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -3205,7 +3194,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3205
3194
|
}
|
|
3206
3195
|
}
|
|
3207
3196
|
|
|
3208
|
-
|
|
3197
|
+
Py_DECREF_IMMORTAL(result);
|
|
3209
3198
|
}
|
|
3210
3199
|
}
|
|
3211
3200
|
|
|
@@ -3227,10 +3216,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3227
3216
|
}
|
|
3228
3217
|
}
|
|
3229
3218
|
|
|
3230
|
-
|
|
3219
|
+
Py_DECREF_IMMORTAL(result);
|
|
3231
3220
|
}
|
|
3232
3221
|
|
|
3233
|
-
f =
|
|
3222
|
+
f = TP_RICHCOMPARE(type2);
|
|
3234
3223
|
if (f != NULL) {
|
|
3235
3224
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
3236
3225
|
|
|
@@ -3248,7 +3237,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3248
3237
|
}
|
|
3249
3238
|
}
|
|
3250
3239
|
|
|
3251
|
-
|
|
3240
|
+
Py_DECREF_IMMORTAL(result);
|
|
3252
3241
|
}
|
|
3253
3242
|
|
|
3254
3243
|
int c;
|
|
@@ -3343,7 +3332,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3343
3332
|
richcmpfunc f;
|
|
3344
3333
|
|
|
3345
3334
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3346
|
-
f =
|
|
3335
|
+
f = TP_RICHCOMPARE(type2);
|
|
3347
3336
|
|
|
3348
3337
|
if (f != NULL) {
|
|
3349
3338
|
checked_reverse_op = true;
|
|
@@ -3364,7 +3353,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3364
3353
|
}
|
|
3365
3354
|
}
|
|
3366
3355
|
|
|
3367
|
-
|
|
3356
|
+
Py_DECREF_IMMORTAL(result);
|
|
3368
3357
|
}
|
|
3369
3358
|
}
|
|
3370
3359
|
|
|
@@ -3387,11 +3376,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3387
3376
|
}
|
|
3388
3377
|
}
|
|
3389
3378
|
|
|
3390
|
-
|
|
3379
|
+
Py_DECREF_IMMORTAL(result);
|
|
3391
3380
|
}
|
|
3392
3381
|
|
|
3393
3382
|
if (checked_reverse_op == false) {
|
|
3394
|
-
f =
|
|
3383
|
+
f = TP_RICHCOMPARE(type2);
|
|
3395
3384
|
|
|
3396
3385
|
if (f != NULL) {
|
|
3397
3386
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -3410,7 +3399,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3410
3399
|
}
|
|
3411
3400
|
}
|
|
3412
3401
|
|
|
3413
|
-
|
|
3402
|
+
Py_DECREF_IMMORTAL(result);
|
|
3414
3403
|
}
|
|
3415
3404
|
}
|
|
3416
3405
|
|
|
@@ -3460,7 +3449,7 @@ static PyObject *COMPARE_GE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3460
3449
|
|
|
3461
3450
|
// Convert to target type.
|
|
3462
3451
|
PyObject *result = BOOL_FROM(r);
|
|
3463
|
-
|
|
3452
|
+
Py_INCREF_IMMORTAL(result);
|
|
3464
3453
|
return result;
|
|
3465
3454
|
}
|
|
3466
3455
|
|
|
@@ -3488,9 +3477,11 @@ static PyObject *COMPARE_GE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3488
3477
|
|
|
3489
3478
|
// Convert to target type.
|
|
3490
3479
|
PyObject *result = BOOL_FROM(c != 0);
|
|
3491
|
-
|
|
3480
|
+
Py_INCREF_IMMORTAL(result);
|
|
3492
3481
|
return result;
|
|
3493
3482
|
}
|
|
3483
|
+
#endif
|
|
3484
|
+
#if PYTHON_VERSION >= 0x300
|
|
3494
3485
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
3495
3486
|
PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
3496
3487
|
|
|
@@ -3525,7 +3516,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3525
3516
|
return result;
|
|
3526
3517
|
}
|
|
3527
3518
|
|
|
3528
|
-
|
|
3519
|
+
Py_DECREF_IMMORTAL(result);
|
|
3529
3520
|
}
|
|
3530
3521
|
|
|
3531
3522
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3566,7 +3557,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3566
3557
|
|
|
3567
3558
|
bool r = c != 0;
|
|
3568
3559
|
PyObject *result = BOOL_FROM(r);
|
|
3569
|
-
|
|
3560
|
+
Py_INCREF_IMMORTAL(result);
|
|
3570
3561
|
return result;
|
|
3571
3562
|
}
|
|
3572
3563
|
}
|
|
@@ -3586,11 +3577,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3586
3577
|
return result;
|
|
3587
3578
|
}
|
|
3588
3579
|
|
|
3589
|
-
|
|
3580
|
+
Py_DECREF_IMMORTAL(result);
|
|
3590
3581
|
}
|
|
3591
3582
|
}
|
|
3592
3583
|
|
|
3593
|
-
f =
|
|
3584
|
+
f = TP_RICHCOMPARE(type1);
|
|
3594
3585
|
if (f != NULL) {
|
|
3595
3586
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
3596
3587
|
|
|
@@ -3600,7 +3591,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3600
3591
|
return result;
|
|
3601
3592
|
}
|
|
3602
3593
|
|
|
3603
|
-
|
|
3594
|
+
Py_DECREF_IMMORTAL(result);
|
|
3604
3595
|
}
|
|
3605
3596
|
|
|
3606
3597
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -3613,7 +3604,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3613
3604
|
return result;
|
|
3614
3605
|
}
|
|
3615
3606
|
|
|
3616
|
-
|
|
3607
|
+
Py_DECREF_IMMORTAL(result);
|
|
3617
3608
|
}
|
|
3618
3609
|
|
|
3619
3610
|
int c;
|
|
@@ -3701,7 +3692,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3701
3692
|
|
|
3702
3693
|
bool r = c != 0;
|
|
3703
3694
|
PyObject *result = BOOL_FROM(r);
|
|
3704
|
-
|
|
3695
|
+
Py_INCREF_IMMORTAL(result);
|
|
3705
3696
|
return result;
|
|
3706
3697
|
#else
|
|
3707
3698
|
bool checked_reverse_op = false;
|
|
@@ -3721,11 +3712,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3721
3712
|
return result;
|
|
3722
3713
|
}
|
|
3723
3714
|
|
|
3724
|
-
|
|
3715
|
+
Py_DECREF_IMMORTAL(result);
|
|
3725
3716
|
}
|
|
3726
3717
|
}
|
|
3727
3718
|
|
|
3728
|
-
f =
|
|
3719
|
+
f = TP_RICHCOMPARE(type1);
|
|
3729
3720
|
|
|
3730
3721
|
if (f != NULL) {
|
|
3731
3722
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -3736,7 +3727,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3736
3727
|
return result;
|
|
3737
3728
|
}
|
|
3738
3729
|
|
|
3739
|
-
|
|
3730
|
+
Py_DECREF_IMMORTAL(result);
|
|
3740
3731
|
}
|
|
3741
3732
|
|
|
3742
3733
|
if (checked_reverse_op == false) {
|
|
@@ -3751,7 +3742,7 @@ PyObject *RICH_COMPARE_GE_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
|
|
|
@@ -3763,13 +3754,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3763
3754
|
case Py_EQ: {
|
|
3764
3755
|
bool r = operand1 == operand2;
|
|
3765
3756
|
PyObject *result = BOOL_FROM(r);
|
|
3766
|
-
|
|
3757
|
+
Py_INCREF_IMMORTAL(result);
|
|
3767
3758
|
return result;
|
|
3768
3759
|
}
|
|
3769
3760
|
case Py_NE: {
|
|
3770
3761
|
bool r = operand1 != operand2;
|
|
3771
3762
|
PyObject *result = BOOL_FROM(r);
|
|
3772
|
-
|
|
3763
|
+
Py_INCREF_IMMORTAL(result);
|
|
3773
3764
|
return result;
|
|
3774
3765
|
}
|
|
3775
3766
|
default:
|
|
@@ -3819,7 +3810,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3819
3810
|
return result;
|
|
3820
3811
|
}
|
|
3821
3812
|
|
|
3822
|
-
|
|
3813
|
+
Py_DECREF_IMMORTAL(result);
|
|
3823
3814
|
}
|
|
3824
3815
|
|
|
3825
3816
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3860,7 +3851,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3860
3851
|
|
|
3861
3852
|
bool r = c != 0;
|
|
3862
3853
|
PyObject *result = BOOL_FROM(r);
|
|
3863
|
-
|
|
3854
|
+
Py_INCREF_IMMORTAL(result);
|
|
3864
3855
|
return result;
|
|
3865
3856
|
}
|
|
3866
3857
|
}
|
|
@@ -3869,7 +3860,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3869
3860
|
richcmpfunc f;
|
|
3870
3861
|
|
|
3871
3862
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
3872
|
-
f =
|
|
3863
|
+
f = TP_RICHCOMPARE(type2);
|
|
3873
3864
|
|
|
3874
3865
|
if (f != NULL) {
|
|
3875
3866
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -3880,7 +3871,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3880
3871
|
return result;
|
|
3881
3872
|
}
|
|
3882
3873
|
|
|
3883
|
-
|
|
3874
|
+
Py_DECREF_IMMORTAL(result);
|
|
3884
3875
|
}
|
|
3885
3876
|
}
|
|
3886
3877
|
|
|
@@ -3894,10 +3885,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3894
3885
|
return result;
|
|
3895
3886
|
}
|
|
3896
3887
|
|
|
3897
|
-
|
|
3888
|
+
Py_DECREF_IMMORTAL(result);
|
|
3898
3889
|
}
|
|
3899
3890
|
|
|
3900
|
-
f =
|
|
3891
|
+
f = TP_RICHCOMPARE(type2);
|
|
3901
3892
|
if (f != NULL) {
|
|
3902
3893
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
3903
3894
|
|
|
@@ -3907,7 +3898,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3907
3898
|
return result;
|
|
3908
3899
|
}
|
|
3909
3900
|
|
|
3910
|
-
|
|
3901
|
+
Py_DECREF_IMMORTAL(result);
|
|
3911
3902
|
}
|
|
3912
3903
|
|
|
3913
3904
|
int c;
|
|
@@ -3995,14 +3986,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3995
3986
|
|
|
3996
3987
|
bool r = c != 0;
|
|
3997
3988
|
PyObject *result = BOOL_FROM(r);
|
|
3998
|
-
|
|
3989
|
+
Py_INCREF_IMMORTAL(result);
|
|
3999
3990
|
return result;
|
|
4000
3991
|
#else
|
|
4001
3992
|
bool checked_reverse_op = false;
|
|
4002
3993
|
richcmpfunc f;
|
|
4003
3994
|
|
|
4004
3995
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4005
|
-
f =
|
|
3996
|
+
f = TP_RICHCOMPARE(type2);
|
|
4006
3997
|
|
|
4007
3998
|
if (f != NULL) {
|
|
4008
3999
|
checked_reverse_op = true;
|
|
@@ -4015,7 +4006,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4015
4006
|
return result;
|
|
4016
4007
|
}
|
|
4017
4008
|
|
|
4018
|
-
|
|
4009
|
+
Py_DECREF_IMMORTAL(result);
|
|
4019
4010
|
}
|
|
4020
4011
|
}
|
|
4021
4012
|
|
|
@@ -4030,11 +4021,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4030
4021
|
return result;
|
|
4031
4022
|
}
|
|
4032
4023
|
|
|
4033
|
-
|
|
4024
|
+
Py_DECREF_IMMORTAL(result);
|
|
4034
4025
|
}
|
|
4035
4026
|
|
|
4036
4027
|
if (checked_reverse_op == false) {
|
|
4037
|
-
f =
|
|
4028
|
+
f = TP_RICHCOMPARE(type2);
|
|
4038
4029
|
|
|
4039
4030
|
if (f != NULL) {
|
|
4040
4031
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -4045,7 +4036,7 @@ PyObject *RICH_COMPARE_GE_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
|
|
|
@@ -4057,13 +4048,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4057
4048
|
case Py_EQ: {
|
|
4058
4049
|
bool r = operand1 == operand2;
|
|
4059
4050
|
PyObject *result = BOOL_FROM(r);
|
|
4060
|
-
|
|
4051
|
+
Py_INCREF_IMMORTAL(result);
|
|
4061
4052
|
return result;
|
|
4062
4053
|
}
|
|
4063
4054
|
case Py_NE: {
|
|
4064
4055
|
bool r = operand1 != operand2;
|
|
4065
4056
|
PyObject *result = BOOL_FROM(r);
|
|
4066
|
-
|
|
4057
|
+
Py_INCREF_IMMORTAL(result);
|
|
4067
4058
|
return result;
|
|
4068
4059
|
}
|
|
4069
4060
|
default:
|
|
@@ -4125,6 +4116,8 @@ static bool COMPARE_GE_CBOOL_BYTES_BYTES(PyObject *operand1, PyObject *operand2)
|
|
|
4125
4116
|
|
|
4126
4117
|
return result;
|
|
4127
4118
|
}
|
|
4119
|
+
#endif
|
|
4120
|
+
#if PYTHON_VERSION >= 0x300
|
|
4128
4121
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
4129
4122
|
nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
4130
4123
|
|
|
@@ -4167,7 +4160,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4167
4160
|
}
|
|
4168
4161
|
}
|
|
4169
4162
|
|
|
4170
|
-
|
|
4163
|
+
Py_DECREF_IMMORTAL(result);
|
|
4171
4164
|
}
|
|
4172
4165
|
|
|
4173
4166
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4236,11 +4229,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4236
4229
|
}
|
|
4237
4230
|
}
|
|
4238
4231
|
|
|
4239
|
-
|
|
4232
|
+
Py_DECREF_IMMORTAL(result);
|
|
4240
4233
|
}
|
|
4241
4234
|
}
|
|
4242
4235
|
|
|
4243
|
-
f =
|
|
4236
|
+
f = TP_RICHCOMPARE(type1);
|
|
4244
4237
|
if (f != NULL) {
|
|
4245
4238
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
4246
4239
|
|
|
@@ -4258,7 +4251,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4258
4251
|
}
|
|
4259
4252
|
}
|
|
4260
4253
|
|
|
4261
|
-
|
|
4254
|
+
Py_DECREF_IMMORTAL(result);
|
|
4262
4255
|
}
|
|
4263
4256
|
|
|
4264
4257
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -4279,7 +4272,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4279
4272
|
}
|
|
4280
4273
|
}
|
|
4281
4274
|
|
|
4282
|
-
|
|
4275
|
+
Py_DECREF_IMMORTAL(result);
|
|
4283
4276
|
}
|
|
4284
4277
|
|
|
4285
4278
|
int c;
|
|
@@ -4395,11 +4388,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4395
4388
|
}
|
|
4396
4389
|
}
|
|
4397
4390
|
|
|
4398
|
-
|
|
4391
|
+
Py_DECREF_IMMORTAL(result);
|
|
4399
4392
|
}
|
|
4400
4393
|
}
|
|
4401
4394
|
|
|
4402
|
-
f =
|
|
4395
|
+
f = TP_RICHCOMPARE(type1);
|
|
4403
4396
|
|
|
4404
4397
|
if (f != NULL) {
|
|
4405
4398
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -4418,7 +4411,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4418
4411
|
}
|
|
4419
4412
|
}
|
|
4420
4413
|
|
|
4421
|
-
|
|
4414
|
+
Py_DECREF_IMMORTAL(result);
|
|
4422
4415
|
}
|
|
4423
4416
|
|
|
4424
4417
|
if (checked_reverse_op == false) {
|
|
@@ -4441,7 +4434,7 @@ nuitka_bool RICH_COMPARE_GE_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
|
|
|
@@ -4517,7 +4510,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4517
4510
|
}
|
|
4518
4511
|
}
|
|
4519
4512
|
|
|
4520
|
-
|
|
4513
|
+
Py_DECREF_IMMORTAL(result);
|
|
4521
4514
|
}
|
|
4522
4515
|
|
|
4523
4516
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4567,7 +4560,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4567
4560
|
richcmpfunc f;
|
|
4568
4561
|
|
|
4569
4562
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4570
|
-
f =
|
|
4563
|
+
f = TP_RICHCOMPARE(type2);
|
|
4571
4564
|
|
|
4572
4565
|
if (f != NULL) {
|
|
4573
4566
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -4586,7 +4579,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4586
4579
|
}
|
|
4587
4580
|
}
|
|
4588
4581
|
|
|
4589
|
-
|
|
4582
|
+
Py_DECREF_IMMORTAL(result);
|
|
4590
4583
|
}
|
|
4591
4584
|
}
|
|
4592
4585
|
|
|
@@ -4608,10 +4601,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4608
4601
|
}
|
|
4609
4602
|
}
|
|
4610
4603
|
|
|
4611
|
-
|
|
4604
|
+
Py_DECREF_IMMORTAL(result);
|
|
4612
4605
|
}
|
|
4613
4606
|
|
|
4614
|
-
f =
|
|
4607
|
+
f = TP_RICHCOMPARE(type2);
|
|
4615
4608
|
if (f != NULL) {
|
|
4616
4609
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
4617
4610
|
|
|
@@ -4629,7 +4622,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4629
4622
|
}
|
|
4630
4623
|
}
|
|
4631
4624
|
|
|
4632
|
-
|
|
4625
|
+
Py_DECREF_IMMORTAL(result);
|
|
4633
4626
|
}
|
|
4634
4627
|
|
|
4635
4628
|
int c;
|
|
@@ -4724,7 +4717,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4724
4717
|
richcmpfunc f;
|
|
4725
4718
|
|
|
4726
4719
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4727
|
-
f =
|
|
4720
|
+
f = TP_RICHCOMPARE(type2);
|
|
4728
4721
|
|
|
4729
4722
|
if (f != NULL) {
|
|
4730
4723
|
checked_reverse_op = true;
|
|
@@ -4745,7 +4738,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4745
4738
|
}
|
|
4746
4739
|
}
|
|
4747
4740
|
|
|
4748
|
-
|
|
4741
|
+
Py_DECREF_IMMORTAL(result);
|
|
4749
4742
|
}
|
|
4750
4743
|
}
|
|
4751
4744
|
|
|
@@ -4768,11 +4761,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4768
4761
|
}
|
|
4769
4762
|
}
|
|
4770
4763
|
|
|
4771
|
-
|
|
4764
|
+
Py_DECREF_IMMORTAL(result);
|
|
4772
4765
|
}
|
|
4773
4766
|
|
|
4774
4767
|
if (checked_reverse_op == false) {
|
|
4775
|
-
f =
|
|
4768
|
+
f = TP_RICHCOMPARE(type2);
|
|
4776
4769
|
|
|
4777
4770
|
if (f != NULL) {
|
|
4778
4771
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -4791,7 +4784,7 @@ nuitka_bool RICH_COMPARE_GE_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
|
|
|
@@ -4859,7 +4852,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4859
4852
|
return result;
|
|
4860
4853
|
}
|
|
4861
4854
|
|
|
4862
|
-
|
|
4855
|
+
Py_DECREF_IMMORTAL(result);
|
|
4863
4856
|
}
|
|
4864
4857
|
|
|
4865
4858
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4900,7 +4893,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4900
4893
|
|
|
4901
4894
|
bool r = c != 0;
|
|
4902
4895
|
PyObject *result = BOOL_FROM(r);
|
|
4903
|
-
|
|
4896
|
+
Py_INCREF_IMMORTAL(result);
|
|
4904
4897
|
return result;
|
|
4905
4898
|
}
|
|
4906
4899
|
}
|
|
@@ -4920,11 +4913,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4920
4913
|
return result;
|
|
4921
4914
|
}
|
|
4922
4915
|
|
|
4923
|
-
|
|
4916
|
+
Py_DECREF_IMMORTAL(result);
|
|
4924
4917
|
}
|
|
4925
4918
|
}
|
|
4926
4919
|
|
|
4927
|
-
f =
|
|
4920
|
+
f = TP_RICHCOMPARE(type1);
|
|
4928
4921
|
if (f != NULL) {
|
|
4929
4922
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
4930
4923
|
|
|
@@ -4934,7 +4927,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4934
4927
|
return result;
|
|
4935
4928
|
}
|
|
4936
4929
|
|
|
4937
|
-
|
|
4930
|
+
Py_DECREF_IMMORTAL(result);
|
|
4938
4931
|
}
|
|
4939
4932
|
|
|
4940
4933
|
f = NULL;
|
|
@@ -4947,7 +4940,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4947
4940
|
return result;
|
|
4948
4941
|
}
|
|
4949
4942
|
|
|
4950
|
-
|
|
4943
|
+
Py_DECREF_IMMORTAL(result);
|
|
4951
4944
|
}
|
|
4952
4945
|
|
|
4953
4946
|
int c;
|
|
@@ -5035,7 +5028,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5035
5028
|
|
|
5036
5029
|
bool r = c != 0;
|
|
5037
5030
|
PyObject *result = BOOL_FROM(r);
|
|
5038
|
-
|
|
5031
|
+
Py_INCREF_IMMORTAL(result);
|
|
5039
5032
|
return result;
|
|
5040
5033
|
#else
|
|
5041
5034
|
bool checked_reverse_op = false;
|
|
@@ -5055,11 +5048,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5055
5048
|
return result;
|
|
5056
5049
|
}
|
|
5057
5050
|
|
|
5058
|
-
|
|
5051
|
+
Py_DECREF_IMMORTAL(result);
|
|
5059
5052
|
}
|
|
5060
5053
|
}
|
|
5061
5054
|
|
|
5062
|
-
f =
|
|
5055
|
+
f = TP_RICHCOMPARE(type1);
|
|
5063
5056
|
|
|
5064
5057
|
if (f != NULL) {
|
|
5065
5058
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -5070,7 +5063,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5070
5063
|
return result;
|
|
5071
5064
|
}
|
|
5072
5065
|
|
|
5073
|
-
|
|
5066
|
+
Py_DECREF_IMMORTAL(result);
|
|
5074
5067
|
}
|
|
5075
5068
|
|
|
5076
5069
|
if (checked_reverse_op == false) {
|
|
@@ -5085,7 +5078,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5085
5078
|
return result;
|
|
5086
5079
|
}
|
|
5087
5080
|
|
|
5088
|
-
|
|
5081
|
+
Py_DECREF_IMMORTAL(result);
|
|
5089
5082
|
}
|
|
5090
5083
|
}
|
|
5091
5084
|
|
|
@@ -5097,13 +5090,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5097
5090
|
case Py_EQ: {
|
|
5098
5091
|
bool r = operand1 == operand2;
|
|
5099
5092
|
PyObject *result = BOOL_FROM(r);
|
|
5100
|
-
|
|
5093
|
+
Py_INCREF_IMMORTAL(result);
|
|
5101
5094
|
return result;
|
|
5102
5095
|
}
|
|
5103
5096
|
case Py_NE: {
|
|
5104
5097
|
bool r = operand1 != operand2;
|
|
5105
5098
|
PyObject *result = BOOL_FROM(r);
|
|
5106
|
-
|
|
5099
|
+
Py_INCREF_IMMORTAL(result);
|
|
5107
5100
|
return result;
|
|
5108
5101
|
}
|
|
5109
5102
|
default:
|
|
@@ -5153,7 +5146,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5153
5146
|
return result;
|
|
5154
5147
|
}
|
|
5155
5148
|
|
|
5156
|
-
|
|
5149
|
+
Py_DECREF_IMMORTAL(result);
|
|
5157
5150
|
}
|
|
5158
5151
|
|
|
5159
5152
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5194,7 +5187,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5194
5187
|
|
|
5195
5188
|
bool r = c != 0;
|
|
5196
5189
|
PyObject *result = BOOL_FROM(r);
|
|
5197
|
-
|
|
5190
|
+
Py_INCREF_IMMORTAL(result);
|
|
5198
5191
|
return result;
|
|
5199
5192
|
}
|
|
5200
5193
|
}
|
|
@@ -5203,7 +5196,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5203
5196
|
richcmpfunc f;
|
|
5204
5197
|
|
|
5205
5198
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5206
|
-
f =
|
|
5199
|
+
f = TP_RICHCOMPARE(type2);
|
|
5207
5200
|
|
|
5208
5201
|
if (f != NULL) {
|
|
5209
5202
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -5214,7 +5207,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5214
5207
|
return result;
|
|
5215
5208
|
}
|
|
5216
5209
|
|
|
5217
|
-
|
|
5210
|
+
Py_DECREF_IMMORTAL(result);
|
|
5218
5211
|
}
|
|
5219
5212
|
}
|
|
5220
5213
|
|
|
@@ -5228,10 +5221,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5228
5221
|
return result;
|
|
5229
5222
|
}
|
|
5230
5223
|
|
|
5231
|
-
|
|
5224
|
+
Py_DECREF_IMMORTAL(result);
|
|
5232
5225
|
}
|
|
5233
5226
|
|
|
5234
|
-
f =
|
|
5227
|
+
f = TP_RICHCOMPARE(type2);
|
|
5235
5228
|
if (f != NULL) {
|
|
5236
5229
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
5237
5230
|
|
|
@@ -5241,7 +5234,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5241
5234
|
return result;
|
|
5242
5235
|
}
|
|
5243
5236
|
|
|
5244
|
-
|
|
5237
|
+
Py_DECREF_IMMORTAL(result);
|
|
5245
5238
|
}
|
|
5246
5239
|
|
|
5247
5240
|
int c;
|
|
@@ -5329,14 +5322,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5329
5322
|
|
|
5330
5323
|
bool r = c != 0;
|
|
5331
5324
|
PyObject *result = BOOL_FROM(r);
|
|
5332
|
-
|
|
5325
|
+
Py_INCREF_IMMORTAL(result);
|
|
5333
5326
|
return result;
|
|
5334
5327
|
#else
|
|
5335
5328
|
bool checked_reverse_op = false;
|
|
5336
5329
|
richcmpfunc f;
|
|
5337
5330
|
|
|
5338
5331
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5339
|
-
f =
|
|
5332
|
+
f = TP_RICHCOMPARE(type2);
|
|
5340
5333
|
|
|
5341
5334
|
if (f != NULL) {
|
|
5342
5335
|
checked_reverse_op = true;
|
|
@@ -5349,7 +5342,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5349
5342
|
return result;
|
|
5350
5343
|
}
|
|
5351
5344
|
|
|
5352
|
-
|
|
5345
|
+
Py_DECREF_IMMORTAL(result);
|
|
5353
5346
|
}
|
|
5354
5347
|
}
|
|
5355
5348
|
|
|
@@ -5364,11 +5357,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5364
5357
|
return result;
|
|
5365
5358
|
}
|
|
5366
5359
|
|
|
5367
|
-
|
|
5360
|
+
Py_DECREF_IMMORTAL(result);
|
|
5368
5361
|
}
|
|
5369
5362
|
|
|
5370
5363
|
if (checked_reverse_op == false) {
|
|
5371
|
-
f =
|
|
5364
|
+
f = TP_RICHCOMPARE(type2);
|
|
5372
5365
|
|
|
5373
5366
|
if (f != NULL) {
|
|
5374
5367
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -5379,7 +5372,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5379
5372
|
return result;
|
|
5380
5373
|
}
|
|
5381
5374
|
|
|
5382
|
-
|
|
5375
|
+
Py_DECREF_IMMORTAL(result);
|
|
5383
5376
|
}
|
|
5384
5377
|
}
|
|
5385
5378
|
|
|
@@ -5391,13 +5384,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5391
5384
|
case Py_EQ: {
|
|
5392
5385
|
bool r = operand1 == operand2;
|
|
5393
5386
|
PyObject *result = BOOL_FROM(r);
|
|
5394
|
-
|
|
5387
|
+
Py_INCREF_IMMORTAL(result);
|
|
5395
5388
|
return result;
|
|
5396
5389
|
}
|
|
5397
5390
|
case Py_NE: {
|
|
5398
5391
|
bool r = operand1 != operand2;
|
|
5399
5392
|
PyObject *result = BOOL_FROM(r);
|
|
5400
|
-
|
|
5393
|
+
Py_INCREF_IMMORTAL(result);
|
|
5401
5394
|
return result;
|
|
5402
5395
|
}
|
|
5403
5396
|
default:
|
|
@@ -5455,7 +5448,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5455
5448
|
}
|
|
5456
5449
|
}
|
|
5457
5450
|
|
|
5458
|
-
|
|
5451
|
+
Py_DECREF_IMMORTAL(result);
|
|
5459
5452
|
}
|
|
5460
5453
|
|
|
5461
5454
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5524,11 +5517,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5524
5517
|
}
|
|
5525
5518
|
}
|
|
5526
5519
|
|
|
5527
|
-
|
|
5520
|
+
Py_DECREF_IMMORTAL(result);
|
|
5528
5521
|
}
|
|
5529
5522
|
}
|
|
5530
5523
|
|
|
5531
|
-
f =
|
|
5524
|
+
f = TP_RICHCOMPARE(type1);
|
|
5532
5525
|
if (f != NULL) {
|
|
5533
5526
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
5534
5527
|
|
|
@@ -5546,7 +5539,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5546
5539
|
}
|
|
5547
5540
|
}
|
|
5548
5541
|
|
|
5549
|
-
|
|
5542
|
+
Py_DECREF_IMMORTAL(result);
|
|
5550
5543
|
}
|
|
5551
5544
|
|
|
5552
5545
|
f = NULL;
|
|
@@ -5567,7 +5560,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5567
5560
|
}
|
|
5568
5561
|
}
|
|
5569
5562
|
|
|
5570
|
-
|
|
5563
|
+
Py_DECREF_IMMORTAL(result);
|
|
5571
5564
|
}
|
|
5572
5565
|
|
|
5573
5566
|
int c;
|
|
@@ -5683,11 +5676,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5683
5676
|
}
|
|
5684
5677
|
}
|
|
5685
5678
|
|
|
5686
|
-
|
|
5679
|
+
Py_DECREF_IMMORTAL(result);
|
|
5687
5680
|
}
|
|
5688
5681
|
}
|
|
5689
5682
|
|
|
5690
|
-
f =
|
|
5683
|
+
f = TP_RICHCOMPARE(type1);
|
|
5691
5684
|
|
|
5692
5685
|
if (f != NULL) {
|
|
5693
5686
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -5706,7 +5699,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5706
5699
|
}
|
|
5707
5700
|
}
|
|
5708
5701
|
|
|
5709
|
-
|
|
5702
|
+
Py_DECREF_IMMORTAL(result);
|
|
5710
5703
|
}
|
|
5711
5704
|
|
|
5712
5705
|
if (checked_reverse_op == false) {
|
|
@@ -5729,7 +5722,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5729
5722
|
}
|
|
5730
5723
|
}
|
|
5731
5724
|
|
|
5732
|
-
|
|
5725
|
+
Py_DECREF_IMMORTAL(result);
|
|
5733
5726
|
}
|
|
5734
5727
|
}
|
|
5735
5728
|
|
|
@@ -5805,7 +5798,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5805
5798
|
}
|
|
5806
5799
|
}
|
|
5807
5800
|
|
|
5808
|
-
|
|
5801
|
+
Py_DECREF_IMMORTAL(result);
|
|
5809
5802
|
}
|
|
5810
5803
|
|
|
5811
5804
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5855,7 +5848,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5855
5848
|
richcmpfunc f;
|
|
5856
5849
|
|
|
5857
5850
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5858
|
-
f =
|
|
5851
|
+
f = TP_RICHCOMPARE(type2);
|
|
5859
5852
|
|
|
5860
5853
|
if (f != NULL) {
|
|
5861
5854
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -5874,7 +5867,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5874
5867
|
}
|
|
5875
5868
|
}
|
|
5876
5869
|
|
|
5877
|
-
|
|
5870
|
+
Py_DECREF_IMMORTAL(result);
|
|
5878
5871
|
}
|
|
5879
5872
|
}
|
|
5880
5873
|
|
|
@@ -5896,10 +5889,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5896
5889
|
}
|
|
5897
5890
|
}
|
|
5898
5891
|
|
|
5899
|
-
|
|
5892
|
+
Py_DECREF_IMMORTAL(result);
|
|
5900
5893
|
}
|
|
5901
5894
|
|
|
5902
|
-
f =
|
|
5895
|
+
f = TP_RICHCOMPARE(type2);
|
|
5903
5896
|
if (f != NULL) {
|
|
5904
5897
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
5905
5898
|
|
|
@@ -5917,7 +5910,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5917
5910
|
}
|
|
5918
5911
|
}
|
|
5919
5912
|
|
|
5920
|
-
|
|
5913
|
+
Py_DECREF_IMMORTAL(result);
|
|
5921
5914
|
}
|
|
5922
5915
|
|
|
5923
5916
|
int c;
|
|
@@ -6012,7 +6005,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6012
6005
|
richcmpfunc f;
|
|
6013
6006
|
|
|
6014
6007
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
6015
|
-
f =
|
|
6008
|
+
f = TP_RICHCOMPARE(type2);
|
|
6016
6009
|
|
|
6017
6010
|
if (f != NULL) {
|
|
6018
6011
|
checked_reverse_op = true;
|
|
@@ -6033,7 +6026,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6033
6026
|
}
|
|
6034
6027
|
}
|
|
6035
6028
|
|
|
6036
|
-
|
|
6029
|
+
Py_DECREF_IMMORTAL(result);
|
|
6037
6030
|
}
|
|
6038
6031
|
}
|
|
6039
6032
|
|
|
@@ -6056,11 +6049,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6056
6049
|
}
|
|
6057
6050
|
}
|
|
6058
6051
|
|
|
6059
|
-
|
|
6052
|
+
Py_DECREF_IMMORTAL(result);
|
|
6060
6053
|
}
|
|
6061
6054
|
|
|
6062
6055
|
if (checked_reverse_op == false) {
|
|
6063
|
-
f =
|
|
6056
|
+
f = TP_RICHCOMPARE(type2);
|
|
6064
6057
|
|
|
6065
6058
|
if (f != NULL) {
|
|
6066
6059
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -6079,7 +6072,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6079
6072
|
}
|
|
6080
6073
|
}
|
|
6081
6074
|
|
|
6082
|
-
|
|
6075
|
+
Py_DECREF_IMMORTAL(result);
|
|
6083
6076
|
}
|
|
6084
6077
|
}
|
|
6085
6078
|
|
|
@@ -6126,15 +6119,19 @@ static PyObject *COMPARE_GE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6126
6119
|
|
|
6127
6120
|
if (operand1_long_object == operand2_long_object) {
|
|
6128
6121
|
r = true;
|
|
6129
|
-
} else if (
|
|
6130
|
-
|
|
6122
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6123
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6124
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) >
|
|
6125
|
+
0;
|
|
6131
6126
|
} else {
|
|
6132
|
-
Py_ssize_t i =
|
|
6127
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6133
6128
|
r = true;
|
|
6134
6129
|
while (--i >= 0) {
|
|
6135
|
-
if (operand1_long_object
|
|
6136
|
-
|
|
6137
|
-
|
|
6130
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6131
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6132
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] >
|
|
6133
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6134
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6138
6135
|
r = !r;
|
|
6139
6136
|
}
|
|
6140
6137
|
break;
|
|
@@ -6144,7 +6141,7 @@ static PyObject *COMPARE_GE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6144
6141
|
|
|
6145
6142
|
// Convert to target type.
|
|
6146
6143
|
PyObject *result = BOOL_FROM(r);
|
|
6147
|
-
|
|
6144
|
+
Py_INCREF_IMMORTAL(result);
|
|
6148
6145
|
return result;
|
|
6149
6146
|
}
|
|
6150
6147
|
/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
|
|
@@ -6181,7 +6178,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6181
6178
|
return result;
|
|
6182
6179
|
}
|
|
6183
6180
|
|
|
6184
|
-
|
|
6181
|
+
Py_DECREF_IMMORTAL(result);
|
|
6185
6182
|
}
|
|
6186
6183
|
|
|
6187
6184
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6222,7 +6219,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6222
6219
|
|
|
6223
6220
|
bool r = c != 0;
|
|
6224
6221
|
PyObject *result = BOOL_FROM(r);
|
|
6225
|
-
|
|
6222
|
+
Py_INCREF_IMMORTAL(result);
|
|
6226
6223
|
return result;
|
|
6227
6224
|
}
|
|
6228
6225
|
}
|
|
@@ -6242,11 +6239,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6242
6239
|
return result;
|
|
6243
6240
|
}
|
|
6244
6241
|
|
|
6245
|
-
|
|
6242
|
+
Py_DECREF_IMMORTAL(result);
|
|
6246
6243
|
}
|
|
6247
6244
|
}
|
|
6248
6245
|
|
|
6249
|
-
f =
|
|
6246
|
+
f = TP_RICHCOMPARE(type1);
|
|
6250
6247
|
if (f != NULL) {
|
|
6251
6248
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
6252
6249
|
|
|
@@ -6256,7 +6253,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6256
6253
|
return result;
|
|
6257
6254
|
}
|
|
6258
6255
|
|
|
6259
|
-
|
|
6256
|
+
Py_DECREF_IMMORTAL(result);
|
|
6260
6257
|
}
|
|
6261
6258
|
|
|
6262
6259
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6269,7 +6266,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6269
6266
|
return result;
|
|
6270
6267
|
}
|
|
6271
6268
|
|
|
6272
|
-
|
|
6269
|
+
Py_DECREF_IMMORTAL(result);
|
|
6273
6270
|
}
|
|
6274
6271
|
|
|
6275
6272
|
int c;
|
|
@@ -6357,7 +6354,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6357
6354
|
|
|
6358
6355
|
bool r = c != 0;
|
|
6359
6356
|
PyObject *result = BOOL_FROM(r);
|
|
6360
|
-
|
|
6357
|
+
Py_INCREF_IMMORTAL(result);
|
|
6361
6358
|
return result;
|
|
6362
6359
|
#else
|
|
6363
6360
|
bool checked_reverse_op = false;
|
|
@@ -6377,11 +6374,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6377
6374
|
return result;
|
|
6378
6375
|
}
|
|
6379
6376
|
|
|
6380
|
-
|
|
6377
|
+
Py_DECREF_IMMORTAL(result);
|
|
6381
6378
|
}
|
|
6382
6379
|
}
|
|
6383
6380
|
|
|
6384
|
-
f =
|
|
6381
|
+
f = TP_RICHCOMPARE(type1);
|
|
6385
6382
|
|
|
6386
6383
|
if (f != NULL) {
|
|
6387
6384
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -6392,7 +6389,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6392
6389
|
return result;
|
|
6393
6390
|
}
|
|
6394
6391
|
|
|
6395
|
-
|
|
6392
|
+
Py_DECREF_IMMORTAL(result);
|
|
6396
6393
|
}
|
|
6397
6394
|
|
|
6398
6395
|
if (checked_reverse_op == false) {
|
|
@@ -6407,7 +6404,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6407
6404
|
return result;
|
|
6408
6405
|
}
|
|
6409
6406
|
|
|
6410
|
-
|
|
6407
|
+
Py_DECREF_IMMORTAL(result);
|
|
6411
6408
|
}
|
|
6412
6409
|
}
|
|
6413
6410
|
|
|
@@ -6419,13 +6416,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6419
6416
|
case Py_EQ: {
|
|
6420
6417
|
bool r = operand1 == operand2;
|
|
6421
6418
|
PyObject *result = BOOL_FROM(r);
|
|
6422
|
-
|
|
6419
|
+
Py_INCREF_IMMORTAL(result);
|
|
6423
6420
|
return result;
|
|
6424
6421
|
}
|
|
6425
6422
|
case Py_NE: {
|
|
6426
6423
|
bool r = operand1 != operand2;
|
|
6427
6424
|
PyObject *result = BOOL_FROM(r);
|
|
6428
|
-
|
|
6425
|
+
Py_INCREF_IMMORTAL(result);
|
|
6429
6426
|
return result;
|
|
6430
6427
|
}
|
|
6431
6428
|
default:
|
|
@@ -6475,7 +6472,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6475
6472
|
return result;
|
|
6476
6473
|
}
|
|
6477
6474
|
|
|
6478
|
-
|
|
6475
|
+
Py_DECREF_IMMORTAL(result);
|
|
6479
6476
|
}
|
|
6480
6477
|
|
|
6481
6478
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6516,7 +6513,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6516
6513
|
|
|
6517
6514
|
bool r = c != 0;
|
|
6518
6515
|
PyObject *result = BOOL_FROM(r);
|
|
6519
|
-
|
|
6516
|
+
Py_INCREF_IMMORTAL(result);
|
|
6520
6517
|
return result;
|
|
6521
6518
|
}
|
|
6522
6519
|
}
|
|
@@ -6525,7 +6522,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6525
6522
|
richcmpfunc f;
|
|
6526
6523
|
|
|
6527
6524
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6528
|
-
f =
|
|
6525
|
+
f = TP_RICHCOMPARE(type2);
|
|
6529
6526
|
|
|
6530
6527
|
if (f != NULL) {
|
|
6531
6528
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -6536,7 +6533,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6536
6533
|
return result;
|
|
6537
6534
|
}
|
|
6538
6535
|
|
|
6539
|
-
|
|
6536
|
+
Py_DECREF_IMMORTAL(result);
|
|
6540
6537
|
}
|
|
6541
6538
|
}
|
|
6542
6539
|
|
|
@@ -6550,10 +6547,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6550
6547
|
return result;
|
|
6551
6548
|
}
|
|
6552
6549
|
|
|
6553
|
-
|
|
6550
|
+
Py_DECREF_IMMORTAL(result);
|
|
6554
6551
|
}
|
|
6555
6552
|
|
|
6556
|
-
f =
|
|
6553
|
+
f = TP_RICHCOMPARE(type2);
|
|
6557
6554
|
if (f != NULL) {
|
|
6558
6555
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
6559
6556
|
|
|
@@ -6563,7 +6560,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6563
6560
|
return result;
|
|
6564
6561
|
}
|
|
6565
6562
|
|
|
6566
|
-
|
|
6563
|
+
Py_DECREF_IMMORTAL(result);
|
|
6567
6564
|
}
|
|
6568
6565
|
|
|
6569
6566
|
int c;
|
|
@@ -6651,14 +6648,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6651
6648
|
|
|
6652
6649
|
bool r = c != 0;
|
|
6653
6650
|
PyObject *result = BOOL_FROM(r);
|
|
6654
|
-
|
|
6651
|
+
Py_INCREF_IMMORTAL(result);
|
|
6655
6652
|
return result;
|
|
6656
6653
|
#else
|
|
6657
6654
|
bool checked_reverse_op = false;
|
|
6658
6655
|
richcmpfunc f;
|
|
6659
6656
|
|
|
6660
6657
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6661
|
-
f =
|
|
6658
|
+
f = TP_RICHCOMPARE(type2);
|
|
6662
6659
|
|
|
6663
6660
|
if (f != NULL) {
|
|
6664
6661
|
checked_reverse_op = true;
|
|
@@ -6671,7 +6668,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6671
6668
|
return result;
|
|
6672
6669
|
}
|
|
6673
6670
|
|
|
6674
|
-
|
|
6671
|
+
Py_DECREF_IMMORTAL(result);
|
|
6675
6672
|
}
|
|
6676
6673
|
}
|
|
6677
6674
|
|
|
@@ -6686,11 +6683,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6686
6683
|
return result;
|
|
6687
6684
|
}
|
|
6688
6685
|
|
|
6689
|
-
|
|
6686
|
+
Py_DECREF_IMMORTAL(result);
|
|
6690
6687
|
}
|
|
6691
6688
|
|
|
6692
6689
|
if (checked_reverse_op == false) {
|
|
6693
|
-
f =
|
|
6690
|
+
f = TP_RICHCOMPARE(type2);
|
|
6694
6691
|
|
|
6695
6692
|
if (f != NULL) {
|
|
6696
6693
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -6701,7 +6698,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6701
6698
|
return result;
|
|
6702
6699
|
}
|
|
6703
6700
|
|
|
6704
|
-
|
|
6701
|
+
Py_DECREF_IMMORTAL(result);
|
|
6705
6702
|
}
|
|
6706
6703
|
}
|
|
6707
6704
|
|
|
@@ -6713,13 +6710,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6713
6710
|
case Py_EQ: {
|
|
6714
6711
|
bool r = operand1 == operand2;
|
|
6715
6712
|
PyObject *result = BOOL_FROM(r);
|
|
6716
|
-
|
|
6713
|
+
Py_INCREF_IMMORTAL(result);
|
|
6717
6714
|
return result;
|
|
6718
6715
|
}
|
|
6719
6716
|
case Py_NE: {
|
|
6720
6717
|
bool r = operand1 != operand2;
|
|
6721
6718
|
PyObject *result = BOOL_FROM(r);
|
|
6722
|
-
|
|
6719
|
+
Py_INCREF_IMMORTAL(result);
|
|
6723
6720
|
return result;
|
|
6724
6721
|
}
|
|
6725
6722
|
default:
|
|
@@ -6749,15 +6746,19 @@ static bool COMPARE_GE_CBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
|
|
|
6749
6746
|
|
|
6750
6747
|
if (operand1_long_object == operand2_long_object) {
|
|
6751
6748
|
r = true;
|
|
6752
|
-
} else if (
|
|
6753
|
-
|
|
6749
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6750
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6751
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) >
|
|
6752
|
+
0;
|
|
6754
6753
|
} else {
|
|
6755
|
-
Py_ssize_t i =
|
|
6754
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6756
6755
|
r = true;
|
|
6757
6756
|
while (--i >= 0) {
|
|
6758
|
-
if (operand1_long_object
|
|
6759
|
-
|
|
6760
|
-
|
|
6757
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6758
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6759
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] >
|
|
6760
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6761
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6761
6762
|
r = !r;
|
|
6762
6763
|
}
|
|
6763
6764
|
break;
|
|
@@ -6812,7 +6813,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6812
6813
|
}
|
|
6813
6814
|
}
|
|
6814
6815
|
|
|
6815
|
-
|
|
6816
|
+
Py_DECREF_IMMORTAL(result);
|
|
6816
6817
|
}
|
|
6817
6818
|
|
|
6818
6819
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6881,11 +6882,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6881
6882
|
}
|
|
6882
6883
|
}
|
|
6883
6884
|
|
|
6884
|
-
|
|
6885
|
+
Py_DECREF_IMMORTAL(result);
|
|
6885
6886
|
}
|
|
6886
6887
|
}
|
|
6887
6888
|
|
|
6888
|
-
f =
|
|
6889
|
+
f = TP_RICHCOMPARE(type1);
|
|
6889
6890
|
if (f != NULL) {
|
|
6890
6891
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
6891
6892
|
|
|
@@ -6903,7 +6904,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6903
6904
|
}
|
|
6904
6905
|
}
|
|
6905
6906
|
|
|
6906
|
-
|
|
6907
|
+
Py_DECREF_IMMORTAL(result);
|
|
6907
6908
|
}
|
|
6908
6909
|
|
|
6909
6910
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6924,7 +6925,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6924
6925
|
}
|
|
6925
6926
|
}
|
|
6926
6927
|
|
|
6927
|
-
|
|
6928
|
+
Py_DECREF_IMMORTAL(result);
|
|
6928
6929
|
}
|
|
6929
6930
|
|
|
6930
6931
|
int c;
|
|
@@ -7040,11 +7041,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7040
7041
|
}
|
|
7041
7042
|
}
|
|
7042
7043
|
|
|
7043
|
-
|
|
7044
|
+
Py_DECREF_IMMORTAL(result);
|
|
7044
7045
|
}
|
|
7045
7046
|
}
|
|
7046
7047
|
|
|
7047
|
-
f =
|
|
7048
|
+
f = TP_RICHCOMPARE(type1);
|
|
7048
7049
|
|
|
7049
7050
|
if (f != NULL) {
|
|
7050
7051
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -7063,7 +7064,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7063
7064
|
}
|
|
7064
7065
|
}
|
|
7065
7066
|
|
|
7066
|
-
|
|
7067
|
+
Py_DECREF_IMMORTAL(result);
|
|
7067
7068
|
}
|
|
7068
7069
|
|
|
7069
7070
|
if (checked_reverse_op == false) {
|
|
@@ -7086,7 +7087,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7086
7087
|
}
|
|
7087
7088
|
}
|
|
7088
7089
|
|
|
7089
|
-
|
|
7090
|
+
Py_DECREF_IMMORTAL(result);
|
|
7090
7091
|
}
|
|
7091
7092
|
}
|
|
7092
7093
|
|
|
@@ -7162,7 +7163,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7162
7163
|
}
|
|
7163
7164
|
}
|
|
7164
7165
|
|
|
7165
|
-
|
|
7166
|
+
Py_DECREF_IMMORTAL(result);
|
|
7166
7167
|
}
|
|
7167
7168
|
|
|
7168
7169
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7212,7 +7213,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7212
7213
|
richcmpfunc f;
|
|
7213
7214
|
|
|
7214
7215
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7215
|
-
f =
|
|
7216
|
+
f = TP_RICHCOMPARE(type2);
|
|
7216
7217
|
|
|
7217
7218
|
if (f != NULL) {
|
|
7218
7219
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -7231,7 +7232,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7231
7232
|
}
|
|
7232
7233
|
}
|
|
7233
7234
|
|
|
7234
|
-
|
|
7235
|
+
Py_DECREF_IMMORTAL(result);
|
|
7235
7236
|
}
|
|
7236
7237
|
}
|
|
7237
7238
|
|
|
@@ -7253,10 +7254,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7253
7254
|
}
|
|
7254
7255
|
}
|
|
7255
7256
|
|
|
7256
|
-
|
|
7257
|
+
Py_DECREF_IMMORTAL(result);
|
|
7257
7258
|
}
|
|
7258
7259
|
|
|
7259
|
-
f =
|
|
7260
|
+
f = TP_RICHCOMPARE(type2);
|
|
7260
7261
|
if (f != NULL) {
|
|
7261
7262
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
7262
7263
|
|
|
@@ -7274,7 +7275,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7274
7275
|
}
|
|
7275
7276
|
}
|
|
7276
7277
|
|
|
7277
|
-
|
|
7278
|
+
Py_DECREF_IMMORTAL(result);
|
|
7278
7279
|
}
|
|
7279
7280
|
|
|
7280
7281
|
int c;
|
|
@@ -7369,7 +7370,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7369
7370
|
richcmpfunc f;
|
|
7370
7371
|
|
|
7371
7372
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7372
|
-
f =
|
|
7373
|
+
f = TP_RICHCOMPARE(type2);
|
|
7373
7374
|
|
|
7374
7375
|
if (f != NULL) {
|
|
7375
7376
|
checked_reverse_op = true;
|
|
@@ -7390,7 +7391,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7390
7391
|
}
|
|
7391
7392
|
}
|
|
7392
7393
|
|
|
7393
|
-
|
|
7394
|
+
Py_DECREF_IMMORTAL(result);
|
|
7394
7395
|
}
|
|
7395
7396
|
}
|
|
7396
7397
|
|
|
@@ -7413,11 +7414,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7413
7414
|
}
|
|
7414
7415
|
}
|
|
7415
7416
|
|
|
7416
|
-
|
|
7417
|
+
Py_DECREF_IMMORTAL(result);
|
|
7417
7418
|
}
|
|
7418
7419
|
|
|
7419
7420
|
if (checked_reverse_op == false) {
|
|
7420
|
-
f =
|
|
7421
|
+
f = TP_RICHCOMPARE(type2);
|
|
7421
7422
|
|
|
7422
7423
|
if (f != NULL) {
|
|
7423
7424
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -7436,7 +7437,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7436
7437
|
}
|
|
7437
7438
|
}
|
|
7438
7439
|
|
|
7439
|
-
|
|
7440
|
+
Py_DECREF_IMMORTAL(result);
|
|
7440
7441
|
}
|
|
7441
7442
|
}
|
|
7442
7443
|
|
|
@@ -7483,7 +7484,7 @@ static PyObject *COMPARE_GE_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
7483
7484
|
|
|
7484
7485
|
// Convert to target type.
|
|
7485
7486
|
PyObject *result = BOOL_FROM(r);
|
|
7486
|
-
|
|
7487
|
+
Py_INCREF_IMMORTAL(result);
|
|
7487
7488
|
return result;
|
|
7488
7489
|
}
|
|
7489
7490
|
/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
|
|
@@ -7520,7 +7521,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7520
7521
|
return result;
|
|
7521
7522
|
}
|
|
7522
7523
|
|
|
7523
|
-
|
|
7524
|
+
Py_DECREF_IMMORTAL(result);
|
|
7524
7525
|
}
|
|
7525
7526
|
|
|
7526
7527
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7561,7 +7562,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7561
7562
|
|
|
7562
7563
|
bool r = c != 0;
|
|
7563
7564
|
PyObject *result = BOOL_FROM(r);
|
|
7564
|
-
|
|
7565
|
+
Py_INCREF_IMMORTAL(result);
|
|
7565
7566
|
return result;
|
|
7566
7567
|
}
|
|
7567
7568
|
}
|
|
@@ -7581,11 +7582,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7581
7582
|
return result;
|
|
7582
7583
|
}
|
|
7583
7584
|
|
|
7584
|
-
|
|
7585
|
+
Py_DECREF_IMMORTAL(result);
|
|
7585
7586
|
}
|
|
7586
7587
|
}
|
|
7587
7588
|
|
|
7588
|
-
f =
|
|
7589
|
+
f = TP_RICHCOMPARE(type1);
|
|
7589
7590
|
if (f != NULL) {
|
|
7590
7591
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
7591
7592
|
|
|
@@ -7595,7 +7596,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7595
7596
|
return result;
|
|
7596
7597
|
}
|
|
7597
7598
|
|
|
7598
|
-
|
|
7599
|
+
Py_DECREF_IMMORTAL(result);
|
|
7599
7600
|
}
|
|
7600
7601
|
|
|
7601
7602
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -7608,7 +7609,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7608
7609
|
return result;
|
|
7609
7610
|
}
|
|
7610
7611
|
|
|
7611
|
-
|
|
7612
|
+
Py_DECREF_IMMORTAL(result);
|
|
7612
7613
|
}
|
|
7613
7614
|
|
|
7614
7615
|
int c;
|
|
@@ -7696,7 +7697,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7696
7697
|
|
|
7697
7698
|
bool r = c != 0;
|
|
7698
7699
|
PyObject *result = BOOL_FROM(r);
|
|
7699
|
-
|
|
7700
|
+
Py_INCREF_IMMORTAL(result);
|
|
7700
7701
|
return result;
|
|
7701
7702
|
#else
|
|
7702
7703
|
bool checked_reverse_op = false;
|
|
@@ -7716,11 +7717,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7716
7717
|
return result;
|
|
7717
7718
|
}
|
|
7718
7719
|
|
|
7719
|
-
|
|
7720
|
+
Py_DECREF_IMMORTAL(result);
|
|
7720
7721
|
}
|
|
7721
7722
|
}
|
|
7722
7723
|
|
|
7723
|
-
f =
|
|
7724
|
+
f = TP_RICHCOMPARE(type1);
|
|
7724
7725
|
|
|
7725
7726
|
if (f != NULL) {
|
|
7726
7727
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -7731,7 +7732,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7731
7732
|
return result;
|
|
7732
7733
|
}
|
|
7733
7734
|
|
|
7734
|
-
|
|
7735
|
+
Py_DECREF_IMMORTAL(result);
|
|
7735
7736
|
}
|
|
7736
7737
|
|
|
7737
7738
|
if (checked_reverse_op == false) {
|
|
@@ -7746,7 +7747,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7746
7747
|
return result;
|
|
7747
7748
|
}
|
|
7748
7749
|
|
|
7749
|
-
|
|
7750
|
+
Py_DECREF_IMMORTAL(result);
|
|
7750
7751
|
}
|
|
7751
7752
|
}
|
|
7752
7753
|
|
|
@@ -7758,13 +7759,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7758
7759
|
case Py_EQ: {
|
|
7759
7760
|
bool r = operand1 == operand2;
|
|
7760
7761
|
PyObject *result = BOOL_FROM(r);
|
|
7761
|
-
|
|
7762
|
+
Py_INCREF_IMMORTAL(result);
|
|
7762
7763
|
return result;
|
|
7763
7764
|
}
|
|
7764
7765
|
case Py_NE: {
|
|
7765
7766
|
bool r = operand1 != operand2;
|
|
7766
7767
|
PyObject *result = BOOL_FROM(r);
|
|
7767
|
-
|
|
7768
|
+
Py_INCREF_IMMORTAL(result);
|
|
7768
7769
|
return result;
|
|
7769
7770
|
}
|
|
7770
7771
|
default:
|
|
@@ -7812,7 +7813,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7812
7813
|
return result;
|
|
7813
7814
|
}
|
|
7814
7815
|
|
|
7815
|
-
|
|
7816
|
+
Py_DECREF_IMMORTAL(result);
|
|
7816
7817
|
}
|
|
7817
7818
|
|
|
7818
7819
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7853,7 +7854,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7853
7854
|
|
|
7854
7855
|
bool r = c != 0;
|
|
7855
7856
|
PyObject *result = BOOL_FROM(r);
|
|
7856
|
-
|
|
7857
|
+
Py_INCREF_IMMORTAL(result);
|
|
7857
7858
|
return result;
|
|
7858
7859
|
}
|
|
7859
7860
|
}
|
|
@@ -7862,7 +7863,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7862
7863
|
richcmpfunc f;
|
|
7863
7864
|
|
|
7864
7865
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7865
|
-
f =
|
|
7866
|
+
f = TP_RICHCOMPARE(type2);
|
|
7866
7867
|
|
|
7867
7868
|
if (f != NULL) {
|
|
7868
7869
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -7873,7 +7874,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7873
7874
|
return result;
|
|
7874
7875
|
}
|
|
7875
7876
|
|
|
7876
|
-
|
|
7877
|
+
Py_DECREF_IMMORTAL(result);
|
|
7877
7878
|
}
|
|
7878
7879
|
}
|
|
7879
7880
|
|
|
@@ -7887,10 +7888,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7887
7888
|
return result;
|
|
7888
7889
|
}
|
|
7889
7890
|
|
|
7890
|
-
|
|
7891
|
+
Py_DECREF_IMMORTAL(result);
|
|
7891
7892
|
}
|
|
7892
7893
|
|
|
7893
|
-
f =
|
|
7894
|
+
f = TP_RICHCOMPARE(type2);
|
|
7894
7895
|
if (f != NULL) {
|
|
7895
7896
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
7896
7897
|
|
|
@@ -7900,7 +7901,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7900
7901
|
return result;
|
|
7901
7902
|
}
|
|
7902
7903
|
|
|
7903
|
-
|
|
7904
|
+
Py_DECREF_IMMORTAL(result);
|
|
7904
7905
|
}
|
|
7905
7906
|
|
|
7906
7907
|
int c;
|
|
@@ -7988,14 +7989,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7988
7989
|
|
|
7989
7990
|
bool r = c != 0;
|
|
7990
7991
|
PyObject *result = BOOL_FROM(r);
|
|
7991
|
-
|
|
7992
|
+
Py_INCREF_IMMORTAL(result);
|
|
7992
7993
|
return result;
|
|
7993
7994
|
#else
|
|
7994
7995
|
bool checked_reverse_op = false;
|
|
7995
7996
|
richcmpfunc f;
|
|
7996
7997
|
|
|
7997
7998
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7998
|
-
f =
|
|
7999
|
+
f = TP_RICHCOMPARE(type2);
|
|
7999
8000
|
|
|
8000
8001
|
if (f != NULL) {
|
|
8001
8002
|
checked_reverse_op = true;
|
|
@@ -8008,7 +8009,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8008
8009
|
return result;
|
|
8009
8010
|
}
|
|
8010
8011
|
|
|
8011
|
-
|
|
8012
|
+
Py_DECREF_IMMORTAL(result);
|
|
8012
8013
|
}
|
|
8013
8014
|
}
|
|
8014
8015
|
|
|
@@ -8023,11 +8024,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8023
8024
|
return result;
|
|
8024
8025
|
}
|
|
8025
8026
|
|
|
8026
|
-
|
|
8027
|
+
Py_DECREF_IMMORTAL(result);
|
|
8027
8028
|
}
|
|
8028
8029
|
|
|
8029
8030
|
if (checked_reverse_op == false) {
|
|
8030
|
-
f =
|
|
8031
|
+
f = TP_RICHCOMPARE(type2);
|
|
8031
8032
|
|
|
8032
8033
|
if (f != NULL) {
|
|
8033
8034
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -8038,7 +8039,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8038
8039
|
return result;
|
|
8039
8040
|
}
|
|
8040
8041
|
|
|
8041
|
-
|
|
8042
|
+
Py_DECREF_IMMORTAL(result);
|
|
8042
8043
|
}
|
|
8043
8044
|
}
|
|
8044
8045
|
|
|
@@ -8050,13 +8051,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8050
8051
|
case Py_EQ: {
|
|
8051
8052
|
bool r = operand1 == operand2;
|
|
8052
8053
|
PyObject *result = BOOL_FROM(r);
|
|
8053
|
-
|
|
8054
|
+
Py_INCREF_IMMORTAL(result);
|
|
8054
8055
|
return result;
|
|
8055
8056
|
}
|
|
8056
8057
|
case Py_NE: {
|
|
8057
8058
|
bool r = operand1 != operand2;
|
|
8058
8059
|
PyObject *result = BOOL_FROM(r);
|
|
8059
|
-
|
|
8060
|
+
Py_INCREF_IMMORTAL(result);
|
|
8060
8061
|
return result;
|
|
8061
8062
|
}
|
|
8062
8063
|
default:
|
|
@@ -8128,7 +8129,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8128
8129
|
}
|
|
8129
8130
|
}
|
|
8130
8131
|
|
|
8131
|
-
|
|
8132
|
+
Py_DECREF_IMMORTAL(result);
|
|
8132
8133
|
}
|
|
8133
8134
|
|
|
8134
8135
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8197,11 +8198,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8197
8198
|
}
|
|
8198
8199
|
}
|
|
8199
8200
|
|
|
8200
|
-
|
|
8201
|
+
Py_DECREF_IMMORTAL(result);
|
|
8201
8202
|
}
|
|
8202
8203
|
}
|
|
8203
8204
|
|
|
8204
|
-
f =
|
|
8205
|
+
f = TP_RICHCOMPARE(type1);
|
|
8205
8206
|
if (f != NULL) {
|
|
8206
8207
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
8207
8208
|
|
|
@@ -8219,7 +8220,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8219
8220
|
}
|
|
8220
8221
|
}
|
|
8221
8222
|
|
|
8222
|
-
|
|
8223
|
+
Py_DECREF_IMMORTAL(result);
|
|
8223
8224
|
}
|
|
8224
8225
|
|
|
8225
8226
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -8240,7 +8241,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8240
8241
|
}
|
|
8241
8242
|
}
|
|
8242
8243
|
|
|
8243
|
-
|
|
8244
|
+
Py_DECREF_IMMORTAL(result);
|
|
8244
8245
|
}
|
|
8245
8246
|
|
|
8246
8247
|
int c;
|
|
@@ -8356,11 +8357,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8356
8357
|
}
|
|
8357
8358
|
}
|
|
8358
8359
|
|
|
8359
|
-
|
|
8360
|
+
Py_DECREF_IMMORTAL(result);
|
|
8360
8361
|
}
|
|
8361
8362
|
}
|
|
8362
8363
|
|
|
8363
|
-
f =
|
|
8364
|
+
f = TP_RICHCOMPARE(type1);
|
|
8364
8365
|
|
|
8365
8366
|
if (f != NULL) {
|
|
8366
8367
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -8379,7 +8380,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8379
8380
|
}
|
|
8380
8381
|
}
|
|
8381
8382
|
|
|
8382
|
-
|
|
8383
|
+
Py_DECREF_IMMORTAL(result);
|
|
8383
8384
|
}
|
|
8384
8385
|
|
|
8385
8386
|
if (checked_reverse_op == false) {
|
|
@@ -8402,7 +8403,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8402
8403
|
}
|
|
8403
8404
|
}
|
|
8404
8405
|
|
|
8405
|
-
|
|
8406
|
+
Py_DECREF_IMMORTAL(result);
|
|
8406
8407
|
}
|
|
8407
8408
|
}
|
|
8408
8409
|
|
|
@@ -8476,7 +8477,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8476
8477
|
}
|
|
8477
8478
|
}
|
|
8478
8479
|
|
|
8479
|
-
|
|
8480
|
+
Py_DECREF_IMMORTAL(result);
|
|
8480
8481
|
}
|
|
8481
8482
|
|
|
8482
8483
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8526,7 +8527,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8526
8527
|
richcmpfunc f;
|
|
8527
8528
|
|
|
8528
8529
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8529
|
-
f =
|
|
8530
|
+
f = TP_RICHCOMPARE(type2);
|
|
8530
8531
|
|
|
8531
8532
|
if (f != NULL) {
|
|
8532
8533
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -8545,7 +8546,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8545
8546
|
}
|
|
8546
8547
|
}
|
|
8547
8548
|
|
|
8548
|
-
|
|
8549
|
+
Py_DECREF_IMMORTAL(result);
|
|
8549
8550
|
}
|
|
8550
8551
|
}
|
|
8551
8552
|
|
|
@@ -8567,10 +8568,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8567
8568
|
}
|
|
8568
8569
|
}
|
|
8569
8570
|
|
|
8570
|
-
|
|
8571
|
+
Py_DECREF_IMMORTAL(result);
|
|
8571
8572
|
}
|
|
8572
8573
|
|
|
8573
|
-
f =
|
|
8574
|
+
f = TP_RICHCOMPARE(type2);
|
|
8574
8575
|
if (f != NULL) {
|
|
8575
8576
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
8576
8577
|
|
|
@@ -8588,7 +8589,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8588
8589
|
}
|
|
8589
8590
|
}
|
|
8590
8591
|
|
|
8591
|
-
|
|
8592
|
+
Py_DECREF_IMMORTAL(result);
|
|
8592
8593
|
}
|
|
8593
8594
|
|
|
8594
8595
|
int c;
|
|
@@ -8683,7 +8684,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8683
8684
|
richcmpfunc f;
|
|
8684
8685
|
|
|
8685
8686
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8686
|
-
f =
|
|
8687
|
+
f = TP_RICHCOMPARE(type2);
|
|
8687
8688
|
|
|
8688
8689
|
if (f != NULL) {
|
|
8689
8690
|
checked_reverse_op = true;
|
|
@@ -8704,7 +8705,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8704
8705
|
}
|
|
8705
8706
|
}
|
|
8706
8707
|
|
|
8707
|
-
|
|
8708
|
+
Py_DECREF_IMMORTAL(result);
|
|
8708
8709
|
}
|
|
8709
8710
|
}
|
|
8710
8711
|
|
|
@@ -8727,11 +8728,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8727
8728
|
}
|
|
8728
8729
|
}
|
|
8729
8730
|
|
|
8730
|
-
|
|
8731
|
+
Py_DECREF_IMMORTAL(result);
|
|
8731
8732
|
}
|
|
8732
8733
|
|
|
8733
8734
|
if (checked_reverse_op == false) {
|
|
8734
|
-
f =
|
|
8735
|
+
f = TP_RICHCOMPARE(type2);
|
|
8735
8736
|
|
|
8736
8737
|
if (f != NULL) {
|
|
8737
8738
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -8750,7 +8751,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8750
8751
|
}
|
|
8751
8752
|
}
|
|
8752
8753
|
|
|
8753
|
-
|
|
8754
|
+
Py_DECREF_IMMORTAL(result);
|
|
8754
8755
|
}
|
|
8755
8756
|
}
|
|
8756
8757
|
|
|
@@ -8823,7 +8824,7 @@ static PyObject *COMPARE_GE_OBJECT_TUPLE_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
8823
8824
|
|
|
8824
8825
|
// Convert to target type.
|
|
8825
8826
|
PyObject *result = BOOL_FROM(r);
|
|
8826
|
-
|
|
8827
|
+
Py_INCREF_IMMORTAL(result);
|
|
8827
8828
|
return result;
|
|
8828
8829
|
}
|
|
8829
8830
|
|
|
@@ -8863,7 +8864,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8863
8864
|
return result;
|
|
8864
8865
|
}
|
|
8865
8866
|
|
|
8866
|
-
|
|
8867
|
+
Py_DECREF_IMMORTAL(result);
|
|
8867
8868
|
}
|
|
8868
8869
|
|
|
8869
8870
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8904,7 +8905,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8904
8905
|
|
|
8905
8906
|
bool r = c != 0;
|
|
8906
8907
|
PyObject *result = BOOL_FROM(r);
|
|
8907
|
-
|
|
8908
|
+
Py_INCREF_IMMORTAL(result);
|
|
8908
8909
|
return result;
|
|
8909
8910
|
}
|
|
8910
8911
|
}
|
|
@@ -8924,11 +8925,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8924
8925
|
return result;
|
|
8925
8926
|
}
|
|
8926
8927
|
|
|
8927
|
-
|
|
8928
|
+
Py_DECREF_IMMORTAL(result);
|
|
8928
8929
|
}
|
|
8929
8930
|
}
|
|
8930
8931
|
|
|
8931
|
-
f =
|
|
8932
|
+
f = TP_RICHCOMPARE(type1);
|
|
8932
8933
|
if (f != NULL) {
|
|
8933
8934
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
8934
8935
|
|
|
@@ -8938,7 +8939,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8938
8939
|
return result;
|
|
8939
8940
|
}
|
|
8940
8941
|
|
|
8941
|
-
|
|
8942
|
+
Py_DECREF_IMMORTAL(result);
|
|
8942
8943
|
}
|
|
8943
8944
|
|
|
8944
8945
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -8951,7 +8952,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8951
8952
|
return result;
|
|
8952
8953
|
}
|
|
8953
8954
|
|
|
8954
|
-
|
|
8955
|
+
Py_DECREF_IMMORTAL(result);
|
|
8955
8956
|
}
|
|
8956
8957
|
|
|
8957
8958
|
int c;
|
|
@@ -9039,7 +9040,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9039
9040
|
|
|
9040
9041
|
bool r = c != 0;
|
|
9041
9042
|
PyObject *result = BOOL_FROM(r);
|
|
9042
|
-
|
|
9043
|
+
Py_INCREF_IMMORTAL(result);
|
|
9043
9044
|
return result;
|
|
9044
9045
|
#else
|
|
9045
9046
|
bool checked_reverse_op = false;
|
|
@@ -9059,11 +9060,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9059
9060
|
return result;
|
|
9060
9061
|
}
|
|
9061
9062
|
|
|
9062
|
-
|
|
9063
|
+
Py_DECREF_IMMORTAL(result);
|
|
9063
9064
|
}
|
|
9064
9065
|
}
|
|
9065
9066
|
|
|
9066
|
-
f =
|
|
9067
|
+
f = TP_RICHCOMPARE(type1);
|
|
9067
9068
|
|
|
9068
9069
|
if (f != NULL) {
|
|
9069
9070
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -9074,7 +9075,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9074
9075
|
return result;
|
|
9075
9076
|
}
|
|
9076
9077
|
|
|
9077
|
-
|
|
9078
|
+
Py_DECREF_IMMORTAL(result);
|
|
9078
9079
|
}
|
|
9079
9080
|
|
|
9080
9081
|
if (checked_reverse_op == false) {
|
|
@@ -9089,7 +9090,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9089
9090
|
return result;
|
|
9090
9091
|
}
|
|
9091
9092
|
|
|
9092
|
-
|
|
9093
|
+
Py_DECREF_IMMORTAL(result);
|
|
9093
9094
|
}
|
|
9094
9095
|
}
|
|
9095
9096
|
|
|
@@ -9101,13 +9102,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9101
9102
|
case Py_EQ: {
|
|
9102
9103
|
bool r = operand1 == operand2;
|
|
9103
9104
|
PyObject *result = BOOL_FROM(r);
|
|
9104
|
-
|
|
9105
|
+
Py_INCREF_IMMORTAL(result);
|
|
9105
9106
|
return result;
|
|
9106
9107
|
}
|
|
9107
9108
|
case Py_NE: {
|
|
9108
9109
|
bool r = operand1 != operand2;
|
|
9109
9110
|
PyObject *result = BOOL_FROM(r);
|
|
9110
|
-
|
|
9111
|
+
Py_INCREF_IMMORTAL(result);
|
|
9111
9112
|
return result;
|
|
9112
9113
|
}
|
|
9113
9114
|
default:
|
|
@@ -9155,7 +9156,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9155
9156
|
return result;
|
|
9156
9157
|
}
|
|
9157
9158
|
|
|
9158
|
-
|
|
9159
|
+
Py_DECREF_IMMORTAL(result);
|
|
9159
9160
|
}
|
|
9160
9161
|
|
|
9161
9162
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9196,7 +9197,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9196
9197
|
|
|
9197
9198
|
bool r = c != 0;
|
|
9198
9199
|
PyObject *result = BOOL_FROM(r);
|
|
9199
|
-
|
|
9200
|
+
Py_INCREF_IMMORTAL(result);
|
|
9200
9201
|
return result;
|
|
9201
9202
|
}
|
|
9202
9203
|
}
|
|
@@ -9205,7 +9206,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9205
9206
|
richcmpfunc f;
|
|
9206
9207
|
|
|
9207
9208
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9208
|
-
f =
|
|
9209
|
+
f = TP_RICHCOMPARE(type2);
|
|
9209
9210
|
|
|
9210
9211
|
if (f != NULL) {
|
|
9211
9212
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -9216,7 +9217,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9216
9217
|
return result;
|
|
9217
9218
|
}
|
|
9218
9219
|
|
|
9219
|
-
|
|
9220
|
+
Py_DECREF_IMMORTAL(result);
|
|
9220
9221
|
}
|
|
9221
9222
|
}
|
|
9222
9223
|
|
|
@@ -9230,10 +9231,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9230
9231
|
return result;
|
|
9231
9232
|
}
|
|
9232
9233
|
|
|
9233
|
-
|
|
9234
|
+
Py_DECREF_IMMORTAL(result);
|
|
9234
9235
|
}
|
|
9235
9236
|
|
|
9236
|
-
f =
|
|
9237
|
+
f = TP_RICHCOMPARE(type2);
|
|
9237
9238
|
if (f != NULL) {
|
|
9238
9239
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
9239
9240
|
|
|
@@ -9243,7 +9244,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9243
9244
|
return result;
|
|
9244
9245
|
}
|
|
9245
9246
|
|
|
9246
|
-
|
|
9247
|
+
Py_DECREF_IMMORTAL(result);
|
|
9247
9248
|
}
|
|
9248
9249
|
|
|
9249
9250
|
int c;
|
|
@@ -9331,14 +9332,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9331
9332
|
|
|
9332
9333
|
bool r = c != 0;
|
|
9333
9334
|
PyObject *result = BOOL_FROM(r);
|
|
9334
|
-
|
|
9335
|
+
Py_INCREF_IMMORTAL(result);
|
|
9335
9336
|
return result;
|
|
9336
9337
|
#else
|
|
9337
9338
|
bool checked_reverse_op = false;
|
|
9338
9339
|
richcmpfunc f;
|
|
9339
9340
|
|
|
9340
9341
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9341
|
-
f =
|
|
9342
|
+
f = TP_RICHCOMPARE(type2);
|
|
9342
9343
|
|
|
9343
9344
|
if (f != NULL) {
|
|
9344
9345
|
checked_reverse_op = true;
|
|
@@ -9351,7 +9352,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9351
9352
|
return result;
|
|
9352
9353
|
}
|
|
9353
9354
|
|
|
9354
|
-
|
|
9355
|
+
Py_DECREF_IMMORTAL(result);
|
|
9355
9356
|
}
|
|
9356
9357
|
}
|
|
9357
9358
|
|
|
@@ -9366,11 +9367,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9366
9367
|
return result;
|
|
9367
9368
|
}
|
|
9368
9369
|
|
|
9369
|
-
|
|
9370
|
+
Py_DECREF_IMMORTAL(result);
|
|
9370
9371
|
}
|
|
9371
9372
|
|
|
9372
9373
|
if (checked_reverse_op == false) {
|
|
9373
|
-
f =
|
|
9374
|
+
f = TP_RICHCOMPARE(type2);
|
|
9374
9375
|
|
|
9375
9376
|
if (f != NULL) {
|
|
9376
9377
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -9381,7 +9382,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9381
9382
|
return result;
|
|
9382
9383
|
}
|
|
9383
9384
|
|
|
9384
|
-
|
|
9385
|
+
Py_DECREF_IMMORTAL(result);
|
|
9385
9386
|
}
|
|
9386
9387
|
}
|
|
9387
9388
|
|
|
@@ -9393,13 +9394,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9393
9394
|
case Py_EQ: {
|
|
9394
9395
|
bool r = operand1 == operand2;
|
|
9395
9396
|
PyObject *result = BOOL_FROM(r);
|
|
9396
|
-
|
|
9397
|
+
Py_INCREF_IMMORTAL(result);
|
|
9397
9398
|
return result;
|
|
9398
9399
|
}
|
|
9399
9400
|
case Py_NE: {
|
|
9400
9401
|
bool r = operand1 != operand2;
|
|
9401
9402
|
PyObject *result = BOOL_FROM(r);
|
|
9402
|
-
|
|
9403
|
+
Py_INCREF_IMMORTAL(result);
|
|
9403
9404
|
return result;
|
|
9404
9405
|
}
|
|
9405
9406
|
default:
|
|
@@ -9508,7 +9509,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9508
9509
|
}
|
|
9509
9510
|
}
|
|
9510
9511
|
|
|
9511
|
-
|
|
9512
|
+
Py_DECREF_IMMORTAL(result);
|
|
9512
9513
|
}
|
|
9513
9514
|
|
|
9514
9515
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9577,11 +9578,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9577
9578
|
}
|
|
9578
9579
|
}
|
|
9579
9580
|
|
|
9580
|
-
|
|
9581
|
+
Py_DECREF_IMMORTAL(result);
|
|
9581
9582
|
}
|
|
9582
9583
|
}
|
|
9583
9584
|
|
|
9584
|
-
f =
|
|
9585
|
+
f = TP_RICHCOMPARE(type1);
|
|
9585
9586
|
if (f != NULL) {
|
|
9586
9587
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
9587
9588
|
|
|
@@ -9599,7 +9600,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9599
9600
|
}
|
|
9600
9601
|
}
|
|
9601
9602
|
|
|
9602
|
-
|
|
9603
|
+
Py_DECREF_IMMORTAL(result);
|
|
9603
9604
|
}
|
|
9604
9605
|
|
|
9605
9606
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9620,7 +9621,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9620
9621
|
}
|
|
9621
9622
|
}
|
|
9622
9623
|
|
|
9623
|
-
|
|
9624
|
+
Py_DECREF_IMMORTAL(result);
|
|
9624
9625
|
}
|
|
9625
9626
|
|
|
9626
9627
|
int c;
|
|
@@ -9736,11 +9737,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9736
9737
|
}
|
|
9737
9738
|
}
|
|
9738
9739
|
|
|
9739
|
-
|
|
9740
|
+
Py_DECREF_IMMORTAL(result);
|
|
9740
9741
|
}
|
|
9741
9742
|
}
|
|
9742
9743
|
|
|
9743
|
-
f =
|
|
9744
|
+
f = TP_RICHCOMPARE(type1);
|
|
9744
9745
|
|
|
9745
9746
|
if (f != NULL) {
|
|
9746
9747
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -9759,7 +9760,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9759
9760
|
}
|
|
9760
9761
|
}
|
|
9761
9762
|
|
|
9762
|
-
|
|
9763
|
+
Py_DECREF_IMMORTAL(result);
|
|
9763
9764
|
}
|
|
9764
9765
|
|
|
9765
9766
|
if (checked_reverse_op == false) {
|
|
@@ -9782,7 +9783,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9782
9783
|
}
|
|
9783
9784
|
}
|
|
9784
9785
|
|
|
9785
|
-
|
|
9786
|
+
Py_DECREF_IMMORTAL(result);
|
|
9786
9787
|
}
|
|
9787
9788
|
}
|
|
9788
9789
|
|
|
@@ -9856,7 +9857,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9856
9857
|
}
|
|
9857
9858
|
}
|
|
9858
9859
|
|
|
9859
|
-
|
|
9860
|
+
Py_DECREF_IMMORTAL(result);
|
|
9860
9861
|
}
|
|
9861
9862
|
|
|
9862
9863
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9906,7 +9907,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9906
9907
|
richcmpfunc f;
|
|
9907
9908
|
|
|
9908
9909
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9909
|
-
f =
|
|
9910
|
+
f = TP_RICHCOMPARE(type2);
|
|
9910
9911
|
|
|
9911
9912
|
if (f != NULL) {
|
|
9912
9913
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -9925,7 +9926,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9925
9926
|
}
|
|
9926
9927
|
}
|
|
9927
9928
|
|
|
9928
|
-
|
|
9929
|
+
Py_DECREF_IMMORTAL(result);
|
|
9929
9930
|
}
|
|
9930
9931
|
}
|
|
9931
9932
|
|
|
@@ -9947,10 +9948,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9947
9948
|
}
|
|
9948
9949
|
}
|
|
9949
9950
|
|
|
9950
|
-
|
|
9951
|
+
Py_DECREF_IMMORTAL(result);
|
|
9951
9952
|
}
|
|
9952
9953
|
|
|
9953
|
-
f =
|
|
9954
|
+
f = TP_RICHCOMPARE(type2);
|
|
9954
9955
|
if (f != NULL) {
|
|
9955
9956
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
9956
9957
|
|
|
@@ -9968,7 +9969,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9968
9969
|
}
|
|
9969
9970
|
}
|
|
9970
9971
|
|
|
9971
|
-
|
|
9972
|
+
Py_DECREF_IMMORTAL(result);
|
|
9972
9973
|
}
|
|
9973
9974
|
|
|
9974
9975
|
int c;
|
|
@@ -10063,7 +10064,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10063
10064
|
richcmpfunc f;
|
|
10064
10065
|
|
|
10065
10066
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
10066
|
-
f =
|
|
10067
|
+
f = TP_RICHCOMPARE(type2);
|
|
10067
10068
|
|
|
10068
10069
|
if (f != NULL) {
|
|
10069
10070
|
checked_reverse_op = true;
|
|
@@ -10084,7 +10085,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10084
10085
|
}
|
|
10085
10086
|
}
|
|
10086
10087
|
|
|
10087
|
-
|
|
10088
|
+
Py_DECREF_IMMORTAL(result);
|
|
10088
10089
|
}
|
|
10089
10090
|
}
|
|
10090
10091
|
|
|
@@ -10107,11 +10108,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10107
10108
|
}
|
|
10108
10109
|
}
|
|
10109
10110
|
|
|
10110
|
-
|
|
10111
|
+
Py_DECREF_IMMORTAL(result);
|
|
10111
10112
|
}
|
|
10112
10113
|
|
|
10113
10114
|
if (checked_reverse_op == false) {
|
|
10114
|
-
f =
|
|
10115
|
+
f = TP_RICHCOMPARE(type2);
|
|
10115
10116
|
|
|
10116
10117
|
if (f != NULL) {
|
|
10117
10118
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -10130,7 +10131,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10130
10131
|
}
|
|
10131
10132
|
}
|
|
10132
10133
|
|
|
10133
|
-
|
|
10134
|
+
Py_DECREF_IMMORTAL(result);
|
|
10134
10135
|
}
|
|
10135
10136
|
}
|
|
10136
10137
|
|
|
@@ -10177,14 +10178,11 @@ static PyObject *COMPARE_GE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10177
10178
|
PyListObject *a = (PyListObject *)operand1;
|
|
10178
10179
|
PyListObject *b = (PyListObject *)operand2;
|
|
10179
10180
|
|
|
10180
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10181
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10182
|
-
|
|
10183
10181
|
bool found = false;
|
|
10184
10182
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10185
10183
|
|
|
10186
10184
|
Py_ssize_t i;
|
|
10187
|
-
for (i = 0; i <
|
|
10185
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10188
10186
|
PyObject *aa = a->ob_item[i];
|
|
10189
10187
|
PyObject *bb = b->ob_item[i];
|
|
10190
10188
|
|
|
@@ -10192,7 +10190,11 @@ static PyObject *COMPARE_GE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10192
10190
|
continue;
|
|
10193
10191
|
}
|
|
10194
10192
|
|
|
10193
|
+
Py_INCREF(aa);
|
|
10194
|
+
Py_INCREF(bb);
|
|
10195
10195
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10196
|
+
Py_DECREF(aa);
|
|
10197
|
+
Py_DECREF(bb);
|
|
10196
10198
|
|
|
10197
10199
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10198
10200
|
return NULL;
|
|
@@ -10205,11 +10207,11 @@ static PyObject *COMPARE_GE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10205
10207
|
}
|
|
10206
10208
|
|
|
10207
10209
|
if (found == false) {
|
|
10208
|
-
bool r =
|
|
10210
|
+
bool r = Py_SIZE(a) >= Py_SIZE(b);
|
|
10209
10211
|
|
|
10210
10212
|
// Convert to target type.
|
|
10211
10213
|
PyObject *result = BOOL_FROM(r);
|
|
10212
|
-
|
|
10214
|
+
Py_INCREF_IMMORTAL(result);
|
|
10213
10215
|
return result;
|
|
10214
10216
|
}
|
|
10215
10217
|
|
|
@@ -10249,7 +10251,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10249
10251
|
return result;
|
|
10250
10252
|
}
|
|
10251
10253
|
|
|
10252
|
-
|
|
10254
|
+
Py_DECREF_IMMORTAL(result);
|
|
10253
10255
|
}
|
|
10254
10256
|
|
|
10255
10257
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10290,7 +10292,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10290
10292
|
|
|
10291
10293
|
bool r = c != 0;
|
|
10292
10294
|
PyObject *result = BOOL_FROM(r);
|
|
10293
|
-
|
|
10295
|
+
Py_INCREF_IMMORTAL(result);
|
|
10294
10296
|
return result;
|
|
10295
10297
|
}
|
|
10296
10298
|
}
|
|
@@ -10310,11 +10312,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10310
10312
|
return result;
|
|
10311
10313
|
}
|
|
10312
10314
|
|
|
10313
|
-
|
|
10315
|
+
Py_DECREF_IMMORTAL(result);
|
|
10314
10316
|
}
|
|
10315
10317
|
}
|
|
10316
10318
|
|
|
10317
|
-
f =
|
|
10319
|
+
f = TP_RICHCOMPARE(type1);
|
|
10318
10320
|
if (f != NULL) {
|
|
10319
10321
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
10320
10322
|
|
|
@@ -10324,7 +10326,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10324
10326
|
return result;
|
|
10325
10327
|
}
|
|
10326
10328
|
|
|
10327
|
-
|
|
10329
|
+
Py_DECREF_IMMORTAL(result);
|
|
10328
10330
|
}
|
|
10329
10331
|
|
|
10330
10332
|
f = PyList_Type.tp_richcompare;
|
|
@@ -10337,7 +10339,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10337
10339
|
return result;
|
|
10338
10340
|
}
|
|
10339
10341
|
|
|
10340
|
-
|
|
10342
|
+
Py_DECREF_IMMORTAL(result);
|
|
10341
10343
|
}
|
|
10342
10344
|
|
|
10343
10345
|
int c;
|
|
@@ -10425,7 +10427,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10425
10427
|
|
|
10426
10428
|
bool r = c != 0;
|
|
10427
10429
|
PyObject *result = BOOL_FROM(r);
|
|
10428
|
-
|
|
10430
|
+
Py_INCREF_IMMORTAL(result);
|
|
10429
10431
|
return result;
|
|
10430
10432
|
#else
|
|
10431
10433
|
bool checked_reverse_op = false;
|
|
@@ -10445,11 +10447,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10445
10447
|
return result;
|
|
10446
10448
|
}
|
|
10447
10449
|
|
|
10448
|
-
|
|
10450
|
+
Py_DECREF_IMMORTAL(result);
|
|
10449
10451
|
}
|
|
10450
10452
|
}
|
|
10451
10453
|
|
|
10452
|
-
f =
|
|
10454
|
+
f = TP_RICHCOMPARE(type1);
|
|
10453
10455
|
|
|
10454
10456
|
if (f != NULL) {
|
|
10455
10457
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -10460,7 +10462,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10460
10462
|
return result;
|
|
10461
10463
|
}
|
|
10462
10464
|
|
|
10463
|
-
|
|
10465
|
+
Py_DECREF_IMMORTAL(result);
|
|
10464
10466
|
}
|
|
10465
10467
|
|
|
10466
10468
|
if (checked_reverse_op == false) {
|
|
@@ -10475,7 +10477,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10475
10477
|
return result;
|
|
10476
10478
|
}
|
|
10477
10479
|
|
|
10478
|
-
|
|
10480
|
+
Py_DECREF_IMMORTAL(result);
|
|
10479
10481
|
}
|
|
10480
10482
|
}
|
|
10481
10483
|
|
|
@@ -10487,13 +10489,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10487
10489
|
case Py_EQ: {
|
|
10488
10490
|
bool r = operand1 == operand2;
|
|
10489
10491
|
PyObject *result = BOOL_FROM(r);
|
|
10490
|
-
|
|
10492
|
+
Py_INCREF_IMMORTAL(result);
|
|
10491
10493
|
return result;
|
|
10492
10494
|
}
|
|
10493
10495
|
case Py_NE: {
|
|
10494
10496
|
bool r = operand1 != operand2;
|
|
10495
10497
|
PyObject *result = BOOL_FROM(r);
|
|
10496
|
-
|
|
10498
|
+
Py_INCREF_IMMORTAL(result);
|
|
10497
10499
|
return result;
|
|
10498
10500
|
}
|
|
10499
10501
|
default:
|
|
@@ -10541,7 +10543,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10541
10543
|
return result;
|
|
10542
10544
|
}
|
|
10543
10545
|
|
|
10544
|
-
|
|
10546
|
+
Py_DECREF_IMMORTAL(result);
|
|
10545
10547
|
}
|
|
10546
10548
|
|
|
10547
10549
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10582,7 +10584,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10582
10584
|
|
|
10583
10585
|
bool r = c != 0;
|
|
10584
10586
|
PyObject *result = BOOL_FROM(r);
|
|
10585
|
-
|
|
10587
|
+
Py_INCREF_IMMORTAL(result);
|
|
10586
10588
|
return result;
|
|
10587
10589
|
}
|
|
10588
10590
|
}
|
|
@@ -10591,7 +10593,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10591
10593
|
richcmpfunc f;
|
|
10592
10594
|
|
|
10593
10595
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10594
|
-
f =
|
|
10596
|
+
f = TP_RICHCOMPARE(type2);
|
|
10595
10597
|
|
|
10596
10598
|
if (f != NULL) {
|
|
10597
10599
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -10602,7 +10604,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10602
10604
|
return result;
|
|
10603
10605
|
}
|
|
10604
10606
|
|
|
10605
|
-
|
|
10607
|
+
Py_DECREF_IMMORTAL(result);
|
|
10606
10608
|
}
|
|
10607
10609
|
}
|
|
10608
10610
|
|
|
@@ -10616,10 +10618,10 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10616
10618
|
return result;
|
|
10617
10619
|
}
|
|
10618
10620
|
|
|
10619
|
-
|
|
10621
|
+
Py_DECREF_IMMORTAL(result);
|
|
10620
10622
|
}
|
|
10621
10623
|
|
|
10622
|
-
f =
|
|
10624
|
+
f = TP_RICHCOMPARE(type2);
|
|
10623
10625
|
if (f != NULL) {
|
|
10624
10626
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
10625
10627
|
|
|
@@ -10629,7 +10631,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10629
10631
|
return result;
|
|
10630
10632
|
}
|
|
10631
10633
|
|
|
10632
|
-
|
|
10634
|
+
Py_DECREF_IMMORTAL(result);
|
|
10633
10635
|
}
|
|
10634
10636
|
|
|
10635
10637
|
int c;
|
|
@@ -10717,14 +10719,14 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10717
10719
|
|
|
10718
10720
|
bool r = c != 0;
|
|
10719
10721
|
PyObject *result = BOOL_FROM(r);
|
|
10720
|
-
|
|
10722
|
+
Py_INCREF_IMMORTAL(result);
|
|
10721
10723
|
return result;
|
|
10722
10724
|
#else
|
|
10723
10725
|
bool checked_reverse_op = false;
|
|
10724
10726
|
richcmpfunc f;
|
|
10725
10727
|
|
|
10726
10728
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10727
|
-
f =
|
|
10729
|
+
f = TP_RICHCOMPARE(type2);
|
|
10728
10730
|
|
|
10729
10731
|
if (f != NULL) {
|
|
10730
10732
|
checked_reverse_op = true;
|
|
@@ -10737,7 +10739,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10737
10739
|
return result;
|
|
10738
10740
|
}
|
|
10739
10741
|
|
|
10740
|
-
|
|
10742
|
+
Py_DECREF_IMMORTAL(result);
|
|
10741
10743
|
}
|
|
10742
10744
|
}
|
|
10743
10745
|
|
|
@@ -10752,11 +10754,11 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10752
10754
|
return result;
|
|
10753
10755
|
}
|
|
10754
10756
|
|
|
10755
|
-
|
|
10757
|
+
Py_DECREF_IMMORTAL(result);
|
|
10756
10758
|
}
|
|
10757
10759
|
|
|
10758
10760
|
if (checked_reverse_op == false) {
|
|
10759
|
-
f =
|
|
10761
|
+
f = TP_RICHCOMPARE(type2);
|
|
10760
10762
|
|
|
10761
10763
|
if (f != NULL) {
|
|
10762
10764
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -10767,7 +10769,7 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10767
10769
|
return result;
|
|
10768
10770
|
}
|
|
10769
10771
|
|
|
10770
|
-
|
|
10772
|
+
Py_DECREF_IMMORTAL(result);
|
|
10771
10773
|
}
|
|
10772
10774
|
}
|
|
10773
10775
|
|
|
@@ -10779,13 +10781,13 @@ PyObject *RICH_COMPARE_GE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10779
10781
|
case Py_EQ: {
|
|
10780
10782
|
bool r = operand1 == operand2;
|
|
10781
10783
|
PyObject *result = BOOL_FROM(r);
|
|
10782
|
-
|
|
10784
|
+
Py_INCREF_IMMORTAL(result);
|
|
10783
10785
|
return result;
|
|
10784
10786
|
}
|
|
10785
10787
|
case Py_NE: {
|
|
10786
10788
|
bool r = operand1 != operand2;
|
|
10787
10789
|
PyObject *result = BOOL_FROM(r);
|
|
10788
|
-
|
|
10790
|
+
Py_INCREF_IMMORTAL(result);
|
|
10789
10791
|
return result;
|
|
10790
10792
|
}
|
|
10791
10793
|
default:
|
|
@@ -10814,14 +10816,11 @@ static nuitka_bool COMPARE_GE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10814
10816
|
PyListObject *a = (PyListObject *)operand1;
|
|
10815
10817
|
PyListObject *b = (PyListObject *)operand2;
|
|
10816
10818
|
|
|
10817
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10818
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10819
|
-
|
|
10820
10819
|
bool found = false;
|
|
10821
10820
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10822
10821
|
|
|
10823
10822
|
Py_ssize_t i;
|
|
10824
|
-
for (i = 0; i <
|
|
10823
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10825
10824
|
PyObject *aa = a->ob_item[i];
|
|
10826
10825
|
PyObject *bb = b->ob_item[i];
|
|
10827
10826
|
|
|
@@ -10829,7 +10828,11 @@ static nuitka_bool COMPARE_GE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10829
10828
|
continue;
|
|
10830
10829
|
}
|
|
10831
10830
|
|
|
10831
|
+
Py_INCREF(aa);
|
|
10832
|
+
Py_INCREF(bb);
|
|
10832
10833
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10834
|
+
Py_DECREF(aa);
|
|
10835
|
+
Py_DECREF(bb);
|
|
10833
10836
|
|
|
10834
10837
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10835
10838
|
return NUITKA_BOOL_EXCEPTION;
|
|
@@ -10842,7 +10845,7 @@ static nuitka_bool COMPARE_GE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10842
10845
|
}
|
|
10843
10846
|
|
|
10844
10847
|
if (found == false) {
|
|
10845
|
-
bool r =
|
|
10848
|
+
bool r = Py_SIZE(a) >= Py_SIZE(b);
|
|
10846
10849
|
|
|
10847
10850
|
// Convert to target type.
|
|
10848
10851
|
nuitka_bool result = r ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
|
@@ -10894,7 +10897,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10894
10897
|
}
|
|
10895
10898
|
}
|
|
10896
10899
|
|
|
10897
|
-
|
|
10900
|
+
Py_DECREF_IMMORTAL(result);
|
|
10898
10901
|
}
|
|
10899
10902
|
|
|
10900
10903
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10963,11 +10966,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10963
10966
|
}
|
|
10964
10967
|
}
|
|
10965
10968
|
|
|
10966
|
-
|
|
10969
|
+
Py_DECREF_IMMORTAL(result);
|
|
10967
10970
|
}
|
|
10968
10971
|
}
|
|
10969
10972
|
|
|
10970
|
-
f =
|
|
10973
|
+
f = TP_RICHCOMPARE(type1);
|
|
10971
10974
|
if (f != NULL) {
|
|
10972
10975
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
10973
10976
|
|
|
@@ -10985,7 +10988,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10985
10988
|
}
|
|
10986
10989
|
}
|
|
10987
10990
|
|
|
10988
|
-
|
|
10991
|
+
Py_DECREF_IMMORTAL(result);
|
|
10989
10992
|
}
|
|
10990
10993
|
|
|
10991
10994
|
f = PyList_Type.tp_richcompare;
|
|
@@ -11006,7 +11009,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11006
11009
|
}
|
|
11007
11010
|
}
|
|
11008
11011
|
|
|
11009
|
-
|
|
11012
|
+
Py_DECREF_IMMORTAL(result);
|
|
11010
11013
|
}
|
|
11011
11014
|
|
|
11012
11015
|
int c;
|
|
@@ -11122,11 +11125,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11122
11125
|
}
|
|
11123
11126
|
}
|
|
11124
11127
|
|
|
11125
|
-
|
|
11128
|
+
Py_DECREF_IMMORTAL(result);
|
|
11126
11129
|
}
|
|
11127
11130
|
}
|
|
11128
11131
|
|
|
11129
|
-
f =
|
|
11132
|
+
f = TP_RICHCOMPARE(type1);
|
|
11130
11133
|
|
|
11131
11134
|
if (f != NULL) {
|
|
11132
11135
|
PyObject *result = (*f)(operand1, operand2, Py_GE);
|
|
@@ -11145,7 +11148,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11145
11148
|
}
|
|
11146
11149
|
}
|
|
11147
11150
|
|
|
11148
|
-
|
|
11151
|
+
Py_DECREF_IMMORTAL(result);
|
|
11149
11152
|
}
|
|
11150
11153
|
|
|
11151
11154
|
if (checked_reverse_op == false) {
|
|
@@ -11168,7 +11171,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11168
11171
|
}
|
|
11169
11172
|
}
|
|
11170
11173
|
|
|
11171
|
-
|
|
11174
|
+
Py_DECREF_IMMORTAL(result);
|
|
11172
11175
|
}
|
|
11173
11176
|
}
|
|
11174
11177
|
|
|
@@ -11242,7 +11245,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11242
11245
|
}
|
|
11243
11246
|
}
|
|
11244
11247
|
|
|
11245
|
-
|
|
11248
|
+
Py_DECREF_IMMORTAL(result);
|
|
11246
11249
|
}
|
|
11247
11250
|
|
|
11248
11251
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11292,7 +11295,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11292
11295
|
richcmpfunc f;
|
|
11293
11296
|
|
|
11294
11297
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11295
|
-
f =
|
|
11298
|
+
f = TP_RICHCOMPARE(type2);
|
|
11296
11299
|
|
|
11297
11300
|
if (f != NULL) {
|
|
11298
11301
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -11311,7 +11314,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11311
11314
|
}
|
|
11312
11315
|
}
|
|
11313
11316
|
|
|
11314
|
-
|
|
11317
|
+
Py_DECREF_IMMORTAL(result);
|
|
11315
11318
|
}
|
|
11316
11319
|
}
|
|
11317
11320
|
|
|
@@ -11333,10 +11336,10 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11333
11336
|
}
|
|
11334
11337
|
}
|
|
11335
11338
|
|
|
11336
|
-
|
|
11339
|
+
Py_DECREF_IMMORTAL(result);
|
|
11337
11340
|
}
|
|
11338
11341
|
|
|
11339
|
-
f =
|
|
11342
|
+
f = TP_RICHCOMPARE(type2);
|
|
11340
11343
|
if (f != NULL) {
|
|
11341
11344
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
11342
11345
|
|
|
@@ -11354,7 +11357,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11354
11357
|
}
|
|
11355
11358
|
}
|
|
11356
11359
|
|
|
11357
|
-
|
|
11360
|
+
Py_DECREF_IMMORTAL(result);
|
|
11358
11361
|
}
|
|
11359
11362
|
|
|
11360
11363
|
int c;
|
|
@@ -11449,7 +11452,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11449
11452
|
richcmpfunc f;
|
|
11450
11453
|
|
|
11451
11454
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11452
|
-
f =
|
|
11455
|
+
f = TP_RICHCOMPARE(type2);
|
|
11453
11456
|
|
|
11454
11457
|
if (f != NULL) {
|
|
11455
11458
|
checked_reverse_op = true;
|
|
@@ -11470,7 +11473,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11470
11473
|
}
|
|
11471
11474
|
}
|
|
11472
11475
|
|
|
11473
|
-
|
|
11476
|
+
Py_DECREF_IMMORTAL(result);
|
|
11474
11477
|
}
|
|
11475
11478
|
}
|
|
11476
11479
|
|
|
@@ -11493,11 +11496,11 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11493
11496
|
}
|
|
11494
11497
|
}
|
|
11495
11498
|
|
|
11496
|
-
|
|
11499
|
+
Py_DECREF_IMMORTAL(result);
|
|
11497
11500
|
}
|
|
11498
11501
|
|
|
11499
11502
|
if (checked_reverse_op == false) {
|
|
11500
|
-
f =
|
|
11503
|
+
f = TP_RICHCOMPARE(type2);
|
|
11501
11504
|
|
|
11502
11505
|
if (f != NULL) {
|
|
11503
11506
|
PyObject *result = (*f)(operand2, operand1, Py_LE);
|
|
@@ -11516,7 +11519,7 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11516
11519
|
}
|
|
11517
11520
|
}
|
|
11518
11521
|
|
|
11519
|
-
|
|
11522
|
+
Py_DECREF_IMMORTAL(result);
|
|
11520
11523
|
}
|
|
11521
11524
|
}
|
|
11522
11525
|
|
|
@@ -11554,7 +11557,6 @@ nuitka_bool RICH_COMPARE_GE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *operan
|
|
|
11554
11557
|
return COMPARE_GE_NBOOL_LIST_LIST(operand1, operand2);
|
|
11555
11558
|
}
|
|
11556
11559
|
|
|
11557
|
-
#if PYTHON_VERSION < 0x300
|
|
11558
11560
|
static PyObject *COMPARE_GE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11559
11561
|
CHECK_OBJECT(operand1);
|
|
11560
11562
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11573,7 +11575,7 @@ static PyObject *COMPARE_GE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11573
11575
|
}
|
|
11574
11576
|
|
|
11575
11577
|
Py_ssize_t operand2_digit_count = 0;
|
|
11576
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11578
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11577
11579
|
{
|
|
11578
11580
|
unsigned long t = operand2_abs_ival;
|
|
11579
11581
|
|
|
@@ -11586,19 +11588,20 @@ static PyObject *COMPARE_GE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11586
11588
|
}
|
|
11587
11589
|
}
|
|
11588
11590
|
|
|
11589
|
-
Py_ssize_t operand2_size =
|
|
11591
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11592
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11590
11593
|
|
|
11591
11594
|
bool r;
|
|
11592
11595
|
|
|
11593
|
-
if (
|
|
11594
|
-
r =
|
|
11596
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11597
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size > 0;
|
|
11595
11598
|
} else {
|
|
11596
|
-
Py_ssize_t i =
|
|
11599
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11597
11600
|
r = true;
|
|
11598
11601
|
while (--i >= 0) {
|
|
11599
|
-
if (operand1_long_object
|
|
11600
|
-
r = operand1_long_object
|
|
11601
|
-
if (
|
|
11602
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11603
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > operand2_digits[i];
|
|
11604
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11602
11605
|
r = !r;
|
|
11603
11606
|
}
|
|
11604
11607
|
break;
|
|
@@ -11608,9 +11611,10 @@ static PyObject *COMPARE_GE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11608
11611
|
|
|
11609
11612
|
// Convert to target type.
|
|
11610
11613
|
PyObject *result = BOOL_FROM(r);
|
|
11611
|
-
|
|
11614
|
+
Py_INCREF_IMMORTAL(result);
|
|
11612
11615
|
return result;
|
|
11613
11616
|
}
|
|
11617
|
+
#if PYTHON_VERSION < 0x300
|
|
11614
11618
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11615
11619
|
PyObject *RICH_COMPARE_GE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11616
11620
|
|
|
@@ -11618,7 +11622,6 @@ PyObject *RICH_COMPARE_GE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2
|
|
|
11618
11622
|
}
|
|
11619
11623
|
#endif
|
|
11620
11624
|
|
|
11621
|
-
#if PYTHON_VERSION < 0x300
|
|
11622
11625
|
static bool COMPARE_GE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11623
11626
|
CHECK_OBJECT(operand1);
|
|
11624
11627
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11637,7 +11640,7 @@ static bool COMPARE_GE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11637
11640
|
}
|
|
11638
11641
|
|
|
11639
11642
|
Py_ssize_t operand2_digit_count = 0;
|
|
11640
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11643
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11641
11644
|
{
|
|
11642
11645
|
unsigned long t = operand2_abs_ival;
|
|
11643
11646
|
|
|
@@ -11650,19 +11653,20 @@ static bool COMPARE_GE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11650
11653
|
}
|
|
11651
11654
|
}
|
|
11652
11655
|
|
|
11653
|
-
Py_ssize_t operand2_size =
|
|
11656
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11657
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11654
11658
|
|
|
11655
11659
|
bool r;
|
|
11656
11660
|
|
|
11657
|
-
if (
|
|
11658
|
-
r =
|
|
11661
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11662
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size > 0;
|
|
11659
11663
|
} else {
|
|
11660
|
-
Py_ssize_t i =
|
|
11664
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11661
11665
|
r = true;
|
|
11662
11666
|
while (--i >= 0) {
|
|
11663
|
-
if (operand1_long_object
|
|
11664
|
-
r = operand1_long_object
|
|
11665
|
-
if (
|
|
11667
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11668
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > operand2_digits[i];
|
|
11669
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11666
11670
|
r = !r;
|
|
11667
11671
|
}
|
|
11668
11672
|
break;
|
|
@@ -11675,6 +11679,7 @@ static bool COMPARE_GE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11675
11679
|
|
|
11676
11680
|
return result;
|
|
11677
11681
|
}
|
|
11682
|
+
#if PYTHON_VERSION < 0x300
|
|
11678
11683
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11679
11684
|
bool RICH_COMPARE_GE_CBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11680
11685
|
|
|
@@ -11694,9 +11699,11 @@ static PyObject *COMPARE_GE_OBJECT_INT_CLONG(PyObject *operand1, long operand2)
|
|
|
11694
11699
|
|
|
11695
11700
|
// Convert to target type.
|
|
11696
11701
|
PyObject *result = BOOL_FROM(r);
|
|
11697
|
-
|
|
11702
|
+
Py_INCREF_IMMORTAL(result);
|
|
11698
11703
|
return result;
|
|
11699
11704
|
}
|
|
11705
|
+
#endif
|
|
11706
|
+
#if PYTHON_VERSION < 0x300
|
|
11700
11707
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11701
11708
|
PyObject *RICH_COMPARE_GE_OBJECT_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11702
11709
|
|
|
@@ -11719,6 +11726,8 @@ static bool COMPARE_GE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
|
11719
11726
|
|
|
11720
11727
|
return result;
|
|
11721
11728
|
}
|
|
11729
|
+
#endif
|
|
11730
|
+
#if PYTHON_VERSION < 0x300
|
|
11722
11731
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11723
11732
|
bool RICH_COMPARE_GE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11724
11733
|
|
|
@@ -11735,15 +11744,18 @@ static PyObject *COMPARE_GE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11735
11744
|
|
|
11736
11745
|
bool r;
|
|
11737
11746
|
|
|
11738
|
-
if (
|
|
11739
|
-
|
|
11747
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11748
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11749
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11750
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) >
|
|
11751
|
+
0;
|
|
11740
11752
|
} else {
|
|
11741
|
-
Py_ssize_t i =
|
|
11753
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11742
11754
|
r = true;
|
|
11743
11755
|
while (--i >= 0) {
|
|
11744
|
-
if (operand1_long_object
|
|
11745
|
-
r = operand1_long_object
|
|
11746
|
-
if (
|
|
11756
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11757
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > (digit)Py_ABS(operand2);
|
|
11758
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11747
11759
|
r = !r;
|
|
11748
11760
|
}
|
|
11749
11761
|
break;
|
|
@@ -11753,7 +11765,7 @@ static PyObject *COMPARE_GE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11753
11765
|
|
|
11754
11766
|
// Convert to target type.
|
|
11755
11767
|
PyObject *result = BOOL_FROM(r);
|
|
11756
|
-
|
|
11768
|
+
Py_INCREF_IMMORTAL(result);
|
|
11757
11769
|
return result;
|
|
11758
11770
|
}
|
|
11759
11771
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "DIGIT" to C platform digit value for long
|
|
@@ -11772,15 +11784,18 @@ static bool COMPARE_GE_CBOOL_LONG_DIGIT(PyObject *operand1, long operand2) {
|
|
|
11772
11784
|
|
|
11773
11785
|
bool r;
|
|
11774
11786
|
|
|
11775
|
-
if (
|
|
11776
|
-
|
|
11787
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11788
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11789
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11790
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) >
|
|
11791
|
+
0;
|
|
11777
11792
|
} else {
|
|
11778
|
-
Py_ssize_t i =
|
|
11793
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11779
11794
|
r = true;
|
|
11780
11795
|
while (--i >= 0) {
|
|
11781
|
-
if (operand1_long_object
|
|
11782
|
-
r = operand1_long_object
|
|
11783
|
-
if (
|
|
11796
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11797
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > (digit)Py_ABS(operand2);
|
|
11798
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11784
11799
|
r = !r;
|
|
11785
11800
|
}
|
|
11786
11801
|
break;
|
|
@@ -11811,7 +11826,7 @@ static PyObject *COMPARE_GE_OBJECT_FLOAT_CFLOAT(PyObject *operand1, double opera
|
|
|
11811
11826
|
|
|
11812
11827
|
// Convert to target type.
|
|
11813
11828
|
PyObject *result = BOOL_FROM(r);
|
|
11814
|
-
|
|
11829
|
+
Py_INCREF_IMMORTAL(result);
|
|
11815
11830
|
return result;
|
|
11816
11831
|
}
|
|
11817
11832
|
/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
|
|
@@ -11839,3 +11854,18 @@ bool RICH_COMPARE_GE_CBOOL_FLOAT_CFLOAT(PyObject *operand1, double operand2) {
|
|
|
11839
11854
|
|
|
11840
11855
|
return COMPARE_GE_CBOOL_FLOAT_CFLOAT(operand1, operand2);
|
|
11841
11856
|
}
|
|
11857
|
+
|
|
11858
|
+
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
11859
|
+
// integrates with CPython, but also works on its own.
|
|
11860
|
+
//
|
|
11861
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
11862
|
+
// you may not use this file except in compliance with the License.
|
|
11863
|
+
// You may obtain a copy of the License at
|
|
11864
|
+
//
|
|
11865
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11866
|
+
//
|
|
11867
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11868
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11869
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11870
|
+
// See the License for the specific language governing permissions and
|
|
11871
|
+
// limitations under the License.
|