Gauche icon indicating copy to clipboard operation
Gauche copied to clipboard

Switch constant folding behavior for precompilation

Open shirok opened this issue 4 years ago • 0 comments

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))]
  ...

shirok avatar Jan 01 '20 04:01 shirok