guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/libguile eval.c


From: Marius Vollmer
Subject: guile/guile-core/libguile eval.c
Date: Sat, 03 Mar 2001 09:24:51 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/03/03 09:24:51

Modified files:
        guile-core/libguile: eval.c 

Log message:
        Cosmetic cleanups.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/eval.c.diff?r1=1.203&r2=1.204

Patches:
Index: guile/guile-core/libguile/eval.c
diff -u guile/guile-core/libguile/eval.c:1.203 
guile/guile-core/libguile/eval.c:1.204
--- guile/guile-core/libguile/eval.c:1.203      Sat Mar  3 07:10:37 2001
+++ guile/guile-core/libguile/eval.c    Sat Mar  3 09:24:51 2001
@@ -1771,6 +1771,16 @@
 /* SECTION: Some local definitions for the evaluator.
  */
 
+/* Update the toplevel environment frame ENV so that it refers to the
+   current module.
+*/
+#define UPDATE_TOPLEVEL_ENV(env) \
+  do { \
+    SCM p = scm_current_module_lookup_closure (); \
+    if (p != SCM_CAR(env)) \
+      env = scm_top_level_env (p); \
+  } while (0)
+
 #ifndef DEVAL
 #define CHECK_EQVISH(A,B)      (SCM_EQ_P ((A), (B)) || (SCM_NFALSEP (scm_eqv_p 
((A), (B)))))
 #endif /* DEVAL */
@@ -1918,9 +1928,11 @@
       goto carloop;
 
     case SCM_BIT8(SCM_IM_BEGIN):
-    cdrxnoap:
+    /* (currently unused)
+    cdrxnoap: */
       PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-    cdrxbegin:
+    /* (currently unused)
+    cdrxbegin: */
       x = SCM_CDR (x);
 
     begin:
@@ -1929,20 +1941,12 @@
       if (SCM_CONSP(env) && !SCM_CONSP(SCM_CAR(env)))
        {
          t.arg1 = x;
-         {
-           SCM p = scm_current_module_lookup_closure ();
-           if (p != SCM_CAR(env))
-             env = scm_top_level_env (p);
-         }
+         UPDATE_TOPLEVEL_ENV (env);
          while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1)))
            {
              EVALCAR (x, env);
              x = t.arg1;
-             {
-               SCM p = scm_current_module_lookup_closure ();
-               if (p != SCM_CAR(env))
-                 env = scm_top_level_env (p);
-             }
+             UPDATE_TOPLEVEL_ENV (env);
            }
          goto carloop;
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]