You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R7RS requires (case-lambda) to be tail recursive. However, our new (case-lambda) generation has a few issues:
We always generate (case-lambda) with the same signature as TopProcedureType regardless of the types of the clause lambdas. This usually means we'll need to allocate a multiple values list at return which prevents tail recursion. It also uses the C calling convention which isn't required to support tail calls.
Clause lambdas don't have their recursive self values passed so they need to call through a cell which isn't supported
We never produce fixed arguments for (case-lambda)'s signature which means the a tail caller will always need to allocate a rest argument list. This doesn't prevent tail recursion but makes it potentially expensive
The text was updated successfully, but these errors were encountered:
Instead of giving all (case-lambda)s the same signature allow them to
have an individual tailored signature. This commit only gives them
the FastCC attribute and skips their self argument if none of the clause
lambdas capture.
This is a requirement for the the tail recursion work outlined in #46
R7RS requires (case-lambda) to be tail recursive. However, our new (case-lambda) generation has a few issues:
The text was updated successfully, but these errors were encountered: