3880 |
SCM |
SCM |
3881 |
scm_i_call_closure_0 (SCM proc) |
scm_i_call_closure_0 (SCM proc) |
3882 |
{ |
{ |
3883 |
const SCM env = SCM_ENV (proc); |
const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc), |
3884 |
const SCM formals = SCM_CLOSURE_FORMALS (proc); |
SCM_EOL, |
3885 |
const SCM new_env = SCM_EXTEND_ENV (formals, SCM_EOL, env); |
SCM_ENV (proc)); |
3886 |
const SCM body = SCM_CLOSURE_BODY (proc); |
const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env); |
|
const SCM result = scm_eval_body (body, new_env); |
|
3887 |
return result; |
return result; |
3888 |
} |
} |
3889 |
|
|
3985 |
static SCM |
static SCM |
3986 |
call_closure_1 (SCM proc, SCM arg1) |
call_closure_1 (SCM proc, SCM arg1) |
3987 |
{ |
{ |
3988 |
const SCM env = SCM_ENV (proc); |
const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc), |
3989 |
const SCM formals = SCM_CLOSURE_FORMALS (proc); |
scm_list_1 (arg1), |
3990 |
const SCM args = scm_list_1 (arg1); |
SCM_ENV (proc)); |
3991 |
const SCM new_env = SCM_EXTEND_ENV (formals, args, env); |
const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env); |
|
const SCM body = SCM_CLOSURE_BODY (proc); |
|
|
const SCM result = scm_eval_body (body, new_env); |
|
3992 |
return result; |
return result; |
3993 |
} |
} |
3994 |
|
|
4064 |
static SCM |
static SCM |
4065 |
call_closure_2 (SCM proc, SCM arg1, SCM arg2) |
call_closure_2 (SCM proc, SCM arg1, SCM arg2) |
4066 |
{ |
{ |
4067 |
const SCM env = SCM_ENV (proc); |
const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc), |
4068 |
const SCM formals = SCM_CLOSURE_FORMALS (proc); |
scm_list_2 (arg1, arg2), |
4069 |
const SCM args = scm_list_2 (arg1, arg2); |
SCM_ENV (proc)); |
4070 |
const SCM new_env = SCM_EXTEND_ENV (formals, args, env); |
const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env); |
|
const SCM body = SCM_CLOSURE_BODY (proc); |
|
|
const SCM result = scm_eval_body (body, new_env); |
|
4071 |
return result; |
return result; |
4072 |
} |
} |
4073 |
|
|