summaryrefslogtreecommitdiff
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h60
1 files changed, 24 insertions, 36 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 7864647bc8..b60655884c 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -2077,22 +2077,6 @@
DISPATCH();
}
- TARGET(COMPARE_OP_GENERIC) {
- PREDICTED(COMPARE_OP_GENERIC);
- assert(oparg <= Py_GE);
- PyObject *right = POP();
- PyObject *left = TOP();
- PyObject *res = PyObject_RichCompare(left, right, oparg);
- SET_TOP(res);
- Py_DECREF(left);
- Py_DECREF(right);
- if (res == NULL) {
- goto error;
- }
- JUMPBY(INLINE_CACHE_ENTRIES_COMPARE_OP);
- DISPATCH();
- }
-
TARGET(COMPARE_OP) {
PREDICTED(COMPARE_OP);
_PyCompareOpCache *cache = (_PyCompareOpCache *)next_instr;
@@ -2106,7 +2090,18 @@
}
STAT_INC(COMPARE_OP, deferred);
DECREMENT_ADAPTIVE_COUNTER(cache->counter);
- GO_TO_INSTRUCTION(COMPARE_OP_GENERIC);
+ assert(oparg <= Py_GE);
+ PyObject *right = POP();
+ PyObject *left = TOP();
+ PyObject *res = PyObject_RichCompare(left, right, oparg);
+ SET_TOP(res);
+ Py_DECREF(left);
+ Py_DECREF(right);
+ if (res == NULL) {
+ goto error;
+ }
+ JUMPBY(INLINE_CACHE_ENTRIES_COMPARE_OP);
+ DISPATCH();
}
TARGET(COMPARE_OP_FLOAT_JUMP) {
@@ -3667,29 +3662,12 @@
DISPATCH();
}
- TARGET(BINARY_OP_GENERIC) {
- PREDICTED(BINARY_OP_GENERIC);
- PyObject *rhs = PEEK(1);
- PyObject *lhs = PEEK(2);
- PyObject *res;
- assert(0 <= oparg);
- assert((unsigned)oparg < Py_ARRAY_LENGTH(binary_ops));
- assert(binary_ops[oparg]);
- res = binary_ops[oparg](lhs, rhs);
- Py_DECREF(lhs);
- Py_DECREF(rhs);
- if (res == NULL) goto pop_2_error;
- STACK_SHRINK(1);
- POKE(1, res);
- next_instr += 1;
- DISPATCH();
- }
-
TARGET(BINARY_OP) {
PREDICTED(BINARY_OP);
assert(INLINE_CACHE_ENTRIES_BINARY_OP == 1);
PyObject *rhs = PEEK(1);
PyObject *lhs = PEEK(2);
+ PyObject *res;
_PyBinaryOpCache *cache = (_PyBinaryOpCache *)next_instr;
if (ADAPTIVE_COUNTER_IS_ZERO(cache->counter)) {
assert(cframe.use_tracing == 0);
@@ -3699,7 +3677,17 @@
}
STAT_INC(BINARY_OP, deferred);
DECREMENT_ADAPTIVE_COUNTER(cache->counter);
- GO_TO_INSTRUCTION(BINARY_OP_GENERIC);
+ assert(0 <= oparg);
+ assert((unsigned)oparg < Py_ARRAY_LENGTH(binary_ops));
+ assert(binary_ops[oparg]);
+ res = binary_ops[oparg](lhs, rhs);
+ Py_DECREF(lhs);
+ Py_DECREF(rhs);
+ if (res == NULL) goto pop_2_error;
+ STACK_SHRINK(1);
+ POKE(1, res);
+ next_instr += 1;
+ DISPATCH();
}
TARGET(SWAP) {