Re: [Toybox] Towards find cleanup

2013-04-11 Thread Felix Janda
On 04/10/13 at 07:34pm, Rob Landley wrote: snip I think that some function parameters should be made const and that the code could be made less repetitive. I specify static because it allows the compiler to produce better code, but I've never found const to actually produce better code.

[Toybox] Broken find [Was: Re: Towards find cleanup]

2013-04-11 Thread Felix Janda
Now I think that I know better how this toy works and see that my cleanup has broken it. if (filter-op==OP_OR) { - result = evaluate(filter-next, node, fnext); - result2 = evaluate(*fnext, node, fnext); - if (result) { - return result; -

Re: [Toybox] Broken find [Was: Re: Towards find cleanup]

2013-04-11 Thread Rob Landley
On 04/11/2013 04:37:36 PM, Felix Janda wrote: Now I think that I know better how this toy works and see that my cleanup has broken it. if (filter-op==OP_OR) { -result = evaluate(filter-next, node, fnext); -result2 = evaluate(*fnext, node,

Re: [Toybox] Towards find cleanup

2013-04-11 Thread Rob Landley
On 04/11/2013 04:17:59 PM, Felix Janda wrote: On 04/10/13 at 07:34pm, Rob Landley wrote: snip I think that some function parameters should be made const and that the code could be made less repetitive. I specify static because it allows the compiler to produce better code, but I've

Re: [Toybox] Broken find [Was: Re: Towards find cleanup]

2013-04-11 Thread Rob Landley
On 04/11/2013 07:53:18 PM, Tim Bird wrote: Of maybe the expression tree should actually be put into a binary tree form, instead of serial pre-fix form, for easier traversal. -- Tim The vast majority of my bandwidth is taken up by day job and real life, what's left for toybox I'm cycling