[uim-commit] r1936 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Tue Nov 1 11:39:51 PST 2005
Author: kzk
Date: 2005-11-01 11:39:48 -0800 (Tue, 01 Nov 2005)
New Revision: 1936
Modified:
branches/r5rs/sigscheme/eval.c
branches/r5rs/sigscheme/operations.c
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* Fix naming inconsistency
- introducenew rule: "!" -> d (indicates destructive)
* sigscheme/sigscheme.h
- (ScmExp_setd): renamed from ScmExp_set
- (ScmExp_letstar): renamed from ScmExp_let_star
- (ScmOp_set_card): renamed from ScmOp_set_card
- (ScmOp_set_cdrd): renamed from ScmOp_set_cdrd
- (ScmOp_string_filld): renamed from ScmOp_string_fill
- (ScmOp_vector_setd): renamed from ScmOp_vector_set
- (ScmOp_vector_filld): renamed from ScmOp_vector_filld
* sigscheme/sigscheme.c
- (ScmExp_setd): renamed from ScmExp_set
- (ScmExp_letstar): renamed from ScmExp_let_star
- (ScmOp_set_card): renamed from ScmOp_set_card
- (ScmOp_set_cdrd): renamed from ScmOp_set_cdrd
- (ScmOp_string_filld): renamed from ScmOp_string_fill
- (ScmOp_vector_setd): renamed from ScmOp_vector_set
- (ScmOp_vector_filld): renamed from ScmOp_vector_filld
* sigscheme/eval.c
- (ScmExp_setd): renamed from ScmExp_set
- (ScmExp_letstar): renamed from ScmExp_let_star
* sigscheme/operations.c
- (ScmOp_set_card): renamed from ScmOp_set_card
- (ScmOp_set_cdrd): renamed from ScmOp_set_cdrd
- (ScmOp_string_filld): renamed from ScmOp_string_fill
- (ScmOp_vector_setd): renamed from ScmOp_vector_set
- (ScmOp_vector_filld): renamed from ScmOp_vector_filld
- (ScmOp_make_string): use ScmOp_string_filld
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-11-01 19:15:51 UTC (rev 1935)
+++ branches/r5rs/sigscheme/eval.c 2005-11-01 19:39:48 UTC (rev 1936)
@@ -887,7 +887,7 @@
/*===========================================================================
R5RS : 4.1 Primitive expression types : 4.1.6 Assignment
===========================================================================*/
-ScmObj ScmExp_set(ScmObj sym, ScmObj exp, ScmObj env)
+ScmObj ScmExp_setd(ScmObj sym, ScmObj exp, ScmObj env)
{
ScmObj evaled = SCM_FALSE;
ScmObj locally_bound = SCM_NULL;
@@ -1157,9 +1157,7 @@
return ScmExp_begin(body, eval_state);
}
-/* RFC: ScmExp_letstar is preferable since the Scheme name is not 'let-*', and
- in accordance with the name ScmExp_letrec -- YamaKen */
-ScmObj ScmExp_let_star(ScmObj bindings, ScmObj body, ScmEvalState *eval_state)
+ScmObj ScmExp_letstar(ScmObj bindings, ScmObj body, ScmEvalState *eval_state)
{
ScmObj env = eval_state->env;
ScmObj var = SCM_FALSE;
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2005-11-01 19:15:51 UTC (rev 1935)
+++ branches/r5rs/sigscheme/operations.c 2005-11-01 19:39:48 UTC (rev 1936)
@@ -615,7 +615,7 @@
return CONS(car, cdr);
}
-ScmObj ScmOp_setcar(ScmObj pair, ScmObj car)
+ScmObj ScmOp_set_card(ScmObj pair, ScmObj car)
{
DECLARE_FUNCTION("set-car!", SyntaxFixed2);
ASSERT_CONSP(pair);
@@ -629,7 +629,7 @@
#endif
}
-ScmObj ScmOp_setcdr(ScmObj pair, ScmObj cdr)
+ScmObj ScmOp_set_cdrd(ScmObj pair, ScmObj cdr)
{
DECLARE_FUNCTION("set-cdr!", SyntaxFixed2);
ASSERT_CONSP(pair);
@@ -1243,7 +1243,7 @@
str = Scm_NewStringWithLen(NULL, len);
/* and fill! */
- ScmOp_string_fill(str, filler);
+ ScmOp_string_filld(str, filler);
return str;
}
@@ -1288,7 +1288,7 @@
return Scm_NewChar(new_ch);
}
-ScmObj ScmOp_string_set(ScmObj str, ScmObj k, ScmObj ch)
+ScmObj ScmOp_string_setd(ScmObj str, ScmObj k, ScmObj ch)
{
int c_start_index = 0;
int prefix_size = 0;
@@ -1511,7 +1511,7 @@
return Scm_NewStringCopying(SCM_STRING_STR(string));
}
-ScmObj ScmOp_string_fill(ScmObj string, ScmObj ch)
+ScmObj ScmOp_string_filld(ScmObj string, ScmObj ch)
{
int char_size = 0;
int str_len = 0;
@@ -1606,7 +1606,7 @@
return SCM_VECTOR_REF(vec, scm_k);
}
-ScmObj ScmOp_vector_set(ScmObj vec, ScmObj scm_k, ScmObj obj)
+ScmObj ScmOp_vector_setd(ScmObj vec, ScmObj scm_k, ScmObj obj)
{
DECLARE_FUNCTION("vector-set!", ProcedureFixed3);
ASSERT_VECTORP(vec);
@@ -1672,7 +1672,7 @@
return Scm_NewVector(v, c_len);
}
-ScmObj ScmOp_vector_fill(ScmObj vec, ScmObj fill)
+ScmObj ScmOp_vector_filld(ScmObj vec, ScmObj fill)
{
int c_len = 0;
int i = 0;
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-11-01 19:15:51 UTC (rev 1935)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-11-01 19:39:48 UTC (rev 1936)
@@ -187,7 +187,7 @@
Scm_RegisterProcedureVariadicTailRec2("apply" , ScmOp_apply);
Scm_RegisterSyntaxFixed1("quote" , ScmOp_quote);
Scm_RegisterSyntaxVariadic2("lambda" , ScmExp_lambda);
- Scm_RegisterSyntaxFixed2("set!" , ScmExp_set);
+ Scm_RegisterSyntaxFixed2("set!" , ScmExp_setd);
Scm_RegisterSyntaxFixed1("delay" , ScmOp_delay);
Scm_RegisterSyntaxFixed1("quasiquote" , ScmOp_quasiquote);
Scm_RegisterSyntaxFixed1("unquote" , ScmOp_unquote);
@@ -197,7 +197,7 @@
Scm_RegisterSyntaxVariadicTailRec0("cond" , ScmExp_cond); /* FIXME */
Scm_RegisterSyntaxVariadicTailRec1("case" , ScmExp_case);
Scm_RegisterSyntaxVariadicTailRec0("let" , ScmExp_let); /* FIXME */
- Scm_RegisterSyntaxVariadicTailRec1("let*" , ScmExp_let_star);
+ Scm_RegisterSyntaxVariadicTailRec1("let*" , ScmExp_letstar);
Scm_RegisterSyntaxVariadicTailRec1("letrec" , ScmExp_letrec);
Scm_RegisterSyntaxVariadicTailRec0("begin" , ScmExp_begin);
Scm_RegisterSyntaxVariadicTailRec2("do" , ScmExp_do);
@@ -240,8 +240,8 @@
Scm_RegisterProcedureFixed2("cons" , ScmOp_cons);
Scm_RegisterProcedureFixed1("car" , ScmOp_car);
Scm_RegisterProcedureFixed1("cdr" , ScmOp_cdr);
- Scm_RegisterProcedureFixed2("set-car!" , ScmOp_setcar);
- Scm_RegisterProcedureFixed2("set-cdr!" , ScmOp_setcdr);
+ Scm_RegisterProcedureFixed2("set-car!" , ScmOp_set_card);
+ Scm_RegisterProcedureFixed2("set-cdr!" , ScmOp_set_cdrd);
Scm_RegisterProcedureFixed1("caar" , ScmOp_caar);
Scm_RegisterProcedureFixed1("cadr" , ScmOp_cadr);
Scm_RegisterProcedureFixed1("cdar" , ScmOp_cdar);
@@ -302,7 +302,7 @@
Scm_RegisterProcedureVariadic1("make-string" , ScmOp_make_string);
Scm_RegisterProcedureVariadic0("string" , ScmOp_string);
Scm_RegisterProcedureFixed2("string-ref" , ScmOp_string_ref);
- Scm_RegisterProcedureFixed3("string-set!" , ScmOp_string_set);
+ Scm_RegisterProcedureFixed3("string-set!" , ScmOp_string_setd);
Scm_RegisterProcedureFixed1("string-length" , ScmOp_string_length);
Scm_RegisterProcedureFixed2("string=?" , ScmOp_string_equal);
Scm_RegisterProcedureFixed3("substring" , ScmOp_string_substring);
@@ -310,16 +310,16 @@
Scm_RegisterProcedureFixed1("string->list" , ScmOp_string2list);
Scm_RegisterProcedureFixed1("list->string" , ScmOp_list2string);
Scm_RegisterProcedureFixed1("string-copy" , ScmOp_string_copy);
- Scm_RegisterProcedureFixed2("string-fill!" , ScmOp_string_fill);
+ Scm_RegisterProcedureFixed2("string-fill!" , ScmOp_string_filld);
Scm_RegisterProcedureFixed1("vector?" , ScmOp_vectorp);
Scm_RegisterProcedureVariadic1("make-vector" , ScmOp_make_vector);
Scm_RegisterProcedureVariadic0("vector" , ScmOp_vector);
Scm_RegisterProcedureFixed1("vector-length" , ScmOp_vector_length);
Scm_RegisterProcedureFixed2("vector-ref" , ScmOp_vector_ref);
- Scm_RegisterProcedureFixed3("vector-set!" , ScmOp_vector_set);
+ Scm_RegisterProcedureFixed3("vector-set!" , ScmOp_vector_setd);
Scm_RegisterProcedureFixed1("vector->list" , ScmOp_vector2list);
Scm_RegisterProcedureFixed1("list->vector" , ScmOp_list2vector);
- Scm_RegisterProcedureFixed2("vector-fill!" , ScmOp_vector_fill);
+ Scm_RegisterProcedureFixed2("vector-fill!" , ScmOp_vector_filld);
Scm_RegisterProcedureFixed1("procedure?" , ScmOp_procedurep);
Scm_RegisterProcedureVariadic1("map" , ScmOp_map);
Scm_RegisterProcedureVariadic1("for-each" , ScmOp_for_each);
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-11-01 19:15:51 UTC (rev 1935)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-11-01 19:39:48 UTC (rev 1936)
@@ -428,13 +428,13 @@
ScmObj ScmOp_quote(ScmObj datum, ScmObj env);
ScmObj ScmExp_lambda(ScmObj formals, ScmObj first_expr, ScmObj rest, ScmObj env);
ScmObj ScmExp_if(ScmObj test, ScmObj conseq, ScmObj rest, ScmEvalState *eval_state);
-ScmObj ScmExp_set(ScmObj var, ScmObj val, ScmObj env);
+ScmObj ScmExp_setd(ScmObj var, ScmObj val, ScmObj env);
ScmObj ScmExp_cond(ScmObj args, ScmEvalState *eval_state);
ScmObj ScmExp_case(ScmObj key, ScmObj args, ScmEvalState *eval_state);
ScmObj ScmExp_and(ScmObj args, ScmEvalState *eval_state);
ScmObj ScmExp_or(ScmObj args, ScmEvalState *eval_state);
ScmObj ScmExp_let(ScmObj args, ScmEvalState *eval_state);
-ScmObj ScmExp_let_star(ScmObj bindings, ScmObj body, ScmEvalState *eval_state);
+ScmObj ScmExp_letstar(ScmObj bindings, ScmObj body, ScmEvalState *eval_state);
ScmObj ScmExp_letrec(ScmObj bindings, ScmObj body, ScmEvalState *eval_state);
ScmObj ScmExp_begin(ScmObj args, ScmEvalState *eval_state);
ScmObj ScmExp_do(ScmObj bindings, ScmObj testframe, ScmObj commands, ScmEvalState *eval_state);
@@ -482,8 +482,8 @@
ScmObj ScmOp_cdr(ScmObj obj);
ScmObj ScmOp_pairp(ScmObj obj);
ScmObj ScmOp_cons(ScmObj car, ScmObj cdr);
-ScmObj ScmOp_setcar(ScmObj pair, ScmObj car);
-ScmObj ScmOp_setcdr(ScmObj pair, ScmObj cdr);
+ScmObj ScmOp_set_card(ScmObj pair, ScmObj car);
+ScmObj ScmOp_set_cdrd(ScmObj pair, ScmObj cdr);
ScmObj ScmOp_caar(ScmObj lst);
ScmObj ScmOp_cadr(ScmObj lst);
ScmObj ScmOp_cdar(ScmObj lst);
@@ -548,7 +548,7 @@
ScmObj ScmOp_string(ScmObj args);
ScmObj ScmOp_string_length(ScmObj str);
ScmObj ScmOp_string_ref(ScmObj str, ScmObj k);
-ScmObj ScmOp_string_set(ScmObj str, ScmObj k, ScmObj ch);
+ScmObj ScmOp_string_setd(ScmObj str, ScmObj k, ScmObj ch);
ScmObj ScmOp_string_equal(ScmObj str1, ScmObj str2);
/* TODO : many comparing functions around string is unimplemented */
ScmObj ScmOp_string_substring(ScmObj str, ScmObj start, ScmObj end);
@@ -556,16 +556,16 @@
ScmObj ScmOp_string2list(ScmObj string);
ScmObj ScmOp_list2string(ScmObj lst);
ScmObj ScmOp_string_copy(ScmObj string);
-ScmObj ScmOp_string_fill(ScmObj string, ScmObj ch);
+ScmObj ScmOp_string_filld(ScmObj string, ScmObj ch);
ScmObj ScmOp_vectorp(ScmObj obj);
ScmObj ScmOp_make_vector(ScmObj vector_len, ScmObj args);
ScmObj ScmOp_vector(ScmObj args);
ScmObj ScmOp_vector_length(ScmObj vec);
ScmObj ScmOp_vector_ref(ScmObj vec, ScmObj scm_k);
-ScmObj ScmOp_vector_set(ScmObj vec, ScmObj scm_k, ScmObj obj);
+ScmObj ScmOp_vector_setd(ScmObj vec, ScmObj scm_k, ScmObj obj);
ScmObj ScmOp_vector2list(ScmObj vec);
ScmObj ScmOp_list2vector(ScmObj lst);
-ScmObj ScmOp_vector_fill(ScmObj vec, ScmObj fill);
+ScmObj ScmOp_vector_filld(ScmObj vec, ScmObj fill);
ScmObj ScmOp_procedurep(ScmObj obj);
ScmObj ScmOp_map(ScmObj proc, ScmObj args);
ScmObj ScmOp_for_each(ScmObj proc, ScmObj args);
More information about the uim-commit
mailing list