[uim-commit] r1603 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Sep 26 19:19:50 PDT 2005
Author: yamaken
Date: 2005-09-26 19:19:48 -0700 (Mon, 26 Sep 2005)
New Revision: 1603
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (SCM_REDUCE, SCM_REDUCE_EXT): Removed
* sigscheme/TODO
- Update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-27 02:17:25 UTC (rev 1602)
+++ branches/r5rs/sigscheme/TODO 2005-09-27 02:19:48 UTC (rev 1603)
@@ -61,11 +61,6 @@
==============================================================================
Logical simplifications:
-* Split ScmOp_eval()'s function invocation handling off into a separated
- function and share it with ScmOp_apply()
-
-* Withdraw SCM_REDUCE*() macro
-
* Reorganize SCM_SHIFT*() macros and simplify args extraction codes
* Automatically append "\n" in SigScm_Error() instead of append by caller
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-27 02:17:25 UTC (rev 1602)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-27 02:19:48 UTC (rev 1603)
@@ -243,61 +243,6 @@
&& SCM_SHIFT_EVALED(elm3, lst, env) \
&& SCM_SHIFT_EVALED(elm4, lst, env)) ? (lst) : 0)
-/*
- * TODO: Simplify implementation of following functions with SCM_REDUCE and
- * SCM_REDUCE_EXT. Anyone?
- *
- * - ScmOp_add, ScmOp_multiply, ScmOp_subtract, ScmOp_divide, ScmOp_equal,
- * ScmOp_less, ScmOp_greater, ScmOp_less_eq, ScmOp_greater_eq, ScmOp_max,
- * ScmOp_min
- */
-#define SCM_REDUCE(fexp, ridentity, lst, env, \
- ctype, validp, extract, make, err_header) \
- SCM_REDUCE_EXT((accum = (fexp)), \
- return make(ridentity), \
- return scm_elm, \
- lst, env, \
- ctype, validp, extract, make, \
- err_header)
-
-#define SCM_REDUCE_EXT(exp_loop, exp0, exp1, lst, env, \
- ctype, validp, extract, make, \
- err_header) \
- do { \
- ScmObj scm_elm, rest; \
- ctype elm, accum; \
- \
- /* 0 */ \
- if (NULLP(lst)) { \
- exp0; \
- } \
- \
- /* 1 */ \
- scm_elm = EVAL(CAR(lst), env); \
- accum = elm = extract(scm_elm); \
- if (!validp(scm_elm)) { \
- SigScm_ErrorObj(err_header, scm_elm); \
- return SCM_FALSE; \
- } else if (NULLP(CDR(lst))) { \
- exp1; \
- } \
- \
- /* 2+ */ \
- rest = CDR(lst); \
- do { \
- scm_elm = EVAL(CAR(rest), env); \
- rest = CDR(rest); \
- if (!validp(scm_elm)) { \
- SigScm_ErrorObj(err_header, scm_elm); \
- return SCM_FALSE; \
- } \
- elm = extract(scm_elm); \
- exp_loop; \
- } while (!NULLP(rest)); \
- \
- return make(accum); \
- } while (/* CONSTCOND */ 0)
-
/*=======================================
Function Declarations
=======================================*/
More information about the uim-commit
mailing list