Even better, I'd love to see someone else rewrite it properly.
See languages/perl6/t/compiler/call.t for several examples of usage.
Briefly, it handles things like:
sub f ($a, $b) { ... }
sub g ($a, +$b) { ... }
sub h ($a, *@b) { ... }
f(1,2);
f(a, b => 2);
g(a => 1, b => 2);
h(1, 2, 3, 4);
h(1, 2, *@x, 40);
It pretends to handle optional parameters, but if you don't pass in a
value to an optional parameter, it reuses whatever happened to be
lying around in that register, and there's no way of telling whether
the caller specified a value or not.
I doubt anyone will actually use any of this for a while, so unless I
get change requests I'm planning on leaving this in its current
half-baked state for now, and going back to using it for a regular
expression engine, which is why I went down this rabbit hole in the
first place.