diff --git a/s/cprep.ss b/s/cprep.ss index 26665ac673..239231cf20 100644 --- a/s/cprep.ss +++ b/s/cprep.ss @@ -212,6 +212,10 @@ (if (eq? (subset-mode) 'system) ($system-environment) (interaction-environment))) + (define (cptypes x) + (if (enable-type-recovery) + ($cptypes x) + x)) (define e/o (lambda (who cte? x env) (define (go x) @@ -222,9 +226,9 @@ (let ([x ((run-cp0) (lambda (x) (set! cpletrec-ran? #t) - ($cpletrec ($cptypes ($cp0 x $compiler-is-loaded?)))) + ($cpletrec (cptypes ($cp0 x $compiler-is-loaded?)))) ($cpvalid x))]) - (if cpletrec-ran? x ($cpletrec x)))))))) + (if cpletrec-ran? x ($cpletrec (cptypes x))))))))) (unless (environment? env) ($oops who "~s is not an environment" env)) ; claim compiling-a-file to get cte as well as run-time code diff --git a/s/interpret.ss b/s/interpret.ss index aa1281f333..7a35b20fe6 100644 --- a/s/interpret.ss +++ b/s/interpret.ss @@ -645,6 +645,11 @@ (c-var-index-set! (car vars) i) (loop (cdr vars) regs (fx+ i 1))]))))) +(define (cptypes x) + (if (enable-type-recovery) + ($cptypes x)) + x) + (define-pass interpret-Lexpand : Lexpand (ir situation for-import? ofn eoo) -> * (val) (definitions (define (ibeval x1) @@ -654,9 +659,9 @@ (let ([x ((run-cp0) (lambda (x) (set! cpletrec-ran? #t) - ($cpletrec ($cptypes ($cp0 x #f)))) + ($cpletrec (cptypes ($cp0 x #f)))) x2)]) - (if cpletrec-ran? x ($cpletrec x))))] + (if cpletrec-ran? x ($cpletrec (cptypes x)))))] [x2b ($cpcheck x2a)] [x2b ($cpcommonize x2b)]) (when eoo (pretty-print ($uncprep x2b) eoo))