mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
Added (adb:clear!)
This commit is contained in:
parent
c52225f9a9
commit
8e732e7a52
1 changed files with 11 additions and 5 deletions
|
@ -28,7 +28,7 @@
|
||||||
optimize-cps
|
optimize-cps
|
||||||
analyze-cps
|
analyze-cps
|
||||||
opt:contract
|
opt:contract
|
||||||
;adb:init!
|
adb:clear!
|
||||||
adb:get
|
adb:get
|
||||||
adb:get/default
|
adb:get/default
|
||||||
adb:set!
|
adb:set!
|
||||||
|
@ -62,10 +62,8 @@
|
||||||
(begin
|
(begin
|
||||||
(define *adb* (make-hash-table))
|
(define *adb* (make-hash-table))
|
||||||
(define (adb:get-db) *adb*)
|
(define (adb:get-db) *adb*)
|
||||||
;(define *adb* #f) ;(make-hash-table))
|
(define (adb:clear!)
|
||||||
;(define (adb:init!)
|
(set! *adb* (make-hash-table)))
|
||||||
; ;(set! *adb* (make-hash-table)))
|
|
||||||
; 'TODO)
|
|
||||||
(define (adb:get key) (hash-table-ref *adb* key))
|
(define (adb:get key) (hash-table-ref *adb* key))
|
||||||
(define (adb:get/default key default) (hash-table-ref/default *adb* key default))
|
(define (adb:get/default key default) (hash-table-ref/default *adb* key default))
|
||||||
(define (adb:set! key val) (hash-table-set! *adb* key val))
|
(define (adb:set! key val) (hash-table-set! *adb* key val))
|
||||||
|
@ -375,7 +373,15 @@
|
||||||
;; TODO: re-run phases again until program is stable (less than n opts made, more than r rounds performed, etc)
|
;; TODO: re-run phases again until program is stable (less than n opts made, more than r rounds performed, etc)
|
||||||
;; END notes
|
;; END notes
|
||||||
|
|
||||||
|
;(define (optimize-cps ast)
|
||||||
|
; (define (loop ast n)
|
||||||
|
; (if (= n 0)
|
||||||
|
; (do-optimize-cps ast)
|
||||||
|
; (loop (do-optimize-cps ast) (- n 1))))
|
||||||
|
; (loop ast 2))
|
||||||
|
|
||||||
(define (optimize-cps ast)
|
(define (optimize-cps ast)
|
||||||
|
(adb:clear!)
|
||||||
(analyze-cps ast)
|
(analyze-cps ast)
|
||||||
(trace:info "---------------- cps analysis db:")
|
(trace:info "---------------- cps analysis db:")
|
||||||
(trace:info (adb:get-db))
|
(trace:info (adb:get-db))
|
||||||
|
|
Loading…
Add table
Reference in a new issue