Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

methodcert: tsc .text +75 KB from register spills at uncertified class-dispatch sites

Open
#12,568 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, typescript

Research direction

Start on the methodcert branch and reproduce the .text growth on tsc, then diff the LLVM register allocation of closure 16216 between base and head using -print-after=greedy. Find which values are live across the js_method_site_miss call and the receiver-word probe at uncertified class-dispatch sites. Done means explaining the spill increase and showing a change to the emission shape that brings the tsc .text growth back down.

Written by the indexing model from the issue text.

Description

Follow-up to the method-certificate change (branch methodcert, class dispatch through epoch-bearing method certificates).

What happens

With the certificate change, tsc's .text grows by +75,264 B, while instructions:u change by only +0.004%.

  • Runtime symbols: the same size in both arms. All of the growth is in compiled JS functions: 101 grew and 59 shrank.
  • LLVM input: 5.1% smaller on head. 5,130 old tower sites are gone, and no tsc site is certified, because tsc's classes have no statically named prototype chain.
  • Machine code: larger anyway. The extra code is register spill and reload. For the largest grower, closure 16216:
base head
IR lines 10,787 8,738
machine instructions 4,982 6,921
stack references 380 2,063

The other programs shrink: Zod −208 KB, Effect −288 KB, fastify −93 KB, commander −23 KB.

Likely cause (to confirm)

At an uncertified site, the new receiver-word probe and miss call change the register-allocation picture: values become live across the generic call. There is no shared Rust helper whose inlining explains this, so #[inline(never)] doesn't apply.

Next step

  • Diff the regalloc of closure 16216 between arms, for example with -print-after=greedy on that function. Find which values are live across js_method_site_miss or the probe.
  • Fix it in the emission shape. For example, keep the slow path out of line so the hot block keeps its live ranges.
Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
3h 23m
Merged PRs (30d)
911

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.