Skip to content

Feat: N-12a function-local virtual objects (#143 step 1) - #272

Merged
b-re-w merged 2 commits into
developfrom
feat/tp-n12
Oct 25, 2026
Merged

b-re-w merged 2 commits into
developfrom
feat/tp-n12

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 24, 2026

Copy link
Copy Markdown
Member

Refs #143 (step 1; step 2 borrowed reads / pair elision next, regions in #268).

A pure function whose N-11 object (no del, no weakref) comes from New and is read only through FieldGet, with only no-user-code nodes in between, keeps its fields in C locals and allocates nothing; the verifier recomputes the virtual set (forged entries rejected as verify/virtual-escape); anything else stays N-11; the class guard still deopts. SPEC N-12a states the known difference: an object whose allocation was removed raises no MemoryError. Checked from source: a pure f(a, b) -> P(a, b).y compiles with virtual=('p',) and no tp_new_fixed.

Red: 17 tests failed/errored before. Tests: test_virtual_objects 17, test_verify 218, test_cgen_classes 23, test_class_methods 51, test_pipeline 6, test_free_threaded 24 (2 failed once at load 20, passed on rerun). Mutation: allowing Call in the virtual set fails a test. The new file is added to the ASan/UBSan job. Follow-up found: #271. Merge held for the macOS runner freeze.

@b-re-w
b-re-w merged commit a49aec7 into develop Oct 25, 2026
@b-re-w
b-re-w deleted the feat/tp-n12 branch October 25, 2026 00:14
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.

1 participant