> 'expr' converts a SUBR function (i.e. a function written in C or
> assembly which evaluates all its arguments) to an EXPR (a Lisp level
OK, so it's not built for FSUBR conversion.
> Unfortunately, it doesn't work with FSUBR functions (C or asm functions
> _not_ evaluating all arguments). This is generally not possible, due to
> the way FSUBRs are executed by the interpreter.
Right, FSUBR to EXPR conversion isn't possible. I guess it would be
possible to convert FSUBR to FEXPR, though. Example:
: (de fexpr ("F")
(list '"X" (list 'eval (list 'cons (cons 'quote (box (getd
"F"))) '"X"))) ) )
: (fexpr 'while)
-> ("X" (eval (cons '$268284617 "X")))
: (setq while (list (car while) '(prinl "while called") (cadr while)))
-> ("X" (prinl "while called") (eval (cons '$268284617 "X")))
: (setq a 3)
: (while (gt0 (dec 'a)) (prinl @))
And since SUBR's are a subset of FSUBR's, the fexpr conversion could
be used for both. Would performance suffer?