Skip to content

Give _PyInstructionSequence a python interface and use it in compiler tests #117680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iritkatriel opened this issue Apr 9, 2024 · 1 comment
Closed
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Apr 9, 2024

Expose _PyInstructionSequence as a PyObject, and then the compiler tests would be able to work with it directly.

By giving this object functions to add a label/instruction, the logic of translating a convenient python representation to a C sequence does not need to be duplicated in the test harness, the process of constructing an instruction sequence from tests becomes the same as the one used in codegen, and re-uses the implementation of the instruction sequence data structure.

Linked PRs

@iritkatriel iritkatriel self-assigned this Apr 9, 2024
@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 9, 2024
@terryjreedy
Copy link
Member

/refuses/re uses/? (last line)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

2 participants