mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
Vtables store the borrowing body of a method whose slot borrows its parameters, but that decision lived in private emitter state, so the self-hosting layout fixture kept emitting owned entries and no longer matched production (`@sc_f_...` vs `@sc_bf_...`). Move the decision into VirtualBorrows (virtual-borrows.ts), used by the emitter and by the fixture, which now runs the same call-lifetimes analysis. The slot lookup narrows explicitly instead of combining a union with `&&`/`||`, which the self-hosted subset rejects (SC1090). The abstract-slot emission case now expects the borrowing body, since its implementation borrows its receiver.