diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-30 06:16:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-30 06:16:16 -0800 |
commit | e557f0f806badf93b36b2bf519a73830b67cf564 (patch) | |
tree | 0be990c21e59608e3ec8be36b01093f60bad23e5 /eval.c | |
parent | 4a71d6d387e332431d8a53bca4f37a32d12b647a (diff) | |
download | txr-e557f0f806badf93b36b2bf519a73830b67cf564.tar.gz txr-e557f0f806badf93b36b2bf519a73830b67cf564.tar.bz2 txr-e557f0f806badf93b36b2bf519a73830b67cf564.zip |
Change funcall_interp API.
* eval.c (funcall_interp): Drop the env argument.
The fun argument is now the whole function object, not the
encapsulated code to be interpreted. We pull the
environment and code out of the object locally
and interpret as before.
* eval.h (funcall_interp): Declaration updated.
* lib.c (generic_funcall, funcall, funcall1, funcall2,
* funcall3, funcall4): Calls to funcall_interp simplified,
just passing fun.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1023,8 +1023,10 @@ val set_dyn_env(val de) return old; } -val funcall_interp(val env, val fun, struct args *args) +val funcall_interp(val interp_fun, struct args *args) { + val env = interp_fun->f.env; + val fun = interp_fun->f.f.interp_fun; val def = cdr(fun); val params = car(def); val body = cdr(def); |