chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH 0/4] Various scrutinizer improvements


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH 0/4] Various scrutinizer improvements
Date: Mon, 15 Feb 2016 23:09:43 +1300

Hi all,

Attached are some scrutinizer patches.

The first follows on from 54a1ba8 somewhat, and adds more robust source
info tracking for (hopefully) better messages. In particular, it tracks
all node mutation performed by the scrutinizer so that we can show the
user where things occured in their source *before* any specializations,
rather than after. It's the difference between the following messages
for the program "(let ((a #t)) (if (not a) (cons a a) (list 1 2 3)))":

   Note: at toplevel:
     (foo.scm:1) in conditional, test expression will always return false:
   
   (if (not a) (cons a a) (list 1 2 3))

... versus...

   Note: at toplevel:
     (foo.scm:1) in conditional, test expression will always return false:
   
   (if (let ((tmp197 a)) #f) (cons a a) (list 1 2 3))

The "(let ...)" is the result of specialization but isn't terribly
helpful for the user to see, so we peel it back to the original source.
We use an alist for this, which shouldn't be too expensive since the
number of mutations is generally low and we only reconstruct any node
tree in full when printing a program fragment.

The rest of the patches add some obvious-once-you-see-them
specialization improvements for conditionals and predicates. These are
much more straightforward, so I'll just refer you to the commit
messages for those. Let me know if you have any questions.

Cheers,

Evan

Attachment: 0001-Track-source-nodes-for-better-scrutiny-output.master.patch
Description: Text Data

Attachment: 0002-Drop-consequent-branch-for-conditionals-that-are-alw.master.patch
Description: Text Data

Attachment: 0003-Propagate-known-predicate-call-result-types.master.patch
Description: Text Data

Attachment: 0004-Specialize-not-for-true-false-and-add-hardcoded-resu.master.patch
Description: Text Data

Attachment: 0001-Track-source-nodes-for-better-scrutiny-output.chicken-5.patch
Description: Text Data

Attachment: 0002-Drop-consequent-branch-for-conditionals-that-are-alw.chicken-5.patch
Description: Text Data

Attachment: 0003-Propagate-known-predicate-call-result-types.chicken-5.patch
Description: Text Data

Attachment: 0004-Specialize-not-for-true-false-and-add-hardcoded-resu.chicken-5.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]