Skip to content

feat: PyIR imports and schema version - #49

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/pyir-leftovers
Sep 4, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/pyir-leftovers

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

The two boxes left on #13, the PyIR instruction set of docs/architecture.md §6.

  • Acceptance tests first (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 to Symbol values, so no analysis changes; the instruction survives SSA and prints as import "json" as "j" @python.json. Module-level imports lower to nothing, ModuleIR holding functions only.
  • PYIR_SCHEMA_VERSION, exported from coretrace_python.ir, versions the instruction set and joins the HIR, finding and plugin API versions in the persistent cache key.

Await and Yield of the same box landed in #36.

Closes #13

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 4, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit 2a68b5b into main Sep 4, 2026
6 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/pyir-leftovers branch September 4, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete the PyIR instruction set and make IR immutable

1 participant