From eae579bf327db62851e47ab15f802d492a2a1811 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 23 Mar 2015 22:35:47 -0400 Subject: [PATCH] Removed dead code --- cyclone.scm | 2 +- trans.scm | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cyclone.scm b/cyclone.scm index 55dfd91b..5e2a4dfd 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -69,7 +69,7 @@ (set! globals (cons 'call/cc globals)) (set! input-program (cons - ;; Add call/cc here because it is already in CPS form + ;; call/cc must be written in CPS form, so it is added here ;; TODO: prevents this from being optimized-out ;; TODO: will this cause issues if another var is assigned to call/cc? '(define call/cc diff --git a/trans.scm b/trans.scm index 52ef1411..780a0745 100644 --- a/trans.scm +++ b/trans.scm @@ -1462,21 +1462,7 @@ (cps ast (let ((r (gensym 'r))) `(lambda (,r) (%halt ,r))))))) -;; TODO: this is very broken if call/cc is used by a global function!!! -;; TODO: if needed, should call/cc be added as a global? -;; may need a separate scanning phase to detect call/cc and add the def - ;(if (member 'call/cc (free-vars ast)) - ; ; add this definition for call/cc if call/cc is needed - ; (list - ; (list - ; 'lambda - ; (list 'call/cc) - ; ast-cps) - ; '(lambda (k f) - ; (f k (lambda (_ result) (k result))))) - ast-cps;) - )) - + ast-cps)) ;; Closure-conversion. ;;