TR for clause specialization: Report specialization failures.
This commit is contained in:
parent
456f32b77f
commit
d6372ef2dc
|
@ -91,4 +91,10 @@
|
||||||
0
|
0
|
||||||
(lambda (x) (unsafe-fx< x end))
|
(lambda (x) (unsafe-fx< x end))
|
||||||
(lambda (x) #t)
|
(lambda (x) #t)
|
||||||
(lambda (x y) #t)))))
|
(lambda (x y) #t))))
|
||||||
|
(pattern (#%plain-app op:make-sequence arg:opt-expr s:opt-expr)
|
||||||
|
#:do [(log-missed-optimization
|
||||||
|
"non-specialized for clause"
|
||||||
|
"Typed Racket failed to specialize this `for' clause, which introduces run-time dispatch overhead. You can avoid this by limiting the sequence's type to a single kind of sequence (e.g. lists, vectors, or integers) or specializing the sequence manually (e.g. by wrapping it in an `in-list', `in-vector' or `in-range')."
|
||||||
|
#'s)]
|
||||||
|
#:with opt #'(op arg.opt s.opt)))
|
||||||
|
|
|
@ -1,24 +1,28 @@
|
||||||
#;#;
|
#;#;
|
||||||
#<<END
|
#<<END
|
||||||
TR info: marketplace-struct.rkt 113:39 process -- struct constructor
|
TR info: marketplace-struct.rkt 117:39 process -- struct constructor
|
||||||
TR info: marketplace-struct.rkt 120:3 vm -- struct constructor
|
TR info: marketplace-struct.rkt 124:3 vm -- struct constructor
|
||||||
TR info: marketplace-struct.rkt 62:9 vm -- struct constructor
|
TR info: marketplace-struct.rkt 66:9 vm -- struct constructor
|
||||||
TR info: marketplace-struct.rkt 62:9 vm -- struct constructor
|
TR info: marketplace-struct.rkt 66:9 vm -- struct constructor
|
||||||
TR opt: marketplace-struct.rkt 127:2 (struct-copy vm state (processes (hash-set (vm-processes state) (Process-pid wp) wp))) -- dead else branch
|
TR missed opt: marketplace-struct.rkt 146:34 (in-hash-keys (vm-processes state)) -- non-specialized for clause
|
||||||
TR opt: marketplace-struct.rkt 127:2 (struct-copy vm state (processes (hash-set (vm-processes state) (Process-pid wp) wp))) -- struct ref
|
TR missed opt: marketplace-struct.rkt 155:32 (in-hash-keys (vm-processes state)) -- non-specialized for clause
|
||||||
TR opt: marketplace-struct.rkt 127:45 (vm-processes state) -- struct ref
|
TR missed opt: marketplace-struct.rkt 160:46 (in-hash-keys (process-endpoints p)) -- non-specialized for clause
|
||||||
TR opt: marketplace-struct.rkt 134:23 (vm-processes state) -- struct ref
|
TR missed opt: marketplace-struct.rkt 160:46 (in-hash-keys (process-endpoints p)) -- non-specialized for clause
|
||||||
TR opt: marketplace-struct.rkt 135:10 (if wp (struct-copy vm state (processes (hash-remove (vm-processes state) pid))) state) -- dead else branch
|
TR opt: marketplace-struct.rkt 131:2 (struct-copy vm state (processes (hash-set (vm-processes state) (Process-pid wp) wp))) -- dead else branch
|
||||||
TR opt: marketplace-struct.rkt 135:10 (if wp (struct-copy vm state (processes (hash-remove (vm-processes state) pid))) state) -- struct ref
|
TR opt: marketplace-struct.rkt 131:2 (struct-copy vm state (processes (hash-set (vm-processes state) (Process-pid wp) wp))) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 136:60 (vm-processes state) -- struct ref
|
TR opt: marketplace-struct.rkt 131:45 (vm-processes state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 142:48 (vm-processes state) -- struct ref
|
TR opt: marketplace-struct.rkt 138:23 (vm-processes state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 151:46 (vm-processes state) -- struct ref
|
TR opt: marketplace-struct.rkt 139:10 (if wp (struct-copy vm state (processes (hash-remove (vm-processes state) pid))) state) -- dead else branch
|
||||||
TR opt: marketplace-struct.rkt 156:60 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 139:10 (if wp (struct-copy vm state (processes (hash-remove (vm-processes state) pid))) state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 156:60 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 140:60 (vm-processes state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 157:35 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 146:48 (vm-processes state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 157:35 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 155:46 (vm-processes state) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 157:35 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 160:60 (process-endpoints p) -- struct ref
|
||||||
TR opt: marketplace-struct.rkt 157:35 (process-endpoints p) -- struct ref
|
TR opt: marketplace-struct.rkt 160:60 (process-endpoints p) -- struct ref
|
||||||
|
TR opt: marketplace-struct.rkt 161:35 (process-endpoints p) -- struct ref
|
||||||
|
TR opt: marketplace-struct.rkt 161:35 (process-endpoints p) -- struct ref
|
||||||
|
TR opt: marketplace-struct.rkt 161:35 (process-endpoints p) -- struct ref
|
||||||
|
TR opt: marketplace-struct.rkt 161:35 (process-endpoints p) -- struct ref
|
||||||
END
|
END
|
||||||
""
|
""
|
||||||
#lang typed/racket/base
|
#lang typed/racket/base
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#;#;
|
||||||
|
#<<END
|
||||||
|
TR missed opt: sequence.rkt 10:22 s -- non-specialized for clause
|
||||||
|
END
|
||||||
|
""
|
||||||
|
#lang typed/racket/base
|
||||||
|
|
||||||
|
(: seq-generic : (Sequenceof Integer) -> Void)
|
||||||
|
(define (seq-generic s)
|
||||||
|
(for: ([x : Integer s])
|
||||||
|
(void)))
|
Loading…
Reference in New Issue
Block a user