Reminds me of helping a doctoral student with his implementation of WAM and understanding of the storage system I had written for a combined Lisp/Prolog interpreter.
He was adding the compiler to the system. We used a subroutine threaded machine to execute the WAM instructions (thank you, Byte TIL issue).