* guile-doc-snarf.awk: Removed.
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 14 Dec 1999 17:08:25 +0000 (17:08 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 14 Dec 1999 17:08:25 +0000 (17:08 +0000)
* guile-doc-snarf.awk.in: Added.

* ports.c (s_scm_pt_member): Fixed validation.

* guile-doc-snarf.in (filename): Use basename in order to strip
away path.

* debug.c (scm_make_iloc, s_scm_proc_to_mem): Added missing
semicolon.
(scm_memcons, scm_memcons, mem_to_proc): Renamed function name
strings to new form.

* backtrace.c (set_print_params_x): Fixed GUILE_PROC macro.

* tags.h (SCM_UNBOUND): New iflag which is needed for some time to
mark the unboundness of a GOOPS slot.  (Added now in order to
correct a oversight.  Should probably be removed again and
replaced with SCM_UNDEFINED when the corresponding code in GOOPS
is rewritten.)

* print.c (scm_isymnames): Added printed representation for
SCM_UNBOUND.

* eval.c (SCM_CEVAL): Bugfix: Added check for unbound slot in
SCM_IM_SLOT_REF.

libguile/ChangeLog
libguile/backtrace.c
libguile/debug.c
libguile/eval.c
libguile/guile-doc-snarf.awk.in [moved from libguile/guile-doc-snarf.awk with 100% similarity]
libguile/guile-doc-snarf.in
libguile/ports.c
libguile/print.c
libguile/tags.h

index 9b1b4fe..383eb08 100644 (file)
@@ -1,3 +1,33 @@
+1999-12-14  Mikael Djurfeldt  <mdj@mdj.nada.kth.se>
+
+       * guile-doc-snarf.awk: Removed.
+
+       * guile-doc-snarf.awk.in: Added.
+       
+       * ports.c (s_scm_pt_member): Fixed validation.
+
+       * guile-doc-snarf.in (filename): Use basename in order to strip
+       away path.
+
+       * debug.c (scm_make_iloc, s_scm_proc_to_mem): Added missing
+       semicolon.
+       (scm_memcons, scm_memcons, mem_to_proc): Renamed function name
+       strings to new form.
+
+       * backtrace.c (set_print_params_x): Fixed GUILE_PROC macro.
+
+       * tags.h (SCM_UNBOUND): New iflag which is needed for some time to
+       mark the unboundness of a GOOPS slot.  (Added now in order to
+       correct a oversight.  Should probably be removed again and
+       replaced with SCM_UNDEFINED when the corresponding code in GOOPS
+       is rewritten.)
+
+       * print.c (scm_isymnames): Added printed representation for
+       SCM_UNBOUND.
+
+       * eval.c (SCM_CEVAL): Bugfix: Added check for unbound slot in
+       SCM_IM_SLOT_REF.
+
 Mon Dec 13 17:23:22 1999  Greg J. Badros  <gjb@cs.washington.edu>
 
        * strings.c: Fixed mistaken default value in
index 71aadf5..a246e19 100644 (file)
@@ -286,7 +286,8 @@ static print_params_t *print_params = default_print_params;
 
 #ifdef GUILE_DEBUG
 GUILE_PROC(set_print_params_x, "set-print-params!", 1, 0, 0,
-           (SCM params)
+           (SCM params),
+"")
 #define FUNC_NAME s_set_print_params_x
 {
   int i, n = scm_ilength (params);
index 05ad8da..d88b055 100644 (file)
@@ -286,7 +286,7 @@ GUILE_PROC (scm_make_iloc, "make-iloc", 3, 0, 0,
 #define FUNC_NAME s_scm_make_iloc
 {
   SCM_VALIDATE_INT(1,frame);
-  SCM_VALIDATE_INT(2,binding)
+  SCM_VALIDATE_INT(2,binding);
   return (SCM_ILOC00
          + SCM_IFRINC * SCM_INUM (frame)
          + (SCM_NFALSEP (cdrp) ? SCM_ICDR : 0)
@@ -312,7 +312,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0,
     {
       /*fixme* environments may be two different but equal top-level envs */
       if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (car) != env)
-       scm_misc_error (s_memcons,
+       scm_misc_error (s_scm_memcons,
                        "environment mismatch arg1 <-> arg3",
                        scm_cons2 (car, env, SCM_EOL));
       else
@@ -322,7 +322,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0,
   if (SCM_NIMP (cdr) && SCM_MEMOIZEDP (cdr))
     {
       if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (cdr) != env)
-       scm_misc_error (s_memcons,
+       scm_misc_error (s_scm_memcons,
                        "environment mismatch arg2 <-> arg3",
                        scm_cons2 (cdr, env, SCM_EOL));
       else
@@ -335,7 +335,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0,
     SCM_ASSERT (SCM_NULLP (env) || (SCM_NIMP (env) && SCM_CONSP (env)),
                env,
                SCM_ARG3,
-               s_make_iloc);
+               s_scm_make_iloc);
   return scm_make_memoized (scm_cons (car, cdr), env);
 }
 #undef FUNC_NAME
@@ -350,7 +350,7 @@ GUILE_PROC (scm_mem_to_proc, "mem->proc", 1, 0, 0,
   env = SCM_MEMOIZED_ENV (obj);
   obj = SCM_MEMOIZED_EXP (obj);
   if (!(SCM_NIMP (obj) && SCM_CAR (obj) == SCM_IM_LAMBDA))
-    scm_misc_error (s_mem_to_proc,
+    scm_misc_error (s_scm_mem_to_proc,
                    "expected lambda expression",
                    scm_cons (obj, SCM_EOL));
   return scm_closure (SCM_CDR (obj), env);
@@ -362,7 +362,7 @@ GUILE_PROC (scm_proc_to_mem, "proc->mem", 1, 0, 0,
 "")
 #define FUNC_NAME s_scm_proc_to_mem
 {
-  SCM_VALIDATE_CLOSURE(1,obj)
+  SCM_VALIDATE_CLOSURE (1, obj);
   return scm_make_memoized (scm_cons (SCM_IM_LAMBDA, SCM_CODE (obj)),
                            SCM_ENV (obj));
 }
index a27b998..029f231 100644 (file)
@@ -2340,7 +2340,12 @@ dispatch:
        case (SCM_ISYMNUM (SCM_IM_SLOT_REF)):
          x = SCM_CDR (x);
          t.arg1 = EVALCAR (x, env);
-         RETURN (SCM_STRUCT_DATA (t.arg1)[SCM_INUM (SCM_CADR (x))]);
+         proc = SCM_STRUCT_DATA (t.arg1)[SCM_INUM (SCM_CADR (x))];
+         if (proc == SCM_UNBOUND)
+           scm_misc_error (NULL,
+                           "Reference to unbound slot in %S",
+                           SCM_LIST1 (t.arg1));
+         RETURN (proc)
          
        case (SCM_ISYMNUM (SCM_IM_SLOT_SET_X)):
          x = SCM_CDR (x);
@@ -2349,7 +2354,7 @@ dispatch:
          proc = SCM_CDR (x);
          SCM_STRUCT_DATA (t.arg1)[SCM_INUM (SCM_CAR (x))]
            = EVALCAR (proc, env);
-         RETURN (SCM_UNSPECIFIED);
+         RETURN (SCM_UNSPECIFIED)
          
        case (SCM_ISYMNUM (SCM_IM_NIL_COND)):
          proc = SCM_CDR (x);
index b779bf4..27f8f68 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Extract the initialization actions for builtin things.
 
-filename=$1; shift
+filename=`basename $1`; shift
 
 # we need to be sure that the .x file exists
 # since the .c/.cc file may include it
index 274e9fa..6e6be8b 100644 (file)
@@ -454,7 +454,7 @@ GUILE_PROC(scm_pt_member, "pt-member", 1, 0, 0,
 #define FUNC_NAME s_scm_pt_member
 {
   int i;
-  SCM_VALIDATE_INT_copy(1,member,i);
+  SCM_VALIDATE_INT_COPY (1,member,i);
   if (i < 0 || i >= scm_port_table_size)
     return SCM_BOOL_F;
   else
index 42b8fbe..c96853c 100644 (file)
@@ -116,7 +116,9 @@ char *scm_isymnames[] =
   "#@1-ify",
   "#@bind",
   
-  "#@delay"
+  "#@delay",
+  
+  "#<unbound>"
 };
 
 scm_option scm_print_opts[] = {
index 65fdc4c..68d5d63 100644 (file)
@@ -500,12 +500,22 @@ extern char *scm_isymnames[];   /* defined in print.c */
 
 #define SCM_IM_DELAY           SCM_MAKISYM(32)
 
+/* When a variable is unbound this is marked by the SCM_UNDEFINED
+ * value.  The following is an unbound value which can be handled on
+ * the Scheme level, i.e., it can be stored in and retrieved from a
+ * Scheme variable.  This value is only intended to mark an unbound
+ * slot in GOOPS.  It is needed now, but we should probably rewrite
+ * the code which handles this value in C so that SCM_UNDEFINED can be
+ * used instead.  It is not ideal to let this kind of unique and
+ * strange values loose on the Scheme level.
+ */
+#define SCM_UNBOUND            SCM_MAKIFLAG(33)
+
 #define SCM_UNBNDP(x)  (SCM_UNDEFINED==(x))
 
 \f
 
-/* Dispatching aids:
- */
+/* Dispatching aids: */
 
 
 /* For cons pairs with immediate values in the CAR