Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added back in macroexpansion-time side effect which stores the argume…
…nt number of the container. Why is this necessary? We want people to be able to recursively define Modf expansion functions and methods. This means that within the body of a Modf expansion function/method, the macroexpander will need to know how to invert the accessor you are currently defining how to invert. Luckily, it only needs to know which argument it is operating on. This is important with we were defining an inversion for NTH or GETHASH if those inversion functions were recursive (which might be the case with NTH). Since, as was pointed out, we need this this side effect to happen whether this is a file was loaded or compiled then loaded into a fresh Lisp image, and we need the side effect as we compile (in case it is recursive), the side effects are wrapped in an EVAL-WHEN with all three cases specified. If we have mutually recursive Modf functions, well that is still an open problem. Lastly, just to reduce the number of surprises, I have added the same side effect explicitly at macroexpand time. This means that things will work even if definition forms don't happen in top-level forms. See the test suite for an example of this (in fact, this was initially motivated because it is difficult to write a test of this recursive stuff that can be called more than once and actually test this setup).
- Loading branch information