From 377c5b3ad079f60c21c94883e5fd406484c4fb01 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 30 May 2007 17:32:39 +0000 Subject: [PATCH] had to find a new way to defeat the inlining svn: r6413 --- collects/mzlib/private/contract-ds-helpers.ss | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/collects/mzlib/private/contract-ds-helpers.ss b/collects/mzlib/private/contract-ds-helpers.ss index fa8e01bbaa..5d487e75ec 100644 --- a/collects/mzlib/private/contract-ds-helpers.ss +++ b/collects/mzlib/private/contract-ds-helpers.ss @@ -49,13 +49,17 @@ which are then called when the contract's fields are explored clause)]))]))] [all-ac-ids (generate-temporaries field-names)] [defeat-inlining - ;; makes the procedure "big enough" so - ;; that inlining doesn't consider it. + ;; makes the procedure confusing enough so that + ;; inlining doesn't consider it. this makes the + ;; call to procedure-closure-contents-eq? work + ;; properly (λ (e) - (let loop ([i 30]) - (cond - [(zero? i) e] - [else #`(values #,(loop (- i 1)))])))]) + (let loop ([n 20]) + (if (zero? n) + e + #`(if (zero? (random 1)) + #,(loop (- n 1)) + (/ 1 0)))))]) (let loop ([clauses (syntax->list clauses)] [ac-ids all-ac-ids] [prior-ac-ids '()]