Target Python 3.11 in byte code interpreter #252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've been targeting 3.8 and that looks a bit old now. Work on the PEG parser will be easier with 3.11. Some CPython internals are better thought out, providing a clearer pattern to copy. On the down-side, parts of the CPython interpreter are significantly more complicated, but these are internal optimisations we need not emulate.
In particular, we will not attempt to emulate CPython's byte code "quickening" since we intend to generate JVM code most of the time and interpret CPython byte code only where there's no alternative. However, it is also a good place to develop from.
In the first step we simply rename classes without changing them and also compile the examples with Python 3.11. As the changes to the interpreter so far are simply name changes we disable the CPython interpreter tests. Something more interesting will follow.