[uim-commit] r2917 - branches/r5rs/sigscheme/src
yamaken at freedesktop.org
yamaken at freedesktop.org
Sat Jan 14 11:13:19 PST 2006
Author: yamaken
Date: 2006-01-14 11:13:10 -0800 (Sat, 14 Jan 2006)
New Revision: 2917
Modified:
branches/r5rs/sigscheme/src/eval.c
branches/r5rs/sigscheme/src/operations-siod.c
branches/r5rs/sigscheme/src/operations-srfi2.c
branches/r5rs/sigscheme/src/operations-srfi34.c
branches/r5rs/sigscheme/src/sigscheme.h
branches/r5rs/sigscheme/src/storage-continuation.c
branches/r5rs/sigscheme/src/syntax.c
Log:
* sigscheme/src/sigscheme.h
- (enum ScmReturnType): Rename to ScmValueType
- (enum ScmValueType):
* Renamed from ScmReturnType
* Rename SCM_RETTYPE_* to SCM_VALTYPE_*
- (struct ScmEvalState_, SCM_EVAL_STATE_INIT, SCM_EVAL_STATE_INIT1):
Follow the renaming
* sigscheme/src/storage-continuation.c
* sigscheme/src/operations-srfi34.c
* sigscheme/src/operations-srfi2.c
* sigscheme/src/sigscheme.h
* sigscheme/src/operations-siod.c
* sigscheme/src/syntax.c
* sigscheme/src/eval.c
- Follow the renamings by
perl -i -pe 's/\bSCM_RETTYPE_/SCM_VALTYPE_/g' sigscheme/src/*.[ch]
Modified: branches/r5rs/sigscheme/src/eval.c
===================================================================
--- branches/r5rs/sigscheme/src/eval.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/eval.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -106,7 +106,7 @@
{
SCM_ASSERT(PROPER_LISTP(args));
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return call(proc, args, eval_state, SUPPRESS_EVAL_ARGS);
}
@@ -126,10 +126,10 @@
* closure, it'll have its own environment, if it's a syntax, it's
* an error, and if it's a C procedure, it doesn't have any free
* variables at the Scheme level. */
- SCM_EVAL_STATE_INIT2(state, SCM_INTERACTION_ENV, SCM_RETTYPE_AS_IS);
+ SCM_EVAL_STATE_INIT2(state, SCM_INTERACTION_ENV, SCM_VALTYPE_AS_IS);
ret = call(proc, args, &state, SUPPRESS_EVAL_ARGS);
- if (state.ret_type == SCM_RETTYPE_NEED_EVAL)
+ if (state.ret_type == SCM_VALTYPE_NEED_EVAL)
ret = EVAL(ret, state.env);
return ret;
}
@@ -252,7 +252,7 @@
SCM_ASSERT(scm_false);
}
- eval_state->ret_type = SCM_RETTYPE_NEED_EVAL;
+ eval_state->ret_type = SCM_VALTYPE_NEED_EVAL;
return scm_s_body(body, eval_state);
err_improper:
@@ -342,10 +342,10 @@
}
if (type & SCM_FUNCTYPE_TAIL_REC) {
- eval_state->ret_type = SCM_RETTYPE_NEED_EVAL;
+ eval_state->ret_type = SCM_VALTYPE_NEED_EVAL;
argbuf[i++] = eval_state;
} else {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
if (type & SCM_FUNCTYPE_SYNTAX)
argbuf[i++] = env;
}
@@ -422,7 +422,7 @@
case ScmCons:
obj = call(CAR(obj), CDR(obj), &state, EVAL_ARGS);
- if (state.ret_type == SCM_RETTYPE_NEED_EVAL)
+ if (state.ret_type == SCM_VALTYPE_NEED_EVAL)
goto eval_loop;
/* FALLTHROUGH */
default:
Modified: branches/r5rs/sigscheme/src/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-siod.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/operations-siod.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -172,7 +172,7 @@
{
DECLARE_FUNCTION("the-environment", procedure_fixed_tailrec_0);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return eval_state->env;
}
Modified: branches/r5rs/sigscheme/src/operations-srfi2.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi2.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/operations-srfi2.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -108,7 +108,7 @@
goto err;
}
if (FALSEP(val)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_FALSE;
}
}
Modified: branches/r5rs/sigscheme/src/operations-srfi34.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi34.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/operations-srfi34.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -282,7 +282,7 @@
ret = scm_call_with_current_continuation(proc_guard_int, eval_state);
eval_state->env = lex_env;
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return scm_call(ret, SCM_NULL);
}
@@ -313,9 +313,9 @@
LIST_1(LIST_2(syn_guard_handler_body, sym_handler_k)),
eval_state->env);
ret = scm_call_with_current_continuation(handler_body, eval_state);
- if (eval_state->ret_type == SCM_RETTYPE_NEED_EVAL) {
+ if (eval_state->ret_type == SCM_VALTYPE_NEED_EVAL) {
ret = EVAL(ret, eval_state->env);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
}
return scm_call(ret, SCM_NULL);
}
@@ -362,7 +362,7 @@
caught = scm_s_cond_internal(clauses, SCM_INVALID, &eval_state);
if (VALIDP(caught)) {
- if (eval_state.ret_type == SCM_RETTYPE_NEED_EVAL)
+ if (eval_state.ret_type == SCM_VALTYPE_NEED_EVAL)
caught = EVAL(caught, cond_env);
scm_call_continuation(guard_k, delay(caught, cond_env));
} else {
@@ -388,9 +388,9 @@
/* evaluate the body */
SCM_EVAL_STATE_INIT1(lex_eval_state, lex_env);
result = scm_s_body(body, &lex_eval_state);
- if (lex_eval_state.ret_type == SCM_RETTYPE_NEED_EVAL)
+ if (lex_eval_state.ret_type == SCM_VALTYPE_NEED_EVAL)
result = EVAL(result, lex_env);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
scm_call_continuation(guard_k, delay(result, lex_env));
/* NOTREACHED */
Modified: branches/r5rs/sigscheme/src/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/src/sigscheme.h 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/sigscheme.h 2006-01-14 19:13:10 UTC (rev 2917)
@@ -631,25 +631,25 @@
/*=======================================
Evaluator's State
=======================================*/
-enum ScmReturnType {
- SCM_RETTYPE_AS_IS = 0,
- SCM_RETTYPE_NEED_EVAL = 1
+enum ScmValueType {
+ SCM_VALTYPE_AS_IS = scm_false,
+ SCM_VALTYPE_NEED_EVAL = scm_true
};
typedef struct ScmEvalState_ ScmEvalState;
struct ScmEvalState_ {
ScmObj env;
- enum ScmReturnType ret_type;
+ enum ScmValueType ret_type;
};
/* Use these constructors instead of manually initialize each members because
* another member may be added. Such member will implicitly be initialized
* properly as long as the constructors are used. */
#define SCM_EVAL_STATE_INIT(state) \
- SCM_EVAL_STATE_INIT2((state), SCM_INTERACTION_ENV, SCM_RETTYPE_NEED_EVAL)
+ SCM_EVAL_STATE_INIT2((state), SCM_INTERACTION_ENV, SCM_VALTYPE_NEED_EVAL)
#define SCM_EVAL_STATE_INIT1(state, env) \
- SCM_EVAL_STATE_INIT2((state), (env), SCM_RETTYPE_NEED_EVAL)
+ SCM_EVAL_STATE_INIT2((state), (env), SCM_VALTYPE_NEED_EVAL)
#define SCM_EVAL_STATE_INIT2(state, _env, _ret_type) \
do { \
Modified: branches/r5rs/sigscheme/src/storage-continuation.c
===================================================================
--- branches/r5rs/sigscheme/src/storage-continuation.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/storage-continuation.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -291,7 +291,7 @@
enter_dynamic_extent(cont_frame.dyn_ext);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return cont_frame.ret_val;
} else {
#if SCM_NESTED_CONTINUATION_ONLY
@@ -299,7 +299,7 @@
* not be scm_tailcall(), to preserve current stack until longjmp()
* called.
*/
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
ret = scm_call(proc, LIST_1(cont));
#else
/* ONLY FOR TESTING: This call is properly recursible, but all
Modified: branches/r5rs/sigscheme/src/syntax.c
===================================================================
--- branches/r5rs/sigscheme/src/syntax.c 2006-01-14 18:43:29 UTC (rev 2916)
+++ branches/r5rs/sigscheme/src/syntax.c 2006-01-14 19:13:10 UTC (rev 2917)
@@ -526,7 +526,7 @@
if (EQ(test, sym_else)) {
ERR_OBJ("bad clause: else with no expressions", clause);
} else {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return test;
}
}
@@ -556,7 +556,7 @@
if (!PROCEDUREP(proc))
ERR_OBJ("exp after => must be a procedure but got", proc);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return scm_call(proc, LIST_1(test));
}
@@ -569,7 +569,7 @@
* To distinguish unmatched status from SCM_UNDEF from a clause, pure
* internal value SCM_INVALID is returned. Don't pass it to Scheme world.
*/
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_INVALID;
}
@@ -601,7 +601,7 @@
DECLARE_FUNCTION("and", syntax_variadic_tailrec_0);
if (NO_MORE_ARG(args)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_TRUE;
}
@@ -609,7 +609,7 @@
val = EVAL(expr, eval_state->env);
if (FALSEP(val)) {
ASSERT_PROPER_ARG_LIST(args);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_FALSE;
}
}
@@ -625,7 +625,7 @@
DECLARE_FUNCTION("or", syntax_variadic_tailrec_0);
if (NO_MORE_ARG(args)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_FALSE;
}
@@ -633,7 +633,7 @@
val = EVAL(expr, eval_state->env);
if (!FALSEP(val)) {
ASSERT_PROPER_ARG_LIST(args);
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return val;
}
}
@@ -661,7 +661,7 @@
#if SCM_STRICT_ARGCHECK
if (NO_MORE_ARG(body)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_UNDEF;
}
@@ -723,7 +723,7 @@
if (EQ(CAR(exp), sym_define))
ERR_OBJ(ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION, exp);
} else {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
}
ASSERT_NO_MORE_ARG(body);
@@ -923,7 +923,7 @@
DECLARE_FUNCTION("begin", syntax_variadic_tailrec_0);
if (NO_MORE_ARG(args)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_UNDEF;
}
@@ -1025,7 +1025,7 @@
* expression is unspecified. */
eval_state->env = env;
if (NULLP(exps)) {
- eval_state->ret_type = SCM_RETTYPE_AS_IS;
+ eval_state->ret_type = SCM_VALTYPE_AS_IS;
return SCM_UNDEF;
} else {
return scm_s_begin(exps, eval_state);
More information about the uim-commit
mailing list