Add check for CPS prims

This commit is contained in:
Justin Ethier 2018-11-22 23:15:12 -05:00
parent 07683bf273
commit 729c0d4025

View file

@ -107,6 +107,12 @@
(scan (if->else exp) fail?)) (scan (if->else exp) fail?))
((app? exp) ((app? exp)
(cond (cond
;;; TODO: may need to check for prim:cont? and abort accordingly
;; check out code generated for scheme/cyclone/util.sld WRT symbol->string
;; cannot proceed with this since by definition these functions require CPS
((and (prim? (car exp))
(prim:cont? (car exp)))
(return #f))
((and (equal? (car exp) sym) ((and (equal? (car exp) sym)
(not fail?)) (not fail?))
(map (lambda (e) (scan e fail?)) (cdr exp))) ;; Sym is OK, skip (map (lambda (e) (scan e fail?)) (cdr exp))) ;; Sym is OK, skip