I find this hard to believe:
var li1 = list("hello","my","World");
var li2 = list (li1, list("my","sweat","lord"), list("janis","joplin"));
// The ULTIMATE!
println$ li1;
var enli1 = Serialise::encode_pointer_closure li1.C_hack::cast[address];
var deli1 = (Se
Well we're on the way! With caveat you can't use a Judy array
or anything with a custom scanner yet, we can now find
the pointer closure of a given pointer:
//
var li = list("hello","my","World");
var pts = Serialise::find_closure li.C_hack::cast[address];
println$ pts;
var li
I'm now writing code that, given a pointer to an object (or several) finds the
transitive closure of all pointers.
The idea is the encoder routine is given a pointer and finds the transitive
closure then serialises all those objects (into a single string).
The decoder deserialises them, keeping t
Woops, forgot it in last email, here we go:
/
proc test [T with Str[T]] (p: &T) {
// Print all the info about the pointer
//Collector::print_pointer_data p;
// Get the shape from the info.
var rtti = p.address.Collector::get_pointer_data.shape;
/
Stage 2 is now working except for some details.
An extended example is given below.
This version still doesn't handle pointers.
Or functions..
The committed code fails in a couple of cases.
In particular serialisation of top level "int" type doesn't work!
This is because the standard library conta
On 06/02/2013, at 2:46 AM, john skaller wrote:
>
> However I found a weird bug I can't explain (in the compiler).
>
> But this does not work:
>
> i = shape.decoder ( p + slot * dynamic_slot_size, s, i);
>
> It generates this C++:
>
> _i44905_v44905_i = _i44906_v44906_shape->decode
I have varray serialisation appearing to work. Sans pointers, but
this is cool : everything on the heap is a varray.
However I found a weird bug I can't explain (in the compiler).
This works:
var mydecoder = shape.decoder;
for var slot in 0uz upto usedslots - 1uz do
i = mydecoder (
I am going to explain how the Felix memory system works, so I can
show some progress on serialisation. I note that in building the
code I'm going to show I have found some bugs in the gc,
mainly due to confusing names. So here goes.
In Felix, there is an RTTI object called a gc_shape_t (shape) wh
Here's the idea. We have an RTTI object called gc_shape_t: see
src/gc/flx_gc.hpp.
First we add an encode function slot to the object.
Lets see what we need.
If this is a simple subobject:
1. we need a pointer to the object.
2. we need a string and an offset into it to put the encoded in
3. W