aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test__opcode.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-01-23 04:26:25 -0500
committerGitHub <noreply@github.com>2025-01-23 09:26:25 +0000
commita10f99375e7912df863cf101a38e9703cfcd72f1 (patch)
tree7909c7896fe256427c1149d2416fb7912ad3ba48 /Lib/test/test__opcode.py
parentd7d066c3ab6842117f9e0fb1c9dde4bce00fa1e3 (diff)
downloadcpython-a10f99375e7912df863cf101a38e9703cfcd72f1.tar.gz
cpython-a10f99375e7912df863cf101a38e9703cfcd72f1.zip
Revert "GH-128914: Remove conditional stack effects from `bytecodes.c` and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build. This reverts commit ab61d3f4303d14a413bc9ae6557c730ffdf7579e.
Diffstat (limited to 'Lib/test/test__opcode.py')
-rw-r--r--Lib/test/test__opcode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test__opcode.py b/Lib/test/test__opcode.py
index 4b11e83ae59..95e09500df5 100644
--- a/Lib/test/test__opcode.py
+++ b/Lib/test/test__opcode.py
@@ -65,7 +65,8 @@ class OpListTests(unittest.TestCase):
class StackEffectTests(unittest.TestCase):
def test_stack_effect(self):
self.assertEqual(stack_effect(dis.opmap['POP_TOP']), -1)
- self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 2), -1)
+ self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 0), -1)
+ self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 1), -1)
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 3), -2)
self.assertRaises(ValueError, stack_effect, 30000)
# All defined opcodes