BTW: we can do some new things that are interesting. One of them is
that we can garbage collect NTBS (null terminated byte strings).

No, not if you use malloc(). 

But if you just use the Felix allocator, you get a GC known version of
a C array which to C looks like an ordinary array. Interestingly,
we can actually get the length back, since for arrays this is known
via the Judy stuff.

One thing I have to do is replace the STL map which holds the roots
with a Judy array. Also need a function "forget(p)" which makes the gc
forget about a pointer, when passing it to a C function that takes ownership.
C can happily free(p) because actually we used malloc() to allocate it
in the first place (underneath).

Anyhow this is a new array kind, call it carray. It differs from 
a normal array in that it is second class (passed by pointer)
and the length isn't known at compile time. But unlike varray,
it is a fixed length array, not just a bounded length array:
we actually don't have a fixed length array yet. Grr .. I mean
length fixed dynamically at construction time.

We actually need that, and right now. Just consider the ugliness
used in implementing, say, re2, where the capture array is
constructed with varray, is always maxed out,. I think the tre
interface is even worse .. :) Lots of places where we would like
to pass C a C array.


--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to