mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP. (GH-145964)
This commit is contained in:
parent
36b5284f04
commit
37121ef77e
10 changed files with 1257 additions and 1215 deletions
|
|
@ -1246,14 +1246,19 @@ dummy_func(
|
|||
ERROR_IF(err);
|
||||
}
|
||||
|
||||
inst(CALL_INTRINSIC_1, (value -- res)) {
|
||||
op(_CALL_INTRINSIC_1, (value -- res, v)) {
|
||||
assert(oparg <= MAX_INTRINSIC_1);
|
||||
PyObject *res_o = _PyIntrinsics_UnaryFunctions[oparg].func(tstate, PyStackRef_AsPyObjectBorrow(value));
|
||||
PyStackRef_CLOSE(value);
|
||||
ERROR_IF(res_o == NULL);
|
||||
if (res_o == NULL) {
|
||||
ERROR_NO_POP();
|
||||
}
|
||||
v = value;
|
||||
DEAD(value);
|
||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||
}
|
||||
|
||||
macro(CALL_INTRINSIC_1) = _CALL_INTRINSIC_1 + POP_TOP;
|
||||
|
||||
inst(CALL_INTRINSIC_2, (value2_st, value1_st -- res)) {
|
||||
assert(oparg <= MAX_INTRINSIC_2);
|
||||
PyObject *value1 = PyStackRef_AsPyObjectBorrow(value1_st);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue