racket / ChezScheme

Chez Scheme
Apache License 2.0
110 stars 8 forks source link

Alternative version of enable-type-recovery #14

Closed gus-massa closed 4 years ago

gus-massa commented 4 years ago

Don't run cptypes, when cp0 is disabled, for example with

(run-cp0 (lamba (cp0 x) x)

This is easier to understand because run-cp0 is a single point to control for all the cp reductions. The reductions in cptypes can be independently disabled using enable-type-recovery.

Currently, if cp0 is not run, then the compiler calls cptypes once anyway. (Note that the interpreted version didn't have this additional call.)

mflatt commented 4 years ago

LGTM