Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unused stats
  • Loading branch information
brandtbucher committed Jun 7, 2023
commit 7e5c9df329695174378971dfe106e73ad368455a
32 changes: 6 additions & 26 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,12 @@ _PyCode_Quicken(PyCodeObject *code)
// UNARY_NOT
#define SPEC_FAIL_UNARY_NOT_BYTEARRAY 9
#define SPEC_FAIL_UNARY_NOT_BYTES 10
#define SPEC_FAIL_UNARY_NOT_COMPLEX 11
#define SPEC_FAIL_UNARY_NOT_DICT 12
#define SPEC_FAIL_UNARY_NOT_DICT_ITEMS 13
#define SPEC_FAIL_UNARY_NOT_DICT_KEYS 14
#define SPEC_FAIL_UNARY_NOT_DICT_VALUES 15
#define SPEC_FAIL_UNARY_NOT_FLOAT 16
#define SPEC_FAIL_UNARY_NOT_HEAP_TYPE 17
#define SPEC_FAIL_UNARY_NOT_MEMORY_VIEW 18
#define SPEC_FAIL_UNARY_NOT_SET 19
#define SPEC_FAIL_UNARY_NOT_TUPLE 20
#define SPEC_FAIL_UNARY_NOT_DICT 11
#define SPEC_FAIL_UNARY_NOT_FLOAT 12
#define SPEC_FAIL_UNARY_NOT_HEAP_TYPE 13
#define SPEC_FAIL_UNARY_NOT_MEMORY_VIEW 14
#define SPEC_FAIL_UNARY_NOT_SET 15
#define SPEC_FAIL_UNARY_NOT_TUPLE 16

static int function_kind(PyCodeObject *code);
static bool function_check_args(PyObject *o, int expected_argcount, int opcode);
Expand Down Expand Up @@ -2299,26 +2295,10 @@ _Py_Specialize_UnaryNot(PyObject *value, _Py_CODEUNIT *instr)
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_BYTES);
goto failure;
}
if (PyComplex_CheckExact(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_COMPLEX);
goto failure;
}
if (PyDict_CheckExact(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_DICT);
goto failure;
}
if (PyDictItems_Check(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_DICT_ITEMS);
goto failure;
}
if (PyDictKeys_Check(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_DICT_KEYS);
goto failure;
}
if (PyDictValues_Check(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_DICT_VALUES);
goto failure;
}
if (PyFloat_CheckExact(value)) {
SPECIALIZATION_FAIL(UNARY_NOT, SPEC_FAIL_UNARY_NOT_FLOAT);
goto failure;
Expand Down