Skip to content

Commit b7e5341

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

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/core/mainloop.rkt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,7 @@
236236
(let loop ([altn altn])
237237
(match-define (alt _ event prevs _) altn)
238238
(match event
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)]
239+
[(list 'patch _ _) orig]
243240
[_
244241
(define event*
245242
(match event
@@ -262,11 +259,10 @@
262259
(batch-copy-mutable-nodes! reconstruct-batch reconstruct-batch-mutable)
263260

264261
(define (rebuild-alts x)
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]))
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)]))
270266
(set! batchified-out (map rebuild-alts batchified-out))
271267

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

0 commit comments

Comments
 (0)