[uim-commit] r2821 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Jan 6 15:43:03 PST 2006


Author: yamaken
Date: 2006-01-06 15:42:59 -0800 (Fri, 06 Jan 2006)
New Revision: 2821

Modified:
   branches/r5rs/sigscheme/sigschemeinternal.h
   branches/r5rs/sigscheme/syntax.c
Log:
* sigscheme/sigschemeinternal.h
  - (scm_extend_environment): Follow the renaming of r
* sigscheme/syntax.c
  - (scm_s_let, scm_s_letrec): Rename local variables


Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h	2006-01-06 23:30:22 UTC (rev 2820)
+++ branches/r5rs/sigscheme/sigschemeinternal.h	2006-01-06 23:42:59 UTC (rev 2821)
@@ -480,7 +480,7 @@
 void scm_finalize_symbol(void);
 
 /* env.c */
-ScmObj scm_extend_environment(ScmObj vars, ScmObj vals, ScmObj env);
+ScmObj scm_extend_environment(ScmObj formals, ScmObj actuals, ScmObj env);
 ScmObj scm_add_environment(ScmObj var, ScmObj val, ScmObj env);
 ScmRef scm_lookup_environment(ScmObj var, ScmObj env);
 

Modified: branches/r5rs/sigscheme/syntax.c
===================================================================
--- branches/r5rs/sigscheme/syntax.c	2006-01-06 23:30:22 UTC (rev 2820)
+++ branches/r5rs/sigscheme/syntax.c	2006-01-06 23:42:59 UTC (rev 2821)
@@ -623,14 +623,14 @@
 scm_s_let(ScmObj args, ScmEvalState *eval_state)
 {
     ScmObj env, named_let_sym, proc, bindings, binding, body;
-    ScmObj vars, var, vals, val;
+    ScmObj formals, var, actuals, val;
     ScmQueue varq, valq;
     DECLARE_FUNCTION("let", syntax_variadic_tailrec_0);
 
     env = eval_state->env;
     named_let_sym = SCM_FALSE;
-    vars = SCM_NULL;
-    vals = SCM_NULL;
+    formals = SCM_NULL;
+    actuals = SCM_NULL;
 
     /*========================================================================
       normal let:
@@ -664,8 +664,8 @@
 
     body = args;
 
-    SCM_QUEUE_POINT_TO(varq, vars);
-    SCM_QUEUE_POINT_TO(valq, vals);
+    SCM_QUEUE_POINT_TO(varq, formals);
+    SCM_QUEUE_POINT_TO(valq, actuals);
     for (; CONSP(bindings); bindings = CDR(bindings)) {
         binding = CAR(bindings);
 #if SCM_COMPAT_SIOD_BUGS
@@ -685,12 +685,12 @@
     if (!NULLP(bindings))
         ERR_OBJ("invalid bindings form", bindings);
 
-    env = scm_extend_environment(vars, vals, env);
+    env = scm_extend_environment(formals, actuals, env);
     eval_state->env = env;
 
     /* named let */
     if (SYMBOLP(named_let_sym)) {
-        proc = MAKE_CLOSURE(CONS(vars, body), env);
+        proc = MAKE_CLOSURE(CONS(formals, body), env);
         define_internal(named_let_sym, proc, env);
     }
 
@@ -742,7 +742,7 @@
 ScmObj
 scm_s_letrec(ScmObj bindings, ScmObj body, ScmEvalState *eval_state)
 {
-    ScmObj binding, frame, vars, var, vals, val;
+    ScmObj binding, frame, formals, var, actuals, val;
     DECLARE_FUNCTION("letrec", syntax_variadic_tailrec_1);
 
     /*========================================================================
@@ -759,8 +759,8 @@
     frame = CONS(SCM_NULL, SCM_NULL);
     eval_state->env = CONS(frame, eval_state->env);
 
-    vars = SCM_NULL;
-    vals = SCM_NULL;
+    formals = SCM_NULL;
+    actuals = SCM_NULL;
     for (; CONSP(bindings); bindings = CDR(bindings)) {
         binding = CAR(bindings);
 #if SCM_COMPAT_SIOD_BUGS
@@ -773,18 +773,18 @@
             ERR_OBJ("invalid binding form", binding);
         val = EVAL(CADR(binding), eval_state->env);
 
-        /* construct vars and vals list: any <init> must not refer a
+        /* construct formals and actuals list: any <init> must not refer a
            <variable> at this time */
-        vars = CONS(var, vars);
-        vals = CONS(val, vals);
+        formals = CONS(var, formals);
+        actuals = CONS(val, actuals);
     }
 
     if (!NULLP(bindings))
         ERR_OBJ("invalid bindings form", bindings);
 
     /* fill the placeholder frame */
-    SET_CAR(frame, vars);
-    SET_CDR(frame, vals);
+    SET_CAR(frame, formals);
+    SET_CDR(frame, actuals);
 
     return scm_s_begin(body, eval_state);
 }



More information about the uim-commit mailing list