Skip to content

fix(runtime): a class function object keeps its evaluation state and prototype link in separate captures (main build) - #11847

Merged
proggeramlug merged 1 commit into
mainfrom
fix-class-value-capture-conflict
Oct 3, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
fix-class-value-capture-conflict

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

main does not compile since #11843 merged: #11840 put the class function object's evaluation state in capture 1 and #11843 put the prototype link in capture 1 too, and the merge committed the conflict markers in crates/perry-runtime/src/object/class_value.rs.

  • The evaluation state keeps capture 1 (codegen writes it at CLASS_EVALUATION_STATE_CAPTURE).
  • The prototype link moves to capture 2; the class function object is minted with three captures.
  • Const asserts keep the two slots apart.

Verified on perrymaster: release build of perry + runtime/stdlib OK, cargo fmt --check OK; the 16 class-evaluation / fresh-class gap and parity tests (11759*, 11042, 11112, 11163, 10624, 9239, class-expression fresh tests) match node; the vtable lane benches match node.

Not fixed here (pre-existing, separate): conflict markers in scripts/gc_runtime_root_holders.json (a PASS1_MARKED re-audit pin with source hashes; it needs a real re-audit).

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a conflict during class construction that could interfere with evaluation state and prototype behavior.
    • Class instances now retain their expected prototype behavior while class evaluation proceeds.

…its prototype link in separate captures

#11840 put the evaluation state in capture 1 of the class function object
and #11843 put the prototype link there too; the merge left conflict
markers in class_value.rs and main does not compile. The evaluation state
keeps capture 1 (codegen writes it at CLASS_EVALUATION_STATE_CAPTURE); the
prototype link moves to capture 2, and the object is minted with three
captures. Const asserts keep the two slots apart.
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08ca9a01-4938-4e42-a423-52320f8e4fa9
📥 Commits

Reviewing files that changed from the base of the PR and between ef28413 and ad7a633.

📒 Files selected for processing (2)
  • changelog.d/class-value-capture-conflict.md
  • crates/perry-runtime/src/object/class_value.rs
 ___________________________________________________________________________
< In Vino Veritas, In Codice Bugas. In wine, there is truth; in code, bugs. >
 ---------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit ad60356 into main Oct 3, 2026
31 of 36 checks passed
@proggeramlug
proggeramlug deleted the fix-class-value-capture-conflict branch October 3, 2026 22:35
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