File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 301301 [(list op args ... )
302302 ;; Unfortunately the type parameter doesn't tell us much because mixed exprs exist
303303 ;; so if we see something like (and a b) we literally don't know which "and" it is
304- (cons op (map loop args (cond
305- [(and (operator-exists? op) (impl-exists? op))
306- (if (representation? type)
307- (impl-info op 'itype )
308- (operator-info op 'itype ))]
309- [(impl-exists? op)
310- (impl-info op 'itype )]
311- [(operator-exists? op)
312- (operator-info op 'itype )])))])))
304+ (cons op
305+ (map loop
306+ args
307+ (cond
308+ [(and (operator-exists? op) (impl-exists? op))
309+ (if (representation? type)
310+ (impl-info op 'itype )
311+ (operator-info op 'itype ))]
312+ [(impl-exists? op) (impl-info op 'itype )]
313+ [(operator-exists? op) (operator-info op 'itype )])))])))
313314
314315;; Parses a string from egg into a single S-expr.
315316(define (egg-expr->expr egg-expr ctx)
10271028 type))
10281029 (approx (loop spec spec-type) (loop impl type))]
10291030 [(list op args ... )
1030- (cons op (map loop args (if (representation? type)
1031- (impl-info op 'itype )
1032- (operator-info op 'itype ))))])))
1031+ (cons op
1032+ (map loop
1033+ args
1034+ (if (representation? type)
1035+ (impl-info op 'itype )
1036+ (operator-info op 'itype ))))])))
10331037
10341038 (define (eggref id)
10351039 (cdr (vector-ref egg-nodes id)))
Original file line number Diff line number Diff line change 9393 [n 0 ])
9494 (match-define (search-space true false other true-hints other-hints) space)
9595 (timeline-push! 'sampling n (make-sampling-table var-reprs true false other))
96-
96+
9797 (define n* (remainder n (vector-length var-reprs)))
9898 (if (or (>= n depth) (empty? (search-space-other space)) (>= (length other) (expt 2 depth)))
9999 (list (append (search-space-true space) (search-space-other space))
You can’t perform that action at this time.
0 commit comments