summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval.c1
-rw-r--r--lib.c5
-rw-r--r--lib.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index a41d362a..d4973217 100644
--- a/eval.c
+++ b/eval.c
@@ -6668,6 +6668,7 @@ void eval_init(void)
reg_fun(intern(lit("func-set-env"), user_package), func_n2(func_set_env));
reg_fun(intern(lit("functionp"), user_package), func_n1(functionp));
reg_fun(intern(lit("interp-fun-p"), user_package), func_n1(interp_fun_p));
+ reg_fun(intern(lit("vm-fun-p"), user_package), func_n1(vm_fun_p));
reg_fun(intern(lit("ctx-form"), system_package), func_n1(ctx_form));
reg_fun(intern(lit("ctx-name"), system_package), func_n1(ctx_name));
diff --git a/lib.c b/lib.c
index 7219d2d2..ad209037 100644
--- a/lib.c
+++ b/lib.c
@@ -6161,6 +6161,11 @@ val interp_fun_p(val obj)
return (functionp(obj) && obj->f.functype == FINTERP) ? t : nil;
}
+val vm_fun_p(val obj)
+{
+ return (functionp(obj) && obj->f.functype == FVM) ? t : nil;
+}
+
static noreturn void callerror(val fun, val msg)
{
uses_or2;
diff --git a/lib.h b/lib.h
index 5a818086..b485caed 100644
--- a/lib.h
+++ b/lib.h
@@ -901,6 +901,7 @@ val func_get_env(val fun);
val func_set_env(val fun, val env);
val functionp(val);
val interp_fun_p(val);
+val vm_fun_p(val);
val generic_funcall(val fun, struct args *);
val funcall(val fun);
val funcall1(val fun, val arg);