summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorKen Jin <kenjin@python.org>2023-08-15 18:04:17 (GMT)
committerGitHub <noreply@github.com>2023-08-15 18:04:17 (GMT)
commite28b0dc86dd1d058788b9e1eaa825cdfc2d97067 (patch)
tree0a1cb8afa1d723ce2dab38c011f75a58014a41ef /Python/bytecodes.c
parent34e1917912f05e3ab5c9b1e39f678bd36388499e (diff)
downloadcpython-e28b0dc86dd1d058788b9e1eaa825cdfc2d97067.zip
cpython-e28b0dc86dd1d058788b9e1eaa825cdfc2d97067.tar.gz
cpython-e28b0dc86dd1d058788b9e1eaa825cdfc2d97067.tar.bz2
gh-107557: Setup abstract interpretation (#107847)
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com> Co-authored-by: Jules <57632293+juliapoo@users.noreply.github.com>
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 5efa36f..e9a5cf5 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -3743,6 +3743,11 @@ dummy_func(
return frame;
}
+ op(INSERT, (unused[oparg], top -- top, unused[oparg])) {
+ // Inserts TOS at position specified by oparg;
+ memmove(&stack_pointer[-1 - oparg], &stack_pointer[-oparg], oparg * sizeof(stack_pointer[0]));
+ }
+
// END BYTECODES //