~ chicken-core (chicken-5) c67725039f61ef1f08c767837194fe7d5f8cb3ce
commit c67725039f61ef1f08c767837194fe7d5f8cb3ce
Author: LemonBoy <thatlemon@gmail.com>
AuthorDate: Sun May 21 15:56:59 2017 +0200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun May 21 17:25:33 2017 +0200
Infer types for inline foreign references
The inline{_loc}_ref nodes already carry their type, let's use this
piece of information during the scrutiny phase instead of typing them as
'*.
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/scrutinizer.scm b/scrutinizer.scm
index 385a17c5..cf7c6ad4 100644
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -515,6 +515,10 @@
((##core#undefined) '(*))
((##core#proc) '(procedure))
((##core#variable) (variable-result (first params) e loc flow))
+ ((##core#inline_ref)
+ (list (foreign-type->scrutiny-type (second params) 'result)))
+ ((##core#inline_loc_ref)
+ (list (foreign-type->scrutiny-type (first params) 'result)))
((if)
(let ((tags (cons (tag) (tag)))
(tst (first subs))
@@ -716,7 +720,7 @@
(set-cdr! params '(#t)))
'(undefined)))
- ((##core#primitive ##core#inline_ref) '*)
+ ((##core#primitive) '*)
((##core#call)
(let* ((f (fragment n))
(len (length subs))
Trap