Fix reporting of struct constructors in TR.
This commit is contained in:
parent
1ccdc3a60d
commit
5f2dfa5144
|
@ -29,6 +29,8 @@
|
|||
;; Log calls to struct constructors, so that OC can report those used in
|
||||
;; hot loops.
|
||||
(pattern (#%plain-app op:id args:opt-expr ...)
|
||||
#:when (struct-constructor? #'op)
|
||||
#:when (let ([constructor-for (syntax-property #'op 'constructor-for)])
|
||||
(or (and constructor-for (struct-constructor? constructor-for))
|
||||
(struct-constructor? #'op)))
|
||||
#:do [(log-optimization-info "struct constructor" #'op)]
|
||||
#:with opt #'(op args.opt ...)))
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#;#;
|
||||
#<<END
|
||||
TR info: struct-constructor.rkt 15:7 foo -- struct constructor
|
||||
END
|
||||
#<<END
|
||||
END
|
||||
|
||||
|
||||
#lang typed/racket
|
||||
|
||||
(provide (struct-out foo))
|
||||
|
||||
(struct: foo ())
|
||||
|
||||
(void (foo))
|
Loading…
Reference in New Issue
Block a user