This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patches to backtrace.c


Hey, more patches and thoughts -- and it's not christmas yet.

Again, I eliminated redundant SCM_NIMP tests, the patches are appended
below.  The patch of function display_expression is not obviously valid,
but display_expression is static and only called from one single place,
where the predicate is always fulfilled.  Further, scm_unmemoize performs
a SCM_NIMP test itself.

Best regards,
Dirk Herrmann

diff -u -p -r1.38 backtrace.c
--- backtrace.c 1999/12/16 20:48:03     1.38
+++ backtrace.c 1999/12/23 17:21:59
@@ -157,8 +157,7 @@ display_expression (SCM frame,SCM pname,
   pstate->length = 3;
   if (SCM_ROSTRINGP (pname))
     {
-      if (SCM_NIMP (frame)
-         && SCM_FRAMEP (frame)
+      if (SCM_FRAMEP (frame)
          && SCM_FRAME_EVAL_ARGS_P (frame))
        scm_puts ("While evaluating arguments to ", port);
       else
@@ -171,7 +170,7 @@ display_expression (SCM frame,SCM pname,
          scm_iprin1 (scm_unmemoize (source), port, pstate);
        }
     }
-  else if (SCM_NIMP (source))
+  else
     {
       scm_puts ("In expression ", port);
       pstate->writingp = 1;
@@ -199,7 +198,6 @@ display_error_body (struct display_error
   SCM prev_frame = SCM_BOOL_F;
 
   if (SCM_DEBUGGINGP
-      && SCM_NIMP (a->stack)
       && SCM_STACKP (a->stack)
       && SCM_STACK_LENGTH (a->stack) > 0)
     {



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]