Files
scriptc/tests/corpus/closed-virtual-dispatch-modules
Malte Ubl fc89fec9b9 Dispatch closed virtual calls to their implementations directly
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.
2026-10-16 06:54:44 -07:00
..