+2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
+ scm_init_eval): Made scm_undefineds static in eval.c, renamed it
+ to undefineds and registered the object as a permanent object.
+
+ * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
+ static in eval.c, renamed it to f_apply and registered the object
+ as a permanent object.
+
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (SCM_BIT8, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
SCM_GLOBAL_SYMBOL (scm_sym_unquote, "unquote");
SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing");
-SCM scm_f_apply;
-
SCM_GLOBAL_SYMBOL (scm_sym_enter_frame, "enter-frame");
SCM_GLOBAL_SYMBOL (scm_sym_apply_frame, "apply-frame");
SCM_GLOBAL_SYMBOL (scm_sym_exit_frame, "exit-frame");
goto macro_tail;
}
+#define SCM_BIT7(x) (127 & SCM_UNPACK (x))
+
+/* A function object to implement "apply" for non-closure functions. */
+static SCM f_apply;
+/* An endless list consisting of #<undefined> objects: */
+static SCM undefineds;
+
/* scm_unmemocopy takes a memoized expression together with its
* environment and rewrites it to its original form. Thus, it is the
* inversion of the rewrite rules above. The procedure is not
* This ought to change.
*/
-#define SCM_BIT7(x) (127 & SCM_UNPACK (x))
-
static SCM
build_binding_list (SCM names, SCM inits)
{
case SCM_BIT7 (SCM_IM_LETREC):
x = SCM_CDR (x);
- env = EXTEND_ENV (SCM_CAR (x), scm_undefineds, env);
+ env = EXTEND_ENV (SCM_CAR (x), undefineds, env);
x = SCM_CDR (x);
{
SCM init_forms = SCM_CAR (x);
}
else
{
- proc = scm_f_apply;
+ proc = f_apply;
goto evapply;
}
/* At this point, scm_deval and scm_dapply are generated.
*/
-# define DEVAL
-# include "eval.c"
-
+#define DEVAL
+#include "eval.c"
void
scm_set_smob_free (scm_tc16_promise, promise_free);
scm_set_smob_print (scm_tc16_promise, promise_print);
- /* Dirk:Fixme:: make scm_undefineds local to eval.c: it's only used here. */
- scm_undefineds = scm_list_1 (SCM_UNDEFINED);
- SCM_SETCDR (scm_undefineds, scm_undefineds);
- scm_listofnull = scm_list_1 (SCM_EOL);
+ undefineds = scm_list_1 (SCM_UNDEFINED);
+ SCM_SETCDR (undefineds, undefineds);
+ scm_permanent_object (undefineds);
- scm_f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);
+ scm_listofnull = scm_list_1 (SCM_EOL);
- /* acros */
- /* end of acros */
+ f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);
+ scm_permanent_object (f_apply);
#include "libguile/eval.x"
SCM_API SCM scm_sym_set_x;
SCM_API SCM scm_sym_args;
-SCM_API SCM scm_f_apply;
-
\f
SCM_API SCM * scm_ilookup (SCM iloc, SCM env);
#define scm_flo0 scm_sys_protects[0]
#define scm_listofnull scm_sys_protects[1]
-#define scm_undefineds scm_sys_protects[2]
-#define scm_nullvect scm_sys_protects[3]
-#define scm_nullstr scm_sys_protects[4]
-#define scm_keyword_obarray scm_sys_protects[5]
-#define scm_stand_in_procs scm_sys_protects[6]
-#define scm_object_whash scm_sys_protects[7]
-#define scm_permobjs scm_sys_protects[8]
-#define scm_asyncs scm_sys_protects[9]
-#define scm_protects scm_sys_protects[10]
-#define scm_properties_whash scm_sys_protects[11]
-#define scm_gc_registered_roots scm_sys_protects[12]
-#define scm_source_whash scm_sys_protects[13]
-#define SCM_NUM_PROTECTS 14
+#define scm_nullvect scm_sys_protects[2]
+#define scm_nullstr scm_sys_protects[3]
+#define scm_keyword_obarray scm_sys_protects[4]
+#define scm_stand_in_procs scm_sys_protects[5]
+#define scm_object_whash scm_sys_protects[6]
+#define scm_permobjs scm_sys_protects[7]
+#define scm_asyncs scm_sys_protects[8]
+#define scm_protects scm_sys_protects[9]
+#define scm_properties_whash scm_sys_protects[10]
+#define scm_gc_registered_roots scm_sys_protects[11]
+#define scm_source_whash scm_sys_protects[12]
+#define SCM_NUM_PROTECTS 13
SCM_API SCM scm_sys_protects[];