April report of the Raku Development Grant of Jonathan Worthington
Tue, 18-May-2021 by
In April I focused on resumption of multiple dispatch using the new dispatch mechanism - that is, using `callsame` to move to the next candidate. I observed that moving between candidates with `where` clauses is largely the same process, and was able to factor things in such a way as to exploit these commonalities.
The mechanism I implemented to achieve this turns failure to bind a signature into a dispatch resumption, but with the frame that we couldn't bind removed from the call stack. While doing this work, I realized that a very similar mechanism - run some code, and resume with its return value - could come in highly useful for handling fallbacks for megamorphic callsites, where we want to run some more complex lookup code rather than building an enormous pile of inline cache entries.
I also hunted down a couple of implementation bugs in the dispatch mechanism shown up by testing: a thinko leading to an infinite loop in a GC mark routine, and a data race involving the allocation of storage for dispatch caches that could afflict some multi-threaded programs.
Finally, I started preparing the way for gradually moving towards using the new dispatcher for all dispatch in Rakudo. With the current grant hours almost being exhausted, I also submitted a grant application for the next round of TPF grants.
Total time worked: 15 hours 19 minutes