[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #894: ##core#direct_call nodes should get debug-i
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #894: ##core#direct_call nodes should get debug-info |
Date: |
Sun, 18 Dec 2016 18:50:41 -0000 |
#894: ##core#direct_call nodes should get debug-info
---------------------------------+--------------------
Reporter: felix | Owner: felix
Type: defect | Status: new
Priority: minor | Milestone: 4.12.0
Component: compiler | Version: 4.7.x
Resolution: | Keywords:
Estimated difficulty: easy |
---------------------------------+--------------------
Comment (by sjamaan):
Wow, that was quite tricky indeed! Here's an example program that you can
use to test:
{{{
(define modulo-two #f)
(define quotient-of-two #f)
(define seen #f)
(let* ((seen-zeroes #f)
(ensure-nonzero (lambda (value)
(when (eq? value 0)
(set! seen-zeroes #t))
value)))
(set! modulo-two (lambda (x)
(ensure-nonzero x)
(modulo x 2)))
(set! quotient-of-two (lambda (x)
(ensure-nonzero x)
(quotient x 2)))
(set! seen? (lambda () seen-zeroes)))
}}}
If I compile this with {{{-O3 -d3}}}, I get the {{{direct_call}}} nodes to
{{{ensure-nonzero}}}.
--
Ticket URL: <https://bugs.call-cc.org/ticket/894#comment:5>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.