Repository navigation
feat: PyIR imports and schema version - #49
Merged
Merged
Conversation
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The two boxes left on #13, the PyIR instruction set of
docs/architecture.md§6.test: define PyIR import instructions and schema version), implementation follows.ir.model.Import: an effect instruction emitted for every alias of an import statement inside a function, with the module as written (relative dots included), the canonical symbol bound and the local name. Rule 3 of §39: the IR shows the import running where it stands. Uses of the name keep resolving toSymbolvalues, so no analysis changes; the instruction survives SSA and prints asimport "json" as "j" @python.json. Module-level imports lower to nothing,ModuleIRholding functions only.PYIR_SCHEMA_VERSION, exported fromcoretrace_python.ir, versions the instruction set and joins the HIR, finding and plugin API versions in the persistent cache key.AwaitandYieldof the same box landed in #36.Closes #13