gh-131798: Optimize _UNARY_NEGATIVE (GH-135223)
This commit is contained in:
8
Python/optimizer_cases.c.h
generated
8
Python/optimizer_cases.c.h
generated
@@ -190,7 +190,13 @@
|
||||
res = sym_new_compact_int(ctx);
|
||||
}
|
||||
else {
|
||||
res = sym_new_not_null(ctx);
|
||||
PyTypeObject *type = sym_get_type(value);
|
||||
if (type == &PyLong_Type || type == &PyFloat_Type) {
|
||||
res = sym_new_type(ctx, type);
|
||||
}
|
||||
else {
|
||||
res = sym_new_not_null(ctx);
|
||||
}
|
||||
}
|
||||
stack_pointer[-1] = res;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user