diff --git a/module/language/cps.scm b/module/language/cps.scm index 57d95d410..8aac42b4a 100644 --- a/module/language/cps.scm +++ b/module/language/cps.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -85,8 +85,7 @@ ;;; - $prompt continues to the body of the prompt, having pushed on a ;;; prompt whose handler will continue at its "handler" ;;; continuation. The continuation of the prompt is responsible for -;;; popping the prompt. A $prompt also records the continuation -;;; that pops the prompt, to make various static analyses easier. +;;; popping the prompt. ;;; ;;; In summary: ;;; @@ -185,7 +184,7 @@ (define-cps-type $call proc args) (define-cps-type $primcall name args) (define-cps-type $values args) -(define-cps-type $prompt escape? tag handler pop) +(define-cps-type $prompt escape? tag handler) (define-syntax let-gensyms (syntax-rules () @@ -240,8 +239,8 @@ ((_ ($primcall name args)) (make-$primcall name args)) ((_ ($values (arg ...))) (make-$values (list arg ...))) ((_ ($values args)) (make-$values args)) - ((_ ($prompt escape? tag handler pop)) - (make-$prompt escape? tag handler pop)))) + ((_ ($prompt escape? tag handler)) + (make-$prompt escape? tag handler)))) (define-syntax build-cps-term (syntax-rules (unquote $letk $letk* $letconst $letrec $continue) @@ -341,8 +340,8 @@ (build-cps-exp ($primcall name arg))) (('values arg ...) (build-cps-exp ($values arg))) - (('prompt escape? tag handler pop) - (build-cps-exp ($prompt escape? tag handler pop))) + (('prompt escape? tag handler) + (build-cps-exp ($prompt escape? tag handler))) (_ (error "unexpected cps" exp)))) @@ -397,8 +396,8 @@ `(primcall ,name ,@args)) (($ $values args) `(values ,@args)) - (($ $prompt escape? tag handler pop) - `(prompt ,escape? ,tag ,handler ,pop)) + (($ $prompt escape? tag handler) + `(prompt ,escape? ,tag ,handler)) (_ (error "unexpected cps" exp)))) diff --git a/module/language/cps/closure-conversion.scm b/module/language/cps/closure-conversion.scm index 11d388b4e..4221cb8f7 100644 --- a/module/language/cps/closure-conversion.scm +++ b/module/language/cps/closure-conversion.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -212,12 +212,12 @@ convert functions to flat closures." ($continue k src ($values args))) '())))) - (($ $continue k src ($ $prompt escape? tag handler pop)) + (($ $continue k src ($ $prompt escape? tag handler)) (convert-free-var tag self bound (lambda (tag) (values (build-cps-term - ($continue k src ($prompt escape? tag handler pop))) + ($continue k src ($prompt escape? tag handler))) '())))) (_ (error "what" exp)))) diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index 19e464e46..84941894f 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -325,7 +325,7 @@ (define (compile-effect label exp k nlocals) (match exp (($ $values ()) #f) - (($ $prompt escape? tag handler pop) + (($ $prompt escape? tag handler) (match (lookup-cont handler) (($ $ktrunc ($ $arity req () rest () #f) khandler-body) (let ((receive-args (gensym "handler")) diff --git a/module/language/cps/dfg.scm b/module/language/cps/dfg.scm index 661bbfebd..59e61e5d7 100644 --- a/module/language/cps/dfg.scm +++ b/module/language/cps/dfg.scm @@ -845,7 +845,7 @@ BODY for each body continuation in the prompt." (($ $values args) (for-each use! args)) - (($ $prompt escape? tag handler pop) + (($ $prompt escape? tag handler) (use! tag) (use-k! handler)) diff --git a/module/language/cps/slot-allocation.scm b/module/language/cps/slot-allocation.scm index d1d02ddb1..59a944c83 100644 --- a/module/language/cps/slot-allocation.scm +++ b/module/language/cps/slot-allocation.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -348,7 +348,7 @@ are comparable with eqv?. A tmp slot may be used." args) (($ $values args) args) - (($ $prompt escape? tag handler pop) + (($ $prompt escape? tag handler) (list tag)) (_ '()))))) (_ #f)) @@ -607,7 +607,7 @@ are comparable with eqv?. A tmp slot may be used." (($ $continue k src ($ $values (_ _ . _))) (allocate-values label k uses live post-live)) (($ $continue k src ($ $values)) #t) - (($ $continue k src ($ $prompt escape? tag handler pop)) + (($ $continue k src ($ $prompt escape? tag handler)) (allocate-prompt label k handler nargs)) (_ #f))) (lp (1+ n) post-live)) diff --git a/module/language/cps/verify.scm b/module/language/cps/verify.scm index ff23aa317..94c111e36 100644 --- a/module/language/cps/verify.scm +++ b/module/language/cps/verify.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -128,11 +128,10 @@ (for-each (cut check-var <> v-env) arg)) (($ $values ((? symbol? arg) ...)) (for-each (cut check-var <> v-env) arg)) - (($ $prompt escape? tag handler pop) + (($ $prompt escape? tag handler) (unless (boolean? escape?) (error "escape? should be boolean" escape?)) (check-var tag v-env) - (check-var handler k-env) - (check-var pop k-env)) + (check-var handler k-env)) (_ (error "unexpected expression" exp)))) diff --git a/module/language/tree-il/compile-cps.scm b/module/language/tree-il/compile-cps.scm index 637511817..8929c08c3 100644 --- a/module/language/tree-il/compile-cps.scm +++ b/module/language/tree-il/compile-cps.scm @@ -1,6 +1,6 @@ ;;; Continuation-passing style (CPS) intermediate language (IL) -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -447,7 +447,7 @@ (build-cps-term ($letk ((kbody ($kargs () () ,(convert body krest subst)))) - ($continue kbody src ($prompt #t tag khargs kpop)))) + ($continue kbody src ($prompt #t tag khargs)))) (convert-arg body (lambda (thunk) (build-cps-term @@ -456,7 +456,7 @@ ($primcall 'call-thunk/no-inline (thunk)))))) ($continue kbody (tree-il-src body) - ($prompt #f tag khargs kpop)))))))))))))) + ($prompt #f tag khargs)))))))))))))) ;; Eta-convert prompts without inline handlers. (($ src escape-only? tag body handler)