Hello hackers,
here's a small patch that lets the scrutinizer use the type
information contained
in the `inline_ref` nodes.
Cheers,
Lemonboy
From 38e093efbc9e3c58e9079ff54317b566680342ea Mon Sep 17 00:00:00 2001
From: LemonBoy <[email protected]>
Date: Sun, 21 May 2017 15:56:59 +0200
Subject: [PATCH] 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
'*.
---
scrutinizer.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scrutinizer.scm b/scrutinizer.scm
index 385a17c5..006f4a40 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))
--
2.13.0
_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers