1 |
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. |
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. |
2 |
* |
* |
3 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
4 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
2584 |
} |
} |
2585 |
} |
} |
2586 |
|
|
2587 |
|
|
2588 |
case (SCM_ISYMNUM (SCM_IM_SLOT_REF)): |
case (SCM_ISYMNUM (SCM_IM_SLOT_REF)): |
2589 |
x = SCM_CDR (x); |
x = SCM_CDR (x); |
2590 |
t.arg1 = EVALCAR (x, env); |
{ |
2591 |
RETURN (SCM_PACK (SCM_STRUCT_DATA (t.arg1) [SCM_INUM (SCM_CADR (x))])); |
SCM instance = EVALCAR (x, env); |
2592 |
|
unsigned long int slot = SCM_INUM (SCM_CADR (x)); |
2593 |
|
RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot])); |
2594 |
|
} |
2595 |
|
|
2596 |
|
|
2597 |
case (SCM_ISYMNUM (SCM_IM_SLOT_SET_X)): |
case (SCM_ISYMNUM (SCM_IM_SLOT_SET_X)): |
2598 |
x = SCM_CDR (x); |
x = SCM_CDR (x); |
2599 |
t.arg1 = EVALCAR (x, env); |
{ |
2600 |
x = SCM_CDR (x); |
SCM instance = EVALCAR (x, env); |
2601 |
proc = SCM_CDR (x); |
unsigned long int slot = SCM_INUM (SCM_CADR (x)); |
2602 |
SCM_STRUCT_DATA (t.arg1) [SCM_INUM (SCM_CAR (x))] |
SCM value = EVALCAR (SCM_CDDR (x), env); |
2603 |
= SCM_UNPACK (EVALCAR (proc, env)); |
SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (value); |
2604 |
RETURN (SCM_UNSPECIFIED); |
RETURN (SCM_UNSPECIFIED); |
2605 |
|
} |
2606 |
|
|
2607 |
|
|
2608 |
#ifdef SCM_ENABLE_ELISP |
#ifdef SCM_ENABLE_ELISP |
2609 |
|
|
2610 |
case (SCM_ISYMNUM (SCM_IM_NIL_COND)): |
case (SCM_ISYMNUM (SCM_IM_NIL_COND)): |
2611 |
proc = SCM_CDR (x); |
{ |
2612 |
while (SCM_NIMP (x = SCM_CDR (proc))) |
SCM test_form = SCM_CDR (x); |
2613 |
{ |
x = SCM_CDR (test_form); |
2614 |
if (!(SCM_FALSEP (t.arg1 = EVALCAR (proc, env)) |
while (!SCM_NULL_OR_NIL_P (x)) |
2615 |
|| SCM_NILP (t.arg1) |
{ |
2616 |
|| SCM_NULLP (t.arg1))) |
SCM test_result = EVALCAR (test_form, env); |
2617 |
{ |
if (!(SCM_FALSEP (test_result) |
2618 |
if (SCM_EQ_P (SCM_CAR (x), SCM_UNSPECIFIED)) |
|| SCM_NULL_OR_NIL_P (test_result))) |
2619 |
RETURN (t.arg1); |
{ |
2620 |
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); |
if (SCM_EQ_P (SCM_CAR (x), SCM_UNSPECIFIED)) |
2621 |
goto carloop; |
RETURN (test_result); |
2622 |
} |
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); |
2623 |
proc = SCM_CDR (x); |
goto carloop; |
2624 |
} |
} |
2625 |
x = proc; |
else |
2626 |
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); |
{ |
2627 |
goto carloop; |
test_form = SCM_CDR (x); |
2628 |
|
x = SCM_CDR (test_form); |
2629 |
|
} |
2630 |
|
} |
2631 |
|
x = test_form; |
2632 |
|
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); |
2633 |
|
goto carloop; |
2634 |
|
} |
2635 |
|
|
2636 |
#endif /* SCM_ENABLE_ELISP */ |
#endif /* SCM_ENABLE_ELISP */ |
2637 |
|
|
2653 |
|
|
2654 |
scm_swap_bindings (vars, vals); |
scm_swap_bindings (vars, vals); |
2655 |
scm_dynwinds = scm_acons (vars, vals, scm_dynwinds); |
scm_dynwinds = scm_acons (vars, vals, scm_dynwinds); |
2656 |
|
|
2657 |
arg2 = x = SCM_CDR (x); |
/* Ignore all but the last evaluation result. */ |
2658 |
while (!SCM_NULLP (arg2 = SCM_CDR (arg2))) |
for (x = SCM_CDR (x); !SCM_NULLP (SCM_CDR (x)); x = SCM_CDR (x)) |
2659 |
{ |
{ |
2660 |
SIDEVAL (SCM_CAR (x), env); |
if (SCM_CONSP (SCM_CAR (x))) |
2661 |
x = arg2; |
SCM_CEVAL (SCM_CAR (x), env); |
2662 |
} |
} |
2663 |
proc = EVALCAR (x, env); |
proc = EVALCAR (x, env); |
2664 |
|
|
2668 |
RETURN (proc); |
RETURN (proc); |
2669 |
} |
} |
2670 |
|
|
2671 |
|
|
2672 |
case (SCM_ISYMNUM (SCM_IM_CALL_WITH_VALUES)): |
case (SCM_ISYMNUM (SCM_IM_CALL_WITH_VALUES)): |
2673 |
{ |
{ |
2674 |
proc = SCM_CDR (x); |
proc = SCM_CDR (x); |