123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- (define-module (ps-compiler prescheme c-util)
- #:use-module (ps-compiler node node)
- #:use-module (ps-compiler node node-util)
- #:use-module (ps-compiler node variable)
- #:use-module (ps-compiler prescheme spec)
- #:use-module (ps-compiler prescheme type)
- #:use-module (ps-compiler prescheme type-var)
- #:export (*local-vars*
- goto-call?
- final-variable-type))
- (define *local-vars* '())
- (define (goto-call? call)
- (and (calls-this-primop? call 'unknown-tail-call)
- (goto-protocol? (literal-value (call-arg call 2)))))
- (define (reference-type node)
- (finalize-variable-type (reference-variable node)))
- (define (finalize-variable-type var)
- (let* ((type (finalize-type (variable-type var)))
- (type (if (uvar? type)
- type/null
- type)))
- (set-variable-type! var type)
- type))
- (define final-variable-type finalize-variable-type)
|