diff --git a/collects/typed-racket/optimizer/tool/inlining.rkt b/collects/typed-racket/optimizer/tool/inlining.rkt index e643bfe638..e7e0cef1bf 100644 --- a/collects/typed-racket/optimizer/tool/inlining.rkt +++ b/collects/typed-racket/optimizer/tool/inlining.rkt @@ -180,23 +180,30 @@ ;; Produce as many log entries as necessary. (define (emit e) (set! produced-entries (cons e produced-entries))) + (define start (sub1 pos)) + (define end (+ start (syntax-span stx))) (define (emit-near-miss msg badness) - (emit (missed-opt-log-entry - kind - (format "Missed Inlining ~a\n~a~a" - (format-aggregation-string pruned-log) - (if msg (format "~a\n" msg) "") - recommendation) - stx located-stx pos provenance - '() '() - ;; uses ceiling to never go down to 0 - ;; both badness and badness-multiplier are non-0 - (ceiling (* badness badness-multiplier))))) + (emit (report-entry + (list (missed-opt-report-entry + located-stx + (format "Missed Inlining ~a\n~a~a" + (format-aggregation-string pruned-log) + (if msg (format "~a\n" msg) "") + recommendation) + provenance + badness + '())) ; no irritants to highlight + start end + badness))) (define (emit-success) - (emit (opt-log-entry - kind - (format "Inlining ~a" (format-aggregation-string pruned-log)) - stx located-stx pos provenance))) + (emit (report-entry + (list (opt-report-entry + located-stx + (format "Inlining ~a" + (format-aggregation-string pruned-log)) + provenance)) + start end + 0))) (define inside-hot-function? (and profile (memq profile-entry hot-functions))) diff --git a/collects/typed-racket/optimizer/tool/report.rkt b/collects/typed-racket/optimizer/tool/report.rkt index b4037be30d..501f3c4ce7 100644 --- a/collects/typed-racket/optimizer/tool/report.rkt +++ b/collects/typed-racket/optimizer/tool/report.rkt @@ -10,13 +10,14 @@ (define (generate-report this profile) (define-values (TR-log mzc-log info-log) (generate-logs this)) (define hot-functions (and profile (prune-profile profile))) - (log->report - (append (causality-merging - (prune-cold-TR-failures TR-log profile hot-functions)) - (report-inlining mzc-log profile hot-functions) - (if profile - (report-hidden-costs info-log profile hot-functions) - '())))) + (append + (log->report + (append (causality-merging + (prune-cold-TR-failures TR-log profile hot-functions)) + (if profile + (report-hidden-costs info-log profile hot-functions) + '()))) + (report-inlining mzc-log profile hot-functions))) ;; Returns a report-entry or #f, which means prune.