diff options
author | Guido van Rossum <guido@python.org> | 2023-09-05 20:58:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 20:58:39 (GMT) |
commit | b87263be9b82f778317c2bdf45ecd2ff23d0ba1b (patch) | |
tree | a997323d141248b6d8c086dfb8cc2505de1b2886 /Lib/test/test_generated_cases.py | |
parent | 2c4c26c4ce4bb94200ff3c9b5a0f4c75eed96f31 (diff) | |
download | cpython-b87263be9b82f778317c2bdf45ecd2ff23d0ba1b.zip cpython-b87263be9b82f778317c2bdf45ecd2ff23d0ba1b.tar.gz cpython-b87263be9b82f778317c2bdf45ecd2ff23d0ba1b.tar.bz2 |
gh-106581: Support multiple uops pushing new values (#108895)
Also avoid the need for the awkward .clone() call in the argument
to mgr.adjust_inverse() and mgr.adjust().
Diffstat (limited to 'Lib/test/test_generated_cases.py')
-rw-r--r-- | Lib/test/test_generated_cases.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Lib/test/test_generated_cases.py b/Lib/test/test_generated_cases.py index 54378fc..ed56f95 100644 --- a/Lib/test/test_generated_cases.py +++ b/Lib/test/test_generated_cases.py @@ -532,6 +532,36 @@ class TestGeneratedCases(unittest.TestCase): """ self.run_cases_test(input, output) + def test_macro_push_push(self): + input = """ + op(A, (-- val1)) { + val1 = spam(); + } + op(B, (-- val2)) { + val2 = spam(); + } + macro(M) = A + B; + """ + output = """ + TARGET(M) { + PyObject *val1; + PyObject *val2; + // A + { + val1 = spam(); + } + // B + { + val2 = spam(); + } + STACK_GROW(2); + stack_pointer[-2] = val1; + stack_pointer[-1] = val2; + DISPATCH(); + } + """ + self.run_cases_test(input, output) + if __name__ == "__main__": unittest.main() |