mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-30 07:14:39 +08:00
A class's property-bag branch created the bag from the prototype data of the most derived constructible class the receiver is an instance of. That selection was an instanceOf chain over the class's whole subclass tree, inlined into the branch, and each nested subclass repeated it for its own subtree, so the dispatch functions grew with the square of the hierarchy's depth. In the three.js nodes fixture they reached 350,000 lines of LLVM IR, and register allocation of the read-only copies set the native build's longest partition. A class with constructible subclasses that have prototype data now selects through %class.bagPrototype:<class>, which tests its subclasses from the last to the first and calls their helpers. Other classes read their prototype data directly, as before.