mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Reverting constant folding for now
This commit is contained in:
parent
179e223dfa
commit
0e5257eb91
1 changed files with 8 additions and 7 deletions
|
@ -62,7 +62,7 @@
|
|||
adbf:side-effects adbf:set-side-effects!
|
||||
)
|
||||
(begin
|
||||
(define
|
||||
#;(define
|
||||
*contract-env*
|
||||
(let ((env (create-environment '() '())))
|
||||
(eval '(define Cyc-fast-plus +) env)
|
||||
|
@ -719,12 +719,13 @@
|
|||
fnc
|
||||
(map (lambda (e) (opt:contract e)) (cdr exp)))))
|
||||
;; Perform constant folding if possible
|
||||
(if (and (prim-call? exp)
|
||||
(precompute-prim-app? result))
|
||||
(with-handler ;; Safety check, keep going if eval fails
|
||||
(lambda (err) result)
|
||||
(eval result *contract-env*))
|
||||
result))
|
||||
;;(if (and (prim-call? exp)
|
||||
;; (precompute-prim-app? result))
|
||||
;; (with-handler ;; Safety check, keep going if eval fails
|
||||
;; (lambda (err) result)
|
||||
;; (eval result *contract-env*))
|
||||
;; result))
|
||||
result)
|
||||
))))
|
||||
(else
|
||||
(error "CPS optimize [1] - Unknown expression" exp))))
|
||||
|
|
Loading…
Add table
Reference in a new issue