[cells-devel] Re: [cells-gtk-devel] lots of circular cells in cells-gtk3?

Ken Tilton kennytilton at optonline.net
Mon Apr 14 17:04:31 UTC 2008


Ken Tilton wrote:
> Recently some evil programming took forever to debug because I was 
> re-entering a rule without realizing it. After figuring out that that 
> was happening and fixing the cause of that, I looked to see why rule 
> re-entrance had not been detected, which I seemed to recall it always 
> had been.
> 
> Turns out the rule began with without-c-dependency as a trick to run 
> only once. That macro simply:
> 
>     `(let ((cells::*call-stack* nil))
>        , at body)
> 
> And that worked because the dependent cell was always identifed as (car 
> cells::*call-stack*).

In case that last bit is not clear, what I meant was "That worked [to 
avoid dependency] because the dependent cell was identified by taking 
the car of the *call-stack*"

btw, note that this undetected re-entrance would happen if /any/ rule in 
the chain leading back to the same cell did a without-c-dependency.

kt



More information about the cells-devel mailing list