Skip to content

Commit 9762553

Browse files
committed
Revert "a little time saving where expr doesn't need to be pushed"
This reverts commit ac7e6d0.
1 parent 3d1a9c2 commit 9762553

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/core/mainloop.rkt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@
236236
(let loop ([altn altn])
237237
(match-define (alt _ event prevs _) altn)
238238
(match event
239-
[(list 'patch _ _) orig]
239+
[(list 'patch _ _)
240+
(match-define (alt expr event prevs preprocessing) orig)
241+
(define expr-idx (mutable-batch-munge! reconstruct-batch-mutable expr))
242+
(alt (batchref reconstruct-batch expr-idx) event prevs preprocessing)]
240243
[_
241244
(define event*
242245
(match event
@@ -259,10 +262,11 @@
259262
(batch-copy-mutable-nodes! reconstruct-batch reconstruct-batch-mutable)
260263

261264
(define (rebuild-alts x)
262-
(match-define (alt expr event prevs preprocessing) x)
263-
(match (batchref? expr)
264-
[#t (alt (batchref->expr expr) event (map rebuild-alts prevs) preprocessing)]
265-
[#f (alt expr event (map rebuild-alts prevs) preprocessing)]))
265+
(match (batchref? (alt-expr x))
266+
[#t
267+
(match-define (alt expr event prevs preprocessing) x)
268+
(alt (batchref->expr expr) event (map rebuild-alts prevs) preprocessing)]
269+
[#f x]))
266270
(set! batchified-out (map rebuild-alts batchified-out))
267271

268272
;; takes a patch and converts it to a full alt

0 commit comments

Comments
 (0)