mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
A virtual call whose receivers can only be a few known classes (every class that may be instantiated below the static class resolves the method to one of at most four declarations) now records that closed set on the virtualCall node. The backend compares the loaded vtable slot against each implementation but the last and calls the match directly, so LLVM can inline the bodies and keep loop-carried values in registers. Open subtrees (decorators, dynamic bases, exported library classes, runtime classes) and larger sets keep the indirect call.