Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: Minimal hack to make recursion work #719
The discussion @sklam and I just had about how to implement mutual recursion would require that
Adding the type signature(s) of the function would always happen immediately, but the compilation step would need to be deferred if we detect undefined globals in the Numba IR. The deferred compilation would be performed later, either triggered by a later @jit or an explicit call to the function.
This was referenced
Aug 26, 2014
Yes. We have not merged this because it is basically a hack on the type inference process. A better approach would separate function type registration from compilation, so that we can handle all the reasonable cases. (i.e. compilation of the function is deferred until we've seen all the type signatures that are needed, including itself or other functions in the case of mutual recursion)