summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2022-03-31 13:14:15 (GMT)
committerGitHub <noreply@github.com>2022-03-31 13:14:15 (GMT)
commita00518d9ad9a8f408a9699191019d75dd8406c32 (patch)
treecd66e7a9fd60f08e92fd56a183e1996623123da8 /Objects
parentb36d222110d0d6d84dc8e973ca87d976c2423f5d (diff)
downloadcpython-a00518d9ad9a8f408a9699191019d75dd8406c32.zip
cpython-a00518d9ad9a8f408a9699191019d75dd8406c32.tar.gz
cpython-a00518d9ad9a8f408a9699191019d75dd8406c32.tar.bz2
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 13dfbf6..d4993104 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -237,7 +237,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack;
break;
}
- case JUMP_ABSOLUTE:
case JUMP_NO_INTERRUPT:
j = get_arg(code, i);
assert(j < len);
@@ -264,6 +263,12 @@ mark_stacks(PyCodeObject *code_obj, int len)
assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
stacks[j] = next_stack;
break;
+ case JUMP_BACKWARD:
+ j = i + 1 - get_arg(code, i);
+ assert(j >= 0);
+ assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
+ stacks[j] = next_stack;
+ break;
case GET_ITER:
case GET_AITER:
next_stack = push_value(pop_value(next_stack), Iterator);