~ chicken-core (chicken-5) 8a7c6ed2042440ae56fbdda8605c426c3bd0e1c4
commit 8a7c6ed2042440ae56fbdda8605c426c3bd0e1c4
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:14 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 d50676b3..ad7856ff 100644
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -494,6 +494,10 @@
((##core#proc) '(procedure))
((##core#global-ref) (global-result (first params) loc))
((##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))
@@ -696,7 +700,7 @@
(set-cdr! params '(#t)))
'(undefined)))
- ((##core#primitive ##core#inline_ref) '*)
+ ((##core#primitive) '*)
((##core#call)
(let* ((f (fragment n))
(len (length subs))
Trap