* eval.c (SCM_CEVAL): Avoid one level of indirection when applying
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 30 May 2003 11:04:57 +0000 (11:04 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 30 May 2003 11:04:57 +0000 (11:04 +0000)
a non closure.

libguile/ChangeLog
libguile/eval.c

index 8335d13..4f712ef 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-30  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
+       a non closure.
+
 2003-05-30  Stefan Jahn  <stefan@lkcc.org>
 
        * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV 
index 9495c83..6a72b3f 100644 (file)
@@ -2383,13 +2383,13 @@ dispatch:
 
 
        case (SCM_ISYMNUM (SCM_IM_APPLY)):
-         proc = SCM_CDR (x);
-         proc = EVALCAR (proc, env);
+         x = SCM_CDR (x);
+         proc = EVALCAR (x, env);
+          PREP_APPLY (proc, SCM_EOL);
+          x = SCM_CDR (x);
+          arg1 = EVALCAR (x, env);
          if (SCM_CLOSUREP (proc))
            {
-             PREP_APPLY (proc, SCM_EOL);
-             arg1 = SCM_CDDR (x);
-             arg1 = EVALCAR (arg1, env);
            apply_closure:
              /* Go here to tail-call a closure.  PROC is the closure
                 and ARG1 is the list of arguments.  Do not forget to
@@ -2426,8 +2426,8 @@ dispatch:
            }
          else
            {
-             proc = f_apply;
-             goto evapply;
+              ENTER_APPLY;
+              RETURN (SCM_APPLY (proc, arg1, SCM_EOL));
            }