gh-131798: Optimize _UNARY_NEGATIVE (GH-135223)
This commit is contained in:
@@ -452,7 +452,13 @@ dummy_func(void) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user