Summary
Should -analyze-only imply -specialize?
Metadata
- Id: f991793f260b5f8006600c05e8e3fb009812354e
- Trac id: 1470
- Type: task
- Reporter: megane
- Owner:
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty: trivial
- Resolution: fixed
- Priority: minor
- Milestone: 5.2
- Version: 4.13.0
- Changetime: 2019-11-07 18:16:39 UTC
- Created: 2018-05-31 09:03:20 UTC
- Keywords:
Description
This is snippet is lifted from scrutiny-test.scm, which is checked with `-analyze-only`. `-analyze-only` without `-specialize` gives wrong type for the list.
Either `-A` should include `-specialize`, or scrutiny-test.scm should be checked with `-specialize`.
(let ((l1 (list 'a 'b 'c))) (define (list-ref-nowarn1) (list-ref l1 0)) (compiler-typecase l1 ((not *) 1))) ;; $ csc -analyze-only t.scm ;; ;; Error: at toplevel: ;; (t.scm:4) no clause applies in `compiler-typecase' for expression of type `(or pair null)': ;; (not *) ;; $ csc -analyze-only -specialize t.scm ;; ;; Error: at toplevel: ;; (t.scm:4) no clause applies in `compiler-typecase' for expression of type `(list symbol symbol symbol)': ;; (not *)
Changes and comments
[2019-04-07 12:23:24 UTC] sjamaan changed milestone from 5.1 to 5.2
[2019-04-07 12:23:24 UTC] sjamaan wrote:
Getting ready for 5.1, moving tickets which won't make it in to 5.2.
[2019-11-07 18:16:39 UTC] megane changed status from new to closed
[2019-11-07 18:16:39 UTC] megane set resolution to fixed
[2019-11-07 18:16:39 UTC] megane wrote:
The test was fixed by 36eeb40db8c4b86b557bd28c8c6849f428ddd189.
Adding `-specialize` to `-analyze-only` would make it impossible to get analyzation without specializations, because we don't have `-no-specialize`. So let's forget this for now.