jolt build: --opt mode turns on the inference passes (Phase 4 stage 4a)
Wire the optimization gate to build mode. inline-enabled? (which gates the inference + flatten-lets + scalar-replace passes in jolt.passes/run-passes) was hardwired off, so those passes had never run on Chez at all. host-contract now exposes a settable hc-optimize? flag; `jolt build --opt` flips it on during app emission. Kept off for the default release build for now: the passes are sound by design (RFC 0005/0006) but unexercised on Chez, so release stays on the proven var-deref codegen until they're validated against the corpus. --opt is the opt-in fast path. buildsmoke checks both modes produce the same result. This does not yet deliver direct call binding — the backend has no direct-link emission path (every :var call still routes through jolt-invoke/var-deref) and the inline-ir host stash is still a stub. Those are the remaining stage-4 levers.
This commit is contained in:
parent
43778eafd7
commit
f66925d3a8
3 changed files with 26 additions and 5 deletions
|
|
@ -179,10 +179,15 @@
|
|||
(when (null? ordered)
|
||||
(error 'jolt-build (string-append "no source namespace loaded for " entry-ns
|
||||
" — is it on the source roots?")))
|
||||
;; 2. emit each app namespace.
|
||||
;; 2. emit each app namespace. `optimized` turns on the inference + flatten
|
||||
;; + scalar-replace passes (closed world). release/dev stay on proven
|
||||
;; var-deref codegen until those passes are validated on Chez — they were
|
||||
;; dormant before `jolt build` (inline-enabled? was hardwired off).
|
||||
(set-optimize! (string=? mode "optimized"))
|
||||
(let* ((app-strs (apply append
|
||||
(map (lambda (nf) (bld-emit-ns (car nf) (read-file-string (cdr nf))))
|
||||
ordered)))
|
||||
(_ (set-optimize! #f))
|
||||
(builddir (string-append out-path ".build"))
|
||||
(flat-ss (string-append builddir "/flat.ss"))
|
||||
(flat-so (string-append builddir "/flat.so"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue