cs: add PLT_LINKLET_SHOW_CP0

This commit is contained in:
Matthew Flatt 2019-01-11 20:07:53 -07:00
parent bec6b55671
commit 11120977b8
3 changed files with 8 additions and 0 deletions

View File

@ -322,6 +322,9 @@ compiled terms when a linklet is not compliled whole; set
those compiled parts; and/or set `PLT_LINKLET_SHOW_POST_INTERP` to see
the "bytecode" form.
Set `PLT_LINKLET_SHOW_CP0` to see the Schmeified form of a linklet
after expansion and optimization by Chez Scheme's cp0.
Safety and Debugging Mode
-------------------------

View File

@ -34,6 +34,7 @@
(eval '(f (fxvector 0))))))
(check-defined 'vfasl-convert-file)
(check-defined 'compute-size-increments)
(check-defined 'enable-type-recovery)
;; ----------------------------------------

View File

@ -146,6 +146,7 @@
(define post-interp-on? (getenv "PLT_LINKLET_SHOW_POST_INTERP"))
(define jit-demand-on? (getenv "PLT_LINKLET_SHOW_JIT_DEMAND"))
(define known-on? (getenv "PLT_LINKLET_SHOW_KNOWN"))
(define cp0-on? (getenv "PLT_LINKLET_SHOW_CP0"))
(define show-on? (or gensym-on?
pre-jit-on?
pre-lift-on?
@ -153,6 +154,7 @@
post-interp-on?
jit-demand-on?
known-on?
cp0-on?
(getenv "PLT_LINKLET_SHOW")))
(define show
(case-lambda
@ -483,6 +485,8 @@
(correlated->annotation impl-lam))))
(when known-on?
(show "known" (hash-map exports-info (lambda (k v) (list k v)))))
(when cp0-on?
(show "cp0" (#%expand/optimize impl-lam/interpable)))
(performance-region
'compile-linklet
;; Create the linklet: