From 57c997042e1df69d827296514c0e896af8451e05 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 26 Jun 2019 12:01:31 -0600 Subject: [PATCH] repair for `make-object-finder` with threads The `(cdr tc-ptr-offsets)` in the recrusrion was wrong, but use `thread->objects` and `thread->stack-objects` to work more generally. original commit: fd620699dc620d3d1a522800a7dfaff6cc0393bb --- s/inspect.ss | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/s/inspect.ss b/s/inspect.ss index 1b7ea6658d..0e0eb267bd 100644 --- a/s/inspect.ss +++ b/s/inspect.ss @@ -2983,13 +2983,7 @@ (let ([th (lambda () (if (output-port? x) (construct-proc (port-output-buffer x) next-proc) next-proc))]) (if (input-port? x) (construct-proc (port-input-buffer x) (th)) (th))))] [(thread? x) - (let ([tc ($object-ref 'scheme-object x (constant thread-tc-disp))]) - (if (eqv? tc 0) - next-proc - (let f ([disp-list tc-ptr-offsets]) - (if (null? disp-list) - next-proc - (construct-proc ($object-ref 'scheme-object tc (car disp-list)) (f (cdr tc-ptr-offsets)))))))] + (construct-proc (thread->objects x) (thread->stack-objects x) next-proc)] [($tlc? x) (construct-proc ($tlc-ht x) ($tlc-keyval x) ($tlc-next x) next-proc)] [else ($oops who "missing case for ~s" x)])]) ; check if this node is what we're looking for