[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trampolines for SUBRCALL.



Here is a way to get garbage-collectable SUBR trampolines in maclisp.
A demo should suffice:

(defun make-jcall (number-of-arguments name-to-call)
  (boole 7 13._27.
	 (lsh number-of-arguments 23.)
	 (maknum name-to-call)))

(defun foo () '(hack hack))
(putprop 'bar (make-jcall 0 'foo) 'subr)
(bar) => (hack hack)

-gjc