[uim-commit] r1808 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Oct 4 15:15:58 PDT 2005
Author: yamaken
Date: 2005-10-04 15:15:55 -0700 (Tue, 04 Oct 2005)
New Revision: 1808
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/sigscheme.h
branches/r5rs/sigscheme/sigschemeinternal.h
branches/r5rs/sigscheme/sigschemetype.h
Log:
* Renamings only
* sigscheme/sigschemetype.h
- (enum ScmObjType): Rename ScmEtc to ScmConstant
- (SCM_ETCP): Rename to SCM_CONSTANTP
- (SCM_CONSTANTP): Renamed from SCM_ETCP
- (SCM_NEQ, SCM_NNULLP): Removed
- (SCM_NFALSEP): Follow the removal of SCM_NEQ
* sigscheme/sigscheme.h
- (SCM_SYMBOL_BOUNDP): Ditto
* sigscheme/sigschemeinternal.h
- (NEQ, NNULLP): Removed
* sigscheme/datas.c
- (SCM_ETC_SET_IMPL): Rename to SCM_CONSTANT_BIND_SUBSTANCE
- (SCM_CONSTANT_BIND_SUBSTANCE): Renamed from SCM_ETC_SET_IMPL
- (SigScm_null_impl, SigScm_true_impl, SigScm_false_impl,
SigScm_eof_impl, SigScm_unbound_impl, SigScm_undef_impl): Rename
to *_cell
- (SigScm_null_cell, SigScm_true_cell, SigScm_false_cell,
SigScm_eof_cell, SigScm_unbound_cell, SigScm_undef_cell): Renamed
from *_impl
- (initialize_special_constants, sweep_obj): Follow the renamings
* sigscheme/debug.c
- (print_etc): Rename to print_constant()
- (print_constant): Reneamed from print_etc
- (print_ScmObj_internal): Follow the renamings
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-10-04 17:59:03 UTC (rev 1807)
+++ branches/r5rs/sigscheme/datas.c 2005-10-04 22:15:55 UTC (rev 1808)
@@ -148,12 +148,12 @@
#define SCM_MARK_CORRUPTED(a) ((unsigned)SCM_MARK_VALUE(a) > (unsigned)scm_cur_marker)
#endif
-/* special constants initialization */
-#define SCM_ETC_SET_IMPL(a, impl) \
- do { \
- (a) = &(impl); \
- SCM_ENTYPE((a), ScmEtc); \
- } while(0)
+/* special constant initialization */
+#define SCM_CONSTANT_BIND_SUBSTANCE(obj, cell) \
+ do { \
+ (obj) = &(cell); \
+ SCM_ENTYPE((obj), ScmConstant); \
+ } while(/* CONSTCOND */ 0)
/*=======================================
Variable Declarations
@@ -181,8 +181,8 @@
ScmObj SigScm_null, SigScm_true, SigScm_false, SigScm_eof;
ScmObj SigScm_unbound, SigScm_undef;
-static ScmObjInternal SigScm_null_impl, SigScm_true_impl, SigScm_false_impl, SigScm_eof_impl;
-static ScmObjInternal SigScm_unbound_impl, SigScm_undef_impl;
+static ScmObjInternal SigScm_null_cell, SigScm_true_cell, SigScm_false_cell, SigScm_eof_cell;
+static ScmObjInternal SigScm_unbound_cell, SigScm_undef_cell;
/*=======================================
File Local Function Declarations
@@ -241,12 +241,12 @@
*/
static void initialize_special_constants(void)
{
- SCM_ETC_SET_IMPL(SigScm_null, SigScm_null_impl );
- SCM_ETC_SET_IMPL(SigScm_true, SigScm_true_impl );
- SCM_ETC_SET_IMPL(SigScm_false, SigScm_false_impl );
- SCM_ETC_SET_IMPL(SigScm_eof, SigScm_eof_impl );
- SCM_ETC_SET_IMPL(SigScm_unbound, SigScm_unbound_impl);
- SCM_ETC_SET_IMPL(SigScm_undef, SigScm_undef_impl );
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_null, SigScm_null_cell);
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_true, SigScm_true_cell);
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_false, SigScm_false_cell);
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_eof, SigScm_eof_cell);
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_unbound, SigScm_unbound_cell);
+ SCM_CONSTANT_BIND_SUBSTANCE(SigScm_undef, SigScm_undef_cell);
#if SCM_COMPAT_SIOD_BUGS
SigScm_false = SigScm_null;
#endif
@@ -605,7 +605,7 @@
/* rarely swept objects */
case ScmContinuation:
case ScmFunc:
- case ScmEtc:
+ case ScmConstant:
case ScmFreeCell:
default:
break;
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-10-04 17:59:03 UTC (rev 1807)
+++ branches/r5rs/sigscheme/debug.c 2005-10-04 22:15:55 UTC (rev 1808)
@@ -107,7 +107,7 @@
static void print_list(FILE *f, ScmObj lst, enum OutputType otype);
static void print_vector(FILE *f, ScmObj vec, enum OutputType otype);
static void print_port(FILE *f, ScmObj port, enum OutputType otype);
-static void print_etc(FILE *f, ScmObj obj, enum OutputType otype);
+static void print_constant(FILE *f, ScmObj obj, enum OutputType otype);
#if SCM_USE_SRFI38
static void hash_grow(hash_table *tab);
@@ -270,8 +270,8 @@
print_list(f, SCM_VALUEPACKET_VALUES(obj), otype);
putc('>', f);
break;
- case ScmEtc:
- print_etc(f, obj, otype);
+ case ScmConstant:
+ print_constant(f, obj, otype);
break;
case ScmFreeCell:
SigScm_Error("You cannot print ScmFreeCell, may be GC bug.");
@@ -451,7 +451,7 @@
fprintf(f, ">");
}
-static void print_etc(FILE *f, ScmObj obj, enum OutputType otype)
+static void print_constant(FILE *f, ScmObj obj, enum OutputType otype)
{
if (EQ(obj, SCM_NULL))
fprintf(f, "()");
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-10-04 17:59:03 UTC (rev 1807)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-10-04 22:15:55 UTC (rev 1808)
@@ -72,7 +72,7 @@
#define SCM_ASSERT(cond) \
((cond) || SigScm_Die("assertion failed.", __FILE__, __LINE__))
-#define SCM_SYMBOL_BOUNDP(sym) (SCM_NEQ(SCM_SYMBOL_VCELL(sym), SCM_UNBOUND))
+#define SCM_SYMBOL_BOUNDP(sym) (!SCM_EQ(SCM_SYMBOL_VCELL(sym), SCM_UNBOUND))
#define SCM_CONS(kar, kdr) (Scm_NewCons(kar, kdr))
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-10-04 17:59:03 UTC (rev 1807)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-10-04 22:15:55 UTC (rev 1808)
@@ -93,9 +93,7 @@
/* Prefix-less Abbreviation Names For Convenient Internal Use */
#define EQ SCM_EQ
-#define NEQ SCM_NEQ
#define NULLP SCM_NULLP
-#define NNULLP SCM_NNULLP
#define FALSEP SCM_FALSEP
#define NFALSEP SCM_NFALSEP
#define EOFP SCM_EOFP
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-10-04 17:59:03 UTC (rev 1807)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-10-04 22:15:55 UTC (rev 1808)
@@ -90,7 +90,7 @@
ScmVector = 7,
ScmPort = 8,
ScmContinuation = 9,
- ScmEtc = 10,
+ ScmConstant = 10,
ScmValuePacket = 11,
ScmFreeCell = 12,
@@ -390,9 +390,9 @@
#endif /* SCM_USE_VALUECONS */
/*============================================================================
- Etcetra Variables (Special Constants like SCM_NULL)
+ Special Constants (such as SCM_NULL)
============================================================================*/
-#define SCM_ETCP(a) (SCM_TYPE(a) == ScmEtc)
+#define SCM_CONSTANTP(a) (SCM_TYPE(a) == ScmConstant)
/*============================================================================
C Pointer Object
@@ -441,11 +441,9 @@
#define SCM_UNDEF SigScm_undef
#define SCM_EQ(a, b) ((a) == (b))
-#define SCM_NEQ(a, b) ((a) != (b))
#define SCM_NULLP(a) (SCM_EQ((a), SCM_NULL))
-#define SCM_NNULLP(a) (SCM_NEQ((a), SCM_NULL))
#define SCM_FALSEP(a) (SCM_EQ((a), SCM_FALSE))
-#define SCM_NFALSEP(a) (SCM_NEQ((a), SCM_FALSE))
+#define SCM_NFALSEP(a) (!SCM_EQ((a), SCM_FALSE))
#define SCM_EOFP(a) (SCM_EQ((a), SCM_EOF))
/*============================================================================
More information about the uim-commit
mailing list