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 |
* |
* |
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 |
|
|
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); |
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 |
{ |
{ |
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 |
} |
} |