diff --git a/racket/src/cs/rumble/control.ss b/racket/src/cs/rumble/control.ss index 07747d5e91..32bb23c865 100644 --- a/racket/src/cs/rumble/control.ss +++ b/racket/src/cs/rumble/control.ss @@ -1613,7 +1613,9 @@ (call-winder-thunk 'dw-pre pre) (current-winders (cons winder winders)) (end-uninterrupted/call-hook 'dw-body) - (call-with-values thunk + (call-with-values (if (#%procedure? thunk) + thunk + (lambda () (|#%app| thunk))) (lambda args (start-uninterrupted 'dw-body) (current-winders winders) @@ -1626,7 +1628,7 @@ break-enabled-key (make-thread-cell #f #t) (begin (end-uninterrupted who) - (thunk) + (|#%app| thunk) (start-uninterrupted who)))) (define (wind-in winders k) diff --git a/racket/src/cs/rumble/error.ss b/racket/src/cs/rumble/error.ss index 8986626e19..501380ac8d 100644 --- a/racket/src/cs/rumble/error.ss +++ b/racket/src/cs/rumble/error.ss @@ -480,7 +480,7 @@ (code-info? ci) (or ;; when per-expression inspector info is available: - (find-rpi (#%$continuation-return-offset k) (code-info-rpis ci)) + (find-rpi (#%$continuation-return-offset k) ci) ;; when only per-function source location is available: (code-info-src ci)))]) (and (or name src) @@ -519,7 +519,7 @@ (code-info? ci) (or ;; when per-expression inspector info is available: - (find-rpi (#%$continuation-return-offset k) (code-info-rpis ci)) + (find-rpi (#%$continuation-return-offset k) ci) ;; when only per-function source location is available: (code-info-src ci)))]) (and (or name src) diff --git a/racket/src/cs/rumble/source.ss b/racket/src/cs/rumble/source.ss index d96f291b4b..acd1db673c 100644 --- a/racket/src/cs/rumble/source.ss +++ b/racket/src/cs/rumble/source.ss @@ -13,18 +13,19 @@ (nongenerative #{rp-info gr886ae7iuw4wt9ft4vxym-1}) (sealed #t)) -(define (find-rpi offset rpis) - (and - rpis - (let loop ([start 0] [end (fx1- (vector-length rpis))]) - (cond - [(fx< end start) - #f] - [else - (let* ([curr (fx+ (fx/ (fx- end start) 2) start)] - [rpi (vector-ref rpis curr)] - [rpi-offset (rp-info-offset rpi)]) - (cond - [(fx= offset rpi-offset) rpi] +(define (find-rpi offset ci) + (let ([rpis (code-info-rpis ci)]) + (and + rpis + (let loop ([start 0] [end (fx1- (vector-length rpis))]) + (cond + [(fx< end start) + #f] + [else + (let* ([curr (fx+ (fx/ (fx- end start) 2) start)] + [rpi (vector-ref rpis curr)] + [rpi-offset (rp-info-offset rpi)]) + (cond + [(fx= offset rpi-offset) (rp-info-src rpi)] [(fx< offset rpi-offset) (loop start (fx1- curr))] - [else (loop (fx1+ curr) end)]))])))) + [else (loop (fx1+ curr) end)]))])))))