From 8655a6856ea55577bb073a67ccaaf6cedd6c2f38 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 27 Jun 2012 06:08:53 -0600 Subject: [PATCH] errortrace: hack to recover `with-continuation-mark' optimization --- collects/errortrace/errortrace-key.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/errortrace/errortrace-key.rkt b/collects/errortrace/errortrace-key.rkt index de2d5a5611..391d5bda17 100644 --- a/collects/errortrace/errortrace-key.rkt +++ b/collects/errortrace/errortrace-key.rkt @@ -5,7 +5,12 @@ ;; various annotations inserted by this ;; library. - (define-values (errortrace-key) (gensym 'key)) + ;; Defining `errortrace-key' as a funciton is a performance hack: + ;; the compiler can track function constants, and in particular the + ;; fact that it's not an impersonated/chaperoned mark key, so that a + ;; `with-continuation-mark' using this key can be dropped if the + ;; body expression is simple. + (define-values (errortrace-key) (lambda () 'anything)) (define-values (test-coverage-info) (make-parameter