summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-01-16 12:35:21 (GMT)
committerGitHub <noreply@github.com>2023-01-16 12:35:21 (GMT)
commit7b14c2ef194b6eed79670aa9d7e29ab8e2256a56 (patch)
tree794188d49a9f359cfa7663c25be587634f070f22 /Objects
parentb1a74a182d8762bda51838401ac92b6ebad9632a (diff)
downloadcpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.zip
cpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.tar.gz
cpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.tar.bz2
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 39ccca7..6bc04bc 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -357,6 +357,14 @@ mark_stacks(PyCodeObject *code_obj, int len)
assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
stacks[j] = next_stack;
break;
+ case COMPARE_AND_BRANCH:
+ next_stack = pop_value(pop_value(next_stack));
+ i++;
+ j = get_arg(code, i) + i + 1;
+ assert(j < len);
+ 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);