Commits

Anonymous committed 05a51c6

Woo-hoo! mignon supports a tower of Pixley interpreters!

Comments (0)

Files changed (2)

impl/mignon/eval.c

                     debug("*(lambda)");
                     struct lambda *l = (struct lambda *)h;
                     struct value *formals = l->formals;
-                    env = l->env; /* WHAAA? */
+                    struct env *l_env = l->env;
                     while (t->type == V_CONS) {
                         struct value *formal = head(formals);
                         struct value *value = eval(head(t), env);
-                        env = bind(env, (struct atom *)formal, value);
+                        l_env = bind(l_env, (struct atom *)formal, value);
                         formals = tail(formals);
                         t = tail(t);
                     }
                     /* XXX do we have to save env?? */
-                    /* return eval(l->body, env); */
+                    /* return eval(l->body, l_env); */
+                    env = l_env;
                     sexp = l->body;
                     done = 0; /* "tail call" */       
                 } else {
 falderal test config.markdown src/tests.markdown
 
 
-#echo "Testing Pixley programs on Pixley interpreter on [mignon]..."
-#cat >config.markdown <<EOF
-#    -> Functionality "Interpret Pixley Program" is implemented by shell command
-#    -> "SCHEME_IMPL=${SCHEME_IMPL} FINAL_SCHEME_IMPL=mignon script/tower.sh src/pixley.pix %(test-file)"
-#EOF
-#falderal test config.markdown src/tests.markdown
+echo "Testing Pixley programs on Pixley interpreter on [mignon]..."
+cat >config.markdown <<EOF
+    -> Functionality "Interpret Pixley Program" is implemented by shell command
+    -> "SCHEME_IMPL=${SCHEME_IMPL} FINAL_SCHEME_IMPL=mignon script/tower.sh src/pixley.pix %(test-file)"
+EOF
+falderal test config.markdown src/tests.markdown
 
 
 echo "Testing Pixley programs on Pixley interpreter on Pixley interpreter on [${SCHEME_IMPL}]..."
 falderal test config.markdown src/tests.markdown
 
 
+echo "Testing Pixley programs on Pixley interpreter on Pixley interpreter on [mignon]..."
+cat >config.markdown <<EOF
+    -> Functionality "Interpret Pixley Program" is implemented by shell command
+    -> "SCHEME_IMPL=${SCHEME_IMPL} FINAL_SCHEME_IMPL=mignon script/tower.sh src/pixley.pix src/pixley.pix %(test-file)"
+EOF
+falderal test config.markdown src/tests.markdown
+
+
 # On my computer, the following test takes about 19 seconds on plt-r5rs, but
 # about 32 minutes with tinyscheme -- possibly because of frequent GC?
 # Meanwhile, it breaks miniscm completely.