io: fix handling of sharing in place messages

This commit is contained in:
Matthew Flatt 2019-04-30 16:54:27 -06:00
parent 6771bddb59
commit 436f3d8f64
2 changed files with 12 additions and 7 deletions

View File

@ -52,8 +52,11 @@
;interned into the same table as us and us2
;because the same place sends and receives
(test #t equal? us (car r2))
(test #t equal? us2 (cdr r2))))
(test #t equal? us2 (cdr r2)))
(place-channel-put out (make-prefab-struct 'vec (vector) (vector)))
(test (make-prefab-struct 'vec (vector) (vector)) place-channel-get in))
(let ([p (place/splat (p1 ch)
(printf "Hello form place 2\n")
(exit 99))])

View File

@ -81,11 +81,13 @@
(define graph #f)
(define used #f)
(define (maybe-ph ph v)
(if (and used (hash-ref used ph #f))
(begin
(placeholder-set! ph v)
ph)
v))
(cond
[(and used (hash-ref used ph #f))
(placeholder-set! ph v)
ph]
[else
(hash-set! graph v #f)
v]))
(define new-v
(let loop ([v v])
(cond