~ chicken-core (chicken-5) 3211538733f36449573e967de6fe970a67a23b58
commit 3211538733f36449573e967de6fe970a67a23b58 Author: Peter Bex <peter@more-magic.net> AuthorDate: Sun Aug 25 12:06:05 2019 +0200 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Mon Aug 26 19:17:56 2019 +1200 Also load "clean" and "pure" annotations from types.db when not specializing There seems to be no good reason for skipping just these two when loading types databases. All the other places that mark things as pure or clean do it unconditionally, too. Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/scrutinizer.scm b/scrutinizer.scm index 8f5923d5..47b7c0d3 100644 --- a/scrutinizer.scm +++ b/scrutinizer.scm @@ -1587,10 +1587,6 @@ (define (load-type-database name specialize #!optional (path (repository-path))) - (define (clean! name) - (when specialize (mark-variable name '##compiler#clean #t))) - (define (pure! name) - (when specialize (mark-variable name '##compiler#pure #t))) (and-let* ((dbfile (if (not path) (and (##sys#file-exists? name #t #f #f) name) (chicken.load#find-file name path)))) @@ -1610,10 +1606,10 @@ (unless (null? props) (case (car props) ((#:pure) - (pure! name) + (mark-variable name '##compiler#pure #t) (loop (cdr props))) ((#:clean) - (clean! name) + (mark-variable name '##compiler#clean #t) (loop (cdr props))) ((#:enforce) (mark-variable name '##compiler#enforce #t) diff --git a/tests/scrutiny-2.expected b/tests/scrutiny-2.expected index 44315153..cd406985 100644 --- a/tests/scrutiny-2.expected +++ b/tests/scrutiny-2.expected @@ -16,7 +16,7 @@ Note: Predicate is always true The given argument has this type: - pair + (pair fixnum fixnum) Note: Predicate is always false In file `scrutiny-tests-2.scm:XXX', diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected index 2396a539..b93f9d23 100644 --- a/tests/scrutiny.expected +++ b/tests/scrutiny.expected @@ -76,7 +76,7 @@ Warning: Wrong number of arguments Procedure `string?' from module `scheme' has this type: - (* -> boolean) + (* --> boolean) Warning: Too many argument values In file `scrutiny-tests.scm:XXX', @@ -556,7 +556,7 @@ Warning: Invalid argument It is a call to `list' from module `scheme' which has this type: - (#!rest * -> list) + (#!rest * --> list) This is the expression: @@ -583,7 +583,7 @@ Warning: Invalid argument It is a call to `cons' from module `scheme' which has this type: - ('a 'b -> (pair 'a 'b)) + ('a 'b --> (pair 'a 'b)) This is the expression: @@ -780,7 +780,7 @@ Warning: Invalid argument It is a call to `list' from module `scheme' which has this type: - (#!rest * -> list) + (#!rest * --> list) This is the expression: @@ -807,7 +807,7 @@ Warning: Invalid argument It is a call to `list' from module `scheme' which has this type: - (#!rest * -> list) + (#!rest * --> list) This is the expression: @@ -834,7 +834,7 @@ Warning: Invalid argument It is a call to `cons' from module `scheme' which has this type: - ('a 'b -> (pair 'a 'b)) + ('a 'b --> (pair 'a 'b)) This is the expression:Trap