@@ -641,8 +641,14 @@ static void serialize_stable(PARROT_INTERP, SerializationWriter *writer, PMC *st
641
641
write_ref_func (interp , writer , st -> boolification_spec -> method );
642
642
}
643
643
644
- /* XXX More to do here. */
645
- printf ("WARNING: STable serialization not yet fully implemented\n" );
644
+ /* Container spec. */
645
+ write_int_func (interp , writer , st -> container_spec != NULL );
646
+ if (st -> container_spec ) {
647
+ write_ref_func (interp , writer , st -> container_spec -> value_slot .class_handle );
648
+ write_str_func (interp , writer , st -> container_spec -> value_slot .attr_name );
649
+ write_int_func (interp , writer , st -> container_spec -> value_slot .hint );
650
+ write_ref_func (interp , writer , st -> container_spec -> fetch_method );
651
+ }
646
652
647
653
/* If the REPR has a function to serialize representation data, call it. */
648
654
if (st -> REPR -> serialize_repr_data )
@@ -1365,6 +1371,15 @@ static void deserialize_stable(PARROT_INTERP, SerializationReader *reader, INTVA
1365
1371
st -> boolification_spec -> method = read_ref_func (interp , reader );
1366
1372
}
1367
1373
1374
+ /* Container spec. */
1375
+ if (read_int_func (interp , reader )) {
1376
+ st -> container_spec = mem_sys_allocate (sizeof (ContainerSpec ));
1377
+ st -> container_spec -> value_slot .class_handle = read_ref_func (interp , reader );
1378
+ st -> container_spec -> value_slot .attr_name = read_str_func (interp , reader );
1379
+ st -> container_spec -> value_slot .hint = read_int_func (interp , reader );
1380
+ st -> container_spec -> fetch_method = read_ref_func (interp , reader );
1381
+ }
1382
+
1368
1383
/* XXX More to do here. */
1369
1384
printf ("WARNING: STable deserialization not yet fully implemented\n" );
1370
1385
0 commit comments