Skip to content
Closed
Show file tree
Hide file tree
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
remove record_hit_inline calls
  • Loading branch information
sweeneyde committed Oct 22, 2021
commit e4a1871d717fb4388254c1faf50a6ffc44f253c0
4 changes: 0 additions & 4 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -2472,7 +2472,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
DEOPT_IF(!PyLong_CheckExact(left), INPLACE_ADD);
DEOPT_IF(!PyLong_CheckExact(right), INPLACE_ADD);
STAT_INC(INPLACE_ADD, hit);
record_hit_inline(next_instr, oparg);
PyObject *sum = _PyLong_Add((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(sum);
Py_DECREF(left);
Expand All @@ -2490,7 +2489,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
DEOPT_IF(!PyFloat_CheckExact(left), INPLACE_ADD);
DEOPT_IF(!PyFloat_CheckExact(right), INPLACE_ADD);
STAT_INC(INPLACE_ADD, hit);
record_hit_inline(next_instr, oparg);
double dsum = ((PyFloatObject *)left)->ob_fval +
((PyFloatObject *)right)->ob_fval;
PyObject *sum = PyFloat_FromDouble(dsum);
Expand All @@ -2510,7 +2508,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
DEOPT_IF(!PyUnicode_CheckExact(left), INPLACE_ADD);
DEOPT_IF(Py_TYPE(right) != Py_TYPE(left), INPLACE_ADD);
STAT_INC(BINARY_ADD, hit);
record_hit_inline(next_instr, oparg);
PyObject *res = PyUnicode_Concat(left, right);
STACK_SHRINK(1);
SET_TOP(res);
Expand All @@ -2533,7 +2530,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
PyObject *var = GETLOCAL(next_oparg);
DEOPT_IF(var != left, INPLACE_ADD);
STAT_INC(INPLACE_ADD, hit);
record_hit_inline(next_instr, oparg);
GETLOCAL(next_oparg) = NULL;
Py_DECREF(left);
STACK_SHRINK(1);
Expand Down
8 changes: 4 additions & 4 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,19 +1239,19 @@ _Py_Specialize_InplaceAdd(PyObject *left, PyObject *right, _Py_CODEUNIT *instr)
if (left_type == &PyUnicode_Type) {
int next_opcode = _Py_OPCODE(instr[1]);
if (next_opcode == STORE_FAST) {
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_UNICODE_FAST, saturating_start());
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_UNICODE_FAST, initial_counter_value());
}
else {
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_UNICODE, saturating_start());
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_UNICODE, initial_counter_value());
}
goto success;
}
else if (left_type == &PyLong_Type) {
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_INT, saturating_start());
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_INT, initial_counter_value());
goto success;
}
else if (left_type == &PyFloat_Type) {
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_FLOAT, saturating_start());
*instr = _Py_MAKECODEUNIT(INPLACE_ADD_FLOAT, initial_counter_value());
goto success;

}
Expand Down