logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Re: new dllist (yet again): msg#00365

Subject: Re: Re: new dllist (yet again)
> > type opcode
> > type code =
> >     | Op of opcode
> >     | Array of code array
> > type key = array * int (* pointer in the tree *)
>
> Yeah I've thought of that, but:
>
> The problem is it makes pattern detection hard.
> For example to detect the sequence A B with a slist
> you just recursively seek
>
> A :: (B :: _ ) as tail -> ..

That's true. You might want to keep some parts of your geneate code flat but
that's something you can anticipate. First apply as much as possible of
rewriting rules, then flatten, then loop using you reach a fixpoint. You can
also minimize the number of allocations by implementing a two-steps flatten
algorithm : first recursivly calculate the size of the array needed then
alloc it and recursively fill it.

%Jesse:
Back to the subject I have thought a little by myself and I think now that
DLList could be added to ExtLib, if it replaces the RefList module. I think
almost nobody use it, so why not replace the ref-list by a mutable list, and
why not a double linked list, that is my thinking. Which of Jesse or Brian
will take over the DLList maintenance in ExtLib ? If Brian then you can
commit it (as well as IndexedTree as discussed before) , if Jesse then
please send me your SF account so I can add you to the developers list.

Nicolas



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>