mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 13:05:05 +02:00
WIP
This commit is contained in:
parent
7dce420886
commit
3bcf956a29
1 changed files with 6 additions and 3 deletions
|
@ -25,6 +25,7 @@
|
||||||
(scheme cyclone transforms)
|
(scheme cyclone transforms)
|
||||||
(srfi 69))
|
(srfi 69))
|
||||||
(export
|
(export
|
||||||
|
optimize-cps
|
||||||
analyze-cps
|
analyze-cps
|
||||||
opt:contract
|
opt:contract
|
||||||
;adb:init!
|
;adb:init!
|
||||||
|
@ -237,9 +238,11 @@
|
||||||
(ast:%make-lambda
|
(ast:%make-lambda
|
||||||
(ast:lambda-id exp)
|
(ast:lambda-id exp)
|
||||||
(ast:lambda-args exp)
|
(ast:lambda-args exp)
|
||||||
(ast:lambda-body exp)));)
|
(opt:contract (ast:lambda-body exp))));)
|
||||||
((ref? exp) exp)
|
|
||||||
((const? exp) exp)
|
((const? exp) exp)
|
||||||
|
((ref? exp) exp)
|
||||||
|
((prim? exp) exp)
|
||||||
|
((quote? exp) exp)
|
||||||
((define? exp)
|
((define? exp)
|
||||||
`(define ,(opt:contract (define->var exp))
|
`(define ,(opt:contract (define->var exp))
|
||||||
,(opt:contract (define->exp exp))))
|
,(opt:contract (define->exp exp))))
|
||||||
|
@ -261,7 +264,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
(define (optimize-cps ast)
|
(define (optimize-cps ast)
|
||||||
(analyze-cps input-program)
|
(analyze-cps ast)
|
||||||
(trace:info "---------------- cps analysis db:")
|
(trace:info "---------------- cps analysis db:")
|
||||||
(trace:info (adb:get-db))
|
(trace:info (adb:get-db))
|
||||||
(opt:contract ast)
|
(opt:contract ast)
|
||||||
|
|
Loading…
Add table
Reference in a new issue