Gauche
Gauche copied to clipboard
Switch constant folding behavior for precompilation
Precomputed constants must be serializable if the code is precompiled. There's no restriction in the normal mode. The switch needs to be done inside optimizer. The suggested fix:
(define (pass3/precompute-constnat ...)
...
[(r) (and (or (not precompiling?)
(serializable? r))
($const r))]
...