mirror of
https://github.com/python/cpython.git
synced 2025-07-13 14:25:18 +00:00
GH-122155: Track local variables between pops and pushes in cases generator (GH-122286)
This commit is contained in:
parent
46f5a4f9e1
commit
a9d56e38a0
13 changed files with 463 additions and 159 deletions
|
@ -1357,8 +1357,8 @@ dummy_func(
|
|||
(void)counter;
|
||||
}
|
||||
|
||||
op(_UNPACK_SEQUENCE, (seq -- unused[oparg])) {
|
||||
_PyStackRef *top = stack_pointer + oparg - 1;
|
||||
op(_UNPACK_SEQUENCE, (seq -- output[oparg])) {
|
||||
_PyStackRef *top = output + oparg;
|
||||
int res = _PyEval_UnpackIterableStackRef(tstate, seq, oparg, -1, top);
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(res == 0, error);
|
||||
|
@ -1401,9 +1401,8 @@ dummy_func(
|
|||
DECREF_INPUTS();
|
||||
}
|
||||
|
||||
inst(UNPACK_EX, (seq -- unused[oparg & 0xFF], unused, unused[oparg >> 8])) {
|
||||
int totalargs = 1 + (oparg & 0xFF) + (oparg >> 8);
|
||||
_PyStackRef *top = stack_pointer + totalargs - 1;
|
||||
inst(UNPACK_EX, (seq -- left[oparg & 0xFF], unused, right[oparg >> 8])) {
|
||||
_PyStackRef *top = right + (oparg >> 8);
|
||||
int res = _PyEval_UnpackIterableStackRef(tstate, seq, oparg & 0xFF, oparg >> 8, top);
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(res == 0, error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue