I'm trying to add support in the JIT for primitive-result-arity and
procedure-result-arity. My idea is to copy the implementation of
procedure-arity-includes? and make some modifications.
In the JIT, procedure-arity-includes? only has a special case for
scheme_native_closure_type and scheme_prim_type. But it ignores other
types of primitives like scheme_closed_prim_type, that are redirected
to the C version.
https://github.com/racket/racket/blob/0fb11e61e6cf4327cf31d7c30ce5a34d11bf60cd/racket/src/racket/src/jitcommon.c#L3166
Are scheme_closed_prim_type rarely used or deprecated? Shoul I (try
to) add a special case for them in the JIT version of
primitive-result-arity, or it's not very usefull? Is there some hidden
problem?
Gustavo