CPS conversion doesn't automatically produce $values
authorAndy Wingo <wingo@pobox.com>
Tue, 22 Oct 2013 20:30:54 +0000 (22:30 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 22 Oct 2013 20:30:54 +0000 (22:30 +0200)
* module/language/tree-il/compile-cps.scm (convert): Don't convert
  values primcalls to $values, because we don't know that the
  continuation can accept that number of values.

module/language/tree-il/compile-cps.scm

index 707e08b..6202e12 100644 (file)
                      k subst)
             (convert-args args
               (lambda (args)
-                (if (eq? name 'values)
-                    (build-cps-term ($continue k ($values args)))
-                    (build-cps-term ($continue k ($primcall name args))))))))))
+                (build-cps-term ($continue k ($primcall name args)))))))))
 
     ;; Prompts with inline handlers.
     (($ <prompt> src escape-only? tag body