Skip to content

Commit

Permalink
uncopy some code
Browse files Browse the repository at this point in the history
  • Loading branch information
rfindler committed Dec 30, 2015
1 parent 46ace31 commit a5b3d6b
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions racket/collects/racket/contract/private/arr-i.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ evaluted left-to-right.)
#`(f #,@argument-list)))

(begin-encourage-inline
(define (un-dep/chaperone orig-ctc obj blame neg-party)
(define (un-dep/maybe-chaperone orig-ctc obj blame neg-party chaperone?)
(cond
[(and (procedure? orig-ctc)
(procedure-arity-includes? orig-ctc 1))
Expand All @@ -1097,21 +1097,15 @@ evaluted left-to-right.)
(raise-predicate-blame-error-failure blame obj neg-party
(object-name orig-ctc)))]
[else
(define ctc (coerce-chaperone-contract '->i orig-ctc))
(((get/build-late-neg-projection ctc) blame) obj neg-party)])))

(begin-encourage-inline
(define ctc (if chaperone?
(coerce-chaperone-contract '->i orig-ctc)
(coerce-contract '->i orig-ctc)))
(((get/build-late-neg-projection ctc) blame) obj neg-party)]))
(define (un-dep/chaperone orig-ctc obj blame neg-party)
(un-dep/maybe-chaperone orig-ctc obj blame neg-party #t))

(define (un-dep orig-ctc obj blame neg-party)
(cond
[(and (procedure? orig-ctc)
(procedure-arity-includes? orig-ctc 1))
(if (orig-ctc obj)
obj
(raise-predicate-blame-error-failure blame obj neg-party
(object-name orig-ctc)))]
[else
(define ctc (coerce-contract '->i orig-ctc))
(((get/build-late-neg-projection ctc) blame) obj neg-party)])))
(un-dep/maybe-chaperone orig-ctc obj blame neg-party #f)))

(define-for-syntax (mk-used-indy-vars an-istx)
(let ([vars (make-free-identifier-mapping)])
Expand Down

0 comments on commit a5b3d6b

Please sign in to comment.