add a compiler-hint:cross-module-inline hint.

Calling this function:

(provide
 (contract-out
  [f (-> integer? integer?)]))
(define (f x) x)

from another module seems to speed up by about 8% with the annotation
in this commit.
This commit is contained in:
Robby Findler 2011-12-01 10:32:25 -06:00
parent 99032a75d0
commit 45c72d0837

View File

@ -75,21 +75,23 @@ v4 todo:
[else #,(call-gen rng-checkers)]))))
(define tail-marks-match?
(case-lambda
[(m) (and m (null? m))]
[(m rng-ctc) (and m
(not (null? m))
(null? (cdr m))
(procedure-closure-contents-eq? (car m) rng-ctc))]
[(m rng-ctc1 rng-ctc2)
(and m
(= (length m) 2)
(procedure-closure-contents-eq? (car m) rng-ctc1)
(procedure-closure-contents-eq? (cadr m) rng-ctc1))]
[(m . rng-ctcs)
(and m
(= (length m) (length rng-ctcs))
(andmap procedure-closure-contents-eq? m rng-ctcs))]))
(begin
'compiler-hint:cross-module-inline
(case-lambda
[(m) (and m (null? m))]
[(m rng-ctc) (and m
(not (null? m))
(null? (cdr m))
(procedure-closure-contents-eq? (car m) rng-ctc))]
[(m rng-ctc1 rng-ctc2)
(and m
(= (length m) 2)
(procedure-closure-contents-eq? (car m) rng-ctc1)
(procedure-closure-contents-eq? (cadr m) rng-ctc1))]
[(m . rng-ctcs)
(and m
(= (length m) (length rng-ctcs))
(andmap procedure-closure-contents-eq? m rng-ctcs))])))
(define-syntax (unconstrained-domain-> stx)
(syntax-case stx ()