Changeset 11690 in project
 Timestamp:
 08/21/08 03:09:39 (13 years ago)
 File:

 1 moved
Legend:
 Unmodified
 Added
 Removed

release/3/oru/oru.scm
r11678 r11690 174 174 175 175 176 (define (enumdeps expr ax) 177 (match expr 178 ((s . es) (if (symbol? s) (fold enumdeps ax es) (fold enumdeps ax (cons s es)))) 179 (id (if (symbol? id) (cons id ax) ax)))) 176 (define (enumdeps expr) 177 (let loop ((expr expr) (ax (list)) (lbs (list))) 178 (match expr 179 (('let bs e) (let letloop ((bs bs) (ax ax) (lbs lbs)) 180 (if (null? bs) (loop e ax lbs) 181 (let ((x (first (car bs))) 182 (ex (second (car bs)))) 183 (let* ((lbs1 (cons x lbs)) 184 (ax1 (loop ex ax lbs))) 185 (letloop (cdr bs) ax1 lbs1)))))) 186 187 ((s . es) (if (symbol? s) (fold (lambda (e ax) (loop e ax lbs)) ax es) 188 (fold (lambda (e ax) (loop e ax lbs)) ax (cons s es)))) 189 (id (if (and (symbol? id) (not (member id lbs))) (cons id ax) ax))))) 180 190 181 191 … … 567 577 568 578 (define (evalconst oruenv expr) 569 (exact>inexact (eval (normalizeexpr expr) (makeconstenv oruenv)))) 579 (let ((expr1 (normalizeexpr expr))) 580 (exact>inexact (eval expr1 (makeconstenv oruenv))))) 570 581 571 582 … … 644 655 (and (let ((x (environmentref oruenv sym))) 645 656 (isdep? x))))) 646 (enumdeps rhs (list))))657 (enumdeps rhs))) 647 658 (edges (map (lambda (d) (cons d qsym)) deps))) 648 659 (if edges (append edges ax) ax))
Note: See TracChangeset
for help on using the changeset viewer.