Skip to content

Conversation

@DinoV
Copy link
Contributor

@DinoV DinoV commented Dec 18, 2025

The interpreter generator has long supported giving it multiple bytecodes files where the latter files override opcodes defined in the earlier opcodes. This enables PEP 523 hook users to generate an interpreter loop using the existing opcodes and their own set of customizations. But there've been no test cases that validate this actually works.

This adds such a test case and fixes things up so this practically works. static functions used directly in the interpreter loop are moved into ceval.h. APIs which are used but not exported are marked as exported.

The generated test case is updated as mark of mark regen-cases so it'll stay in sync as the bytecodes change.

@DinoV DinoV changed the title Add test case for interpreter generator w/ overridden opcodes gh-142913: Add test case for interpreter generator w/ overridden opcodes Dec 18, 2025
@DinoV DinoV force-pushed the eval_loop_test branch 7 times, most recently from 85c6f7e to 506d4b6 Compare December 18, 2025 01:38
@DinoV DinoV linked an issue Dec 18, 2025 that may be closed by this pull request
@DinoV DinoV force-pushed the eval_loop_test branch 2 times, most recently from 4d1f8c1 to 80a2701 Compare December 18, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test coverage for interpreter loop generator overridden insts

1 participant