/[guile]/guile/guile-core/libguile/eval.c
ViewVC logotype

Diff of /guile/guile-core/libguile/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.269 by dirk, Sat Mar 23 00:39:25 2002 UTC revision 1.270 by dirk, Sun Mar 24 22:19:46 2002 UTC
# Line 128  char *alloca (); Line 128  char *alloca ();
128   *     *  
129   *   EVALCAR evaluates the car of an expression.   *   EVALCAR evaluates the car of an expression.
130   *     *  
  *   EVALCELLCAR is like EVALCAR, but is used when it is known that the  
  *   car is a lisp cell.  
  *  
131   * The following macros should be used in code which is read once   * The following macros should be used in code which is read once
132   * (where the choice of evaluator is dynamic):   * (where the choice of evaluator is dynamic):
133   *   *
# Line 146  char *alloca (); Line 143  char *alloca ();
143   */   */
144    
145  #define SCM_CEVAL scm_ceval  #define SCM_CEVAL scm_ceval
 #define EVALCELLCAR(x, env) (SCM_SYMBOLP (SCM_CAR (x)) \  
                              ? *scm_lookupcar (x, env, 1) \  
                              : SCM_CEVAL (SCM_CAR (x), env))  
146    
147  #define EVALCAR(x, env) (SCM_IMP (SCM_CAR (x)) \  #define EVALCAR(x, env) (SCM_IMP (SCM_CAR (x)) \
148                           ? SCM_EVALIM (SCM_CAR (x), env) \                           ? SCM_EVALIM (SCM_CAR (x), env) \
149                           : EVALCELLCAR (x, env))                           : (SCM_SYMBOLP (SCM_CAR (x)) \
150                                ? *scm_lookupcar (x, env, 1) \
151                                : SCM_CEVAL (SCM_CAR (x), env)))
152    
153  #define EXTEND_ENV SCM_EXTEND_ENV  #define EXTEND_ENV SCM_EXTEND_ENV
154    
# Line 1918  SCM_CEVAL (SCM x, SCM env) Line 1914  SCM_CEVAL (SCM x, SCM env)
1914    goto start;    goto start;
1915  #endif  #endif
1916    
 loopnoap:  
   PREP_APPLY (SCM_UNDEFINED, SCM_EOL);  
1917  loop:  loop:
1918  #ifdef DEVAL  #ifdef DEVAL
1919    SCM_CLEAR_ARGSREADY (debug);    SCM_CLEAR_ARGSREADY (debug);
# Line 1932  loop: Line 1926  loop:
1926     *     *
1927     * For this to be the case, however, it is necessary that primitive     * For this to be the case, however, it is necessary that primitive
1928     * special forms which jump back to `loop', `begin' or some similar     * special forms which jump back to `loop', `begin' or some similar
1929     * label call PREP_APPLY.  A convenient way to do this is to jump to     * label call PREP_APPLY.
    * `loopnoap' or `cdrxnoap'.  
1930     */     */
1931    else if (++debug.info >= debug_info_end)    else if (++debug.info >= debug_info_end)
1932      {      {
# Line 2791  dispatch: Line 2784  dispatch:
2784                    SCM_SETCAR (x, SCM_CAR (arg1));                    SCM_SETCAR (x, SCM_CAR (arg1));
2785                    SCM_SETCDR (x, SCM_CDR (arg1));                    SCM_SETCDR (x, SCM_CDR (arg1));
2786                    SCM_ALLOW_INTS;                    SCM_ALLOW_INTS;
2787                    goto loopnoap;                    PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
2788                      goto loop;
2789                  case 1:                  case 1:
2790                    if (SCM_NIMP (x = arg1))                    x = arg1;
2791                      goto loopnoap;                    if (SCM_NIMP (x))
2792                        {
2793                          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
2794                          goto loop;
2795                        }
2796                      else
2797                        RETURN (arg1);
2798                  case 0:                  case 0:
2799                    RETURN (arg1);                    RETURN (arg1);
2800                  }                  }

Legend:
Removed from v.1.269  
changed lines
  Added in v.1.270

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26