Removed debug code

This commit is contained in:
Justin Ethier 2015-08-06 21:44:08 -04:00
parent 9443f92fe2
commit 327941b980
3 changed files with 17 additions and 5 deletions

View file

@ -1873,8 +1873,8 @@ object apply(object cont, object func, object args){
Cyc_rt_raise2("Call of non-procedure: ", func); Cyc_rt_raise2("Call of non-procedure: ", func);
} else if (strncmp(((symbol)fobj)->pname, "lambda", 7) == 0) { } else if (strncmp(((symbol)fobj)->pname, "lambda", 7) == 0) {
make_cons(c, func, args); make_cons(c, func, args);
printf("JAE DEBUG, sending to eval: "); //printf("JAE DEBUG, sending to eval: ");
Cyc_display(&c, stderr); //Cyc_display(&c, stderr);
((closure)__glo_eval)->fn(2, __glo_eval, cont, &c, nil); ((closure)__glo_eval)->fn(2, __glo_eval, cont, &c, nil);
// TODO: would be better to compare directly against symbols here, // TODO: would be better to compare directly against symbols here,

View file

@ -21,7 +21,7 @@
(list (list
(cons 'and (cons 'and
(lambda (expr rename compare) (lambda (expr rename compare)
(cond ((null? (cdr expr))) (cond ((null? (cdr expr))) ;; TODO (?): #t)
((null? (cddr expr)) (cadr expr)) ((null? (cddr expr)) (cadr expr))
(else (list (rename 'if) (cadr expr) (else (list (rename 'if) (cadr expr)
(cons (rename 'and) (cddr expr)) (cons (rename 'and) (cddr expr))

View file

@ -26,7 +26,19 @@
(cons (rename 'and) (cddr expr)) (cons (rename 'and) (cddr expr))
#f)))))) #f))))))
(write (define-syntax or
(test 1 2 3)) (er-macro-transformer
(lambda (expr rename compare)
(cond ((null? (cdr expr)) #f)
((null? (cddr expr)) (cadr expr))
(else
(list (rename 'let) (list (list (rename 'tmp) (cadr expr)))
(list (rename 'if) (rename 'tmp)
(rename 'tmp)
(cons (rename 'or) (cddr expr)))))))))
(write (test 1 2 3))
(write (or 1 2 3 'or))
(write (or #f 2 3 'or))
;(test 'done) ;(test 'done)
'done 'done